/* ============================================
   Fair Detail Page Styles
   ============================================ */

/* Fair Gallery */
.fair-detail__gallery {
    padding-top: var(--spacing-3xl);
    padding-bottom: var(--spacing-3xl);
    background-color: #fff;
    margin-top: 50px;
    margin-bottom: 50px;
}

.fair-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    width: 100%;
}

.fair-gallery__item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background-color: var(--color-background-light);
    cursor: pointer;
}

.fair-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-base);
}

.fair-gallery__item:hover img {
    transform: scale(1.05);
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

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

.lightbox__container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.lightbox__image {
    max-width: 100%;
    max-height: 85vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

.lightbox__close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10001;
}

.lightbox__close:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10001;
}

.lightbox__nav:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.lightbox__nav--prev {
    left: 40px;
}

.lightbox__nav--next {
    right: 40px;
}

.lightbox__counter {
    margin-top: 20px;
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
}

/* Fair Description */
.fair-detail__description {
    padding-top: var(--spacing-3xl);
    padding-bottom: var(--spacing-3xl);
    background-color: var(--color-background-light);
}

.fair-detail__content {
    max-width: 900px;
    margin: 0 auto;
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--color-text);
}

/* Responsive */
@media (max-width: 1024px) {
    .fair-detail__title {
        font-size: 3rem;
    }
    
    .fair-gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .fair-detail__hero {
        padding-top: 140px;
    }
    
    .fair-detail__title {
        font-size: 2.5rem;
    }
    
    .fair-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .fair-detail__title {
        font-size: 2rem;
    }
    
    .fair-gallery {
        grid-template-columns: 1fr;
    }
}

