.archive-hero {
    background-color: var(--lake);
    color: var(--birch);
    padding: 3rem 2rem 2.5rem;
    text-align: center;
}

.archive-hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.archive-hero h1 {
    font-size: 2.4rem;
    color: var(--sand);
    margin-bottom: 0.75rem;
}

.archive-hero p {
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.7;
}

.archive-section {
    padding: 2.5rem 2rem 3rem;
    background-color: var(--birch);
}

.archive-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    align-items: start;
}

.archive-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.sidebar-card {
    background: var(--white);
    border: 1px solid rgba(27, 73, 101, 0.12);
    border-radius: 6px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.sidebar-label {
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--lake);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sidebar-card input[type="search"],
.sidebar-card input[type="date"],
.sidebar-card select {
    width: 100%;
    padding: 0.5rem 0.6rem;
    font-family: 'Raleway', sans-serif;
    font-size: 0.85rem;
    color: var(--dark);
    background: var(--birch);
    border: 1px solid rgba(27, 73, 101, 0.2);
    border-radius: 4px;
}

.sidebar-card input[type="search"]:focus,
.sidebar-card input[type="date"]:focus,
.sidebar-card select:focus {
    outline: 2px solid var(--sky);
    outline-offset: 1px;
    border-color: var(--sky);
}

.sidebar-filters {
    gap: 0.4rem;
}

.filter-group {
    border-top: 1px solid rgba(27, 73, 101, 0.1);
    padding: 0.5rem 0;
}

.filter-group:first-of-type {
    border-top: none;
    padding-top: 0;
}

.filter-group summary {
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--lake);
    cursor: pointer;
    padding: 0.3rem 0;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.filter-group summary::-webkit-details-marker {
    display: none;
}

.filter-group summary::after {
    content: '+';
    color: var(--sunset);
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1;
    width: 1rem;
    text-align: center;
}

.filter-group[open] summary::after {
    content: '−';
}

.filter-body {
    padding: 0.5rem 0 0.3rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    max-height: 240px;
    overflow-y: auto;
}

.filter-radio,
.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: var(--dark);
    cursor: pointer;
    line-height: 1.3;
}

.filter-radio input,
.filter-checkbox input {
    accent-color: var(--sunset);
    flex-shrink: 0;
}

.filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.75rem;
    color: var(--lake);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.filter-field input,
.filter-field select {
    text-transform: none;
    letter-spacing: normal;
    font-weight: 400;
}

.filter-empty {
    font-size: 0.8rem;
    color: rgba(26, 26, 26, 0.5);
    font-style: italic;
}

.reset-btn {
    margin-top: 0.6rem;
    background: transparent;
    color: var(--lake);
    border: 2px solid var(--lake);
    padding: 0.45rem 0.8rem;
    border-radius: 6px;
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.reset-btn:hover {
    background: var(--lake);
    color: var(--birch);
}

.archive-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.archive-results-meta {
    font-size: 0.85rem;
    color: var(--lake);
    font-weight: 500;
    margin-bottom: 1rem;
    min-height: 1.2rem;
}

.archive-shuffle {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.archive-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 2rem;
    color: var(--lake);
    font-size: 1rem;
    background: var(--white);
    border: 1px dashed rgba(27, 73, 101, 0.2);
    border-radius: 6px;
}

.gallery-grid:has(.gallery-item-wrapper) .gallery-row {
    align-items: flex-start;
}

.gallery-item-wrapper {
    display: flex;
    flex-direction: column;
    flex-shrink: 1;
    min-width: 0;
}

.gallery-item-wrapper .gallery-item {
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.gallery-item-wrapper:hover .gallery-item {
    transform: scale(1.02);
}

.gallery-item-caption {
    margin-top: 0.4rem;
    flex-shrink: 0;
    font-family: 'Raleway', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--lake);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 0.2rem;
    line-height: 1.3;
}

@media (max-width: 992px) {
    .archive-section {
        padding: 2rem 1.5rem;
    }

    .archive-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .archive-sidebar {
        position: static;
        max-height: none;
    }

    .archive-hero {
        padding: 2.5rem 1.5rem 2rem;
    }

    .archive-hero h1 {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .archive-section {
        padding: 1.5rem 1rem;
    }

    .archive-hero {
        padding: 2rem 1rem 1.5rem;
    }

    .archive-hero h1 {
        font-size: 1.6rem;
    }

    .archive-hero p {
        font-size: 0.85rem;
    }

    .gallery-item-wrapper {
        width: 100% !important;
        height: auto !important;
        flex-basis: auto !important;
        flex-grow: 0 !important;
    }

    .gallery-item-wrapper .gallery-item {
        width: 100% !important;
        height: auto !important;
    }

    .gallery-item-caption {
        font-size: 0.85rem;
        margin-top: 0.3rem;
    }
}

/* ---------- Mobile / tablet polish (additive) ---------- */

@media (max-width: 768px) {
    .sidebar-card input[type="search"],
    .sidebar-card input[type="date"],
    .sidebar-card select,
    .filter-field input,
    .filter-field select {
        font-size: 16px;
    }
}

