/* ==========================================
   THEME TOKENS (permanent light)
   Brand-dark chrome (navbar strip, hero, AI
   banner, dark buttons) sits alongside these
   as always-dark accents by design — those are
   hardcoded (#0f172a etc.) in their own rules,
   not tokenized, so they're untouched by this
   light palette on purpose.
   ========================================== */
:root {
    --bg-page: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-alt: #f1f5f9;
    --bg-surface-hover: #e2e8f0;

    --text-heading: #0f172a;
    --text-body: #334155;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-tertiary: #475569;

    --border-color: #e2e8f0;
    --border-strong: #cbd5e1;

    --brand-blue: #3b82f6;
    --shadow-color: rgba(0, 0, 0, 0.06);
    --shadow-color-strong: rgba(0, 0, 0, 0.12);

    color-scheme: light;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
    background-color: var(--bg-page);
    color: var(--text-body);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ==========================================
   1. TOP NAVBAR & BRAND LOGO
   ========================================== */
.navbar {
    background: var(--bg-surface);
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    box-shadow: 0 1px 4px var(--shadow-color);
    width: 100%;
    transition: background-color 0.3s ease;
}

.logo {
    display: flex !important;
    align-items: center !important;
    gap: 10px;
    cursor: pointer;
}

.brand-logo-img, .brand-logo-svg {
    height: 50px;
    width: auto;
    display: inline-block;
    object-fit: contain;
    vertical-align: middle;
}

.logo-text {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-heading);
    line-height: 1;
    white-space: nowrap;
}

.logo-text span {
    color: #2563eb;
}

/* ==========================================
   2. SUB-NAVBAR & TOGGLE MENU (EXACT LEFT ALIGN)
   ========================================== */
.sub-navbar {
    width: 100%;
    background: #0f172a;
    padding: 8px 0; /* Horizontal padding 0, controlled by container */
    border-top: 1px solid #1e293b;
    position: relative;
    z-index: 100;
}

.sub-nav-container {
    width: 100%;
    padding: 0 40px; /* Matches top navbar's exact 40px padding */
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Forces absolute left alignment */
    gap: 20px;
    position: relative; /* anchors the vertical course-menu-items dropdown */
}

.course-menu-wrapper {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
}

.course-toggle-btn {
    margin: 0 !important;
    background: rgba(255, 255, 255, 0.1);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 7px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    flex-shrink: 0;
    white-space: nowrap;
}

.course-toggle-btn:hover {
    background: #2563eb;
    border-color: #2563eb;
}

.toggle-arrow {
    font-size: 11px;
    transition: transform 0.3s ease;
}

.toggle-arrow.rotate {
    transform: rotate(180deg);
}

.course-menu-items {
    display: none; /* Initially hidden */
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%; /* matches the toggle button's own width via .course-menu-wrapper */
    max-height: 320px;
    overflow-y: auto;
    overflow-x: hidden;
    white-space: normal;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
    z-index: 200;
}

.course-menu-items.active {
    display: flex; /* Shown when toggled */
}

.course-menu-items span {
    display: block;
    box-sizing: border-box;
    width: 100%;
    text-align: left;
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 9px 10px;
    border-radius: 6px;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.course-menu-items span:hover {
    color: #38bdf8;
    background: rgba(255, 255, 255, 0.06);
}

/* Hide Scrollbar for Course Items */
.course-menu-items::-webkit-scrollbar,
.sub-nav-container::-webkit-scrollbar {
    display: none;
}
.course-menu-items,
.sub-nav-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ==========================================
   3. HERO CAROUSEL SECTION
   ========================================== */
.hero {
    position: relative;
    height: 520px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    background-color: #0f172a;
}

.slider-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: 100% 100% !important;
    background-position: center !important;
    transition: background-image 0.8s ease-in-out;
    z-index: 1;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.55);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 850px;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 25px;
}

/* Search Bar */
.search-container {
    display: flex;
    background: var(--bg-surface);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 25px var(--shadow-color-strong);
    margin: 0 auto 25px auto;
    max-width: 700px;
}

.search-container input {
    flex: 1;
    padding: 18px 20px;
    border: none;
    outline: none;
    font-size: 15px;
    color: var(--text-tertiary);
    background: var(--bg-surface);
}

