/* =========================================================
   NIDO RELOAD - HEADER
   Desktop dropdown + mobile off-canvas menu
   ========================================================= */

:root {
    --nido-header-height: 94px;
    --nido-header-height-mobile: 76px;
    --nido-header-bg: #0c0f0e;
    --nido-header-bg-soft: rgba(12, 15, 14, 0.96);
    --nido-header-line: rgba(255, 255, 255, 0.11);
    --nido-header-text: rgba(255, 255, 255, 0.86);
    --nido-header-text-muted: rgba(255, 255, 255, 0.58);
}

.nido-header {
    position: sticky;
    z-index: 1000;
    top: 0;
    width: 100%;
    border-bottom: 1px solid var(--nido-header-line);
    background: var(--nido-header-bg-soft);
    color: var(--nido-white);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: box-shadow 220ms ease, background 220ms ease;
}

.nido-header.is-scrolled {
    background: rgba(9, 12, 11, 0.985);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
}

.nido-header__inner {
    width: min(calc(100% - (var(--nido-gutter) * 2)), 1440px);
    min-height: var(--nido-header-height);
    margin-inline: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: clamp(32px, 4vw, 76px);
}

/* Brand / custom logo loaded from WordPress */
.nido-header__brand {
    min-width: 0;
    display: flex;
    align-items: center;
}

.nido-header__brand .custom-logo-link,
.nido-header__brand .custom-logo {
    display: block;
}

.nido-header__brand .custom-logo-link {
    line-height: 0;
}

.nido-header__brand .custom-logo {
    width: auto;
    height: auto;
    max-width: 235px;
    max-height: 62px;
    object-fit: contain;
}

.nido-header__site-name {
    color: var(--nido-white);
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* Main navigation */
.nido-nav {
    min-width: 0;
    justify-self: center;
}

.nido-nav__catalog {
    display: none;
}

.nido-nav__menu,
.nido-nav__menu .sub-menu {
    margin: 0;
    padding: 0;
    list-style: none;
}

.nido-nav__menu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(24px, 2.35vw, 46px);
}

.nido-nav__menu > li {
    position: relative;
}

.nido-nav__menu a {
    color: var(--nido-header-text);
}

.nido-nav__menu > li > a {
    position: relative;
    display: flex;
    min-height: var(--nido-header-height);
    align-items: center;
    padding: 4px 0 0;
    font-size: 0.7rem;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: color 180ms ease;
}

.nido-nav__menu > li > a::after {
    position: absolute;
    right: 0;
    bottom: 26px;
    left: 0;
    height: 1px;
    background: var(--nido-green);
    content: '';
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform 220ms ease;
}

.nido-nav__menu > li:hover > a,
.nido-nav__menu > li:focus-within > a,
.nido-nav__menu > .current-menu-item > a,
.nido-nav__menu > .current-menu-ancestor > a {
    color: var(--nido-white);
}

.nido-nav__menu > li:hover > a::after,
.nido-nav__menu > li:focus-within > a::after,
.nido-nav__menu > .current-menu-item > a::after,
.nido-nav__menu > .current-menu-ancestor > a::after {
    transform: scaleX(1);
    transform-origin: left center;
}

/* Desktop dropdowns - supports more menu levels */
.nido-nav__menu .sub-menu {
    position: absolute;
    z-index: 20;
    top: calc(100% - 14px);
    left: 50%;
    width: max-content;
    min-width: 270px;
    max-width: 340px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    background: rgba(14, 17, 16, 0.985);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.34);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 12px);
    transition: opacity 180ms ease, transform 220ms ease, visibility 180ms ease;
}

.nido-nav__menu .sub-menu::before {
    position: absolute;
    right: 0;
    bottom: 100%;
    left: 0;
    height: 16px;
    content: '';
}

.nido-nav__menu li:hover > .sub-menu,
.nido-nav__menu li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.nido-nav__menu .sub-menu li {
    position: relative;
}

.nido-nav__menu .sub-menu a {
    position: relative;
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 11px 14px;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.73);
    font-size: 0.76rem;
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: 0.045em;
    text-transform: uppercase;
    transition: background 160ms ease, color 160ms ease, padding-left 160ms ease;
}

.nido-nav__menu .sub-menu a:hover,
.nido-nav__menu .sub-menu a:focus-visible,
.nido-nav__menu .sub-menu .current-menu-item > a,
.nido-nav__menu .sub-menu .current-menu-ancestor > a {
    padding-left: 18px;
    background: rgba(255, 255, 255, 0.065);
    color: var(--nido-white);
}

.nido-nav__menu .sub-menu .menu-item-has-children > a::after {
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    border-top: 1px solid currentColor;
    border-right: 1px solid currentColor;
    content: '';
    transform: rotate(45deg);
}

.nido-nav__menu .sub-menu .sub-menu {
    top: -10px;
    left: calc(100% + 8px);
    transform: translate(10px, 0);
}

.nido-nav__menu .sub-menu li:hover > .sub-menu,
.nido-nav__menu .sub-menu li:focus-within > .sub-menu {
    transform: translate(0, 0);
}

/* Header actions */
.nido-header__actions {
    justify-self: end;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.nido-header__cta {
    display: inline-flex;
    min-width: 170px;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 13px;
    border: 1px solid var(--nido-green);
    border-radius: 999px;
    background: var(--nido-green);
    color: var(--nido-white);
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: background 180ms ease, border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.nido-header__cta svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 180ms ease;
    display: none;
}

.nido-header__cta:hover,
.nido-header__cta:focus-visible {
    border-color: var(--nido-green-dark);
    background: var(--nido-green-dark);
    box-shadow: 0 10px 30px rgba(106, 168, 66, 0.2);
    transform: translateY(-1px);
}

.nido-header__cta:hover svg,
.nido-header__cta:focus-visible svg {
    transform: translateX(3px);
}

/* Hamburger - hidden on desktop */
.nido-menu-toggle {
    position: relative;
    z-index: 1003;
    display: none;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.035);
    color: var(--nido-white);
    cursor: pointer;
    transition: background 180ms ease, border-color 180ms ease;
}

.nido-menu-toggle:hover,
.nido-menu-toggle:focus-visible {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
}

.nido-menu-toggle__line {
    display: block;
    width: 20px;
    height: 1px;
    background: currentColor;
    transform-origin: center;
    transition: transform 220ms ease, opacity 180ms ease, width 180ms ease;
}

.nido-menu-toggle[aria-expanded='true'] .nido-menu-toggle__line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.nido-menu-toggle[aria-expanded='true'] .nido-menu-toggle__line:nth-child(2) {
    width: 0;
    opacity: 0;
}

.nido-menu-toggle[aria-expanded='true'] .nido-menu-toggle__line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Mobile submenu button is injected by theme.js */
.nido-submenu-toggle {
    display: none;
}

.nido-menu-backdrop {
    position: fixed;
    z-index: 998;
    inset: var(--nido-header-height-mobile) 0 0;
    display: none;
    width: 100%;
    padding: 0;
    border: 0;
    background: rgba(0, 0, 0, 0.56);
    opacity: 0;
    cursor: default;
    transition: opacity 220ms ease;
}
