/* ===== Course Hero Section ===== */
.course-hero {
    padding: 40px 0 30px;
}

.course-hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    align-items: center;
}

.course-hero-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--brand);
    letter-spacing: .08em;
    text-transform: uppercase;
}

.course-hero-title {
    font-size: 38px;
    font-weight: 800;
    line-height: 1.25;
    margin: 8px 0 0;
    color: #1a3060;
    letter-spacing: -.02em;
}

.course-hero-title span {
    background: linear-gradient(135deg, var(--brand), var(--aqua));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.course-hero-desc {
    color: var(--muted);
    line-height: 1.75;
    font-size: 15px;
    margin: 14px 0 0;
}

.course-hero-desc strong {
    color: var(--brand2);
}

.course-hero-stats {
    display: flex;
    gap: 16px;
    margin-top: 24px;
}

.cstat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 20px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(59, 130, 246, .08), rgba(34, 211, 238, .06));
    border: 1px solid rgba(59, 130, 246, .12);
    min-width: 80px;
    transition: .3s ease;
}

.cstat:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, .12);
    border-color: rgba(59, 130, 246, .25);
}

.cstat-num {
    font-size: 22px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--brand), var(--aqua));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.cstat-label {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
}

.course-hero-img {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .12);
    border: 1px solid rgba(0, 0, 0, .06);
}

.course-hero-img img.course-hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 24px;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: opacity .8s ease;
}

.course-hero-img img.course-hero-slide:first-child {
    position: relative;
    height: auto;
}

.course-hero-img img.course-hero-slide.active {
    opacity: 1;
    z-index: 1;
}

.course-hero-img img {
    width: 100%;
    border-radius: 24px;
    object-fit: cover;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .12);
    border: 1px solid rgba(0, 0, 0, .06);
}

/* ===== Courses Section Header ===== */
.courses-header {
    text-align: center;
    margin-bottom: 28px;
}

.courses-section-title {
    font-size: 32px;
    font-weight: 800;
    color: #1a3060;
    margin: 0 0 8px;
}

.courses-section-title span {
    background: linear-gradient(135deg, var(--brand), var(--aqua));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.courses-section-sub {
    font-size: 15px;
    color: var(--muted);
    margin: 0;
}

/* ===== Tab Buttons ===== */
.course-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 28px;
}

.ctab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, .10);
    background: #fff;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: .25s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .04);
}

.ctab:hover {
    border-color: rgba(59, 130, 246, .25);
    color: var(--brand);
    background: rgba(59, 130, 246, .04);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, .10);
}

