/* ================================================================
   HoaViệt — Trung tâm tiếng Trung | Stylesheet
   ================================================================
   MỤC LỤC:
   1.  CSS Variables (thay đổi màu sắc, font ở đây)
   2.  Reset & Base
   3.  Typography
   4.  Buttons
   5.  Badges & Tags
   6.  Header / Navigation
   7.  Hero Section
   8.  Stats Bar
   9.  Section Common
   10. Features
   11. Courses
   12. Process
   13. Teachers
   14. Testimonials
   15. CTA Banner
   16. Contact
   17. Footer
   18. Back to Top
   19. Animations
   20. Responsive (Mobile)
   ================================================================ */


/* =================== 1. CSS VARIABLES =================== */
:root {
    /* Primary colors — đỏ Trung Hoa */
    --color-primary: #B91C1C;
    --color-primary-dark: #991B1B;
    --color-primary-light: #DC2626;
    --color-primary-darker: #7F1D1D;

    /* Accent — vàng đồng */
    --color-accent: #C9A227;
    --color-accent-light: #E0B84D;
    --color-accent-dark: #A88720;

    /* Neutrals */
    --color-dark: #1A1A2E;
    --color-dark-2: #16213E;
    --color-text: #2D3436;
    --color-text-light: #636E72;
    --color-text-lighter: #9DA5A9;
    --color-bg: #FFFFFF;
    --color-bg-alt: #F8F9FA;
    --color-bg-gray: #F1F3F5;
    --color-border: #E9ECEF;
    --color-white: #FFFFFF;

    /* Feature icon backgrounds */
    --icon-red: #FEE2E2;
    --icon-red-fg: #DC2626;
    --icon-gold: #FEF3C7;
    --icon-gold-fg: #D97706;
    --icon-blue: #DBEAFE;
    --icon-blue-fg: #2563EB;
    --icon-green: #D1FAE5;
    --icon-green-fg: #059669;
    --icon-purple: #EDE9FE;
    --icon-purple-fg: #7C3AED;
    --icon-teal: #CCFBF1;
    --icon-teal-fg: #0D9488;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.10);
    --shadow-xl: 0 24px 56px rgba(0, 0, 0, 0.14);
    --shadow-red: 0 8px 24px rgba(185, 28, 28, 0.25);

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;

    /* Layout */
    --max-width: 1200px;
    --header-height: 76px;
}


/* =================== 2. RESET & BASE =================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Be Vietnam Pro', system-ui, -apple-system, sans-serif;
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, svg {
    display: block;
    max-width: 100%;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

input, textarea, select, button {
    font-family: inherit;
    font-size: inherit;
    border: none;
    outline: none;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.text-gold {
    color: var(--color-accent);
}


/* =================== 3. TYPOGRAPHY =================== */
h1, h2, h3, h4 {
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -0.02em;
}


/* =================== 4. BUTTONS =================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    border: 2px solid transparent;
    line-height: 1.4;
}

.btn--primary {
    background: var(--color-primary);
    color: var(--color-white);
    box-shadow: var(--shadow-red);
}
.btn--primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(185, 28, 28, 0.35);
}

.btn--ghost {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-white);
    border-color: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}
.btn--ghost:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.btn--white {
    background: var(--color-white);
    color: var(--color-primary);
    box-shadow: var(--shadow-lg);
}
.btn--white:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn--sm { padding: 9px 18px; font-size: 0.875rem; }
.btn--lg { padding: 15px 32px; font-size: 1rem; }
.btn--block { width: 100%; }


/* =================== 5. BADGES & TAGS =================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.badge--light {
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.badge--primary {
    background: var(--icon-red);
    color: var(--icon-red-fg);
}

.badge--gold {
    background: rgba(201, 162, 39, 0.15);
    color: var(--color-accent-light);
    border: 1px solid rgba(201, 162, 39, 0.3);
}

.badge__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ADE80;
    box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.3);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.3); }
    50% { box-shadow: 0 0 0 6px rgba(74, 222, 128, 0.1); }
}

.tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    background: var(--color-bg-gray);
    color: var(--color-text-light);
}


/* =================== 6. HEADER / NAVIGATION =================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    z-index: 1000;
    transition: var(--transition);
    border-bottom: 1px solid transparent;
}

.header.scrolled {
    box-shadow: var(--shadow-md);
    border-bottom-color: var(--color-border);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo__icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: var(--color-white);
    border-radius: 12px;
    font-family: 'Noto Serif SC', serif;
    font-size: 1.5rem;
    font-weight: 700;
    box-shadow: var(--shadow-red);
}

.logo__text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo__name {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--color-dark);
    letter-spacing: -0.02em;
}

.logo__sub {
    font-size: 0.6875rem;
    color: var(--color-text-light);
    font-weight: 500;
}

/* Desktop Nav */
.nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav__link {
    padding: 8px 14px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text);
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    position: relative;
}

