/* ============================================================
   Galería: tarjetas de categoría y elementos
   (usa las variables y clases del sistema de diseño: css.min.css)
   ============================================================ */

.gallery-cat-description {
    font-size: 16px;
    line-height: 1.7;
    color: #5a6a7a;
    max-width: 820px;
}

/* ----- Tarjetas de categoría ----- */
.gallery-cat-card {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    overflow: hidden;
    background: var(--color-azul-corp);
    text-decoration: none;
}

.gallery-cat-card__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-cat-card__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
    background: linear-gradient(to top, rgba(0, 35, 69, 0.9) 0%, rgba(0, 35, 69, 0.2) 60%, transparent 100%);
    color: #ffffff;
}

.gallery-cat-card__overlay h5 {
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 4px;
}

.gallery-cat-card__overlay span {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.gallery-cat-card:hover .gallery-cat-card__img,
.gallery-cat-card:focus-visible .gallery-cat-card__img {
    transform: scale(1.08);
}

/* ----- Elementos (fotos y videos) ----- */
.gallery-item {
    position: relative;
}

.gallery-item__thumb {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    overflow: hidden;
    background: #e9e9e6;
    box-shadow: 0 1px 3px rgba(0, 35, 69, 0.08);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.gallery-item:hover .gallery-item__thumb {
    box-shadow: 0 16px 32px rgba(0, 35, 69, 0.14);
    transform: translateY(-3px);
}

.gallery-item--video:focus-visible {
    outline: 3px solid var(--color-naranjo-corp, #E85A18);
    outline-offset: 3px;
    border-radius: 8px;
}

.gallery-item__thumb a,
.gallery-item--video {
    display: block;
    height: 100%;
    cursor: pointer;
}

.gallery-item__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 35, 69, 0.35);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item__icon {
    color: #ffffff;
    font-size: 40px;
}

.gallery-item:hover .gallery-item__thumb img,
.gallery-item__thumb a:focus-visible img {
    transform: scale(1.08);
}

.gallery-item:hover .gallery-item__overlay,
.gallery-item__thumb a:focus-visible .gallery-item__overlay {
    opacity: 1;
}

.gallery-item__caption {
    margin: 12px 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-azul-corp);
}

@media (prefers-reduced-motion: reduce) {
    .gallery-cat-card__img,
    .gallery-item__thumb,
    .gallery-item__thumb img {
        transition: none;
    }

    .gallery-cat-card:hover .gallery-cat-card__img,
    .gallery-item:hover .gallery-item__thumb,
    .gallery-item:hover .gallery-item__thumb img {
        transform: none;
    }
}
