/* =======================
   NAV WRAPPER
======================= */

.nav-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    width: 100%;
    background-color: var(--var-blue-dark-tech);
    border-bottom: 1px solid rgba(59, 124, 203, 0.14);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

nav {
    width: 100%;
    max-width: 1220px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 90px;
    position: relative;
}

nav .logo {
    display: flex;
    align-items: center;
    height: 100%;
    width: auto;
}

nav .logo a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

nav .logo img {
    height: 44px;
    width: auto;
    display: none;
}

navbar .logo img.logo-dark,
html:not([data-theme="light"]) nav .logo img.logo-dark {
    display: block;
}

html[data-theme="light"] nav .logo img.logo-dark {
    display: none;
}

html[data-theme="light"] nav .logo img.logo-light {
    display: block;
}

html:not([data-theme="light"]) nav .logo img.logo-light {
    display: none;
}

nav .links {
    display: flex;
    align-items: center;
    gap: 24px;
}

nav .links ul {
    list-style-type: none;
    display: flex;
    margin: 0;
    padding: 0;
    gap: 24px;
    align-items: center;
}

nav .links ul li {
    margin: 0;
}

nav .links ul li a {
    text-decoration: none;
    color: var(--var-text-white);
    font-size: 16px;
    font-weight: 500;
    padding: 8px 4px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    letter-spacing: 0.01em;
    transition: background-color .18s ease, color .12s ease;
}

nav .links ul li a:hover,
nav .links ul li a:focus {
    background-color: var(--var-hover-bg);
    color: var(--var-black-bg);
    outline: none;
}

.nav-ctas {
    display: flex;
    align-items: center;
    gap: 24px;
}

/* Light mode: plain nav links need dark text */
html[data-theme="light"] nav .links ul li a {
    color: var(--var-text-headers);
}

.contact-btn {
    position: relative;
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
    border-bottom-left-radius: 12px;
    border-top-left-radius: 0px;
    padding: 9px 18px;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    transition: background-color .18s ease, transform .20s ease;
    text-decoration: none;

    border: 1.8px solid var(--var-blue-primary);
    color: #F2F6FF;
    background-color: var(--var-blue-primary);
}

.contact-btn:hover {
    background-color: #193e80;
    border-color: #193e80;
}

/* Outline CTA button */
.offert-btn {
    position: relative;
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
    border-bottom-left-radius: 12px;
    border-top-left-radius: 0px;
    padding: 9px 18px;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    text-decoration: none;
    transition: background-color .18s ease, color .18s ease;

    border: 1.8px solid var(--var-blue-secondary);
    color: var(--var-blue-secondary) !important;
    background-color: transparent;
}

.offert-btn:hover {
    background-color: var(--var-blue-secondary) !important;
    color: #F2F6FF !important;
}

html[data-theme="light"] .offert-btn {
    color: var(--var-blue-primary) !important;
    border-color: var(--var-blue-primary);
}

html[data-theme="light"] .offert-btn:hover {
    background-color: var(--var-blue-primary) !important;
    border-color: var(--var-blue-primary);
    color: #F2F6FF !important;
}

/* NAV BAS */
.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 24px;
}

/* DESKTOP LINKS */
nav .links ul {
    display: flex;
    gap: 24px;
    align-items: center;
}

/* =======================
   HAMBURGER
======================= */

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;

    width: 28px;
    height: 28px;

    background: none;
    border: none;
    cursor: pointer;

    z-index: 1200;
    position: relative;
    z-index: 1300;

    transition: transform 0.15s ease;
}

.hamburger span {
    height: 2px;
    width: 100%;
    background: var(--var-text-white);
    border-radius: 2px;

    transition: all 0.25s ease;
}

html[data-theme="light"] .hamburger span {
    background: var(--var-text-headers);
}

.hamburger.active span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.hamburger:hover {
    transform: scale(1.08);
}

.hamburger:hover span {
    background: var(--var-blue-primary);
}

.hamburger:active {
    transform: scale(0.95);
}

/* =======================
   MOBILE MENU
======================= */

.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: min(85vw, 340px);
    height: 100%;
    background: #0f1b2e;
    border-left: 1px solid rgba(59, 124, 203, 0.2);
    box-shadow: none;
    display: flex;
    flex-direction: column;
    z-index: 1300;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.38s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}

