/* ─── Header ─── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(254, 215, 170, 0.36);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
    gap: 22px;
    position: relative;
}
.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
    letter-spacing: 0;
    flex: 0 0 auto;
}
.logo:hover { color: var(--text); }
.logo-mascot {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 14px;
    filter: drop-shadow(0 8px 16px rgba(249, 115, 22, 0.22));
}
.logo-mascot img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.logo-text {
    color: var(--text);
    font-size: 1.75rem;
    font-weight: 900;
    line-height: 1;
}
.logo-domain,
.logo-ia,
.logo-bac {
    color: var(--primary);
}
.header-panel {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 28px;
    flex: 1;
}
.nav {
    display: flex;
    align-items: center;
    gap: 22px;
}
.nav a {
    color: var(--text);
    font-weight: 700;
    font-size: 0.875rem;
    transition: color 0.15s;
    white-space: nowrap;
}
.nav a:hover,
.nav a.nav-link-active {
    color: var(--primary);
}
.nav-link-active {
    position: relative;
}
.nav-link-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -13px;
    height: 3px;
    border-radius: 999px;
    background: var(--primary);
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}
.icon-btn {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text);
    background: var(--surface);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
    cursor: pointer;
    transition: transform 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.icon-btn:hover {
    color: var(--primary);
    border-color: var(--border-warm);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}
.search-glyph {
    width: 18px;
    height: 18px;
    display: block;
    position: relative;
    border: 2px solid currentColor;
    border-radius: 50%;
}
.search-glyph::after {
    content: "";
    position: absolute;
    width: 8px;
    height: 2px;
    right: -7px;
    bottom: -4px;
    border-radius: 999px;
    background: currentColor;
    transform: rotate(45deg);
    transform-origin: left center;
}
.theme-glyph {
    width: 20px;
    height: 20px;
    display: block;
    position: relative;
    border-radius: 50%;
    background: currentColor;
    box-shadow: inset -7px -4px 0 0 var(--surface);
}
:root[data-theme="dark"] .site-header {
    background: rgba(11, 17, 32, 0.86);
    border-bottom-color: rgba(254, 215, 170, 0.16);
}
:root[data-theme="dark"] .theme-glyph {
    width: 18px;
    height: 18px;
    background: var(--primary);
    box-shadow:
        0 -11px 0 -7px currentColor,
        0 11px 0 -7px currentColor,
        11px 0 0 -7px currentColor,
        -11px 0 0 -7px currentColor,
        8px 8px 0 -7px currentColor,
        -8px -8px 0 -7px currentColor,
        8px -8px 0 -7px currentColor,
        -8px 8px 0 -7px currentColor;
}
.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50%;
    cursor: pointer;
    color: var(--text);
}
.nav-toggle span {
    width: 18px;
    height: 2px;
    display: block;
    border-radius: 999px;
    background: currentColor;
}
.nav-toggle span + span {
    margin-top: 4px;
}

.main-content { min-height: calc(100vh - 76px - 280px); }

/* ─── Features (shared) ─── */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card {
    background: var(--surface); padding: 32px; border-radius: var(--radius-lg);
    border: 1px solid var(--border); transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--primary-light); }
.feature-icon { font-size: 2rem; margin-bottom: 16px; }
.feature-card h3 { font-size: 1.125rem; margin-bottom: 8px; font-weight: 700; }
.feature-card p { color: var(--text-muted); font-size: 0.9375rem; line-height: 1.65; }

