@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ═══════════════════════════════════════════════════════════════
   SCRS Site Navbar  —  All var() tokens come from style.css
   ═══════════════════════════════════════════════════════════════ */

/* ── Navbar-local colour tokens ─────────────────────────────── */
:root {
    --nav-brand-start: #1b4332;
    --nav-brand-end: #2C7961;
    --nav-links-bg: #358f73;
    /* slightly lighter than brand bar */
    --nav-active-line: var(--primary);
    /* green underline accent */
}

/* ── Reset scoped to the navbar wrapper ─────────────────────── */
#site-navbar {
    /* MUST be visible — overflow:hidden on any ancestor kills position:sticky */
    overflow: visible;
    width: 100%;
}

#site-navbar * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
}

/* ╔══════════════════════════════════╗
   ║  TIER 1 — Utility / Top Bar     ║
   ╚══════════════════════════════════╝ */
.nav-utility {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 4%;
    background: var(--navbar);
    /* #0F172A — global */
    border-bottom: 1px solid var(--border);
    /* rgba(141,208,105,.15) */
}

/* Search group */
.nav-search {
    display: flex;
    align-items: center;
}

.search-input {
    padding: 6px 12px;
    width: 185px;
    background: rgba(255, 255, 255, 0.88);
    border: none;
    border-radius: 4px 0 0 4px;
    color: #111;
    font-size: 13px;
    outline: none;
    transition: var(--transition);
}

.search-input::placeholder {
    color: #777;
}

.search-input:focus {
    width: 230px;
    background: var(--white);
    box-shadow: 0 0 0 2px var(--blue);
}