.ctab.active {
    background: linear-gradient(135deg, #3B82F6, #1D4ED8);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 6px 20px rgba(59, 130, 246, .30);
}

.ctab.active:hover {
    transform: translateY(-2px);
}

/* ===== Course Cards Grid ===== */
.course-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* ===== iOS 26 Style Course Icons ===== */
.ccard-ios-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0,0,0,.12), inset 0 1px 1px rgba(255,255,255,.35);
}
.ccard-ios-icon::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,.35) 0%, rgba(255,255,255,0) 100%);
    border-radius: 14px 14px 0 0;
    pointer-events: none;
}
.ccard-ios-icon.baby     { background: linear-gradient(145deg, #FF9A9E, #FAD0C4); }
.ccard-ios-icon.sprout   { background: linear-gradient(145deg, #84FAB0, #8FD3F4); }
.ccard-ios-icon.explorer { background: linear-gradient(145deg, #667EEA, #764BA2); }
.ccard-ios-icon.leader   { background: linear-gradient(145deg, #1a237e, #4a69bd); }
.ccard-ios-icon.chinese  { background: linear-gradient(145deg, #e53935, #ff6f60); }
.ccard-ios-icon.toeic    { background: linear-gradient(145deg, #7c3aed, #a78bfa); }
.ccard-ios-icon.ielts    { background: linear-gradient(145deg, #6d28d9, #8b5cf6); }
.ccard-ios-icon.toefl    { background: linear-gradient(145deg, #5b21b6, #7c3aed); }

/* ===== Individual Course Card ===== */
.ccard {
    background: #fff;
    border-radius: 22px;
    border: 1px solid rgba(0, 0, 0, .06);
    border-left: 5px solid #233E7D;
    padding: 22px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .05);
    transition: .35s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.ccard::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #233E7D;
    opacity: 0;
    transition: .3s ease;
}

.ccard:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(35, 62, 125, .15);
    border-color: rgba(35, 62, 125, .2);
}

.ccard:hover::before {
    opacity: 1;
}

.ccard-badge {
    display: inline-flex;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .03em;
    width: fit-content;
    margin-bottom: 12px;
}

.ccard-badge.toddler {
    background: rgba(244, 114, 182, .12);
    color: #DB2777;
    border: 1px solid rgba(244, 114, 182, .20);
}

.ccard-badge.preschool {
    background: rgba(59, 130, 246, .10);
    color: #1D4ED8;
    border: 1px solid rgba(59, 130, 246, .18);
}

.ccard-badge.primary-badge {
    background: rgba(5, 150, 105, .10);
    color: #047857;
    border: 1px solid rgba(5, 150, 105, .18);
}

.ccard-badge.chinese {
    background: rgba(239, 68, 68, .10);
    color: #DC2626;
    border: 1px solid rgba(239, 68, 68, .18);
}

.ccard-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.toddler-bg {
    background: linear-gradient(135deg, #F472B6, #EC4899);
    box-shadow: 0 6px 16px rgba(236, 72, 153, .25);
}

.preschool-bg {
    background: linear-gradient(135deg, #3B82F6, #60A5FA);
    box-shadow: 0 6px 16px rgba(59, 130, 246, .25);
}

.primary-bg {
    background: linear-gradient(135deg, #059669, #10B981);
    box-shadow: 0 6px 16px rgba(5, 150, 105, .25);
}

.chinese-bg {
    background: linear-gradient(135deg, #EF4444, #F87171);
    box-shadow: 0 6px 16px rgba(239, 68, 68, .25);
}

.ccard-badge.junior-badge {
    background: rgba(139, 92, 246, .10);
    color: #7C3AED;
    border: 1px solid rgba(139, 92, 246, .18);
}

.junior-bg {
    background: linear-gradient(135deg, #7C3AED, #A78BFA);
    box-shadow: 0 6px 16px rgba(124, 58, 237, .25);
}

.ccard-title {
    font-size: 18px;
    font-weight: 800;
    color: #1a3060;
    margin: 0 0 8px;
}

.ccard-desc {
    font-size: 13.5px;
    color: var(--muted);
    line-height: 1.65;
    margin: 0 0 14px;
    flex: 1;
}

/* Card Details */
.ccard-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.ccard-detail {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--muted);
}

.ccard-detail svg {
    color: var(--brand);
    flex-shrink: 0;
}

/* Skills Tags */
.ccard-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.cskill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    background: rgba(59, 130, 246, .06);
    border: 1px solid rgba(59, 130, 246, .10);
    color: var(--brand2);
    font-weight: 500;
}

/* Card Footer */
.ccard-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid rgba(0, 0, 0, .06);
    margin-top: auto;
}

.ccard-price {
    font-weight: 800;
    font-size: 14px;
    color: var(--brand2);
}

/* ===== Why Section ===== */
.why-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.why-card {
    text-align: center;
    padding: 24px 16px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .06);
    box-shadow: 0 4px 16px rgba(0, 0, 0, .04);
    transition: .3s ease;
}

.why-card:hover {
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, .15);
    box-shadow: 0 12px 36px rgba(59, 130, 246, .10);
}

.why-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
}

.why-card h4 {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 700;
    color: #1a3060;
}

.why-card p {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
    line-height: 1.6;
}

/* ===== Booking Section ===== */
.booking-section {
    background: linear-gradient(180deg, rgba(59, 130, 246, .03), rgba(34, 211, 238, .03));
}

.booking-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 36px;
    align-items: flex-start;
}

.booking-title {
    font-size: 30px;
    font-weight: 800;
    line-height: 1.3;
    margin: 8px 0 0;
    color: #1a3060;
}

.booking-title span {
    background: linear-gradient(135deg, var(--brand), var(--aqua));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.booking-desc {
    color: var(--muted);
    line-height: 1.75;
    font-size: 15px;
    margin: 14px 0 0;
}

.booking-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 24px;
}

.bf-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .06);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .03);
    transition: .3s ease;
}

.bf-item:hover {
    transform: translateX(6px);
    border-color: rgba(59, 130, 246, .15);
    box-shadow: 0 8px 24px rgba(59, 130, 246, .08);
}

.bf-icon {
    font-size: 20px;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bf-item b {
    display: block;
    font-size: 14px;
    color: #1a3060;
    margin-bottom: 2px;
}

.bf-item small {
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.5;
}

/* Booking Form */
.booking-form-wrap {
    position: sticky;
    top: 84px;
}

.booking-form {
    background: #fff;
    border-radius: 24px;
    border: 1px solid rgba(0, 0, 0, .06);
    padding: 28px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .06);
}

.bform-title {
    margin: 0 0 20px;
    font-size: 18px;
    font-weight: 800;
    color: #1a3060;
    text-align: center;
}

/* ===== iOS 26‑style Form Controls ===== */
.booking-form .input,
.booking-form .select,
.booking-form .textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #dde3ed;
    border-radius: 50px;
    font-family: 'Kanit', sans-serif;
    font-size: 14px;
    color: #1a3060;
    background: #f8fafc;
    outline: none;
    transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
    box-sizing: border-box;
}
.booking-form .textarea {
    border-radius: 18px;
}
.booking-form .input::placeholder,
.booking-form .textarea::placeholder {
    color: #a0aec0;
    font-weight: 400;
}
.booking-form .input:hover,
.booking-form .select:hover,
.booking-form .textarea:hover {
    border-color: #b4c2d9;
    background: #fff;
}
.booking-form .input:focus,
.booking-form .select:focus,
.booking-form .textarea:focus {
    border-color: #233E7D;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(35, 62, 125, .12);
}
.booking-form .select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23233E7D' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 14px;
    padding-right: 40px;
    cursor: pointer;
    color: #233E7D;
    display: none;
}

/* ===== Custom Pill Dropdown ===== */
.custom-dropdown {
    position: relative;
    width: 100%;
}
.custom-dropdown-toggle {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 1.5px solid #dde3ed;
    border-radius: 50px;
    font-family: 'Kanit', sans-serif;
    font-size: 14px;
    color: #233E7D;
    background: #f8fafc;
    cursor: pointer;
    transition: border-color .25s, box-shadow .25s, background .25s;
    box-sizing: border-box;
    position: relative;
    user-select: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.custom-dropdown-toggle::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%) rotate(0deg);
    width: 0; height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #233E7D;
    transition: transform .25s ease;
}
.custom-dropdown.open .custom-dropdown-toggle::after {
    transform: translateY(-50%) rotate(180deg);
}
.custom-dropdown-toggle:hover {
    border-color: #b4c2d9;
    background: #fff;
}
.custom-dropdown.open .custom-dropdown-toggle {
    border-color: #233E7D;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(35, 62, 125, .12);
}
.custom-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1.5px solid #dde3ed;
    border-radius: 18px;
    padding: 8px;
    box-shadow: 0 12px 36px rgba(0,0,0,.12);
    z-index: 100;
    display: none;
    max-height: 260px;
    overflow-y: auto;
}
.custom-dropdown.open .custom-dropdown-menu {
    display: block;
    animation: ddSlideIn .2s ease;
}
@keyframes ddSlideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.custom-dropdown-item {
    padding: 10px 18px;
    border-radius: 50px;
    font-family: 'Kanit', sans-serif;
    font-size: 13.5px;
    color: #233E7D;
    cursor: pointer;
    transition: background .2s, color .2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}
.custom-dropdown-item:last-child { margin-bottom: 0; }
.custom-dropdown-item:hover {
    background: rgba(35, 62, 125, .08);
}
.custom-dropdown-item.active {
    background: #233E7D;
    color: #fff;
    font-weight: 600;
}
.booking-form .textarea {
    min-height: 80px;
    resize: vertical;
    line-height: 1.6;
}

.bform-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 4px;
}

.bform-field {
    margin-bottom: 10px;
}

.bform-field label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 6px;
}

.booking-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    border-radius: 16px;
    border: none;
    background: linear-gradient(135deg, #3B82F6, #1D4ED8);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: .3s ease;
    box-shadow: 0 6px 20px rgba(59, 130, 246, .30);
    margin-top: 6px;
}

.booking-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, .40);
}

.bform-note {
    font-size: 12px;
    color: var(--muted2);
    text-align: center;
    margin: 10px 0 0;
}

/* Booking Success */
.booking-success {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(5, 150, 105, .08);
    border: 1px solid rgba(5, 150, 105, .18);
    margin-bottom: 12px;
    animation: fadeInUp .4s ease;
}

.booking-success b {
    color: #047857;
    font-size: 14px;
}

.booking-success small {
    color: var(--muted);
    font-size: 12.5px;
}

/* Fade animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Responsive ===== */
@media (max-width: 980px) {
    .course-hero-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .course-hero-title {
        font-size: 30px;
    }

    .course-hero-img {
        max-width: 600px;
        margin: 0 auto;
        height: auto;
    }

    .course-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .why-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .booking-wrapper {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .booking-form-wrap {
        position: relative;
        top: auto;
    }
}

@media (max-width: 640px) {
    .course-hero-title {
        font-size: 26px;
    }

    .course-hero-stats {
        flex-wrap: wrap;
    }

    .course-tabs {
        gap: 6px;
    }

    .ctab {
        padding: 8px 14px;
        font-size: 13px;
    }

    .course-cards-grid {
        grid-template-columns: 1fr;
    }

    .why-grid {
        grid-template-columns: 1fr;
    }

    .bform-row {
        grid-template-columns: 1fr;
    }

    .courses-section-title {
        font-size: 24px;
    }

    .booking-title {
        font-size: 24px;
    }

    /* Prevent text overflow on mobile */
    .course-hero-title,
    .courses-section-title,
    .booking-title,
    .ccard-title,
    .why-card h4 {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }

    .course-hero-desc,
    .ccard-desc {
        max-width: 100%;
    }

    .course-hero-stats {
        gap: 8px;
        flex-wrap: wrap;
    }

    .cstat {
        min-width: 0;
        flex: 0 0 auto;
        padding: 10px 18px;
    }

    .ccard {
        padding: 16px;
    }

    .ccard-title {
        font-size: 16px;
    }

    .booking-form {
        padding: 20px 16px;
    }
}

/* ===== Mobile-only line break for free trial button ===== */
.mobile-br {
    display: none;
}

@media (max-width: 768px) {
    .mobile-br {
        display: block;
    }
}