/* =================================================================
   SLIDER DE TARJETAS - DOCUMENTOS INSTITUCIONALES
   FUNDECIMA - VERSIÓN ULTRA COMPACTA MULTICOLOR
   - Tarjetas mini verticales (176px) de altura reducida
   - Paleta de acentos cíclica (índigo, cian, esmeralda, ámbar,
     violeta, rosa) que armoniza con los colores institucionales
   - Barra de acento siempre visible + glow al hover
   - Badge numerado automático (CSS counters)
   - Scroll-snap para alineación perfecta
   - Sin chip de acción (diseño más limpio)
   ================================================================= */

.document-slider-section {
    padding: 60px 0;
    /* Fondo blanco limpio: hace que las tarjetas de colores resalten */
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    position: relative;
    overflow: hidden;
}

/* Patrón de puntos sutil: textura de fondo */
.document-slider-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(rgba(79, 70, 229, 0.10) 1px, transparent 1px);
    background-size: 22px 22px;
    opacity: 0.4;
    z-index: 0;
    pointer-events: none;
}

.document-slider-section .container-fluid {
    position: relative;
    z-index: 1;
}

.document-slider-section .section-subtitle {
    color: #059669;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.document-slider-section .section-title {
    color: #1e3a8a;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 26px;
}

/* Subrayado decorativo bajo el título (tricolor armonioso) */
.document-slider-section .section-title::after {
    content: '';
    display: block;
    width: 76px;
    height: 4px;
    margin: 14px auto 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #4f46e5 0%, #06b6d4 50%, #10b981 100%);
}

/* Contenedor Principal del Slider */
.tarjetas-slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 0;
}

/* Contenedor de Tarjetas (Scroll Horizontal + Snap) */
.tarjetas-slider-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity; /* Alineación perfecta tras cada scroll */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE 10+ */
    padding: 10px 6px 18px; /* Espacio para la elevación en hover */
    flex: 1;
    counter-reset: doc-counter;
}

.tarjetas-slider-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* =================================================================
   PALETA CÍCLICA DE ACENTOS (combina con azul/verde institucional)
   Cada tarjeta toma su color según su posición (ciclo de 6):
   índigo → cian → esmeralda → ámbar → violeta → rosa
   ================================================================= */