/* ─── Subjects ─── */
.subjects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.subject-card {
    background: var(--surface); padding: 28px 20px; border-radius: var(--radius-lg);
    border: 1px solid var(--border); text-align: center; transition: all 0.25s;
}
.subject-card-link { text-decoration: none; color: inherit; display: block; }
.subject-card-link:hover { border-color: var(--primary); box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.subject-icon { font-size: 2.25rem; display: block; margin-bottom: 12px; }
.subject-card h3 { font-size: 0.9375rem; font-weight: 600; line-height: 1.4; }

/* ─── Pricing (shared pages) ─── */
.pricing-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; max-width: 840px; margin: 0 auto; }
.pricing-card {
    background: var(--surface); padding: 40px; border-radius: var(--radius-lg);
    border: 1px solid var(--border); position: relative;
}
.pricing-card-featured {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}
.pricing-badge {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--secondary); color: #fff; padding: 5px 18px; border-radius: 999px;
    font-size: 0.75rem; font-weight: 700; white-space: nowrap;
}
.pricing-card h3 { font-size: 1.25rem; margin-bottom: 8px; }
.price { font-size: 2.5rem; font-weight: 800; margin: 16px 0; color: var(--primary); letter-spacing: 0; }
.price span { font-size: 1rem; font-weight: 500; color: var(--text-muted); }
.pricing-save { color: var(--secondary); font-size: 0.875rem; font-weight: 600; margin-bottom: 16px; }
.pricing-features { list-style: none; margin: 24px 0; }
.pricing-features li { padding: 10px 0; border-bottom: 1px solid var(--bg-muted); font-size: 0.9375rem; }
.pricing-features li::before { content: '✓ '; color: var(--secondary); font-weight: 700; }

/* ─── Auth ─── */
.auth-section { padding: 80px 0; }
.auth-card {
    max-width: 440px; margin: 0 auto; background: var(--surface); padding: 40px;
    border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); border: 1px solid var(--border);
}
.auth-card h1 { font-size: 1.5rem; margin-bottom: 24px; text-align: center; }
.auth-switch { text-align: center; margin-top: 20px; font-size: 0.875rem; color: var(--text-muted); }

/* ─── Page header ─── */
.page-header { padding: 56px 0 36px; }
.page-header h1 { font-size: 2.25rem; font-weight: 800; letter-spacing: 0; }

/* ─── Lessons ─── */
.chapter-block { margin-bottom: 40px; }
.chapter-block h2 { font-size: 1.25rem; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 2px solid var(--primary-light); }
.lesson-list { list-style: none; }
.lesson-list li { border-bottom: 1px solid var(--bg-muted); }
.lesson-list a {
    display: flex; align-items: center; gap: 12px; padding: 14px 8px;
    color: var(--text); text-decoration: none; transition: background 0.15s;
}
.lesson-list a:hover { background: var(--bg-muted); border-radius: 8px; }

/* ─── Footer ─── */
.site-footer {
    background:
        radial-gradient(circle at 8% 16%, rgba(249, 115, 22, 0.12), transparent 25%),
        linear-gradient(135deg, #071326 0%, #081B34 52%, #061122 100%);
    color: #E5E7EB;
    padding: 58px 0 30px;
    margin-top: 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.75fr 0.9fr 0.95fr 1.15fr 1.75fr;
    gap: 46px;
    align-items: start;
    margin-bottom: 46px;
}
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #fff;
}
.footer-logo:hover {
    color: #fff;
}
.footer-logo img {
    width: 58px;
    height: 58px;
    border-radius: 15px;
    object-fit: cover;
    filter: drop-shadow(0 10px 18px rgba(249, 115, 22, 0.28));
}
.footer-logo span {
    color: #fff;
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
}
.footer-logo span span {
    color: var(--primary);
}
.footer-brand p {
    max-width: 310px;
    margin-top: 20px;
    color: #F8FAFC;
    font-size: 1rem;
    line-height: 1.8;
}
.footer-socials {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 24px;
}
.footer-socials a {
    display: inline-flex;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    transition: transform 0.2s ease, filter 0.2s ease;
}
.footer-socials a:hover {
    transform: translateY(-2px);
    filter: drop-shadow(0 10px 16px rgba(249, 115, 22, 0.18));
}
.footer-social {
    display: inline-block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}
