/* ============================================================
   GALLERY PAGE  –  gallery.css
   Loaded only on the gallery page via $css variable
   ============================================================ */

.gallery-section {
    padding: 4rem 0 5rem;
    background: var(--gris-light, #f4f4f0);
}

/* ── Gallery item (photo or video) ─────────────────────────────────────────── */
.gallery-item {
    cursor: pointer;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    transition: transform .28s ease, box-shadow .28s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,.15);
}

.gallery-item__thumb {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
}

.gallery-item__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .45s ease;
}

.gallery-item:hover .gallery-item__thumb img {
    transform: scale(1.07);
}

.gallery-item__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 40, 112, 0.42);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .28s ease;
}

.gallery-item:hover .gallery-item__overlay {
    opacity: 1;
}

.gallery-item__icon {
    font-size: 2.4rem;
    color: #fff;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,.5));
}

.gallery-item--video .gallery-item__icon {
    font-size: 2.8rem;
}

.gallery-item__caption {
    font-size: 0.82rem;
    color: #3a3a3a;
    text-align: center;
    padding: 0.55rem 0.75rem 0.65rem;
    margin: 0;
    line-height: 1.35;
    font-weight: 500;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Category card (gallery home listing) ───────────────────────────────────── */
.gallery-cat-card {
    display: block;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
    transition: transform .28s ease, box-shadow .28s ease;
    text-decoration: none;
    color: inherit;
}

.gallery-cat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(0,0,0,.2);
}

.gallery-cat-card__img {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
}

.gallery-cat-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s ease;
}

.gallery-cat-card:hover .gallery-cat-card__img img {
    transform: scale(1.07);
}

.gallery-cat-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,28,82,.82) 0%, rgba(0,28,82,.18) 60%);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem 1.25rem;
    transition: background .28s ease;
}

.gallery-cat-card:hover .gallery-cat-card__overlay {
    background: linear-gradient(to top, rgba(0,28,82,.92) 0%, rgba(0,28,82,.28) 60%);
}

.gallery-cat-card__text h5 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.2rem;
    text-shadow: 0 1px 4px rgba(0,0,0,.4);
}

.gallery-cat-card__text span {
    font-size: 0.82rem;
    color: #ecdbbb;
    font-weight: 400;
}

/* ── Category description block ─────────────────────────────────────────────── */
.gallery-cat-description {
    font-size: 0.97rem;
    line-height: 1.85;
    color: #3a3a3a;
}

.gallery-cat-description h2,
.gallery-cat-description h3 {
    color: #00388d;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.gallery-cat-description strong {
    color: #8b4513;
}

/* ── Video modal ─────────────────────────────────────────────────────────────── */
.gallery-video-modal .modal-content {
    border-radius: 14px;
    overflow: hidden;
}

.gallery-video-modal .modal-header {
    padding: 1rem 1.25rem 0.5rem;
}

.gallery-video-modal .ratio {
    border-radius: 0 0 14px 14px;
}

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media (max-width: 575.98px) {
    .gallery-item__icon    { font-size: 1.8rem; }
    .gallery-cat-card__text h5 { font-size: 0.95rem; }
    .gallery-section { padding: 2.5rem 0 3.5rem; }
}
