/* ============================================================
   HOMEPAGE.CSS — Hero & Homepage-Specific Styles
   Supplements style.css for the index.html homepage
   ============================================================ */

/* ── Hero Section ────────────────────────────────────────── */
.main-header {
    background: var(--grad-hero);
    border-radius: var(--r-xl);
    padding: 3rem 3.5rem 2rem;
    margin-bottom: 1.75rem;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

/* ── Two-Column Hero Layout ─────────────────────────────── */
.hero-layout {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 2rem;
    margin-bottom: 0;
}

.hero-content {
    min-width: 0; /* prevent overflow */
}

.hero-image-col {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hero-image-wrap {
    position: relative;
    width: 340px;
    max-width: 100%;
}

.hero-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 12px 32px rgba(79,70,229,0.18));
    animation: heroFloat 6s ease-in-out infinite;
    border-radius: var(--r-lg);
}

@keyframes heroFloat {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-10px); }
}

/* Decorative orbs */
.main-header::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(79,70,229,0.10) 0%, transparent 65%);
    pointer-events: none;
}

.main-header::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: 20%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(8,145,178,0.08) 0%, transparent 65%);
    pointer-events: none;
}

/* Badge/Pill above heading */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(79,70,229,0.10);
    color: var(--primary-dark);
    border: 1px solid rgba(79,70,229,0.25);
    border-radius: var(--r-full);
    padding: 0.35rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 1.25rem;
}

/* Hero Heading */
.main-header h1 {
    font-size: clamp(1.75rem, 3.5vw, 2.8rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1.15;
    color: var(--text);
    margin-bottom: 0.85rem;
    /* Override style.css inline removal */
    background: none !important;
    -webkit-text-fill-color: var(--text) !important;
    text-transform: none !important;
}

.main-header h1 span {
    background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 50%, #0891B2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent !important;
    background-clip: text;
}

/* Hero Subtext */
.main-header > p {
    color: var(--text-body);
    font-size: 1.05rem;
    max-width: 580px;
    line-height: 1.7;
    margin-bottom: 1.75rem;
    font-weight: 400;
}

/* CTA Buttons Row */
.hero-cta-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.hero-cta-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    background: var(--grad-primary);
    color: #fff !important;
    text-decoration: none;
    border-radius: var(--r-full);
    font-weight: 700;
    font-size: 0.95rem;
    transition: all var(--t-base);
    box-shadow: var(--shadow-coral);
    letter-spacing: 0.01em;
}

.hero-cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(79,70,229,0.40);
}

.hero-cta-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.85rem 1.75rem;
    background: transparent;
    color: var(--text) !important;
    text-decoration: none;
    border-radius: var(--r-full);
    font-weight: 600;
    font-size: 0.95rem;
    border: 1.5px solid var(--border);
    transition: all var(--t-base);
}

.hero-cta-secondary:hover {
    border-color: var(--accent);
    color: var(--accent) !important;
    background: rgba(8,145,178,0.06);
    transform: translateY(-2px);
}

