/* Theme & System Variables
   - Centralized color, spacing, typography, and breakpoints
   - Use rem-based sizes for better scalability and accessibility
*/
:root {
    /* Colors */
    --primary-color: #00b4d8; /* accent cyan */
    --secondary-color: #007bff; /* deep blue */
    --accent-color: #0b1220; /* card surface */
    --surface: #0b1220; /* dark card background */
    --light-color: var(--surface);
    --text-color: #e6eef8; /* light text */
    --muted-color: #9aa4b2; /* muted light */
    --background-color: #0f1724; /* page background */
    --border-color: rgba(255,255,255,0.04);
    --success-color: #2ECC71;
    --feature-icon-color: var(--secondary-color);
    --hero-gradient: linear-gradient(180deg,#071029 0%, #081426 60%);
    --danger-color: #E53E3E; /* destructive action color */

    /* Typography */
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Poppins', 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    --fs-xxs: 0.75rem; /* 12px */
    --fs-xs: 0.875rem; /* 14px */
    --fs-sm: 1rem; /* 16px - base */
    --fs-md: 1.125rem; /* 18px */
    --fs-lg: 1.5rem; /* 24px */
    --fs-xl: 2.25rem; /* 36px */
    --lh-base: 1.55;

    /* Spacing scale */
    --space-1: 0.5rem;
    --space-2: 1rem;
    --space-3: 1.5rem;
    --space-4: 2.5rem;
    --radius: 8px;

    /* Breakpoints */
    --bp-sm: 480px;
    --bp-md: 768px;
    --bp-lg: 1024px;
    --bp-xl: 1280px;

    /* Accessibility */
    --focus-ring: 3px solid rgba(52,152,219,0.18);
}

/*
    Maintenance notes:
    - This stylesheet was refactored to centralize variables (colors, type, spacing)
    - Use the --fs-* and --space-* tokens for sizes so changes propagate site-wide
    - Add .card and .prose utilities for consistent containers and readable text
    - Mobile behavior: nav is hidden by default at small widths; add class `nav-open` to <body>
        to reveal the mobile nav (.nav-links). JS can toggle body.nav-open when a hamburger is clicked.
    - Accessibility: use :focus-visible for keyboard outlines and prefers-reduced-motion to reduce animations.
*/

/* Dark Theme variables (light/default is :root) */
.dark-theme {
    --primary-color: #3498DB;
    --secondary-color: #2ECC71;
    --accent-color: #34495E;
    /* Dark theme surfaces and text colors to avoid white surfaces in dark mode */
    --surface: #0f1720; /* dark surface instead of white */
    --light-color: var(--surface);
    --text-color: #E6EEF8; /* light text for readability */
    --background-color: #0b0d0f; /* page background */
    --border-color: rgba(255,255,255,0.06);
    --success-color: #2ECC71;
    --feature-icon-color: #2ECC71;
    --hero-gradient: linear-gradient(135deg, #2C3E50 0%, #1A1A1A 100%);
}

/* Main Styles */
html { font-size: 16px; }

/* Base / Body */
body {
    font-family: var(--font-body);
    font-size: var(--fs-sm);
    line-height: var(--lh-base);
    background-color: var(--background-color);
    margin: 0;
    padding: 0;
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-weight: 400; /* readable body weight */
}

/* Utilities */
.prose {
    max-width: 65ch;
    margin: 0 auto;
    padding: var(--space-2);
}

.card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: var(--space-3);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(15,15,15,0.04);
}

:focus {
    outline: none;
}

:focus-visible {
    outline: var(--focus-ring);
    outline-offset: 2px;
}

.navbar {
    background-color: var(--surface);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 15px 30px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    transition: background-color 0.3s;
}

.logo {
    font-weight: 600;
    font-size: 22px;
    color: var(--primary-color);
    letter-spacing: -0.5px;
    transition: color 0.3s;
    cursor: pointer;
}

/* Ensure logo text is vertically centered like other nav items */
.logo { display: inline-flex; align-items: center; height: 36px; line-height: 36px; }

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

/* Ensure top-level navbar child groups are vertically centered with the logo */
.navbar > div { display: flex; align-items: center; }

/* Language selector styling placed at the left of Home link */
.nav-links .lang-select { display: inline-flex; align-items: center; }
.nav-links .lang-select select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: transparent; /* match navbar surface */
    color: var(--secondary-color); /* match nav link color */
    border: 1px solid transparent;
    padding: 6px 10px;
    height: 36px;
    line-height: 1;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
    transition: box-shadow 0.12s ease, opacity 0.12s ease;
    /* Nudge slightly to match the optical baseline of the logo */
    transform: translateY(3px);
}

