/* Victoria Playpark Style - Header, Nav, Hero Section */
:root {
    --color-green: #7db343;
    --color-green-dark: #5a8a2e;
    --color-yellow: #f5d442;
    --color-accent: #f5a623;
    --color-yellow-border: #e5c430;
    --color-text: #333;
    --color-text-light: #666;
    --color-white: #fff;
    --color-cream: #faf8f5;
    --color-beige: #f5f0e8;
    --font-sans: 'Noto Sans TC', sans-serif;
    --font-script: 'Caveat', cursive;
    --scale: 1.2;
    --header-height: calc(160px * var(--scale));
    --transition: 0.25s ease;
}

html {
    font-size: calc(100% * var(--scale));
}

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

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    background: var(--color-cream);
}

/* 滾動時內容漸顯，背景不漸出 */
.scroll-reveal-content {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-reveal-content.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-white);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), visibility var(--transition);
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-content {
    width: 90%;
    max-width: calc(500px * var(--scale));
    position: relative;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: calc(20px * var(--scale));
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.search-content:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.18);
}

.search-input {
    width: 100%;
    padding: calc(12px * var(--scale)) calc(48px * var(--scale)) calc(12px * var(--scale)) 0;
    font-size: 1.5rem;
    border: none;
    border-bottom: 2px solid var(--color-text);
    background: transparent;
    outline: none;
}

.search-input::placeholder {
    color: #bbb;
}

.search-hint {
    margin-top: 12px;
    font-size: 0.9rem;
    color: var(--color-green);
}

.search-close {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 2rem;
    padding: 0 calc(8px * var(--scale));
    cursor: pointer;
    color: var(--color-text);
    line-height: 1;
}

.search-close:hover {
    color: var(--color-green);
}

/* Header - 初始時由下到上漸變白（NAV-BAR 更清楚），捲動時全白 */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.4) 50%, transparent 100%);
    box-shadow: none;
    z-index: 1000;
    transition: background 0.3s ease;
}

.site-header.scrolled {
    background: rgba(255, 255, 255, 0.8);
}

.header-inner {
    max-width: calc(1400px * var(--scale));
    margin: 0 auto;
    padding: 0 calc(24px * var(--scale));
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo - Left */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    margin-left: calc(32px * var(--scale));
}

.logo-img {
    height: calc(150px * var(--scale));
    width: auto;
    object-fit: contain;
}

/* Main Navigation - Center */
.main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 0 calc(20px * var(--scale));
}

.nav-list {
    display: flex;
    flex-wrap: nowrap;
    list-style: none;
    gap: calc(8px * var(--scale));
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
    flex-shrink: 0;
}

.nav-item-search {
    margin-left: calc(4px * var(--scale));
}

.nav-link {
    display: inline-block;
    padding: calc(12px * var(--scale)) calc(16px * var(--scale));
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color var(--transition);
    white-space: nowrap;
    writing-mode: horizontal-tb;
}

.nav-link:hover {
    color: var(--color-green);
}

.nav-arrow {
    font-size: 0.65em;
    margin-left: 4px;
    vertical-align: middle;
    opacity: 0.8;
}

/* Sub-menu (dropdown on hover) */
.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: calc(220px * var(--scale));
    background: var(--color-white);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    list-style: none;
    padding: calc(12px * var(--scale)) 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity var(--transition), visibility var(--transition), transform var(--transition);
    z-index: 100;
}

.nav-item.has-dropdown:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sub-menu li a {
    display: block;
    padding: calc(10px * var(--scale)) calc(20px * var(--scale));
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.9rem;
    transition: background var(--transition), color var(--transition);
}

.sub-menu li a:hover {
    background: var(--color-cream);
    color: var(--color-green);
}

/* Header Right */
.header-right {
    display: flex;
    align-items: center;
    gap: calc(20px * var(--scale));
    flex-shrink: 0;
}

.search-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text);
    padding: calc(8px * var(--scale));
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition);
}

.search-btn:hover {
    color: var(--color-green);
}

.search-btn svg {
    width: calc(20px * var(--scale));
    height: calc(20px * var(--scale));
}

.btn-register {
    display: inline-block;
    padding: calc(10px * var(--scale)) calc(24px * var(--scale));
    background: var(--color-yellow);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: calc(30px * var(--scale));
    border: 2px solid var(--color-yellow-border);
    transition: background var(--transition), transform var(--transition);
}

.btn-register:hover {
    background: #f8dc50;
    transform: translateY(-1px);
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: calc(6px * var(--scale));
}

.lang-switcher a {
    color: #333;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.85rem;
    cursor: pointer;
}

.lang-switcher a:hover {
    color: var(--color-green);
    text-decoration: underline;
}

.lang-switcher a.active {
    color: var(--color-green);
    font-weight: 700;
}

.lang-divider {
    color: #ccc;
    font-size: 0.8rem;
}

/* 漢堡按鈕：預設隱藏，小螢幕顯示 */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    flex-shrink: 0;
    z-index: 1002;
    -webkit-tap-highlight-color: transparent;
}

.nav-toggle-bar {
    display: block;
    width: 26px;
    height: 3px;
    background: var(--color-text);
    border-radius: 2px;
    transition: transform 0.28s ease, opacity 0.28s ease;
}

.nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    transition: opacity 0.3s ease;
}

@media (max-width: 900px) {
    :root {
        --scale: 1;
        --header-height: 76px;
    }

    .site-header {
        height: var(--header-height);
        background: rgba(255, 255, 255, 0.96);
    }

    .logo {
        margin-left: 0;
        order: 1;
    }

    .logo-img {
        height: 52px;
    }

    .header-inner {
        padding: 0 16px;
        gap: 8px;
    }

    .header-right {
        order: 2;
        gap: 10px;
        margin-left: auto;
    }

    .nav-toggle {
        display: flex;
        order: 3;
    }

    .main-nav {
        order: 4;
        position: fixed;
        top: 0;
        right: 0;
        left: auto;
        bottom: 0;
        width: min(100vw - 48px, 300px);
        max-width: 100%;
        height: 100vh;
        height: 100dvh;
        margin: 0;
        padding: calc(var(--header-height) + 12px) 18px 28px;
        flex: none;
        display: block;
        justify-content: flex-start;
        background: var(--color-white);
        box-shadow: -8px 0 28px rgba(0, 0, 0, 0.12);
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
        transform: translateX(100%);
        transition: transform 0.32s ease;
        visibility: hidden;
        pointer-events: none;
        z-index: 2;
    }

    body.nav-open .main-nav {
        transform: translateX(0);
        visibility: visible;
        pointer-events: auto;
    }

    .nav-list {
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
        gap: 0;
        width: 100%;
    }

    .nav-item {
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    }

    .nav-item:last-child {
        border-bottom: none;
    }

    .nav-link {
        white-space: normal;
        padding: 14px 6px;
        width: 100%;
        font-size: 1rem;
    }

    .nav-arrow {
        float: right;
        margin-top: 4px;
        transition: transform 0.25s ease;
    }

    .nav-item.has-dropdown.sub-open .nav-arrow {
        transform: rotate(-180deg);
    }

    .main-nav .sub-menu {
        position: static;
        min-width: 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding: 0 0 0 12px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease;
    }

    .nav-item.has-dropdown.sub-open .sub-menu {
        max-height: min(70vh, 480px);
        overflow-y: auto;
    }

    .nav-item.has-dropdown:hover .sub-menu {
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .sub-menu li a {
        padding: 10px 8px;
        font-size: 0.95rem;
    }

    .nav-item-search {
        margin-left: 0;
        padding-top: 8px;
    }

    .nav-item-search .search-btn {
        width: 100%;
        justify-content: flex-start;
        padding: 14px 6px;
        font-size: 1rem;
        gap: 10px;
    }

    .btn-register {
        padding: 8px 14px;
        font-size: 0.85rem;
    }

    .lang-switcher a {
        font-size: 0.8rem;
    }

    .nav-backdrop {
        display: block;
        pointer-events: none;
        opacity: 0;
        z-index: 10040;
    }

    body.nav-open .nav-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    /* 選單開啟時：抬高 header（含側欄），隱藏 WhatsApp，避免擋住點擊 */
    body.nav-open .site-header {
        z-index: 10050;
    }

    body.nav-open .nav-toggle {
        z-index: 10060;
        position: relative;
    }

    body.nav-open .whatsapp-float-wrap {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

    body.nav-open {
        overflow: hidden;
    }

    body.nav-open .nav-toggle-bar:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    body.nav-open .nav-toggle-bar:nth-child(2) {
        opacity: 0;
        transform: scaleX(0);
    }

    body.nav-open .nav-toggle-bar:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
}

/* Section 1 - Full Screen Hero Carousel */
.hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    margin-top: 0;
    overflow: hidden;
    background: var(--color-cream);
}

.hero-slider {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hero-slider-track {
    display: flex;
    height: 100%;
    transition: transform 0.6s ease-in-out;
}

.hero-slide {
    position: relative;
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    min-width: 100%;
    overflow: hidden;
}

/* 滑鼠移到大相時顯示半透明白色層 */
.hero-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.35);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.hero-slide:hover::after {
    opacity: 1;
}

.hero-slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-slide-bg.no-image {
    background: linear-gradient(135deg, var(--color-cream) 0%, var(--color-beige) 100%);
}

.hero-slide-bg .hero-slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.15);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: calc(40px * var(--scale)) calc(24px * var(--scale));
    max-width: calc(800px * var(--scale));
}

