/* =====================================================
   MAPPA SCUOLE GO WEST
===================================================== */

.schools-map-hero,
.schools-map-section,
.schools-help,
.schools-map-cta {
    --map-dark: #211812;
    --map-dark-2: #17100c;
    --map-brown: #59311f;
    --map-rust: #a74726;
    --map-gold: #dcae52;
    --map-cream: #f7efe2;
    --map-green: #52965d;
}

.container--map {
    width: min(1560px, calc(100% - 48px));
    max-width: 1560px;
    margin-right: auto;
    margin-left: auto;
}

/* =====================================================
   HERO
===================================================== */

.schools-map-hero {
    position: relative;
    padding: clamp(130px, 13vw, 190px) 0 clamp(70px, 8vw, 110px);
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(
            circle at 85% 25%,
            rgba(220, 174, 82, .22),
            transparent 30%
        ),
        linear-gradient(
            125deg,
            var(--map-dark-2),
            #3d2518
        );
}

.schools-map-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .13;
    background-image:
        repeating-linear-gradient(
            45deg,
            transparent 0,
            transparent 18px,
            rgba(255, 255, 255, .1) 19px,
            transparent 20px
        );
}

.schools-map-hero .container {
    position: relative;
    z-index: 1;
}

.schools-map-hero__eyebrow,
.schools-map-section__eyebrow,
.schools-help__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    color: var(--map-gold);
    font-family: var(--heading, "Barlow Condensed", sans-serif);
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.schools-map-hero__eyebrow::before,
.schools-map-section__eyebrow::before {
    content: "";
    width: 38px;
    height: 3px;
    border-radius: 20px;
    background: currentColor;
}

.schools-map-hero h1 {
    max-width: 950px;
    margin: 0;
    font-family: var(--heading, "Barlow Condensed", sans-serif);
    font-size: clamp(3.5rem, 7vw, 7rem);
    font-weight: 800;
    line-height: .88;
    letter-spacing: -.035em;
    text-transform: uppercase;
}

.schools-map-hero h1 span {
    display: block;
    color: var(--map-gold);
    font-family: var(--accent-font, "Roboto Slab", serif);
    font-size: .62em;
    line-height: 1.16;
    text-transform: none;
}

.schools-map-hero p {
    max-width: 690px;
    margin: 26px 0 31px;
    color: rgba(255, 255, 255, .72);
    font-size: 1.08rem;
    line-height: 1.75;
}

.schools-map-hero__button,
.schools-map-cta__button {
    display: inline-flex;
    min-height: 54px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 13px 26px;
    color: #fff;
    border: 2px solid var(--map-rust);
    border-radius: 9px;
    background: var(--map-rust);
    box-shadow: 0 14px 30px rgba(0, 0, 0, .18);
    font-family: var(--heading, "Barlow Condensed", sans-serif);
    font-size: 1.1rem;
    font-weight: 800;
    text-decoration: none;
    text-transform: uppercase;
    transition:
        color .25s ease,
        background-color .25s ease,
        border-color .25s ease,
        transform .25s ease;
}

.schools-map-hero__button:hover,
.schools-map-cta__button:hover {
    color: var(--map-dark);
    border-color: var(--map-gold);
    background: var(--map-gold);
    transform: translateY(-2px);
}

/* =====================================================
   MAPPA
===================================================== */

.schools-map-section {
    padding: clamp(75px, 8vw, 115px) 0;
    color: var(--map-dark);
    background:
        radial-gradient(
            circle at 5% 8%,
            rgba(220, 174, 82, .16),
            transparent 25%
        ),
        #f7f0e5;
}

.schools-map-section__heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 50px;
    margin-bottom: 35px;
}

.schools-map-section__eyebrow {
    color: var(--map-rust);
}

.schools-map-section__heading h2 {
    margin: 0;
    font-family: var(--heading, "Barlow Condensed", sans-serif);
    font-size: clamp(3rem, 5vw, 5.2rem);
    font-weight: 800;
    line-height: .9;
    letter-spacing: -.035em;
    text-transform: uppercase;
}

.schools-map-section__heading h2 span {
    color: var(--map-rust);
}

.schools-map-section__heading > p {
    max-width: 530px;
    margin: 0;
    color: #6d625b;
    font-size: 1.05rem;
    line-height: 1.7;
}

/* FILTRI */

