/* =================================================================
   home.css
   トップページ専用のスタイルシート
================================================================= */

/* --- 1. ページ固有の基本設定 --- */
body {
    /* トップページの背景色をライトグレーに設定 */
    background-color: #f7f7f7;
}

/* --- 2. ヒーローセクション --- */
.hero-section {
    padding: 40px 0;
}

.hero-slide picture {
    flex-grow: 1;       /* テキスト以外の残りの高さをすべて埋める */
    overflow: hidden;   /* はみ出し防止 */
    min-height: 0;      /* Flexboxのバグ回避のため */
}

  .hero-slide picture,
  .hero-slide img {
    display: block; /* レイアウト崩れを防ぐためブロック要素として扱う */
    width: 900px;
    height: 675px; /* 親要素(高さ60vhのコンテナ)いっぱいに広がるようにする */
    object-fit: cover; /* 縦横比を保ったまま、コンテナ全体を覆うように表示 */
  }

.hero-slide p {
    width: 100%;
    background: #f7f7f7;      /* 背景色をお好みで調整（例：白やページの背景色） */
    box-sizing: border-box;   /* paddingを含めてwidth:100%にする */
    flex-shrink: 0;           /* コンテナが縮んでもこの要素の高さは維持する */
    margin: 0;                /* pタグのデフォルトマージンをリセット */
    color: #333;              /* 文字色を読みやすく調整 */
    text-align: right;
    font-size: 12px;
}

.hero-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
}

.hero-visual {
    max-width: 900px;
    width: 100%;
    height: 700px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    z-index: 1;
    display: flex;
    flex-direction: column; /* 子要素（画像とテキスト）を縦に並べる */
    background-color: #fff; /* 画像読み込み前の背景色（任意） */
}

.hero-slide.active {
    opacity: 1;
    z-index: 2;
}

.hero-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none; /* コンテンツ自体はクリックできないように */
}
.hero-content > * {
    pointer-events: auto; /* 子要素はクリックできるように戻す */
}

.vertical-text {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    writing-mode: vertical-rl;
    font-size: 18px;
    letter-spacing: 2px;
}

.hero-side-nav {
    position: absolute;
    right: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
}

.hero-slider-nav {
    display: none;
/*    position: absolute;
    right: 100px;
    bottom: 0;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    display: flex;
    cursor: pointer;
*/}

  /* (2) 中央の縦線のスタイル */
  .hero-slider-nav::before {
    background-color: #3C3C3C; /* 線の色を白から濃いグレーに変更 */
  }

  /* (3) 番号(01, 02...)のスタイル */
  .hero-slider-nav span {
    color: #3C3C3C; /* 文字色を濃いグレーに変更 */
    background-color: transparent; /* 背景色をなくす */
    font-size: 16px; /* 文字を少し大きくする */
    font-weight: normal;
    padding: 5px;
  }

  /* (4) アクティブな番号のスタイル */
  .hero-slider-nav span.active {
    font-weight: bold; /* 太字にする */
    transform: none; /* 古い指定(拡大)を解除 */
    background-color: transparent; /* 背景色をなくす */
  }


/* --- 3. 重要なお知らせセクション --- */
.notices {
    padding: 60px 0;
}
.notices .container {
    background-color: #fff;
    padding: 40px 60px;
    position: relative;
}
.notices h2 {
    font-size: 16px;
    margin-bottom: 30px;
    font-weight: normal;
}
.notice-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.notice-item {
    padding: 20px 0;
    border-bottom: 1px solid var(--color-border, #e9e9e9);
    font-size: 15px;
    position: relative;
}

.notice-item a {
    display: flex; /* flexboxをaタグに移動 */
    text-decoration: none; /* aタグのデフォルト下線を消す */
    color: inherit; /* 親要素の文字色を継承する */
}

.notice-item::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 0;
    height: 1px;
    background-color: #000;
    transition: width 0.3s ease;
}

.notice-item:hover::after {
    width: 100%;
}

.notice-item:hover a {
}


.notice-item:first-child {
    padding-top: 0;
}

.notice-date {
    flex-shrink: 0;
    width: 120px;
}
.notice-title {
    padding-left: 30px;
    border-left: 1px solid var(--color-border, #e9e9e9);
}

.notice-list+a {
    text-align: right;
    display: block;
    position: absolute;
    top: 2.5rem;
    right: 2.5rem;
    font-size: 13px;
}

/* --- 4. Aboutセクション --- */
.about-section {
    padding: 80px 0;
}

.about-intro {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    margin-bottom: 80px;
}

.about-intro h2 {
    font-size: 32px;
    line-height: 1.5;
}

.about-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-links h3 {
    font-size: 20px;
    margin-bottom: 30px;
}
.about-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.about-links li a {
    display: flex;
    align-items: center;
    gap: 15px;
}
.about-links .arrow-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--color-dark, #212529);
    color: #fff;
    font-size: 8px;
    line-height: 1;
}
.about-links .arrow-icon::before {
    content: '▶';
    transform: scaleX(0.8);
}
.about-image img {
    width: 100%;
    object-fit: cover;
}


/* --- 5. News & Supportセクション --- */
.news-support-section {
    padding: 80px 0;
}
.news-support-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.news-column, .support-column {
    background-color: #fff;
    padding: 40px;
}