.hero-title {
    font-family: var(--font-script);
    font-size: clamp(2.5rem, 6vw, 4rem);
    color: #8b4513;
    margin-bottom: 12px;
    text-shadow: 0 1px 2px rgba(255,255,255,0.8);
}

.hero-dates {
    font-size: 1.1rem;
    color: #6b4423;
    margin-bottom: 8px;
}

.hero-subtitle {
    font-size: 1rem;
    color: #6b4423;
    margin-bottom: 16px;
}

.hero-location {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 1rem;
    color: #6b4423;
    margin-bottom: 24px;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: calc(8px * var(--scale));
    padding: calc(14px * var(--scale)) calc(32px * var(--scale));
    background: #8b4513;
    color: var(--color-white);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 8px;
    border: 2px solid rgba(255,255,255,0.5);
    transition: background var(--transition), transform var(--transition);
}

.hero-cta:hover {
    background: #6b3410;
    transform: translateY(-2px);
}

/* Carousel Controls */
.hero-prev,
.hero-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: calc(50px * var(--scale));
    height: calc(50px * var(--scale));
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    transition: background var(--transition);
}

.hero-prev { left: calc(120px * var(--scale)); }
.hero-next { right: calc(120px * var(--scale)); }

.hero-prev:hover,
.hero-next:hover {
    background: var(--color-white);
}

.hero-prev svg,
.hero-next svg {
    width: calc(24px * var(--scale));
    height: calc(24px * var(--scale));
}

/* Carousel Dots */
.hero-dots {
    position: absolute;
    bottom: calc(32px * var(--scale));
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: calc(12px * var(--scale));
    z-index: 10;
}

.hero-dot {
    width: calc(12px * var(--scale));
    height: calc(12px * var(--scale));
    border-radius: 50%;
    background: rgba(255,255,255,0.6);
    border: 2px solid rgba(255,255,255,0.9);
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
}

.hero-dot:hover,
.hero-dot.active {
    background: var(--color-white);
    transform: scale(1.2);
}

/* Floating Icons (optional) */
.hero-side-icons {
    position: absolute;
    right: calc(20px * var(--scale));
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: calc(12px * var(--scale));
    z-index: 10;
}

.hero-side-icon {
    width: calc(48px * var(--scale));
    height: calc(48px * var(--scale));
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: background var(--transition);
}

.hero-side-icon:hover {
    background: var(--color-white);
}

.hero-side-icon svg {
    width: calc(22px * var(--scale));
    height: calc(22px * var(--scale));
    color: var(--color-green);
}

/* Hero Side Buttons - icon only by default, icon+text on hover, fixed on right (attached to scrollbar) */
.hero-side-buttons {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: calc(12px * var(--scale));
    z-index: 10;
}

.hero-side-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: calc(12px * var(--scale));
    width: calc(64px * var(--scale));
    height: calc(64px * var(--scale));
    padding: 0;
    flex-shrink: 0;
    background: var(--color-white);
    border-radius: calc(32px * var(--scale)) 0 0 calc(32px * var(--scale));
    text-decoration: none;
    color: var(--color-green);
    font-weight: 500;
    font-size: 0.95rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    transition: width 0.3s ease, box-shadow var(--transition), transform var(--transition);
    overflow: hidden;
    flex-shrink: 0;
}

.hero-side-btn:hover {
    width: auto;
    max-width: calc(280px * var(--scale));
    padding: 0 calc(16px * var(--scale)) 0 calc(12px * var(--scale));
    justify-content: flex-start;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    transform: translateX(-2px);
}

.hero-side-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hero-side-btn-icon svg {
    width: calc(32px * var(--scale));
    height: calc(32px * var(--scale));
    color: var(--color-green);
}

.hero-side-btn-text {
    white-space: nowrap;
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    transition: opacity 0.25s ease, max-width 0.3s ease;
}

.hero-side-btn:hover .hero-side-btn-text {
    opacity: 1;
    max-width: calc(220px * var(--scale));
}

/* Section 1 - 圖1 兩張課程卡（嬰幼兒遊戲班 / PlayTime） */
.hero-s1-cards {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: calc(24px * var(--scale));
    padding: calc(24px * var(--scale)) calc(24px * var(--scale)) calc(32px * var(--scale));
    flex-wrap: wrap;
}
.hero-s1-card {
    flex: 1;
    min-width: min(280px, 100%);
    max-width: 420px;
    background: rgba(255,255,255,0.96);
    padding: calc(24px * var(--scale)) calc(28px * var(--scale));
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.hero-s1-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.18);
}
.hero-s1-card-title {
    margin: 0 0 calc(20px * var(--scale));
    font-size: 1.25rem;
    font-weight: 600;
    color: #7DC242;
    line-height: 1.35;
}
.hero-s1-card-btns {
    display: flex;
    flex-wrap: wrap;
    gap: calc(12px * var(--scale));
}
.hero-s1-card .hero-s1-btn {
    display: inline-block;
    padding: calc(10px * var(--scale)) calc(20px * var(--scale));
    background: var(--color-yellow);
    color: #fff !important;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: calc(24px * var(--scale));
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.hero-s1-card .hero-s1-btn:hover,
.hero-s1-card .hero-s1-btn:focus-visible {
    background: #f8dc50 !important;
    color: #fff !important;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.22);
}

@media (max-width: 700px) {
    .hero-s1-cards {
        flex-direction: column;
        align-items: center;
    }
    .hero-s1-card {
        max-width: 100%;
    }
}

/* register.php SECTION1：大相 + 圖1 兩張卡（在報名頁為一般排版，不可用 absolute 以免疊在 footer 上） */
.register-s1 {
    background: var(--color-cream) url(../bg.jpg) center repeat;
}
.register-page .hero-s1-cards {
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    z-index: auto;
}
.register-s1-cards {
    padding: calc(32px * var(--scale)) calc(24px * var(--scale)) calc(48px * var(--scale));
}

/* 圖1 下方：LOGO 資料夾內所有課程 logo，課程名 = 檔名 */
.index-logos-section {
    background: var(--color-cream);
}
.register-logos-wrap {
    padding: calc(32px * var(--scale)) calc(24px * var(--scale)) calc(40px * var(--scale));
    background: var(--color-cream);
}
.register-logos-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-end;
    gap: calc(32px * var(--scale));
    max-width: 900px;
    margin: 0 auto;
}
.register-logo-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 0 auto;
}
.register-logo-img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    display: block;
    margin-bottom: calc(10px * var(--scale));
}
.register-logo-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #7DC242;
    text-align: center;
    line-height: 1.3;
}

/* Section 2 - About Us */
.section-2 {
    padding: calc(80px * var(--scale)) calc(24px * var(--scale));
    background: var(--color-cream) url(../bg12.jpg) center/cover no-repeat;
}

.section-2-inner {
    max-width: calc(800px * var(--scale));
    margin: 0 auto;
    text-align: center;
}

.section-2-content {
    width: 100%;
    text-align: center;
}

.section-2-title {
    font-size: 3rem;
    color: #7DC242;
    margin-bottom: calc(24px * var(--scale));
    text-align: center;
}

.section-2-text {
    color: #676767;
    line-height: 1.8;
    margin-bottom: calc(20px * var(--scale));
    text-align: justify;
}
.section-2-text:last-of-type {
    margin-bottom: calc(24px * var(--scale));
}

.section-2-btn {
    display: inline-block;
    padding: calc(12px * var(--scale)) calc(32px * var(--scale));
    background: var(--color-yellow);
    color: var(--color-text);
    text-decoration: none;
    font-weight: 600;
    border-radius: 30px;
    transition: background var(--transition), transform var(--transition);
}

.section-2-btn:hover {
    background: #f8dc50;
    transform: translateY(-1px);
}

.section-2-image {
    flex: 0 0 calc(400px * var(--scale));
    max-width: 100%;
}

.section-2-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