.search-container button {
    background: #ff6b00;
    color: white;
    border: none;
    padding: 0 35px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.search-container button:hover {
    background: #e05d00;
}

/* Category Chips */
.course-nav {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.course-chip {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid rgba(255,255,255,0.3);
}

.course-chip:hover {
    background: white;
    color: #0f172a;
}

/* Blended College Name Caption */
.hero-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 4;
    padding: 60px 40px 22px;
    background: linear-gradient(to top, rgba(11, 18, 32, 0.85) 0%, rgba(11, 18, 32, 0.35) 60%, transparent 100%);
    text-align: left;
    pointer-events: none;
}

.hero-caption span {
    font-size: 15px;
    font-weight: 600;
    color: #f8fafc;
    letter-spacing: 0.2px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Dotted Slide Navigation */
.hero-dots {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.hero-dot:hover {
    background: rgba(255, 255, 255, 0.75);
}

.hero-dot.active {
    width: 24px;
    border-radius: 4px;
    background: #38bdf8;
}

/* ==========================================
   4. MITRAA AI FEATURE BANNER
   ========================================== */
.ai-banner-card {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    border-radius: 16px;
    padding: 30px;
    color: white;
    display: flex;
    align-items: center;
    gap: 30px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.15);
}

.ai-banner-content {
    flex: 1;
}

.ai-badge {
    background: rgba(99, 102, 241, 0.2);
    color: #a855f7;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 12px;
}

.ai-banner-content h2 {
    font-size: 28px;
    margin-bottom: 10px;
}

.ai-banner-content h2 span {
    color: #38bdf8;
}

.ai-banner-content p {
    font-size: 14px;
    color: #94a3b8;
    margin-bottom: 20px;
}

.ai-courses-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.ai-chip {
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    color: #cbd5e1;
}

.ai-banner-btn {
    background: #2563eb;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.ai-banner-image {
    width: 320px;
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
}

.ai-banner-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================
   5. GRID SECTIONS (GOALS, SERVICES, COLLEGES)
   ========================================== */
.section-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-heading);
}

/* Goal Cards */
.goal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.goal-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    gap: 15px;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.3s ease, border-color 0.3s ease;
}

.goal-card:hover {
    transform: translateY(-3px);
}

.goal-icon {
    width: 45px;
    height: 45px;
    background: var(--bg-surface-alt);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-blue);
    font-size: 20px;
    flex-shrink: 0;
}

.goal-info h3 {
    font-size: 17px;
    color: var(--text-heading);
    font-weight: 700;
}

.college-count {
    font-size: 12px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 10px;
}

.sub-courses {
    list-style: none;
}

.sub-courses li {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    position: relative;
    padding-left: 12px;
}

.sub-courses li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--border-strong);
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 20px;
}

.service-card {
    background: var(--bg-surface);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: transform 0.2s, background-color 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden; /* clips the oversized watermark icon at the card edge */
}

.service-card:hover {
    transform: translateY(-4px);
}

/* Large faded watermark of the card's OWN icon — gives each card a
   visual anchor tied to what it's actually about, instead of an
   arbitrary index number that carried no real meaning once color
   already grouped the cards. */
.service-icon-bg {
    position: absolute;
    top: -12px;
    right: -6px;
    font-size: 72px;
    line-height: 1;
    z-index: 0;
    pointer-events: none;
    transition: transform 0.3s ease;
}

.service-card:hover .service-icon-bg {
    transform: scale(1.08) rotate(-4deg);
}

/* Small uppercase eyebrow label — this is what actually teaches the
   eye that these 7 services fall into two different kinds of help,
   not just one long undifferentiated list. */
