/*
 * Pagine pubbliche delle filiali (dettaglio /filiale-di-…/) ed elenco su /filiali/,
 * alimentati dall'import XML. Impostazione mobile-first: le regole di base valgono
 * per i telefoni, le media query aggiungono le colonne su tablet e desktop.
 */
.jc-branch,
.jc-branch-directory {
    --jc-red: #dd0731;
    --jc-red-soft: #fdecef;
    --jc-grey: #303030;
    --jc-muted: #666;
    --jc-line: #e8e8e8;
    --jc-soft: #f6f6f6;
    --jc-radius: 18px;
    box-sizing: border-box;
    color: var(--jc-grey);
    font-family: inherit;
}

.jc-branch *,
.jc-branch-directory * {
    box-sizing: border-box;
}

.jc-branch a,
.jc-branch-directory a {
    color: var(--jc-red);
    text-decoration: none;
}

.jc-branch .jc-ico,
.jc-branch-directory .jc-ico {
    flex: none;
    width: 20px;
    height: 20px;
}

.jc-branch__visually-hidden,
.jc-branch-directory__visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Stati di apertura (stessi colori del template filiale). */
.state-aperto { --jc-state: #0c7a43; --jc-state-dot: #12a15a; }
.state-prechiusura,
.state-preapertura { --jc-state: #b45309; --jc-state-dot: #d97706; }
.state-chiuso { --jc-state: #dd0731; --jc-state-dot: #dd0731; }

.jc-branch__dot {
    flex: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--jc-state-dot, #999);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--jc-state-dot, #999) 18%, transparent);
}

/* =========================================================
   Dettaglio filiale
   ========================================================= */
.jc-branch__inner {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Hero: stessa base .jc-editorial-hero delle altre pagine (editorial-hero.css). */
.jc-branch .jc-branch__intro {
    padding-block: clamp(20px, 3.5vw, 40px) clamp(28px, 4vw, 48px);
}

/* Le foto delle filiali sono piccole (circa 420 px): mai ingrandite oltre la
   dimensione originale, allineate al bordo destro del contenuto e sfumate sui lati. */
.jc-branch .jc-branch__hero > .jc-editorial-hero__photo {
    inset: 50% max(clamp(16px, 4vw, 48px), calc((100% - 1160px) / 2)) auto auto;
    width: auto;
    height: auto;
    max-width: min(420px, 46%);
    max-height: calc(100% - 32px);
    transform: translateY(-50%);
    -webkit-mask-image:
        linear-gradient(90deg, transparent, #000 45%, #000 70%, transparent),
        linear-gradient(transparent, #000 18%, #000 82%, transparent);
    -webkit-mask-composite: source-in;
    mask-image:
        linear-gradient(90deg, transparent, #000 45%, #000 70%, transparent),
        linear-gradient(transparent, #000 18%, #000 82%, transparent);
    mask-composite: intersect;
}

@media (max-width: 767px) {
    .jc-branch .jc-branch__hero > .jc-editorial-hero__photo {
        max-width: 72%;
    }
}

.jc-branch a.jc-branch__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    margin: 0 0 6px -4px;
    padding: 0 4px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    opacity: .9;
}

.jc-branch a.jc-branch__back:hover {
    opacity: 1;
}

.jc-branch__back .jc-ico {
    width: 18px;
    height: 18px;
}

.jc-branch__eyebrow {
    margin: 0;
    color: rgba(255, 255, 255, .85);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.jc-branch .jc-branch__intro h1 {
    margin: 6px 0 14px;
}

.jc-branch__address {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 14px;
    color: #fff;
    font-size: 16px;
    line-height: 1.45;
}

.jc-branch__address .jc-ico {
    margin-top: 1px;
    opacity: .9;
}

.jc-branch__status {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    margin: 0 0 20px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #fff;
    color: var(--jc-grey);
    font-size: 14px;
    line-height: 1.3;
}

.jc-branch__status strong {
    color: var(--jc-state, var(--jc-grey));
    font-weight: 800;
}

.jc-branch__status span:not(.jc-branch__dot) {
    color: var(--jc-muted);
}

/* Azioni rapide: 2 colonne sul telefono, in riga da tablet in su. */
.jc-branch__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.jc-branch a.jc-branch__action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 52px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: 14px;
    background: rgba(255, 255, 255, .1);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    transition: background-color .15s ease, color .15s ease;
}

.jc-branch a.jc-branch__action--primary {
    border-color: #fff;
    background: #fff;
    color: var(--jc-red);
}

/* Corpo */
.jc-branch__body {
    padding-top: 24px;
    padding-bottom: 40px;
}

.jc-branch__layout {
    display: grid;
    gap: 16px;
}

.jc-branch__info {
    display: grid;
    gap: 16px;
    align-content: start;
}

.jc-branch__lead {
    margin: 0;
    color: var(--jc-grey);
    font-size: 16px;
    line-height: 1.65;
}

.jc-branch__card {
    padding: 20px;
    border: 1px solid var(--jc-line);
    border-radius: var(--jc-radius);
    background: #fff;
}

.jc-branch .jc-branch__card h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    color: var(--jc-grey);
    font-size: 19px;
    line-height: 1.25;
}

.jc-branch__card h2 .jc-ico {
    color: var(--jc-red);
}

/* Contatti: righe intere toccabili con icona e freccia. */
.jc-branch__contacts {
    margin: 0;
    padding: 0;
    list-style: none;
}

.jc-branch__contact {
    border-bottom: 1px solid var(--jc-line);
}

.jc-branch__contact:last-child {
    border-bottom: 0;
}

.jc-branch__contact > a,
.jc-branch__contact > div {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 64px;
    padding: 10px 0;
    color: var(--jc-grey);
}

.jc-branch__contact-icon {
    display: grid;
    flex: none;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--jc-red-soft);
    color: var(--jc-red);
}

.jc-branch__contact-text {
    display: grid;
    flex: 1 1 auto;
    min-width: 0;
    gap: 2px;
}

.jc-branch__contact-label {
    color: var(--jc-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.jc-branch__contact-value {
    color: var(--jc-grey);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.jc-branch__contact-go {
    color: #b5b5b5;
    transition: color .15s ease, transform .15s ease;
}

.jc-branch__contact > a:hover .jc-branch__contact-value,
.jc-branch__contact > a:hover .jc-branch__contact-go {
    color: var(--jc-red);
}

.jc-branch__contact > a:hover .jc-branch__contact-go {
    transform: translateX(2px);
}

/* Orari */
.jc-branch__hours {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    font-size: 15px;
}

.jc-branch__hours th,
.jc-branch__hours td {
    padding: 11px 0;
    border: 0;
    border-bottom: 1px solid var(--jc-line);
    background: transparent;
    vertical-align: top;
}

.jc-branch__hours tr:last-child th,
.jc-branch__hours tr:last-child td {
    border-bottom: 0;
}

.jc-branch__hours th {
    padding-right: 12px;
    color: var(--jc-grey);
    font-weight: 700;
    text-align: left;
}

.jc-branch__hours td {
    color: var(--jc-grey);
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: pre-line;
}

.jc-branch__hours tr.is-closed td {
    color: var(--jc-muted);
}

/* Mappa */
.jc-branch__map {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.jc-branch__map iframe {
    display: block;
    flex: 1 1 auto;
    width: 100%;
    min-height: 260px;
    aspect-ratio: 4 / 3;
    border: 0;
}

.jc-branch a.jc-branch__map-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 52px;
    border-top: 1px solid var(--jc-line);
    color: var(--jc-red);
    font-size: 15px;
    font-weight: 700;
}

.jc-branch a.jc-branch__map-link:hover {
    background: var(--jc-red-soft);
}

.jc-branch__map .jc-branch__muted {
    padding: 20px;
}

.jc-branch__muted {
    margin: 0;
    color: var(--jc-muted);
    font-size: 15px;
    line-height: 1.6;
}

/* Offerte */
.jc-branch__jobs {
    margin-top: 36px;
    scroll-margin-top: 90px;
}

.jc-branch__section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 16px;
    margin-bottom: 14px;
}

.jc-branch .jc-branch__jobs h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: var(--jc-grey);
    font-size: clamp(22px, 5.6vw, 30px);
    line-height: 1.2;
}

.jc-branch__count {
    display: inline-grid;
    place-items: center;
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--jc-red);
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
}

.jc-branch a.jc-branch__more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    font-size: 15px;
    font-weight: 700;
}

.jc-branch__more .jc-ico {
    width: 18px;
    height: 18px;
}

.jc-branch__jobs ul {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Le card di una stessa riga hanno la stessa altezza: titolo in alto, luogo in basso. */
.jc-branch__jobs li {
    display: flex;
    margin: 0;
}

.jc-branch__jobs li > a {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    align-items: center;
    gap: 14px;
    min-height: 72px;
    padding: 14px 16px 14px 18px;
    border: 1px solid var(--jc-line);
    border-radius: 14px;
    background: #fff;
    color: var(--jc-grey);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.jc-branch__jobs li > a:hover,
.jc-branch__jobs li > a:focus-visible {
    border-color: var(--jc-red);
    box-shadow: 0 6px 18px rgba(48, 48, 48, .08);
}

.jc-branch__job-text {
    display: grid;
    flex: 1 1 auto;
    align-self: stretch;
    grid-template-rows: 1fr auto;
    min-width: 0;
    gap: 4px;
}

.jc-branch__job-title {
    color: var(--jc-grey);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
}

.jc-branch__job-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 12px;
    color: var(--jc-muted);
    font-size: 13px;
}

.jc-branch__job-place {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.jc-branch__job-place .jc-ico {
    width: 14px;
    height: 14px;
}

.jc-branch__job-go {
    display: grid;
    flex: none;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--jc-red-soft);
    color: var(--jc-red);
}

.jc-branch__job-go .jc-ico {
    width: 18px;
    height: 18px;
}

.jc-branch__empty {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0;
    padding: 18px;
    border: 1px dashed #d6d6d6;
    border-radius: 14px;
    color: var(--jc-muted);
    font-size: 15px;
    line-height: 1.5;
}

.jc-branch__empty .jc-ico {
    color: var(--jc-red);
}

/* Social */
.jc-branch__socials {
    margin-top: 24px;
}

.jc-branch__socials div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.jc-branch .jc-branch__socials a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid var(--jc-line);
    border-radius: 999px;
    color: var(--jc-grey);
    font-size: 14px;
    font-weight: 700;
}

.jc-branch .jc-branch__socials a:hover {
    border-color: var(--jc-red);
    color: var(--jc-red);
}

/* Barra fissa in basso, solo sui telefoni. */
.jc-branch__sticky {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 50;
    display: flex;
    gap: 8px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--jc-line);
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 -6px 20px rgba(48, 48, 48, .08);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    transition: transform .2s ease, visibility .2s;
}

.jc-branch__sticky.is-hidden {
    visibility: hidden;
    transform: translateY(110%);
}

.jc-branch .jc-branch__sticky a {
    display: flex;
    flex: 1 1 0;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    border: 1px solid var(--jc-grey);
    border-radius: 999px;
    color: var(--jc-grey);
    font-size: 15px;
    font-weight: 800;
}

.jc-branch .jc-branch__sticky a.jc-branch__sticky-call {
    border-color: var(--jc-red);
    background: var(--jc-red);
    color: #fff;
}

/* Spazio per la barra fissa: il footer resta leggibile fino in fondo. */
body:has(.jc-branch__sticky) {
    padding-bottom: calc(70px + env(safe-area-inset-bottom));
}

@media (min-width: 560px) {
    .jc-branch__actions {
        display: flex;
        flex-wrap: wrap;
    }

    .jc-branch a.jc-branch__action {
        min-height: 48px;
        padding: 10px 18px;
        border-radius: 999px;
    }
}

@media (min-width: 768px) {
    .jc-branch__inner {
        padding: 0 24px;
    }

    .jc-branch__body {
        padding-top: 36px;
        padding-bottom: 64px;
    }

    .jc-branch__card {
        padding: 24px;
    }

    .jc-branch__jobs ul {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .jc-branch__sticky {
        display: none;
    }

    body:has(.jc-branch__sticky) {
        padding-bottom: 0;
    }
}

@media (min-width: 1024px) {
    .jc-branch__layout {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
        gap: 24px;
    }

    .jc-branch__map iframe {
        aspect-ratio: auto;
        min-height: 420px;
    }

    .jc-branch__jobs {
        margin-top: 48px;
    }

    .jc-branch__jobs ul {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* =========================================================
   Elenco filiali su /filiali/
   ========================================================= */
.jc-branch-directory {
    width: 100%;
    max-width: 1180px;
    margin: 32px auto 8px;
    padding: 0 16px 8px;
    scroll-margin-top: 80px;
}

.jc-branch-directory__head {
    display: grid;
    gap: 14px;
    margin-bottom: 18px;
}

.jc-branch-directory__eyebrow {
    margin: 0;
    color: var(--jc-red);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.jc-branch-directory h2 {
    margin: 4px 0 8px;
    color: var(--jc-grey);
    font-size: clamp(26px, 6.4vw, 38px);
    line-height: 1.15;
}

.jc-branch-directory__lead {
    max-width: 60ch;
    margin: 0;
    color: var(--jc-grey);
    font-size: 16px;
    line-height: 1.6;
}

.jc-branch-directory__stats {
    display: flex;
    gap: 10px;
    margin: 0;
}

.jc-branch-directory__stats div {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    min-width: 96px;
    padding: 10px 16px;
    border-radius: 14px;
    background: var(--jc-soft);
    text-align: center;
}

.jc-branch-directory__stats dt {
    color: var(--jc-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.jc-branch-directory__stats dd {
    margin: 0;
    padding: 0; /* il tema aggiunge un rientro a sinistra ai <dd> */
    color: var(--jc-red);
    font-size: 28px;
    font-weight: 800;
    line-height: 1.1;
}

/* Ricerca e "Vicino a me" */
.jc-branch-directory__toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.jc-branch-directory__search {
    position: relative;
    flex: 1 1 240px;
    min-width: 0;
}

.jc-branch-directory__search .jc-ico {
    position: absolute;
    top: 50%;
    left: 16px;
    color: var(--jc-muted);
    transform: translateY(-50%);
    pointer-events: none;
}

.jc-branch-directory input[type="search"] {
    width: 100%;
    height: 52px;
    margin: 0;
    padding: 0 16px 0 48px;
    border: 1px solid #d9d9d9;
    border-radius: 999px;
    background: #fff;
    color: var(--jc-grey);
    font-family: inherit;
    font-size: 16px; /* 16px evita lo zoom automatico su iOS */
    box-shadow: none;
}

.jc-branch-directory input[type="search"]:focus {
    border-color: var(--jc-red);
    outline: 0;
    box-shadow: 0 0 0 3px var(--jc-red-soft);
}

.jc-branch-directory__near {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 52px;
    margin: 0;
    padding: 0 20px;
    border: 1px solid var(--jc-grey);
    border-radius: 999px;
    background: #fff;
    color: var(--jc-grey);
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.jc-branch-directory__near[hidden] {
    display: none;
}

.jc-branch-directory__near.is-active {
    border-color: var(--jc-red);
    background: var(--jc-red-soft);
    color: var(--jc-red);
}

.jc-branch-directory__near:disabled {
    cursor: progress;
    opacity: .7;
}

/* Regioni: una riga scorrevole sul telefono, a capo da tablet in su. */
.jc-branch-directory__filters {
    margin: 0 -16px 8px;
}

.jc-branch-directory__chips {
    display: flex;
    gap: 8px;
    padding: 4px 16px 10px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 16px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 28px), transparent);
    mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 28px), transparent);
}

.jc-branch-directory__chips::-webkit-scrollbar {
    display: none;
}

.jc-branch-directory a.jc-branch-directory__chip {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 8px 14px 8px 16px;
    border: 1px solid var(--jc-line);
    border-radius: 999px;
    background: #fff;
    color: var(--jc-grey);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    scroll-snap-align: start;
    transition: border-color .15s ease, background-color .15s ease;
}

.jc-branch-directory a.jc-branch-directory__chip span {
    display: inline-grid;
    place-items: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--jc-soft);
    color: var(--jc-grey);
    font-size: 12px;
    font-weight: 800;
}

.jc-branch-directory a.jc-branch-directory__chip:hover {
    border-color: var(--jc-red);
}

.jc-branch-directory a.jc-branch-directory__chip.is-active,
.jc-branch-directory a.jc-branch-directory__chip[aria-pressed="true"] {
    border-color: var(--jc-red);
    background: var(--jc-red);
    color: #fff;
}

.jc-branch-directory a.jc-branch-directory__chip.is-active span,
.jc-branch-directory a.jc-branch-directory__chip[aria-pressed="true"] span {
    background: rgba(255, 255, 255, .22);
    color: #fff;
}

.jc-branch-directory__count {
    margin: 0 0 16px;
    color: var(--jc-muted);
    font-size: 14px;
    font-weight: 700;
}

/* Gruppi per regione */
.jc-branch-directory__group {
    margin: 0 0 24px;
}

.jc-branch-directory__group[hidden],
.jc-branch-directory__group li[hidden],
.jc-branch-directory__empty[hidden],
.jc-branch-directory__distance[hidden] {
    display: none !important;
}

.jc-branch-directory .jc-branch-directory__group h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    color: var(--jc-grey);
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .14em;
    line-height: 1.3;
    text-transform: uppercase;
}

.jc-branch-directory__group h3::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: var(--jc-line);
}

.jc-branch-directory__group h3 span {
    color: var(--jc-red);
    letter-spacing: 0;
}

.jc-branch-directory__group ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.jc-branch-directory__group li {
    margin: 0;
}

.jc-branch-directory a.jc-branch-directory__card {
    display: flex;
    align-items: center;
    gap: 14px;
    height: 100%;
    min-height: 76px;
    padding: 14px 14px 14px 14px;
    border: 1px solid var(--jc-line);
    border-radius: 16px;
    background: #fff;
    color: var(--jc-grey);
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.jc-branch-directory a.jc-branch-directory__card:hover,
.jc-branch-directory a.jc-branch-directory__card:focus-visible {
    border-color: var(--jc-red);
    box-shadow: 0 8px 22px rgba(48, 48, 48, .08);
}

.jc-branch-directory__pin {
    display: grid;
    flex: none;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--jc-red-soft);
    color: var(--jc-red);
}

.jc-branch-directory a.jc-branch-directory__card .jc-branch-directory__photo {
    display: block;
    flex: none;
    width: clamp(52px, 9vw, 72px);
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 8px 8px 62% 0 / 8px 8px 48% 0;
}

.jc-branch-directory__text {
    display: grid;
    flex: 1 1 auto;
    min-width: 0;
    gap: 4px;
}

.jc-branch-directory .jc-branch-directory__name {
    color: var(--jc-grey);
    font-size: 17px;
    font-weight: 800;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.jc-branch-directory__prov {
    display: inline-block;
    margin-left: 2px;
    padding: 1px 6px;
    border-radius: 6px;
    background: var(--jc-soft);
    color: var(--jc-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
    vertical-align: 2px;
}

.jc-branch-directory__status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 6px;
    margin: 0;
    color: var(--jc-muted);
    font-size: 13px;
    line-height: 1.35;
}

.jc-branch-directory__status strong {
    color: var(--jc-state, var(--jc-grey));
    font-weight: 800;
}

.jc-branch-directory__status .jc-branch__dot {
    width: 7px;
    height: 7px;
}

.jc-branch-directory__distance {
    flex: none;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--jc-soft);
    color: var(--jc-grey);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.jc-branch-directory__go {
    display: grid;
    flex: none;
    place-items: center;
    width: 32px;
    height: 32px;
    color: #b5b5b5;
    transition: color .15s ease, transform .15s ease;
}

.jc-branch-directory a.jc-branch-directory__card:hover .jc-branch-directory__go {
    color: var(--jc-red);
    transform: translateX(2px);
}

.jc-branch-directory a.jc-branch-directory__card:hover .jc-branch-directory__name {
    color: var(--jc-red);
}

.jc-branch-directory__empty {
    margin: 8px 0 24px;
    padding: 18px;
    border: 1px dashed #d6d6d6;
    border-radius: 14px;
    color: var(--jc-muted);
    font-size: 15px;
    text-align: center;
}

/* Telefono: statistiche in una riga compatta, "Vicino a me" solo icona accanto alla ricerca. */
@media (max-width: 559px) {
    .jc-branch-directory__stats div {
        flex-direction: row;
        align-items: baseline;
        gap: 6px;
        min-width: 0;
        padding: 6px 12px;
        border-radius: 999px;
    }

    .jc-branch-directory__stats dd {
        order: -1;
        font-size: 18px;
    }

    .jc-branch-directory__stats dt {
        font-size: 11px;
    }

    .jc-branch-directory__toolbar {
        flex-wrap: nowrap;
    }

    .jc-branch-directory__near {
        width: 52px;
        padding: 0;
    }

    .jc-branch-directory__near span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }
}

@media (max-width: 359px) {
    .jc-branch-directory__pin {
        display: none;
    }
}

/* Da tablet in su le regioni scorrono in colonne: niente righe con una sola filiale. */
@media (min-width: 640px) {
    .jc-branch-directory__list {
        column-count: 2;
        column-gap: 20px;
    }

    .jc-branch-directory__group {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    /* Le colonne non devono tagliare l'ombra delle schede al passaggio del mouse. */
    .jc-branch-directory__group ul {
        padding: 2px 2px 6px;
    }
}

@media (min-width: 768px) {
    .jc-branch-directory {
        margin-top: 56px;
        padding: 0 24px 8px;
    }

    .jc-branch-directory__head {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: end;
        margin-bottom: 24px;
    }

    /* Regioni sempre su una riga: se non c'è spazio la riga scorre, come su mobile. */
    .jc-branch-directory__filters {
        margin: 0 -24px 8px;
    }

    .jc-branch-directory__chips {
        padding: 4px 24px 8px;
        scroll-padding-inline: 24px;
        -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent);
        mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent);
    }

    .jc-branch-directory__group {
        margin-bottom: 32px;
    }
}

@media (min-width: 1024px) {
    /* Pillole più compatte: su desktop tutte le regioni entrano senza scorrere. */
    .jc-branch-directory__chips {
        gap: 6px;
    }

    .jc-branch-directory a.jc-branch-directory__chip {
        gap: 6px;
        padding: 8px 10px 8px 14px;
    }

    .jc-branch-directory__list {
        column-count: 3;
        column-gap: 28px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .jc-branch *,
    .jc-branch-directory * {
        transition: none !important;
    }
}
