﻿/* ==========================================================================
   0) THEME VARIABLES & ROOT
   ========================================================================== */
:root {
    --bs-primary: #003366; /* Deep Navy */
    --bs-primary-rgb: 0, 51, 102;
    --bs-secondary: #6c757d;
    --brand-accent: #d4af37; /* Gold */
    --brand-maroon: #8A1538; /* Academic Maroon */
    --bs-light: #f8f9fa;
    --bs-dark: #212529;
    --bs-font-sans-serif: 'Poppins', sans-serif;
    --nav-height: 76px;
}

/* ======================================================================
   DARK MODE SYSTEM (data-theme)
   ====================================================================== */

/* Light theme defaults */
:root {
    --app-bg: #ffffff;
    --app-surface: #ffffff;
    --app-surface-2: #f8f9fa;
    --app-text: #212529;
    --app-muted: #6c757d;
    --app-border: rgba(0,0,0,.10);
    --app-shadow: 0 10px 26px rgba(0,0,0,.08);
    --app-link: #0d6efd;
    --app-link-hover: #0a58ca;
    --app-input-bg: #ffffff;
    --app-input-text: #212529;
    --app-input-border: #ced4da;
}

/* Dark theme overrides */
html[data-theme="dark"] {
    --app-bg: #0b0f14;
    --app-surface: #0f172a;
    --app-surface-2: #121826;
    --app-text: #e5e7eb;
    --app-muted: #9aa4b2;
    --app-border: rgba(255,255,255,.12);
    --app-shadow: 0 10px 28px rgba(0,0,0,.45);
    --app-link: #7ab7ff;
    --app-link-hover: #a8d4ff;
    --app-input-bg: #0b1220;
    --app-input-text: #e5e7eb;
    --app-input-border: rgba(255,255,255,.18);
}

/* Global base */
html, body {
    background-color: var(--app-bg);
    color: var(--app-text);
}

/* Links */
a {
    color: var(--app-link);
}

    a:hover {
        color: var(--app-link-hover);
    }

/* Surfaces */
.nav-sticky-wrap {
    background: var(--app-surface);
    border-bottom: 1px solid var(--app-border);
}

#mainNavbar.navbar {
    background-color: var(--app-surface) !important;
}

.card,
.dropdown-menu,
.modal-content,
.offcanvas,
.list-group-item {
    background-color: var(--app-surface-2);
    color: var(--app-text);
    border-color: var(--app-border);
}

/* Your branding + nav text colors */
.brand-title,
.navbar-nav .nav-link,
.navbar .navbar-text {
    color: var(--app-text) !important;
}

.brand-slogan {
    color: var(--app-muted) !important;
}

/* Nav underline still uses --bs-primary; keep it visible in dark */
html[data-theme="dark"] .navbar-nav .nav-link::after {
    opacity: .9;
}

/* Fix Bootstrap bg-white in dark mode (your navbar uses bg-white) */
html[data-theme="dark"] .bg-white {
    background-color: var(--app-surface) !important;
}

/* Muted text */
.text-muted,
.footer-muted {
    color: var(--app-muted) !important;
}

/* Forms */
.form-control,
.form-select,
.form-control-sm,
.form-select-sm {
    background-color: var(--app-input-bg) !important;
    color: var(--app-input-text) !important;
    border-color: var(--app-input-border) !important;
}

    .form-control::placeholder {
        color: rgba(154,164,178,.85);
    }

    .form-control:focus,
    .form-select:focus {
        box-shadow: 0 0 0 .25rem rgba(122,183,255,.20) !important;
        border-color: rgba(122,183,255,.55) !important;
    }

/* Tables */
.table {
    color: var(--app-text);
}

html[data-theme="dark"] .table > :not(caption) > * > * {
    background-color: transparent;
    border-bottom-color: var(--app-border);
}

html[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(255,255,255,.03);
}

/* Footer */
.site-footer {
    background-color: var(--app-surface);
    color: var(--app-text);
    border-top: 1px solid var(--app-border);
}

