:root {
    --primary-blue: #1a4a9e;
    --dark-navy: #0a192f;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --accent: #00d4ff;
    --text-muted: #555;
    --border-color: #e5e7eb;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    font-size: 1rem;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ----- Typography ----- */
h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: 0.5em; }
h2 { font-size: 1.75rem; margin-bottom: 0.75em; color: var(--dark-navy); }
h3 { font-size: 1.25rem; margin-bottom: 0.5em; color: var(--dark-navy); }
p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

/* ----- Navbar ----- */
.navbar {
    background: var(--white);
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}
.navbar .container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-weight: 700; font-size: 1.5rem; color: var(--primary-blue); }
.logo span { color: var(--dark-navy); }
.nav-links {
    list-style: none;
    display: flex;
    gap: 28px;
    align-items: center;
}
.nav-links a {
    text-decoration: none;
    color: var(--dark-navy);
    font-weight: 500;
    transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--primary-blue); }

/* Hamburger button - hidden on desktop */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 22px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    gap: 5px;
    z-index: 110;
}
.nav-toggle-bar {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--dark-navy);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.2s ease;
}
.navbar.open .nav-toggle-bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.navbar.open .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}
.navbar.open .nav-toggle-bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ----- Hero Section ----- */
.hero {
    background: linear-gradient(rgba(10,25,47,0.85), rgba(10,25,47,0.85)), url('https://images.unsplash.com/photo-1523240795612-9a054b0db644?auto=format&fit=crop&q=80');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 120px 0;
    text-align: center;
}
.hero .container { max-width: 720px; }
.hero h1 { color: white; margin-bottom: 16px; }
.hero p { font-size: 1.125rem; opacity: 0.95; margin-bottom: 28px; }
.hero-btns { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.btn-primary {
    display: inline-block;
    background: var(--primary-blue);
    color: white;
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s ease, transform 0.15s ease;
}
.btn-primary:hover { background: #153a7a; transform: translateY(-1px); }
.btn-secondary {
    display: inline-block;
    border: 2px solid rgba(255,255,255,0.9);
    color: white;
    padding: 12px 26px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s ease, border-color 0.2s ease;
}
.btn-secondary:hover { background: rgba(255,255,255,0.15); border-color: white; }

/* ----- Page header (non-hero pages) ----- */
.page-header {
    background: var(--dark-navy);
    color: white;
    padding: 60px 0;
    text-align: center;
}
.page-header h1 { color: white; margin-bottom: 8px; }
.page-header p { margin-bottom: 0; opacity: 0.9; font-size: 1.05rem; }

/* ----- Sections ----- */
.features { padding: 80px 0; }
.features h2 { text-align: center; margin-bottom: 40px; }
.content-section { padding: 60px 0; }
.content-section h1 { margin-bottom: 32px; }

/* ----- Grid & Cards ----- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
.features .grid { margin-top: 0; }
.card {
    padding: 32px;
    background: var(--light-bg);
    border-radius: 10px;
    border-top: 4px solid var(--primary-blue);
    transition: box-shadow 0.2s ease;
}
.card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.card.highlight {
    background: var(--primary-blue);
    color: white;
    border: none;
}
.card.highlight h3 { color: white; }
.card ul { margin: 12px 0 0 1.25em; }
.card ul li { margin-bottom: 6px; }
.text-block { padding: 24px 0; }
.text-block h2 { margin-bottom: 12px; }

/* ----- Dark section (STEM) ----- */
.dark-section {
    background: var(--dark-navy);
    color: white;
    padding: 80px 0;
    text-align: center;
}
.dark-section h2 { color: white; }
.dark-section p { margin-bottom: 24px; max-width: 640px; margin-left: auto; margin-right: auto; opacity: 0.9; }
.stem-list {
    list-style: none;
    margin-top: 32px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 32px 48px;
}
.stem-list li { font-size: 1.05rem; font-weight: 500; }

/* ----- Footer ----- */
footer {
    background: #eef1f5;
    padding: 48px 0;
    text-align: center;
    margin-top: auto;
}
footer .container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
footer p { margin-bottom: 12px; color: var(--text-muted); font-size: 0.95rem; }
footer a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.2s ease;
    margin: 0 4px;
}
footer a:hover { color: var(--accent); text-decoration: underline; }
.footer-contact { margin-top: 12px; font-size: 0.95rem; }
.footer-contact a { white-space: nowrap; }

/* ----- Dropdown ----- */
.dropdown { position: relative; display: inline-block; }
.dropdown-content {
    display: none;
    position: absolute;
    background: var(--white);
    min-width: 200px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.12);
    z-index: 10;
    border-radius: 8px;
    top: 100%;
    margin-top: 4px;
    border: 1px solid var(--border-color);
}
.dropdown-content a {
    color: var(--dark-navy);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.95rem;
    transition: background 0.15s ease;
}
.dropdown-content a:hover {
    background: var(--light-bg);
    color: var(--primary-blue);
}
.dropdown:hover .dropdown-content { display: block; }