.nav__link:hover {
    color: var(--color-primary);
    background: var(--icon-red);
}

.nav__link.active {
    color: var(--color-primary);
}

/* Header Actions */
.header__actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Mobile Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2.5px;
    background: var(--color-dark);
    border-radius: 2px;
    transition: var(--transition);
    margin: 0 auto;
}

.nav-toggle.active span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}
.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}


/* =================== 7. HERO SECTION =================== */
.hero {
    position: relative;
    padding-top: calc(var(--header-height) + 60px);
    padding-bottom: 0;
    overflow: hidden;
}

.hero__bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(185, 28, 28, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(201, 162, 39, 0.15) 0%, transparent 50%),
        linear-gradient(135deg, #0F0F1E 0%, #1A1A2E 30%, #2D1517 65%, #4A0E0E 100%);
}

.hero__bg::before {
    content: '华';
    position: absolute;
    right: -5%;
    top: 10%;
    font-family: 'Noto Serif SC', serif;
    font-size: 40rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.025);
    line-height: 1;
    pointer-events: none;
}

.hero__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(45deg, transparent 0, transparent 40px, rgba(255,255,255,0.008) 40px, rgba(255,255,255,0.008) 41px);
}

.hero__inner {
    position: relative;
    z-index: 2;
    padding-bottom: 120px;
}

.hero__content {
    max-width: 720px;
}

.hero__title {
    font-size: clamp(2.2rem, 5.5vw, 3.75rem);
    font-weight: 900;
    color: var(--color-white);
    line-height: 1.15;
    margin: 24px 0;
    letter-spacing: -0.03em;
}

.hero__subtitle {
    font-size: clamp(1rem, 2vw, 1.125rem);
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    max-width: 580px;
    margin-bottom: 36px;
}

.hero__actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.hero__trust {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

.stars {
    display: flex;
    gap: 2px;
    color: var(--color-accent);
}
.stars--gold { color: var(--color-accent-light); }


/* =================== 8. STATS BAR =================== */
.stats-bar {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    box-shadow: var(--shadow-xl);
    margin-top: -80px;
}

.stat-card {
    text-align: center;
    position: relative;
}

.stat-card:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 48px;
    background: var(--color-border);
}

.stat-card__number {
    display: inline;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1;
    letter-spacing: -0.03em;
}

.stat-card__suffix {
    display: inline;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1;
}

.stat-card__label {
    margin-top: 8px;
    font-size: 0.875rem;
    color: var(--color-text-light);
    font-weight: 500;
}


/* =================== 9. SECTION COMMON =================== */
.section {
    padding: 100px 0;
}

.section--light { background: var(--color-bg); }
.section--gray { background: var(--color-bg-alt); }
.section--dark {
    background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-dark-2) 100%);
    position: relative;
    overflow: hidden;
}

.section--dark::before {
    content: '学';
    position: absolute;
    right: -3%;
    top: 20%;
    font-family: 'Noto Serif SC', serif;
    font-size: 28rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.015);
    line-height: 1;
    pointer-events: none;
}

.section__header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 64px;
}

.section__title {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 800;
    color: var(--color-dark);
    margin: 16px 0 12px;
}

.section__title--light { color: var(--color-white); }

.section__desc {
    font-size: 1.0625rem;
    color: var(--color-text-light);
    line-height: 1.7;
}

.section__desc--light { color: rgba(255, 255, 255, 0.65); }