.search-btn {
    padding: 6px 16px;
    background: var(--blue);
    color: var(--white);
    border: none;
    border-radius: 0 4px 4px 0;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.search-btn:hover {
    background: var(--blue-dark);
}

/* Utility links (right side) */
.nav-utility-links {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 500;
}

.nav-utility-links a {
    color: var(--gray);
    text-decoration: none;
    transition: var(--transition);
    letter-spacing: 0.02em;
}

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

.nav-pipe {
    color: rgba(255, 255, 255, 0.25);
    font-size: 14px;
}

/* ╔══════════════════════════════════╗
   ║  TIER 2 — Brand / Identity Bar  ║
   ╚══════════════════════════════════╝ */
/* ===========================
   BRAND HEADER
=========================== */

.nav-brand {

    background: linear-gradient(100deg,
            var(--nav-brand-start),
            var(--nav-brand-end));
    position: relative;
    overflow: visible;
    height: 150px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 18px 60px 18px 50px;
}

.nav-brand-container {

    width: 100%;
    max-width: 1200px;

    margin: 0 auto;

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 18px 40px;


}

/* ===========================
   Globe Background
=========================== */

.nav-brand::before {

    content: "";

    position: absolute;
    inset: 0;

    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='120'%3E%3Cellipse cx='300' cy='60' rx='220' ry='55' fill='none' stroke='white' stroke-width='0.8' opacity='0.07'/%3E%3Cellipse cx='300' cy='60' rx='140' ry='55' fill='none' stroke='white' stroke-width='0.8' opacity='0.07'/%3E%3Cellipse cx='300' cy='60' rx='60' ry='55' fill='none' stroke='white' stroke-width='0.8' opacity='0.07'/%3E%3Cline x1='80' y1='60' x2='520' y2='60' stroke='white' stroke-width='0.8' opacity='0.07'/%3E%3Cline x1='300' y1='5' x2='300' y2='115' stroke='white' stroke-width='0.8' opacity='0.07'/%3E%3C/svg%3E") center center/cover no-repeat;

    pointer-events: none;

}

/* ===========================
   LEFT SECTION
=========================== */

.nav-brand-left {

    display: flex;
    align-items: center;
    gap: 20px;

    margin: 0;
    /* Remove auto */
    padding: 0;

    flex: 1;
}

/* ===========================
   LOGO LINK
=========================== */

.nav-logo-link {

    display: flex;
    align-items: center;

    text-decoration: none;

}

/* ===========================
   LOGO
=========================== */

.nav-logo {

    width: 100px;
    height: 100px;

    object-fit: cover;

    border-radius: 10%;

    border: 2px solid rgba(255, 255, 255, .35);

    box-shadow:
        0 8px 24px rgba(0, 0, 0, .45),
        0 0 0 5px rgba(141, 208, 105, .12);

    transition: 0.35s ease;

    cursor: pointer;

}

.nav-logo:hover {

    transform: scale(1.08) rotate(-3deg);

    box-shadow:
        0 12px 30px rgba(0, 0, 0, .5),
        0 0 0 6px rgba(141, 208, 105, .22);

}

/* ===========================
   BRAND TEXT
=========================== */

.nav-brand-text {

    display: flex;
    flex-direction: column;
    justify-content: center;

    color: var(--white);

}

.nav-org-name {

    margin: 0;

    font-size: clamp(18px, 2vw, 30px);

    font-weight: 800;

    letter-spacing: .04em;

    text-transform: uppercase;

    line-height: 1.25;

    text-shadow: 0 3px 12px rgba(0, 0, 0, .45);

}

.nav-org-tagline {

    margin-top: 6px;

    font-size: 13px;

    color: rgba(255, 255, 255, .72);

    font-style: italic;

    letter-spacing: .02em;

}

/* ===========================
   RIGHT SECTION
=========================== */

.nav-brand-right {

    display: flex;

    align-items: center;

    gap: 14px;

    position: relative;

    z-index: 2;

}

/* ===========================
   BUTTONS
=========================== */

.nav-auth-btn {

    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 24px;
    min-width: 110px;
    border-radius: 8px;
    height: 40px;
    text-decoration: none;
    font-size: 18px;
    font-weight: 900;
    color: var(--white);
    background: rgba(10, 15, 20, .45);
    border: 1.5px solid rgba(255, 255, 255, .35);
    backdrop-filter: blur(8px);
    transition: all .35s ease;
}

.nav-auth-btn:hover {

    background: var(--blue-dark);

    border-color: var(--blue-dark);

    transform: translateY(-2px);

    box-shadow: 0 10px 20px rgba(37, 99, 235, .35);

}

.nav-auth-btn--filled {

    background: linear-gradient(135deg,
            var(--primary),
            var(--blue));

    border: none;

}

.nav-auth-btn--filled:hover {

    background: linear-gradient(135deg,
            var(--blue),
            var(--primary));

}

/* ===========================
   RESPONSIVE
=========================== */

@media (max-width:992px) {

    .nav-brand {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        padding: 25px;
    }

    .nav-brand-left {
        width: 100%;
    }

    .nav-brand-right {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width:768px) {
    .nav-brand {
        padding: 20px;
    }

    .nav-brand-left {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .nav-brand-right {
        justify-content: center;
        width: 100%;
    }

    .nav-org-name {
        font-size: 20px;
    }

    .nav-org-tagline {
        font-size: 12px;
    }

}

@media (max-width:480px) {
    .nav-logo {
        width: 80px;
        height: 80px;
    }

    .nav-auth-btn {
        min-width: 95px;
        padding: 10px 18px;
        font-size: 13px;
    }
}

/* ╔══════════════════════════════════╗
   ║  TIER 3 — Main Nav Links Bar    ║
   ╚══════════════════════════════════╝ */
.nav-links-bar {
    /* ── Sticky behaviour ──────────────────────────────────────── */
    position: sticky;          /* stick to viewport top while scrolling    */
    top: 0;                    /* threshold: snap when bar reaches y=0     */
    z-index: 1000;             /* float above all page content             */

    /* ── Layout ───────────────────────────────────────────────── */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 52px;
    padding: 0;                /* no side-padding — list fills 100% width  */

    /* ── Visuals (default / not-yet-sticky) ───────────────────── */
    background: var(--nav-links-bg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

/* ── Pinned / scrolled state (class added by navbar-include.js) ─ */
.nav-links-bar.is-sticky {
    background    : rgba(23, 61, 47, 0.96);  /* slightly more opaque       */
    backdrop-filter: blur(12px);              /* frosted-glass when pinned  */
    -webkit-backdrop-filter: blur(12px);
    box-shadow    : 0 4px 24px rgba(0, 0, 0, 0.45),
                    0 1px 0   rgba(255, 255, 255, 0.08);
}

.nav-links-list {
    display         : flex;
    list-style      : none;
    width           : 100%;          /* fill full bar width                   */
    overflow-x      : auto;
    scrollbar-width : none;
    gap             : 0;
    flex-wrap       : nowrap;
    justify-content : space-evenly;  /* evenly distribute all links           */
    height          : 100%;
    align-items     : center;
}

.nav-links-list::-webkit-scrollbar { display: none; }

/* ==========================================
   Navigation Links
========================================== */

.nav-link {

    display: flex;
    align-items: center;
    justify-content: center;

    position: relative;

    overflow: hidden;

    padding: 15px 18px;

    color: rgba(255, 255, 255, .9);

    text-decoration: none;

    font-size: 12px;

    font-weight: 700;

    border-radius: 8px;

    transition: .35s;

}

/* Glass Background */

.nav-link::before {

    content: "";

    position: absolute;

    inset: 0;

    background: linear-gradient(135deg,
            rgba(92, 224, 22, 0.15),
            rgba(47, 128, 237, .15));

    border-radius: 8px;

    opacity: 0;

    transform: scale(.85);

    transition: all .35s ease;

    z-index: -2;

}

/* Animated Underline */

.nav-link::after {

    content: "       ";

    position: absolute;

    left: 55%;
    bottom: 15px;

    width: 0;
    height: 3px;

    background: linear-gradient(90deg,
            var(--primary),
            var(--blue));

    border-radius: 50px;

    transform: translateX(-50%);

    transition: .35s ease;

}

/* Hover */

.nav-link:hover {

    color: var(--white);

    transform: translateY(-3px);

    text-shadow: 0 0 25px var(--primary);

}

/* Hover Background */

.nav-link:hover::before {

    opacity: 0.20;

    transform: scale(1);

}

/* Hover Underline */

.nav-link:hover::after {

    width: 100%;

}

/* Active Link */

.nav-link.active {

    color: var(--white);

    background: linear-gradient(0deg,
            var(--primary),
            var(--blue));

    /* box-shadow:
        10px 0 25px var(--blue-light),
        inset 0 3px 0 var(--primary); */

}

/* Active Underline */

.nav-link.active::after {

    width: 0%;

}

/* ==========================================
   Hamburger
========================================== */

.nav-hamburger {

    display: none;

    flex-direction: column;

    gap: 5px;

    border: none;

    background: none;

    cursor: pointer;

    padding: 8px;

}

.nav-hamburger span {

    width: 25px;
    height: 2px;

    background: var(--white);

    border-radius: 2px;

    transition: .35s;

}

.nav-hamburger.open span:nth-child(1) {

    transform: translateY(7px) rotate(45deg);

}

.nav-hamburger.open span:nth-child(2) {

    opacity: 0;

}

.nav-hamburger.open span:nth-child(3) {

    transform: translateY(-7px) rotate(-45deg);

}

/* ==========================================
   Tablet
========================================== */

@media(max-width:992px) {

    .nav-logo {

        width: 75px;
        height: 75px;

    }

    .nav-org-name {

        font-size: 18px;

    }

    .nav-link {

        padding: 14px 12px;

        font-size: 11px;

    }

}

/* ==========================================
   Mobile
========================================== */

@media(max-width:768px) {

    .nav-brand {

        flex-direction: column;

        gap: 18px;

        text-align: center;

    }

    .nav-brand-left {

        flex-direction: column;

    }

    .nav-hamburger {

        display: flex;

    }

    .nav-links-list {

        display: none;

        position: absolute;

        top: 100%;

        left: 0;

        width: 100%;

        background: #0F172A;

        flex-direction: column;

        box-shadow: 0 10px 25px rgba(0, 0, 0, .3);

        border-top: 2px solid var(--primary);

        z-index: 999;

    }

    .nav-links-list.open {

        display: flex;

    }

    .nav-link {

        justify-content: flex-start;

        padding: 15px 20px;

        border-bottom: 1px solid rgba(255, 255, 255, .08);

        border-radius: 0;

        transform: none !important;

    }

    .nav-link::before {

        display: none;

    }

    .nav-link::after {

        display: none;

    }

}

/* ==========================================
   Small Mobile
========================================== */

@media(max-width:480px) {

    .nav-org-name {

        font-size: 15px;

    }

    .nav-org-tagline {

        font-size: 11px;

    }

    .nav-auth-btn {

        padding: 8px 16px;

        font-size: 12px;

    }

}

/* ==========================================
   Additional Mobile Utility Fixes
========================================== */
@media(max-width:768px) {
    .nav-utility {
        flex-direction: column;
        gap: 12px;
        padding: 15px 4%;
    }
    .search-input { width: 100%; max-width: 300px; }
    .search-input:focus { width: 100%; }
}
@media(max-width:480px) {
    .nav-utility-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
    }
}