.service-category {
    position: relative;
    z-index: 1;
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.service-icon {
    position: relative;
    z-index: 1;
    width: 45px;
    height: 45px;
    background: var(--bg-surface-hover);
    color: var(--brand-blue);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 12px;
}

.service-card h3 {
    position: relative;
    z-index: 1;
    font-size: 16px;
    margin-bottom: 6px;
    color: var(--text-heading);
}

.service-card p {
    position: relative;
    z-index: 1;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Small "learn more" arrow, hidden until hover — signals these cards
   are actually clickable, which nothing else in the card currently
   communicates. */
.service-hover-arrow {
    position: relative;
    z-index: 1;
    display: block;
    margin-top: 12px;
    font-size: 12px;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.service-card:hover .service-hover-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Category coloring — "Plan & choose" stays on the existing brand
   blue (no new color needed, these are the research/decision-stage
   services). "Grow & get hired" gets a second accent (teal) that
   isn't already used elsewhere in the UI (orange is the AI-chat
   accent, green is WhatsApp/status) so it reads as its own distinct
   group rather than colliding with an existing meaning. */
.service-card.cat-plan .service-icon-bg,
.service-card.cat-plan .service-hover-arrow { color: var(--brand-blue); }
.service-card.cat-plan .service-icon-bg { opacity: 0.14; }
.service-card.cat-plan .service-category { color: var(--brand-blue); }
.service-card.cat-plan .service-icon {
    background: rgba(59, 130, 246, 0.14);
    color: var(--brand-blue);
}

.service-card.cat-career .service-icon-bg,
.service-card.cat-career .service-hover-arrow { color: #14b8a6; }
.service-card.cat-career .service-icon-bg { opacity: 0.16; }
.service-card.cat-career .service-category { color: #14b8a6; }
.service-card.cat-career .service-icon {
    background: rgba(20, 184, 166, 0.14);
    color: #14b8a6;
}

/* Featured Colleges Grid — horizontally scrollable row instead of
   wrapping/stacking, so adding more colleges to COLLEGES extends the
   row sideways instead of growing the page taller. Native touch
   scroll (finger drag) works here for free via overflow-x; mouse
   click-and-drag scrolling is wired up separately in
   college-explorer.js (setupRowDragScroll), since a mouse has no
   native horizontal-drag-to-scroll behavior the way touch does. */
.colleges-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 20px;
    padding-bottom: 8px; /* room for the scrollbar so it doesn't clip cards */
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
}

.colleges-grid.is-dragging {
    cursor: grabbing;
    scroll-snap-type: none; /* don't fight an active mouse drag */
    user-select: none; /* avoid selecting card text mid-drag */
}

/* Slim, unobtrusive scrollbar instead of the browser default (Chrome/
   Edge/Safari; Firefox falls back to its own thin default via
   scrollbar-width below). Purely cosmetic — remove if you'd rather
   keep the OS-default scrollbar. */
.colleges-grid::-webkit-scrollbar {
    height: 6px;
}
.colleges-grid::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}
.colleges-grid {
    scrollbar-width: thin;
}

.college-card {
    background: var(--bg-surface);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    flex: 0 0 280px; /* fixed width so cards sit side by side, not stretch */
    scroll-snap-align: start;
}

.college-img {
    height: 160px;
    background-size: cover;
    background-position: center;
    position: relative;
    padding: 10px;
    /* Claims horizontal touch gestures for the per-card photo swipe
       (setupCardImageSwipe in college-explorer.js) and leaves vertical
       page scroll to the browser. Without this, a touch-drag on the
       image would ALSO trigger the row's native horizontal scroll
       underneath it, changing the photo and scrolling the row at once. */
    touch-action: pan-y;
}

.rating-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(15, 23, 42, 0.8);
    color: #facc15;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
}

.college-body {
    padding: 15px;
}

.college-body h3 {
    font-size: 16px;
    color: var(--text-heading);
    margin-bottom: 4px;
}

.college-loc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.course-tag {
    display: inline-block;
    font-size: 11px;
    background: var(--bg-surface-alt);
    padding: 4px 8px;
    border-radius: 4px;
    color: var(--text-tertiary);
    margin-bottom: 12px;
}

.view-btn {
    width: 100%;
    background: #0f172a;
    color: white;
    border: none;
    padding: 8px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

/* Program Grid */
.program-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

.program-card {
    background: var(--bg-surface);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.card-badge {
    background: var(--bg-surface-hover);
    color: var(--brand-blue);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

/* ==========================================
   6. MODAL & NEWSLETTER SECTION
   ========================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-box {
    background: var(--bg-surface);
    color: var(--text-body);
    padding: 35px 40px;
    border-radius: 16px;
    text-align: center;
    max-width: 420px;
    width: 90%;
    transition: background-color 0.3s ease;
}

.close-btn {
    background: #0f172a;
    color: white;
    padding: 10px 25px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.newsletter-section {
    background: var(--bg-surface-alt);
    padding: 45px 20px;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    text-align: center;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

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

.newsletter-container h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 6px;
}

.newsletter-container p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 25px;
}

.form-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.input-group {
    position: relative;
    flex: 1 1 180px;
    max-width: 220px;
}

.input-group i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
}

.input-group input, .input-group select {
    width: 100%;
    padding: 12px 12px 12px 38px;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    outline: none;
    font-size: 13px;
    background: var(--bg-surface);
    color: var(--text-body);
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.input-group input:focus, .input-group select:focus {
    border-color: var(--brand-blue);
}

#studentCourse:invalid {
    opacity: 0.6;
}

#studentCourse option {
    color: var(--text-body);
    background: var(--bg-surface);
    opacity: 1;
}

.submit-btn {
    background: #ff6b00;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.submit-btn:hover {
    background: #e05d00;
}

/* ==========================================
   7. FOOTER SECTION
   ========================================== */
.site-footer {
    background: var(--bg-surface);
    padding: 40px 20px 20px 20px;
    color: var(--text-secondary);
    font-size: 13px;
    transition: background-color 0.3s ease;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 30px;
}

.footer-col h4 {
    font-size: 15px;
    color: var(--text-heading);
    margin-bottom: 14px;
    font-weight: 700;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-col ul li a:hover {
    color: var(--brand-blue);
}

.footer-col ul li a[href*="wa.me"]:hover {
    color: #25D366;
}
.footer-col ul li a[href*="wa.me"] i {
    color: #25D366;
}

.footer-divider {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 20px 0;
}

.footer-sub-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.other-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.other-links a {
    color: var(--text-secondary);
    text-decoration: none;
}

.other-links a:hover {
    color: var(--brand-blue);
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    font-size: 17px;
    text-decoration: none;
    transition: transform 0.2s ease, filter 0.2s ease;
    display: inline-flex;
}

.social-icons a i.fa-facebook-f {
    color: #1877F2;
}

.social-icons a i.fa-instagram {
    color: #E4405F;
}

.social-icons a i.fa-x-twitter {
    color: #f1f5f9; /* X's mark is black/white by brand convention — white reads correctly on this dark surface */
}

.social-icons a i.fa-youtube {
    color: #FF0000;
}

.social-icons a i.fa-linkedin-in {
    color: #0A66C2;
}

.social-icons a:hover {
    transform: translateY(-3px);
    filter: brightness(1.2);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.brand-copyright {
    display: flex;
    align-items: center;
    gap: 15px;
}

.brand-copyright .logo-text {
    font-weight: 700;
    font-size: 18px;
    color: var(--text-heading);
}

.brand-copyright .logo-text span {
    color: var(--brand-blue);
}

.brand-copyright p {
    color: var(--text-muted);
    font-size: 12px;
}

/* ==========================================
   8. AI CHATBOT CONTAINER STYLING
   ========================================== */
.ai-chat-container {
    position: fixed;
    bottom: 112px;
    right: 20px;
    width: 400px;
    height: 620px;
    max-height: calc(100vh - 140px); /* don't overflow short desktop windows */
    background: var(--bg-surface);
    border-radius: 16px;
    box-shadow: 0 10px 30px var(--shadow-color-strong);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 9999;
    border: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.ai-chat-header {
    background: #0f172a;
    color: white;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-dot {
    height: 8px;
    width: 8px;
    background-color: #22c55e;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

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

.ai-chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--bg-page);
    transition: background-color 0.3s ease;
}

.message {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.4;
}

.ai-msg {
    background: var(--bg-surface-hover);
    color: var(--text-heading);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.user-msg {
    background: #2563eb;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.ai-chat-input {
    display: flex;
    padding: 10px;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.ai-chat-input input {
    flex: 1;
    border: 1px solid var(--border-strong);
    padding: 8px 12px;
    border-radius: 6px;
    outline: none;
    font-size: 13px;
    background: var(--bg-surface);
    color: var(--text-body);
}

.ai-chat-input button {
    background: #ff6b00;
    color: white;
    border: none;
    padding: 8px 14px;
    margin-left: 6px;
    border-radius: 6px;
    cursor: pointer;
}

/* ==========================================
   FLOATING MITRAA AI TOGGLE
   ========================================== */
.floating-actions {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    z-index: 998;
}

.back-to-top-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: var(--brand-blue);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    cursor: pointer;
    box-shadow: 0 4px 14px var(--shadow-color-strong);
    transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
    opacity: 0;
    transform: translateY(10px) scale(0.9);
    pointer-events: none;
}

.back-to-top-btn.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.back-to-top-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px var(--shadow-color-strong);
}

.back-to-top-btn i {
    font-size: 14px;
    line-height: 1;
}

.back-to-top-btn span {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1;
}

.ai-float-widget {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.ai-float-btn {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(168, 85, 247, 0.4);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ai-float-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.5);
}

.ai-float-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid #a855f7;
    animation: ai-float-pulse 2.4s ease-out infinite;
}

@keyframes ai-float-pulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

.ai-float-icon {
    width: 30px;
    height: 30px;
    transition: transform 0.2s ease;
}

.ai-float-btn:hover .ai-float-icon {
    transform: scale(1.1) rotate(-5deg);
}

.ai-float-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-heading);
    background: var(--bg-surface);
    padding: 4px 12px;
    border-radius: 10px;
    box-shadow: 0 2px 8px var(--shadow-color);
    white-space: nowrap;
    border: 1px solid var(--border-color);
}

/* ==========================================
   9. MOBILE & TABLET RESPONSIVE FIXES
   ========================================== */
@media screen and (max-width: 768px) {
    .navbar {
        padding: 0 15px;
        height: auto;
        min-height: 60px;
    }

    .logo {
        font-size: 20px;
    }

    .ai-float-btn {
        width: 50px;
        height: 50px;
    }

    .back-to-top-btn {
        width: 50px;
        height: 50px;
    }

    .ai-float-icon {
        width: 26px;
        height: 26px;
    }

    /* Full-screen chat on mobile — the 340x480 corner box this used to
       be either overflowed or crowded a small viewport, and there was
       no mobile override for it at all before this. Note: the bot's
       own replies (e.g. "scroll down to see matches") assume the page
       behind the chat is reachable — that still works here because
       closing the chat (X button) returns to the already-scrolled
       page underneath, same as before, just via a close tap instead
       of glancing sideways at a floating box. */
    .ai-chat-container {
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        border: none;
        z-index: 10000; /* above the navbar/float button while open */
    }

    .sub-navbar {
        padding: 8px 0;
    }

    .sub-nav-container {
        padding: 0 15px; /* Matches mobile navbar padding */
    }

    .hero {
        height: auto;
        padding: 40px 0;
    }

    .hero-content h1 {
        font-size: 26px;
        margin-bottom: 18px;
    }

    .search-container {
        flex-direction: row;
        width: 100%;
    }

    .search-container input {
        padding: 12px 14px;
        font-size: 13px;
    }

    .search-container button {
        padding: 0 18px;
        font-size: 13px;
    }

    .hero-caption {
        padding: 40px 20px 16px;
    }

    .hero-caption span {
        font-size: 13px;
    }

    .hero-dots {
        bottom: 12px;
    }

    .ai-banner-card {
        flex-direction: column;
        padding: 20px;
    }

    .ai-banner-image {
        width: 100%;
        height: 160px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}
/* ==========================================
   COLLEGE EXPLORER: FILTERS, COMPARE, SHORTLIST, ELIGIBILITY
   ========================================== */

.college-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.college-filters select {
    background: var(--bg-surface);
    color: var(--text-body);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    cursor: pointer;
}

.empty-state {
    color: var(--text-secondary);
    padding: 30px 10px;
    text-align: center;
    grid-column: 1 / -1;
}

/* Heart / save button on college cards */
.heart-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(11, 18, 32, 0.65);
    border: none;
    color: var(--text-secondary);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, transform 0.15s ease;
}

.heart-btn:hover {
    transform: scale(1.08);
}

.heart-btn.saved {
    color: #ef4444;
}

.fee-preview {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 6px;
}

.card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
}

.compare-check {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
}

/* Floating compare bar */
.compare-bar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-surface-alt);
    border: 1px solid var(--border-strong);
    color: var(--text-heading);
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: 0 6px 20px var(--shadow-color-strong);
    display: flex;
    align-items: center;
    gap: 18px;
    z-index: 900;
}

.compare-bar-actions {
    display: flex;
    gap: 8px;
}

.compare-view-btn, .compare-clear-btn, .whatsapp-share-btn {
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
}

.compare-view-btn {
    background: var(--brand-blue);
    color: white;
}

.compare-clear-btn {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

/* WhatsApp's own brand green — intentionally not var(--brand-blue),
   since the recognizable green is what signals "this shares to
   WhatsApp" at a glance, the same way the icon does. */
.whatsapp-share-btn {
    background: #25d366;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.whatsapp-share-btn:hover {
    background: #1fb855;
}

.compare-share-btn {
    margin-top: 14px;
}

/* Compare modal table */
.compare-modal-box, .shortlist-panel-box {
    max-width: 700px;
    text-align: left;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
}

.close-btn-icon {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    font-size: 14px;
}

.compare-table th, .compare-table td {
    border: 1px solid var(--border-color);
    padding: 10px 12px;
    text-align: left;
}

.compare-table th {
    background: var(--bg-surface-alt);
    color: var(--text-heading);
}

/* Group card (e.g. Oriental Group of Institutes) */
.campus-count-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(37, 99, 235, 0.9);
    color: #ffffff;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
}

.group-compare-hint {
    font-size: 12px;
    color: var(--text-secondary);
    font-style: italic;
}

/* Group campus modal */
.group-modal-box {
    max-width: 760px;
    text-align: left;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
}

.group-campus-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 12px;
}

