@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Manrope:wght@400;500;700&display=swap');

:root {
    --ink-900: #1a1714;
    --ink-700: #3a332d;
    --ink-500: #675b50;
    --sand-100: #f7f2eb;
    --teal-700: #2f5a63;
    --gold-500: #b88a44;
    --shadow-card: 0 14px 32px rgba(26, 23, 20, 0.12);
}

.container {
    max-width: 1140px;
}

.page-heading {
    margin: 0 auto 2.2rem;
    text-align: center;
    max-width: 760px;
}

.page-kicker {
    margin: 0 0 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font: 700 0.8rem/1 Manrope, sans-serif;
    color: var(--teal-700);
}

.page-heading h1 {
    margin: 0;
    color: var(--ink-900);
    font: 700 clamp(2.1rem, 4vw, 3.2rem)/1.08 "Cormorant Garamond", serif;
}

.event-card {
    margin-bottom: 2rem;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(26, 23, 20, 0.08);
    background: #fff;
    box-shadow: var(--shadow-card);
}

.event-header {
    padding: 1rem 1.25rem;
    color: #fff;
    background: linear-gradient(135deg, #284d54, #3f737d 60%, #5e8a93);
}

.event-title {
    margin: 0;
    color: #fff;
    font: 700 1.7rem/1.12 "Cormorant Garamond", serif;
}

.event-date {
    margin-left: 0.5rem;
    font: 700 0.95rem/1 Manrope, sans-serif;
    color: #d6ebe8;
}

.carousel-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #0e0d0c;
}

.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
    animation: fadeIn 0.45s ease;
}

.carousel-image.active {
    display: block;
}

.carousel-indicators {
    position: absolute;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    display: flex;
    gap: 0.45rem;
}

.carousel-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.46);
    border: 1px solid rgba(255, 255, 255, 0.8);
    cursor: pointer;
}

.carousel-indicator.active {
    width: 22px;
    border-radius: 99px;
    background: #fff;
}

.event-description {
    padding: 1rem 1.2rem 1.2rem;
    background: linear-gradient(180deg, #fff, var(--sand-100));
}

.event-description p {
    margin: 0;
    color: var(--ink-700);
    font: 500 0.98rem/1.75 Manrope, sans-serif;
    white-space: pre-wrap;
}

.no-events {
    text-align: center;
    border-radius: 16px;
    padding: 2.2rem 1.2rem;
    border: 1px solid rgba(26, 23, 20, 0.08);
    background: #f2f8fa;
    color: #35535a;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (max-width: 980px) {
    .carousel-container {
        aspect-ratio: 4/3;
    }
}

@media (max-width: 640px) {
    .event-title {
        font-size: 1.35rem;
    }

    .event-date {
        display: block;
        margin: 0.35rem 0 0;
    }

    .carousel-container {
        height: 240px;
    }
}

/* ── Botón ver cuadrícula ── */
.gallery-grid-btn {
    position: absolute;
    bottom: 14px;
    right: 14px;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.6rem 1.05rem;
    border: none;
    border-radius: 999px;
    background: rgba(26, 23, 20, 0.62);
    color: #fff;
    font: 700 0.9rem/1 Manrope, sans-serif;
    cursor: pointer;
    backdrop-filter: blur(6px);
    transition: background 0.2s ease, transform 0.15s ease;
    z-index: 10;
}

.gallery-grid-btn svg {
    width: 17px;
    height: 17px;
}

.gallery-grid-btn:hover {
    background: rgba(26, 23, 20, 0.85);
    transform: translateY(-1px);
}

/* ── Modal cuadrícula ── */
.grid-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.grid-modal.open {
    visibility: visible;
    opacity: 1;
}

.grid-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 9, 8, 0.72);
    backdrop-filter: blur(4px);
}

.grid-modal-inner {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 16px;
    width: min(92vw, 860px);
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.grid-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #284d54, #3f737d);
    flex-shrink: 0;
}

.grid-modal-title {
    color: #fff;
    font: 700 1.15rem/1.2 "Cormorant Garamond", serif;
}

.grid-modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.2rem;
    transition: color 0.15s ease;
}

.grid-modal-close:hover {
    color: #fff;
}

.grid-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 4px;
    padding: 8px;
    overflow-y: auto;
}

.grid-photo-btn {
    aspect-ratio: 1;
    border: none;
    padding: 0;
    margin: 0;
    background: #0e0d0c;
    cursor: zoom-in;
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.grid-photo-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.18s ease;
}

.grid-photo-btn:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
    z-index: 1;
}

.grid-photo-btn:hover img {
    opacity: 0.9;
}

/* ── Lightbox ── */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.lightbox.open {
    visibility: visible;
    opacity: 1;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 9, 8, 0.92);
}

.lightbox-img-wrap {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: min(90vw, 1100px);
    max-height: 90vh;
}

.lightbox-img {
    max-width: 100%;
    max-height: 82vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.2s ease;
}

.lightbox-counter {
    margin: 0.6rem 0 0;
    color: rgba(255, 255, 255, 0.6);
    font: 600 0.82rem/1 Manrope, sans-serif;
}

.lightbox-close {
    position: fixed;
    top: 18px;
    right: 22px;
    z-index: 2;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.75);
    font-size: 2.4rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.15s ease;
}

.lightbox-close:hover { color: #fff; }

.lightbox-prev,
.lightbox-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #fff;
    font-size: 2.4rem;
    line-height: 1;
    padding: 0.5rem 0.7rem;
    border-radius: 8px;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: background 0.15s ease;
}

.lightbox-prev { left: 14px; }
.lightbox-next { right: 14px; }
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(255, 255, 255, 0.25); }

@media (max-width: 640px) {
    .grid-photos {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    .lightbox-prev { left: 4px; }
    .lightbox-next { right: 4px; }
}