/* Ensure auth link and nav-toggle sit on same baseline */
.auth-links { height: 36px; align-items: center; }
.auth-links a { line-height: 36px; }
.nav-toggle { line-height: 36px; }

.nav-links .lang-select select:hover { box-shadow: 0 6px 18px rgba(0,0,0,0.06); }

/* Small-screen adjustments */
@media (max-width: 720px) {
    .nav-links .lang-select select { padding: 6px 8px; font-size: 13px; }
}

/* Top-left auth links next to logo */
.auth-links {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}
.auth-links a { color: var(--primary-color); text-decoration: none; padding:4px 8px; border-radius:8px; }
.auth-links a:hover { background: rgba(255,255,255,0.02); }

@media (max-width:720px) {
    .auth-links { display: none; } /* hide to save space on small screens; users can use nav menu */
}

/* Make select controls inside wizard steps readable including option lists where supported */
.step-content select {
    color: #ffffff;
    background-color: var(--surface);
    border: 1px solid var(--border-color);
    padding: 8px 10px;
    border-radius: 8px;
    outline: none;
}

/* Try to style option items (browser support varies) */
.step-content select option,
.nav-links .lang-select select option {
    color: var(--text-color);
    background-color: var(--surface);
}

/* Improve contrast for the legacy wizard language select on small screens */
@media (max-width: 420px) {
    .step-content select { font-size: 14px; padding: 8px 8px; }
}

/* Mobile nav toggle: add `nav-open` to body to show links on small screens */
body.nav-open .nav-links {
    display: flex;
    position: fixed;
    top: 64px;
    right: 12px;
    background: var(--surface);
    flex-direction: column;
    gap: 12px;
    padding: var(--space-2);
    box-shadow: 0 8px 30px rgba(15,15,15,0.12);
    border-radius: 8px;
    z-index: 1100;
}

.nav-toggle {
    display: none; /* shown on small screens via media query */
    background: none;
    border: 0;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--primary-color);
}

.nav-links a {
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 500;
    transition: color 0.2s;
    font-size: 15px;
    cursor: pointer;
}

/* Make nav links vertically centered (same visual level as the logo) */
.nav-links a { display: inline-flex; align-items: center; padding: 6px 0; }

.nav-links a:hover {
    color: var(--primary-color);
}

/* Active / current nav link - visually indicate which page is active
   Use font-weight and color; also support aria-current="page" for accessibility */
.nav-links a.active,
.nav-links a[aria-current="page"] {
    font-weight: 700;
    color: var(--primary-color);
}

.page {
    display: none;
    padding: 100px 20px 50px;
    max-width: 1200px;
    margin: 0 auto;
}

.page.active {
    display: block;
}