.footer-divider {
    border-color: var(--app-border);
}

/* Buttons */
html[data-theme="dark"] .btn-outline-secondary {
    color: var(--app-text);
    border-color: var(--app-border);
}

    html[data-theme="dark"] .btn-outline-secondary:hover {
        background-color: rgba(255,255,255,.08);
        border-color: rgba(255,255,255,.22);
    }

















/* ==========================================================================
   1) BASE UI & TYPOGRAPHY
   ========================================================================== */
body {
    font-family: var(--bs-font-sans-serif);
    overflow-x: hidden;
}

    /* Adjust padding when navbar becomes fixed to prevent content jump */
    body.nav-is-fixed {
        padding-top: var(--nav-height);
    }

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
}

.btn {
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.2s ease-in-out;
}

.card {
    border: none;
    border-radius: 0.75rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .card:hover {
        transform: translateY(-5px);
        box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.1) !important;
    }

/* ==========================================================================
   2) LUXURY HEADER & NAVIGATION (FIXED ON SCROLL)
   ========================================================================== */
.site-header {
    position: relative;
    z-index: 1040;
}

/* Top Bar: Stays at the top and scrolls away naturally */
.top-bar {
    height: 42px;
    background: linear-gradient(90deg, var(--brand-maroon), #6F102C);
    color: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    font-size: 0.85rem;
}

    .top-bar a {
        color: inherit;
        text-decoration: none;
        transition: color 0.2s;
    }

        .top-bar a:hover {
            color: #fff;
        }

/* Navbar Wrapper */
.nav-sticky-wrap {
    width: 100%;
    background: #ffffff;
    z-index: 1050;
    border-bottom: 1px solid rgba(0,0,0,.06);
}

    /* State triggered by JS when scrolling down */
    .nav-sticky-wrap.is-fixed {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        box-shadow: 0 8px 26px rgba(0,0,0,.08);
        animation: slideDown 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    }

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }

    to {
        transform: translateY(0);
    }
}

#mainNavbar {
    min-height: var(--nav-height);
    padding: 0.5rem 0;
}

/* Logo and Branding */
.brand-logo {
    height: 44px;
    width: auto;
    transition: transform 0.3s ease;
}

.brand-text {
    line-height: 1.2;
}

.brand-title {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--bs-dark);
}

.brand-slogan {
    display: block;
    font-size: 0.75rem;
    color: var(--bs-secondary);
}

/* Nav Links Underline Effect */
.navbar-nav .nav-link {
    font-weight: 500;
    position: relative;
    padding: 0.5rem 1rem;
    color: var(--bs-dark);
}

    .navbar-nav .nav-link::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 1rem;
        right: 1rem;
        height: 2px;
        background-color: var(--bs-primary);
        transform: scaleX(0);
        transition: transform 0.3s ease;
    }

    .navbar-nav .nav-link:hover::after,
    .navbar-nav .nav-link.active::after {
        transform: scaleX(1);
    }

/* ==========================================================================
   3) RTL (RIGHT-TO-LEFT) ADJUSTMENTS
   ========================================================================== */
[dir="rtl"] .brand-text {
    text-align: right;
}

[dir="rtl"] .navbar-brand {
    flex-direction: row-reverse;
    gap: 15px;
}

[dir="rtl"] .ms-auto {
    margin-right: auto !important;
    margin-left: 0 !important;
}

[dir="rtl"] .me-2 {
    margin-left: 0.5rem !important;
    margin-right: 0 !important;
}

/* ==========================================================================
   4) COMPONENTS (CARDS, SERVICES, HERO)
   ========================================================================== */
/* Hero Slider */
.hero-slide-image {
    height: 75vh;
    min-height: 500px;
    background-position: center;
    background-size: cover;
    position: relative;
}

/* Service Cards */
.service-card {
    padding: 40px 30px;
    background: #fff;
    border: 1px solid #eef0f2;
    border-radius: 1rem;
    text-align: center;
}