.schools-map-filters {
    display: grid;
    grid-template-columns:
        minmax(300px, 1fr)
        minmax(230px, 300px)
        auto;
    gap: 15px;
    align-items: end;
    padding: 22px;
    margin-bottom: 22px;
    border: 1px solid rgba(89, 49, 31, .13);
    border-radius: 18px;
    background: rgba(255, 255, 255, .82);
    box-shadow: 0 15px 40px rgba(54, 34, 22, .07);
}

.schools-map-search,
.schools-map-select {
    display: grid;
    gap: 8px;
}

.schools-map-search > span:first-child,
.schools-map-select > span {
    color: var(--map-brown);
    font-family: var(--heading, "Barlow Condensed", sans-serif);
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
}

.schools-map-search__field {
    position: relative;
    display: block;
}

.schools-map-search__field svg {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 17px;
    width: 21px;
    height: 21px;
    fill: none;
    stroke: var(--map-rust);
    stroke-width: 2;
    stroke-linecap: round;
    transform: translateY(-50%);
}

.schools-map-search input,
.schools-map-select select {
    width: 100%;
    min-height: 54px;
    padding: 12px 17px;
    color: var(--map-dark);
    border: 1px solid rgba(89, 49, 31, .2);
    border-radius: 9px;
    outline: none;
    background: #fff;
    font-family: var(--body, "Inter", sans-serif);
    font-size: 1rem;
}

.schools-map-search input {
    padding-left: 51px;
}

.schools-map-search input:focus,
.schools-map-select select:focus {
    border-color: var(--map-rust);
    box-shadow: 0 0 0 4px rgba(167, 71, 38, .1);
}

.schools-map-reset {
    min-height: 54px;
    padding: 12px 22px;
    color: var(--map-dark);
    cursor: pointer;
    border: 2px solid var(--map-dark);
    border-radius: 9px;
    background: transparent;
    font-family: var(--heading, "Barlow Condensed", sans-serif);
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    transition: .25s ease;
}

.schools-map-reset:hover {
    color: #fff;
    background: var(--map-dark);
}

/* LAYOUT */

.schools-map-layout {
    display: grid;
    grid-template-columns: minmax(350px, 430px) minmax(0, 1fr);
    min-height: 740px;
    overflow: hidden;
    border: 1px solid rgba(89, 49, 31, .14);
    border-radius: 25px;
    background: #fff;
    box-shadow: 0 25px 65px rgba(54, 34, 22, .13);
}

/* SIDEBAR */

.schools-map-sidebar {
    display: flex;
    min-width: 0;
    max-height: 740px;
    flex-direction: column;
    border-right: 1px solid rgba(89, 49, 31, .12);
    background: #fff;
}

.schools-map-sidebar__top {
    display: flex;
    min-height: 91px;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 19px 22px;
    border-bottom: 1px solid rgba(89, 49, 31, .11);
}

.schools-map-sidebar__top span {
    color: var(--map-rust);
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
}

.schools-map-sidebar__top h3 {
    margin: 3px 0 0;
    font-family: var(--heading, "Barlow Condensed", sans-serif);
    font-size: 1.55rem;
    line-height: 1;
    text-transform: uppercase;
}

.schools-map-sidebar__top strong {
    display: grid;
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    place-items: center;
    color: var(--map-dark);
    border-radius: 50%;
    background: var(--map-gold);
    font-family: var(--heading, "Barlow Condensed", sans-serif);
    font-size: 1.35rem;
    font-weight: 900;
}

.schools-map-results {
    display: grid;
    gap: 13px;
    padding: 17px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-color: var(--map-rust) #eee4d7;
    scrollbar-width: thin;
}

/* CARD SCUOLA */

.school-map-card {
    padding: 19px;
    border: 1px solid rgba(89, 49, 31, .13);
    border-radius: 17px;
    background: #fff;
    transition:
        border-color .25s ease,
        background-color .25s ease,
        transform .25s ease;
}

.school-map-card:hover,
.school-map-card.is-active {
    border-color: rgba(167, 71, 38, .55);
    background: #fffaf3;
    transform: translateY(-2px);
}

.school-map-card__area {
    display: inline-flex;
    padding: 6px 10px;
    margin-bottom: 11px;
    color: #fff;
    border-radius: 25px;
    background: var(--map-rust);
    font-family: var(--heading, "Barlow Condensed", sans-serif);
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
}

