/* ===== Global cross-cutting rules =====
   Inlined here (formerly /css/site.css). The deploy pipeline does NOT serve
   static files from wwwroot/css, so these live in this partial instead — it is
   runtime-compiled from source and rendered on every page. ===== */

/* Custom cursor — site-wide, brand green; only on fine+hover pointers.
   Text fields keep the native I-beam (intentionally excluded). */
@media (hover: hover) and (pointer: fine) {
    body {
        cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><circle cx="12" cy="12" r="8" fill="%232E7D32" opacity="0.3"/><circle cx="12" cy="12" r="3" fill="%232E7D32"/></svg>') 12 12, auto;
    }
    a, button, [role="button"], input[type="submit"], input[type="button"],
    label[for], summary, .btn-primary, .btn-secondary, .cta-nav, .gb-contact-cta,
    .gb-contact-modal-close, .search-toggle, .theme-toggle, .nav-toggle, .social-float a {
        cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10" fill="%232E7D32" opacity="0.5"/><circle cx="12" cy="12" r="4" fill="%232E7D32"/></svg>') 12 12, pointer;
    }
}

/* Dark-mode accent contrast (WCAG AA): re-tint green TEXT/icon tokens; keep
   solid green CTAs/icons on the deep gradient so white labels stay readable. */
body.dark-mode {
    --primary-orange: #5BD15F;
    --secondary-orange: #7FE3A0;
    --green: #5BD15F;
    --green-2: #7FE3A0;
    --orange: #5BD15F;
    --orange2: #7FE3A0;
}
body.dark-mode .btn-primary,
body.dark-mode .cta-nav,
body.dark-mode .service-icon,
body.dark-mode .security-point-index,
body.dark-mode .cs-hero-btn,
body.dark-mode .btn-apply,
body.dark-mode .leader-linkedin:hover {
    background: linear-gradient(135deg, #2E7D32, #43A047);
}

/* Floating social bar yields to the open mobile nav */
body.nav-open .social-float { display: none !important; }

/* WCAG 2.5.5/2.5.8 minimum touch targets for icon-only controls */
.search-toggle,
.theme-toggle,
.nav-toggle {
    min-width: 44px;
    min-height: 44px;
}

body.dark-mode #header {
    background: rgba(15, 23, 42, 0.78);
    border-bottom: 1px solid rgba(46, 125, 50, 0.2);
}

#header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid rgba(46, 125, 50, 0.1);
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#header.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

nav {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 2rem;
}

.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid rgba(46, 125, 50, 0.3);
    color: var(--primary-grey);
    padding: 0.6rem 0.8rem;
    border-radius: 10px;
}

body.dark-mode .nav-toggle {
    border-color: rgba(255, 255, 255, 0.15);
    color: #E6EDF3;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-orange), var(--secondary-orange), var(--primary-orange));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gb-header-shimmer 3s linear infinite;
    position: relative;
}

@keyframes gb-header-shimmer {
    to { background-position: 200% center; }
}

.logo::before {
    content: '\26A1';
    position: absolute;
    left: -30px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    filter: drop-shadow(0 0 10px var(--primary-orange));
}

.logo.with-image::before { display: none; }

/* Logo is a link back to the home page — strip the nav underline/hover treatment */
.logo-link { display: inline-flex; align-items: center; text-decoration: none; }
.logo-link::after { display: none !important; }
.logo-link:hover { color: inherit; }

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

/* Utility controls (search · theme · CTA) grouped so they sit together
   with consistent, tighter spacing instead of the wide text-link gap. */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.theme-toggle {
    border: 1px solid rgba(46, 125, 50, 0.25);
    background: rgba(255, 255, 255, 0.18);
    color: var(--primary-grey);
    border-radius: 999px;
    padding: 0.55rem 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.dark-mode .theme-toggle {
    background: rgba(255, 255, 255, 0.06);
    color: #E6EDF3;
}

.theme-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
}

nav a {
    color: var(--primary-grey);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-orange);
    transition: width 0.3s ease;
}

nav a:hover::after { width: 100%; }
nav a:hover { color: var(--primary-orange); }

.cta-nav {
    background: linear-gradient(135deg, var(--primary-orange), var(--secondary-orange));
    color: #fff !important;
    padding: 0.7rem 1.8rem;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
}

.cta-nav::after { display: none; }

.cta-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.4);
    color: #fff !important;
}

.nav-dropdown { position: relative; }