.group-campus-card {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 14px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-surface-alt);
}

.group-campus-img {
    background-size: cover;
    background-position: center;
    position: relative;
    min-height: 120px;
}

.group-campus-body {
    padding: 12px 14px 12px 0;
}

.group-campus-body h4 {
    font-size: 15px;
    color: var(--text-heading);
    margin-bottom: 8px;
}

.group-campus-courses {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-bottom: 10px;
}

.group-campus-courses th, .group-campus-courses td {
    border: 1px solid var(--border-color);
    padding: 6px 8px;
    text-align: left;
}

.group-campus-courses th {
    background: var(--bg-surface);
    color: var(--text-heading);
}

.view-campuses-link {
    background: none;
    border: none;
    color: #38bdf8;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.shortlist-row-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

@media screen and (max-width: 600px) {
    .group-campus-card {
        grid-template-columns: 1fr;
    }
    .group-campus-body {
        padding: 0 14px 14px 14px;
    }
}

/* Shortlist nav button */
.shortlist-nav-btn {
    position: relative;
    background: none;
    border: none;
    color: var(--text-body);
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
}

.shortlist-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
}

.shortlist-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

.remove-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
}

/* Eligibility checker — now a hand-off to Mitraa AI chat, not an
   inline form. See .elig-ai-trigger below and ai-chat.js's
   startEligibilityInChat() / runEligibilityMatchInChat(). */
