/* リセットと基本設定 */
* {
    margin: 0 ;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    color: #333;
    line-height: 1.5;
    margin: 0 auto; 
    width: 1000px;
}

/* 1000pxに抑えるラッパー */
.wrapper {
    max-width: 1000px;
    margin: 0 auto; /* 中央寄せ */
    background-color: #f8f9fa; /* コンテンツエリアの背景色 */
    box-shadow: 0 0 15px rgba(0,0,0,0.1); /* 少し影をつけると見栄えが良くなります */
    overflow: hidden; /* 子要素のはみ出しを防止 */
}

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

/* ヘッダー */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #fff;
    border-bottom: 2px solid #0033cc;
    height: 60px;
}

.header-menu {
    width: 60px;
    height: 100%;
    background-color: #0033cc;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
}

.menu-icon {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #fff;
    margin: 2px 0;
}

.menu-text {
    font-size: 10px;
    margin-top: 4px;
    font-weight: bold;
}

.header-logo {
    text-align: center;
    flex-grow: 1;
}

.logo-en {
    display: block;
    font-size: 10px;
    letter-spacing: 2px;
    color: #000;
}

.logo-ja {
    font-size: 20px;
    font-weight: 900;
    color: #000;
}

.header-user {
    width: 60px;
    height: 100%;
    background-color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-icon {
    width: 30px;
    height: 30px;
    background-color: #0033cc;
    border-radius: 50%;
}

/* ナビゲーション */
.course-nav {
    display: flex;
    width: 100%;
    color: #fff;
    font-size: 10px;
    text-align: center;
}

.nav-group {
    display: flex;
    flex: 1;
}

.nav-group.blue { background-color: #0033cc; }
.nav-group.orange { background-color: #ff6600; }

.nav-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    border-right: 1px solid rgba(255,255,255,0.3);
}

.nav-sub {
    flex: 1;
    padding: 5px 0;
    border-right: 1px solid rgba(255,255,255,0.3);
}
.nav-sub:last-child { border-right: none; }
.nav-sub span { font-weight: bold; font-size: 11px; }

/* ヒーローセクション */
.hero {
    position: relative;
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
    padding: 40px 20px 60px;
    background-color: #e6f0ff;
}

.hero-catchphrase {
    color: #0033cc;
    font-size: 28px;
    line-height: 1.4;
    margin-bottom: 15px;
}

.hero-subphrase {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 20px;
}

.hero-description {
    font-size: 12px;
    line-height: 1.8;
}

.hero-badge {
    background: linear-gradient(90deg, #6b8cce 0%, #3a5ba0 100%);
    color: #fff;
    padding: 8px 15px;
    display: inline-block;
    border-radius: 0 20px 20px 0;
    position: absolute;
    bottom: -15px;
    right: 0;
    font-size: 13px;
    font-weight: bold;
}

/* 四谷大塚とは */
.about {
    padding: 50px 0 30px;
    background-color: #fff;
    text-align: center;
}

.section-title {
    font-size: 25px;
    margin-bottom: 20px;
    font-weight: bold;
}

.scroll-container {
    display: flex;
    overflow-x: auto;
    /* padding: 0 20px; */
    gap: 20px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.scroll-container::-webkit-scrollbar {
    display: none;
}

.about-card {
    /* ★変更箇所：3つのカードが横1列に並ぶように調整 (20pxのgapを考慮した計算式) */
    flex: 0 0 calc(33.333% - 14px); 
    
    /* ★変更箇所：スマホ向けに最小幅を設定（画面が狭い場合はこれで横スクロールになります） */
    min-width: 280px; 
    
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 13px;
    text-align: left;
    scroll-snap-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* --- フェードインアニメーション用スタイル --- */
.about-card.fadein {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.2s ease-out, transform 1.8s ease-out;
}

.about-card.fadein.active:nth-child(1) {
    animation: singleFloat 1.5s ease-out forwards;
    animation-delay: 0s;
}
.about-card.fadein.active:nth-child(2) {
    animation: singleFloat 1.5s ease-out forwards;
    animation-delay: 0.8s;
}
.about-card.fadein.active:nth-child(3) {
    animation: singleFloat 1.5s ease-out forwards;
    animation-delay: 1.4s;
}


/* JSによって .active がついたときにアニメーション発火 */
.about-card.fadein.active {
    opacity: 1;
    transform: translateY(0);
}

.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.card-head-img {
    width: 80px; /* 画像のサイズ。デザインに合わせて数値を調整してください */
    height: auto;
    flex-shrink: 0; /* テキストが長くなっても画像が潰れないようにする */
}

.card-head-wrap {
    display: flex;
    align-items: center; /* 画像とテキストの縦の中央を揃える。（上揃えにする場合は flex-start に変更） */
    gap: 15px; /* 画像と右のテキストとの隙間 */
    margin-bottom: 15px;
}

.card-head-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px; /* 下の青文字との間隔 */
}

.card-highlight {
    color: #0055a4;
    font-weight: bold;
    font-size: 15px;
    line-height: 1.4;
    /* 以前あった margin-bottom: 10px; は不要になるため削除しています */
}

.card-text {
    font-size: 12px;
    line-height: 1.6;
}

.scroll-hint {
    font-size: 11px;
    color: #666;
    margin-top: 15px;
    font-style: italic;
}

/* CTAセクション */
.cta {
    padding: 40px 20px;
    background-color: #fff;
    text-align: center;
}

a.cta-item {
    text-decoration: none;
    color: inherit;
}

/* --- 同時にフェードインさせるためのスタイル --- */
.fadein {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.fadein.active {
    opacity: 1;
    transform: translateY(0);
}

.cta-catchphrase {
    color: #0033cc;
    font-size: 35px;
    margin-bottom: 5px;
    font-weight: bold;
}

.cta-subphrase {
    font-size: 20px;
    margin-bottom: 50px;
}

.cta-grid {
    display: grid;
    /* ここを 1fr 1fr から 横1列4つ (repeat(4, 1fr)) に変更しました */
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

/* 画面幅が極端に狭いスマホ向けに、必要であれば2列になるようにするレスポンシブ記述（オプション） */
@media screen and (max-width: 768px) {
    .cta-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.js-enabled .cta-item {
    opacity: 0;
    transform: translateY(30px);
}
.js-enabled .cta-item.fade-in-up {
    opacity: 1;
    transform: translateY(0);
}

.cta-item {
    display: flex;
    flex-direction: column;
    /* JSが有効な場合のアニメーション用初期設定（初期状態ではopacityを0にしないか、安全にフェードインさせます） */
}

/* JavaScriptがオフの環境でもカードが消えないよう、デフォルトは表示させておきます */
.cta-item {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* --- 見えた状態で、少し下から上にひょいと動くアニメーション --- */
/* .cta-item.fadein {

    transform: translateY(25px); 
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.cta-item.fadein.active {
    transform: translateY(0); 
} */

/* --- CTAカード専用：7秒おきに繰り返し左から順にひょいと動くアニメーション --- */

/* 1番目のカード */
.cta-grid .cta-item:nth-child(1) {
    animation: floatUp 7s ease-in-out infinite;
    animation-delay: 0s;
}

/* 2番目のカード（少し遅らせる） */
.cta-grid .cta-item:nth-child(2) {
    animation: floatUp 7s ease-in-out infinite;
    animation-delay: 0.15s;
}

/* 3番目のカード */
.cta-grid .cta-item:nth-child(3) {
    animation: floatUp 7s ease-in-out infinite;
    animation-delay: 0.3s;
}

/* 4番目のカード */
.cta-grid .cta-item:nth-child(4) {
    animation: floatUp 7s ease-in-out infinite;
    animation-delay: 0.45s;
}

/* アニメーションの中身（下に下がって、スッと上に浮き上がって、元に戻る動作） */
@keyframes floatUp {
    0% {
        transform: translateY(0);
    }
    /* 全体（7秒）のうち、最初の約0.6秒間で「ひょいと上に浮き上がる」動きを作る */
    5% {
        transform: translateY(-12px); 
    }
    10% {
        transform: translateY(0);
    }
    /* 残りの時間は静止し、7秒のサイクルで繰り返す */
    100% {
        transform: translateY(0);
    }
}

.cta-item.fade-in-up {
    opacity: 1;
    transform: translateY(0);
}

.cta-ribbon {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
}

.cta-box {
    border: 2px solid;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: #fff;
    
    /* 深みのある立体的なシャドウ（通常時） */
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
    
    /* 浮き上がりアニメーションの滑らかさ */
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
/* マウスホバー時にカード全体がフワッと浮き上がり、影が広がる */
.cta-box:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.15), 0 4px 8px rgba(0, 0, 0, 0.08);
}

/* マウスをクリックした（押下時）に沈み込む演出 */
.cta-box:active {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.cta-box-header {
    color: #fff;
    font-weight: bold;
    padding: 10px 8px;
    font-size: 23px;
}

.cta-box-body {
    padding: 15px 10px;
    flex-grow: 1;
    background-color: #fff;
    display: flex;           /* ← 追加 */
    flex-direction: column;  /* ← 追加 */
}

.cta-box-body p {
    font-size: 16px;
    margin-bottom: 15px;
}

.cta-img-placeholder {
    width: 100%;
    height: auto;
    margin-top: auto;        /* ← 追加 */
}   

.cta-button {
    display: block;
    text-align: center;
    padding: 14px 8px;
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
    
    /* 上部にくっきりとした境界線 */
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    
    /* 綺麗なグラデーションでボタンの立体感を出す */
    background: linear-gradient(to bottom, #ffffff 0%, #f0f4f8 100%);
    
    /* トランジション */
    transition: background 0.2s ease, color 0.2s ease;
}

/* カード全体（cta-box）にホバーした連動として、ボタン部分の色味も少し変化させる */
.cta-box:hover .cta-button {
    /* ここでは各カラー（青・緑・ピンク・黄）ごとに文字色が設定されているため、背景グラデーションをリッチにする */
    background: linear-gradient(to bottom, #ffffff 0%, #e4ecf5 100%);
}
.cta-button:active {
    transform: scale(0.98); /* 押したときに少し縮む */
}

* 各カラーごとのホバー時の背景微調整（任意でより馴染ませる場合） */
.cta-item.blue .cta-box:hover .cta-button { background: linear-gradient(to bottom, #f8fbff 0%, #e6f0ff); }
.cta-item.green .cta-box:hover .cta-button { background: linear-gradient(to bottom, #f8fff9 0%, #e6f7e8); }
.cta-item.pink .cta-box:hover .cta-button { background: linear-gradient(to bottom, #fff8ff 0%, #ffe6ff); }
.cta-item.yellow .cta-box:hover .cta-button { background: linear-gradient(to bottom, #fffef8 0%, #fcf5d9); }

.cta-grid .cta-item:nth-child(1) { transition-delay: 0.1s; }
.cta-grid .cta-item:nth-child(2) { transition-delay: 0.25s; }
.cta-grid .cta-item:nth-child(3) { transition-delay: 0.4s; }
.cta-grid .cta-item:nth-child(4) { transition-delay: 0.55s; }

/* 個別カラー設定 */
.cta-item.blue .cta-box { border-color: #2b70c9; }
.cta-item.blue .cta-box-header { background-color: #2b70c9; }
.cta-item.blue .cta-button { color: #2b70c9; }

.cta-item.green .cta-box { border-color: #4a822b; }
.cta-item.green .cta-box-header { background-color: #4a822b; }
.cta-item.green .cta-button { color: #4a822b; }

.cta-item.pink .cta-box { border-color: #ff99ff; }
.cta-item.pink .cta-box-header { background-color: #ff99ff; }
.cta-item.pink .cta-button { color: #ff99ff; }

.cta-item.yellow .cta-box { border-color: #e5c138; }
.cta-item.yellow .cta-box-header { background-color: #e5c138; }
.cta-item.yellow .cta-button { color: #e5c138; }

/* フッター */
.footer-message {
    background-color: #1c44d6;
    color: #fff;
    text-align: center;
    padding: 25px 20px;
    font-weight: bold;
    font-size: 14px;
    line-height: 1.6;
}

.footer-copy {
    background-color: #f1f1f1;
    color: #999;
    text-align: center;
    padding: 15px;
    font-size: 11px;
}