/* ----- Logo ----- */
.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s ease;
}
.logo-container:hover { opacity: 0.85; }
.nav-logo-icon { height: 44px; width: auto; display: block; }
.nav-logo-text { height: 22px; width: auto; display: block; }

/* ----- Layout (sticky footer) ----- */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
main { flex: 1 0 auto; }

/* ----- Forms ----- */
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-navy);
    font-size: 0.95rem;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(26, 74, 158, 0.15);
}
.contact-sidebar h3 { margin-bottom: 12px; color: var(--primary-blue); }
.contact-sidebar p { margin-bottom: 10px; color: var(--text-muted); }
.contact-sidebar hr { margin: 20px 0; border: 0; border-top: 1px solid var(--border-color); }

/* ----- Contact page grid ----- */
.content-section .grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
}
@media (max-width: 700px) {
    .content-section .grid { grid-template-columns: 1fr; }
}

/* ----- Hero alt (STEM / inner pages) ----- */
.hero-alt {
    background: var(--dark-navy);
    color: white;
    padding: 60px 0;
    text-align: center;
}
.hero-alt h1 { color: white; margin-bottom: 12px; }
.hero-alt p { margin-bottom: 0; opacity: 0.9; font-size: 1.05rem; }

/* ----- Feature row (two-column content) ----- */
.feature-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
.feature-item { margin: 0; }

/* ----- Crash course page ----- */
.page-header-crash { position: relative; }
.badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}
.badge-urgent { background: #d9534f; color: white; }
.page-header-crash .badge { margin-bottom: 12px; }
.page-header-crash h1 { margin-top: 0; }
.list-tick {
    list-style: none;
    margin: 20px 0 0;
    padding-left: 0;
}
.list-tick li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 10px;
}
.list-tick li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-blue);
    font-weight: 700;
}
.card-dark {
    background: var(--dark-navy);
    color: white;
    border: none;
}
.card-dark h3 { color: white; }
.card-dark p { color: rgba(255,255,255,0.9); }
.card-divider {
    border: 0;
    border-top: 1px solid rgba(255,255,255,0.2);
    margin: 16px 0;
}
.price { font-size: 1.5rem; font-weight: 700; margin: 20px 0; }
.price-unit { font-size: 0.9rem; font-weight: 400; opacity: 0.8; }
.btn-block { display: block; text-align: center; }
.btn-cta { background: #d9534f !important; }
.btn-cta:hover { background: #c9302c !important; }
.text-center { text-align: center; margin-bottom: 40px; }

/* ----- Mobile nav & layout ----- */
@media (max-width: 768px) {
    .nav-logo-text { height: 18px; }
    .nav-toggle { display: flex; }
    .navbar .container { flex-wrap: wrap; }
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        order: 10;
        margin: 0 -24px;
        padding: 16px 24px 24px;
        background: var(--white);
        border-top: 1px solid var(--border-color);
        gap: 0;
        max-height: 70vh;
        overflow-y: auto;
    }
    .navbar.open .nav-links { display: flex; }
    .nav-links li {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }
    .nav-links li:last-child { border-bottom: none; }
    .nav-links a {
        display: block;
        padding: 14px 0;
        font-size: 1rem;
    }
    .nav-links .btn-primary { text-align: center; margin-top: 8px; }
    /* Mobile: show dropdown sublinks inline (no hover) */
    .dropdown-content {
        position: static;
        display: block;
        box-shadow: none;
        border: none;
        min-width: 0;
        margin: 0 0 8px 0;
        padding: 0 0 0 16px;
        background: transparent;
    }
    .dropdown-content a { padding: 10px 0; font-size: 0.95rem; color: var(--text-muted); }
    .dropdown-content a:hover { background: transparent; color: var(--primary-blue); }
    .dropdown .dropbtn::after { content: ''; }
    .dropbtn::after { content: ''; }

    .hero { padding: 80px 0; }
    .hero-alt { padding: 48px 0; }
    .features, .dark-section { padding: 56px 0; }
    .stem-list { flex-direction: column; gap: 16px; }
}