/* ═══════════════════════════════════════════════
   HERO GUÍA
═══════════════════════════════════════════════ */

.guia-hero {
    position: relative;
    min-height: 280px;
    background:
        linear-gradient(rgba(8, 39, 55, 0.76), rgba(8, 39, 55, 0.76)),
        url('img/guiaportada.png') center / cover no-repeat;
    display: flex;
    align-items: center;
    padding: 0 90px;
}

.guia-hero-content {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    max-width: 980px;
}

.guia-mini {
    color: #f1b631;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.guia-hero h1 {
    color: #fff;
    font-size: 54px;
    line-height: 1.05;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.guia-desc {
    color: rgba(255, 255, 255, 0.92);
    font-size: 18px;
    line-height: 1.7;
    max-width: 760px;
}

/* ═══════════════════════════════════════════════
   DOCUMENTO ÚNICO
═══════════════════════════════════════════════ */

.guia-layout {
    width: min(1100px, 92%);
    margin: 50px auto 80px;
}

.guia-card {
    background: #fff;
    border-radius: 22px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.10);
    animation: fadeUp .55s ease forwards;
}

.guia-img-wrap {
    position: relative;
    overflow: hidden;
    min-height: 520px;
    background: #f4f4f4;
}

.guia-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .45s ease, filter .45s ease;
}

.guia-card:hover img {
    transform: scale(1.035);
    filter: saturate(1.08);
}

.guia-body {
    padding: 46px 42px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.guia-fecha {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    color: #777;
    margin-bottom: 16px;
}

.guia-body h2 {
    font-size: 42px;
    line-height: 1.08;
    color: #121212;
    margin-bottom: 18px;
    text-transform: uppercase;
}

.guia-body p {
    font-size: 17px;
    line-height: 1.75;
    color: #4d4d4d;
    margin-bottom: 26px;
}

.guia-btn {
    width: max-content;
    border: none;
    border-radius: 999px;
    background: #0b5d8b;
    color: #fff;
    padding: 14px 22px;
    font-size: 15px;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(11, 93, 139, .24);
    transition: background .22s ease, color .22s ease, transform .22s ease;
}

.guia-btn:hover {
    background: #f1b631;
    color: #082737;
    transform: translateY(-2px);
}

/* ═══════════════════════════════════════════════
   VISOR PDF
═══════════════════════════════════════════════ */

.pdf-viewer-modal {
    position: fixed;
    inset: 0;
    background: #25282c;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: scale(.985);
    transition: opacity .22s ease, visibility .22s ease, transform .22s ease;
}

.pdf-viewer-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: scale(1);
}

.pdf-viewer-header {
    width: 100%;
    min-height: 64px;
    padding: 10px 18px;
    background: #ffffff;
    border-bottom: 1px solid rgba(8, 39, 55, .10);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-shrink: 0;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .16);
    z-index: 2;
}

.pdf-viewer-header h3 {
    color: #0b5d8b;
    font-size: 17px;
    font-weight: 900;
    line-height: 1.25;
    margin: 0;
    flex: 1;
    min-width: 0;
    text-transform: uppercase;
}

.pdf-viewer-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.pdf-viewer-actions a {
    height: 42px;
    padding: 0 16px;
    background: #0b5d8b;
    color: #fff;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 5px 14px rgba(11, 93, 139, .25);
    transition: background .22s ease, color .22s ease, transform .22s ease;
}

.pdf-viewer-actions a:hover {
    background: #f1b631;
    color: #082737;
    transform: translateY(-1px);
}

.pdf-viewer-actions button {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 50% !important;
    background: #f4511e;
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
    box-shadow: 0 5px 14px rgba(244, 81, 30, .28);
    transition: background .22s ease, transform .22s ease;
    flex-shrink: 0;
}

.pdf-viewer-actions button:hover {
    background: #d93f12;
    transform: rotate(90deg) scale(1.05);
}

.pdf-viewer-actions button i {
    line-height: 1;
    pointer-events: none;
}

.pdf-viewer-modal iframe {
    width: 100%;
    height: calc(100dvh - 64px);
    border: none;
    background: #25282c;
    display: block;
}

body.pdf-open {
    overflow: hidden;
}

/* ═══════════════════════════════════════════════
   MENÚ MÓVIL ORIGINAL
═══════════════════════════════════════════════ */

.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    opacity: 0;
    visibility: hidden;
    transition: 0.3s ease;
    z-index: 1098;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    max-width: 85%;
    height: 100vh;
    background: #4a4a4a;
    color: #fff;
    z-index: 1099;
    transition: right 0.35s ease;
    padding: 26px 24px 40px;
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 38px;
    line-height: 1;
    cursor: pointer;
    display: block;
    margin-left: auto;
    margin-bottom: 25px;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.mobile-nav-links > a,