.hero {
    height: 80vh;
    background: var(--hero-gradient);
    color: var(--primary-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
    transition: background 0.3s, color 0.3s;
}

.hero h1 {
    font-size: clamp(1.6rem, 4vw, 2.5rem);
    margin-bottom: var(--space-2);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.hero p {
    font-size: var(--fs-md);
    max-width: 60ch;
    margin-bottom: var(--space-3);
    color: var(--muted-color);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.55rem 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: var(--fs-sm);
    font-weight: 600;
    transition: transform 0.16s ease, box-shadow 0.16s ease;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature {
    flex: 1 1 320px;
    min-width: 280px;
    background: var(--surface);
    padding: var(--space-3);
    border-radius: var(--radius);
    box-shadow: 0 2px 10px rgba(15,15,15,0.04);
    text-align: center;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s;
    border: 1px solid var(--border-color);
}

/* Choice cards shown at site entry (two equal-sized options) */
.choice-section{padding:22px 20px 8px;max-width:1200px;margin:110px auto 18px}
.choice-container{display:flex;gap:20px;align-items:stretch;justify-content:center;flex-wrap:wrap}
.choice-card{flex:1 1 420px;min-width:300px;max-width:520px;background:var(--surface);border-radius:var(--radius);padding:18px;display:flex;flex-direction:column;justify-content:space-between;text-decoration:none;color:inherit;border:1px solid var(--border-color);box-shadow:0 8px 28px rgba(15,15,15,0.06);transition:transform .18s ease,box-shadow .18s ease}
.choice-card:hover{transform:translateY(-6px);box-shadow:0 18px 40px rgba(15,15,15,0.12)}
.choice-top{display:flex;align-items:center;gap:14px}
.choice-badge{width:56px;height:56px;border-radius:12px;background:linear-gradient(90deg,var(--secondary-color),var(--primary-color));display:flex;align-items:center;justify-content:center;color:var(--surface);font-weight:800;font-size:18px}
.choice-card h3{margin:0;color:var(--primary-color)}
.choice-desc{color:var(--muted-color);margin:12px 0 16px;flex:1}
.choice-cta{align-self:flex-start;padding:8px 12px;border-radius:8px;background:linear-gradient(90deg,var(--primary-color),var(--secondary-color));color:white;font-weight:700}

@media (max-width:900px){
    .choice-section{margin-top:80px}
    .choice-card{flex:1 1 100%;max-width:720px}
}

/* small decorative hero used on the homepage to avoid large empty box */
.hero-mini{height:64px}

/* --- Hero / Banner styles --- */
.hero-banner{position:relative;overflow:hidden;padding:60px 20px;margin-top:80px;border-radius:16px;background:linear-gradient(180deg,rgba(7,16,41,0.6),rgba(8,20,38,0.6));box-shadow:0 10px 40px rgba(2,6,23,0.6);}
.hero-canvas{position:absolute;inset:0;width:100%;height:100%;z-index:0;pointer-events:none}
.hero-content{position:relative;z-index:2;display:flex;gap:18px;align-items:center;justify-content:space-between;max-width:1200px;margin:0 auto}
.hero-copy{flex:1 1 480px;min-width:260px}
.hero-copy h1{font-size:clamp(1.6rem,3.6vw,2.6rem);margin:0 0 8px;line-height:1.05}
.hero-sub{color:var(--muted-color);margin-bottom:16px}
.hero-ctas{display:flex;gap:12px;flex-wrap:wrap}
.hero-illustration{flex:0 0 520px;max-width:520px}
.journey-svg{width:100%;height:auto;display:block}

/* Animated badges replacing hero CTAs */
.hero-animations{display:flex;gap:12px;align-items:center;margin-top:12px}
.floating-badge{display:inline-flex;align-items:center;gap:8px;padding:10px 12px;border-radius:999px;background:rgba(255,255,255,0.02);border:1px solid var(--border-color);cursor:default;transition:transform 260ms cubic-bezier(.2,.9,.3,1),box-shadow 260ms}
.floating-badge:hover, .floating-badge:focus, .floating-badge:focus-visible { transform:translateY(-6px) scale(1.04); box-shadow:0 10px 30px rgba(0,0,0,0.18); }
.floating-badge:focus-visible { outline: 3px solid rgba(52,152,219,0.12); outline-offset: 4px; }
.floating-badge .badge-icon{font-size:18px;line-height:1}
.floating-badge .badge-label{color:var(--text-color);font-weight:700;font-size:0.95rem}
.floating-badge.pop{transform:translateY(-6px) scale(1.04);box-shadow:0 10px 30px rgba(0,0,0,0.18)}

@media (max-width:720px){
    .hero-animations{flex-wrap:wrap}
}

/* Floating shapes and micro-animations */
.micro-icon{transform-origin:center center;opacity:0.95}
.micro-icon[data-anim="pop"]{transition:transform 360ms cubic-bezier(.2,.9,.3,1),opacity 260ms}
.micro-icon[data-anim="float"]{animation:float 4s ease-in-out infinite}
.micro-icon.pop { transform:scale(1.25); opacity:1 }

@keyframes float{0%{transform:translateY(0)}50%{transform:translateY(-6px)}100%{transform:translateY(0)}}

/* Responsive adjustments */
@media (max-width: 920px){
    .hero-content{flex-direction:column;align-items:flex-start;padding:10px}
    .hero-illustration{width:100%;max-width:100%;order:2}
    .hero-copy{order:1}
}

/* Subtle parallax layer shapes (pure CSS decorative elements) */
.hero-banner::before{content:"";position:absolute;left:-10%;top:-20%;width:380px;height:380px;background:radial-gradient(circle at 30% 30%, rgba(0,180,216,0.06), transparent 30%);filter:blur(30px);transform:translateZ(0);z-index:1}
.hero-banner::after{content:"";position:absolute;right:-8%;bottom:-18%;width:320px;height:320px;background:radial-gradient(circle at 70% 70%, rgba(52,152,219,0.04), transparent 30%);filter:blur(26px);transform:translateZ(0);z-index:1}

/* Testimonials used on wizard info page */
.testimonials{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:18px;margin-top:18px}
.testimonial-card{background:var(--surface);padding:14px;border-radius:12px;border:1px solid var(--border-color);box-shadow:0 10px 30px rgba(15,15,15,0.06);transition:transform .18s ease,box-shadow .18s ease}
.testimonial-card:hover{transform:translateY(-6px);box-shadow:0 20px 44px rgba(15,15,15,0.12)}
.testimonial-top{display:flex;gap:12px;align-items:center}
.testimonial-avatar{width:56px;height:56px;border-radius:12px;background:linear-gradient(135deg,var(--secondary-color),var(--primary-color));display:flex;align-items:center;justify-content:center;color:var(--surface);font-weight:700}
.testimonial-meta{font-size:0.95rem}
.testimonial-name{font-weight:700;color:var(--primary-color);margin-bottom:4px}
.testimonial-details{color:var(--muted-color);font-size:0.9rem}
.testimonial-body{margin-top:10px;color:var(--text-color);font-size:0.98rem}

/* subtle appear animation */
.fade-up{animation:fadeUp .5s ease both}
@keyframes fadeUp{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}

/* Marquee (continuous horizontal slider) */
.marquee{overflow:hidden;border-radius:10px;padding:8px 6px;background:linear-gradient(90deg,rgba(52,152,219,0.03),rgba(0,0,0,0.01));border:1px solid var(--border-color)}
.marquee-track{display:flex;gap:14px;align-items:stretch;white-space:nowrap;will-change:transform}
.marquee-track.animate{animation:marqueeMove linear infinite}
@keyframes marqueeMove{from{transform:translateX(0)}to{transform:translateX(-50%)}}

.review-card{min-width:260px;max-width:320px;background:var(--surface);padding:12px;border-radius:12px;border:1px solid var(--border-color);box-shadow:0 8px 26px rgba(15,15,15,0.06);display:flex;flex-direction:column;gap:8px}
.review-card{flex: 0 0 auto;} /* prevent shrinking so text remains readable in the marquee */
.review-top{display:flex;gap:10px;align-items:center}
.review-avatar{width:52px;height:52px;border-radius:12px;background:linear-gradient(135deg,var(--secondary-color),var(--primary-color));display:flex;align-items:center;justify-content:center;color:var(--surface);font-weight:700}
.review-title{font-weight:700;color:var(--primary-color)}
.review-sub{color:var(--muted-color);font-size:0.9rem}
.review-body{color:var(--text-color);font-size:0.95rem;white-space:normal;word-break:break-word;hyphens:auto}

/* pause on hover (CSS) */
.marquee:hover .marquee-track.animate,
.marquee:focus .marquee-track.animate{animation-play-state:paused}

/* Form tweaks inside wizard info */
#reviewForm input,#reviewForm textarea{background:transparent}
#pendingList .pending-item{background:var(--surface);padding:10px;border-radius:8px;border:1px solid var(--border-color);display:flex;justify-content:space-between;align-items:center}
#pendingList .pending-meta{font-size:0.92rem;color:var(--muted-color)}

@media (max-width:640px){
    .review-card{min-width:220px}
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.feature h3 {
    color: var(--primary-color);
    margin-top: 20px;
    font-weight: 600;
}

/* Improve contrast where text was hard to read on colored backgrounds */
.feature, .choice-card, .wizard-card, .container, .card, .testimonial-card, .review-card {
    color: var(--text-color);
}
.feature p, .choice-desc, .testimonial-body, .review-body, .container p, .card p {
    color: var(--muted-color);
    font-weight: 500;
}
.choice-card h3, .wizard-card h1, .testimonial-name, .review-title {
    color: var(--text-color);
    font-weight: 700;
}
/* Buttons: ensure contrast */
.btn, .btn-primary, .btn-secondary { color: white !important; }

.feature-icon {
    font-size: 36px;
    color: var(--feature-icon-color);
    transition: color 0.18s;
}

.container {
    max-width: 1100px;
    margin: var(--space-4) auto;
    background-color: var(--surface);
    padding: var(--space-3);
    border-radius: var(--radius);
    box-shadow: 0 2px 10px rgba(15,15,15,0.04);
    text-align: left;
    border: 1px solid var(--border-color);
    transition: background-color 0.18s, border-color 0.18s;
}

.step-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.step {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 15px;
    position: relative;
    color: var(--text-color);
    font-weight: 500;
    font-size: 14px;
    transition: background-color 0.18s, color 0.18s;
}

.step.active {
    background-color: var(--primary-color);
    color: var(--surface);
}

.step.completed {
    background-color: var(--success-color);
    color: var(--surface);
}

.step::after {
    content: '';
    position: absolute;
    width: 34px;
    height: 2px;
    background-color: var(--border-color);
    left: 30px;
    transition: background-color 0.18s;
}

.step:last-child::after {
    display: none;
}

.step.completed::after {
    background-color: var(--success-color);
}

.step-content {
    margin-bottom: 30px;
}

h2 {
    color: var(--primary-color);
    margin-bottom: 25px;
    font-weight: 600;
    font-size: 1.6em;
    transition: color 0.3s;
}

select {
    padding: 12px 15px;
    width: 100%;
    max-width: 400px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    font-size: 16px;
    margin-bottom: 20px;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%232D3142" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
    background-color: var(--surface);
    transition: border-color 0.3s, background-color 0.3s;
}

.btn-group {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.btn-next {
    background-color: var(--primary-color);
}

.btn-back {
    background-color: var(--accent-color);
    color: var(--text-color);
}

.result-card {
    background-color: var(--background-color);
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    text-align: left;
    border: 1px solid var(--border-color);
    transition: background-color 0.3s, border-color 0.3s;
}

.result-card p {
    margin: 10px 0;
    font-size: 16px;
}

.result-card span {
    font-weight: 600;
    color: var(--primary-color);
}

footer {
    background-color: var(--surface);
    color: var(--secondary-color);
    text-align: center;
    padding: 30px 20px;
    margin-top: 60px;
    border-top: 1px solid var(--border-color);
    transition: background-color 0.3s, border-color 0.3s, color 0.3s;
}

footer p {
    margin: 0;
    font-size: 14px;
}

/* Subject selection styling */
.subjects-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
}

.subject-group {
    width: 100%;
    max-width: 600px;
    text-align: left;
    margin-bottom: 20px;
}

.subject-group h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
    transition: color 0.3s, border-color 0.3s;
}

.subject-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.subject-checkbox {
    display: none;
}

.subject-label {
    display: inline-block;
    padding: 8px 16px;
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
    font-size: 14px;
}

/* Automatic/core subjects (eg. "Tronc Commun") are non-interactive and must be high contrast */
.subject-label.automatic {
    background-color: #e9ecef; /* light surface for core tags */
    color: #0b1220; /* dark text for readability */
    border-color: #d7dfe6;
    cursor: default;
    font-weight: 600;
}

.subject-checkbox:checked+.subject-label {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.validation-message {
    color: #d32f2f;
    font-size: 14px;
    margin-top: 10px;
    display: none;
}

.subject-description {
    font-size: 14px;
    color: var(--secondary-color);
    margin-bottom: 15px;
    transition: color 0.3s;
}

/* Ensure the select controls in Steps 1-3 show white text and match the site's surface.
   Note: some browsers use native dropdown styling; this sets the selected value color and
   attempts to style option items where supported. */
#step1 select, #step2 select, #step3 select {
    color: #ffffff;
    background-color: var(--surface);
    border: 1px solid var(--border-color);
    padding: 8px 10px;
    border-radius: 8px;
    outline: none;
}

/* Try to style the option list text where browsers allow it */
#step1 select option, #step2 select option, #step3 select option {
    color: #ffffff;
    background-color: var(--surface);
}

/* Make select focus clearly visible */
#step1 select:focus, #step2 select:focus, #step3 select:focus {
    box-shadow: 0 0 0 3px rgba(0,180,216,0.12);
}

/* Degrees and Universities styling */
.degrees-container,
.universities-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.degree-card,
.university-card {
    background-color: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: var(--space-2);
    transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.18s, border-color 0.18s;
    cursor: pointer;
}

.degree-card:hover,
.university-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 20px rgba(15,15,15,0.08);
}

