/* Gallery CSS - Reusable for map galleries and similar pages */

/* Base */
.gallery-page {
    background: #fafafa;
    color: #1a1a1a;
    line-height: 1.6;
}

/* Header */
.gallery-header {
    padding: 60px 40px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-header h1 {
    font-size: 2.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.gallery-header p {
    color: #666;
    font-size: 1.1rem;
}

/* Back Link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #666;
    text-decoration: none;
    font-size: 0.95rem;
    margin-bottom: 24px;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: #1a1a1a;
}

.back-link svg {
    width: 16px;
    height: 16px;
}

/* Gallery Grid */
.gallery {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 40px 80px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 40px;
}

/* Gallery Item */
.gallery-item {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-4px);
}

.gallery-item img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 8px;
    background: #eee;
    display: block;
    transition: box-shadow 0.3s ease;
}

.gallery-item:hover img {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.gallery-item .info {
    padding: 16px 4px;
}

.gallery-item .title {
    font-size: 1.1rem;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 6px;
}

.gallery-item .description {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.5;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox.show {
    opacity: 1;
}

.lightbox-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 90vw;
    max-height: 90vh;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.lightbox.show .lightbox-content {
    transform: scale(1);
}

.lightbox-content img {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 4px;
}

.lightbox-info {
    text-align: center;
    padding: 24px 20px;
    max-width: 600px;
}

.lightbox-info .title {
    font-size: 1.3rem;
    font-weight: 500;
    color: #fff;
    margin-bottom: 8px;
}

.lightbox-info .description {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 28px;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-close::before,
.lightbox-close::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 2px;
    background: #fff;
}

.lightbox-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.lightbox-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-nav:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-nav.prev { left: 24px; }
.lightbox-nav.next { right: 24px; }

.lightbox-nav svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: #fff;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Responsive */
@media (max-width: 900px) {
    .gallery-header {
        padding: 40px 24px 24px;
    }

    .gallery-header h1 {
        font-size: 2rem;
    }

    .gallery {
        padding: 16px 24px 60px;
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .gallery-item img {
        height: 240px;
    }

    .lightbox-nav {
        width: 40px;
        height: 40px;
    }

    .lightbox-nav.prev { left: 12px; }
    .lightbox-nav.next { right: 12px; }
}

@media (max-width: 500px) {
    .gallery-header h1 {
        font-size: 1.6rem;
    }

    .gallery-header p {
        font-size: 1rem;
    }

    .lightbox-info .title {
        font-size: 1.1rem;
    }

    .lightbox-info .description {
        font-size: 0.9rem;
    }
}
