/**
 * CungConHoc - Modern Clean EdTech Design (Inspired by onthi.app / Duolingo)
 * Light, airy, playful yet professional layout for Vietnamese elementary kids & parents.
 */

@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,700&display=swap');

:root {
    --cch-bg: #f7f7fd;
    --cch-surface: #ffffff;
    --cch-slate-900: #0f172a;
    --cch-slate-800: #1e293b;
    --cch-slate-700: #334155;
    --cch-slate-600: #475569;
    --cch-slate-500: #64748b;
    --cch-slate-400: #94a3b8;
    --cch-slate-200: #e2e8f0;
    --cch-slate-100: #f1f5f9;
    
    --cch-green: #58CC02;
    --cch-green-shadow: #45A300;
    --cch-green-light: #e8f9db;
    
    --cch-indigo: #4f46e5;
    --cch-indigo-hover: #4338ca;
    --cch-indigo-shadow: #3730a3;
    --cch-indigo-light: #eef2ff;
    
    --cch-violet: #7c3aed;
    --cch-violet-light: #f5f3ff;
    
    --cch-amber: #FFC800;
    --cch-amber-shadow: #D99A00;
    --cch-amber-light: #fefce8;
    
    --cch-sky: #0284c7;
    --cch-sky-light: #f0f9ff;
    
    --cch-font: 'Be Vietnam Pro', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --cch-radius-lg: 24px;
    --cch-radius-xl: 32px;
}

/* Reset for Homepage Takeover */
body.home {
    background-color: var(--cch-bg) !important;
    font-family: var(--cch-font) !important;
    color: var(--cch-slate-800) !important;
    margin: 0 !important;
    padding: 0 !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.home #header,
body.home .header-wrapper,
body.home #footer,
body.home .footer-wrapper {
    display: none !important;
}

body.home #main,
body.home #content,
body.home .page-wrapper,
body.home .content-area,
body.home .entry-content,
body.home .entry-content > .row,
body.home .entry-content > .row > .col,
body.home .entry-content > .row > .col > .col-inner {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
}

/* Main App Wrapper */
.cch-app {
    min-height: 100vh;
    background-color: var(--cch-bg);
    font-family: var(--cch-font);
    color: var(--cch-slate-800);
    overflow-x: hidden;
}

.cch-container {
    max-width: 1140px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 16px;
    padding-right: 16px;
}

@media (min-width: 640px) {
    .cch-container {
        padding-left: 24px;
        padding-right: 24px;
    }
}

/* Sticky Header */
.cch-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--cch-slate-200);
    height: 60px;
    display: flex;
    align-items: center;
}

.cch-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.cch-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none !important;
}

.cch-brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
    border-bottom: 2px solid #4338ca;
}

.cch-brand-title {
    font-size: 21px;
    font-weight: 900;
    letter-spacing: -0.5px;
    color: var(--cch-slate-900);
}

.cch-brand-title span {
    color: var(--cch-violet);
}

.cch-nav-links {
    display: none;
    align-items: center;
    gap: 24px;
    font-size: 14px;
    font-weight: 700;
}

@media (min-width: 860px) {
    .cch-nav-links {
        display: flex;
    }
}

.cch-nav-links a {
    color: var(--cch-slate-500);
    text-decoration: none !important;
    transition: color 0.15s ease;
}

.cch-nav-links a:hover {
    color: var(--cch-violet);
}

/* 3D Duolingo Button */
.cch-btn-3d {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--cch-font);
    font-weight: 900;
    text-decoration: none !important;
    user-select: none;
    cursor: pointer;
    transition: transform 0.1s ease, border-bottom-width 0.1s ease, filter 0.15s ease;
    border: none;
    text-align: center;
    line-height: 1;
}

.cch-btn-3d:active {
    transform: translateY(3px);
}

/* Button Variants */
.cch-btn-green {
    background-color: var(--cch-green);
    border-bottom: 5px solid var(--cch-green-shadow);
    color: #fff !important;
    border-radius: 18px;
    padding: 14px 28px;
    font-size: 16px;
    box-shadow: 0 8px 20px rgba(88, 204, 2, 0.28);
}

.cch-btn-green:active {
    border-bottom-width: 1px;
}

.cch-btn-green:hover {
    filter: brightness(1.05);
}

.cch-btn-indigo {
    background-color: var(--cch-indigo);
    border-bottom: 4px solid var(--cch-indigo-shadow);
    color: #fff !important;
    border-radius: 14px;
    padding: 10px 18px;
    font-size: 13px;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.22);
}

.cch-btn-indigo:active {
    border-bottom-width: 1px;
}

.cch-btn-indigo:hover {
    filter: brightness(1.06);
}

