/* ==========================================
   1. グローバル & 共通ベース
   ========================================== */

/* 基本設定（全ページ共通部分を統合） */
body {
    font-family: 'Noto Sans JP', sans-serif;
    margin: 0;
    scroll-behavior: smooth;
    color: #333333;
}

/* bodyの競合箇所：サブページ用設定 */
.body-subpage {
    line-height: 1.8;
    min-width: 320px;
}

/* bodyの競合箇所：インデックス用設定 */
.body-index {
    overflow-x: hidden;
}

/* ベースカラー設定 */
.bg-siip-gray { background-color: #333333; }
.text-siip-gray { color: #333333; }
.border-siip-gray { border-color: #333333; }
.text-siip-green { color: #9ec468; }

/* --- モバイルメニューアニメーション（全共通） --- */
#mobile-menu {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
#mobile-menu-overlay {
    transition: opacity 0.4s ease;
    pointer-events: none;
}
body.menu-open {
    overflow: hidden;
}
body.menu-open #mobile-menu-overlay {
    opacity: 1;
    pointer-events: auto;
}

/* --- トップへ戻るボタン（全共通） --- */
#back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
#back-to-top.show {
    opacity: 1;
    visibility: visible;
}


/* ==========================================
   2. インデックスページ専用 (index.html)
   ========================================== */

/* ボタン・フィルタ */
.btn-outline-gray {
    border: 2px solid #333333;
    color: #333333;
    transition: all 0.3s ease;
    background-color: transparent;
}
.btn-outline-gray:hover {
    background-color: #333333;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* インデックス用フィルタボタン (HTMLの.filter-btnに対応) */
#event-list-section .filter-btn {
    padding: 1px 1.5rem 0px; 
    border-radius: 9999px;
    font-weight: 700;
    font-size: 14px;
    border: 1px solid #e5e7eb;
    background-color: #fff;
    color: #666;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* カテゴリ別アクティブ & ホバーカラー */
#event-list-section .filter-btn[data-filter="all"].active,
#event-list-section .filter-btn[data-filter="all"]:hover {
    background-color: #333333; color: #fff; border-color: #333333; box-shadow: none;
}
#event-list-section .filter-btn[data-filter="セミナー"].active,
#event-list-section .filter-btn[data-filter="セミナー"]:hover {
    background-color: #63ac6b; color: #fff; border-color: #63ac6b; box-shadow: none;
}
#event-list-section .filter-btn[data-filter="相談"].active,
#event-list-section .filter-btn[data-filter="相談"]:hover {
    background-color: #9ec468; color: #fff; border-color: #9ec468; box-shadow: none;
}
#event-list-section .filter-btn[data-filter="その他"].active,
#event-list-section .filter-btn[data-filter="その他"]:hover {
    background-color: #3E90C0; color: #fff; border-color: #3E90C0; box-shadow: none;
}

/* アンカーリンク調整 */
#sen-contents { scroll-margin-top: 100px; }
@media (min-width: 768px) {
    #sen-contents { scroll-margin-top: 116px; }
}