/* Register page: header + footer, middle = large image (Section 1 style) + white text with black shadow */
.register-page {
    background: var(--color-cream) url(../bg.jpg) center repeat;
    min-height: 100vh;
}
.register-banner {
    position: relative;
    min-height: 50vh;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background-color: var(--color-cream);
    background-size: auto;
    background-position: center;
    background-repeat: no-repeat;
}
.register-banner-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.08);
}
.register-banner-text {
    position: relative;
    z-index: 1;
    margin: 0;
    padding: 0 calc(24px * var(--scale)) calc(32px * var(--scale));
    font-size: clamp(1.5rem, 4vw, 2.75rem);
    font-weight: 600;
    color: #fff;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8), 0 2px 8px rgba(0,0,0,0.6), 0 0 20px rgba(0,0,0,0.4);
}

.register-form-section {
    padding: calc(48px * var(--scale)) calc(24px * var(--scale)) calc(80px * var(--scale));
}
.register-form-inner {
    max-width: calc(960px * var(--scale));
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    padding: calc(32px * var(--scale)) calc(32px * var(--scale)) calc(36px * var(--scale));
}
.register-form-title {
    font-size: 1.6rem;
    color: #3b82c4;
    text-align: center;
    margin: 0 0 calc(24px * var(--scale));
}
.register-form-alogo-wrap {
    text-align: left;
    margin-bottom: calc(16px * var(--scale));
}
.register-form-alogo {
    max-width: 200px;
    width: auto;
    height: auto;
    display: block;
    margin: 0;
}
.register-form-alogo2-wrap {
    margin-top: calc(8px * var(--scale));
}
.register-form-alogo2 {
    max-width: 200px;
    width: auto;
}
.register-form-group-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ff9d3b;
    margin: calc(16px * var(--scale)) 0 calc(8px * var(--scale));
}
.register-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: calc(16px * var(--scale));
    margin-bottom: calc(16px * var(--scale));
}
.register-field-grid--stack {
    grid-template-columns: 1fr;
}
.register-field {
    display: flex;
    flex-direction: column;
    font-size: 0.9rem;
}
.register-field label {
    margin-bottom: 4px;
    color: #555;
}
.register-input,
.register-textarea,
.register-select {
    width: 100%;
    padding: 9px 10px;
    border-radius: 8px;
    border: 1px solid #d0d7de;
    font-size: 0.9rem;
}
.register-textarea {
    resize: vertical;
    min-height: 60px;
}
.register-form-row-full {
    margin-bottom: calc(16px * var(--scale));
}
.register-submit-wrap {
    text-align: center;
    margin-top: calc(16px * var(--scale));
}
.register-submit-btn {
    display: inline-block;
    padding: calc(12px * var(--scale)) calc(40px * var(--scale));
    background: #7db343;
    color: #fff;
    border-radius: 999px;
    text-decoration: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.register-submit-btn:hover {
    background: #6aa136;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}
.register-msg-success {
    background: #dcfce7;
    border: 1px solid #22c55e;
    border-radius: 12px;
    padding: calc(28px * var(--scale)) calc(32px * var(--scale));
    margin-bottom: calc(20px * var(--scale));
    text-align: left;
}
.register-msg-success-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #15803d;
    margin: 0 0 calc(8px * var(--scale));
}
.register-msg-ok {
    color: #15803d;
    margin: 0 0 calc(14px * var(--scale));
    font-size: 1rem;
    line-height: 1.7;
}
.register-msg-ok:last-of-type {
    margin-bottom: 0;
}
.register-msg-mail-note {
    color: #b45309;
    margin: calc(16px * var(--scale)) 0 0;
    font-size: 0.92rem;
}
.register-msg-err {
    color: #b91c1c;
    text-align: center;
    margin-bottom: calc(16px * var(--scale));
    font-size: 0.95rem;
}
.register-required {
    color: #b91c1c;
}
.register-optional {
    font-size: 0.85em;
    color: #888;
    font-weight: normal;
}

@media (max-width: 768px) {
    .register-field-grid {
        grid-template-columns: 1fr;
    }
}

/* Schedule Parent page - 課程時間表 > 親子遊戲班 */
.schedule-parent-page {
    background: var(--color-cream) url(../section2/bg2.png) center/cover no-repeat;
}
/* 時間表三頁：僅「內容區」套用 bg11；大相與整頁 main 不另改（沿用 .schedule-parent-page 與 .schedule-parent-hero 預設） */
.schedule-parent-page.schedule-timetable-page .schedule-parent-body.schedule-timetable-body-bg11 {
    background-color: var(--color-cream);
    background-image: url(../bg11.jpg);
    background-size: auto;
    background-repeat: repeat;
    background-position: 0 0;
}
/* 興趣班課程頁：主內容區背景（後台「頁面背景圖」若有設定會以 inline 覆寫） */
.interest-class-page.schedule-parent-page {
    background: var(--color-cream) url(../bg11.jpg) center/cover no-repeat;
}
/* 家長留言頁：主內容區背景 */
.testimonials-page.schedule-parent-page {
    background: var(--color-cream) url(../bg11.jpg) center/cover no-repeat;
}
/* 最新消息及活動頁：內容區背景 bg11（與時間表內容區相同平鋪，不放大相） */
.news-events-page .schedule-parent-body {
    background-color: var(--color-cream);
    background-image: url(../bg11.jpg);
    background-size: auto;
    background-repeat: repeat;
    background-position: 0 0;
}
/* 聯絡我們頁：內容區背景 bg11 */
.contact-page .schedule-parent-body {
    background-color: var(--color-cream);
    background-image: url(../bg11.jpg);
    background-size: auto;
    background-repeat: repeat;
    background-position: 0 0;
}
/* 遊戲班相片頁：主內容區背景（assets/bg11.jpg） */
.playgroup-photos-page .schedule-parent-body {
    background: var(--color-cream) url(../bg11.jpg) center/cover no-repeat;
}
.playgroup-page {
    background-color: var(--color-cream);
    background-image: url(../section2/bg.png);
    background-size: auto;
    background-repeat: repeat;
    background-position: 0 0;
}
.schedule-parent-hero {
    position: relative;
    min-height: 50vh;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background-color: var(--color-cream);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
/* 興趣班課程頁：預設 banner 底圖（後台「興趣班課程」上載之背景圖會以 inline 覆寫） */
.interest-class-page .schedule-parent-hero {
    background-image: url(../123331.JPG);
}
.schedule-parent-hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.08);
}
.schedule-parent-hero-text-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    text-align: center;
    padding: 0 calc(24px * var(--scale)) calc(32px * var(--scale));
}
.schedule-parent-hero-text {
    display: inline-block;
    margin: 0;
    padding: calc(8px * var(--scale)) calc(16px * var(--scale));
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8), 0 2px 8px rgba(0,0,0,0.6);
    background: rgba(0,0,0,0.2);
    border-radius: 999px;
}
.schedule-parent-body {
    padding: calc(48px * var(--scale)) calc(24px * var(--scale)) calc(80px * var(--scale));
}
.schedule-parent-inner {
    max-width: calc(1000px * var(--scale));
    margin: 0 auto;
    text-align: center;
}
.schedule-parent-title {
    font-size: 2rem;
    color: #7DC242;
    margin-bottom: calc(24px * var(--scale));
}

.playgroup-page .schedule-parent-title {
    color: #7DC242;
}
/* 遊戲班課程頁：大相下方內容區底圖（assets/bg11.jpg） */
.playgroup-courses-page .schedule-parent-body {
    min-height: 40vh;
    padding: 0 0 calc(80px * var(--scale)) 0;
    background: var(--color-cream) url(../bg11.jpg) center/cover no-repeat;
}
.playgroup-courses-page .schedule-parent-body .schedule-parent-inner {
    max-width: 100%;
}
.playgroup-courses-page .playgroup-courses-main-img {
    display: block;
    max-width: 100%;
    width: 100%;
    height: auto;
    margin-left: auto;
    margin-right: auto;
}
.schedule-parent-image-wrap {
    display: flex;
    justify-content: center;
}
.schedule-parent-image {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}
.schedule-parent-image--medium {
    max-width: 900px;
}
.schedule-parent-image.is-clickable {
    cursor: zoom-in;
}
.schedule-parent-note {
    color: #888;
    font-size: 0.95rem;
    margin-bottom: calc(16px * var(--scale));
}