.mobile-menu.open {
    transform: translateX(0);
    box-shadow: -12px 0 48px rgba(0, 0, 0, 0.5);
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 72px;
    border-bottom: 1px solid rgba(59, 124, 203, 0.15);
    flex-shrink: 0;
}

.mobile-menu-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.mobile-menu-logo img {
    height: 32px;
    width: auto;
}

.mobile-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    cursor: pointer;
    color: #F2F6FF;
    flex-shrink: 0;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.mobile-close:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.24);
}

.mobile-menu-body {
    padding: 20px 16px;
    flex: 1;
}

.mobile-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mobile-menu li {
    width: 100%;
}

.mobile-menu a {
    display: flex;
    align-items: center;
    width: 100%;
    color: #F2F6FF;
    font-size: 16px;
    font-weight: 500;
    padding: 13px 16px;
    border-radius: 10px;
    text-decoration: none;
    letter-spacing: 0.01em;
    transition: background 0.15s ease;
}

.mobile-menu a:hover {
    background: rgba(59, 124, 203, 0.15);
}

.mobile-menu .offert-btn {
    margin-top: 8px;
    justify-content: center;
    background: transparent;
    border: 1.5px solid #6db3f2;
    color: #6db3f2 !important;
    border-radius: 10px;
    font-weight: 600;
    padding: 14px 16px;
}

.mobile-menu .offert-btn:hover {
    background: #6db3f2;
    border-color: #6db3f2;
    color: #0f1b2e !important;
}

html[data-theme="light"] .mobile-menu .offert-btn {
    color: #6db3f2 !important;
    border-color: #6db3f2;
}

.mobile-menu .contact-btn {
    margin-top: 8px;
    justify-content: center;
    background: #1F4B99;
    border: 1.5px solid #3B7CCB;
    color: #F2F6FF;
    border-radius: 10px;
    font-weight: 600;
    padding: 14px 16px;
}

.mobile-menu .contact-btn:hover {
    background: #3B7CCB;
    border-color: #3B7CCB;
}

/* =======================
   OVERLAY
======================= */

.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 1200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.38s ease;
}

.mobile-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 868px) {

    .desktop-links {
        display: none !important;
        visibility: hidden;
        pointer-events: none;
    }

    .hamburger {
        display: flex;
    }

    .nav-right {
        gap: 12px;
    }
}

/* =======================
   THEME TOGGLE
======================= */

.theme-toggle-container {
    display: flex;
    align-items: center;
}

.theme-toggle {
    background: none;
    border: 2px solid var(--var-blue-primary);
    cursor: pointer;
    padding: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    width: 52px;
    height: 28px;
    border-radius: 14px;
    position: relative;
    transition: all 0.3s ease;
}

.theme-toggle.dark-mode {
    justify-content: flex-end;
    background-color: var(--var-blue-primary);
}

.toggle-track {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background-color: var(--var-blue-lighter-dark-tech);
    transition: background-color 0.3s ease;
}

.theme-toggle.dark-mode .toggle-track {
    background-color: var(--var-blue-primary);
}

.toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background-color: var(--var-white-cr);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.theme-toggle.dark-mode .toggle-slider {
    left: 26px;
    background-color: var(--var-black-bg);
}

.theme-icon {
    font-size: 11px;
    line-height: 1;
    transition: opacity 0.3s ease;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.sun-icon {
    opacity: 1;
}

.moon-icon {
    opacity: 0;
}

.theme-toggle.dark-mode .sun-icon {
    opacity: 0;
}

.theme-toggle.dark-mode .moon-icon {
    opacity: 1;
}

.theme-toggle:hover {
    transform: scale(1.05);
}

.theme-toggle:focus {
    outline: 2px solid var(--var-blue-primary);
    outline-offset: 2px;
}

/* =======================
   NAV MOBILE OVERRIDES
   (must come after base nav rules so they win the cascade)
======================= */
@media (max-width: 868px) {
    nav {
        height: 72px;
        padding: 0 16px;
    }

    nav .logo img {
        height: 26px;
        width: auto;
    }

    .mobile-menu-logo img {
        height: 26px;
        width: auto;
    }
}