.nav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.nav-dropdown-toggle i {
    font-size: 0.7rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    transition: transform 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-toggle i,
.nav-dropdown:focus-within .nav-dropdown-toggle i {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    left: 0;
    top: calc(100% + 10px);
    min-width: 180px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(46, 125, 50, 0.2);
    border-radius: 12px;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.14);
    padding: 0.55rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 20;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-menu a {
    display: flex;
    align-items: center;
    min-height: 40px;
    font-size: 0.92rem;
    font-weight: 600;
    padding: 0.45rem 0.6rem;
    border-radius: 8px;
}

.nav-dropdown-menu a::after { display: none; }

.nav-dropdown-menu a:hover {
    background: rgba(46, 125, 50, 0.12);
}

/* Nested sub-dropdown */
.nav-sub-dropdown { position: relative; }
.nav-sub-dropdown > a { display: flex !important; justify-content: space-between; align-items: center; }
.nav-sub-dropdown > a .sub-arrow { font-size: 0.7rem; margin-left: .5rem; line-height: 1; display: inline-flex; align-items: center; transition: transform .2s; }

.nav-sub-menu {
    position: absolute;
    left: calc(100% + 6px);
    top: 0;
    min-width: 220px;
    background: rgba(255,255,255,0.98);
    border: 1px solid rgba(46, 125, 50,0.2);
    border-radius: 12px;
    box-shadow: 0 14px 32px rgba(0,0,0,0.14);
    padding: 0.55rem;
    opacity: 0; visibility: hidden; transform: translateX(6px);
    transition: opacity .2s, transform .2s, visibility .2s;
    z-index: 25;
}
.nav-sub-dropdown:hover > .nav-sub-menu,
.nav-sub-dropdown:focus-within > .nav-sub-menu {
    opacity: 1; visibility: visible; transform: translateX(0);
}
.nav-sub-menu a {
    display: block; font-size: 0.88rem; font-weight: 500;
    padding: 0.42rem 0.6rem; border-radius: 8px; white-space: nowrap;
}
.nav-sub-menu a::after { display: none; }
.nav-sub-menu a:hover { background: rgba(46, 125, 50,0.12); }

body.dark-mode nav a {
    color: #E6EDF3;
}

body.dark-mode nav a:hover {
    color: var(--primary-orange);
}

body.dark-mode .nav-dropdown-menu {
    background: rgba(17, 28, 51, 0.98);
    border-color: rgba(46, 125, 50, 0.35);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45);
}

body.dark-mode .nav-dropdown-menu a {
    color: #E6EDF3;
}

body.dark-mode .nav-dropdown-menu a:hover {
    background: rgba(46, 125, 50, 0.2);
    color: var(--primary-orange);
}

body.dark-mode .nav-sub-menu {
    background: rgba(17,28,51,0.98);
    border-color: rgba(46, 125, 50,0.35);
    box-shadow: 0 14px 32px rgba(0,0,0,0.45);
}
body.dark-mode .nav-sub-menu a { color: #E6EDF3; }
body.dark-mode .nav-sub-menu a:hover { background: rgba(46, 125, 50,0.2); color: var(--primary-orange); }

@media (max-width: 1180px) {
    nav { padding: 1rem 1.5rem; }

    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.4rem;
    }

    .nav-links {
        position: absolute;
        top: 72px;
        left: 1.5rem;
        right: 1.5rem;
        background: #fff;
        border-radius: 16px;
        padding: 1rem 1.2rem;
        box-shadow: 0 16px 34px rgba(0, 0, 0, 0.16);
        display: none;
        flex-direction: column;
        gap: 0.5rem;
        max-height: calc(100vh - 96px);
        overflow-y: auto;
    }

    body.dark-mode .nav-links {
        background: #0f172a;
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
    }

    .nav-links.open { display: flex; }
    .nav-links li { width: 100%; }

    /* Top-level text links: full-width, left-aligned, comfortable tap height */
    .nav-links > li > a {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        min-height: 44px;
        padding: 0.3rem 0.4rem;
    }

    /* Utility cluster: a single centered row; controls keep their natural size
       (no more full-width stretched pills) */
    .nav-actions {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.75rem;
        margin-top: 0.4rem;
    }
    .nav-actions .search-toggle,
    .nav-actions .theme-toggle {
        width: auto;
    }
    .nav-actions .cta-nav {
        flex: 0 0 100%;
        max-width: none;
        margin-top: 0.4rem;
        /* override the generic text-link rule (.nav-links > li > a) which left-aligns via flex */
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        padding: 0.7rem 1.8rem;
        text-align: center;
    }

    .nav-dropdown-menu {
        position: static;
        display: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: 0;
        background: transparent;
        padding: 0.35rem 0 0 0.6rem;
        min-width: 100%;
    }
    .nav-dropdown-menu.mobile-open { display: block; }

    .nav-dropdown-menu a {
        text-align: left;
        justify-content: flex-start;
        border: 1px solid rgba(46, 125, 50, 0.2);
        background: rgba(46, 125, 50, 0.06);
    }

    .nav-sub-menu {
        position: static;
        display: none;
        opacity: 1; visibility: visible; transform: none;
        box-shadow: none; border: 0; background: transparent;
        padding: 0.25rem 0 0; min-width: 100%;
    }
    .nav-sub-menu.mobile-open { display: block; }
    .nav-sub-menu a {
        text-align: left; font-size: 0.85rem;
        border: 1px solid rgba(46, 125, 50,0.15);
        background: rgba(46, 125, 50,0.03);
    }
}