/* 興趣班課程頁：assets/LOGO 內所有課程 LOGO（每行 3 個） */
.interest-class-logos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: calc(12px * var(--scale)) calc(14px * var(--scale));
    margin-top: calc(24px * var(--scale));
    margin-bottom: calc(8px * var(--scale));
    width: 100%;
    text-align: center;
}
.schedule-parent-image-wrap + .interest-class-logos {
    margin-top: calc(32px * var(--scale));
}
.interest-class-logo-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(8px * var(--scale)) calc(10px * var(--scale));
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
    min-height: calc(72px * var(--scale));
}
.interest-class-logo-img {
    max-width: 100%;
    max-height: calc(56px * var(--scale));
    width: auto;
    height: auto;
    object-fit: contain;
    vertical-align: middle;
    pointer-events: none;
}
button.interest-class-logo-item {
    font: inherit;
    text-align: center;
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    box-sizing: border-box;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
button.interest-class-logo-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}
button.interest-class-logo-item:focus {
    outline: 2px solid #7DC242;
    outline-offset: 2px;
}
button.interest-class-logo-item:focus:not(:focus-visible) {
    outline: none;
}
button.interest-class-logo-item:focus-visible {
    outline: 2px solid #7DC242;
    outline-offset: 2px;
}
@media (max-width: 640px) {
    .interest-class-logos {
        grid-template-columns: repeat(2, 1fr);
        gap: calc(10px * var(--scale));
    }
}
@media (max-width: 380px) {
    .interest-class-logos {
        grid-template-columns: 1fr;
    }
}

/* 興趣班：課程相片彈窗 */
.interest-course-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2150;
    padding: 24px 16px;
    overflow-y: auto;
}
.interest-course-modal-overlay.active {
    display: flex;
}
.interest-course-modal {
    background: #fff;
    max-width: 920px;
    width: 100%;
    max-height: 90vh;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    padding: calc(20px * var(--scale)) calc(22px * var(--scale)) calc(24px * var(--scale));
}
.interest-course-modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(240, 240, 240, 0.95);
    color: #333;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1;
}
.interest-course-modal-close:hover {
    background: #fff;
}
.interest-course-modal-title {
    font-size: 1.35rem;
    margin: 0 40px calc(16px * var(--scale)) 0;
    padding-right: 8px;
    color: #7DC242;
    text-align: left;
}
.interest-course-modal-desc {
    margin: 0 0 calc(14px * var(--scale));
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;
    text-align: left;
    white-space: pre-wrap;
}
.interest-course-modal-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: calc(12px * var(--scale));
    overflow-y: auto;
    max-height: min(65vh, 560px);
    padding-right: 4px;
}
.interest-course-modal-photo {
    border-radius: 10px;
    overflow: hidden;
    background: #f5f5f5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.interest-course-modal-photo img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 280px;
    object-fit: contain;
    vertical-align: middle;
    cursor: zoom-in;
}
/* 興趣班彈窗內相片點擊後之大圖（疊在課程彈窗之上） */
.interest-course-image-zoom.image-lightbox-overlay {
    z-index: 2200;
}
.interest-course-modal-empty {
    margin: 12px 0 0;
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
    text-align: left;
}
.interest-course-modal-empty code {
    font-size: 0.88em;
    word-break: break-all;
}

.schedule-parent-cta-wrap {
    margin-top: calc(24px * var(--scale));
    text-align: center;
}
.schedule-parent-cta-btn {
    display: inline-block;
    padding: calc(14px * var(--scale)) calc(40px * var(--scale));
    background: var(--color-yellow);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
    transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

/* Timetable image lightbox */
.image-lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    overflow: hidden;
    padding: 24px 16px;
}
.image-lightbox-overlay.active {
    display: flex;
}
.image-lightbox-inner {
    max-width: 95vw;
    position: relative;
    max-height: calc(100vh - 48px);
    display: flex;
    align-items: center;
    justify-content: center;
}
.image-lightbox-inner img {
    max-width: 100%;
    max-height: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
    display: block;
    object-fit: contain;
}
.image-lightbox-close {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #fff;
    color: #333;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.image-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.6);
    color: #fff;
    cursor: pointer;
    font-size: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.image-lightbox-prev {
    left: -70px;
}
.image-lightbox-next {
    right: -70px;
}
/* 興趣班課程放大檢視：保留圖片邊距，確保左右箭頭可見 */
.interest-course-image-zoom .image-lightbox-inner {
    max-width: min(88vw, 1200px);
    max-height: calc(100vh - 120px);
    padding: 0 72px;
    box-sizing: border-box;
}
.interest-course-image-zoom .image-lightbox-inner img {
    max-width: min(74vw, 980px);
    max-height: calc(100vh - 180px);
}
.interest-course-image-zoom .image-lightbox-nav {
    z-index: 3;
}
.interest-course-image-zoom .image-lightbox-prev {
    left: 8px;
}
.interest-course-image-zoom .image-lightbox-next {
    right: 8px;
}
@media (max-width: 900px) {
    .interest-course-image-zoom .image-lightbox-inner {
        max-width: 95vw;
        max-height: calc(100vh - 80px);
        padding: 0 56px;
    }
    .interest-course-image-zoom .image-lightbox-inner img {
        max-width: 100%;
        max-height: calc(100vh - 140px);
    }
    .interest-course-image-zoom .image-lightbox-nav {
        width: 44px;
        height: 44px;
        font-size: 22px;
    }
}
.schedule-parent-cta-btn:hover {
    background: #f8dc50;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

/* 聯絡我們頁：圖1 聯絡資料框 + Google Map */
.contact-page .schedule-parent-inner {
    text-align: left;
}
.contact-info-row {
    display: flex;
    align-items: flex-end;
    gap: calc(24px * var(--scale));
    margin-bottom: calc(32px * var(--scale));
}
.contact-info-box {
    background: #fff8f0;
    border: 2px solid #f5a623;
    border-radius: 12px;
    padding: calc(24px * var(--scale));
    margin-bottom: 0;
    max-width: 520px;
    width: 100%;
}
.contact-people-figure {
    flex: 0 0 calc(390px * var(--scale));
    max-width: calc(430px * var(--scale));
}
.contact-people-figure img {
    display: block;
    width: 100%;
    height: auto;
}
.contact-info-list {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: calc(8px * var(--scale)) calc(24px * var(--scale));
    margin: 0;
    font-size: 1rem;
}
.contact-info-list dt {
    font-weight: 600;
    color: #333;
}
.contact-info-list dd {
    margin: 0;
    color: #333;
}
.contact-info-list dd a {
    color: #7db343;
    text-decoration: none;
}
.contact-info-list dd a:hover {
    text-decoration: underline;
}
.contact-map-wrap {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}
.contact-map {
    display: block;
    width: 100%;
    min-height: 400px;
}
@media (max-width: 900px) {
    .contact-info-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .contact-info-box {
        max-width: 100%;
    }
    .contact-people-figure {
        max-width: min(460px, 95%);
    }
}

/* 家長留言頁 */
.testimonials-page .schedule-parent-inner {
    text-align: left;
}
.testimonials-list {
    max-width: 800px;
    margin: 0 auto calc(40px * var(--scale));
}
.testimonials-item {
    margin-bottom: calc(24px * var(--scale));
}
.testimonials-child-name {
    font-size: 0.9rem;
    color: #777;
}
.testimonials-form-card {
    max-width: 800px;
    margin: 0 auto;
    padding: calc(24px * var(--scale));
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.testimonials-form-title {
    font-size: 1.4rem;
    margin-bottom: calc(16px * var(--scale));
    color: #7DC242;
    text-align: left;
}
.testimonials-form .register-field {
    margin-bottom: calc(12px * var(--scale));
}
.testimonials-form-actions {
    margin-top: calc(12px * var(--scale));
    text-align: right;
}

/* News detail modal */
.news-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2100;
    padding: 24px 16px;
}
.news-modal-overlay.active {
    display: flex;
}
.news-modal {
    background: #fff;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}
.news-modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.9);
    color: #333;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    z-index: 1;
}
.news-modal-image-wrap {
    width: 100%;
    max-height: 60vh;
    overflow: hidden;
}
.news-modal-image-wrap img {
    width: 100%;
    height: auto;
    max-height: 60vh;
    object-fit: contain;
    display: block;
}
.news-modal-body {
    padding: 20px 22px 22px;
    overflow-y: auto;
}
.news-modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 8px;
}
.news-modal-tag {
    padding: 2px 8px;
    border-radius: 999px;
    background: #f2f8e9;
    color: #6a9430;
}
.news-modal-title {
    font-size: 1.4rem;
    margin: 4px 0 12px;
    color: #333;
}
.news-modal-content {
    font-size: 0.98rem;
    line-height: 1.7;
    color: #555;
    white-space: pre-wrap;
}

@media (max-width: 640px) {
    .news-modal {
        max-height: 95vh;
    }
    .news-modal-image-wrap {
        max-height: 45vh;
    }
    .news-modal-image-wrap img {
        max-height: 45vh;
    }
}

