/* =========================================
   MEMORIA GRÁFICA - ACIEM NORTE DE SANTANDER
   ========================================= */

.galeria-section {
    padding: 64px 0;
    background: #f7f9fb;
    border-top: 1px solid #dbe4ea;
}

.galeria-section h2 {
    margin: 6px 0 12px;
    color: #082b4c;
}

.galeria-intro {
    max-width: 850px;
    margin: 0 0 28px;
    color: #536273;
    line-height: 1.65;
}

/* Estructura de la cinta */

.galeria-controles {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) 46px;
    align-items: center;
    gap: 14px;
}

.galeria-ventana {
    overflow: hidden;
    width: 100%;
}

.galeria-cinta {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding: 8px 2px 16px;
}

.galeria-cinta::-webkit-scrollbar {
    display: none;
}

/* Tarjeta fotográfica */

.galeria-item {
    flex: 0 0 300px;
    background: #ffffff;
    border: 1px solid #dbe4ea;
    border-radius: 12px;
    overflow: hidden;
    scroll-snap-align: start;
    box-shadow: 0 6px 18px rgba(6, 31, 55, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.galeria-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(6, 31, 55, 0.14);
}

.galeria-item img {
    display: block;
    width: 100%;
    height: 190px;
    object-fit: cover;
}

.galeria-info {
    padding: 15px 16px 17px;
}

.galeria-categoria {
    display: block;
    margin-bottom: 5px;
    color: #d71920;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.galeria-info h3 {
    margin: 0 0 7px;
    color: #082b4c;
    font-size: 1rem;
}

.galeria-info p {
    margin: 0;
    color: #536273;
    font-size: 0.86rem;
    line-height: 1.45;
}

/* Botones laterales */

.galeria-btn {
    width: 44px;
    height: 44px;
    border: 1px solid #dbe4ea;
    border-radius: 50%;
    background: #ffffff;
    color: #082b4c;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(6, 31, 55, 0.08);
    transition: all 0.2s ease;
}

.galeria-btn:hover {
    background: #d71920;
    border-color: #d71920;
    color: #ffffff;
}

.galeria-pie {
    margin-top: 10px;
    text-align: center;
    color: #667788;
    font-size: 0.82rem;
}

.galeria-vacia {
    width: 100%;
    margin: 0;
    padding: 34px;
    text-align: center;
    background: #ffffff;
    border: 1px dashed #b8c5cf;
    border-radius: 10px;
    color: #667788;
}

/* Adaptación móvil */

@media (max-width: 700px) {
    .galeria-section {
        padding: 46px 0;
    }

    .galeria-controles {
        grid-template-columns: 36px minmax(0, 1fr) 36px;
        gap: 7px;
    }

    .galeria-btn {
        width: 34px;
        height: 34px;
        font-size: 1.4rem;
    }

    .galeria-item {
        flex-basis: 82%;
    }

    .galeria-item img {
        height: 180px;
    }
}
/* =========================================
   VISOR AMPLIADO - MEMORIA GRÁFICA
   ========================================= */

.galeria-imagen {
    cursor: zoom-in;
}

.galeria-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(3, 18, 31, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.galeria-modal-contenido {
    position: relative;
    max-width: 1100px;
    max-height: 92vh;
    text-align: center;
}

.galeria-modal-contenido img {
    display: block;
    max-width: 100%;
    max-height: 82vh;
    width: auto;
    height: auto;
    margin: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .45);
}

.galeria-modal-cerrar {
    position: absolute;
    top: -18px;
    right: -18px;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: #ffffff;
    color: #082b4c;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
}

.galeria-modal-cerrar:hover {
    background: #d71920;
    color: #ffffff;
}

.galeria-modal-titulo {
    margin-top: 12px;
    color: #ffffff;
    font-size: .95rem;
    font-weight: 600;
}

.galeria-modal-abierto {
    overflow: hidden;
}

@media (max-width: 700px) {

    .galeria-modal {
        padding: 18px;
    }

    .galeria-modal-cerrar {
        top: -14px;
        right: -6px;
    }

    .galeria-modal-contenido img {
        max-height: 78vh;
    }
}

/* Contenedor foto + insignia en el visor ampliado */
.galeria-modal-foto {
    position: relative;
    display: inline-block;
    line-height: 0;
    background: #ffffff;
    border-radius: 8px;
    padding: 6px;
}

.galeria-modal-boton {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: clamp(64px, 15vmin, 110px) !important;
    height: clamp(64px, 15vmin, 110px) !important;
    max-width: none;
    max-height: none;
    margin: 0;
    object-fit: contain;
    object-position: center;
    border-radius: 6px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .35);
    z-index: 2;
    cursor: default;
    border: none;
}

@media (max-width: 700px) {
    .galeria-modal-boton {
        right: 5px;
        bottom: 5px;
    }
}