/* ── SEARCH TOGGLE ─────────────────────────────────────── */
.search-toggle {
    border: 1px solid rgba(46, 125, 50,0.25);
    background: rgba(255,255,255,0.18);
    color: var(--primary-grey);
    border-radius: 999px; padding: 0.55rem 0.85rem;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, color .2s ease;
}
body.dark-mode .search-toggle { background: rgba(255,255,255,0.06); color: #E6EDF3; }
.search-toggle:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(0,0,0,.15); color: var(--primary-orange); }

/* ── SEARCH OVERLAY ────────────────────────────────────────*/
.search-overlay {
    position: fixed; inset: 0; z-index: 9999;
    display: flex; align-items: flex-start; justify-content: center;
    padding-top: 11vh;
    pointer-events: none; opacity: 0;
    transition: opacity .18s ease;
}
.search-overlay.open { pointer-events: all; opacity: 1; }
.search-backdrop {
    position: absolute; inset: 0;
    background: rgba(8,12,24,.56);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.search-panel {
    position: relative; z-index: 1;
    width: min(640px, 92vw);
    background: #fff; border-radius: 18px;
    box-shadow: 0 32px 80px rgba(0,0,0,.22), 0 0 0 1px rgba(0,0,0,.06);
    overflow: hidden;
    transform: scale(.94) translateY(-14px);
    transition: transform .22s cubic-bezier(.34,1.56,.64,1);
}
.search-overlay.open .search-panel { transform: scale(1) translateY(0); }
body.dark-mode .search-panel {
    background: #0f172a;
    box-shadow: 0 32px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(46, 125, 50,.15);
}
.search-input-row {
    display: flex; align-items: center; gap: .75rem;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid rgba(0,0,0,.07);
}
body.dark-mode .search-input-row { border-bottom-color: rgba(255,255,255,.08); }
.search-panel-icon { color: var(--primary-orange); font-size: 1.05rem; flex-shrink: 0; }
.search-panel-input {
    flex: 1; border: none; outline: none;
    font-size: 1.05rem; font-family: inherit;
    background: transparent; color: var(--primary-grey);
    caret-color: var(--primary-orange);
}
body.dark-mode .search-panel-input { color: #e6edf3; }
.search-panel-input::placeholder { color: #aab4bf; }
.search-esc-hint {
    font-size: .7rem; color: #aab4bf;
    border: 1px solid rgba(0,0,0,.12); border-radius: 5px;
    padding: .12rem .42rem; font-family: inherit; flex-shrink: 0;
}
body.dark-mode .search-esc-hint { border-color: rgba(255,255,255,.12); color: #5a7080; }
.search-results-box { max-height: 418px; overflow-y: auto; }
.sr-status { padding: 1.2rem; font-size: .88rem; color: #9aabba; text-align: center; }
.sr-hr { height: 1px; background: rgba(0,0,0,.055); margin: 0 1.1rem; }
body.dark-mode .sr-hr { background: rgba(255,255,255,.055); }
.sr-item {
    display: flex; flex-direction: column; gap: .18rem;
    padding: .82rem 1.2rem; text-decoration: none; color: inherit;
    transition: background .13s; cursor: pointer;
}
.sr-item:hover, .sr-item.focused { background: rgba(46, 125, 50,.08); }
body.dark-mode .sr-item:hover, body.dark-mode .sr-item.focused { background: rgba(46, 125, 50,.13); }
.sr-title { font-size: .96rem; font-weight: 700; color: var(--primary-grey); line-height: 1.3; }
body.dark-mode .sr-title { color: #dce6f0; }
.sr-url { font-size: .76rem; color: var(--primary-orange); }
.sr-excerpt { font-size: .82rem; color: #7a8d9e; line-height: 1.5; }
body.dark-mode .sr-excerpt { color: #5a7080; }
.sr-tag { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: #aab4bf; }
@media (max-width: 600px) { .search-esc-hint { display: none; } }