/* Playgroup courses feature block (left text + right image) */
.playgroup-feature {
    margin-top: calc(32px * var(--scale));
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: calc(32px * var(--scale));
    align-items: center;
    text-align: left;
}
.playgroup-feature-text-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #333;
    margin-bottom: calc(16px * var(--scale));
}
.playgroup-feature-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.playgroup-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}
.playgroup-feature-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f5d442;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0; /* hide numeric text, use icons via ::before */
    font-weight: 700;
}
.playgroup-feature-icon::before {
    font-size: 18px;
}
.playgroup-feature-item:nth-child(1) .playgroup-feature-icon {
    background: #f5a623;
}
.playgroup-feature-item:nth-child(1) .playgroup-feature-icon::before {
    content: "☺";
}
.playgroup-feature-item:nth-child(2) .playgroup-feature-icon {
    background: #45b3e0;
}
.playgroup-feature-item:nth-child(2) .playgroup-feature-icon::before {
    content: "A";
}
.playgroup-feature-item:nth-child(3) .playgroup-feature-icon {
    background: #ff7f7f;
}
.playgroup-feature-item:nth-child(3) .playgroup-feature-icon::before {
    content: "本";
}
.playgroup-feature-item:nth-child(4) .playgroup-feature-icon {
    background: #34b56a;
}
.playgroup-feature-item:nth-child(4) .playgroup-feature-icon::before {
    content: "人";
}
.playgroup-feature-text {
    font-size: 0.98rem;
    color: #555;
}
.playgroup-feature-image-wrap {
    position: relative;
    display: flex;
    justify-content: flex-end;
}
.playgroup-feature-image {
    width: 80%;
    max-width: 360px;
    height: auto;
    border-radius: 0;
    box-shadow: none;
    object-fit: cover;
}
@media (max-width: 900px) {
    .playgroup-feature {
        grid-template-columns: 1fr;
    }
    .playgroup-feature-image-wrap {
        order: -1;
    }
}

/* Playgroup courses - main photo + accordion */
.playgroup-main-photo-wrap {
    margin-top: calc(16px * var(--scale));
    text-align: left;
}
.playgroup-main-photo {
    max-width: 440px;
    width: 100%;
    height: auto;
    border-radius: 0;
    box-shadow: none;
    object-fit: cover;
}

.playgroup-section-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #333;
    margin: calc(40px * var(--scale)) 0 calc(16px * var(--scale));
    text-align: center;
}
.playgroup-content-block {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr);
    gap: calc(32px * var(--scale));
    align-items: center;
}
.playgroup-content-block .playgroup-main-photo-wrap {
    margin-top: 0;
}
.playgroup-content-block .playgroup-content-list {
    margin-top: 0;
}
.playgroup-content-list {
    display: grid;
    gap: 8px;
    text-align: left;
}
.playgroup-content-item-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}
.playgroup-content-item-text {
    font-size: 0.95rem;
    color: #555;
    margin: 0;
}

.playgroup-content-item {
    background: rgba(255,255,255,0.95);
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);
    overflow: hidden;
}
.playgroup-content-toggle {
    width: 100%;
    border: none;
    background: transparent;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}
.playgroup-content-toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
}
.playgroup-content-toggle-bullet {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #45b3e0;
}
.playgroup-content-item:nth-child(2) .playgroup-content-toggle-bullet {
    background: #f5a623;
}
.playgroup-content-item:nth-child(3) .playgroup-content-toggle-bullet {
    background: #ff7f7f;
}
.playgroup-content-item:nth-child(4) .playgroup-content-toggle-bullet {
    background: #34b56a;
}
.playgroup-content-item:nth-child(5) .playgroup-content-toggle-bullet {
    background: #8e6acd;
}
.playgroup-content-item:nth-child(6) .playgroup-content-toggle-bullet {
    background: #4caf50;
}
.playgroup-content-arrow {
    font-size: 1rem;
    color: #999;
    transition: transform 0.25s ease;
}
.playgroup-content-item.open .playgroup-content-arrow {
    transform: rotate(180deg);
}
.playgroup-content-body {
    display: none;
    padding: 0 18px 12px 32px;
}
.playgroup-content-item.open .playgroup-content-body {
    display: block;
}

/* 課程目標 / 適合對象 / 上課形式 — 三欄 */
.playgroup-three-cols {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: calc(24px * var(--scale));
    margin-top: calc(40px * var(--scale));
    text-align: left;
}
.playgroup-three-col h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #333;
    margin-bottom: calc(12px * var(--scale));
}
.playgroup-three-col ul {
    margin: 0;
    padding-left: 1.2em;
    font-size: 0.95rem;
    color: #555;
}
.playgroup-three-col li + li {
    margin-top: 6px;
}
@media (max-width: 768px) {
    .playgroup-three-cols {
        grid-template-columns: 1fr;
    }
}

/* Playgroup photos - albums & polaroid style */
.pg-album-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: calc(24px * var(--scale));
    margin-top: calc(24px * var(--scale));
}
@media (max-width: 900px) {
    .pg-album-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 500px) {
    .pg-album-grid {
        grid-template-columns: 1fr;
    }
}

.pg-photo-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: calc(16px * var(--scale));
    margin-top: calc(24px * var(--scale));
}
@media (max-width: 900px) {
    .pg-photo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 500px) {
    .pg-photo-grid {
        grid-template-columns: 1fr;
    }
}

.pg-polaroid {
    display: block;
    text-decoration: none;
    color: inherit;
}
.pg-polaroid-inner {
    position: relative;
    background: #f0f0f0;
    padding: 8px 8px 28px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.18);
    background-image: linear-gradient(to bottom, #fafafa 0%, #f0f0f0 100%);
    transition: transform 0.5s ease, box-shadow 0.2s ease;
    transform-origin: center center;
}
.pg-polaroid-img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 4px;
}
.pg-polaroid-placeholder {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 4px;
    background: #b2f5ea;
}
.pg-polaroid-caption {
    margin-top: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #555;
    text-align: center;
}
.pg-polaroid:hover .pg-polaroid-inner {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.22);
}

@keyframes pg-spin-once {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(360deg); }
}
.pg-polaroid-inner.pg-spin-enter {
    animation: pg-spin-once 0.8s ease-out forwards;
}

/* 波浪動畫：首頁 Section 5 上方與全站 footer 上方（見 includes/footer.php） */
.section5-footer-wave {
    position: relative;
    height: 35px;
    background-color: #fff;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='35' viewBox='0 0 120 35'%3E%3Cpath fill='%23A6D19B' d='M0 20 Q 15 5 30 20 T 60 20 T 90 20 T 120 20 V 35 H 0 Z'/%3E%3C/svg%3E"),
        url(../bg11.jpg);
    background-repeat: repeat-x, repeat;
    background-size: 120px 35px, auto;
    background-position: top center, center;
    animation: footer-wave-move 8s linear infinite;
}

@keyframes footer-wave-move {
    0% { background-position-x: 0, 0; }
    100% { background-position-x: -120px, 0; }
}

/* Footer - 4 columns + calendar */
.site-footer {
    /* 圖1：主區維持淺綠底 */
    --footer-bg: #A6D19B;
    --footer-fg: #1e3518;
    --footer-fg-muted: rgba(30, 53, 24, 0.82);
    /* 圖2：底部橫條鮮綠 + 白字 */
    --footer-bottom-bg: rgba(102, 204, 51, 0.5);
    --footer-bottom-fg: #fff;
    background: var(--footer-bg);
    color: var(--footer-fg);
    padding: calc(50px * var(--scale)) calc(24px * var(--scale)) 0;
}

/* 遊戲班課程相關頁：與全站 footer 同色（不再疊加 footerbg 圖） */
main.playgroup-page ~ footer.site-footer {
    background-color: var(--footer-bg);
    background-image: none;
}
main.playgroup-page ~ footer.site-footer .footer-bottom {
    background: transparent;
    border-top: none;
}

.footer-inner {
    max-width: calc(1200px * var(--scale));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: calc(40px * var(--scale));
    padding-bottom: calc(40px * var(--scale));
    border-bottom: none;
}

@media (max-width: 900px) {
    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 500px) {
    .footer-inner {
        grid-template-columns: 1fr;
    }
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: calc(20px * var(--scale));
    color: var(--footer-fg);
}

.footer-news-item {
    display: flex;
    gap: calc(12px * var(--scale));
    padding: calc(12px * var(--scale)) 0;
    border-bottom: 1px solid rgba(30, 53, 24, 0.12);
    text-decoration: none;
    color: var(--footer-fg-muted);
}

.footer-news-item:last-child {
    border-bottom: none;
}

