/* ============================================================
   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;
    min-width: 0;
}

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

.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;
}

/* ── Live Visitor Counter stat ───────────────────────────────── */
.hero-stat--live {
    position: relative;
}

.hero-stat--live strong {
    font-size: 1.4rem;
    background: linear-gradient(135deg, #e2b714 0%, #f5c842 50%, #e2b714 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 8px rgba(226,183,20,0.4));
    animation: counterGlow 3s ease-in-out infinite alternate;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
}

.hero-stat--live span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-muted);
    font-weight: 600;
}

.hero-stat--live span::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 6px #22c55e;
    animation: livePulse 1.6s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes counterGlow {
    0%   { filter: drop-shadow(0 0 6px rgba(226,183,20,0.35)); }
    100% { filter: drop-shadow(0 0 14px rgba(226,183,20,0.65)); }
}

@keyframes livePulse {
    0%, 100% { opacity: 1;   transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(0.75); }
}

.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);
}

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

.hero-icon-pill:hover {
    background: var(--bg-subtle);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* ── 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;
}
/* ============================================================
   IMAGE TICKER — Infinite scrolling images
   ============================================================ */
.ticker-container {
    width: 100%;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.01);
    padding: 2.5rem 0;
    margin: 1.5rem 0 2.5rem;
    position: relative;
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.ticker-wrapper {
    display: flex;
    gap: 4rem;
    width: max-content;
    animation: tickerMove 40s linear infinite;
}

.ticker-wrapper:hover {
    animation-play-state: paused;
}

.ticker-item {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ticker-item img {
    height: 320px;
    width: auto;
    border-radius: var(--r-lg);
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.1);
    transition: all var(--t-base);
    filter: grayscale(10%);
}

.ticker-item img:hover {
    transform: scale(1.03) translateY(-8px);
    filter: grayscale(0%);
    border-color: var(--primary);
    box-shadow: 0 20px 50px rgba(79,70,229,0.4);
}

@keyframes tickerMove {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@media (max-width: 768px) {
    .ticker-item img {
        height: 220px;
    }
    .ticker-container {
        padding: 2rem 0;
    }
    .ticker-wrapper {
        gap: 2rem;
    }
}
