/* ------------------------------
   INTRO SECTION
------------------------------ */

.gallery-intro {
    margin-bottom: 2.25rem;
}

.gallery-title {
    margin: 0 0 .35rem;
    font-size: clamp(1.4rem, 1.2vw + 1.2rem, 1.9rem);
    font-weight: 700;
}

.gallery-sub {
    margin: 0;
    color: var(--muted);
}

/* ------------------------------
   GRID LAYOUT
------------------------------ */

.gallery-section {
    margin-bottom: 3rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

@media (min-width: 600px) {
    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.5rem;
    }
}

@media (min-width: 960px) {
    .gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1.75rem;
    }
}

/* ------------------------------
   CARD ITEM
------------------------------ */

.gallery-item {
    position: relative;
    background: radial-gradient(circle at top left,
                rgba(170, 194, 207, 0.18),
                transparent 55%)
                , var(--card);
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, .30);
    box-shadow: 0 16px 32px rgba(15, 23, 42, .10);
    cursor: pointer;

    display: flex;
    flex-direction: column;
    text-align: center;

    padding: 0;
    transition:
        transform .22s ease,
        box-shadow .22s ease,
        border-color .22s ease,
        background .22s ease;
}

/* hover sheen overlay */
.gallery-item::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(135deg,
        rgba(199, 118, 89, .18),
        rgba(170, 194, 207, .12));
    pointer-events: none;
    transition: opacity .22s ease;
}

.gallery-item:hover,
.gallery-item:focus-visible {
    transform: translateY(-6px);
    border-color: var(--accent);
    box-shadow: 0 22px 45px rgba(15, 23, 42, .18);
    outline: none;
}

.gallery-item:hover::after,
.gallery-item:focus-visible::after {
    opacity: 1;
}

/* ------------------------------
   IMAGE
------------------------------ */

.gallery-thumb {
    width: 100%;
    height: 210px;
    display: block;
    object-fit: cover;

    border-radius: 22px 22px 0 0;

    box-shadow: 0 12px 30px rgba(15, 23, 42, .20);
    transform: translateY(0) scale(1.01);

    transition:
        transform .32s ease,
        box-shadow .32s ease;
}

.gallery-item:hover .gallery-thumb,
.gallery-item:focus-visible .gallery-thumb {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 20px 40px rgba(15, 23, 42, .28);
}

/* ------------------------------
   META BLOCK (LABEL + ES + EN)
------------------------------ */

.gallery-meta {
    padding: .75rem 1rem 1.05rem;
    border-top: 1px solid rgba(148, 163, 184, .25);
    background: linear-gradient(to bottom, #fdfbf7, #fbf6ee);
}

/* label chip */
.gallery-label {
    display: inline-block;
    margin: 0 0 .5rem;
    padding: .25rem .75rem;

    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;

    border-radius: 999px;

    background: rgba(199, 118, 89, .12);
    color: #4b5563;
    border: 1px solid rgba(199, 118, 89, .25);
}

/* bilingual lines */
.gallery-desc {
    margin: 0;
    line-height: 1.55;
    color: var(--muted);
}

.gallery-desc-es {
    margin-top: .1rem;
    font-size: .88rem;
}

/* English subtitle smaller + lighter */
.gallery-desc-en {
    margin-top: .25rem;
    font-size: .80rem;
    color: rgba(107, 114, 128, .95);
}

/* ES / EN pills */
.gallery-desc-es::before,
.gallery-desc-en::before {
    content: attr(data-prefix);
    display: inline-block;

    margin-right: .35rem;
    padding: 0 .4rem;

    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;

    border-radius: 999px;
    background: rgba(148, 163, 184, .18);
    color: #4b5563;
}

/* manually inject labels */
.gallery-desc-es::before {
    content: "ES";
}
.gallery-desc-en::before {
    content: "EN";
}

/* ------------------------------
   LIGHTBOX
------------------------------ */

.lightbox {
    position: fixed;
    inset: 0;
    padding: 1.5rem;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(15, 23, 42, .65);
    z-index: 40;
}

.lightbox[hidden] {
    display: none;
}

.lightbox-img {
    max-width: min(960px, 100%);
    max-height: 70vh;

    display: block;
    margin: 0 auto .75rem;

    object-fit: contain;
    border-radius: 18px;

    background: #000;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .4);
}

.lightbox-caption {
    margin: 0;
    text-align: center;
    color: #e5e7eb;
    font-size: .95rem;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;

    width: 36px;
    height: 36px;

    border: none;
    border-radius: 999px;

    background: #f9fafb;
    color: #111827;

    font-size: 1.5rem;
    line-height: 1;

    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .2);
}