.mobile-nav-group > a {
    text-decoration: none;
    color: #fff;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.3;
    transition: 0.25s ease;
    display: block;
}

.mobile-nav-links > a:hover,
.mobile-nav-group > a:hover {
    color: #f1b631;
}

.mobile-nav-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-submenu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-left: 14px;
    border-left: 2px solid rgba(241,182,49,0.5);
}

.mobile-submenu a {
    text-decoration: none;
    color: rgba(255,255,255,0.82);
    font-size: 15px;
    line-height: 1.35;
    transition: 0.25s ease;
}

.mobile-submenu a:hover {
    color: #f1b631;
}

/* ═══════════════════════════════════════════════
   ANIMACIÓN
═══════════════════════════════════════════════ */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ═══════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════ */

@media (max-width: 900px) {
    .guia-hero {
        padding: 0 30px;
        min-height: 245px;
    }

    .guia-hero h1 {
        font-size: 40px;
    }

    .guia-desc {
        font-size: 16px;
    }

    .guia-card {
        grid-template-columns: 1fr;
    }

    .guia-img-wrap {
        min-height: auto;
    }

    .guia-img-wrap img {
        height: 430px;
    }

    .guia-body {
        padding: 32px 28px;
    }

    .guia-body h2 {
        font-size: 34px;
    }
}

@media (max-width: 768px) {
    .guia-hero {
        min-height: 220px;
        padding: 0 20px;
    }

    .guia-hero-content {
        gap: 14px;
    }

    .guia-mini {
        font-size: 12px;
    }

    .guia-hero h1 {
        font-size: 33px;
    }

    .guia-desc {
        font-size: 15px;
        line-height: 1.55;
    }

    .guia-layout {
        width: 100%;
        padding: 0 14px;
        margin: 30px auto 60px;
    }

    .guia-img-wrap img {
        height: 320px;
    }

    .guia-body {
        padding: 24px 20px;
    }

    .guia-body h2 {
        font-size: 28px;
    }

    .guia-body p {
        font-size: 15px;
        line-height: 1.65;
    }

    .pdf-viewer-header {
        min-height: 82px;
        padding: 12px 14px;
        gap: 10px;
    }

    .pdf-viewer-header h3 {
        font-size: 15px;
        line-height: 1.28;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .pdf-viewer-actions {
        gap: 8px;
    }

    .pdf-viewer-actions a {
        width: 46px;
        height: 46px;
        min-width: 46px;
        padding: 0;
        border-radius: 50%;
        font-size: 0;
        justify-content: center;
    }

    .pdf-viewer-actions a i {
        font-size: 17px;
        line-height: 1;
    }

    .pdf-viewer-actions button {
        width: 46px !important;
        height: 46px !important;
        min-width: 46px !important;
        max-width: 46px !important;
        font-size: 23px;
    }

    .pdf-viewer-modal iframe {
        height: calc(100dvh - 82px);
    }

    .mobile-menu {
        width: 280px;
        padding: 22px 20px 34px;
    }

    .mobile-menu-close {
        font-size: 34px;
        margin-bottom: 20px;
    }

    .mobile-nav-links {
        gap: 16px;
    }

    .mobile-nav-links > a,
    .mobile-nav-group > a {
        font-size: 18px;
    }

    .mobile-submenu a {
        font-size: 14px;
    }
}

@media (max-width: 520px) {
    .guia-hero {
        min-height: 205px;
        padding: 0 16px;
    }

    .guia-hero h1 {
        font-size: 28px;
    }

    .guia-desc {
        font-size: 14px;
    }

    .guia-img-wrap img {
        height: 250px;
    }

    .guia-body h2 {
        font-size: 24px;
    }

    .guia-btn {
        width: 100%;
        justify-content: center;
    }

    .pdf-viewer-header {
        min-height: 78px;
        padding: 10px 12px;
        gap: 8px;
    }

    .pdf-viewer-header h3 {
        font-size: 13.5px;
    }

    .pdf-viewer-actions a,
    .pdf-viewer-actions button {
        width: 42px !important;
        height: 42px !important;
        min-width: 42px !important;
        max-width: 42px !important;
    }

    .pdf-viewer-modal iframe {
        height: calc(100dvh - 78px);
    }

    .mobile-menu {
        width: 260px;
        padding: 20px 18px 30px;
    }

    .mobile-menu-close {
        font-size: 32px;
        margin-bottom: 18px;
    }

    .mobile-nav-links > a,
    .mobile-nav-group > a {
        font-size: 17px;
    }

    .mobile-submenu a {
        font-size: 13px;
    }
}

/* =====================================================
   NAVBAR CON LOGIN
===================================================== */

.navbar {
    display: grid;
    grid-template-columns: 250px minmax(420px, 1fr) auto;
    align-items: center;

    width: 100%;
    height: var(--nav-height);

    padding: 0 38px;
    column-gap: 18px;

    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);

    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;

    box-sizing: border-box;
}


