/* ============================================================
   CO Nav Menu – Custom Elementor Widget Styles
   ============================================================ */

/* Kill browser tap highlight (the pink/purple flash on mobile) */
.co-nav-menu-wrapper a,
.co-nav-menu-wrapper button,
.co-hamburger,
.co-mobile-toggle,
.co-mobile-row > a,
.co-mobile-sub a {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

/* Remove default button outline; we add our own focus-visible styles */
.co-hamburger:focus,
.co-mobile-toggle:focus,
.co-nav-menu a:focus {
    outline: none;
}
.co-hamburger:focus-visible,
.co-mobile-toggle:focus-visible {
    outline: 2px solid rgba(255,255,255,0.7);
    outline-offset: 2px;
}
.co-nav-menu a:focus-visible {
    outline: 2px solid rgba(255,255,255,0.7);
    outline-offset: -2px;
}

.co-nav-menu-wrapper {
    display: flex;
    align-items: center;
    position: relative;
}

/* ── Desktop Nav ────────────────────────────────────────────── */

.co-nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 8px;
}

.co-nav-menu > li {
    position: relative;
}

.co-nav-menu > li > a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 18px;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.55);
    white-space: nowrap;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.co-nav-menu > li > a:hover,
.co-nav-menu > li:hover > a,
.co-nav-menu > li:focus-within > a {
    background-color: rgba(255, 255, 255, 0.12);
    border-color: #fff;
}

/* Dropdown chevron */
.co-nav-menu .co-arrow {
    transition: transform 0.25s ease;
    flex-shrink: 0;
    margin-top: 1px;
}

.co-nav-menu > li:hover > a .co-arrow,
.co-nav-menu > li:focus-within > a .co-arrow {
    transform: rotate(180deg);
}

/* Invisible bridge fills the gap so hover isn't lost moving to dropdown */
.co-nav-menu > li.co-has-children::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 8px;
}

/* Dropdown panel */
.co-sub-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 210px;
    background-color: #0d0d0d;
    border: 1px solid rgba(255, 255, 255, 0.12);
    list-style: none;
    margin: 0;
    padding: 6px 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
    z-index: 9999;
}

.co-nav-menu > li:hover > .co-sub-menu,
.co-nav-menu > li:focus-within > .co-sub-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.co-sub-menu li a {
    display: block;
    padding: 10px 20px;
    color: #fff;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    transition: background-color 0.15s ease, padding-left 0.15s ease;
}

.co-sub-menu li a:hover {
    background-color: rgba(255, 255, 255, 0.07);
    padding-left: 28px;
}

/* Last dropdown – right-align so it doesn't push off screen */
.co-nav-menu > li:last-child > .co-sub-menu {
    left: auto;
    right: 0;
}

/* Grandchildren – inline stacked */
.co-sub-menu--deep {
    position: static;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    pointer-events: auto !important;
    border: none;
    background: transparent;
    padding: 0 0 4px 12px;
}

.co-sub-menu--deep li a {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.65);
    padding: 6px 20px;
}

.co-sub-menu--deep li a:hover {
    color: #fff;
    padding-left: 28px;
}

/* ── Hamburger ──────────────────────────────────────────────── */

/* Hidden by default; JS adds .co-mobile-mode to wrapper to reveal it */
.co-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    cursor: pointer;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 0;
    z-index: 1010;
    position: relative;
    transition: border-color 0.2s ease;
}

.co-hamburger:hover {
    border-color: #fff;
}

.co-hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background-color: #fff;
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1),
                opacity   0.22s ease,
                width     0.22s ease;
    transform-origin: center;
}

/* Animate to X */
.co-hamburger.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.co-hamburger.is-active span:nth-child(2) { opacity: 0; width: 0; }
.co-hamburger.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile Mode (class toggled by JS based on data-breakpoint) ─ */

.co-nav-menu-wrapper.co-mobile-mode .co-desktop-nav {
    display: none;
}

.co-nav-menu-wrapper.co-mobile-mode .co-hamburger {
    display: flex;
}

/* ── Mobile Overlay ─────────────────────────────────────────── */

.co-mobile-overlay {
    display: flex; /* always flex; hidden via opacity + visibility */
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: #0a0a0a;
    z-index: 1000;
    flex-direction: column;
    justify-content: center;
    padding: 80px 48px 48px;
    overflow-y: auto;
    /* Hidden state */
    opacity: 0;
    visibility: hidden;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity    0.4s ease,
                visibility 0.4s ease;
    /* Don't interfere with page when hidden */
    pointer-events: none;
}

.co-mobile-overlay.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
}

/* Mobile nav list */
.co-mobile-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 640px;
}

/* Each top-level item – stagger-in on open */
.co-mobile-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.38s ease, transform 0.38s ease;
    transition-delay: calc(var(--item-index, 0) * 0.07s + 0.18s);
}

.co-mobile-overlay.is-open .co-mobile-item {
    opacity: 1;
    transform: translateY(0);
}

/* Row: link + toggle */
.co-mobile-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.co-mobile-row > a {
    flex: 1;
    display: block;
    padding: 22px 0;
    color: #fff;
    text-decoration: none;
    font-size: 42px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1;
    transition: opacity 0.2s ease;
}

.co-mobile-row > a:hover,
.co-mobile-row > a:focus-visible {
    opacity: 0.65;
}

.co-mobile-row > a:active {
    opacity: 0.4;
}

/* + toggle button */
.co-mobile-toggle {
    flex-shrink: 0;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: border-color 0.2s ease,
                transform    0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.co-mobile-toggle:hover {
    border-color: #fff;
}

.co-mobile-toggle.is-open {
    transform: rotate(45deg);
}

/* Sub-menu accordion */
.co-mobile-sub {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.co-mobile-sub.is-open {
    max-height: 800px;
}

.co-mobile-sub li a {
    display: block;
    padding: 12px 0 12px 20px;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    border-left: 2px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 2px;
    transition: color 0.2s ease, border-left-color 0.2s ease, padding-left 0.2s ease;
}

.co-mobile-sub li a:hover,
.co-mobile-sub li a:focus-visible {
    color: #fff;
    border-left-color: #fff;
    padding-left: 28px;
}

.co-mobile-sub li a:active {
    opacity: 0.5;
}

.co-mobile-sub li:last-child {
    margin-bottom: 16px;
}
