/* ========== Events Page ========== */

.events-hero {
    padding: var(--section-py) 0 48px;
    text-align: center;
}

.events-hero h1 {
    margin-bottom: 16px;
}

.events-hero p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto;
}

.events-section {
    padding: 0 0 var(--section-py);
}

/* ========== Events Grid ========== */

.events-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 640px) {
    .events-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .events-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ========== Event Card ========== */

.event-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    text-decoration: none;
    color: inherit;
}

.event-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5);
    border-color: rgba(201, 168, 76, 0.35);
}

.event-card-cover {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--bg-tertiary);
    position: relative;
}

.event-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
}

.event-card:hover .event-card-cover img {
    transform: scale(1.05);
}

.event-card-body {
    padding: 20px 24px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 10px;
}

.event-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.event-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    line-height: 1.6;
}

.event-badge-done {
    background: rgba(201, 168, 76, 0.12);
    color: var(--gold);
    border: 1px solid rgba(201, 168, 76, 0.3);
}

.event-card-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.event-card-title {
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.45;
    color: var(--text-primary);
    margin: 0;
}

.event-card-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    flex: 1;
}

.event-card-footer {
    margin-top: 6px;
}

/* ========== Event Detail Page ========== */

.event-detail-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-decoration: none;
    transition: color var(--transition-fast);
    margin-bottom: 32px;
}

.event-detail-back:hover {
    color: var(--text-primary);
}

.event-detail-back svg {
    flex-shrink: 0;
}

.event-detail-hero {
    padding: var(--section-py) 0 48px;
}

.event-detail-tag {
    margin-bottom: 20px;
}

.event-detail-hero h1 {
    margin-bottom: 16px;
}

.event-detail-hero p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 640px;
    line-height: 1.7;
}

/* ========== Photo Gallery ========== */

.event-gallery-section {
    padding: 0 0 var(--section-py);
}

.event-gallery {
    columns: 3;
    column-gap: 10px;
}

@media (max-width: 767px) {
    .event-gallery {
        columns: 2;
    }
}

@media (max-width: 479px) {
    .event-gallery {
        columns: 1;
    }
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 10px;
    position: relative;
    cursor: pointer;
    border-radius: var(--radius-sm);
    overflow: hidden;
    display: block;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), filter 0.3s;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background var(--transition);
    pointer-events: none;
    border-radius: var(--radius-sm);
}

.gallery-item:hover::after {
    background: rgba(0, 0, 0, 0.28);
}

.gallery-item-zoom {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition);
    pointer-events: none;
    z-index: 1;
}

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

.gallery-item-zoom svg {
    width: 36px;
    height: 36px;
    color: #fff;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6));
}

/* ========== Lightbox ========== */

#galleryLightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

#galleryLightbox.open {
    display: flex;
}

.lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    cursor: zoom-out;
}

.lightbox-box {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 94vw;
    max-height: 92vh;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 88vh;
    object-fit: contain;
    display: block;
    border-radius: var(--radius-sm);
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.7);
    user-select: none;
}

.lightbox-btn {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(20, 20, 24, 0.75);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast);
    z-index: 2;
    padding: 0;
}

.lightbox-btn:hover {
    background: rgba(201, 168, 76, 0.2);
    border-color: rgba(201, 168, 76, 0.5);
}

.lightbox-btn-prev {
    left: 16px;
}

.lightbox-btn-next {
    right: 16px;
}

.lightbox-close {
    position: fixed;
    top: 16px;
    right: 16px;
    background: rgba(20, 20, 24, 0.75);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    transition: background var(--transition-fast);
    z-index: 2;
    padding: 0;
}

.lightbox-close:hover {
    background: rgba(230, 57, 70, 0.25);
    border-color: rgba(230, 57, 70, 0.5);
}

.lightbox-counter {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: rgba(255,255,255,0.55);
    z-index: 2;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

@media (max-width: 599px) {
    .lightbox-btn {
        width: 38px;
        height: 38px;
    }

    .lightbox-btn-prev {
        left: 8px;
    }

    .lightbox-btn-next {
        right: 8px;
    }
}