/* =================== 10. FEATURES =================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.feature-card__icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    transition: var(--transition);
}

.feature-card__icon--red    { background: var(--icon-red);    color: var(--icon-red-fg); }
.feature-card__icon--gold   { background: var(--icon-gold);   color: var(--icon-gold-fg); }
.feature-card__icon--blue   { background: var(--icon-blue);   color: var(--icon-blue-fg); }
.feature-card__icon--green  { background: var(--icon-green);  color: var(--icon-green-fg); }
.feature-card__icon--purple { background: var(--icon-purple); color: var(--icon-purple-fg); }
.feature-card__icon--teal   { background: var(--icon-teal);   color: var(--icon-teal-fg); }

.feature-card:hover .feature-card__icon {
    transform: scale(1.1) rotate(-5deg);
}

.feature-card__title {
    font-size: 1.1875rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 10px;
}

.feature-card__desc {
    font-size: 0.9375rem;
    color: var(--color-text-light);
    line-height: 1.65;
}


/* =================== 11. COURSES =================== */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.course-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.course-card--featured {
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--color-primary);
}

.course-card__header {
    padding: 28px 24px;
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.course-card__header--1 { background: linear-gradient(135deg, #B91C1C 0%, #7F1D1D 100%); }
.course-card__header--2 { background: linear-gradient(135deg, #1A1A2E 0%, #16213E 100%); }
.course-card__header--3 { background: linear-gradient(135deg, #C9A227 0%, #A88720 100%); }
.course-card__header--4 { background: linear-gradient(135deg, #059669 0%, #047857 100%); }

.course-card__tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    color: var(--color-white);
    backdrop-filter: blur(10px);
}

.course-card__icon {
    color: rgba(255, 255, 255, 0.9);
}

.course-card__body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.course-card__title {
    font-size: 1.1875rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 10px;
}

.course-card__desc {
    font-size: 0.875rem;
    color: var(--color-text-light);
    line-height: 1.6;
    margin-bottom: 16px;
}

.course-card__list {
    margin-bottom: 20px;
    flex: 1;
}

.course-card__list li {
    font-size: 0.8125rem;
    color: var(--color-text-light);
    padding: 5px 0;
    padding-left: 22px;
    position: relative;
}

.course-card__list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    width: 14px;
    height: 2px;
    background: var(--color-primary);
    border-radius: 1px;
}

.course-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
}

.course-card__price {
    display: flex;
    flex-direction: column;
}

.course-card__price-old {
    font-size: 0.75rem;
    color: var(--color-text-lighter);
    text-decoration: line-through;
}

.course-card__price-now {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--color-primary);
}


/* =================== 12. PROCESS =================== */
.process-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    position: relative;
}

.process-grid::before {
    content: '';
    position: absolute;
    top: 28px;
    left: 12.5%;
    right: 12.5%;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-accent) 100%);
    opacity: 0.2;
}

.process-step {
    text-align: center;
    position: relative;
    z-index: 2;
}

.process-step__number {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-white);
    border: 3px solid var(--color-primary);
    border-radius: 50%;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--color-primary);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.process-step:hover .process-step__number {
    background: var(--color-primary);
    color: var(--color-white);
    transform: scale(1.1);
}

.process-step__title {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 10px;
}

.process-step__desc {
    font-size: 0.875rem;
    color: var(--color-text-light);
    line-height: 1.6;
    max-width: 240px;
    margin: 0 auto;
}


/* =================== 13. TEACHERS =================== */
.teachers-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.teacher-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 36px 24px;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.teacher-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.teacher-card__avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-family: 'Noto Serif SC', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-white);
    box-shadow: var(--shadow-md);
}