/* メインスライダー */
.main-slider-section { width: 100%; padding: 20px 0 50px; background-color: #f5f5f5; overflow: hidden; }
@media (min-width: 768px) { .main-slider-section { padding: 40px 0 60px; } }
.swiper { width: 100%; height: auto; overflow: visible !important; }
.swiper-wrapper { display: flex; align-items: center; }
.swiper-slide {
    width: 80%; aspect-ratio: 16 / 9; transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1), filter 0.8s ease, opacity 0.8s ease;
    filter: grayscale(100%) opacity(0.2); transform: scale(0.9); transform-origin: center center; pointer-events: none;
    box-sizing: border-box; display: flex; justify-content: center; align-items: center; position: relative;
}
@media (min-width: 1024px) { .swiper-slide { width: 800px; } }
.swiper-slide-active { filter: grayscale(0%) opacity(1); transform: scale(1); pointer-events: auto; z-index: 10; }
.slide-img { width: 100%; height: 100%; object-fit: cover; box-shadow: 0 10px 40px rgba(0,0,0,0.1); border-radius: 4px; }
.swiper-button-next, .swiper-button-prev { color: #9ec468 !important; }
.swiper-pagination-bullet-active { background-color: #9ec468 !important; opacity: 1; }
.swiper-pagination-bullet { background-color: #333333; }
.mainSwiper .swiper-pagination { bottom: -35px !important; }
.slider-logo-wrapper { position: absolute; z-index: 20; pointer-events: none; }
.slider-logo-img { height: 15px; width: auto; object-fit: contain; }
@media (min-width: 768px) { .slider-logo-img { height: 22.5px; } }

/* 無限スクロールタイル */
@keyframes siip-scroll-left { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@keyframes siip-scroll-right { 0% { transform: translateX(-50%); } 100% { transform: translateX(0); } }
.siip-scroll-row-l { animation: siip-scroll-left 60s linear infinite; }
.siip-scroll-row-r { animation: siip-scroll-right 60s linear infinite; }
.siip-scroll-container:hover .siip-scroll-row-l, .siip-scroll-container:hover .siip-scroll-row-r { animation-play-state: paused; }
.siip-tile-shadow { text-shadow: none; transition: none; }
.siip-box-subtle { box-shadow: none; transition: none; }

/* 展開セクション */
.expand-section { max-height: 0; overflow: hidden; transition: max-height 0.8s ease-in-out, opacity 0.5s ease; opacity: 0; }
.expand-section.active { max-height: 5000px; opacity: 1; }


/* ==========================================
   3. サブページ共通 (Content Area)
   ========================================== */

.content-area h2 {
    font-size: 1.75rem; font-weight: 900; border-left: 6px solid #9ec468; padding-left: 1rem; margin-bottom: 1.5rem; display: flex; align-items: center;
}
.content-area h3 {
    font-size: 1.4rem; font-weight: 800; margin-bottom: 1.25rem; margin-top: 3rem; padding-bottom: 0.5rem; border-bottom: 2px solid #f3f4f6;
}
.content-section {
    margin-top: 4rem; scroll-margin-top: 170px; padding-top: 2rem;
}
.content-section:first-child { margin-top: 0; }

/* リストスタイル */
.content-area ul.standard-list { list-style: none; padding-left: 0; margin-bottom: 2rem; }
.content-area ul.standard-list li { position: relative; padding-left: 1.5rem; margin-bottom: 0.75rem; }
.content-area ul.standard-list li::before {
    content: ""; position: absolute; left: 0; top: calc(0.7em - 3px); width: 8px; height: 8px; background-color: #9ec468; border-radius: 2px;
}
.content-area ol.number-list { counter-reset: item; list-style: none; padding-left: 0; margin-bottom: 2rem; }
.content-area ol.number-list li { position: relative; padding-left: 2.2rem; margin-bottom: 1rem; }
.content-area ol.number-list li::before {
    counter-increment: item; content: counter(item); position: absolute; left: 0; top: 0.2em; width: 1.5rem; height: 1.5rem;
    background-color: #333; color: #fff; font-size: 0.8rem; font-weight: bold; display: flex; align-items: center; justify-content: center; border-radius: 50%;
}


/* ==========================================
   4. 各個別ページ特有スタイル
   ========================================== */

/* --- e_news.html 専用 --- */
#submission { scroll-margin-top: 106px; }
@media (max-width: 768px) { #submission { scroll-margin-top: 90px; } }
.content-area ol.alphabet-list { counter-reset: alpha; list-style: none; padding-left: 0; margin-bottom: 2rem; }
.content-area ol.alphabet-list > li { position: relative; padding-left: 1.5rem; margin-bottom: 0.75rem; font-weight: bold; }
.content-area ol.alphabet-list > li::before { counter-increment: alpha; content: counter(alpha, upper-alpha) "."; position: absolute; left: 0; color: #9ec468; }
.content-area ol.bracket-list { counter-reset: bracket; list-style: none; padding-left: 0; margin-top: 1rem; }
.content-area ol.bracket-list > li { position: relative; padding-left: 2rem; margin-bottom: 1rem; }
.content-area ol.bracket-list > li::before { counter-increment: bracket; content: "(" counter(bracket) ")"; position: absolute; left: 0; font-weight: bold; }
.link-green { color: #9ec468; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; transition: opacity 0.2s; }
.link-green:hover { opacity: 0.7; }
.btn-subscription { border: 2px solid #333333; color: #333333; padding: 0.5rem 1.5rem; border-radius: 9999px; font-size: 0.875rem; font-weight: 700; text-align: center; transition: all 0.3s; background-color: white; min-width: 180px; }
.btn-subscription:hover { background-color: #333333; color: white; }

/* --- news.html 専用 --- */
.news-nav-item { transition: all 0.2s ease; }
.news-nav-item:hover { background-color: #f1f5f9 !important; }
.news-nav-item:hover span.news-title { color: #9ec468 !important; }
/* お知らせページ用フィルタボタン (HTMLの.filter-btnに対応) */
#news-list-navigation .filter-btn, /* 汎用的な指定 */
.filter-btn { 
    transition: all 0.3s ease; 
}
.filter-btn.active { background-color: #333333; color: #ffffff; border-color: #333333; }

/* --- profile.html 専用 --- */
.timeline { position: relative; padding-left: 2rem; border-left: 2px solid #e5e7eb; margin-left: 0.5rem; margin-top: 2rem; }
.timeline-item { position: relative; padding-bottom: 2.5rem; }
.timeline-item::before { content: ""; position: absolute; left: -2.45rem; top: 0.5rem; width: 14px; height: 14px; background-color: #fff; border: 3px solid #9ec468; border-radius: 50%; z-index: 1; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-date { font-weight: 900; font-size: 1.1rem; color: #333; margin-bottom: 0.25rem; line-height: 1; }
.timeline-content { font-size: 0.95rem; color: #4b5563; }
.article-title { font-weight: 800; color: #333; margin-top: 2rem; margin-bottom: 0.5rem; display: block; font-size: 1.1rem; }
.custom-table { width: 100%; border-collapse: collapse; margin-bottom: 3rem; }
.custom-table th, .custom-table td { border: 1px solid #e5e7eb; padding: 1.25rem; text-align: left; }
.custom-table th { background-color: #f9fafb; width: 200px; font-weight: 700; color: #4b5563; }
@media (max-width: 768px) {
    .custom-table th { width: 35%; font-size: 0.85rem; padding: 0.75rem; }
    .custom-table td { font-size: 0.85rem; padding: 0.75rem; }
}
.sticky-nav { position: sticky; top: 80px; z-index: 90; background-color: rgba(255, 255, 255, 0.9); backdrop-filter: blur(8px); }
@media (min-width: 768px) { .sticky-nav { top: 96px; } }

/* --- search.html 専用 (Google Search) --- */
.gsc-control-cse { padding: 0 !important; border: none !important; background-color: transparent !important; font-family: 'Noto Sans JP', sans-serif !important; }
.gsc-search-box { margin-bottom: 0 !important; }
.gsc-input-box { border: 1px solid #ddd !important; border-radius: 4px !important; background: #fff !important; }
table.gsc-search-box td { vertical-align: middle !important; }
input.gsc-input { background: none !important; padding: 8px !important; text-indent: 0 !important; }
.gsc-search-button-v2 { background-color: #333333 !important; border-color: #333333 !important; border-radius: 4px !important; padding: 10px 16px !important; margin-left: 4px !important; }
.gsc-search-button-v2 svg { width: 16px !important; height: 16px !important; }