/* ======== 基本設定 ======== */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;700&family=Noto+Serif+JP:wght@600&display=swap');

:root {
    --font-base: 'Noto Sans JP', sans-serif;
    --font-title: 'Noto Serif JP', serif;
    --color-primary: #005CAF; /* 知的なブルー */
    --color-secondary: #E67E22; /* 温かみのあるオレンジ */
    --color-accent: #2ECC71; /* アクセントのグリーン */
    --color-text: #333;
    --color-bg: #F8F9FA;
    --color-white: #FFFFFF;
    --header-height: 80px;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    font-family: var(--font-base);
    line-height: 1.8;
    color: var(--color-text);
    background-color: var(--color-white);
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

.section {
    padding: 100px 0;
}

.section-title {
    font-family: var(--font-title);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 60px;
    line-height: 1.4;
}

.section-title__en {
    display: block;
    font-family: var(--font-base);
    font-size: 1rem;
    color: var(--color-secondary);
    font-weight: 700;
    margin-bottom: 8px;
}

.section-text {
    max-width: 800px;
    margin: 0 auto 40px;
    text-align: center;
}

.pc-only { display: inline; }
.sp-only { display: none; }

/* ======== ボタン共通 ======== */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    text-align: center;
}
.btn--primary {
    background-color: var(--color-secondary);
    color: var(--color-white);
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.4);
}
.btn--primary:hover {
    background-color: #d35400;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 126, 34, 0.5);
}
.btn--secondary {
    background-color: var(--color-white);
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}
.btn--secondary:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}
.btn--large {
    padding: 18px 40px;
    font-size: 1.1rem;
}

/* ======== ヘッダー ======== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
}
.header.scrolled {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
}
.header__logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
}
.header__nav {
    display: flex;
    gap: 16px;
}
.header__hamburger { display: none; }
.sp-nav { display: none; }


/* ======== 1. ファーストビュー ======== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--color-white);
    overflow: hidden;
}
.hero__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(0, 92, 175, 0.6), rgba(0, 20, 50, 0.6)), url("https://www.keiai.net/test3/lp/index.html");
    background-size: cover;
    background-position: center;
    animation: zoom-in 20s ease-in-out infinite alternate;
}
@keyframes zoom-in {
    from { transform: scale(1); }
    to { transform: scale(1.1); }
}
.hero__content {
    position: relative;
    z-index: 2;
}
.hero__title {
    font-family: var(--font-title);
    font-size: 4rem;
    line-height: 1.3;
    margin-bottom: 24px;
    font-weight: 600;
}
.hero__title-sub {
    display: block;
    font-family: var(--font-base);
    font-size: 1.2rem;
    letter-spacing: 2px;
    margin-bottom: 8px;
}
.hero__text {
    font-size: 1.2rem;
    margin-bottom: 40px;
}
.hero__cta {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* ======== 2. 3つの力 ======== */
.features {
    background-color: var(--color-bg);
}
.features__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.feature-card {
    background-color: var(--color-white);
    padding: 20px;
    text-align: center;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}
.feature-card:hover {
    transform: translateY(-10px);
}
.feature-card__icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background-color: var(--color-primary);
    color: var(--color-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-family: var(--font-title);
}
.feature-card__title {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: var(--color-primary);
}
.feature-card__title span {
    display: block;
    font-size: 0.9rem;
    font-family: var(--font-base);
    color: #999;
    margin-top: 4px;
}
.feature-card__text {
    font-size: 0.95rem;
}

/* ======== 3. 教育の特長 ======== */
.program-list {
    display: flex;
    flex-direction: column;
    gap: 80px;
}
.program-item {
    display: flex;
    align-items: center;
    gap: 60px;
}
.program-item--reverse {
    flex-direction: row-reverse;
}
.program-item__img {
    flex: 1;
}
.program-item__img img {
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.program-item__content {
    flex: 1;
}
.program-item__title {
    font-family: var(--font-title);
    font-size: 2rem;
    color: var(--color-primary);
    margin-bottom: 24px;
    position: relative;
    padding-bottom: 16px;
}
.program-item__title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 4px;
    background-color: var(--color-secondary);
}
.program-item__text {
    font-size: 1.05rem;
}

/* ======== 4. 校長メッセージ ======== */
.message {
    background-color: var(--color-bg);
}
.message__card {
    background-color: var(--color-white);
    display: flex;
    align-items: center;
    gap: 60px;
    padding: 60px;
    border-radius: 16px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.05);
}
.message__img {
    flex-shrink: 0;
}
.message__img img {
    width: 250px;
    border-radius: 12px;
}
.message__title {
    font-family: var(--font-title);
    font-size: 1.8rem;
    margin-bottom: 24px;
    color: var(--color-primary);
}
.message__text {
    margin-bottom: 24px;
}
.message__signature {
    text-align: right;
    font-weight: 700;
}