.eligibility-section {
    text-align: center;
}

.section-subtitle {
    color: var(--text-secondary);
    margin: -10px 0 24px;
    font-size: 15px;
}

.elig-ai-trigger {
    color: var(--brand-blue);
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 3px;
    transition: text-decoration-color 0.15s ease, color 0.15s ease;
}

.elig-ai-trigger:hover,
.elig-ai-trigger:focus-visible {
    text-decoration-color: var(--brand-blue);
    color: #2563eb;
}

.elig-ai-trigger i {
    font-size: 0.7em;
    margin-left: 2px;
}

/* Eligibility results rendered as chat bot messages (see .ai-msg) */
.chat-elig-result {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
}

.chat-elig-result:first-of-type {
    border-top: none;
}

.chat-elig-disclaimer {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

/* AI chat quick replies */
.ai-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 14px;
    border-top: 1px solid var(--border-color);
}

.ai-quick-replies button {
    background: var(--bg-surface-alt);
    color: var(--text-body);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
}

.ai-quick-replies button:hover {
    background: var(--bg-surface-hover);
}

/* ==========================================
   AUTH: LOGIN / REGISTER
   ========================================== */

.auth-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface-alt);
    border: 1px solid var(--border-color);
    color: var(--text-body);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    padding: 0;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.auth-nav-btn:hover {
    background: var(--bg-surface-hover);
}

