/* ==========================================================================
   FIX SCROLL DOBLE — Solo un scroll (el del navegador)
   ========================================================================== */
html {
    overflow-x: hidden !important;
    overflow-y: scroll !important;
    height: auto !important;
}

body {
    overflow: visible !important;
    height: auto !important;
    min-height: 100vh;
}

.page-master-wrapper,
.home-institutional,
.main-column {
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
}

.carousel-section {
    overflow: hidden;
    max-height: none !important;
}

/* ==========================================================================
   SECCIÓN ENLACES EXTERNOS — COPIA EXACTA DEL CARRUSEL DE NOTICIAS
   ========================================================================== */
.enlaces-carousel-section {
    width: 100%;
    padding: 40px 0;
    margin: 0;
    background: linear-gradient(180deg, #F8FAFB 0%, #FAFBFC 100%);
    box-sizing: border-box;
}

.enlaces-carousel-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ENCABEZADO — Línea vertical + título + línea horizontal */
.enlaces-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding: 0 40px;
}

.enlaces-header__accent {
    width: 3px;
    height: 20px;
    background: linear-gradient(180deg, #1B365D 0%, #2563EB 100%);
    border-radius: 2px;
    flex-shrink: 0;
}

.enlaces-header__title {
    font-size: 0.75rem;
    font-weight: 400;
    color: #64748B;
    margin: 0;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    white-space: nowrap;
}

.enlaces-header__line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, #E2E8F0 0%, transparent 100%);
}

/* LAYOUT CARRUSEL — Flexbox: [flecha] [swiper] [flecha] */
.enlaces-carousel-layout {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 24px;
    box-sizing: border-box;
}

/* FLECHAS DE NAVEGACIÓN */
.enlaces-arrow {
    position: relative;
    z-index: 10;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FFFFFF;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
    color: #334155;
}

.enlaces-arrow:hover {
    background: #FAFBFC;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    color: #1B365D;
}

.enlaces-arrow svg {
    width: 16px;
    height: 16px;
}

.enlaces-arrow.swiper-button-disabled {
    opacity: 0.25;
    pointer-events: none;
}

/* Las flechas siempre visibles en desktop (no ocultar con lock) */
.enlaces-arrow.swiper-button-lock {
    display: flex !important;
}

/* CONTENEDOR WRAPPER — Clip visual que respeta sombras */
.enlaces-swiper-wrapper {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
    overflow: hidden;
    padding: 12px 4px;
    margin: -12px -4px;
}

/* SWIPER CONTENEDOR */
.enlaces-swiper {
    width: 100%;
    overflow: visible;
}

.enlaces-swiper .swiper-wrapper {
    align-items: stretch;
}

.enlaces-swiper .swiper-slide {
    height: auto;
    box-sizing: border-box;
}

/* TARJETA — Override de .acceso-card para igualar a .news-card */
.enlaces-swiper .acceso-card {
    /* Resetear flex de home.css para que Swiper controle el ancho */
    flex: 1 1 100%;
    min-width: 0;
    width: 100%;
    height: 100%;
    scroll-snap-align: none;
    /* Igualar apariencia visual a .news-card */
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.02);
    border: 1px solid #E2E8F0;
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.enlaces-swiper .acceso-card:hover {
    box-shadow: 0 8px 24px rgba(27, 54, 93, 0.12), 0 16px 48px rgba(27, 54, 93, 0.06);
    border-color: #1B365D;
    /* Anular el translateY de home.css — solo cambio de sombra */
    transform: none !important;
}

/* PAGINACIÓN (Dots) */
.enlaces-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 28px;
    padding: 0 40px;
}

.enlaces-pagination .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #CBD5E1;
    border-radius: 50%;
    opacity: 1;
    transition: all 0.3s ease;
    cursor: pointer;
}

.enlaces-pagination .swiper-pagination-bullet:hover {
    background: #94A3B8;
}

.enlaces-pagination .swiper-pagination-bullet-active {
    background: #1B365D;
    transform: scale(1.2);
}

/* Los dots siempre visibles en desktop (no ocultar con lock) */
.enlaces-pagination.swiper-pagination-lock {
    display: flex !important;
}

/* ==========================================================================
   RESPONSIVE — Tablet (≤1280px)
   ========================================================================== */
@media(max-width: 1280px) {
    .enlaces-header {
        padding: 0 32px;
    }

    .enlaces-carousel-layout {
        padding-left: 20px;
        padding-right: 20px;
        gap: 12px;
    }
}

/* ==========================================================================
   RESPONSIVE — Tablet pequeña (≤1024px)
   ========================================================================== */
@media(max-width: 1024px) {
    .enlaces-carousel-section {
        padding: 32px 0;
    }

    .enlaces-arrow {
        width: 44px;
        height: 44px;
    }

    .enlaces-arrow svg {
        width: 18px;
        height: 18px;
    }
}

/* ==========================================================================
   RESPONSIVE — Móvil (≤768px) — Sin flechas, solo swipe
   ========================================================================== */
@media(max-width: 768px) {
    .enlaces-header {
        padding: 0 20px;
        margin-bottom: 20px;
    }

    .enlaces-header__accent {
        height: 16px;
    }

    .enlaces-header__title {
        font-size: 0.6875rem;
    }

    /* Ocultar flechas en móvil */
    .enlaces-arrow {
        display: none !important;
    }

    .enlaces-carousel-layout {
        padding: 8px 20px;
        gap: 0;
    }

    /* Wrapper igual que noticias */
    .enlaces-swiper-wrapper {
        padding: 12px 4px;
        margin: -12px -4px;
    }

    /* CRÍTICO: Anular estilos de home.css que rompen Swiper */
    .enlaces-swiper .acceso-card {
        flex: 1 1 100% !important;
        max-width: none !important;
        min-width: 0 !important;
    }

    .enlaces-pagination {
        margin-top: 20px;
        padding: 0 20px;
    }
}

/* ==========================================================================
   RESPONSIVE — Móvil pequeño (≤480px)
   ========================================================================== */
@media(max-width: 480px) {
    .enlaces-header {
        padding: 0 16px;
    }

    .enlaces-carousel-layout {
        padding-left: 16px;
        padding-right: 16px;
    }

    /* CRÍTICO: Anular estilos de home.css que rompen Swiper */
    .enlaces-swiper .acceso-card {
        flex: 1 1 100% !important;
        max-width: none !important;
        min-width: 0 !important;
    }

    .enlaces-pagination {
        padding: 0 16px;
    }
}