/* ======== 5. 在校生・保護者の声 ======== */
.testimonials__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.voice-card {
    background-color: var(--color-bg);
    padding: 30px;
    border-radius: 12px;
    border-left: 5px solid var(--color-accent);
}
.voice-card__text {
    margin-bottom: 16px;
    font-style: italic;
}
.voice-card__meta {
    text-align: right;
    font-weight: 700;
    color: #555;
}

/* ======== 6. 卒業後の未来 ======== */
.future {
    background-color: var(--color-bg);
}
.future__image img {
    border-radius: 12px;
    width: 100%;
    height: 400px;
    object-fit: cover;
}

/* ======== 7. 最後の行動喚起 ======== */
.cta {
    background-color: var(--color-primary);
    color: var(--color-white);
    text-align: center;
}
.cta__title {
    font-family: var(--font-title);
    font-size: 2.5rem;
    margin-bottom: 24px;
}
.cta__text {
    font-size: 1.1rem;
    margin-bottom: 40px;
    opacity: 0.9;
}
.cta__buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}
/* CTAセクション内ボタンの特別スタイル */
.cta .btn--secondary {
    background-color: transparent;
    border-color: var(--color-white);
    color: var(--color-white);
}
.cta .btn--secondary:hover {
    background-color: var(--color-white);
    color: var(--color-primary);
}


/* ======== フッター ======== */
.footer {
    background-color: #2c3e50;
    color: var(--color-white);
    padding: 50px 0;
    text-align: center;
}
.footer__logo {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}
.footer__address {
    margin-bottom: 16px;
    opacity: 0.8;
}
.footer__copy {
    font-size: 0.9rem;
    opacity: 0.6;
}

/* ======== アニメーション ======== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}


/* ======== レスポンシブ対応 (SP) ======== */
@media (max-width: 768px) {
    .pc-only { display: none; }
    .sp-only { display: inline; }
    
    .section { padding: 60px 0; }
    .section-title { font-size: 2rem; }

    .btn { padding: 12px 24px; }
    .btn--large { padding: 14px 28px; font-size: 1rem; }

    /* ヘッダー SP */
    .header__inner { padding: 0 20px; }
    .header__nav { display: none; }
    .header__hamburger {
        display: block;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 1001;
        width: 30px;
        height: 22px;
        position: relative;
    }
    .header__hamburger span {
        display: block;
        width: 100%;
        height: 2px;
        background-color: var(--color-primary);
        position: absolute;
        left: 0;
        transition: all 0.3s;
    }
    .header__hamburger span:nth-child(1) { top: 0; }
    .header__hamburger span:nth-child(2) { top: 10px; }
    .header__hamburger span:nth-child(3) { top: 20px; }
    
    .header__hamburger.is-active span:nth-child(1) { top: 10px; transform: rotate(45deg); }
    .header__hamburger.is-active span:nth-child(2) { opacity: 0; }
    .header__hamburger.is-active span:nth-child(3) { top: 10px; transform: rotate(-45deg); }

    /* SPナビゲーション */
    .sp-nav {
        display: block;
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: rgba(255, 255, 255, 0.98);
        z-index: 999;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 30px;
        transform: translateX(100%);
        transition: transform 0.4s ease-in-out;
    }
    .sp-nav.is-active {
        transform: translateX(0);
    }
    .sp-nav__link {
        font-size: 1.2rem;
        color: var(--color-primary);
        text-decoration: none;
        font-weight: 700;
    }

    /* ファーストビュー SP */
    .hero__title { font-size: 2.5rem; }
    .hero__title-sub { font-size: 1rem; }
    .hero__text { font-size: 1rem; padding: 0 10px; }
    .hero__cta { flex-direction: column; gap: 16px; align-items: center; }

    /* 3つの力 SP */
    .features__grid { grid-template-columns: 1fr; gap: 30px; }

    /* 教育の特長 SP */
    .program-item, .program-item--reverse {
        flex-direction: column;
        gap: 30px;
    }

    /* 校長メッセージ SP */
    .message__card { flex-direction: column; padding: 30px; gap: 30px; }
    .message__img img { width: 180px; }
    .message__title { font-size: 1.5rem; text-align: center; }
    .message__content { text-align: left; }
    .message__signature { text-align: right; }

    /* 声 SP */
    .testimonials__grid { grid-template-columns: 1fr; gap: 20px; }

    /* CTA SP */
    .cta__buttons { flex-direction: column; gap: 16px; align-items: stretch; }
}
/* css/style.css のスライダー関連部分をこちらに差し替えてください */