.cch-btn-white {
    background-color: #fff;
    border: 2px solid var(--cch-slate-200);
    border-bottom: 4px solid #cbd5e1;
    color: var(--cch-slate-800) !important;
    border-radius: 14px;
    padding: 10px 18px;
    font-size: 14px;
}

.cch-btn-white:hover {
    border-color: #c4b5fd;
    border-bottom-color: #a78bfa;
}

/* Hero Section */
.cch-hero {
    padding: 36px 0 24px;
}

@media (min-width: 768px) {
    .cch-hero {
        padding: 56px 0 40px;
    }
}

.cch-hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 36px;
    align-items: center;
}

@media (min-width: 860px) {
    .cch-hero-grid {
        grid-template-columns: 1.15fr 0.85fr;
        gap: 40px;
    }
}

.cch-kicker-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 2px solid #ede9fe;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 800;
    color: var(--cch-violet);
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.08);
}

.cch-kicker-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--cch-green);
    animation: cch-pulse 2s infinite;
}

@keyframes cch-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.cch-hero h1 {
    margin-top: 16px;
    margin-bottom: 0;
    font-size: 32px;
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: -0.5px;
    color: var(--cch-slate-800);
}

@media (min-width: 640px) {
    .cch-hero h1 {
        font-size: 46px;
    }
}

@media (min-width: 1024px) {
    .cch-hero h1 {
        font-size: 52px;
    }
}

.cch-title-highlight {
    color: var(--cch-green);
    text-decoration: underline;
    text-decoration-color: var(--cch-amber);
    text-decoration-thickness: 6px;
    text-underline-offset: 6px;
}

.cch-hero-desc {
    margin-top: 18px;
    font-size: 16px;
    line-height: 1.65;
    color: var(--cch-slate-500);
    max-width: 520px;
}

@media (min-width: 640px) {
    .cch-hero-desc {
        font-size: 18px;
    }
}

.cch-hero-desc strong {
    color: var(--cch-slate-700);
}

.cch-hero-actions {
    margin-top: 26px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

.cch-hero-link {
    font-size: 15px;
    font-weight: 800;
    color: var(--cch-indigo);
    text-decoration: none !important;
    transition: color 0.15s ease;
}

.cch-hero-link:hover {
    color: var(--cch-indigo-hover);
    text-decoration: underline !important;
}

.cch-hero-benefits {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 12px;
    font-weight: 700;
    color: var(--cch-slate-400);
}

.cch-hero-benefits span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.cch-hero-benefits svg {
    color: var(--cch-green);
}

/* Phone Mockup */
.cch-hero-preview {
    display: none;
    justify-content: center;
}

@media (min-width: 860px) {
    .cch-hero-preview {
        display: flex;
    }
}

.cch-phone-wrap {
    position: relative;
    width: 270px;
    background: #0f172a;
    border-radius: 42px;
    padding: 10px;
    box-shadow: 0 25px 60px rgba(79, 70, 229, 0.18), 0 10px 20px rgba(15, 23, 42, 0.12);
    transform: rotate(3deg);
    transition: transform 0.3s ease;
}

.cch-phone-wrap:hover {
    transform: rotate(0deg) scale(1.02);
}

.cch-phone-screen {
    background: #f8fafc;
    border-radius: 32px;
    overflow: hidden;
    padding: 18px 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: 1px solid #e2e8f0;
}

.cch-phone-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 800;
    color: var(--cch-slate-500);
}

.cch-phone-progress {
    height: 6px;
    background: #e2e8f0;
    border-radius: 999px;
    width: 100%;
    overflow: hidden;
}

.cch-phone-progress-fill {
    height: 100%;
    width: 65%;
    background: var(--cch-green);
    border-radius: 999px;
}

.cch-phone-card {
    background: #ffffff;
    border: 2px solid var(--cch-slate-200);
    border-radius: 20px;
    padding: 14px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.cch-phone-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    color: var(--cch-indigo);
    background: var(--cch-indigo-light);
    padding: 3px 8px;
    border-radius: 999px;
    margin-bottom: 6px;
}

.cch-phone-question {
    font-size: 18px;
    font-weight: 900;
    color: var(--cch-slate-800);
    margin: 6px 0 12px;
}

.cch-phone-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cch-phone-opt {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 12px;
    border: 2px solid var(--cch-slate-200);
    font-size: 13px;
    font-weight: 800;
    background: #fff;
}

.cch-phone-opt.is-correct {
    border-color: var(--cch-green);
    background: var(--cch-green-light);
    color: #2e7d32;
}

.cch-phone-feedback {
    background: #dcfce7;
    border-radius: 12px;
    padding: 8px 10px;
    font-size: 11px;
    font-weight: 800;
    color: #15803d;
    text-align: center;
}