.auth-nav-btn.logged-in {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.auth-nav-btn.logged-in:hover {
    background: #1d4ed8;
}

.auth-modal-box {
    max-width: 380px;
}

.auth-modal-logo {
    display: block;
    height: 44px;
    width: auto;
    margin: 4px auto 16px;
}

.auth-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-surface-alt);
    border-radius: 10px;
    padding: 4px;
    margin: 10px 0 20px;
}

.auth-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 9px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
}

.auth-tab.active {
    background: var(--brand-blue);
    color: white;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-form input {
    background: var(--bg-surface);
    color: var(--text-body);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 14px;
}

.auth-form button[type="submit"] {
    background: var(--brand-blue);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 4px;
}

.auth-disclaimer {
    margin-top: 16px;
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: flex-start;
    gap: 6px;
    line-height: 1.4;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.shortlist-row .compare-check {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.shortlist-compare-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
}

.shortlist-compare-hint {
    font-size: 12px;
    color: var(--text-secondary);
}

.shortlist-compare-actions .compare-view-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.auth-error {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    margin-bottom: 14px;
}

/* College card image slider */
.img-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(11, 18, 32, 0.55);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s ease, background-color 0.2s ease;
}

.college-img:hover .img-nav-btn {
    opacity: 1;
}

.img-nav-btn:hover {
    background: rgba(11, 18, 32, 0.85);
}

.img-nav-prev { left: 8px; }
.img-nav-next { right: 8px; }

.img-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
}

