
/* ================================
   GALERÍA CON FILTROS
================================ */
.galeria {
    padding: 80px 20px;
    max-width: 1300px;
    margin: auto;
}

/* ================================
   BOTONES CORPORATIVOS
================================ */
.filtros {
    text-align: center;
    margin-bottom: 40px;
}

.filtro-btn {
    position: relative;
    padding: 12px 26px;
    margin: 6px;
    border: 2px solid #7a0000;
    background: #ffffff;
    color: #7a0000;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.3px;
    transition: 0.3s ease;
}

/* Línea corporativa animada */
.filtro-btn::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -6px;
    width: 0%;
    height: 3px;
    background: #7a0000;
    transition: 0.3s ease;
    transform: translateX(-50%);
}

/* Hover elegante */
.filtro-btn:hover {
    background: #7a0000;
    color: #fff;
    transform: translateY(-2px);
}

.filtro-btn:hover::after {
    width: 60%;
}

/* Estado activo corporativo */
.filtro-btn.active {
    background: #7a0000;
    color: #fff;
    transform: translateY(-2px);
}

.filtro-btn.active::after {
    width: 60%;
}

.filtro-btn:hover,
.filtro-btn.active {
    background: #7a0000;
    color: #fff;
    transform: translateY(-2px);
}

/* ================================
   GRID DE IMÁGENES
================================ */
.galeria-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
    max-width: 1300px;
    margin: auto;
    padding: 0 20px;
}

.item {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.12); /* sombra más suave y moderna */
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.3s ease, transform 0.3s ease;   
}

.item.hidden {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
    position: absolute; /* evita que ocupe espacio en el grid */
}

.item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.45s ease;
}

/* Hover más fluido */
.item:hover img {
    transform: scale(1.08);
    filter: brightness(1.05); /* da más vida a la imagen */
}

/* ================================
   LIGHTBOX PREMIUM
================================ */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
    transition: 0.3s ease;
}

.lightbox .close {
    position: absolute;
    top: 25px;
    right: 40px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    user-select: none;
}

.lightbox .arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 55px;
    color: white;
    cursor: pointer;
    padding: 10px;
    user-select: none;
    transition: 0.3s ease;
}

.lightbox .arrow:hover {
    transform: translateY(-50%) scale(1.2);
}

.lightbox .arrow.left {
    left: 40px;
}

.lightbox .arrow.right {
    right: 40px;
}

/* ================================
   RESPONSIVE
================================ */
@media (max-width: 1024px) {
    .galeria-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .galeria-hero-content h1 {
        font-size: 36px;
    }

    .galeria-hero-content p {
        font-size: 16px;
    }

    .galeria-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .galeria-hero {
        height: 240px;
    }

    .galeria-hero-content h1 {
        font-size: 30px;
    }

    .galeria-grid {
        grid-template-columns: repeat(1, 1fr);
    }
    .filtros {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    .filtro-btn {
        flex: 1 1 45%; /* se acomodan en dos columnas */
        margin: 6px;
    }
}