.footer-news-thumb {
    width: calc(60px * var(--scale));
    height: calc(60px * var(--scale));
    min-width: calc(60px * var(--scale));
    background: rgba(255,255,255,0.45);
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    flex-shrink: 0;
}

.footer-news-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-news-title {
    font-size: 0.9rem;
    line-height: 1.3;
}

.footer-news-date {
    font-size: 0.75rem;
    opacity: 0.85;
}

.footer-dir-list {
    list-style: none;
}

.footer-dir-list li {
    border-bottom: 1px solid rgba(30, 53, 24, 0.12);
}

.footer-dir-list a {
    display: block;
    padding: calc(10px * var(--scale)) 0;
    color: var(--footer-fg-muted);
    text-decoration: none;
    font-size: 0.95rem;
}

.footer-dir-list a:hover {
    color: var(--footer-fg);
}

.footer-calendar-widget {
    background: rgba(255,255,255,0.35);
    border: 1px solid rgba(30, 53, 24, 0.18);
    border-radius: 6px;
    overflow: hidden;
    max-width: 280px;
}

.footer-calendar-header {
    background: rgba(255,255,255,0.5);
    padding: calc(10px * var(--scale));
    font-weight: 600;
    text-align: center;
}

.footer-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    padding: calc(8px * var(--scale));
    gap: 2px;
    font-size: 0.75rem;
    opacity: 0.9;
}

.footer-calendar-weekdays span {
    text-align: center;
}

.footer-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    padding: 0 calc(8px * var(--scale)) calc(8px * var(--scale));
    gap: 2px;
}

.footer-cal-day,
.footer-cal-empty {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.footer-cal-today {
    background: rgba(30, 53, 24, 0.12);
    border-radius: 4px;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: calc(16px * var(--scale)) calc(24px * var(--scale));
    background: transparent;
    max-width: 100%;
    border-top: none;
}

.footer-copyright,
.footer-platform {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.95);
}

.footer-bottom-right {
    display: flex;
    align-items: center;
    gap: calc(20px * var(--scale));
}

.footer-social {
    display: flex;
    align-items: center;
    gap: calc(8px * var(--scale));
}

.footer-social-icon {
    width: calc(28px * var(--scale));
    height: calc(28px * var(--scale));
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: opacity var(--transition), background var(--transition);
}

/* 鮮綠條：白色圖示直接疊在綠底上（勿用白底+綠圖，否則 currentColor 會變成品牌綠） */
.footer-bottom .footer-social-icon {
    background: transparent;
    color: #fff;
}

.footer-bottom .footer-social-icon:hover {
    opacity: 0.88;
    background: transparent;
}

.footer-social-icon svg {
    width: 100%;
    height: 100%;
}

/* News & Events page */
.news-page-inner {
    max-width: calc(1100px * var(--scale));
    margin: 0 auto;
}

.news-course-picker {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: calc(32px * var(--scale));
    max-width: calc(980px * var(--scale));
    margin: calc(24px * var(--scale)) auto 0;
}

.news-course-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
    padding: calc(18px * var(--scale)) calc(12px * var(--scale));
    border-radius: 16px;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.news-course-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.12);
    background: rgba(255,255,255,0.7);
}

.news-course-logo-wrap {
    width: min(100%, calc(360px * var(--scale)));
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-course-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.news-course-logo-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #fff;
    border: 2px dashed #bcd995;
    color: var(--color-green);
    font-weight: 700;
    text-align: center;
    padding: 16px;
}

.news-course-name {
    margin-top: calc(10px * var(--scale));
    font-size: 1.9rem;
    color: #69AF3B;
    font-weight: 700;
    text-align: center;
}

.news-filter-bar {
    margin-top: calc(18px * var(--scale));
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: calc(16px * var(--scale));
    flex-wrap: wrap;
}

.news-filter-current {
    font-size: 1rem;
    color: #4d4d4d;
}

.news-filter-reset {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #cfe5b1;
    color: #5a8a2e;
    text-decoration: none;
    font-weight: 600;
}

.news-filter-reset:hover {
    background: #f3f9ea;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: calc(24px * var(--scale));
    margin-top: calc(32px * var(--scale));
}

.news-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: transform var(--transition), box-shadow var(--transition);
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.12);
}

.news-card-thumb {
    width: 100%;
    padding-top: 60%;
    background-size: cover;
    background-position: center;
}

.news-card-body {
    padding: calc(16px * var(--scale)) calc(18px * var(--scale)) calc(16px * var(--scale));
    display: flex;
    flex-direction: column;
    gap: calc(8px * var(--scale));
}

.news-card-date {
    font-size: 0.85rem;
    color: #888;
}

.news-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #444;
}

.news-card-summary {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
}

.news-empty {
    margin-top: calc(32px * var(--scale));
    text-align: center;
    color: #777;
}

.news-pagination {
    display: flex;
    justify-content: center;
    gap: calc(8px * var(--scale));
    margin: calc(32px * var(--scale)) 0 calc(8px * var(--scale));
}

.news-page-link {
    min-width: 32px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #ddd;
    text-align: center;
    font-size: 0.95rem;
    text-decoration: none;
    color: #666;
    background: #fff;
    transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
}

.news-page-link:hover {
    border-color: var(--color-green);
    color: var(--color-green-dark);
    transform: translateY(-1px);
}

.news-page-link.active {
    background: var(--color-green);
    border-color: var(--color-green);
    color: #fff;
    cursor: default;
}

@media (max-width: 900px) {
    .news-course-picker {
        grid-template-columns: 1fr;
        max-width: calc(480px * var(--scale));
    }
    .news-course-name {
        font-size: 1.45rem;
    }
    .news-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
}

.footer-lang {
    display: flex;
    align-items: center;
    gap: calc(8px * var(--scale));
}

.footer-lang-link {
    color: #000;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.9rem;
    padding: calc(4px * var(--scale)) calc(8px * var(--scale));
    transition: opacity var(--transition);
}

.footer-bottom .footer-lang-link {
    color: rgba(255, 255, 255, 0.92);
}

.footer-lang-link:hover,
.footer-lang-link.active {
    opacity: 0.85;
}

.footer-bottom .footer-lang-link:hover,
.footer-bottom .footer-lang-link.active {
    opacity: 1;
    color: #fff;
}

.footer-scroll-top {
    width: calc(40px * var(--scale));
    height: calc(40px * var(--scale));
    padding: 0;
    background: var(--color-white);
    border: 1px solid rgba(30, 53, 24, 0.35);
    border-radius: 4px;
    font-size: 1.25rem;
    color: var(--footer-fg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.footer-bottom .footer-scroll-top {
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.65);
    color: var(--footer-bottom-bg);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.footer-scroll-top:hover {
    background: rgba(30, 53, 24, 0.12);
    color: var(--footer-fg);
}

.footer-bottom .footer-scroll-top:hover {
    background: rgba(255, 255, 255, 0.92);
    color: #52a82a;
}

/* WhatsApp 即時聯絡 - 左右各一組（icon 下方文字） */
.whatsapp-float-wrap {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(20px * var(--scale));
    z-index: 9999;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 0 calc(14px * var(--scale));
    pointer-events: none;
}

.whatsapp-float {
    position: static;
    width: calc(140px * var(--scale));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-decoration: none;
    color: #fff;
    pointer-events: auto;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.whatsapp-float-left {
    left: auto;
}

.whatsapp-float-right {
    right: auto;
}

.whatsapp-float-icon {
    width: calc(56px * var(--scale));
    height: calc(56px * var(--scale));
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.5);
}

.whatsapp-float:hover {
    transform: translateY(-2px);
}

.whatsapp-float-icon svg {
    width: calc(32px * var(--scale));
    height: calc(32px * var(--scale));
    color: #fff;
}

.whatsapp-float-text {
    margin-top: calc(6px * var(--scale));
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.45);
    text-align: center;
    white-space: nowrap;
}

.whatsapp-float-number {
    margin-top: 2px;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.2;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.45);
    text-align: center;
    white-space: nowrap;
}

/* Section 3 - 我們的課程 */
.section-3 {
    padding: calc(80px * var(--scale)) calc(24px * var(--scale));
    background: var(--color-cream) url(../bg11.jpg) center/cover no-repeat;
}