.teacher-card__avatar--1 { background: linear-gradient(135deg, #B91C1C, #7F1D1D); }
.teacher-card__avatar--2 { background: linear-gradient(135deg, #2563EB, #1E40AF); }
.teacher-card__avatar--3 { background: linear-gradient(135deg, #7C3AED, #5B21B6); }
.teacher-card__avatar--4 { background: linear-gradient(135deg, #059669, #047857); }

.teacher-card__name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 4px;
}

.teacher-card__role {
    font-size: 0.8125rem;
    color: var(--color-text-light);
    margin-bottom: 14px;
    line-height: 1.5;
}

.teacher-card__tags {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 14px;
}

.teacher-card__bio {
    font-size: 0.8125rem;
    color: var(--color-text-light);
    line-height: 1.6;
}


/* =================== 14. TESTIMONIALS =================== */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    position: relative;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.testimonial-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-4px);
    border-color: rgba(201, 162, 39, 0.3);
}

.testimonial-card__quote {
    position: absolute;
    top: -12px;
    right: 24px;
    font-size: 5rem;
    font-family: Georgia, serif;
    color: rgba(201, 162, 39, 0.2);
    line-height: 1;
}

.testimonial-card .stars {
    margin-bottom: 16px;
}

.testimonial-card__text {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
    margin-bottom: 24px;
}

.testimonial-card__author {
    display: flex;
    align-items: center;
    gap: 14px;
}

.testimonial-card__avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: var(--color-white);
    font-weight: 700;
    font-size: 1.125rem;
}

.testimonial-card__avatar--2 { background: linear-gradient(135deg, #2563EB, #1E40AF); }
.testimonial-card__avatar--3 { background: linear-gradient(135deg, #059669, #047857); }

.testimonial-card__name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-white);
}

.testimonial-card__role {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}


/* =================== 15. CTA BANNER =================== */
.cta-banner {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 50%, var(--color-primary-darker) 100%);
    padding: 72px 0;
    position: relative;
    overflow: hidden;
}

.cta-banner::before {
    content: '汉';
    position: absolute;
    right: -2%;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Noto Serif SC', serif;
    font-size: 16rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.04);
    line-height: 1;
    pointer-events: none;
}

.cta-banner__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    position: relative;
    z-index: 2;
}

.cta-banner__title {
    font-size: clamp(1.5rem, 3vw, 2.125rem);
    font-weight: 800;
    color: var(--color-white);
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}

.cta-banner__desc {
    font-size: 1.0625rem;
    color: rgba(255, 255, 255, 0.8);
}


/* =================== 16. CONTACT =================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 40px;
    align-items: start;
}

/* Contact Info */
.contact-info {
    background: var(--color-dark);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    color: var(--color-white);
    position: relative;
    overflow: hidden;
}

.contact-info::before {
    content: '联';
    position: absolute;
    right: -10%;
    bottom: -20%;
    font-family: 'Noto Serif SC', serif;
    font-size: 12rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.025);
    line-height: 1;
    pointer-events: none;
}

.contact-info__title {
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 28px;
    position: relative;
}

.contact-info__item {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    position: relative;
}

.contact-info__icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(185, 28, 28, 0.2);
    color: var(--color-primary-light);
    border-radius: var(--radius-sm);
}

.contact-info__label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}

.contact-info__value {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.contact-info__social {
    display: flex;
    gap: 12px;
    margin-top: 32px;
    position: relative;
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.social-link:hover {
    background: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-3px);
}

.social-link--sm {
    width: 36px;
    height: 36px;
}

/* Contact Form */
.contact-form {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    box-shadow: var(--shadow-md);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-dark);
    margin-bottom: 8px;
}

.req {
    color: var(--color-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    color: var(--color-text);
    transition: var(--transition-fast);
    background: var(--color-bg-alt);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--color-primary);
    background: var(--color-white);
    box-shadow: 0 0 0 4px rgba(185, 28, 28, 0.08);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--color-text-lighter);
}

.form-group textarea {
    resize: vertical;
}

.form-note {
    font-size: 0.75rem;
    color: var(--color-text-lighter);
    text-align: center;
    margin-top: 16px;
    line-height: 1.5;
}


/* =================== 17. FOOTER =================== */
.footer {
    background: var(--color-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 72px 0 0;
}

.footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer__col--brand {
    max-width: 320px;
}

.logo--footer .logo__name { color: var(--color-white); }
.logo--footer .logo__sub { color: rgba(255, 255, 255, 0.5); }

.footer__desc {
    font-size: 0.875rem;
    line-height: 1.7;
    margin: 20px 0;
    color: rgba(255, 255, 255, 0.5);
}

.footer__title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 20px;
}

.footer__links li {
    margin-bottom: 10px;
}

.footer__links a {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
    transition: var(--transition-fast);
}

.footer__links a:hover {
    color: var(--color-accent);
    padding-left: 4px;
}

.footer__contact li {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 10px;
    line-height: 1.5;
}

.footer__social {
    display: flex;
    gap: 10px;
}

.footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.4);
    flex-wrap: wrap;
    gap: 8px;
}


/* =================== 18. BACK TO TOP =================== */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary);
    color: var(--color-white);
    border-radius: 50%;
    box-shadow: var(--shadow-red);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--color-primary-dark);
    transform: translateY(-4px);
}