.school-map-card h4 {
    margin: 0 0 7px;
    color: var(--map-dark);
    font-family: var(--heading, "Barlow Condensed", sans-serif);
    font-size: 1.65rem;
    line-height: 1;
    text-transform: uppercase;
}

.school-map-card__address {
    margin: 0;
    color: #6e635b;
    font-size: 1rem;
    line-height: 1.55;
}

.school-map-card__levels {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 14px;
}

.school-map-card__level {
    padding: 7px 10px;
    color: var(--map-brown);
    border-radius: 7px;
    background: var(--map-cream);
    font-size: 1rem;
    font-weight: 700;
}

.school-map-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.school-map-card__focus,
.school-map-card__link {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 9px 12px;
    border-radius: 8px;
    font-family: var(--heading, "Barlow Condensed", sans-serif);
    font-size: 1rem;
    font-weight: 800;
    text-decoration: none;
    text-transform: uppercase;
}

.school-map-card__focus {
    color: #fff;
    cursor: pointer;
    border: 2px solid var(--map-dark);
    background: var(--map-dark);
}

.school-map-card__link {
    color: var(--map-rust);
    border: 2px solid var(--map-rust);
}

.school-map-card__courses {
    display: grid;
    gap: 8px;
    padding: 14px 0 0;
    margin: 15px 0 0;
    list-style: none;
    border-top: 1px solid rgba(89, 49, 31, .11);
}

.school-map-card__courses a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--map-dark);
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
}

.school-map-card__courses a:hover {
    color: var(--map-rust);
}

.schools-map-empty,
.schools-map-noscript {
    padding: 30px 20px;
    color: #6d625b;
    text-align: center;
    font-size: 1rem;
    line-height: 1.65;
}

/* MAPPA */

.schools-map-wrapper {
    position: relative;
    min-width: 0;
    z-index: 1;
}

#go-west-schools-map {
    width: 100%;
    height: 740px;
    background: #e8dfd2;
}

.schools-map-legend {
    position: absolute;
    z-index: 500;
    right: 18px;
    bottom: 18px;
    display: flex;
    align-items: center;
    gap: 11px;
    max-width: 330px;
    padding: 12px 15px;
    border-radius: 11px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .15);
    font-size: 1rem;
    font-weight: 700;
}

.schools-map-legend__cluster {
    display: grid;
    width: 39px;
    height: 39px;
    flex: 0 0 39px;
    place-items: center;
    color: #fff;
    border: 4px solid rgba(255, 255, 255, .8);
    border-radius: 50%;
    background: var(--map-rust);
    box-shadow: 0 0 0 6px rgba(167, 71, 38, .18);
    font-family: var(--heading, "Barlow Condensed", sans-serif);
    font-size: 1rem;
    font-weight: 900;
}

/* MARKER SINGOLO */

.go-west-map-marker {
    display: grid;
    width: 45px;
    height: 45px;
    place-items: center;
    color: var(--map-dark);
    border: 4px solid #fff;
    border-radius: 50% 50% 50% 0;
    background: var(--map-gold);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .32);
    transform: rotate(-45deg);
}

.go-west-map-marker span {
    display: block;
    font-size: 1.1rem;
    line-height: 1;
    transform: rotate(45deg);
}

/* CLUSTER PERSONALIZZATI */

.go-west-cluster {
    background: transparent;
}

.go-west-cluster__inner {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    color: #fff;
    border: 5px solid rgba(255, 255, 255, .85);
    border-radius: 50%;
    background: var(--map-rust);
    box-shadow:
        0 0 0 7px rgba(167, 71, 38, .18),
        0 8px 22px rgba(0, 0, 0, .3);
    font-family: var(--heading, "Barlow Condensed", sans-serif);
    font-size: 1.2rem;
    font-weight: 900;
}

.go-west-cluster--medium .go-west-cluster__inner {
    width: 56px;
    height: 56px;
    background: var(--map-brown);
    box-shadow:
        0 0 0 8px rgba(89, 49, 31, .2),
        0 8px 24px rgba(0, 0, 0, .3);
}

.go-west-cluster--large .go-west-cluster__inner {
    width: 65px;
    height: 65px;
    color: var(--map-dark);
    background: var(--map-gold);
    box-shadow:
        0 0 0 9px rgba(220, 174, 82, .25),
        0 8px 26px rgba(0, 0, 0, .3);
}

