.gallery-page {
    background: linear-gradient(180deg, rgba(233, 241, 247, 0.45) 0%, rgba(238, 247, 242, 0.55) 100%);
}

.gallery-head {
    margin-bottom: 1.25rem;
    padding: clamp(1.1rem, 2vw, 1.6rem);
    border-radius: 1.25rem;
    border: 1px solid rgba(26, 97, 58, 0.13);
    background: linear-gradient(125deg, #ffffff 0%, #f6fbf8 100%);
    box-shadow: 0 12px 30px rgba(19, 68, 44, 0.08);
}

.gallery-head-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: rgba(31, 111, 67, 0.12);
    color: #1f6f43;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.gallery-head-title {
    margin: 0.95rem 0 0.4rem;
    font-size: clamp(1.5rem, 2.5vw, 2.05rem);
    line-height: 1.25;
    font-weight: 800;
    color: #163b5a;
}

.gallery-head-copy {
    margin: 0;
    max-width: 760px;
    color: #52677a;
    font-size: 1.03rem;
    line-height: 1.7;
}

.gallery-head-hint {
    margin-top: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.85rem;
    border-radius: 0.75rem;
    background: rgba(231, 155, 47, 0.17);
    border: 1px solid rgba(231, 155, 47, 0.32);
    color: #7d4f0e;
    font-weight: 600;
    font-size: 0.92rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.1rem;
}

.gallery-card {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.gallery-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.gallery-card-link {
    height: 100%;
    display: block;
    border-radius: 1.1rem;
    overflow: hidden;
    border: 1px solid rgba(18, 58, 90, 0.08);
    background: #fff;
    box-shadow: 0 14px 30px rgba(17, 49, 77, 0.1);
    text-decoration: none;
}

.gallery-card-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 34px rgba(17, 49, 77, 0.16);
}

.gallery-media {
    margin: 0;
    height: 240px;
    overflow: hidden;
    position: relative;
    background: #d6e5f3;
}

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

.gallery-card-link:hover .gallery-image {
    transform: scale(1.06);
}

.gallery-content {
    padding: 0.95rem;
}

.gallery-title {
    margin: 0 0 0.7rem;
    color: #173a59;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.45;
    min-height: 2.9em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gallery-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.gallery-date {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    color: #607387;
    font-size: 0.88rem;
    font-weight: 600;
}

.gallery-zoom {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #1f6f43;
    font-size: 0.84rem;
    font-weight: 700;
}

.gallery-empty {
    margin-top: 1.1rem;
    padding: 2.2rem 1.3rem;
    border-radius: 1.05rem;
    border: 1px dashed rgba(18, 58, 90, 0.24);
    background: #fff;
    text-align: center;
    color: #52677a;
}

.gallery-empty i {
    font-size: 2rem;
    color: #1f6f43;
}

.gallery-empty h3 {
    margin: 0.8rem 0 0.25rem;
    color: #163b5a;
    font-size: 1.25rem;
}

.gallery-pagination .pagination {
    justify-content: center;
}

/* Modal de rappel */
.gallery-reminder-modal .modal-content {
    border: 0;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 22px 48px rgba(10, 35, 56, 0.24);
}

.gallery-reminder-modal .modal-content::before {
    content: "";
    display: block;
    height: 6px;
    background: linear-gradient(90deg, #1f6f43 0%, #e79b2f 100%);
}

.gallery-reminder-modal .modal-body {
    padding: 1.15rem 1.25rem 1.2rem;
    text-align: center;
}

.gallery-reminder-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 0.7rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #1f6f43;
    background: rgba(31, 111, 67, 0.14);
}

.gallery-reminder-modal h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 800;
    color: #173a59;
}

.gallery-reminder-modal p {
    margin: 0.55rem 0 1rem;
    color: #5a6d7f;
    font-size: 0.95rem;
}

.gallery-reminder-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
}

/* Lightbox (modal image) */
#lightboxOverlay {
    background: radial-gradient(circle at top, rgba(26, 97, 58, 0.42) 0%, rgba(8, 25, 40, 0.95) 72%);
    opacity: 1 !important;
}

#lightbox {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: auto !important;
    max-width: calc(100vw - 2rem);
    z-index: 10002;
}

.lb-outerContainer {
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 26px 50px rgba(5, 21, 35, 0.45);
    max-width: calc(100vw - 2rem);
}

.lb-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lb-image {
    border: 0 !important;
    max-width: calc(100vw - 2rem) !important;
    max-height: 76vh !important;
    width: auto !important;
    height: auto !important;
}

.lb-dataContainer {
    margin-top: 0.5rem;
    border-radius: 0.9rem;
    background: linear-gradient(130deg, rgba(12, 37, 59, 0.95) 0%, rgba(18, 63, 42, 0.95) 100%);
    padding: 0.75rem 0.9rem;
}

.lb-data .lb-caption {
    color: #e9f7ef;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.45;
}

.lb-data .lb-number {
    color: rgba(233, 247, 239, 0.78);
    font-size: 0.82rem;
}

.lb-closeContainer .lb-close {
    filter: brightness(0) invert(1);
    opacity: 0.86;
    transition: opacity 0.2s ease;
}

.lb-closeContainer .lb-close:hover {
    opacity: 1;
}

.lb-nav a.lb-prev,
.lb-nav a.lb-next {
    opacity: 0.9;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.lb-nav a.lb-prev:hover,
.lb-nav a.lb-next:hover {
    opacity: 1;
    transform: scale(1.05);
}

@media (max-width: 1199.98px) {
    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .gallery-head {
        padding: 1rem;
    }

    .gallery-head-title {
        font-size: 1.35rem;
    }

    .gallery-head-copy {
        font-size: 0.95rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 0.95rem;
    }

    .gallery-media {
        height: 215px;
    }

    #lightbox,
    .lb-outerContainer,
    .lb-image {
        max-width: calc(100vw - 1rem) !important;
    }

    .gallery-reminder-modal .modal-body {
        padding: 1rem;
    }

    .gallery-reminder-actions {
        flex-wrap: wrap;
    }

    .gallery-reminder-actions .btn {
        width: 100%;
    }
}