/* Floating Badges */
.cch-badge-float {
    position: absolute;
    background: #ffffff;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 900;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 10;
}

.cch-badge-xp {
    top: 30px;
    left: -48px;
    border: 2px solid #fef08a;
    color: #d97706;
    transform: rotate(-6deg);
}

.cch-badge-streak {
    bottom: 120px;
    right: -42px;
    border: 2px solid #fed7aa;
    color: #ea580c;
    transform: rotate(4deg);
}

.cch-badge-stars {
    bottom: 35px;
    left: -35px;
    border: 2px solid #e2e8f0;
    color: #eab308;
    transform: rotate(-3deg);
}

/* Section Headings */
.cch-section {
    padding: 28px 0;
}

.cch-section-head {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 4px;
}

@media (min-width: 640px) {
    .cch-section-head {
        flex-direction: row;
        align-items: flex-end;
    }
}

.cch-section-title {
    font-size: 22px;
    font-weight: 900;
    color: var(--cch-slate-800);
    margin: 0;
}

@media (min-width: 640px) {
    .cch-section-title {
        font-size: 26px;
    }
}

.cch-section-sub {
    font-size: 13px;
    font-weight: 600;
    color: var(--cch-slate-400);
}

/* Grid Layouts */
.cch-grid-4 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 768px) {
    .cch-grid-4 {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

@media (min-width: 1024px) {
    .cch-grid-4 {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }
}

.cch-grid-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

@media (min-width: 640px) {
    .cch-grid-3 {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

/* Cards (Standard Modern Style) */
.cch-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: var(--cch-radius-lg);
    border: 2px solid var(--cch-slate-200);
    border-bottom: 4px solid var(--cch-slate-200);
    overflow: hidden;
    text-decoration: none !important;
    transition: transform 0.15s ease, border-color 0.15s ease, border-bottom-color 0.15s ease, box-shadow 0.15s ease;
    user-select: none;
}

.cch-card:hover {
    border-color: #c4b5fd;
    border-bottom-color: #a78bfa;
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(124, 58, 237, 0.08);
}

.cch-card-art {
    position: relative;
    aspect-ratio: 16 / 10;
    background: #f1f5f9;
    overflow: hidden;
}

.cch-card-art svg {
    width: 100%;
    height: 100%;
    display: block;
}

.cch-card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 16px;
    font-weight: 900;
    border-bottom: 3px solid rgba(0, 0, 0, 0.25);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

.cch-card-body {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.cch-card-title {
    font-size: 15px;
    font-weight: 900;
    color: var(--cch-slate-800);
    line-height: 1.25;
    transition: color 0.15s ease;
}

.cch-card:hover .cch-card-title {
    color: var(--cch-violet);
}

.cch-card-desc {
    font-size: 12px;
    color: var(--cch-slate-500);
    line-height: 1.45;
}

.cch-pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.cch-pill {
    font-size: 10px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 999px;
    line-height: 1.3;
}

.cch-pill-slate { background: #f1f5f9; color: #475569; }
.cch-pill-green { background: #dcfce7; color: #15803d; }
.cch-pill-sky   { background: #e0f2fe; color: #0369a1; }
.cch-pill-amber { background: #fef3c7; color: #b45309; }
.cch-pill-indigo{ background: #e0e7ff; color: #4338ca; }
.cch-pill-orange{ background: #ffedd5; color: #c2410c; }

/* Tool Card Action Link */
.cch-tool-action {
    margin-top: auto;
    padding-top: 8px;
    font-size: 12px;
    font-weight: 900;
    color: var(--cch-violet);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Feature Callout Banners */
.cch-banner-box {
    display: flex;
    align-items: center;
    gap: 16px;
    border-radius: var(--cch-radius-lg);
    padding: 16px 20px;
    border: 2px solid #bae6fd;
    border-bottom: 4px solid #7dd3fc;
    background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 100%);
    text-decoration: none !important;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.cch-banner-box:hover {
    border-color: #38bdf8;
    transform: translateY(-2px);
}

.cch-banner-icon {
    font-size: 36px;
    flex-shrink: 0;
}

.cch-banner-content {
    flex: 1;
    min-width: 0;
}

.cch-banner-kicker {
    display: block;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #0284c7;
}

.cch-banner-title {
    display: block;
    font-size: 16px;
    font-weight: 900;
    color: var(--cch-slate-800);
    line-height: 1.3;
    margin-top: 2px;
}

.cch-banner-desc {
    display: block;
    font-size: 12px;
    color: var(--cch-slate-500);
    line-height: 1.5;
    margin-top: 4px;
}

.cch-banner-cta {
    display: none;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 900;
    color: #0369a1;
    flex-shrink: 0;
}

@media (min-width: 640px) {
    .cch-banner-cta {
        display: flex;
    }
}

/* Teacher Banner */
.cch-teacher-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    border-radius: var(--cch-radius-lg);
    padding: 16px 20px;
    border: 2px solid #ede9fe;
    border-bottom: 4px solid #c4b5fd;
    background: linear-gradient(135deg, #faf5ff 0%, #ffffff 100%);
    text-decoration: none !important;
    transition: all 0.15s ease;
}

.cch-teacher-banner:hover {
    border-color: #a78bfa;
    transform: translateY(-2px);
}

/* Exam Season Card (Indigo/Violet/Fuchsia gradient) */
.cch-exam-banner {
    position: relative;
    overflow: hidden;
    border-radius: var(--cch-radius-xl);
    padding: 24px;
    border-bottom: 6px solid #1e1b4b;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #c026d3 100%);
    color: #ffffff;
    text-decoration: none !important;
    display: block;
}

@media (min-width: 640px) {
    .cch-exam-banner {
        padding: 32px;
    }
}

.cch-exam-bg-art {
    position: absolute;
    right: -10px;
    top: -20px;
    font-size: 110px;
    opacity: 0.22;
    user-select: none;
    pointer-events: none;
}

.cch-exam-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (min-width: 640px) {
    .cch-exam-inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.cch-exam-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 900;
    color: #fff;
}

.cch-exam-title {
    margin-top: 8px;
    font-size: 20px;
    font-weight: 900;
    line-height: 1.25;
    color: #fff;
}

@media (min-width: 640px) {
    .cch-exam-title {
        font-size: 24px;
    }
}

.cch-exam-desc {
    margin-top: 4px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
}

.cch-exam-btn {
    align-self: flex-start;
    background: #ffffff;
    color: var(--cch-indigo) !important;
    border-radius: 14px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

@media (min-width: 640px) {
    .cch-exam-btn {
        align-self: center;
    }
}

/* FAQ Accordion */
.cch-faq-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cch-faq-item {
    background: #ffffff;
    border-radius: 18px;
    border: 2px solid var(--cch-slate-200);
    padding: 14px 18px;
    transition: border-color 0.15s ease;
}

.cch-faq-item:hover {
    border-color: #cbd5e1;
}

.cch-faq-q {
    font-size: 15px;
    font-weight: 900;
    color: var(--cch-slate-800);
    margin: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cch-faq-q span {
    color: var(--cch-slate-400);
    font-size: 20px;
    transition: transform 0.2s ease;
}

.cch-faq-item.is-open .cch-faq-q span {
    transform: rotate(45deg);
}

.cch-faq-a {
    margin-top: 8px;
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--cch-slate-500);
}

/* Bottom Stats & Final CTA */
.cch-final-box {
    background: #ffffff;
    border-radius: var(--cch-radius-xl);
    border: 2px solid var(--cch-slate-200);
    border-bottom: 5px solid var(--cch-slate-200);
    padding: 32px 20px;
    text-align: center;
    margin: 20px 0 40px;
}

@media (min-width: 640px) {
    .cch-final-box {
        padding: 44px 32px;
    }
}

.cch-final-box h3 {
    font-size: 20px;
    font-weight: 900;
    color: var(--cch-slate-800);
    margin: 0;
}

.cch-stats-row {
    display: flex;
    justify-content: center;
    gap: 28px;
    margin: 24px 0 28px;
}

@media (min-width: 640px) {
    .cch-stats-row {
        gap: 56px;
    }
}

.cch-stat-num {
    font-size: 28px;
    font-weight: 900;
    color: var(--cch-violet);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

@media (min-width: 640px) {
    .cch-stat-num {
        font-size: 34px;
    }
}

.cch-stat-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--cch-slate-500);
    margin-top: 4px;
}

/* Footer */
.cch-footer {
    background: #ffffff;
    border-top: 1px solid var(--cch-slate-200);
    padding: 40px 0 24px;
}

.cch-footer-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--cch-slate-100);
}

@media (min-width: 768px) {
    .cch-footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.cch-footer-col h4 {
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--cch-slate-400);
    margin: 0 0 12px;
}

.cch-footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cch-footer-col a {
    color: var(--cch-slate-500);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    transition: color 0.15s ease;
}

.cch-footer-col a:hover {
    color: var(--cch-violet);
}

.cch-footer-bottom {
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px;
    color: var(--cch-slate-400);
}

@media (min-width: 640px) {
    .cch-footer-bottom {
        flex-direction: row;
    }
}