.degree-card h3,
.university-card h3 {
    color: var(--primary-color);
    margin-top: 0;
    transition: color 0.3s;
}

.degree-card p,
.university-card p {
    color: var(--muted-color);
    font-size: var(--fs-xs);
    transition: color 0.18s;
}

/* Career Path Styling */
.career-path {
    margin-top: 15px;
    padding: 10px;
    background-color: var(--accent-color);
    border-radius: 8px;
}

.career-path h4 {
    margin-top: 0;
    color: var(--primary-color);
}

.career-path ul {
    padding-left: 20px;
    margin-bottom: 0;
}

.career-path li {
    margin-bottom: 5px;
}

/* PDF Button Styling */
.pdf-btn {
    background-color: #E74C3C;
    margin-top: 20px;
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* Contact card styles */
.contact-info {
    max-width: 920px;
    margin: 40px auto;
    padding: 0 20px;
}
.contact-card {
    display: flex;
    gap: 24px;
    align-items: center;
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.02));
    border: 1px solid var(--border-color);
    padding: 22px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.05);
}
.contact-main {
    flex: 1 1 auto;
}
.contact-logo {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    background: linear-gradient(135deg,var(--secondary-color),var(--primary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--surface);
    font-weight: 700;
    font-size: 18px;
}
.contact-email {
    display: inline-block;
    margin: 10px 0 6px 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    background: rgba(52,152,219,0.06);
    padding: 8px 12px;
    border-radius: 8px;

/* Homepage stats styles (counters & progress). Map-related styles were removed per request. */
.home-stats .stat-value {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-color);
}
.home-stats .stat-label { font-size: 0.95rem; }
.progress { margin-top: 8px; }
@media (max-width: 720px) {
    .home-stats .stat-value { font-size: 1.5rem; }
}
    border: 1px solid transparent;
}
.contact-email:hover {
    text-decoration: underline;
}
.contact-note {
    color: var(--text-color);
    opacity: 0.9;
    margin-top: 6px;
}
.contact-actions { margin-top: 12px; display:flex; gap:10px; }
.btn-primary { background: var(--secondary-color); color: white; padding: 10px 14px; border-radius:8px; text-decoration:none; border:0; }
.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
}
.btn-secondary:hover {
    background: var(--primary-color);
    color: #ffffff;
}
.btn-secondary:focus-visible { outline: var(--focus-ring); }

