/* ============================================================
   Torai global navbar — extracted from torai.ai/css/torai.css
   so my.saol.ai pages share the exact torai.ai nav look & feel.
   Load AFTER core.css so these rules win.
   Source of truth: Torai/css/torai.css "3. NAVIGATION" section.
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
    --nav-height: 70px;
    --torai-primary: #250983;
}

/* Content must clear the fixed navbar */
body {
    padding-top: var(--nav-height);
}

.navbar {
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: saturate(180%) blur(10px);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 600;
    padding: 0 2rem;
    height: var(--nav-height);
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e6e6ec;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    height: 100%;
    margin: 0;
    padding: 0;
}
.logo img {
    height: 50px;
    width: auto;
    object-fit: contain;
    margin: 0;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0; padding: 0;
    align-items: center;
    height: 100%;
}
.nav-links a {
    text-decoration: none;
    color: #333333;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.92rem;
    font-weight: 500;
    opacity: 0.85;
    display: flex;
    align-items: center;
    transition: opacity 0.15s, color 0.15s;
}
.nav-links a:hover {
    opacity: 1;
    color: #250983;
    text-decoration: none;
}

.dropdown {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #ffffff;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 0.5rem 0;
    z-index: 2000;
    border: 1px solid #eee;
}

.dropdown:hover .dropdown-content {
    display: block;
    animation: toraiNavFadeIn 0.2s ease-in-out;
}

.dropdown-content a {
    display: block;
    padding: 10px 20px;
    white-space: nowrap;
    color: #333;
    font-size: 15px;
    text-align: left;
}
.dropdown-content a:hover {
    background-color: #f8f9fa;
    color: var(--torai-primary);
}

.dropbtn::after {
    content: " ▼";
    font-size: 0.7em;
    margin-left: 5px;
    opacity: 0.5;
}

@keyframes toraiNavFadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-6px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 22px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1002;
    margin-left: auto;
}

.hamburger span,
.hamburger .hamburger-bar {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #000000 !important;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.mobile-menu {
    position: fixed;
    top: var(--nav-height); left: 0; right: 0;
    background: #fff;
    padding: 1rem 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transform: translateY(-150%);
    transition: transform 0.3s ease;
    z-index: 1001;
    display: flex; flex-direction: column;
    max-height: 80vh;
    overflow-y: auto;
}

.mobile-menu.active { transform: translateY(0); }

.mobile-menu a {
    padding: 1rem 2rem;
    color: #333;
    text-decoration: none;
    font-size: 18px;
    border-bottom: 1px solid #eee;
    display: block;
}

.mobile-menu .dropdown {
    display: block;
    height: auto;
}
.mobile-menu .dropdown-content {
    position: static;
    display: block;
    box-shadow: none;
    transform: none;
    background: #f9f9f9;
    padding-left: 20px;
    width: 100%;
    border: none;
}
.mobile-menu .dropdown-content a {
    font-size: 16px;
    padding: 0.8rem 2rem;
}

@media (max-width: 900px) {
    .nav-links { display: none; }
    .hamburger { display: flex; }
}

/* ============================================================
   HARD OVERRIDES — my.saol.ai pages load their own navbar rules
   (core.css, dashboard.css, page-level styles) at unpredictable
   points in the cascade. Force the Torai look regardless.
   ============================================================ */
nav.navbar {
    position: fixed !important;
    top: 0 !important; left: 0 !important; right: 0 !important;
    height: var(--nav-height) !important;
    background: rgba(255, 255, 255, 0.97) !important;
    border-bottom: 1px solid #e6e6ec !important;
    padding: 0 2rem !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    z-index: 1000 !important;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

nav.navbar .nav-links {
    display: flex !important;
    gap: 2rem !important;
    align-items: center !important;
    height: 100% !important;
    margin: 0 !important; padding: 0 !important;
}

nav.navbar .nav-links a {
    white-space: nowrap !important;
    color: #333333 !important;
    font-size: 0.92rem !important;
    font-weight: 500 !important;
    line-height: 1 !important;
}

nav.navbar .nav-links a:hover { color: #250983 !important; }

nav.navbar .logo img {
    height: 50px !important;
    width: auto !important;
    max-height: 50px !important;
}

@media (max-width: 900px) {
    nav.navbar .nav-links { display: none !important; }
}