.service-icon {
    margin: 0 auto 25px;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(var(--bs-primary-rgb), 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

    .service-icon i {
        color: var(--bs-primary);
        font-size: 2rem;
    }

.service-card:hover .service-icon {
    background: var(--brand-accent);
    color: #fff;
}

/* Course Uniform Cards */
.course-card .card-title {
    height: 3.2em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ==========================================================================
   5) FLOATING BUTTONS
   ========================================================================== */
.floating-buttons {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 1020;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.floating-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    text-decoration: none;
    transition: all 0.3s ease;
}

.whatsapp-btn {
    background-color: #25D366;
    font-size: 1.5rem;
}

.back-to-top-btn {
    background-color: var(--bs-primary);
    visibility: hidden;
    opacity: 0;
    transform: scale(0.8);
}

    .back-to-top-btn.show {
        visibility: visible;
        opacity: 1;
        transform: scale(1);
    }

/* ==========================================================================
   6) FOOTER
   ========================================================================== */
.site-footer {
    background: #0f0f12;
    color: rgba(255,255,255,0.7);
    padding-top: 4rem;
}

.footer-heading {
    color: #fff;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    transition: 0.3s;
}

    .footer-links a:hover {
        color: var(--brand-accent);
        transform: translateX(5px);
    }

[dir="rtl"] .footer-links a:hover {
    transform: translateX(-5px);
}

.footer-contact .contact-row {
    display: flex;
    gap: 12px;
    margin-bottom: 1rem;
}

.footer-contact i {
    color: var(--brand-maroon);
}

.footer-divider {
    border-color: rgba(255,255,255,0.1);
}

.btn-footer {
    background: var(--brand-maroon);
    color: #fff;
    border: none;
}

/* ==========================================================================
   7) ANIMATIONS & UTILS
   ========================================================================== */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: 0.6s ease-out;
}

    .fade-in-section.is-visible {
        opacity: 1;
        transform: translateY(0);
    }

.text-gold {
    color: var(--brand-accent) !important;
}

.bg-gold {
    background-color: var(--brand-accent) !important;
}

/* ===========================
   PROFESSIONAL FOOTER UPGRADE
   =========================== */

.site-footer {
    background: linear-gradient(90deg, var(--brand-maroon), #6F102C);
    color: rgba(255, 255, 255, 0.85);
}

.footer-brand:hover .footer-title {
    color: #fff;
}

.footer-text {
    max-width: 520px;
    color: rgba(255,255,255,0.72);
    line-height: 1.7;
}

.footer-heading {
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.85rem;
    letter-spacing: .2px;
}

/* Links */
.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: rgba(255,255,255,0.82);
    text-decoration: none;
    opacity: 0.92;
    transition: color .2s ease, opacity .2s ease, transform .2s ease, background-color .2s ease;
    padding: 0.25rem 0.35rem;
    border-radius: 10px;
}

    .footer-link:hover {
        color: #ffffff;
        opacity: 1;
        background: rgba(255,255,255,0.06);
        transform: translateX(2px);
    }

html[dir="rtl"] .footer-link:hover {
    transform: translateX(-2px);
}

/* Active link state */
.footer-link.active,
.footer-link[aria-current="page"] {
    color: #ffffff;
    opacity: 1;
    background: rgba(212,175,55,0.16);
    border: 1px solid rgba(212,175,55,0.22);
}

/* Icons in links */
.footer-link i {
    color: rgba(212,175,55,0.95);
}

/* Social buttons */
.footer-social .social-btn {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.10);
    color: rgba(255,255,255,0.90);
    transition: transform .2s ease, background-color .2s ease, border-color .2s ease;
}

    .footer-social .social-btn:hover {
        background: rgba(212,175,55,0.18);
        border-color: rgba(212,175,55,0.28);
        transform: translateY(-2px);
    }

/* Contact rows */
.footer-contact .contact-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.footer-contact i {
    color: #8A1538;
    margin-top: 2px;
}