/* POPUP */

.leaflet-popup-content-wrapper {
    overflow: hidden;
    padding: 0;
    border-radius: 17px;
    box-shadow: 0 15px 45px rgba(31, 23, 18, .23);
}

.leaflet-popup-content {
    width: 300px !important;
    margin: 0;
}

.go-west-popup {
    padding: 20px;
    font-family: var(--body, "Inter", sans-serif);
}

.go-west-popup__area {
    color: var(--map-rust);
    font-family: var(--heading, "Barlow Condensed", sans-serif);
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
}

.go-west-popup h3 {
    margin: 7px 0;
    font-family: var(--heading, "Barlow Condensed", sans-serif);
    font-size: 1.65rem;
    line-height: 1;
    text-transform: uppercase;
}

.go-west-popup__address {
    margin: 0 0 14px;
    color: #6d625b;
    font-size: 1rem;
    line-height: 1.5;
}

.go-west-popup__school-link {
    display: flex;
    min-height: 43px;
    align-items: center;
    justify-content: center;
    padding: 9px 13px;
    color: #fff !important;
    border-radius: 8px;
    background: var(--map-rust);
    font-family: var(--heading, "Barlow Condensed", sans-serif);
    font-size: 1rem;
    font-weight: 800;
    text-decoration: none;
    text-transform: uppercase;
}

.go-west-popup__courses {
    display: grid;
    gap: 8px;
    padding: 14px 0 0;
    margin: 14px 0 0;
    list-style: none;
    border-top: 1px solid rgba(89, 49, 31, .12);
}

.go-west-popup__courses a {
    color: var(--map-dark);
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
}

.go-west-popup__courses a:hover {
    color: var(--map-rust);
}

/* =====================================================
   COME FUNZIONA
===================================================== */

.schools-help {
    position: relative;
    padding: clamp(80px, 9vw, 125px) 0;
    overflow: hidden;
    color: var(--map-dark);
    background:
        radial-gradient(
            circle at 90% 15%,
            rgba(220, 174, 82, .2),
            transparent 27%
        ),
        linear-gradient(135deg, #fff, #f7efe2);
}

.schools-help__heading {
    max-width: 900px;
    margin: 0 auto 50px;
    text-align: center;
}

.schools-help__eyebrow {
    justify-content: center;
    color: var(--map-rust);
}

.schools-help__eyebrow::before,
.schools-help__eyebrow::after {
    content: "";
    width: 34px;
    height: 3px;
    background: var(--map-gold);
}

.schools-help__heading h2 {
    margin: 0;
    font-family: var(--heading, "Barlow Condensed", sans-serif);
    font-size: clamp(3rem, 6vw, 5.5rem);
    font-weight: 800;
    line-height: .9;
    letter-spacing: -.035em;
    text-transform: uppercase;
}

.schools-help__heading h2 span {
    display: block;
    margin-top: 7px;
    color: var(--map-rust);
    font-family: var(--accent-font, "Roboto Slab", serif);
    font-size: .59em;
    line-height: 1.15;
    text-transform: none;
}

.schools-help__heading p {
    max-width: 760px;
    margin: 24px auto 0;
    color: #6d625b;
    font-size: 1.05rem;
    line-height: 1.75;
}

.schools-help__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    max-width: 1250px;
    margin: 0 auto;
}

.schools-help__card {
    display: flex;
    min-height: 300px;
    flex-direction: column;
    padding: 31px;
    border: 1px solid rgba(89, 49, 31, .13);
    border-radius: 23px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 20px 55px rgba(54, 34, 22, .09);
}

