.jewish-communities-explorer {
    width: 100%;
}

.jewish-communities-explorer .historical-hero {
    position: relative;
}

.jewish-communities-explorer .historical-hero::after {
    background: linear-gradient(
        90deg,
        var(--history-accent),
        transparent
    );
    content: "";
    display: block;
    height: 1px;
    margin-top: 1.75rem;
    max-width: 620px;
    opacity: 0.55;
}


.historical-country-index__hero::after {
    display: none;
}


/* =========================================================
   Country explorer landing hero
   ========================================================= */

.historical-country-index__hero {
    position: relative;

    min-height: 400px;
    margin-bottom: 2.75rem;
    padding: 2.5rem 0;

    display: flex;
    align-items: center;

    overflow: hidden;

    border: 0;
    border-radius: 0;

    background: transparent;
    box-shadow: none;
}

.historical-country-index__hero-content {
    position: relative;
    z-index: 2;

    width: 58%;
    max-width: 760px;
}

.historical-country-index__hero-art {
    position: absolute;

    top: 50%;
    right: -1rem;

    width: min(46%, 620px);
    height: auto;

    transform: translateY(-50%);

    pointer-events: none;
    user-select: none;
}


.historical-country-index__hero h1 {
    margin: 0.75rem 0 1rem;

    color: #ffffff;

    font-size: clamp(2.6rem, 4.4vw, 4.6rem);
    line-height: 1.02;
    letter-spacing: -0.035em;
}

.historical-country-index__hero-description {
    max-width: 720px;
    margin: 0;

    color: rgba(255, 255, 255, 0.88);

    font-size: 1rem;
    line-height: 1.7;
}

.historical-country-index__hero-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1.5rem;

    margin-top: 1.6rem;
    padding-top: 1.25rem;

    border-top: 1px solid rgba(200, 164, 91, 0.35);
}

.historical-country-index__hero-highlights span {
    position: relative;

    padding-left: 0.9rem;

    color: var(--history-accent);

    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.035em;
}

.historical-country-index__hero-highlights span::before {
    content: "";

    position: absolute;
    left: 0;
    top: 50%;

    width: 4px;
    height: 4px;

    border-radius: 50%;

    background: var(--history-accent);

    transform: translateY(-50%);
}

@media (max-width: 700px) {

    .historical-country-index__hero {
        min-height: auto;
        padding: 1.75rem 0;

        align-items: flex-start;
    }

    .historical-country-index__hero-content {
        width: 100%;
        max-width: none;
    }

    .historical-country-index__hero h1 {
        max-width: 90%;

        font-size: clamp(2.4rem, 11vw, 3.4rem);
    }

    .historical-country-index__hero-description {
        max-width: 90%;

        font-size: 0.95rem;
        line-height: 1.6;
    }

    .historical-country-index__hero-highlights {
        display: grid;
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        max-width: 100%;
        gap: 0.7rem 1rem;
    }

    .historical-country-index__hero-highlights span {
        white-space: nowrap;
    }

    .historical-country-index__hero-art {
        display: none;
    }

    .historical-country-index
    .historical-section__header {
        align-items: flex-start;
        flex-direction: column;

        gap: 0.75rem;
    }

    .historical-country-index
    .historical-section__context {
        display: block;

        width: 100%;

        text-align: left;
    }

    .historical-country-index__coming-soon {
        display: inline;
    }
}

.historical-country-index {
    margin-top: 0;
}


.historical-country-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}


.historical-country-card {
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.035),
            rgba(255, 255, 255, 0.015)
        );
    border: 1px solid var(--history-border);
    border-radius: 18px;
    color: var(--history-text);
    display: flex;
    flex-direction: column;
    min-height: 235px;
    overflow: hidden;
    padding: 1.35rem;
    position: relative;
    text-decoration: none;
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
}


.historical-country-card[hidden] {
    display: none;
}


.historical-country-card:hover,
.historical-country-card:focus-visible {
    border-color: rgba(200, 164, 91, 0.45);
    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.18),
        0 0 0 1px rgba(200, 164, 91, 0.08);
    transform: translateY(-3px);
}


.historical-country-card:focus-visible {
    outline: 2px solid var(--history-accent);
    outline-offset: 3px;
}


.historical-country-card__top {
    align-items: flex-start;
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}


.historical-country-card__region {
    color: var(--history-accent);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}


.historical-country-card__initial {
    color: rgba(255, 255, 255, 0.035);
    font-size: 6rem;
    font-weight: 700;
    line-height: 0.75;
    position: absolute;
    right: -0.2rem;
    top: -0.1rem;
    user-select: none;
}


.historical-country-card__content {
    position: relative;
    z-index: 1;
}


.historical-country-card__content h3 {
    color: var(--history-text);
    font-size: 1.45rem;
    font-weight: 600;
    margin: 0 0 0.65rem;
}


.historical-country-card__content p {
    color: var(--history-muted);
    font-size: 0.88rem;
    line-height: 1.6;
    margin: 0;
}


.historical-country-card__footer {
    align-items: center;
    border-top: 1px solid var(--history-border);
    color: var(--history-accent);
    display: flex;
    font-size: 0.78rem;
    font-weight: 700;
    justify-content: space-between;
    letter-spacing: 0.025em;
    margin-top: auto;
    padding-top: 1rem;
}


.historical-country-card__footer span:last-child {
    font-size: 1.15rem;
    transition: transform 0.18s ease;
}


.historical-country-card:hover
    .historical-country-card__footer span:last-child {
    transform: translateX(4px);
}


@media (max-width: 900px) {

    .historical-country-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}


@media (max-width: 600px) {

    .historical-country-grid {
        grid-template-columns: 1fr;
    }

    .historical-country-card {
        min-height: 210px;
    }

}

.historical-country-index__coming-soon {
    color: var(--history-muted);
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}


/* =========================================================
   Country explorer region filters
   ========================================================= */

.historical-country-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin: 0 0 1.4rem;
}


.historical-country-filter {
    background: transparent;
    border: 1px solid var(--history-border);
    border-radius: 999px;
    color: var(--history-muted);
    cursor: pointer;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.035em;
    padding: 0.5rem 0.85rem;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
}


.historical-country-filter:hover,
.historical-country-filter:focus-visible {
    background: var(--history-accent-soft);
    border-color: rgba(200, 164, 91, 0.45);
    color: var(--history-text);
}


.historical-country-filter--active {
    background: var(--history-accent-soft);
    border-color: rgba(200, 164, 91, 0.55);
    color: var(--history-accent);
}


.historical-country-filter:focus-visible {
    outline: 2px solid var(--history-accent);
    outline-offset: 2px;
}


.community-page-title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.community-page-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9em;
    line-height: 1;
    color: var(--history-accent, #d6a84b);
}



/* Prevent Jewish Communities link styling from leaking into Leaflet */

.leaflet-control-zoom a,
.leaflet-control-zoom a:hover,
.leaflet-control-zoom a:focus,
.leaflet-control-zoom a:active {
    text-decoration: none !important;
}

.leaflet-control a {
    border-bottom: 0;
}