.footer-social-facebook { background-image: url('../images/home/footer-social-facebook-ai.png'); }
.footer-social-instagram { background-image: url('../images/home/footer-social-instagram-ai.png'); }
.footer-social-tiktok { background-image: url('../images/home/footer-social-tiktok-ai.png'); }
.footer-social-youtube { background-image: url('../images/home/footer-social-youtube-ai.png'); }
.footer-social-send { background-image: url('../images/home/footer-social-send-ai.png'); }
.footer-col h4,
.footer-newsletter h4 {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 900;
    margin-bottom: 18px;
    letter-spacing: 0;
}
.footer-col a {
    display: block;
    color: #F8FAFC;
    font-size: 1rem;
    margin-bottom: 13px;
    transition: color 0.15s, transform 0.15s;
}
.footer-col a:hover { color: var(--primary); }
.footer-company {
    padding-right: 34px;
    border-right: 2px solid var(--primary);
}
.footer-newsletter p {
    max-width: 310px;
    color: #F8FAFC;
    font-size: 0.98rem;
    line-height: 1.75;
}
.newsletter-form {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 310px;
    margin-top: 28px;
    padding: 6px 6px 6px 18px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
}
.newsletter-form input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    color: #fff;
    background: transparent;
    font: inherit;
}
.newsletter-form input::placeholder {
    color: #AAB7CA;
}
.newsletter-form button {
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(135deg, #F97316, #EA580C);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.newsletter-form button span {
    display: block;
    width: 100%;
    height: 100%;
    background-image: url('../images/home/newsletter-send-ai.png');
    background-repeat: no-repeat;
    background-size: 145%;
    background-position: center;
}
.newsletter-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(249, 115, 22, 0.26);
}
.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    color: #CBD5E1;
    font-size: 0.95rem;
}
.footer-bottom strong {
    color: #FF2D20;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.success-icon {
    width: 72px; height: 72px; background: var(--secondary-light); color: var(--secondary);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 2rem; margin: 0 auto 20px; font-weight: 700;
}

/* ─── Responsive ─── */
@media (max-width: 1280px) {
    .footer-grid {
        grid-template-columns: 1.4fr 1fr 1fr;
    }

    .footer-newsletter {
        grid-column: 1 / -1;
        padding-top: 26px;
        border-top: 1px solid rgba(255, 255, 255, 0.14);
    }

    .footer-company {
        padding-right: 0;
        border-right: 0;
    }
}

@media (max-width: 1120px) {
    .header-panel {
        display: none;
        position: absolute;
        top: calc(100% + 10px);
        left: 24px;
        right: 24px;
        align-items: stretch;
        flex-direction: column;
        gap: 20px;
        padding: 22px;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-lg);
    }
    .header-panel.open {
        display: flex;
    }
    .nav {
        align-items: stretch;
        flex-direction: column;
        gap: 6px;
    }
    .nav a {
        padding: 10px 12px;
        border-radius: var(--radius-sm);
    }
    .nav a:hover,
    .nav a.nav-link-active {
        background: var(--primary-light);
    }
    .nav-link-active::after {
        display: none;
    }
    .header-actions {
        flex-wrap: wrap;
    }
    .header-actions .btn {
        flex: 1 1 180px;
    }
    .nav-toggle {
        display: inline-flex;
    }

}
@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 34px;
    }

    .footer-brand,
    .footer-newsletter {
        grid-column: 1 / -1;
    }
}
@media (max-width: 768px) {
    .features-grid { grid-template-columns: 1fr; }
    .pricing-grid { grid-template-columns: 1fr; }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .footer-brand,
    .footer-newsletter {
        grid-column: auto;
    }
    .footer-logo span {
        font-size: 1.7rem;
    }
    .footer-bottom {
        align-items: flex-start;
        flex-direction: column;
    }
    .header-inner {
        min-height: 70px;
    }
    .logo-mascot {
        width: 44px;
        height: 44px;
    }
    .header-panel {
        left: 16px;
        right: 16px;
        padding: 18px;
    }
    .header-actions {
        display: grid;
        grid-template-columns: 44px 44px 1fr;
        gap: 10px;
    }
    .header-actions .btn {
        grid-column: 1 / -1;
        width: 100%;
    }
}
