/* =================================================================
   NAV · barra fija con hamburguesa siempre visible + panel lateral
================================================================= */
.nav {
    position: fixed; top: 0; left: 0; right: 0;
    padding: 1.2rem 5%;
    display: flex; justify-content: space-between; align-items: center;
    z-index: 1000; transition: all 0.4s;
}
.nav.scrolled {
    background: rgba(251,247,240,0.97);
    backdrop-filter: blur(12px);
    padding: 0.8rem 5%;
    box-shadow: 0 2px 24px rgba(31,68,72,0.1);
}
.nav-logo img {
    height: 80px; width: auto; transition: height 0.4s;
    filter: none;
}
.nav.scrolled .nav-logo img { height: 58px; filter: none; }

/* Hamburger - SIEMPRE visible */
.hamburger {
    background: none; border: none; cursor: pointer;
    display: flex; flex-direction: column; justify-content: center;
    gap: 6px; padding: 0.5rem; z-index: 1001;
}
.hamburger span {
    display: block; width: 28px; height: 2.5px;
    background: var(--white); border-radius: 2px;
    transition: all 0.3s;
}
.nav.scrolled .hamburger span { background: var(--teal-dark); }

/* PANEL LATERAL DESPLEGABLE (no fullscreen) */
.nav-overlay {
    position: fixed; top: 0; right: 0; bottom: 0;
    width: 300px; max-width: 80vw;
    background: var(--teal-dark);
    z-index: 9000;
    display: flex; flex-direction: column;
    padding: 6rem 2.5rem 2.5rem;
    transform: translateX(100%);
    transition: transform 0.45s cubic-bezier(0.4,0,0.2,1), visibility 0s linear 0.45s;
    box-shadow: -10px 0 40px rgba(0,0,0,0.25);
    overflow-y: auto;
    /* Oculto de forma robusta cuando está cerrado: aunque falle el transform,
       nunca se muestra ni es interactivo hasta pulsar la hamburguesa. */
    visibility: hidden;
}
.nav-overlay.open { transform: translateX(0); visibility: visible; transition: transform 0.45s cubic-bezier(0.4,0,0.2,1); }
/* Fondo oscuro detrás del panel */
.nav-backdrop {
    position: fixed; inset: 0;
    background: rgba(31,68,72,0.5);
    z-index: 8999;
    opacity: 0; pointer-events: none;
    transition: opacity 0.45s ease;
}
.nav-backdrop.open { opacity: 1; pointer-events: all; }
.nav-overlay-top {
    position: absolute; top: 1.5rem; left: 2.5rem; right: 2.5rem;
    display: flex; justify-content: flex-end; align-items: center;
}
.nav-overlay-close {
    background: none; border: none;
    color: var(--cream); cursor: pointer;
    font-size: 1.6rem; line-height: 1; padding: 0.3rem;
    transition: color 0.3s;
}
.nav-overlay-close:hover { color: var(--orange); }
.nav-overlay-links { list-style: none; }
.nav-overlay-links li { margin-bottom: 1.3rem; }
.nav-overlay-links a {
    font-family: var(--serif); font-style: italic;
    font-size: 1.7rem;
    color: var(--cream); text-decoration: none;
    cursor: pointer; transition: color 0.3s;
}
.nav-overlay-links a:hover { color: var(--orange); }
.nav-overlay-phone {
    margin-top: auto; padding-top: 2rem;
    font-family: var(--sans); font-size: 1rem;
    font-weight: 500; letter-spacing: 0.05em;
    color: var(--pink-dust); text-decoration: none;
    display: flex; align-items: center; gap: 0.5rem;
    transition: color 0.3s;
}
.nav-overlay-phone:hover { color: var(--orange); }

/* Responsive — nav */
@media (max-width: 1024px) {
    .nav-logo img { height: 68px; }
    .nav.scrolled .nav-logo img { height: 52px; }
}
@media (max-width: 768px) {
    .nav-logo img { height: 56px; }
    .nav.scrolled .nav-logo img { height: 46px; }
}
