/* ================================================================
   ACCASyllabus.com — Premium Design System v2.0
   ================================================================ */

/* --- Design Tokens -------------------------------------------- */
:root {
    --navy: #0a1628;
    --navy-mid: #122240;
    --blue: #1a56db;
    --blue-light: #3b82f6;
    --red: #dc2626;
    --red-light: #ef4444;
    --gold: #f59e0b;

    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;

    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    --bg-dark: #0a1628;
    --border: #e5e7eb;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.10);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.14);
    --shadow-xl: 0 24px 64px rgba(10, 22, 40, 0.18);

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;

    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --container: 1200px;

    /* Legacy aliases */
    --primary-color: #0a1628;
    --secondary-color: #1a56db;
    --accent-color: #dc2626;
    --border-color: #e5e7eb;
    --white: #ffffff;
}

/* --- Reset ------------------------------------------------------ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--bg-white);
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: var(--blue);
    transition: var(--transition);
}

a:hover {
    color: var(--blue-light);
}

ul {
    list-style: none;
}

/* --- Typography ------------------------------------------------- */
h1,
h2,
h3,
h4,
h5 {
    font-family: 'Outfit', sans-serif;
    line-height: 1.2;
    color: var(--navy);
    margin-bottom: 0.75rem;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 700;
}

h2 {
    font-size: clamp(1.5rem, 3.5vw, 2.2rem);
    font-weight: 700;
}

h3 {
    font-size: 1.35rem;
    font-weight: 600;
}

h4 {
    font-size: 1.1rem;
    font-weight: 600;
}

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

p:last-child {
    margin-bottom: 0;
}

strong {
    color: var(--text-primary);
    font-weight: 600;
}

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

.section-padding {
    padding: 80px 0;
}

.section-padding-sm {
    padding: 48px 0;
}

.text-center {
    text-align: center;
}

.text-white {
    color: #fff !important;
}

.text-white p,
.text-white h2,
.text-white h3,
.text-white h4 {
    color: #fff;
}

.text-white li {
    color: rgba(255, 255, 255, 0.85);
}

.bg-light {
    background: var(--bg-light);
}

.bg-dark {
    background: var(--bg-dark);
}

.hidden {
    display: none !important;
}

/* --- Buttons ---------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
}

.btn-primary:hover {
    background: var(--red-light);
    border-color: var(--red-light);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.3);
}

.btn-outline {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.7);
    color: #fff;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #fff;
    color: #fff;
}

.btn-secondary {
    background: var(--navy);
    color: #fff;
    border-color: var(--navy);
}

.btn-secondary:hover {
    background: var(--navy-mid);
    color: #fff;
    transform: translateY(-2px);
}

/* --- Header ----------------------------------------------------- */
#main-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

#main-header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 68px;
    gap: 2rem;
}

.logo {
    flex-shrink: 0;
}

.logo a {
    font-family: 'Outfit', sans-serif;
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: -0.5px;
}

.logo a span {
    color: var(--red);
}

.logo a:hover {
    color: var(--navy);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex: 1;
    justify-content: center;
}

.nav-links li a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-links li a:hover,
.nav-links li a.active {
    color: var(--navy);
    background: var(--bg-light);
}

/* --- Hero Section ----------------------------------------------- */
.hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 50%, #1e3a5f 100%);
    color: #fff;
    padding: 100px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(26, 86, 219, 0.2) 0%, transparent 70%);
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero .badge {
    display: inline-block;
    background: rgba(245, 158, 11, 0.15);
    color: var(--gold);
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 4px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.hero h1 {
    color: #fff;
    font-size: clamp(2.2rem, 6vw, 4rem);
    margin-bottom: 1.25rem;
    line-height: 1.1;
}

.hero h1 span {
    color: var(--gold);
}

.hero p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.15rem;
    max-width: 680px;
    margin: 0 auto 2.5rem;
}

.hero-ctas {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* --- Stats Bar -------------------------------------------------- */
.stats-bar {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    padding: 28px 0;
}

.stats-bar .container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    text-align: center;
}

.stat-item strong {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--navy);
    line-height: 1;
}