/* Newsletter */
.footer-input {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    color: #fff;
}

    .footer-input::placeholder {
        color: rgba(255,255,255,0.55);
    }

.footer-divider {
    border-color: rgba(255,255,255,0.10);
}

.footer-muted {
    color: rgba(255,255,255,0.62);
}

.footer-mini-link {
    color: rgba(255,255,255,0.82);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.55rem;
    border-radius: 10px;
    transition: background-color .2s ease, transform .2s ease, color .2s ease;
}

    .footer-mini-link:hover {
        background: rgba(255,255,255,0.06);
        color: #fff;
        transform: translateY(-1px);
    }

.btn-footer {
    background-color: #8A1538;
    border-color: #8A1538;
    color: #fff;
}

    .btn-footer:hover {
        background-color: #6F102C;
        border-color: #6F102C;
        color: #fff;
    }

/* Footer logo sizing */
.footer-logo {
    height: 32px; /* was 44px */
    width: auto;
    max-width: 140px; /* prevents very wide logos */
    object-fit: contain;
}


/* ================================
   AUTH BUTTONS (NAVBAR)
================================ */

.auth-actions {
    display: flex;
    align-items: center;
}

/* Shared base style */
.btn-auth {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.45rem 1.1rem;
    border-radius: 999px; /* pill shape */
    transition: all 0.25s ease;
    white-space: nowrap;
}

    /* Icon sizing */
    .btn-auth i {
        font-size: 1.05rem;
        line-height: 1;
    }

/* REGISTER (outline, refined) */
.btn-auth-outline {
    color: var(--bs-primary);
    border: 1.5px solid var(--bs-primary);
    background: transparent;
}

    .btn-auth-outline:hover {
        background-color: rgba(var(--bs-primary-rgb), 0.08);
        color: var(--bs-primary);
        transform: translateY(-1px);
    }

/* LOGIN (primary action) */
.btn-auth-primary {
    background: linear-gradient(135deg, var(--brand-maroon), #6F102C);
    border: none;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(138, 21, 56, 0.35);
}

    .btn-auth-primary:hover {
        background: linear-gradient(135deg, #6F102C, var(--brand-maroon));
        box-shadow: 0 6px 18px rgba(138, 21, 56, 0.45);
        transform: translateY(-1px);
    }

/* Active / focus accessibility */
.btn-auth:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.35);
}

/* ================================
   RTL SUPPORT
================================ */

[dir="rtl"] .btn-auth {
    flex-direction: row-reverse;
}

    [dir="rtl"] .btn-auth i {
        margin-left: 0;
        margin-right: 0;
    }

.ad-sticky {
    position: sticky;
    top: 92px; /* must be >= navbar height */
}

.ad-card {
    background: #fff;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 6px 18px rgba(0,0,0,.04);
}

    .ad-card img, .ad-card video {
        max-height: 320px;
        object-fit: cover;
    }

.ad-card-cta i {
    font-size: 1.2rem;
    color: var(--brand-maroon);
}


/* ==========================================================
   DARK MODE – IMPROVE LOW-CONTRAST TEXT VISIBILITY
   ========================================================== */

html[data-theme="dark"] .text-muted,
html[data-theme="dark"] .brand-slogan,
html[data-theme="dark"] .card-text,
html[data-theme="dark"] p small,
html[data-theme="dark"] .small {
    color: #cbd5e1 !important; /* brighter gray-blue */
}
html[data-theme="dark"] .navbar-nav .nav-link::after {
    background-color: #7ab7ff; /* brighter accent */
    opacity: 1;
}
html[data-theme="dark"] .section-subtitle,
html[data-theme="dark"] .hero-subtitle {
    color: #dbeafe;
}

/* Smooth theme transition (Light <-> Dark) */
html.theme-transition,
html.theme-transition * {
    transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease, box-shadow 200ms ease, fill 200ms ease, stroke 200ms ease;
}


