/* ========================================
   1-2歳児クラス専用CSS
   以後、1_2sai.html は common.css と本ファイルのみを参照
   ======================================== */

/* ページ固有のヒーロー画像 */
.page-1-2sai .hero-background img {
    content: url('../images/courses-toddler.gif');
}

/* PC版：1-2歳児クラスのヒーロータイトル調整 */
@media (min-width: 880px) {
    .page-1-2sai .hero-title {
        text-align: center;
    }
    
    .page-1-2sai .hero-title br:first-of-type {
        display: block;
        margin-bottom: 8px;
    }
}

/* =============================
   特長（#about）
   ============================= */
.page-1-2sai #about .features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    text-align: center;
}

.page-1-2sai #about .feature-item {
    background-color: var(--cream-color);
    padding: 30px 15px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-1-2sai #about .feature-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

/* 画像＋ポップアップ（PCはホバーで表示、SPはキャプション表示） */
.page-1-2sai .image-container-with-popup {
    position: relative;
    width: 200px;
    height: 200px;
    margin-bottom: 20px;
}

.page-1-2sai .image-container-with-popup .popup-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 15px;
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    box-sizing: border-box;
    font-size: 0.9rem;
    line-height: 1.6;
}

.page-1-2sai .image-container-with-popup:hover .popup-text {
    opacity: 1;
    visibility: visible;
}

/* 特長セクションの画像サイズ */
.page-1-2sai #about .feature-item img {
    border-radius: 8px;
    margin-bottom: 20px;
    background-color: transparent;
    padding: 0;
    width: 200px;
    height: 200px;
    object-fit: cover;
    align-self: center;
}

/* =============================
   ギャラリー（#gallery）
   ============================= */

/* 共通から移動: #about→#gallery 間の上余白圧縮 (50px→12px 相当)。PC 用 */
@media (min-width:880px){
    .page-1-2sai #gallery { padding-top:12px !important; }
}

.page-1-2sai #gallery .gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    align-items: center;
}

/* 1-2歳児クラスの特徴セクションでホバー時のカーソルを非表示 */
.page-1-2sai #about .image-container-with-popup {
    cursor: default;
}

/* モバイル版でのキャプション表示調整 */
@media (max-width: 879px) {
    /* 共通にあったモバイル側の #gallery 余白微調整 (30px 想定) をここで一元管理 */
    .page-1-2sai #gallery { padding-top:30px !important; }
    /* コンテナのサイズを自動調整 */
    .page-1-2sai .image-container-with-popup {
        width: 100%;
        max-width: 350px;
        height: auto;
        margin-bottom: 1em;
        margin-left: auto;
        margin-right: auto;
    }

    /* ポップアップをキャプションとして表示 */
    .page-1-2sai .image-container-with-popup .popup-text {
        position: static;
        visibility: visible;
        opacity: 1;
        height: auto;
        background: transparent;
        color: var(--text-color-light);
        font-size: 0.9rem;
        font-weight: 600;
        padding-top: 8px;
        margin-bottom: 15px;
    }
}

/* PCは最大4列 */
@media (min-width: 1024px) {
    .page-1-2sai #gallery .gallery-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        justify-content: center !important;
        justify-items: center !important;
        align-items: start !important;
        max-width: 1200px !important;
        margin: 0 auto !important;
        gap: 30px !important;
        width: 100% !important;
    }
    .page-1-2sai #gallery .image-container-with-popup {
        width: 100% !important;
        height: 250px !important;
        margin: 0 auto !important;
    }
    .page-1-2sai #gallery .image-container-with-popup img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        border-radius: 8px !important;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1) !important;
    }
}

/* カード見出し（特長セクション）の色をサイト名と同じ淡い緑に統一 */
.page-1-2sai #about .feature-item h3 {
    font-size: 1.6rem;
    color: var(--main-color);
    margin-bottom: 15px;
}

/* 特長カードの説明文を左揃えに */
.page-1-2sai #about .feature-item p {
    text-align: left;
}

/* ギャラリーのベース（幅の安全対策） */
.page-1-2sai #gallery .gallery-grid {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* モバイルでのはみ出し防止（1列化） */
@media (max-width: 879px) {
    .page-1-2sai #gallery .gallery-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    .page-1-2sai #gallery .image-container-with-popup {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
    }
    .page-1-2sai #gallery .image-container-with-popup img {
        width: 100% !important;
        height: auto !important;
        object-fit: cover;
    }
}

/* =============================
   1-2歳に使用する共通要素
   ============================= */
.zephyr-goals {
    margin-bottom: 40px;
}
.zephyr-goals h3 {
    font-size: 1.5rem;
    color: var(--main-color);
    text-align: center;
    margin-bottom: 20px;
}
.zephyr-goals ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}
.zephyr-goals li {
    background-color: var(--cream-color);
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 700;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.zephyr-goals .goals-supplement {
    text-align: center;
    margin-top: 30px;
    line-height: 2;
    font-weight: 600;
}
/* PCのみ改行（<span class="br-pc"><br></span>）を表示 */
.br-pc { display: none; }
@media (min-width: 880px) { .br-pc { display: inline; } }