/* Theme selector removed - site uses a single theme */

/* Theme Circles */
.theme-circle {
    position: fixed;
    border-radius: 50%;
    z-index: -1;
    opacity: 0.1;
    filter: blur(50px);
}

.circle-1 {
    width: 300px;
    height: 300px;
    background-color: var(--primary-color);
    top: -100px;
    left: -100px;
}

.circle-2 {
    width: 200px;
    height: 200px;
    background-color: var(--secondary-color);
    bottom: -50px;
    right: -50px;
}

.circle-3 {
    width: 150px;
    height: 150px;
    background-color: var(--accent-color);
    top: 50%;
    left: 30%;
}

/* University Filters */
.university-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    justify-content: center;
}

.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 150px;
}

.filter-group label {
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 14px;
}

.filter-group select {
    padding: 8px 12px;
    font-size: 14px;
    max-width: 100%;
}

/* University List Container */
.university-list-container {
    max-height: 500px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--surface);
}

/* University Card Enhanced */
.university-card {
    margin-bottom: 15px;
}

.university-card h3 {
    margin-bottom: 10px;
}

.university-card p {
    margin: 5px 0;
}

.university-card .requirements {
    background-color: var(--accent-color);
    padding: 8px;
    border-radius: 4px;
    margin-top: 10px;
}

