/* =============================
   Estilo General
   ============================= */
body {
    font-family: Arial, sans-serif;
    background-color: #f5f7fa;
    margin: 0;
    padding: 0;
}

h1 {
    text-align: center;
    font-size: 2.4em;
    color: #1E3A5F;
    margin-top: 30px;
}

/* =============================
   Botones de Categorías Modernos
   ============================= */
.categoria-selector {
    text-align: center;
    margin: 30px 0;
}

.categoria-btn {
    background: #0078A0;
    color: #fff;
    padding: 14px 32px;
    margin: 10px;
    border: none;
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.categoria-btn:hover {
    background: #005F73;
    transform: translateY(-4px);
}

.categoria-btn:active {
    background: #1E3A5F;
}

/* =============================
   Bloque de Categoría
   ============================= */
.categoria-bloque {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: opacity 0.3s ease;
}

/* =============================
   Títulos de Categoría y Subcategoría
   ============================= */
.categoria {
    font-size: 2em;
    color: #0078A0;
    margin-bottom: 20px;
    text-align: center;
    border-bottom: 3px solid #0078A0;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    padding-bottom: 5px;
}

.subcategoria {
    font-size: 1.4em;
    color: #1E3A5F;
    margin: 25px auto 15px;
    text-align: center;
    font-weight: bold;
}

/* =============================
   Galería con Scroll Vertical
   ============================= */
.galeria-grid {
    max-height: 500px;          /* altura visible */
    overflow-y: auto;           /* scroll vertical */
    padding-right: 10px;        /* espacio para scroll */
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

/* Tarjeta de imagen */
.galeria-grid .item {
    width: calc(33.33% - 10px);
    border-radius: 10px;
    overflow: hidden;
    background-color: #ffffff;
    border: 1px solid #dce3e8;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.galeria-grid .item:hover {
    transform: translateY(-6px);
    box-shadow: 0 6px 18px rgba(0,120,160,0.18);
}

/* Imagen */
.galeria-grid img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.galeria-grid img:hover {
    transform: scale(1.05);
}

/* =============================
   Lightbox
   ============================= */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(255,255,255,0.3);
}

/* =============================
   Responsive
   ============================= */
@media (max-width: 992px) {
    .galeria-grid .item {
        width: calc(50% - 10px);
    }
}

@media (max-width: 480px) {
    .galeria-grid .item {
        width: 100%;
    }

    .galeria-grid img {
        height: 160px;
    }
}
