/* ==========================================================================
   Mappa sedi Lambrino SRL — Leaflet + OpenStreetMap
   ========================================================================== */

#lambrino-map {
    width: 100%;
    height: 100%;
    min-height: 320px;
    background: var(--bg-light, #f8f9fa);
    font-family: var(--font-primary, 'Afacad Flux', sans-serif);
}

.map-container #lambrino-map {
    border-radius: inherit;
}

.fullwidth-map #lambrino-map {
    height: 550px;
}

@media (max-width: 768px) {
    .fullwidth-map #lambrino-map {
        height: 380px;
    }
}

.leaflet-container {
    font-family: var(--font-primary, 'Afacad Flux', sans-serif);
}

/* Zoom control */
.leaflet-touch .leaflet-bar,
.leaflet-bar {
    border: none !important;
    box-shadow: var(--shadow-medium, 0 5px 20px rgba(0,0,0,0.15)) !important;
    border-radius: 10px !important;
    overflow: hidden;
}

.leaflet-bar a {
    background: var(--white, #fff) !important;
    color: var(--primary, #02823A) !important;
    font-weight: 700;
}

.leaflet-bar a:hover {
    background: var(--primary, #02823A) !important;
    color: var(--white, #fff) !important;
}

.leaflet-control-attribution {
    background: rgba(255, 255, 255, 0.85) !important;
    border-radius: 6px 0 0 0;
    font-size: 0.7rem !important;
}

/* --------------------------------------------------------------------
   Marker — coerente con lo stile "pill" già usato dai bottoni del sito:
   nessun glow, nessun pulse; solo tinta piena e un'ombra reale.
   -------------------------------------------------------------------- */
.lambrino-pin {
    position: relative;
    width: 34px;
    height: 34px;
}

.lambrino-pin-dot {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    background: var(--primary, #02823A);
    box-shadow: 0 4px 10px rgba(16, 24, 20, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.lambrino-pin-dot i {
    transform: rotate(45deg);
    color: var(--white, #fff);
    font-size: 0.78rem;
}

.lambrino-pin.is-active .lambrino-pin-dot {
    transform: rotate(-45deg) scale(1.2);
    background: var(--primary-dark, #026B2F);
    box-shadow: 0 6px 14px rgba(16, 24, 20, 0.3);
}

/* --------------------------------------------------------------------
   Popup — stessa cornice/tipografia delle card del sito, CTA identica
   al bottone primario (pill, gradiente brand) invece di un colore nuovo.
   -------------------------------------------------------------------- */
.leaflet-popup-content-wrapper {
    border-radius: 12px;
    box-shadow: var(--shadow-heavy, 0 10px 40px rgba(0,0,0,0.2));
    padding: 0;
}

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

.lambrino-popup {
    font-family: var(--font-primary, 'Afacad Flux', sans-serif);
    padding: 1.1rem 1.15rem;
}

.lambrino-popup strong {
    display: block;
    color: var(--text-dark, #222);
    font-size: 1.02rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.lambrino-popup p {
    margin: 0 0 0.9rem;
    color: var(--text-light, #666);
    font-size: 0.85rem;
    line-height: 1.4;
}

.lambrino-popup-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    width: 100%;
    justify-content: center;
    background: var(--gradient-primary, linear-gradient(135deg, #02823A, #04A349));
    color: var(--white, #fff) !important;
    font-weight: 500;
    font-size: 0.85rem;
    padding: 0.65rem 0.9rem;
    border-radius: 50px;
    text-decoration: none !important;
    box-shadow: var(--shadow-light, 0 2px 10px rgba(0,0,0,0.1));
    transition: var(--transition-fast, 0.2s ease);
}

.lambrino-popup-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium, 0 5px 20px rgba(0,0,0,0.15));
}

/* --------------------------------------------------------------------
   Selettore sedi — lista sobria con divisori, non "card di dashboard".
   L'icona si riempie solo per la sede selezionata: è l'unico accento.
   -------------------------------------------------------------------- */
.sedi-list {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--border-light, #e0e0e0);
    margin-bottom: 1.5rem;
}

.sede-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    background: none;
    border: none;
    border-bottom: 1px solid var(--border-light, #e0e0e0);
    padding: 1.1rem 0.25rem;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: background-color 0.2s ease;
}

.sede-card:hover {
    background-color: var(--bg-light, #f8f9fa);
}

.sede-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    border: 1.5px solid var(--border-light, #e0e0e0);
    color: var(--text-light, #666);
    font-size: 0.95rem;
    transition: var(--transition-fast, 0.2s ease);
}

.sede-card.is-active .sede-card-icon {
    background: var(--primary, #02823A);
    border-color: var(--primary, #02823A);
    color: var(--white, #fff);
}

.sede-card-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
    min-width: 0;
}

.sede-card-text strong {
    color: var(--text-dark, #222);
    font-size: 0.98rem;
    font-weight: 500;
}

.sede-card.is-active .sede-card-text strong {
    color: var(--primary, #02823A);
    font-weight: 600;
}

.sede-card-text span {
    color: var(--text-light, #666);
    font-size: 0.82rem;
    line-height: 1.3;
}

/* Variante orizzontale (pagina Contatti, sopra la mappa fullwidth) */
.sedi-list--inline {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 780px;
    margin-left: auto;
    margin-right: auto;
    border-top: none;
    gap: 0 2.5rem;
}

.sedi-list--inline .sede-card {
    flex: 1 1 280px;
    max-width: 340px;
    justify-content: center;
    border-bottom: none;
    border-top: 1px solid var(--border-light, #e0e0e0);
}

@media (max-width: 600px) {
    .sedi-list--inline {
        gap: 0;
    }

    .sedi-list--inline .sede-card:last-child {
        border-bottom: 1px solid var(--border-light, #e0e0e0);
    }

    .location-note--center a {
        display: flex;
        justify-content: center;
    }

    .sedi-list--inline .sede-card {
        flex: 1 1 100%;
        max-width: none;
    }
}

/* Nota orari/telefono sotto la lista sedi */
.location-note {
    color: var(--text-light, #666);
    font-size: 0.9rem;
    line-height: 1.6;
    padding: 0 0.25rem;
}

.location-note i {
    color: var(--primary, #02823A);
    margin-right: 0.4rem;
}

.location-note a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--primary-dark, #026B2F);
    font-weight: 600;
    text-decoration: none;
}

/* Home: stessa struttura della pagina Contatti — selettore sopra, mappa sotto */
.location-note--center {
    text-align: center;
    margin: 1rem auto 2rem;
    max-width: 780px;
}

.location-note--center a {
    min-height: 44px;
    padding: 0 0.25rem;
}

.map-container--home {
    margin-top: 0;
}