.schools-help__card:nth-child(2) {
    color: #fff;
    background:
        radial-gradient(
            circle at 90% 10%,
            rgba(220, 174, 82, .22),
            transparent 32%
        ),
        linear-gradient(145deg, #302018, #1b1410);
}

.schools-help__number {
    display: grid;
    width: 62px;
    height: 62px;
    margin-bottom: 29px;
    place-items: center;
    color: #fff;
    border: 4px solid #fff;
    border-radius: 50%;
    outline: 2px solid var(--map-gold);
    background: var(--map-rust);
    font-family: var(--heading, "Barlow Condensed", sans-serif);
    font-size: 1.4rem;
    font-weight: 900;
}

.schools-help__card:nth-child(2) .schools-help__number {
    color: var(--map-dark);
    background: var(--map-gold);
}

.schools-help__card h3 {
    margin: 0 0 13px;
    color: inherit;
    font-family: var(--heading, "Barlow Condensed", sans-serif);
    font-size: 2.5rem;
    line-height: .95;
    letter-spacing: -.035em;
    text-transform: uppercase;
}

.schools-help__card p {
    margin: 0;
    color: #71665e;
    font-size: 1rem;
    line-height: 1.7;
}

.schools-help__card:nth-child(2) p {
    color: rgba(255, 255, 255, .72);
}

/* =====================================================
   CTA
===================================================== */

.schools-map-cta {
    padding: clamp(65px, 7vw, 100px) 0;
    color: #fff;
    background: var(--map-dark);
}

.schools-map-cta__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.schools-map-cta__inner > div {
    max-width: 850px;
}

.schools-map-cta__inner span {
    color: var(--map-gold);
    font-family: var(--heading, "Barlow Condensed", sans-serif);
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
}

.schools-map-cta__inner h2 {
    margin: 7px 0;
    font-family: var(--heading, "Barlow Condensed", sans-serif);
    font-size: clamp(2.7rem, 5vw, 4.8rem);
    line-height: .95;
    letter-spacing: -.035em;
    text-transform: uppercase;
}

.schools-map-cta__inner p {
    margin: 0;
    color: rgba(255, 255, 255, .7);
    font-size: 1.05rem;
    line-height: 1.7;
}

/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 1100px) {
    .schools-map-layout {
        grid-template-columns: 360px minmax(0, 1fr);
    }

    .schools-map-filters {
        grid-template-columns: 1fr 1fr;
    }

    .schools-map-reset {
        grid-column: 1 / -1;
    }
}

@media (max-width: 850px) {
    .schools-map-section__heading,
    .schools-map-cta__inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .schools-map-layout {
        display: flex;
        min-height: auto;
        flex-direction: column;
        overflow: visible;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .schools-map-wrapper {
        order: 1;
        overflow: hidden;
        border-radius: 20px;
        box-shadow: 0 20px 50px rgba(54, 34, 22, .13);
    }

    .schools-map-sidebar {
        order: 2;
        max-height: none;
        margin-top: 20px;
        border: 1px solid rgba(89, 49, 31, .13);
        border-radius: 20px;
    }

    .schools-map-results {
        max-height: 600px;
    }

    #go-west-schools-map {
        height: 570px;
    }

    .schools-help__grid {
        grid-template-columns: 1fr;
    }

    .schools-help__card {
        display: grid;
        min-height: auto;
        grid-template-columns: 70px minmax(0, 1fr);
        gap: 20px;
    }

    .schools-help__number {
        margin: 0;
    }
}

@media (max-width: 650px) {
    .container--map {
        width: min(100% - 32px, 1560px);
    }

    .schools-map-hero {
        padding-top: 120px;
    }

    .schools-map-hero h1 {
        font-size: clamp(3.1rem, 15vw, 4.8rem);
    }

    .schools-map-filters {
        grid-template-columns: 1fr;
        padding: 17px;
    }

    .schools-map-reset {
        grid-column: auto;
    }

    .schools-map-section__heading {
        gap: 20px;
    }

    #go-west-schools-map {
        height: 500px;
    }

    .schools-map-legend {
        right: 10px;
        bottom: 10px;
        max-width: calc(100% - 20px);
    }

    .schools-map-results {
        max-height: 450px;
    }

    .school-map-card__actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .schools-help__heading h2 {
        font-size: clamp(2.8rem, 13vw, 4.1rem);
    }

    .schools-help__card {
        display: block;
        padding: 25px 22px;
    }

    .schools-help__number {
        margin-bottom: 22px;
    }

    .schools-map-cta__button {
        width: 100%;
    }

    .schools-map-sidebar{
        order: 1;
        margin-bottom: 1.5rem;
    }
    .schools-map-results{
        order: 2;
        /* display: flex; */
        overscroll-behavior: auto;
    }
    .schools-map-results .school-map-card{
        flex: 0 0 90%;
    }
    .school-map-card{
        display: flex;
        align-items: flex-start;
        flex-direction: column;
        justify-content: space-between;
    }
}

