/* ==========================================
   RESET ESTRUCTURAL & CONTROL DE OVERFLOW
   ========================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important; /* Cancela cualquier scroll horizontal */
    background: #eef3f9;
    font-family: 'Montserrat', sans-serif;
    color: #2c3e50;
}

:root {
    --primary-blue: #0d47a1;
    --dark-blue: #0a337a;
    --light-blue: #1976d2;
    --accent-yellow: #ffca28;
    --text-white: #ffffff;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* ==========================================
   HEADER
   ========================================== */
.header {
    background: linear-gradient(90deg, var(--dark-blue) 0%, var(--primary-blue) 100%);
    border-bottom: 5px solid var(--accent-yellow);
    box-shadow: var(--shadow);
    padding: 15px 20px;
    width: 100%;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.logo-box {
    background-color: var(--text-white);
    padding: 8px 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-img {
    max-height: 55px;
    width: auto;
    max-width: 100%;
}

.info-box {
    color: var(--text-white);
}

.info-box h1 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--accent-yellow);
}

.info-box p {
    font-size: 0.9rem;
    font-weight: 600;
}

/* ==========================================
   HERO BANNER
   ========================================== */
.hero-banner {
    background: linear-gradient(180deg, var(--primary-blue) 0%, var(--light-blue) 100%);
    color: var(--text-white);
    text-align: center;
    padding: 25px 15px;
    width: 100%;
}

.hero-banner h2 {
    font-size: 1.6rem;
    font-weight: 700;
}

.hero-banner p {
    font-size: 0.95rem;
    color: var(--accent-yellow);
}

/* ==========================================
   GALERÍA VERTICIONAL ENMARCADA (1 COLUMNA)
   ========================================== */
.main-content {
    width: 100%;
    padding: 30px 15px;
    display: flex;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 1100px; /* Contención estricta */
    margin: 0 auto;
}

/* Forzar que las tarjetas se apilen verticalmente una debajo de otra */
.image-gallery {
    display: block !important;
    width: 100% !important;
}

.gallery-card {
    background: var(--text-white);
    border-radius: 12px;
    border: 2px solid #d0dbe8;
    box-shadow: var(--shadow);
    padding: 15px;
    margin-bottom: 30px; /* Separación vertical constante */
    cursor: pointer;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important; /* Evita que la imagen sobresalga del borde */
}

.gallery-card:hover {
    border-color: var(--accent-yellow);
}

.card-image-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    display: flex;
    justify-content: center;
}

/* Ajuste absoluto para que la imagen se adapte al contenedor sin desbordarse */
.card-image-wrapper img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    object-fit: contain !important;
    border-radius: 6px;
}

.card-hint {
    text-align: center;
    font-size: 0.85rem;
    color: var(--light-blue);
    margin-top: 10px;
    font-weight: 600;
}

.no-images {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 8px;
}

/* ==========================================
   MODAL PANTALLA COMPLETA
   ========================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(10, 51, 122, 0.95);
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.modal-content {
    max-width: 95vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 25px;
    color: var(--accent-yellow);
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
}

/* ==========================================
   FOOTER
   ========================================== */
.footer {
    background-color: var(--dark-blue);
    color: var(--text-white);
    text-align: center;
    padding: 20px 15px;
    width: 100%;
    border-top: 4px solid var(--accent-yellow);
}

.footer-container p {
    font-size: 0.85rem;
    line-height: 1.5;
}

/* ==========================================
   ADAPTACIÓN MÓVIL
   ========================================== */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .info-box h1 {
        font-size: 1.1rem;
    }

    .info-box p {
        font-size: 0.8rem;
    }

    .main-content {
        padding: 15px 10px;
    }

    .gallery-card {
        padding: 8px;
        margin-bottom: 20px;
    }
}