/*
 * Photo gallery styles
 * Timeline view with year sections
 */

/* ============ Page Header ============ */

.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.stats-line {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ============ Year Section ============ */

.year-section {
    margin-bottom: 3rem;
}

.year-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding: 0.5rem 0;
    position: sticky;
    top: 0;
    background: var(--bg-primary);
    z-index: 10;
    border-bottom: 1px solid var(--border);
}

/* ============ Month Section ============ */

.month-section {
    margin-bottom: 2rem;
}

.month-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    padding-left: 0.25rem;
}

/* ============ Photo Grid ============ */

.photo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.photo-item {
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    background: var(--bg-tertiary);
    transition: transform 0.2s, box-shadow 0.2s;
}

.photo-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px var(--shadow);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

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

.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-img {
    max-width: 95vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    z-index: 10;
    transition: color 0.2s;
}

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

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 3rem;
    cursor: pointer;
    padding: 1rem;
    z-index: 10;
    transition: color 0.2s;
    user-select: none;
}

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

.lightbox-prev {
    left: 0.5rem;
}

.lightbox-next {
    right: 0.5rem;
}

/* ============ Loading ============ */

.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

/* ============ Responsive ============ */

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

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

    .year-title {
        font-size: 1.25rem;
    }

    .lightbox-nav {
        font-size: 2rem;
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 1.5rem;
    }

    .photo-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .photo-item {
        aspect-ratio: 4 / 3;
    }
}
