* { margin:0; padding:0; box-sizing:border-box; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ================== HEADER ================== */
.header {
    background: #e9eaeb;
    padding: 15px 20px 0;
    border-bottom: 4px solid #e40e9d;
    text-align: center;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content:space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.logo-ine { height: 50px; }
.logo-iso { height: 70px; border-radius: 50%; }

.texto-header {
    color: #333;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.3;
}

.direccion { font-size: 1.2rem; }
.coordinacion { font-size: 1.1rem; font-weight: 700; color: #0f3470; }

/* Título grande debajo de la línea fucsia */
.titulo-principal {
    margin-top: 5px;
    padding: 15px 0 25px;
}

.titulo-principal h1 {
    font-size: 2rem;
    text-align: center;
    color: #0f3470;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 2.5px;
}

/* ================== GRID DOCUMENTOS ================== */
.documentos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 20px;
    max-width: 1450px;
    margin: 10px auto;
    padding: 0 20px;
    flex: 1;
}

.doc-card {
    height: 135px;
    background: white;
    padding: 18px 15px;
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    text-decoration: none;
    color: #333;
    text-align: center;
    border: 2px solid #4b9deb;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.doc-card:hover {
    transform: translateY(-8px);
    background: #4b9deb;
    color: white !important;
    font-weight: 500;
    box-shadow: 0 15px 30px rgba(75,157,235,0.3);
}

.doc-icon {
    background: #2c67c5;
    height: 30px;
    color: white;
    padding: 5px 55px;
    border-radius: .5vh;
    font-weight: bold;
    font-size: 0.85rem;
    }

.doc-card:hover .doc-icon {
    background: white;
    color: #4b9deb;
}

.doc-card p {
    font-size: 0.98rem;
    line-height: 1.1;
}

.formato { font-size: 0.85rem; opacity: 0.9; }

/* Imagen central más pequeña para que quepa todo */
.imagen-centro {
    
    text-align: center;
    margin: 15px 0 10px;
    flex-shrink: 0;
}

.imagen-centro img {
    max-width: 85%;
    height: auto;
    max-height: 280px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

/* Botón cerrar */
.cerrar-container {
    text-align: center;
    padding: 20px 0 40px;
    
}

.btn-cerrar img {
    
    height: 60px;
    transition: transform 0.3s;
    
}

.btn-cerrar:hover img { transform: scale(1.2); }

/* ================== RESPONSIVE CELULAR ================== */
@media (max-width: 768px) {
    .header-top { flex-direction: column; gap: 12px; }
    .logo-ine { height: 35px; }
    .logo-iso { height: 55px; }
    .texto-header { font-size: 0.9rem; }
    .direccion { font-size: 0.95rem; }
    .coordinacion { font-size: 1.15rem; }
    .titulo-principal h1 { font-size: 2rem; padding: 10px 0; }

    .documentos-grid { 
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
        margin: 20px auto;
    }
    .doc-card p { font-size: 0.92rem; }
    .imagen-centro img { max-height: 200px; }
}

@media (max-width: 480px) {
    .titulo-principal h1 { font-size: 1.7rem; }
    .documentos-grid { grid-template-columns: 1fr; }
}