/************************************************
 * UMJ Footer – 完全独立版（PC / Mobile 対応）
 * + single サイドバー sticky
 * + アーカイブ折りたたみ（CSSのみ）
 ************************************************/

/* =============================
   共通デザイン
============================= */

.footer-main{
  background: linear-gradient(135deg, #fafafa 0%, #f0f0f0 100%);
  color: #333;
  padding: 40px 20px 20px;
}

.footer-main a{
  color: #444 !important;
  text-decoration: none !important;
}
.footer-main a:hover{
  color: #ff8c42 !important;
}

.footer-about p{
  color: #555;
  font-size: 14px;
  line-height: 1.8;
}

.footer-tagline{
  font-size: 16px;
  font-weight: 600;
  color: #ff8c42;
  margin-top: 4px;
  margin-bottom: 8px;
}

.footer-logo img{
  height: 50px;
  width: auto;
}

/* =============================
   お問い合わせボタン（共通ベース）
============================= */
.footer-contact-btn{
  display: inline-flex;
  justify-content: center;
  align-items: center;

  background: linear-gradient(135deg, #FF8A3C 0%, #FF6F1A 100%) !important;
  color: #ffffff !important;
  border: none !important;

  padding: 12px 28px !important;
  font-size: 14px !important;
  font-weight: 800 !important;

  border-radius: 40px !important;
  box-shadow: 0 6px 22px rgba(255, 120, 40, 0.35) !important;

  transition: all .25s ease-in-out !important;
}

.footer-contact-btn:hover{
  background: linear-gradient(135deg, #FF9A50 0%, #FF7B29 100%) !important;
  transform: translateY(-3px) !important;
  box-shadow: 0 10px 28px rgba(255, 120, 40, 0.45) !important;
}

/* =============================
   SNS アイコン
============================= */
.footer-sns{
  display: flex;
  gap: 14px;
  margin-top: 12px;
}

.sns-icon{
  width: 24px;
  height: 24px;
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.9;
  transition: all 0.2s ease;
}
.sns-icon:hover{
  opacity: 1;
  transform: translateY(-2px);
}

/* YouTube */
.sns-icon.youtube{
  background-image: url("data:image/svg+xml;utf8,<svg fill='white' stroke='%23666' stroke-width='1.2' viewBox='0 0 24 24'><path d='M19.6 3.2H4.4A4.4 4.4 0 000 7.6v8.8a4.4 4.4 0 004.4 4.4h15.2a4.4 4.4 0 004.4-4.4V7.6a4.4 4.4 0 00-4.4-4.4zM9.6 16V8l6.4 4-6.4 4z'/></svg>");
}

/* X */
.sns-icon.x{
  background-image: url("data:image/svg+xml;utf8,<svg fill='white' stroke='%23666' stroke-width='1.4' viewBox='0 0 24 24'><path d='M18.3 2H21l-6.9 7.9L22 22h-7.1l-4.5-5.9L4.8 22H2l7.4-8.4L2.2 2h7.1l4.1 5.5L18.3 2z'/></svg>");
}

/* Facebook */
.sns-icon.facebook{
  background-image: url("data:image/svg+xml;utf8,<svg fill='white' stroke='%23666' stroke-width='1.2' viewBox='0 0 24 24'><path d='M22 12a10 10 0 11-11.5 9.9v-7h-2v-3h2V9.7c0-2 1.2-3.1 3-3.1.9 0 1.8.2 1.8.2v2h-1c-1 0-1.3.6-1.3 1.2V12h2.2l-.4 3h-1.8v7A10 10 0 0022 12z'/></svg>");
}

/* =============================
   コピーライト帯 共通
============================= */
.footer-bottom{
  background: linear-gradient(135deg, #ff9a50 0%, #ff7b29 100%) !important;
  padding: 6px 0 !important;
}
.footer-bottom-container{
  max-width: 1180px;
  margin: 0 auto;
}
.footer-bottom-container p{
  font-size: 12px !important;
  opacity: 0.85 !important;
  margin: 0 !important;
}
.footer-legal-links{
  list-style: none;
  padding: 0;
  margin: 0;
}

/* =============================
   PC レイアウト
============================= */
@media (min-width: 1025px){
  .footer-container{
    display: grid !important;
    grid-template-columns: 1.2fr 0.9fr 0.9fr !important;
    gap: 40px !important;
    max-width: 1180px;
    margin: 0 auto !important;
    align-items: flex-start;
  }

  .footer-right-group{
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 30px !important;
  }

  .footer-sns{
    grid-column: 1 / span 2;
  }

  .footer-bottom-container{
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0 16px;
  }

  .footer-legal-links{
    display: flex !important;
    gap: 22px !important;
  }

  .footer-legal-links a{
    font-size: 12px !important;
    color: #ffffffcc !important;
    white-space: nowrap;
    text-decoration: none;
  }

  /* PCではボタンをしっかり見せる */
  .footer-contact-btn{
    padding: 18px 40px !important;
    font-size: 18px !important;
  }
}

/* =============================
   スマホレイアウト
============================= */
@media (max-width: 1024px){
  .footer-container{
    padding: 0 18px !important;
    display: block !important;
  }

  .footer-about{
    padding-bottom: 12px !important;
    margin-bottom: 16px !important;
    border-bottom: 1px solid rgba(0,0,0,0.08);
  }

  .footer-logo img{
    height: 34px !important;
    width: auto !important;
    margin-bottom: 10px !important;
  }

  /* スマホ版お問い合わせボタン：白地＋オレンジ文字（中央揃え） */
  .footer-contact-btn{
    width: 100% !important;
    text-align: center !important;

    background: #ffffff !important;
    border: 2px solid #ff8c42 !important;
    color: #ff8c42 !important;

    padding: 16px 20px !important;
    font-size: 18px !important;
    font-weight: 700 !important;

    border-radius: 32px !important;
    box-shadow: none !important;

    white-space: nowrap !important;
    transform: none !important;
  }

  .footer-contact-btn:hover{
    transform: none !important;
    box-shadow: none !important;
  }

  .footer-sns{
    display: flex !important;
    justify-content: flex-start;
    margin-top: 10px;
  }

  .footer-right-group{
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 20px !important;
    margin-top: 20px !important;
  }

  .footer-section{
    border: none !important;
    padding: 0 !important;
    margin-bottom: 0 !important;
  }

  .footer-section h3{
    font-size: 16px !important;
    margin-bottom: 4px !important;
  }

  .footer-bottom{
    padding: 10px 0 12px !important;
  }

  .footer-bottom-container{
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    text-align: center !important;
  }

  .footer-bottom-container p,
  .footer-bottom-container a{
    color: #ffffff !important;
    opacity: 0.92 !important;
  }

  .footer-legal-links{
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
  }

  .footer-legal-links a{
    font-size: 12px !important;
  }
}

/* ============================================================
   1. サイドバー追従（Sticky）の完全版
============================================================ */
@media (min-width: 1025px) {
    /* 親要素の制限を解除 */
    .single_content {
        display: flex !important;
        align-items: flex-start !important;
        overflow: visible !important;
    }

    /* サイドバーを固定 */
    .single_sidebar {
        position: -webkit-sticky !important;
        position: sticky !important;
        top: 100px !important; /* ヘッダーの高さに合わせて調整 */
        height: auto !important;
        z-index: 10;
    }

    /* 祖先要素のoverflow:hiddenを強制解除（stickyの天敵） */
    #single, .my-single, .single_inner {
        overflow: visible !important;
    }
}

/* ============================================================
   2. 目次（コンテンツ一覧）の美化
============================================================ */
.toc_container, /* 一般的な目次プラグインのクラス */
#toc_container,
.ez-toc-container {
    background: #ffffff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    padding: 20px !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05) !important;
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
}

/* 目次のタイトル */
.toc_title, .ez-toc-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #333 !important;
    border-bottom: 2px solid #ff8c42 !important; /* アクセントカラー */
    padding-bottom: 10px !important;
    margin-bottom: 15px !important;
    display: block;
}

/* 目次のリスト */
.toc_list, .ez-toc-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.toc_list li, .ez-toc-list li {
    margin-bottom: 8px !important;
    line-height: 1.5 !important;
}

.toc_list a, .ez-toc-list a {
    color: #555 !important;
    text-decoration: none !important;
    font-size: 15px !important;
    transition: color 0.2s ease;
}

.toc_list a:hover, .ez-toc-list a:hover {
    color: #ff8c42 !important;
    text-decoration: underline !important;
}
@media (min-width: 1025px) {
    /* 1. 親要素を記事の高さまでしっかり伸ばす */
    .single_content {
        display: flex !important;
        align-items: flex-start !important; /* 子要素を伸ばさない */
        overflow: visible !important;
    }

    /* 2. サイドバー自体の設定 */
    .single_sidebar {
        position: -webkit-sticky !important;
        position: sticky !important;
        top: 100px !important;
        
        /* 伸びるのを防ぎ、中身の高さに合わせる */
        align-self: flex-start !important;
        height: auto !important;
        
        /* 念のため */
        flex-shrink: 0; 
    }
}