.img-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.img-dot.active {
    background: #fff;
    transform: scale(1.3);
}
/* ==========================================
   PHOTO GALLERY LIGHTBOX
   ========================================== */
/* Reuses .modal-overlay (already fixed/full-viewport/dark backdrop),
   but the box itself is deliberately NOT .modal-box — a photo viewer
   wants to be big and mostly-image, not a small centered card with
   heading + body padding like every other modal here. */
.gallery-box {
    width: 100%;
    max-width: 720px;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding: 0 16px;
}

.gallery-close {
    /* Fixed to the viewport, not the gallery-box — the box can grow
       taller than the screen on a tall photo or short viewport, which
       was pushing this button above the visible area entirely. */
    position: fixed;
    top: 16px;
    right: 16px;
    color: white;
    font-size: 26px;
    z-index: 1001; /* modal-overlay itself is z-index: 1000 — this needs to sit above it now that it's position: fixed relative to the viewport, not a child stacking context inside the overlay */
    /* Solid dark circle behind the icon — plain white text with no
       backdrop was disappearing against light-colored photos. Same
       treatment as .gallery-nav-btn below, for the same reason. */
    background: rgba(0, 0, 0, 0.55);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.gallery-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

.gallery-image-wrap {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-image {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 10px;
    object-fit: contain;
    background: #000;
}

.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.55);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-nav-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.gallery-prev { left: 8px; }
.gallery-next { right: 8px; }

.gallery-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 12px;
    color: white;
    font-size: 14px;
}

.gallery-caption {
    font-weight: 600;
}

.gallery-counter {
    color: rgba(255, 255, 255, 0.65);
    font-size: 13px;
}

.gallery-dots {
    display: flex;
    gap: 6px;
    margin-top: 10px;
}

.gallery-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
}

.gallery-dot.active {
    background: #fff;
    transform: scale(1.3);
}

@media screen and (max-width: 768px) {
    .gallery-image {
        max-height: 55vh;
    }
}

/* ==========================================
   REGISTER PAGE (full-page multi-step form)
   ========================================== */