/* ==========================================================
   Navbar user dropdown text color by theme
   ========================================================== */

/* Light mode → dark text */
html[data-theme="light"] #navbarUserDropdown {
    color: #212529 !important; /* Bootstrap text-dark */
}

/* Dark mode → light text */
html[data-theme="dark"] #navbarUserDropdown {
    color: #f8fafc !important; /* bright, readable */
}

    html[data-theme="dark"] #navbarUserDropdown:hover,
    html[data-theme="dark"] #navbarUserDropdown:focus {
        color: #ffffff !important;
    }


/* ==========================================================
   Dropdown menu items & divider – theme-aware colors
   ========================================================== */

/* Light mode (explicit, safe) */
html[data-theme="light"] .dropdown-menu .dropdown-item {
    color: #212529; /* Bootstrap text-dark */
}

/* Dark mode dropdown item text */
html[data-theme="dark"] .dropdown-menu .dropdown-item {
    color: #e5e7eb;
}

    /* Dark mode hover / focus */
    html[data-theme="dark"] .dropdown-menu .dropdown-item:hover,
    html[data-theme="dark"] .dropdown-menu .dropdown-item:focus {
        background-color: rgba(255, 255, 255, 0.08);
        color: #ffffff;
    }

    /* Icons inside dropdown items */
    html[data-theme="dark"] .dropdown-menu .dropdown-item i {
        color: #93c5fd; /* slightly brighter accent */
    }

/* Dropdown divider */
html[data-theme="light"] .dropdown-divider {
    border-top-color: rgba(0, 0, 0, 0.12);
}

html[data-theme="dark"] .dropdown-divider {
    border-top-color: rgba(255, 255, 255, 0.25);
}


/* ==========================================================
   Footer contact block – theme-aware colors
   ========================================================== */

/* Light mode */
html[data-theme="light"] .footer-contact .contact-row {
    color: #e5e7eb; /* readable text */
}

    html[data-theme="light"] .footer-contact .contact-row span {
        color: #cbd5e1; /* slightly softer than main text */
    }

    html[data-theme="light"] .footer-contact .contact-row i {
        color: #93c5fd; /* brighter icon accent */
    }

html[data-theme="light"] .footer-contact .footer-link {
    color: #eaf2ff; /* bright but not harsh */
}

    html[data-theme="light"] .footer-contact .footer-link:hover {
        color: #ffffff;
        text-decoration: underline;
    }
/* Dark mode */
html[data-theme="dark"] .footer-contact .contact-row {
    color: #e5e7eb; /* readable text */
}

    html[data-theme="dark"] .footer-contact .contact-row span {
        color: #cbd5e1; /* slightly softer than main text */
    }

    html[data-theme="dark"] .footer-contact .contact-row i {
        color: #93c5fd; /* brighter icon accent */
    }

html[data-theme="dark"] .footer-contact .footer-link {
    color: #eaf2ff; /* bright but not harsh */
}

    html[data-theme="dark"] .footer-contact .footer-link:hover {
        color: #ffffff;
        text-decoration: underline;
    }

/* ==========================================================
   Navbar toggler icon – dark mode visibility fix
   ========================================================== */

/* Dark mode: make hamburger icon light */
html[data-theme="dark"] .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.35);
}

html[data-theme="dark"] .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(248,250,252,0.95)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
/* ==========================================================
   Navbar collapse menu (mobile) – dark mode styling
   ========================================================== */