.section-3-inner {
    max-width: calc(1200px * var(--scale));
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.section-3-title {
    font-size: 3rem;
    color: var(--color-green);
    text-align: center;
    margin-bottom: calc(50px * var(--scale));
}

/* 上方大 LOGO 與走馬燈共用同一寬度容器 */
.section-3-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* 外層全寬，強制將雙圖示區塊置中（避免在 flex column 子項上 width:100% 時 margin 行為異常） */
.section-3-featured-outer {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    box-sizing: border-box;
    margin-bottom: calc(24px * var(--scale));
}

/* 上方 2 個大 LOGO（Playgroup / 綠苗）
   舊版曾用 max-width:920px + 三欄 grid，僅兩個項目時會像「佔滿前两欄、右側空一欄」；改為依內容寬度置中 */
.section-3-featured {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    align-content: center;
    gap: calc(24px * var(--scale));
    max-width: 100%;
    box-sizing: border-box;
    grid: none;
    vertical-align: top;
}
.section-3-card-featured .section-3-card-logo {
    width: calc(300px * var(--scale));
    height: calc(300px * var(--scale));
    min-width: calc(300px * var(--scale));
    min-height: calc(300px * var(--scale));
}
.section-3-card-featured .section-3-card-name {
    font-size: 1.75rem;
}
@media (max-width: 900px) {
    .section-3-featured-outer {
        margin-bottom: calc(32px * var(--scale));
    }
    .section-3-featured {
        flex-direction: column;
        align-items: center;
        max-width: 100%;
    }
    .section-3-card-featured .section-3-card-logo {
        width: calc(180px * var(--scale));
        height: calc(180px * var(--scale));
        min-width: calc(180px * var(--scale));
        min-height: calc(180px * var(--scale));
    }
    .section-3-card-featured .section-3-card-name {
        font-size: 1.2rem;
    }
}

.section-3-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: calc(24px * var(--scale));
}

/* 走馬燈：與上方大 LOGO 同寬，overflow 裁切至相同邊界 */
.section-3-marquee-wrap {
    width: 100%;
    overflow: hidden;
    padding: calc(8px * var(--scale)) 0;
}
.section-3-marquee-track {
    display: flex;
    flex-wrap: nowrap;
    gap: calc(16px * var(--scale));
    width: max-content;
    animation: section3-marquee 40s linear infinite;
}
.section-3-marquee-track:hover {
    animation-play-state: paused;
}
@keyframes section3-marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.section-3-card-marquee {
    flex: 0 0 auto;
    width: calc(110px * var(--scale));
    padding: calc(14px * var(--scale));
}
.section-3-card-marquee .section-3-card-logo {
    width: calc(90px * var(--scale));
    height: calc(90px * var(--scale));
    min-width: calc(90px * var(--scale));
    min-height: calc(90px * var(--scale));
    margin-bottom: calc(8px * var(--scale));
}
.section-3-card-marquee .section-3-card-name {
    font-size: 0.85rem;
    line-height: 1.2;
    word-break: break-all;
}

@media (max-width: 900px) {
    .section-3-cards {
        grid-template-columns: 1fr;
    }
}

.section-3-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: calc(56px * var(--scale));
    border-radius: 12px;
    text-decoration: none;
    color: var(--color-text);
}

/* 首頁兩個大圖示：略減左右 padding，避免總寬超過舊三欄容器寬度造成排版錯覺 */
.section-3-card.section-3-card-featured {
    flex: 0 0 auto;
    padding: calc(48px * var(--scale)) calc(16px * var(--scale));
}

.section-3-card-bg {
    display: none;
}

.section-3-card-overlay {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
    text-align: center;
    background: transparent;
}

.section-3-card-logo {
    width: calc(300px * var(--scale));
    height: calc(300px * var(--scale));
    min-width: calc(300px * var(--scale));
    min-height: calc(300px * var(--scale));
    flex-shrink: 0;
    margin-bottom: calc(20px * var(--scale));
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s ease;
}

.section-3-card:hover .section-3-card-logo {
    transform: scale(1.25);
}

.section-3-card-logo img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.section-3-card-name {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: calc(10px * var(--scale));
    color: #69AF3B;
}

.section-3-card-age {
    font-size: 1.15rem;
    opacity: 0.95;
    margin-bottom: calc(16px * var(--scale));
}

.section-3-card-link {
    font-size: 1.1rem;
    text-decoration: underline;
    color: var(--color-green);
}

/* Section 4 - 最新消息及活動 */
.section-4 {
    padding: calc(80px * var(--scale)) calc(24px * var(--scale));
    background: var(--color-cream) url(../bg14.jpg) center/cover no-repeat;
}

.section-4-inner {
    max-width: calc(1200px * var(--scale));
    margin: 0 auto;
}

.section-4-title {
    font-size: 3rem;
    color: #69AF3B;
    text-align: center;
    margin-bottom: calc(50px * var(--scale));
}

.section-4-grid-wrap {
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    margin-bottom: calc(40px * var(--scale));
}

.section-4-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 1.4fr 1fr;
    gap: 6px;
    padding: 6px;
    max-width: 100%;
    min-height: 480px;
}

/* 左2 中2 右2 版面，大小不一（上大下小） */
.section-4-grid-comic .section-4-card:nth-child(1) { grid-column: 1; grid-row: 1; }
.section-4-grid-comic .section-4-card:nth-child(2) { grid-column: 1; grid-row: 2; }
.section-4-grid-comic .section-4-card:nth-child(3) { grid-column: 2; grid-row: 1; }
.section-4-grid-comic .section-4-card:nth-child(4) { grid-column: 2; grid-row: 2; }
.section-4-grid-comic .section-4-card:nth-child(5) { grid-column: 3; grid-row: 1; }
.section-4-grid-comic .section-4-card:nth-child(6) { grid-column: 3; grid-row: 2; }

.section-4-card {
    position: relative;
    display: block;
    overflow: hidden;
    text-decoration: none;
    border-radius: 4px;
}

.section-4-card-img {
    position: absolute;
    inset: 0;
    background-color: #ddd;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.4s ease;
}

.section-4-card-placeholder {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #7db343 0%, #a8d96a 100%);
}

.section-4-card:hover .section-4-card-img {
    transform: scale(1.05);
}

.section-4-card-overlay {
    position: absolute;
    inset: 0;
    color: #333;
    padding: calc(16px * var(--scale));
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.35s ease;
}

/* 滑鼠移入時顏色由左至右慢慢填滿（黃色 #FDD848） */
.section-4-card-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 0;
    background: #FDD848;
    transition: width 0.6s ease;
    z-index: 0;
}

.section-4-card:hover .section-4-card-overlay::before,
.section-4-card:active .section-4-card-overlay::before,
.section-4-card:focus .section-4-card-overlay::before,
.section-4-card:focus-visible .section-4-card-overlay::before {
    width: 100%;
}

/* 內容在填滿後漸顯 */
.section-4-card-overlay > * {
    position: relative;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.4s ease 0.25s;
}

.section-4-card:hover .section-4-card-overlay,
.section-4-card:active .section-4-card-overlay,
.section-4-card:focus .section-4-card-overlay,
.section-4-card:focus-visible .section-4-card-overlay {
    opacity: 1;
}

.section-4-card:hover .section-4-card-overlay > *,
.section-4-card:active .section-4-card-overlay > *,
.section-4-card:focus .section-4-card-overlay > *,
.section-4-card:focus-visible .section-4-card-overlay > * {
    opacity: 1;
}

.section-4-card-tag {
    position: absolute;
    top: calc(12px * var(--scale));
    right: calc(12px * var(--scale));
    background: #69AF3B;
    color: #fff;
    font-size: 0.75rem;
    padding: calc(4px * var(--scale)) calc(10px * var(--scale));
    border-radius: 4px;
}

.section-4-card-course {
    font-size: 0.72rem;
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 999px;
    display: inline-block;
    width: fit-content;
    padding: calc(3px * var(--scale)) calc(9px * var(--scale));
    margin-bottom: calc(8px * var(--scale));
    letter-spacing: 0.02em;
}

.section-4-card-date {
    font-size: 0.8rem;
    opacity: 0.9;
    margin-bottom: calc(4px * var(--scale));
}

.section-4-card-title {
    font-size: 1rem;
    line-height: 1.3;
    font-weight: 600;
    margin-bottom: calc(8px * var(--scale));
}

.section-4-card-content {
    font-size: 0.85rem;
    line-height: 1.4;
    opacity: 0.95;
    margin-bottom: calc(8px * var(--scale));
}

.section-4-card-link {
    font-size: 0.9rem;
    color: var(--color-green);
    text-decoration: underline;
}

/* 後台自訂大小（非 6 項目時或自訂版面） */
.section-4-card-wide { grid-column: span 2; }
.section-4-card-tall { grid-row: span 2; }
.section-4-card-large { grid-column: span 2; grid-row: span 2; }

.section-4-btn-wrap {
    text-align: center;
}

.section-4-btn {
    display: inline-block;
    padding: calc(12px * var(--scale)) calc(32px * var(--scale));
    background: var(--color-yellow);
    color: var(--color-text);
    text-decoration: none;
    font-weight: 600;
    border-radius: 30px;
    transition: background var(--transition), transform var(--transition);
}