.tarjeta-documento:nth-child(6n + 1) { --acc: #4f46e5; --acc-soft: #eef2ff; } /* Índigo    */
.tarjeta-documento:nth-child(6n + 2) { --acc: #0891b2; --acc-soft: #ecfeff; } /* Cian      */
.tarjeta-documento:nth-child(6n + 3) { --acc: #059669; --acc-soft: #ecfdf5; } /* Esmeralda */
.tarjeta-documento:nth-child(6n + 4) { --acc: #d97706; --acc-soft: #fffbeb; } /* Ámbar     */
.tarjeta-documento:nth-child(6n + 5) { --acc: #7c3aed; --acc-soft: #f5f3ff; } /* Violeta   */
.tarjeta-documento:nth-child(6n + 6) { --acc: #e11d48; --acc-soft: #fff1f2; } /* Rosa      */

/* =================================================================
   TARJETA INDIVIDUAL - ULTRA COMPACTA
   ================================================================= */
.tarjeta-documento {
    counter-increment: doc-counter;
    scroll-snap-align: start;
    flex: 0 0 176px;
    min-width: 176px;
    /* Valores por defecto (las reglas nth-child de arriba los sobreescriben) */
    --acc: #4f46e5;
    --acc-soft: #eef2ff;
    background: #ffffff;
    border-radius: 14px;
    padding: 16px 10px 14px; /* Alto reducido al mínimo profesional */
    border: 1px solid #cbd5e1;
    box-shadow:
        0 2px 8px rgba(15, 23, 42, 0.07),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s ease,
                border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Barra de acento SIEMPRE visible arriba (color propio de la tarjeta) */
.tarjeta-documento::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--acc) 0%, var(--acc-soft) 100%);
    transition: height 0.3s ease;
    z-index: 3;
}

.tarjeta-documento:hover::before {
    height: 5px;
}

/* Glow decorativo del color propio (visible al hover) */
.tarjeta-documento::after {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--acc) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.tarjeta-documento:hover {
    transform: translateY(-6px);
    border-color: var(--acc);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.14);
}

.tarjeta-documento:hover::after {
    opacity: 0.16;
}

/* =================================================================
   LINK DE LA TARJETA - DISTRIBUCIÓN VERTICAL COMPACTA
   ================================================================= */
.tarjeta-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    height: 100%;
    border-radius: 12px;
    position: relative;
    z-index: 2;
}

.tarjeta-link:focus-visible {
    outline: 3px solid var(--acc);
    outline-offset: 3px;
}

/* =================================================================
   ICONO - CÁPSULA CON TINTE DEL COLOR PROPIO + BADGE NUMERADO
   ================================================================= */
.tarjeta-icono {
    position: relative;
    width: 46px;
    height: 46px;
    background: var(--acc-soft);
    border-radius: 12px;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.tarjeta-icono i {
    font-size: 1.1rem;
    color: var(--acc);
    transition: color 0.3s ease, transform 0.3s ease;
}

/* Badge numérico del documento (generado por CSS counter) */
.tarjeta-icono::after {
    content: counter(doc-counter);
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--acc);
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-size: 0.6rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25);
    transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.tarjeta-documento:hover .tarjeta-icono {
    background: var(--acc);
    transform: scale(1.07) rotate(-3deg);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.25);
}

.tarjeta-documento:hover .tarjeta-icono i {
    color: #ffffff;
    transform: scale(1.05);
}

.tarjeta-documento:hover .tarjeta-icono::after {
    background: #ffffff;
    color: var(--acc);
    transform: scale(1.1);
}

/* =================================================================
   CONTENIDO DE LA TARJETA (título centrado)
   ================================================================= */
.tarjeta-content {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tarjeta-content h4 {
    font-size: 0.82rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    line-height: 1.4;
    transition: color 0.3s ease;
    word-wrap: break-word;
}

.tarjeta-documento:hover .tarjeta-content h4 {
    color: var(--acc);
}

/* =================================================================
   FLECHAS DE NAVEGACIÓN (BLINDADAS - SIN CAMBIOS)
   ================================================================= */
.slider-arrow {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #ffffff;
    color: #475569;
    border: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    z-index: 10;
    padding: 0;          /* Anula padding global de button */
    margin: 0;
    transform: none;     /* Sin transform base: posición estable */
    box-shadow: none;    /* Anula sombra morada global de button */
}

.slider-arrow i {
    font-size: 0.9rem;
    font-weight: 600;
}

.slider-arrow:hover {
    background: linear-gradient(135deg, #1e3a8a 0%, #059669 100%);
    border-color: transparent;
    color: #ffffff;
    transform: translateY(-2px); /* Especificidad gana al global */
    box-shadow: 0 6px 16px rgba(30, 58, 138, 0.3);
}

.slider-arrow:active {
    transform: scale(0.95);
}

.slider-arrow:focus-visible {
    outline: 3px solid rgba(5, 150, 105, 0.5);
    outline-offset: 3px;
}

.slider-arrow-left {
    margin-left: 10px;
}

.slider-arrow-right {
    margin-right: 10px;
}

/* Estado deshabilitado (controlado por JS vía opacity inline) */
.slider-arrow[style*="opacity: 0.3"] {
    border-color: #e2e8f0;
    color: #cbd5e1;
    background: #f8fafc;
    cursor: not-allowed;
}

.slider-arrow[style*="opacity: 0.3"]:hover {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #cbd5e1;
    transform: none;
    box-shadow: none;
}

/* =================================================================
   RESPONSIVE
   ================================================================= */
@media (max-width: 1200px) {
    .tarjeta-documento {
        flex: 0 0 164px;
        min-width: 164px;
    }
}

@media (max-width: 992px) {
    .tarjeta-documento {
        flex: 0 0 154px;
        min-width: 154px;
    }

    .tarjeta-icono {
        width: 42px;
        height: 42px;
    }

    .tarjeta-icono i {
        font-size: 1rem;
    }

    .document-slider-section .section-title {
        font-size: 1.75rem;
    }

    .slider-arrow {
        width: 38px;
        height: 38px;
    }
}

@media (max-width: 768px) {
    .tarjeta-documento {
        flex: 0 0 146px;
        min-width: 146px;
        padding: 14px 8px 12px;
    }

    .tarjeta-icono {
        width: 40px;
        height: 40px;
        border-radius: 11px;
    }

    .tarjeta-icono i {
        font-size: 0.95rem;
    }

    .tarjeta-content h4 {
        font-size: 0.76rem;
    }

    .slider-arrow {
        width: 36px;
        height: 36px;
    }

    .slider-arrow i {
        font-size: 0.8rem;
    }

    .document-slider-section {
        padding: 40px 0;
    }

    .document-slider-section .section-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .tarjeta-documento {
        flex: 0 0 138px;
        min-width: 138px;
    }

    .tarjeta-icono {
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }

    .tarjeta-icono i {
        font-size: 0.9rem;
    }

    .tarjeta-icono::after {
        top: -5px;
        right: -5px;
        min-width: 16px;
        height: 16px;
        font-size: 0.52rem;
        line-height: 16px;
    }

    .tarjeta-content h4 {
        font-size: 0.72rem;
    }

    .slider-arrow {
        width: 32px;
        height: 32px;
    }

    .slider-arrow i {
        font-size: 0.75rem;
    }
}