/* =================== 19. ANIMATIONS =================== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Stagger delay */
.features-grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.features-grid .reveal:nth-child(3) { transition-delay: 0.2s; }
.features-grid .reveal:nth-child(4) { transition-delay: 0.3s; }
.features-grid .reveal:nth-child(5) { transition-delay: 0.4s; }
.features-grid .reveal:nth-child(6) { transition-delay: 0.5s; }

.courses-grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.courses-grid .reveal:nth-child(3) { transition-delay: 0.2s; }
.courses-grid .reveal:nth-child(4) { transition-delay: 0.3s; }

.process-grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.process-grid .reveal:nth-child(3) { transition-delay: 0.2s; }
.process-grid .reveal:nth-child(4) { transition-delay: 0.3s; }

.teachers-grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.teachers-grid .reveal:nth-child(3) { transition-delay: 0.2s; }
.teachers-grid .reveal:nth-child(4) { transition-delay: 0.3s; }

.testimonials-grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.testimonials-grid .reveal:nth-child(3) { transition-delay: 0.2s; }


/* =================== 20. RESPONSIVE =================== */

/* Tablet (<= 992px) */
@media (max-width: 992px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .courses-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .teachers-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
        max-width: 640px;
        margin: 0 auto;
    }

    .process-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }

    .process-grid::before { display: none; }

    .footer__grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .footer__col--brand {
        grid-column: 1 / -1;
        max-width: 100%;
    }

    .cta-banner__inner {
        flex-direction: column;
        text-align: center;
    }

    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px 16px;
    }

    .stat-card:nth-child(2)::after { display: none; }
    .stat-card:nth-child(4)::after { display: none; }

    .contact-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile (<= 768px) */
@media (max-width: 768px) {
    :root {
        --header-height: 64px;
    }

    /* Show mobile toggle */
    .nav-toggle {
        display: flex;
    }

    /* Hide desktop nav, show mobile */
    .nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--color-white);
        flex-direction: column;
        align-items: stretch;
        padding: 24px;
        gap: 4px;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        box-shadow: var(--shadow-xl);
    }

    .nav.active {
        transform: translateX(0);
    }

    .nav__link {
        padding: 14px 16px;
        font-size: 1rem;
        border-radius: var(--radius-md);
    }

    .nav__link:hover {
        background: var(--color-bg-alt);
    }

    /* Hide CTA in header on mobile (it's in the mobile menu) */
    .header__actions .btn {
        display: none;
    }

    .section {
        padding: 64px 0;
    }

    .section__header {
        margin-bottom: 40px;
    }

    .hero {
        padding-top: calc(var(--header-height) + 40px);
    }

    .hero__inner {
        padding-bottom: 100px;
    }

    .hero__actions {
        flex-direction: column;
        width: 100%;
    }

    .hero__actions .btn {
        width: 100%;
    }

    .hero__trust {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .stats-bar {
        grid-template-columns: 1fr 1fr;
        gap: 24px 12px;
        padding: 28px 20px;
        margin-top: -60px;
    }

    .stat-card__number,
    .stat-card__suffix {
        font-size: 1.875rem;
    }

    .stat-card::after { display: none !important; }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .courses-grid {
        grid-template-columns: 1fr;
    }

    .process-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .teachers-grid {
        grid-template-columns: 1fr;
    }

    .footer__grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer__bottom {
        flex-direction: column;
        text-align: center;
    }

    .contact-form,
    .contact-info {
        padding: 28px 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
    }

    .cta-banner {
        padding: 48px 0;
    }
}

/* Small Mobile (<= 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero__title {
        font-size: 1.875rem;
    }

    .hero__subtitle {
        font-size: 0.9375rem;
    }

    .stats-bar {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 24px 16px;
    }

    .stat-card {
        padding: 12px 0;
        border-bottom: 1px solid var(--color-border);
    }

    .stat-card:last-child {
        border-bottom: none;
    }

    .section__title {
        font-size: 1.5rem;
    }

    .feature-card,
    .course-card__body,
    .teacher-card {
        padding: 24px 20px;
    }

    .logo__sub {
        display: none;
    }

    .logo__icon {
        width: 38px;
        height: 38px;
        font-size: 1.25rem;
    }

    .logo__name {
        font-size: 1.0625rem;
    }
}