.university-card .link {
    display: inline-block;
    margin-top: 10px;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
}

.university-card .link:hover {
    text-decoration: underline;
}

/* Grading System Info */
.grading-info {
    font-size: 12px;
    color: var(--secondary-color);
    margin-top: 5px;
    font-style: italic;
}

/* About Page Styling */
.about-content {
    background-color: var(--surface);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-color);
}

.about-content h2 {
    margin-top: 0;
}

.team-members {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 30px;
}

.team-member {
    flex: 1 1 260px;
    min-width: 220px;
    background-color: var(--surface);
    padding: var(--space-2);
    border-radius: var(--radius);
    box-shadow: 0 2px 10px rgba(15,15,15,0.04);
    border: 1px solid var(--border-color);
}

.team-member img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
}

/* Contact Page Styling */
.contact-form {
    background-color: var(--surface);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-color);
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 16px;
}

.form-group textarea {
    min-height: 150px;
}

/* AI Career Coach Chatbot Styles */
.chatbot-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    font-family: 'Inter', sans-serif;
}

.chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
}

.chatbot-toggle:focus-visible {
    outline: var(--focus-ring);
}

.chatbot-toggle:hover {
    transform: scale(1.1);
}

.chatbot-toggle i {
    font-size: 24px;
}

.chatbot-window {
    width: 300px;
    height: 400px;
    background-color: var(--surface);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.chatbot-window.open {
    display: flex;
}

.chatbot-header {
    background-color: var(--primary-color);
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header h3 {
    margin: 0;
    font-size: 16px;
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

.chatbot-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background-color: var(--background-color);
}

.message {
    margin-bottom: 15px;
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
}

.user-message {
    background-color: var(--primary-color);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 5px;
}

.bot-message {
    background-color: var(--accent-color);
    color: var(--text-color);
    margin-right: auto;
    border-bottom-left-radius: 5px;
}

.chatbot-input {
    display: flex;
    padding: 10px;
    background-color: var(--surface);
    border-top: 1px solid var(--border-color);
}

.chatbot-input input {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    outline: none;
    font-size: 14px;
}

.chatbot-input button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    margin-left: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.typing-indicator {
    display: flex;
    padding: 10px 15px;
    background-color: var(--accent-color);
    color: var(--text-color);
    border-radius: 18px;
    margin-right: auto;
    border-bottom-left-radius: 5px;
    width: fit-content;
}

.typing-indicator span {
    height: 8px;
    width: 8px;
    background-color: var(--text-color);
    border-radius: 50%;
    display: inline-block;
    margin: 0 2px;
    animation: typing 1s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background-color);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2em;
    }

    .feature {
        min-width: 100%;
    }

    .nav-links {
        display: none;
    }

    .container {
        padding: 25px;
        margin: 20px;
    }

    .degrees-container,
    .universities-container {
        grid-template-columns: 1fr;
    }

    /* theme selector removed - responsive tweaks not needed */

    .university-filters {
        flex-direction: column;
        align-items: center;
    }

    .filter-group {
        width: 100%;
    }

    .chatbot-container {
        bottom: 10px;
        left: 10px;
    }

    .chatbot-window {
        width: 280px;
        height: 380px;
    }

    /* show nav toggle and adjust nav behavior on small screens */
    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
    }

    /* hide nav-links by default on small screens (use body.nav-open to show) */
    .nav-links {
        display: none;
    }

    /* increase tappable sizes for theme and chatbot controls */
    .theme-button, .chatbot-toggle {
        min-width: 48px;
        min-height: 48px;
        width: 48px;
        height: 48px;
    }

    /* reduce heavy decorative circles on small viewports */
    .theme-circle {
        filter: blur(30px);
        opacity: 0.08;
    }
}