/* El menú central permanece centrado */

.nav-menu {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 42px;

    width: max-content;
    max-width: 100%;

    margin: 0 auto;

    transform: none;
}


/* =====================================================
   ZONA LOGIN + ORIENTACIÓN MIGRATORIA
===================================================== */

.nav-pills {
    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 12px;

    margin: 0;

    flex-shrink: 0;
}


/* La hamburguesa no debe ocupar espacio en escritorio */

.nav-actions {
    display: none;
}


/* =====================================================
   BOTÓN LOGIN
===================================================== */

.navbar-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    min-height: 46px;
    padding: 0 23px;

    background: #f58220;
    color: #ffffff;

    border: none;
    border-radius: 30px;

    text-decoration: none;

    font-size: 15px;
    font-weight: 700;

    white-space: nowrap;
    flex-shrink: 0;

    box-shadow: 0 5px 14px rgba(245, 130, 32, 0.22);

    transition:
        background 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;
}


.navbar-login-btn i {
    font-size: 14px;
}


.navbar-login-btn:hover {
    background: #dc6d10;
    color: #ffffff;

    transform: translateY(-2px);

    box-shadow: 0 8px 18px rgba(245, 130, 32, 0.32);
}


/* Botón azul ligeramente más compacto */

.nav-pills .pill-btn {
    padding-left: 22px;
    padding-right: 22px;
}


/* =====================================================
   TABLET
===================================================== */

@media (max-width: 1200px) {

    .navbar {
        grid-template-columns: 210px minmax(350px, 1fr) auto;

        padding: 0 24px;
        column-gap: 12px;
    }


    .nav-menu {
        gap: 25px;
    }


    .nav-main-link {
        font-size: 15px;
    }


    .navbar-login-btn {
        min-height: 42px;

        padding: 0 17px;

        font-size: 14px;
    }


    .nav-pills {
        gap: 8px;
    }


    .nav-pills .pill-btn {
        padding-left: 17px;
        padding-right: 17px;

        font-size: 14px;
    }

}


/* =====================================================
   TELÉFONO
===================================================== */

@media (max-width: 768px) {

    .navbar {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;

        width: 100% !important;

        padding: 0 14px !important;

        gap: 7px !important;

        box-sizing: border-box !important;
    }


    /* Logo a la izquierda */

    .logo {
        margin-right: auto;

        flex-shrink: 0;
    }


    /* Ocultar navegación de escritorio */

    .nav-menu {
        display: none !important;
    }


    /* Zona derecha */

    .nav-pills {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;

        margin: 0 !important;

        gap: 0 !important;

        flex-shrink: 0;
    }


    /* Ocultar Orientación Migratoria en móvil */

    .nav-pills .pill-dropdown {
        display: none !important;
    }


    /* Login visible */

    .navbar-login-btn {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;

        min-height: 38px;

        padding: 0 15px;

        border-radius: 22px;

        font-size: 13px;

        gap: 6px;

        box-shadow: none;

        flex-shrink: 0;
    }


    .navbar-login-btn i {
        font-size: 12px;
    }


    /* Hamburguesa al lado del login */

    .nav-actions {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;

        margin: 0 !important;
        padding: 0 !important;

        flex-shrink: 0;
    }


    .menu-toggle {
        display: flex !important;

        width: 40px;
        height: 40px;

        padding: 0 !important;
        margin: 0 !important;

        align-items: center;
        justify-content: center;

        flex-direction: column;

        gap: 5px;

        flex-shrink: 0;
    }


    .menu-toggle span {
        display: block;

        width: 24px;
        height: 2px;

        margin: 0;

        background: #333333;

        border-radius: 2px;
    }

}


/* =====================================================
   TELÉFONOS PEQUEÑOS
===================================================== */

@media (max-width: 480px) {

    .navbar {
        padding: 0 10px !important;

        gap: 3px !important;
    }


    .navbar-login-btn {
        min-height: 35px;

        padding: 0 12px;

        font-size: 12px;

        gap: 5px;
    }


    .navbar-login-btn i {
        font-size: 11px;
    }


    .menu-toggle {
        width: 37px;
        height: 37px;
    }


    .menu-toggle span {
        width: 22px;
    }

}


/* =====================================================
   TELÉFONOS MUY ESTRECHOS
===================================================== */

@media (max-width: 370px) {

    .navbar {
        padding: 0 8px !important;
    }


    .navbar-login-btn {
        min-height: 34px;

        padding: 0 10px;

        font-size: 11px;
    }


    .navbar-login-btn i {
        display: none;
    }


    .menu-toggle {
        width: 34px;
        height: 34px;
    }


    .menu-toggle span {
        width: 20px;
    }

}