/* Editorial Intro */
.editorial-intro {
    display: grid;
    grid-template-columns: auto 2px 1fr;
    gap: 3rem;
    align-items: start;
    margin-bottom: 5rem;
}

.editorial-date {
    text-align: right;
    padding-right: 1rem;
}

.editorial-year {
    font-family: var(--font-display);
    font-size: clamp(5rem, 10vw, 8rem);
    font-weight: 400;
    line-height: 0.85;
    color: var(--v3-terracotta);
    letter-spacing: -0.03em;
}

.editorial-est {
    font-family: var(--font-body);
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--v3-warm-gray);
    margin-top: 1rem;
}

.editorial-divider {
    background: var(--v3-sand);
    height: 100%;
    min-height: 250px;
}

.editorial-content {
    padding-left: 1rem;
}

.editorial-lead {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 400;
    font-style: italic;
    line-height: 1.4;
    color: var(--v3-charcoal);
    margin-bottom: 2rem;
    max-width: 600px;
}

.editorial-text {
    columns: 2;
    column-gap: 2.5rem;
    color: var(--v3-warm-gray);
    line-height: 1.8;
}

.editorial-text p {
    margin-bottom: 1.25rem;
    text-align: justify;
    hyphens: auto;
}

@media (max-width: 992px) {
    .editorial-intro {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .editorial-date { text-align: left; padding: 0; }
    .editorial-divider { display: none; }
    .editorial-content { padding: 0; }
    .editorial-text { columns: 1; }
}

/* Centered Timeline */
.centered-timeline {
    position: relative;
    padding: 2rem 0;
    max-width: 1000px;
    margin: 0 auto;
}

.centered-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--v3-terracotta) 0%, var(--v3-sand) 100%);
    transform: translateX(-50%);
}

.timeline-item {
    display: flex;
    justify-content: flex-end;
    position: relative;
    margin-bottom: 4rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0.5rem;
    width: 16px;
    height: 16px;
    background: var(--v3-terracotta);
    border-radius: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 0 4px var(--v3-cream), 0 0 0 6px var(--v3-sand);
    z-index: 2;
}

.timeline-content {
    width: calc(50% - 40px);
    padding-right: 2rem;
    text-align: right;
}

.timeline-item:nth-child(even) {
    justify-content: flex-start;
}

.timeline-item:nth-child(even) .timeline-content {
    padding-right: 0;
    padding-left: 2rem;
    text-align: left;
}

.timeline-year {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 600;
    color: var(--v3-terracotta);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.timeline-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--v3-charcoal);
    margin-bottom: 0.75rem;
}

.timeline-text {
    color: var(--v3-warm-gray);
    line-height: 1.8;
}

@media (max-width: 768px) {
    .centered-timeline::before {
        left: 20px;
    }

    .timeline-item {
        justify-content: flex-start !important;
        padding-left: 50px;
    }

    .timeline-item::before {
        left: 20px;
    }

    .timeline-content {
        width: 100%;
        padding: 0 !important;
        text-align: left !important;
    }
}

/* Section header */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 2.75rem);
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--v3-warm-gray);
}

/* Photo Gallery */
.gallery-section {
    margin-top: 6rem;
    padding-top: 4rem;
    border-top: 1px solid var(--v3-sand);
}

.gallery-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.gallery-tab {
    padding: 0.75rem 2rem;
    font-family: var(--font-body);
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: transparent;
    border: 1px solid var(--v3-sand);
    color: var(--v3-warm-gray);
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-tab:hover {
    border-color: var(--v3-terracotta-dark);
    color: var(--v3-terracotta-dark);
}

.gallery-tab.active {
    background: var(--v3-terracotta-dark); /* #a85d46 — 4.85:1 na białym ✓ WCAG AA */
    border-color: var(--v3-terracotta-dark);
    color: white;
}

.gallery-grid {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.gallery-grid.active {
    display: grid;
}

.gallery-item {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--v3-sand);
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(45,45,45,0.7) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    pointer-events: none;
}

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

.gallery-item-caption {
    color: white;
    font-size: 0.875rem;
}

.gallery-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
    color: var(--v3-warm-gray);
}

.gallery-placeholder svg {
    width: 48px;
    height: 48px;
    opacity: 0.4;
}

.gallery-placeholder span {
    font-size: 0.875rem;
}

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

.lightbox.active {
    display: flex;
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
}

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

.lightbox-close svg {
    width: 32px;
    height: 32px;
}

.lightbox-img {
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
}

.lightbox-caption {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 0.875rem;
    text-align: center;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
}

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

.lightbox-prev {
    left: 2rem;
}

.lightbox-next {
    right: 2rem;
}

@media (max-width: 768px) {
    .gallery-tabs {
        flex-direction: column;
        align-items: center;
    }

    .gallery-tab {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}