.register-page-body {
    background: var(--bg-page);
    min-height: 100vh;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.register-page-wrap {
    max-width: 560px;
    margin: 0 auto;
    padding: 32px 20px 60px;
}

.register-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 20px;
}

.register-back-link:hover {
    color: var(--text-body);
}

.register-page-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px 28px;
}

.register-page-logo {
    display: block;
    height: 44px;
    width: auto;
    margin: 0 auto 20px;
}

/* Deliberately the loudest visual element on the page after the logo —
   this is the whole point of shipping the page before the backend
   exists. Amber/warning color, not the site's usual blue, so it reads
   as "pay attention" rather than blending in as routine copy. */
.register-proto-banner {
    display: flex;
    gap: 10px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #fbbf24;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 12.5px;
    line-height: 1.5;
    margin-bottom: 24px;
}

.register-proto-banner i {
    margin-top: 2px;
}

.register-proto-banner strong {
    display: block;
    color: #fcd34d;
    margin-bottom: 2px;
}

.register-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 28px;
}

.register-step {
    flex: 1;
    text-align: center;
    position: relative;
}

.register-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 14px;
    left: 55%;
    width: 90%;
    height: 2px;
    background: var(--border-color);
    z-index: 0;
}

.register-step.active:not(:last-child)::after,
.register-step.done:not(:last-child)::after {
    background: var(--brand-blue);
}

.register-step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-surface-alt);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 700;
    margin: 0 auto 6px;
    position: relative;
    z-index: 1;
}

.register-step.active .register-step-num,
.register-step.done .register-step-num {
    background: var(--brand-blue);
    border-color: var(--brand-blue);
    color: white;
}

.register-step-label {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
}

.register-step.active .register-step-label {
    color: var(--text-body);
    font-weight: 600;
}

.register-fieldset {
    display: none;
    flex-direction: column;
    border: none;
    padding: 0;
    margin: 0;
}

.register-fieldset.active {
    display: flex;
}

.register-sensitive-note {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    color: var(--text-muted);
    margin: 0 0 14px;
}

.register-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-body);
    margin-bottom: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.register-label-hint {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-muted);
}

.register-input {
    background: var(--bg-page);
    color: var(--text-body);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 11px 14px;
    font-size: 14px;
    margin-bottom: 16px;
    font-family: inherit;
}

.register-input:focus {
    outline: none;
    border-color: var(--brand-blue);
}

.register-btn-row {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.register-next-btn, .register-back-btn {
    flex: 1;
    border-radius: 8px;
    padding: 12px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
}

.register-next-btn {
    background: var(--brand-blue);
    color: white;
}

.register-back-btn {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

/* Step 1 has no back button, so its next button spans full width on
   its own rather than sitting in a .register-btn-row split. */
.register-fieldset[data-step="1"] .register-next-btn {
    margin-top: 4px;
}

.register-success-box {
    background: var(--bg-surface-alt);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 18px;
    margin-top: 20px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-body);
}

.register-success-box strong {
    color: var(--text-heading);
}

/* Required-field asterisk + validation error state — shared by the
   login form (index.html) and the full register page (register.html) */
.required-asterisk {
    color: #f87171;
}

.register-input.input-error,
.auth-form input.input-error {
    border-color: #f87171;
}

/* Base: safe default with no pre-existing margin to fight against —
   this is what the login form's .auth-field context uses as-is. */
.field-error-msg {
    display: none;
    color: #f87171;
    font-size: 11.5px;
    margin: 4px 0 0;
}

/* Register page's .register-input already carries its own
   margin-bottom: 16px (spacing before the next label) — without this
   override, an error message would end up sitting 16px+ below the
   input instead of snug beneath it. Scoped here only, since the login
   form's inputs have no such margin to compensate for. */
.register-fieldset .field-error-msg {
    margin: -12px 0 14px;
}

/* Login modal: compact label above each field, replacing the
   placeholder-only pattern so the required asterisk stays visible
   even after the person starts typing (a placeholder disappears on
   input, which would make the "required" cue vanish right when it's
   needed). */
.auth-field {
    display: flex;
    flex-direction: column;
}

.auth-field label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-body);
    margin-bottom: 5px;
}
