/* =======================================================
    HEADERS
   ======================================================= */
.section-normativa .premium-header h2 { 
    color: var(--mineco-navy) !important;
    text-shadow: none !important;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.section-normativa .text-light-blue { 
    color: var(--gray-700) !important;
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.5;
}

.section-normativa .badge-institutional { 
    background: rgba(0, 122, 150, 0.08) !important;
    border: 1px solid rgba(0, 122, 150, 0.15) !important;
    color: var(--rpsc-primary) !important;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    padding: 6px 16px;
    border-radius: 50px;
}


/* ===== SECCIÓN Y TÍTULOS ===== */
.section-normativa {
    padding: 2rem;
    border-radius: 20px;
}

.section-normativa .section-title {
    color: var(--color-primary);
    font-weight: 700;
    display: block !important;
    padding-left: 0 !important;
    text-align: center !important;
    margin: 0 auto 0.2rem auto;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
}

.section-normativa .section-intro {
    text-align: center;
    color: #555;
    max-width: 700px;
    margin: 0 auto 2rem;
}

/* ===== GRID ===== */
.normativa-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(450px, 100%), 1fr));
    gap: 1.5rem;
}

/* ===== TARJETAS (AJUSTE CLAVE) ===== */
.normativa-card {
    display: flex;
    flex-direction: row;
    /* Texto a la derecha */
    flex-wrap: nowrap;
    /* Evita que el texto baje */
    align-items: center;
    /* Imagen centrada verticalmente */
    background: #fff;
    border: 1px solid rgba(0, 122, 150, 0.1);
    border-radius: 0.75rem;
    padding: 1.2rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.normativa-card:hover {
    transform: translateY(-4px);
    border-color: #007a96;
    box-shadow: 0 6px 14px rgba(0, 122, 150, 0.15);
}

/* ===== MINIATURA (CENTRO VERTICAL) ===== */
.normativa-thumbnail {
    width: clamp(80px, 10vw, 100px);
    /* Tamaño fijo */
    height: clamp(110px, 14vw, 140px);
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    margin-right: 1.2rem;
    border: 1px solid rgba(0, 122, 150, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f4f8;
}

.normativa-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== CONTENIDO ===== */
.normativa-content {
    flex: 1;
    min-width: 0;
    /* Evita desbordamiento de texto */
}

.normativa-content h5 {
    margin-bottom: 0.4rem;
    color: #102a49;
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.3;
}

.normativa-content p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.6rem;
}

.normativa-content .vigencia {
    display: block;
    margin-bottom: 0.6rem;
    font-size: 0.8rem;
    color: #555555;      
    font-weight: normal;
}

/* ===== ACCIONES ===== */
.normativa-actions {
    display: flex;
    gap: 1rem;
}

.link-pdf,
.link-download {
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    color: #007a96;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* === Buscador de documentos === */
.search-bar {
    position: relative;
    max-width: min(450px, 90%);
    margin: 2.5rem auto 2.5rem; 
}

.search-bar input {
    width: 100%;
    padding: 0.8rem 2.8rem 0.8rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: clamp(0.9rem, 1vw, 1rem);
    color: var(--color-dark-accent);
    background-color: #fff;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 122, 150, 0.15);
}

.search-bar i {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-primary);
    font-size: 1.2rem;
    pointer-events: none;
}

/* SECCIÓN INFERIOR (VIGENCIA Y BOTONES) */
    .normativa-footer {
        margin-top: auto; 
        padding-top: 0.5rem;
    }

    .normativa-content .vigencia {
        display: block;
        margin-bottom: 0.6rem;
        font-size: 0.8rem;
        color: #555555;
        font-weight: normal;
    }

    .normativa-actions {
        display: flex;
        gap: 1.2rem;
    }

    .link-pdf, .link-download {
        text-decoration: none;
        font-size: 0.85rem;
        font-weight: 600;
        color: #007a96;
        display: inline-flex;
        align-items: center;
        gap: 5px;
        transition: color 0.2s;
    }
    .link-pdf:hover, .link-download:hover {
        color: #102a49;
    }

/* ===== MODAL ===== */
.pdf-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.pdf-modal.show {
    display: flex;
}

.pdf-modal-content {
    background: #fff;
    width: 90%;
    height: 85vh;
    position: relative;
    border-radius: 8px;
}

.pdf-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* RESPONSIVIDAD */
@media (max-width: 576px) {
    .normativa-card {
        flex-direction: column;
        text-align: center;
    }

    .normativa-thumbnail {
        margin-right: 0;
        margin-bottom: 1rem;
    }

    .normativa-actions {
        justify-content: center;
    }
}