/* The expanded/collapsed area background */
html[data-theme="dark"] .navbar-collapse {
    background-color: var(--app-surface) !important; /* consistent with your dark surfaces */
    border: 1px solid var(--app-border);
    border-radius: 14px;
    padding: 10px 12px;
    margin-top: 10px;
    box-shadow: var(--app-shadow);
}

    /* Nav links inside collapse */
    html[data-theme="dark"] .navbar-collapse .navbar-nav .nav-link {
        color: var(--app-text) !important;
        border-radius: 10px;
        padding: 10px 12px;
    }

        /* Hover / active feel */
        html[data-theme="dark"] .navbar-collapse .navbar-nav .nav-link:hover,
        html[data-theme="dark"] .navbar-collapse .navbar-nav .nav-link:focus {
            background-color: rgba(255, 255, 255, 0.06);
            color: #ffffff !important;
        }

    /* Dropdown menu inside collapsed navbar */
    html[data-theme="dark"] .navbar-collapse .dropdown-menu {
        background-color: var(--app-surface-2) !important;
        border-color: var(--app-border) !important;
        box-shadow: none;
    }

        /* Dropdown items (in case not already covered) */
        html[data-theme="dark"] .navbar-collapse .dropdown-menu .dropdown-item {
            color: var(--app-text) !important;
            border-radius: 10px;
        }

            html[data-theme="dark"] .navbar-collapse .dropdown-menu .dropdown-item:hover,
            html[data-theme="dark"] .navbar-collapse .dropdown-menu .dropdown-item:focus {
                background-color: rgba(255, 255, 255, 0.08);
                color: #ffffff !important;
            }

            /**/
////////////////////////////////////////////
/* ==========================================================
   PROFESSIONAL NAVBAR DESIGN (Desktop + Mobile)
   Works with your existing HTML
   ========================================================== */
#mainNavbar {
    position: relative;
    padding-top: 10px;
    padding-bottom: 10px;
}

/* Make navbar feel premium */
#mainNavbar.navbar {
    border-bottom: 1px solid var(--app-border);
    box-shadow: 0 6px 18px rgba(0,0,0,.05);
}

html[data-theme="dark"] #mainNavbar.navbar {
    box-shadow: 0 10px 28px rgba(0,0,0,.35);
}

/* Brand */
#mainNavbar .navbar-brand {
    gap: 10px;
    padding: 6px 0;
}

#mainNavbar .brand-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

#mainNavbar .brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

#mainNavbar .brand-title {
    font-weight: 800;
    letter-spacing: .2px;
    font-size: 1.05rem;
    color: var(--app-text) !important;
}

#mainNavbar .brand-slogan {
    margin-top: 2px;
    font-size: .82rem;
    color: var(--app-muted) !important;
}

/* Center nav */
#mainNavbar .navbar-nav {
    gap: 4px;
}

    #mainNavbar .navbar-nav .nav-link {
        position: relative;
        font-weight: 600;
        font-size: .95rem;
        color: var(--app-text) !important;
        padding: 9px 12px;
        border-radius: 12px;
    }

        #mainNavbar .navbar-nav .nav-link:hover,
        #mainNavbar .navbar-nav .nav-link:focus {
            background-color: rgba(0,0,0,.05);
            text-decoration: none;
        }

html[data-theme="dark"] #mainNavbar .navbar-nav .nav-link:hover,
html[data-theme="dark"] #mainNavbar .navbar-nav .nav-link:focus {
    background-color: rgba(255,255,255,.06);
}

/* Active state (MVC adds 'active' sometimes; you can also add it manually) */
#mainNavbar .navbar-nav .nav-link.active {
    background-color: rgba(13,110,253,.10);
}

html[data-theme="dark"] #mainNavbar .navbar-nav .nav-link.active {
    background-color: rgba(122,183,255,.14);
}

/* Utility cluster on the right */
#mainNavbar .ms-auto.d-flex.align-items-center {
    gap: 10px;
}

#mainNavbar #themeToggle {
    border-radius: 12px;
    padding: 7px 10px;
    line-height: 1;
}

/* Optional: make language flag button match height (if your partial uses .btn-language-flag) */
#mainNavbar .btn-language-flag {
    border-radius: 12px;
}

/* Toggler styling */
#mainNavbar .navbar-toggler {
    border-radius: 12px;
    padding: 8px 10px;
}

