/* Exhibitions styles moved from layout */
.exhibitions {
    padding: 120px 40px 140px;
}

.exhibitions-nav{
    margin-top:30px;
}

.section-header {
    max-width: var(--max-width);
    margin: 0 auto 80px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 40px;
}

.section-label {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.section-title {
    margin: 0;
    max-width: 800px;
    font-size: clamp(42px, 6vw, 82px);
    font-weight: 400;
    line-height: 0.95;
    letter-spacing: -0.05em;
}

.section-description {
    max-width: 330px;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.filters {
    max-width: var(--max-width);
    margin: 0 auto 45px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter {
    border: 1px solid var(--line);
    background: transparent;
    padding: 9px 15px;
    border-radius: 999px;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
    transition: .2s ease;
}

    .filter:hover,
    .filter.active {
        background: var(--text);
        color: var(--white);
        border-color: var(--text);
    }

/* Producers filter styling */
.producers-filter {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 6px;
    background: rgba(255,255,255,0.02);
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.04);
}

.producers-filter .form-control,
.producers-filter .form-select {
    border: 1px solid var(--line);
    padding: 10px 12px;
    border-radius: 999px;
    background: transparent;
    min-height: 40px;
    font-size: 14px;
}

.producers-filter .form-control:focus,
.producers-filter .form-select:focus {
    outline: none;
    box-shadow: 0 4px 18px rgba(1,43,68,0.08);
    border-color: var(--text);
}

.producers-filter .filter {
    padding: 9px 16px;
    border-radius: 999px;
}

@media (max-width: 860px) {
    .producers-filter { flex-direction: column; align-items: stretch; }
    .producers-filter .form-select { width: 100% !important; }
}

.exhibition-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
}

.exhibition-card {
    background: var(--bg);
    padding: 38px;
    min-height: 390px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: background .25s ease, transform .25s ease;
}

    .exhibition-card:hover {
        background: #fff;
    }

/* Featured (first/closest) exhibition styling: dark ocean blue background with white text */
.exhibition-card.featured {
    background: #012b44;
    color: #ffffff;
}

.exhibition-card.featured .card-number,
.exhibition-card.featured .card-date span,
.exhibition-card.featured .card-date,
.exhibition-card.featured .card-location,
.exhibition-card.featured .tag {
    color: rgba(255,255,255,0.9);
}

.exhibition-card.featured .card-name {
    color: #ffffff;
}

.exhibition-card.featured .tags .tag {
    border-color: rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.9);
}

.exhibition-card.featured .visit-link {
    color: #ffffff;
    border-bottom-color: rgba(255,255,255,0.9);
}

/* Ensure hover on featured keeps dark background */
.exhibition-card.featured:hover {
    background: #012b44;
}

.card-top {
    display: flex;
    justify-content: space-between;
    gap: 30px;
}

.card-number {
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.08em;
}

.card-date {
    text-align: right;
    font-size: 13px;
}

    .card-date span {
        display: block;
        color: var(--muted);
        margin-top: 4px;
    }

.card-main {
    margin-top: 70px;
}

/* Map column displayed on the home page (right side of the two-column grid) */
.exhibition-map {
    /* Make the map area occupy the full column without inner padding so the iframe
       can cover 100% of the column space. Keep the same minimum height as cards. */
    background: var(--bg);
    padding: 0;
    min-height: 390px;
    display: block;
}

.exhibition-map iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 390px;
    border: 0;
    border-radius: 0;
    box-shadow: 0 6px 18px rgba(1,43,68,0.06);
}

.map-placeholder { color: var(--muted); }

.card-name {
    max-width: 650px;
    margin: 0;
    font-size: clamp(32px, 4vw, 58px);
    font-weight: 400;
    line-height: 0.98;
    letter-spacing: -0.045em;
}

.card-location {
    margin-top: 18px;
    font-size: 13px;
}

.card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 30px;
    margin-top: 50px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-width: 70%;
}

.tag {
    border: 1px solid var(--line);
    padding: 6px 9px;
    border-radius: 999px;
    font-size: 10px;
    color: var(--muted);
}

.visit-link {
    flex-shrink: 0;
    font-size: 12px;
    border-bottom: 1px solid var(--text);
    padding-bottom: 4px;
}

    .visit-link::after {
        content: " ↗";
    }

/* MOBILE */
@media (max-width: 760px) {

    .exhibitions {
        padding: 80px 20px 90px;
    }

    .section-header {
        margin-bottom: 55px;
        display: block;
    }

    .section-description {
        margin-top: 25px;
    }

    .exhibition-grid {
        grid-template-columns: 1fr;
    }

    .exhibition-card {
        min-height: 360px;
        padding: 27px;
    }

    .card-main {
        margin-top: 55px;
    }

    .card-name {
        font-size: 38px;
    }

    .card-bottom {
        display: block;
    }

    .tags {
        max-width: 100%;
    }

    .visit-link {
        display: inline-block;
        margin-top: 25px;
    }

    .footer {
        padding: 30px 20px;
        display: block;
    }
}

/* Hidden cards for filtering */
.exhibition-card.hidden { display:none; }

/* Pagination styles to match site */
.pagination {
    display: flex;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
    justify-content: center;
    align-items: center;
}

.pagination .page-item {
    display: inline-block;
}

.pagination .page-link {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    transition: .12s ease;
}

.pagination .page-link:hover {
    background: var(--text);
    color: var(--white);
    border-color: var(--text);
}

.pagination .page-item.active .page-link {
    background: var(--text);
    color: var(--white);
    border-color: var(--text);
}

.pagination .page-item.disabled .page-link {
    opacity: 0.45;
    pointer-events: none;
}

@media (max-width: 520px) {
    .pagination .page-link { padding: 6px 8px; font-size: 13px; }
}