.section-4-btn:hover {
    background: #f8dc50;
    transform: translateY(-1px);
}

@media (max-width: 900px) {
    .section-4-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: repeat(3, minmax(180px, 1fr));
        min-height: auto;
    }
    .section-4-grid-comic .section-4-card:nth-child(1) { grid-column: 1; grid-row: 1; }
    .section-4-grid-comic .section-4-card:nth-child(2) { grid-column: 2; grid-row: 1; }
    .section-4-grid-comic .section-4-card:nth-child(3) { grid-column: 1; grid-row: 2; }
    .section-4-grid-comic .section-4-card:nth-child(4) { grid-column: 2; grid-row: 2; }
    .section-4-grid-comic .section-4-card:nth-child(5) { grid-column: 1; grid-row: 3; }
    .section-4-grid-comic .section-4-card:nth-child(6) { grid-column: 2; grid-row: 3; }
    .section-4-card-wide { grid-column: span 2; }
    .section-4-card-tall { grid-row: span 1; }
    .section-4-card-large { grid-column: span 2; grid-row: span 2; }
}

/* Section 5 - Parent Showcase carousel */
.section-5 {
    padding: calc(80px * var(--scale)) calc(24px * var(--scale)) calc(110px * var(--scale));
    background: var(--color-cream) url(../bg16.jpg) center/cover no-repeat;
}

.section-5-inner {
    max-width: calc(1280px * var(--scale));
    margin: 0 auto;
    text-align: center;
}

.section-5-title {
    font-size: 3rem;
    color: #7DC242;
    margin-bottom: calc(32px * var(--scale));
    text-align: center;
}

.section-5-testimonial {
    margin-bottom: calc(32px * var(--scale));
}

.section-5-quote {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #676767;
    margin: 0 0 calc(16px * var(--scale));
    font-style: normal;
}

.section-5-author {
    font-size: 1rem;
    color: #999;
    margin: 0 0 calc(8px * var(--scale));
}

.section-5-date {
    font-size: 0.9rem;
    color: #aaa;
    margin: calc(-4px * var(--scale)) 0 calc(12px * var(--scale));
}

.section-5-video-link {
    display: inline-block;
    font-size: 0.9rem;
    color: var(--color-green);
    text-decoration: underline;
    margin-bottom: calc(16px * var(--scale));
}

.section-5-video-link:hover {
    color: var(--color-green-dark);
}

.section-5-btn-wrap {
    text-align: center;
    margin-top: calc(28px * var(--scale));
}

.section-5-btn {
    display: inline-block;
    padding: calc(12px * var(--scale)) calc(32px * var(--scale));
    background: var(--color-yellow);
    color: var(--color-text);
    text-decoration: none;
    font-weight: 600;
    border-radius: 30px;
    transition: background var(--transition), transform var(--transition);
}

.parent-showcase {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
    z-index: 1;
    box-sizing: border-box;
}

/* 首頁：一行自動走馬燈（似 Section3 LOGO） */
.parent-showcase--home {
    display: block;
    padding: 0;
}

.parent-showcase--home .parent-showcase-viewport {
    overflow: hidden;
    width: 100%;
    container-type: inline-size;
    container-name: parent-showcase;
}

.parent-showcase--home .parent-showcase-track {
    display: flex;
    align-items: flex-start;
    flex-wrap: nowrap;
    gap: calc(16px * var(--scale));
    width: max-content;
    will-change: transform;
    animation: parent-showcase-marquee 45s linear infinite;
}

.parent-showcase--home .parent-showcase-track:hover,
.parent-showcase--home.is-paused .parent-showcase-track {
    animation-play-state: paused;
}

@keyframes parent-showcase-marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.parent-showcase--home .parent-showcase-card {
    flex: 0 0 calc((100cqw - 48px) / 4);
    width: auto;
    max-width: none;
}

.parent-showcase-arrow {
    flex-shrink: 0;
    width: calc(44px * var(--scale));
    height: calc(44px * var(--scale));
    border-radius: 50%;
    border: 2px solid #7db343;
    background: #fff;
    color: #7db343;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
    z-index: 2;
}

.parent-showcase-arrow svg {
    width: calc(22px * var(--scale));
    height: calc(22px * var(--scale));
}

.parent-showcase-arrow:hover {
    background: #7db343;
    color: #fff;
    transform: scale(1.05);
}

.parent-showcase-arrow:disabled {
    opacity: 0.35;
    cursor: default;
    transform: none;
}

/* 完整頁：4×4 網格 */
.parent-showcase-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: calc(16px * var(--scale));
    width: 100%;
}

.parent-showcase-card {
    position: relative;
    min-width: 0;
    width: 100%;
    background: #f9f8f5;
    border-radius: calc(12px * var(--scale));
    overflow: hidden;
    box-shadow: none;
    text-align: left;
}

.parent-showcase-card.is-page-hidden {
    display: none !important;
}

/* 保持原圖比例，不拉伸變形 */
.parent-showcase-media {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #f9f8f5;
    overflow: hidden;
    border-radius: calc(12px * var(--scale));
}

.parent-showcase-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.parent-showcase-card--image-only .parent-showcase-media {
    aspect-ratio: 4 / 3;
}

/* 卡片內文字隱藏；真正顯示用 body 上的 #parentShowcasePopup */
.parent-showcase-card--hover-text .parent-showcase-caption {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    opacity: 0;
    pointer-events: none;
}

.parent-showcase-popup {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 10050;
    width: 320px;
    max-width: calc(100vw - 24px);
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.65);
    transform-origin: center center;
    transition:
        opacity 0.25s ease,
        transform 0.36s cubic-bezier(0.34, 1.5, 0.64, 1),
        visibility 0.25s ease;
}

.parent-showcase-popup.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.parent-showcase-popup-inner {
    box-sizing: border-box;
    width: 100%;
    padding: 18px 16px 22px;
    background: rgba(255, 248, 210, 0.98);
    color: #333;
    font-size: 0.92rem;
    line-height: 1.75;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.16);
    text-align: left;
}

.parent-showcase-popup-inner p {
    margin: 0;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.parent-showcase-caption p {
    margin: 0;
    padding: 0;
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* 只有文字（無相）：直接顯示 */
.parent-showcase-card--text-only .parent-showcase-caption {
    position: static;
    width: auto;
    height: auto;
    padding: 0;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    opacity: 1;
    pointer-events: auto;
    z-index: auto;
}

.parent-showcase-card--text-only .parent-showcase-caption-inner {
    display: block;
    height: auto;
    max-height: none;
    min-height: calc(180px * var(--scale));
    padding: calc(18px * var(--scale)) calc(16px * var(--scale));
    background: #fff8d2;
    box-shadow: none;
    overflow: visible;
    color: #222;
    font-size: 0.95rem;
    line-height: 1.65;
    border-radius: calc(12px * var(--scale));
}

/* 頁碼 1,2,3,4,5... */
.parent-showcase-pager {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: calc(28px * var(--scale));
}

.parent-showcase-page-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 2px solid #7db343;
    border-radius: 999px;
    background: #fff;
    color: #7db343;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.parent-showcase-page-btn:hover {
    background: #eaf6dd;
    transform: translateY(-1px);
}

.parent-showcase-page-btn.is-active {
    background: #7db343;
    color: #fff;
}

.testimonials-showcase-inner {
    max-width: calc(1280px * var(--scale)) !important;
}

.testimonials-page .parent-showcase {
    margin-top: calc(12px * var(--scale));
}

@media (max-width: 1100px) {
    .parent-showcase--full .parent-showcase-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .parent-showcase--home .parent-showcase-card {
        flex: 0 0 calc((100cqw - 32px) / 3);
    }
}

@media (max-width: 900px) {
    .parent-showcase--full .parent-showcase-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .parent-showcase--home .parent-showcase-card {
        flex: 0 0 calc((100cqw - 16px) / 2);
    }
}

@media (max-width: 640px) {
    .section-5-inner {
        max-width: 100%;
    }
    .parent-showcase--full .parent-showcase-grid {
        grid-template-columns: 1fr;
    }
    .parent-showcase--home .parent-showcase-card {
        flex: 0 0 85cqw;
    }
    .parent-showcase-page-btn {
        min-width: 36px;
        height: 36px;
        font-size: 0.95rem;
    }
}

/* 觸控裝置：點一下顯示／再點隱藏文字 */
@media (hover: none) {
    .parent-showcase-card--hover-text {
        cursor: pointer;
    }
}

.section-5-btn:hover {
    background: #f8dc50;
    transform: translateY(-1px);
}