/* Mobile adjustments */
@media (max-width: 991.98px) {

    #mainNavbar {
        padding-top: 8px;
        padding-bottom: 8px;
    }

        #mainNavbar .brand-logo {
            width: 38px;
            height: 38px;
        }

        /* Keep brand clean on mobile */
        #mainNavbar .brand-slogan {
            display: none; /* recommended for mobile */
        }

        /* Center menu becomes vertical - improved touch targets */
        #mainNavbar .navbar-nav .nav-link {
            padding: 12px 12px;
            border-radius: 12px;
        }

        /* Keep utility controls aligned at the top of the collapse */
        #mainNavbar .navbar-collapse .ms-auto {
            margin-top: 10px;
            padding-top: 10px;
            border-top: 1px solid var(--app-border);
        }
}

/* ==========================================================
   Navbar nav-item framing – BOTH light & dark modes
   ========================================================== */

/* Base nav link shape (both modes) */
#mainNavbar .navbar-nav .nav-link {
    position: relative;
    font-weight: 600;
    font-size: .95rem;
    padding: 9px 12px;
    border-radius: 12px;
    transition: background-color .2s ease, box-shadow .2s ease;
}

/* ---------- LIGHT MODE ---------- */

/* Light hover frame */
html[data-theme="light"] #mainNavbar .navbar-nav .nav-link:hover,
html[data-theme="light"] #mainNavbar .navbar-nav .nav-link:focus {
    background-color: rgba(0, 0, 0, 0.045);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

/* Light active frame */
html[data-theme="light"] #mainNavbar .navbar-nav .nav-link.active {
    background-color: rgba(13, 110, 253, 0.08);
    box-shadow: inset 0 0 0 1px rgba(13, 110, 253, 0.25);
}

/* ---------- DARK MODE (keep your beautiful look) ---------- */

html[data-theme="dark"] #mainNavbar .navbar-nav .nav-link:hover,
html[data-theme="dark"] #mainNavbar .navbar-nav .nav-link:focus {
    background-color: rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

html[data-theme="dark"] #mainNavbar .navbar-nav .nav-link.active {
    background-color: rgba(122, 183, 255, 0.14);
    box-shadow: inset 0 0 0 1px rgba(122, 183, 255, 0.35);
}

/* ==========================================================
   Navbar center menu container frame – BOTH MODES
   ========================================================== */

/* Target the UL that holds the nav items */
#mainNavbar .navbar-nav {
    padding: 6px;
    border-radius: 18px;
}

/* ---------- LIGHT MODE FRAME ---------- */
html[data-theme="light"] #mainNavbar .navbar-nav {
    background-color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* ---------- DARK MODE FRAME (keep as-is / reinforce) ---------- */
html[data-theme="dark"] #mainNavbar .navbar-nav {
    background-color: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* ==========================================================
   REMOVE OUTER COLLAPSE FRAME – DARK MODE ONLY
   ========================================================== */

html[data-theme="dark"] .navbar-collapse {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin-top: 0 !important;
}

/* ==========================================================
   DARK MODE MOBILE – Inner nav list as a floating sheet
   ========================================================== */

@media (max-width: 991.98px) {

    /* The UL becomes the "sheet" */
    html[data-theme="dark"] #mainNavbar #navbarContent > .navbar-nav {
        background-color: rgba(15, 23, 42, 0.92); /* deep navy sheet */
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 18px;
        padding: 10px;
        margin-top: 10px;
        box-shadow: 0 18px 45px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    }

        /* Nav links inside sheet */
        html[data-theme="dark"] #mainNavbar #navbarContent > .navbar-nav .nav-link {
            border-radius: 14px;
            padding: 12px 12px;
        }

            /* Optional: active stands out more inside sheet */
            html[data-theme="dark"] #mainNavbar #navbarContent > .navbar-nav .nav-link.active {
                background-color: rgba(122, 183, 255, 0.16);
                box-shadow: inset 0 0 0 1px rgba(122, 183, 255, 0.35);
            }
}
@media (max-width: 991.98px) {
    html[data-theme="dark"] #mainNavbar #navbarContent > .navbar-nav {
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
}