.section-title {
    font-size: 24px;
    letter-spacing: 2px;
    margin-bottom: 40px;
}
.article-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* article-itemのセレクタを詳細にして、スタイルの優先度を上げます */
.news-column .article-item {
    padding: 20px 0;
    border-bottom: 1px solid var(--color-border, #e9e9e9);
    position: relative; /* ← この指定を確実に効かせます */
}

/* aタグのスタイルを明確化 */
.article-item a {
    display: block; /* aタグがliの領域全体を占めるように念のため指定 */
    text-decoration: none;
    color: inherit;
}

/* アニメーション用の下線（セレクタを合わせて詳細にします） */
.news-column .article-item::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 0;
    height: 1px;
    background-color: #000;
    transition: width 0.3s ease;
}

/* ホバー時のアニメーション（セレクタを合わせて詳細にします） */
.news-column .article-item:hover::after {
    width: 100%;
}

.article-item {
    padding: 20px 0;
    border-bottom: 1px solid var(--color-border, #e9e9e9);
}
.article-item:first-of-type {
    padding-top: 0;
}
.article-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
    font-size: 14px;
}
.article-tag {
    background-color: #e9e9e9;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
}
.article-title {
    font-size: 15px;
    font-weight: normal;
    margin: 0;
}
.btn {
    display: inline-block;
    background-color: var(--color-dark, #212529);
    color: #fff!important;
    padding: 15px 40px;
    text-align: center;
    margin-top: 40px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
}
.btn:hover {
    opacity: 0.8;
}


/* --- 6. レスポンシブスタイル --- */
@media (max-width: 992px) {
    .vertical-text, .hero-side-nav {
        display: none;
    }
    .about-intro, .about-details, .news-support-grid {
        grid-template-columns: 1fr;
    }
    .about-intro {
        gap: 30px;
        margin-bottom: 60px;
    }
    .about-details {
        gap: 40px;
    }
    .news-support-grid {
        gap: 40px; /* スマホでは少し間隔を狭める */
    }
}

@media (max-width: 768px) {

    /* --- ヒーローセクションのSP対応 --- */
    .hero-section {
        padding: 80px 0 20px;
        margin: 0 -5px;
    }

    .hero-slider, .hero-slide {
        height: auto;
    }

    .hero-container, .hero-visual {
        min-height: 340px;
        padding: 40px 0 0 0 !important;
        height: 75vw; 
    }

    .hero-slide picture,
    .hero-slide img {
        width: 100%;
        height: auto;
        object-fit: cover;
    }

    .hero-slider-nav {
        right: -10px;
        bottom: 0;
        /* gapの指定もここにまとめる */
        gap: 20px;
    }
    
    .hero-slide p {
        text-align: right;
        padding-right: 0.5em;
    }

    .notices {
        padding: 40px 0;
    }
    .notices .container {
        padding: 30px 20px;
    }
    .notice-item {
        flex-direction: column;
        gap: 10px;
    }
    .notice-title {
        padding-left: 0;
        border-left: none;
    }

    .about-section, .news-support-section {
        padding: 20px 0;
    }
    .news-column, .support-column {
        padding: 30px;
    }
    .about-intro h2 {
        font-size: 28px;
    }
    .about-image {
        order: -1;
    }
}



/* --- 0. 全体制御 --- */
body.is-loading > *:not(#loader-bg) {
  visibility: hidden; /* JSが準備できるまで完全に非表示 */
  opacity: 0;
}
body.is-ready > *:not(#loader-bg) {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.5s ease-in;
}

/* --- 1. ローディング画面のスタイル --- */
#loader-bg {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #ffffff;
  z-index: 9999;
  transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
  visibility: visible;
  opacity: 1;
}
#loader-bg img {
  width: 180px;
  max-width: 50%;
  animation: pulse 1.8s ease-in-out infinite;
}
#loader-bg.is-hidden {
  opacity: 0;
  visibility: hidden;
}
@keyframes pulse {
  0% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); opacity: 0.8; }
}

/* --- 2. ヒーローセクションの演出 --- */
.hero-visual,
.hero-content .vertical-text,
.hero-content .hero-side-nav a {
  opacity: 0;
  transition: opacity 1.2s cubic-bezier(0.25, 1, 0.5, 1);
}
.hero-section.is-visible .hero-visual,
.hero-section.is-visible .vertical-text,
.hero-section.is-visible .hero-side-nav a {
  opacity: 1;
}
.hero-content .vertical-text .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  transition: transform 0.6s ease-out, opacity 0.6s ease-out;
}
.hero-section.is-visible .vertical-text .char {
  opacity: 1;
  transform: translateY(0);
}

/* --- 3. .about-intro のテキストアニメーション --- */
/*.about-intro {
  opacity: 0;
}
.about-intro.is-visible {
  opacity: 1;
}
.about-intro .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px) scale(0.9);
  transition: opacity 0.4s, transform 0.4s;
}
.about-intro.is-visible .char {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.about-intro p {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.about-intro.is-visible p {
  opacity: 1;
  transform: translateY(0);
}*/

/* --- 4. .about-details のアニメーション (左右からスライドイン) --- */
/*.about-details {
  opacity: 0;
}
.about-details.is-visible {
  opacity: 1;
}
.about-details .about-links,
.about-details .about-image {
  opacity: 0;
  transition: opacity 2s ease-out, transform 2s cubic-bezier(0.16, 1, 0.3, 1);
}
.about-details .about-links { transform: translateX(-50px); }
.about-details .about-image { transform: translateX(50px); }
.about-details.is-visible .about-links,
.about-details.is-visible .about-image {
  opacity: 1;
  transform: translateX(0);
}
.about-details.is-visible .about-image { transition-delay: 0.2s; }
*/
/* --- 5. 汎用アニメーションスタイル --- */
/* (スクロールで表示される要素用) */
.animate-target {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.animate-target.is-visible {
  opacity: 1;
  transform: translateY(0);
}