/* Make interactive controls larger on small screens for easier tapping */
@media (max-width: 480px) {
    .btn, .theme-button, .theme-option {
        min-height: 48px;
        min-width: 48px;
    }

    .hero {
        padding: var(--space-2);
    }

    .container {
        margin: var(--space-2);
        padding: var(--space-2);
    }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* Confirm modal styles */
.confirm-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
.confirm-modal.show { display: flex; }
.confirm-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(2px);
}
.confirm-dialog {
    position: relative;
    background: var(--surface);
    color: var(--text-color);
    padding: var(--space-3);
    border-radius: 10px;
    width: min(520px, calc(100% - 48px));
    box-shadow: 0 12px 40px rgba(15,15,15,0.2);
    z-index: 1;
}
.confirm-dialog h3 { margin-top: 0; margin-bottom: 0.5rem; }
.confirm-dialog .confirm-message { margin-bottom: 1rem; }
.confirm-actions { display: flex; gap: 12px; justify-content: flex-end; }
.confirm-ok {
    background: var(--danger-color);
    color: #ffffff;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
}
.confirm-ok:hover { filter: brightness(0.95); }
.confirm-cancel {
    background: var(--primary-color);
    color: #ffffff;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
}
.confirm-cancel:hover { filter: brightness(0.95); }


/* Heading & base text styling (use centralized variables) */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    margin-top: 0;
}

h1 {
    font-size: var(--fs-xl);
    line-height: 1.12;
    margin-bottom: var(--space-2);
    letter-spacing: -0.02em;
}

h2 {
    font-size: var(--fs-lg);
    margin-bottom: var(--space-2);
    letter-spacing: -0.01em;
}

h3 {
    font-size: var(--fs-md);
    margin-bottom: var(--space-1);
}

p {
    margin-bottom: var(--space-2);
}

/* Hero tweaks using variable sizes */
.hero h1 {
    font-size: clamp(1.6rem, 4vw, 2.5rem);
    font-weight: 800;
    text-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.feature h3 {
    text-shadow: 0 1px 2px rgba(0,0,0,0.04);
}