/* ======================================================================
   /blog/styles/nav.css
   Navegación Desktop + Mobile (off-canvas robusto)
   ====================================================================== */

/* ==========================================================
   NAV DESKTOP (>=1024px)
   ========================================================== */

.nav--desktop {
    display: none;
    position: fixed;
    inset-inline: 0;
    top: 0;
    z-index: var(--z-nav);
    height: var(--nav-h-desktop);
    background: rgba(0,0,0,.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,.08);
}

@media (min-width: 1024px) {
    .nav--desktop {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Ocultar mobile en desktop */
    .nav--mobile-header,
    .nav--mobile-offcanvas {
        display: none;
    }
}

.nav__inner {
    width: 100%;
    max-width: 1280px;
    padding-inline: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ==========================================================
   BRAND / LOGO – DESKTOP
   ========================================================== */

.nav__brand {
    display: inline-flex;
    align-items: center;
}

.nav__brand img {
    height: 28px;
    width: auto;
    display: block;
}

/* ==========================================================
   LINKS DESKTOP
   ========================================================== */

.nav__list {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: .9rem;
    font-weight: 500;
    color: #d1d5db;
}

.nav__link {
    color: inherit;
    text-decoration: none;
    transition: color .2s ease;
}

.nav__link:hover {
    color: #00A2FF;
}

/* ==========================================================
   ICONOS SOCIALES DESKTOP
   ========================================================== */

.nav__social {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-left: 8px;
    color: #9ca3af;
}

.nav__social .ico {
    width: 22px;
    height: 22px;
    display: block;
    fill: currentColor;
    transition: color .25s ease, transform .25s ease, filter .25s ease;
}

.nav__social a:hover .ico {
    transform: translateY(-1px);
}

.fa-hover:hover {
    color: #1877F2;
    filter: drop-shadow(0 0 8px rgba(24,119,242,.6));
}

.ig-hover:hover {
    color: #E4405F;
    filter: drop-shadow(0 0 8px rgba(228,64,95,.6));
}

/* ==========================================================
   NAV MOBILE HEADER (<1024px)
   ========================================================== */

@media (max-width: 1023px) {

    .nav--mobile-header {
        position: fixed;
        top: 0;
        inset-inline: 0;
        z-index: var(--z-nav);
        height: var(--nav-h-mobile);
        background: rgba(0,0,0,.85);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border-bottom: 1px solid rgba(255,255,255,.08);

        /* centrar verticalmente */
        display: flex;
        align-items: center;
        padding-top: var(--safe-top);
    }

    .nav--desktop {
        display: none;
    }

    .nav--mobile-header .nav__inner {
        display: flex;
        align-items: center;
        height: 100%;
    }

    .nav--mobile-header .nav__brand {
        display: flex;
        align-items: center;
        height: 100%;
    }
}

/* ==========================================================
   MOBILE OFF-CANVAS (BLINDADO)
   ========================================================== */

.nav--mobile-offcanvas {
    position: fixed;
    inset: 0;
    z-index: var(--z-offcanvas);

    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
}

.nav--mobile-offcanvas.is-open {
    opacity: 1;
    pointer-events: auto;
}

/* Scrim */
.nav--mobile-scrim {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.55);
}

/* ==========================================================
   MOBILE PANEL (SOLUCIÓN DEFINITIVA)
   ========================================================== */

.nav--mobile-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;

    width: min(320px, 88vw);

    background: #000;
    border-left: 1px solid rgba(255,255,255,.08);

    display: flex;
    flex-direction: column;

    padding: 18px 18px 22px;
    padding-top: max(18px, var(--safe-top));

    overflow-y: auto;
    -webkit-overflow-scrolling: touch;

    transform: translateX(100%);
    transition: transform .35s ease;
}

.nav--mobile-offcanvas.is-open .nav--mobile-panel {
    transform: translateX(0);
}

/* ==========================================================
   MOBILE HEADER INTERNO
   ========================================================== */

.nav--mobile-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.nav--mobile-title {
    font-size: 14px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(255,255,255,.8);
    font-weight: 600;
}

.nav--mobile-close-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255,255,255,.06);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================
   LINKS MOBILE (NORMALIZADOS)
   ========================================================== */

.nav--mobile-nav-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 16px;
}

.nav__link--mobile {
    display: block;
    padding: 12px 14px;

    font-size: 16px;
    line-height: 1.2;
    font-weight: 500;

    color: rgba(255,255,255,.95);
    text-decoration: none;

    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 12px;

    transition: background .2s ease, transform .2s ease;
}

.nav__link--mobile:hover {
    background: rgba(255,255,255,.08);
    transform: translateY(-1px);
}

/* ==========================================================
   CTA MOBILE (SOLO MOBILE)
   ========================================================== */

.nav--mobile-cta-wrapper {
    margin-top: 16px;
}

.nav__link--cta {
    height: 44px;
    width: 100%;
    border-radius: 9999px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    font-weight: 600;
    color: #fff;

    background: linear-gradient(135deg, #00A2FF, #2ECCFF);
}

/* ======================================================
   FIX DEFINITIVO – NAV DUPLICADO EN BREAKPOINTS
   ====================================================== */

/* Desktop puro */
@media (min-width: 1024px) {
  .nav--mobile-header {
    display: none !important;
  }
}

/* Mobile puro */
@media (max-width: 1023px) {
  .nav--desktop {
    display: none !important;
  }
}
