/* Photo archive page styles — Женская конференция "Время расти" */

.photo-page {
    background-color: var(--color-bg-cream);
    min-height: 100vh;
}

/* Header */
.photo-header {
    background-color: var(--color-primary-dark);
    padding: var(--spacing-sm) 0;
    position: sticky;
    top: 0;
    z-index: var(--z-navbar);
}

.photo-header .container {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.photo-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: var(--font-size-xs);
    transition: color var(--transition-fast);
}

.photo-back:hover {
    color: var(--color-white);
}

.photo-header-title {
    color: rgba(255, 255, 255, 0.5);
    font-size: var(--font-size-xs);
    margin-left: auto;
}

/* Main */
.photo-main {
    padding: var(--spacing-2xl) 0;
}

.photo-intro {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.photo-title {
    font-size: var(--font-size-2xl);
    color: var(--color-primary);
    font-family: var(--font-heading);
    line-height: 1.3;
    margin-bottom: var(--spacing-xs);
}

.photo-subtitle {
    color: var(--color-gray);
    font-size: var(--font-size-md);
    font-weight: 300;
    margin-top: 6px;
}

/* Gallery grid */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.gallery-item {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    background-color: #e8e4de;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
    opacity: 0.92;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.lightbox.open {
    display: flex;
}

.lightbox-close {
    position: fixed;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 28px;
    cursor: pointer;
    z-index: 10000;
    line-height: 1;
    padding: 8px;
    transition: color 0.2s;
}

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

.lightbox-prev,
.lightbox-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: none;
    color: rgba(255,255,255,0.8);
    font-size: 40px;
    cursor: pointer;
    z-index: 10000;
    padding: 8px 16px;
    border-radius: 4px;
    line-height: 1;
    transition: background 0.2s, color 0.2s;
}

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

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.lightbox-content {
    max-width: calc(100vw - 120px);
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#lightbox-img {
    max-width: 100%;
    max-height: calc(100vh - 60px);
    object-fit: contain;
    border-radius: 4px;
}

.lightbox-counter {
    color: rgba(255,255,255,0.5);
    font-size: var(--font-size-xs);
    margin-top: 8px;
}

/* Footer */
.photo-footer {
    background-color: var(--color-primary-dark);
    padding: var(--spacing-md) 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: var(--font-size-xs);
}

@media (max-width: 900px) {
    .photo-gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile */
@media (max-width: 600px) {
    .photo-title {
        font-size: var(--font-size-xl);
    }

    .photo-intro {
        margin-bottom: var(--spacing-lg);
    }

    .photo-gallery {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .lightbox-prev,
    .lightbox-next {
        display: none;
    }

    .lightbox-content {
        max-width: 100vw;
    }
}