.stat-item span {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* --- Cards ------------------------------------------------------ */
.card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.card.bg-light {
    background: var(--bg-light);
    box-shadow: none;
    border: 1px solid var(--border);
}

.card.bg-dark {
    background: var(--navy);
    color: #fff;
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card.bg-light:hover {
    box-shadow: var(--shadow-md);
}

/* Subject Cards */
.subject-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.subject-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    border-top: 4px solid var(--blue);
    transition: var(--transition);
    position: relative;
}

.subject-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-top-color: var(--red);
}

.subject-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.subject-card p {
    font-size: 0.9rem;
}

.subject-card .link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--blue);
}

.subject-card .link:hover {
    color: var(--red);
    gap: 8px;
}

/* Summary Grid */
.summary-box {
    border-left: 5px solid var(--blue);
}

.summary-box h2,
.summary-box h3 {
    margin-bottom: 0.75rem;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.summary-item {
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    padding: 1rem;
    text-align: center;
}

.summary-item strong {
    display: block;
    font-size: 1.1rem;
    font-family: 'Outfit', sans-serif;
    color: var(--navy);
}

.summary-item span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Syllabus Chapter Cards */
.syllabus-chapter {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 1.5rem 1.75rem;
    border: 1px solid var(--border);
    border-left: 5px solid var(--blue);
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.syllabus-chapter:hover {
    border-left-color: var(--red);
    box-shadow: var(--shadow-md);
}

.syllabus-chapter h3 {
    font-size: 1.05rem;
    color: var(--navy);
    margin-bottom: 0.5rem;
}

.syllabus-chapter p,
.syllabus-chapter li {
    font-size: 0.925rem;
    color: var(--text-secondary);
}

.syllabus-chapter ul {
    margin-top: 0.5rem;
    padding-left: 1.25rem;
    list-style: disc;
}

.syllabus-chapter li {
    margin-bottom: 0.25rem;
}

/* Content Sections */
.content-section {
    margin: 2.5rem 0;
}

.content-section h2 {
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.content-section ul {
    padding-left: 1.5rem;
    list-style: disc;
}

.content-section ul li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.content-section ol {
    padding-left: 1.5rem;
}

.content-section ol li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.content-section table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
}

.content-section th {
    background: var(--navy);
    color: #fff;
    padding: 14px 16px;
    text-align: left;
    font-size: 0.9rem;
}

.content-section td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 0.925rem;
    color: var(--text-secondary);
}

.content-section tr:last-child td {
    border-bottom: none;
}

.content-section tr:hover td {
    background: var(--bg-light);
}

/* Stat CTA Card */
.card.bg-primary {
    background: linear-gradient(135deg, var(--navy) 0%, #1e3a5f 100%);
    color: #fff;
    padding: 3rem;
    border: none;
    text-align: center;
}

.card.bg-primary h2,
.card.bg-primary h3 {
    color: #fff;
}

.card.bg-primary p {
    color: rgba(255, 255, 255, 0.8);
}

.card.bg-accent {
    background: linear-gradient(135deg, var(--red) 0%, #b91c1c 100%);
    color: #fff;
    padding: 2.5rem;
    text-align: center;
}

.card.bg-accent h3,
.card.bg-accent p {
    color: #fff;
}

/* --- Breadcrumbs ------------------------------------------------ */
.breadcrumbs {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.breadcrumbs a {
    color: var(--blue);
    font-weight: 500;
}

.breadcrumbs a:hover {
    color: var(--red);
}

.breadcrumbs span {
    color: var(--text-primary);
    font-weight: 600;
}

.breadcrumbs::before {
    content: '';
}

.breadcrumbs a+a::before,
.breadcrumbs a+span::before {
    content: '/';
    margin-right: 6px;
    color: var(--text-muted);
}

/* --- FAQ Section ------------------------------------------------ */
.faq-section h2 {
    margin-bottom: 2rem;
}

.faq-items {
    padding: 0;
}

.faq-item {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-item h4 {
    color: var(--navy);
    font-size: 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.faq-item h4::before {
    content: 'Q';
    background: var(--blue);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    flex-shrink: 0;
}

.faq-item p {
    font-size: 0.925rem;
    color: var(--text-secondary);
    margin: 0;
}

/* --- Level cards on Syllabus hub -------------------------------- */
.level-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 2rem;
    border: 1px solid var(--border);
    margin-bottom: 3rem;
}

.level-card h2 {
    color: var(--navy);
    border-left: 5px solid var(--red);
    padding-left: 1rem;
    margin-bottom: 0.5rem;
}

.level-card>p {
    margin-bottom: 1.5rem;
}

/* --- CTA Section ------------------------------------------------ */
.cta-section {
    padding: 48px 0;
}

/* --- Exam Date Timeline / Table --------------------------------- */
.exam-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.exam-table thead {
    background: var(--navy);
}

.exam-table th {
    color: #fff;
    padding: 16px 20px;
    text-align: left;
    font-size: 0.9rem;
}

.exam-table td {
    padding: 14px 20px;
    font-size: 0.92rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

.exam-table tr:last-child td {
    border-bottom: none;
}

.exam-table tr:hover td {
    background: var(--bg-light);
}

.badge-green {
    display: inline-block;
    background: #dcfce7;
    color: #16a34a;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-blue {
    display: inline-block;
    background: #dbeafe;
    color: #1d4ed8;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-red {
    display: inline-block;
    background: #fee2e2;
    color: #dc2626;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* --- Fees Table ------------------------------------------------- */
.fees-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.25rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.fees-table thead {
    background: var(--navy);
}

.fees-table th {
    color: #fff;
    padding: 14px 18px;
    text-align: left;
    font-size: 0.88rem;
}

.fees-table td {
    padding: 13px 18px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

.fees-table tr:nth-child(even) td {
    background: var(--bg-light);
}

.fees-table tr:last-child td {
    border-bottom: none;
}

/* --- Lead Form Popup -------------------------------------------- */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(10, 22, 40, 0.7);
    backdrop-filter: blur(6px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 20px;
}

.modal-content {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 480px;
    position: relative;
    box-shadow: var(--shadow-xl);
}

.modal-content h3 {
    margin-bottom: 0.25rem;
}

.modal-content p {
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

.close {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
    transition: var(--transition);
}

.close:hover {
    color: var(--text-primary);
}

#lead-form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-top: 1.25rem;
}

#lead-form input {
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
    outline: none;
}

#lead-form input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

/* --- Footer ----------------------------------------------------- */
#main-footer {
    background: var(--navy);
    color: rgba(255, 255, 255, 0.75);
    padding-top: 64px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand .logo-text {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
}

.footer-brand .logo-text span {
    color: var(--red);
}

.footer-brand p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    max-width: 260px;
}

.footer-col h4 {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: #fff;
    padding-left: 4px;
}

.footer-col p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer-sublabel {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.35);
    margin-bottom: 0.5rem;
}

/* Slightly smaller link text so long subject names fit cleanly */
.footer-col ul li a {
    font-size: 0.82rem !important;
    line-height: 1.4;
}

.footer-bottom {
    padding: 20px 0;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
}

/* --- Meta/article info ----------------------------------------- */
.meta {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.meta::before {
    content: '📅';
}

/* --- Why ACCA Grid ------------------------------------------- */
.why-acca-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

/* --- Responsive ------------------------------------------------- */
@media (max-width: 1024px) {

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

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

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

@media (max-width: 768px) {
    .section-padding {
        padding: 56px 0;
    }

    .hero {
        padding: 70px 0 56px;
    }

    .nav-links {
        display: none;
    }

    #main-header nav {
        height: 60px;
    }

    h1 {
        font-size: 1.9rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .stats-bar .container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

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

    .hero-ctas {
        flex-direction: column;
        align-items: center;
    }

    .modal-content {
        padding: 1.75rem;
    }

    .card {
        padding: 1.5rem;
    }

    .why-acca-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

@media (max-width: 480px) {
    .stats-bar .container {
        grid-template-columns: repeat(2, 1fr);
    }

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

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