/* ======== 1. ファーストビュー (スライダー対応) ======== */
.hero {
    position: relative; /* 子要素を絶対配置するための基準 */
    width: 100%;
    height: 100vh; /* 画面の高さいっぱいに表示 */
    min-height: 600px;
    display: flex; /* 中央揃えのため */
    align-items: center;
    justify-content: center;
    overflow: hidden; /* はみ出したスライダーを隠す */
    background-color: #111; /* 画像読み込み中の背景色 */
}

/* スタイリッシュに見せるためのオーバーレイ */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.7) 100%);
    z-index: 1; /* テキストより下、スライドより上 */
}

/* スライダーのコンテナ */
.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-slider__list {
    display: flex;
    /* 【変更点】画像幅を600pxに変更し、全体の幅を再計算 */
    width: calc(600px * 16); /* 600px × 16枚 */
    height: 100%;
    list-style: none;
    padding: 0;
    margin: 0;
    animation: slide-animation 40s linear infinite; /* アニメーション速度はここで調整 */
}

.hero-slider__item {
    /* 【変更点】画像の幅を600pxに */
    width: 600px;
    height: 100%;
    flex-shrink: 0; /* 画像が縮まないように */
}

.hero-slider__img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* アスペクト比を保ったまま領域を埋める */
    filter: grayscale(30%); /* 少し彩度を落としてクールな印象に */
}

/* アニメーションの定義 */
@keyframes slide-animation {
    0% {
        transform: translateX(0);
    }
    100% {
        /* 【変更点】移動距離を画像8枚分(600px * 8)に変更 */
        transform: translateX(calc(-600px * 8));
    }
}

/* ファーストビューのコンテンツ */
.hero__content {
    position: relative; /* オーバーレイより手前に表示 */
    z-index: 2;
    text-align: center;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5); /* 文字の視認性向上 */
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .hero {
        min-height: 500px;
    }

    .hero-slider__list {
        /* 【変更点】SPでの画像幅を400pxに変更し、全体の幅を再計算 */
        width: calc(400px * 16);
        animation-name: slide-animation-sp;
    }

    .hero-slider__item {
        /* 【変更点】SPでの画像の幅を400pxに */
        width: 400px;
    }

    /* SP用のアニメーション */
    @keyframes slide-animation-sp {
        0% {
            transform: translateX(0);
        }
        100% {
            /* 【変更点】SPでの移動距離を画像8枚分(400px * 8)に変更 */
            transform: translateX(calc(-400px * 8));
        }
    }
}

/* css/style.css の末尾などに追記してください */

/* ======== 詳細ボタンのスタイル ======== */
.btn--details {
    display: inline-block;
    position: relative; /* 疑似要素配置の基準 */
    margin-top: 24px; /* 上のテキストとの余白 */
    padding: 12px 52px 12px 24px; /* 右側に矢印用のスペースを確保 */
    border: 2px solid #006837; /* プライマリカラーの枠線 (既存ボタンと統一) */
    color: #006837; /* プライマリカラーの文字色 */
    background-color: transparent; /* 背景は透明に */
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden; /* はみ出す要素を隠す */
    z-index: 1; /* 重なり順の調整 */
    align-self: flex-start; /* ボタンが不必要に伸びないように */
}

/* ホバー時にスライドインする背景 */
.btn--details::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #006837; /* プライマリカラー */
    transform: translateX(-101%); /* 初期状態では左側の外に隠す */
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: -1;
}

/* 矢印を疑似要素で作成 */
.btn--details::after {
    content: '→';
    position: absolute;
    top: 50%;
    right: 24px;
    font-size: 1em;
    transform: translateY(-50%);
    transition: right 0.3s ease-out;
}

/* ホバー時のエフェクト */
.btn--details:hover {
    color: #fff; /* 文字色を白に */
    border-color: #006837; /* 枠線の色を維持 */
}

.btn--details:hover::before {
    transform: translateX(0); /* 背景を左から右へスライドイン */
}

.btn--details:hover::after {
    right: 18px; /* 矢印を少し右に動かす */
}

/* ======== ボタンの位置を揃えるためのレイアウト調整 ======== */
.program-item__content {
    display: flex;
    flex-direction: column; /* 要素を縦に並べる */
    height: 100%; /* 親要素の高さいっぱいに広がる */
}

.program-item__text {
    flex-grow: 1; /* テキスト部分が伸びて余白を埋める */
}