/* Stats Row */
.hero-stats-row {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.hero-stat strong {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.02em;
    line-height: 1;
}

.hero-stat span {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* ── Hero Icons Row — Centered & Wrapping ───────────────── */
.hero-icons-row {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

/* ── Quick Access Strip ──────────────────────────────────── */
.quick-strip {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0;
}

.quick-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.85rem;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--r-full);
    color: var(--text-body);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all var(--t-fast);
}

.quick-pill:hover {
    background: var(--bg-subtle);
    border-color: var(--primary);
    color: var(--primary);
}

/* ── Section Headings Override ───────────────────────────── */
.hero-tests h2.hero-title,
.articles-section h2,
.faq-section h2 {
    color: var(--text) !important;
}

/* ── Language Cards Grid Layout ─────────────────────────── */
.lang-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

/* ── Info Highlight Box ──────────────────────────────────── */
.info-highlight {
    background: linear-gradient(135deg, rgba(79,70,229,0.05) 0%, rgba(8,145,178,0.05) 100%);
    border: 1px solid rgba(79,70,229,0.15);
    border-left: 4px solid var(--primary);
    border-radius: var(--r-md);
    padding: 1.5rem 2rem;
}

/* ── Mobile Responsive ───────────────────────────────────── */
@media (max-width: 768px) {
    .main-header {
        padding: 2rem 1.5rem 1.75rem;
        border-radius: var(--r-lg);
    }

    /* Stack hero to single column on mobile */
    .hero-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Show image below text on mobile, smaller */
    .hero-image-col {
        display: flex;
        justify-content: center;
        order: -1; /* image on top on mobile */
    }

    .hero-image-wrap {
        width: 220px;
    }

    .hero-badge { font-size: 0.75rem; }
    .main-header h1 { font-size: clamp(1.5rem, 5vw, 2rem); }
    .main-header > p { font-size: 0.95rem; margin-bottom: 1.25rem; }

    .hero-cta-row { gap: 0.75rem; }
    .hero-cta-primary, .hero-cta-secondary { padding: 0.7rem 1.5rem; font-size: 0.875rem; }

    .hero-stats-row { gap: 1.25rem; }
    .hero-stat strong { font-size: 1.05rem; }

    .hero-icons-row { gap: 0.5rem; }
    .hero-icon-pill { font-size: 0.78rem; padding: 0.4rem 0.85rem; }
}

/* Tablet refinements */
@media (max-width: 1024px) {
    .hero-layout {
        gap: 1.5rem;
    }
    .hero-image-wrap {
        width: 280px;
    }
}

@media (max-width: 768px) {
    .main-header {
        padding: 2rem 1.25rem 1.5rem;
        border-radius: var(--r-lg);
        margin-bottom: 1.25rem;
    }

    .hero-content {
        text-align: center !important;
    }

    .hero-badge {
        margin-bottom: 1rem;
    }

    .hero-cta-row {
        justify-content: center;
        margin-bottom: 1.5rem;
    }

    .hero-stats-row {
        justify-content: center;
        gap: 1.5rem;
    }

    .hero-icons-row {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-stats-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    
    .hero-stat {
        align-items: center;
    }
}

@media (max-width: 480px) {
    .hero-cta-row { flex-direction: column; align-items: stretch; }
    .hero-cta-primary, .hero-cta-secondary { text-align: center; justify-content: center; }
    .hero-stats-row { gap: 1rem; }
    .hero-icons-row { justify-content: flex-start; }
}

/* ============================================================
   INNER PAGE HERO — centred page banners for all sub-pages
   ============================================================ */
.app-container > main > section.main-header:not(#typing-section),
article:first-child > section.main-header {
    text-align: center !important;
    background: var(--grad-hero) !important;
    padding: 2.5rem 2rem !important;
    display: block;
}

.app-container > main > section.main-header:not(#typing-section) h1 {
    text-align: center;
    font-size: clamp(1.6rem, 3vw, 2.4rem) !important;
    margin-bottom: 0.75rem;
}

.app-container > main > section.main-header:not(#typing-section) p {
    text-align: center;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ── Page Hero Banner (reusable across inner pages) ──────── */
.page-hero {
    text-align: center;
    background: var(--grad-hero);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 2.5rem 2rem;
    margin-bottom: 1.75rem;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 240px; height: 240px;
    background: radial-gradient(circle, rgba(79,70,229,0.10) 0%, transparent 70%);
    pointer-events: none;
}

.page-hero .page-hero-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(79,70,229,0.10);
    color: var(--primary-dark);
    border: 1px solid rgba(79,70,229,0.22);
    border-radius: var(--r-full);
    padding: 0.3rem 0.9rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    margin-bottom: 1rem;
}

.page-hero h1 {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    color: var(--text);
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.page-hero h1 span {
    background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 50%, #0891B2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-hero p {
    color: var(--text-body);
    font-size: 1rem;
    max-width: 580px;
    margin: 0 auto;
    line-height: 1.7;
}
