/* ============================================================
   CodiciCatastali.it - Municipio Stylesheet
   Design: pulito, moderno, istituzionale italiano
   ============================================================ */

/* - Intestazione - */
.municipio-belfiore-badge {
    font-size: 0.6em;
    color: var(--c-text-muted);
    font-weight: normal;
    vertical-align: middle;
}

/* ── Tabella Vie Scrollabile e Responsive ── */
.municipio-table-scroll-wrap {
    max-height: 420px;
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-md);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 2rem;
}

.municipio-table-scroll-wrap::-webkit-scrollbar {
    width: 5px;
}

.municipio-table-scroll-wrap::-webkit-scrollbar-track {
    background: transparent;
}

.municipio-table-scroll-wrap::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.municipio-table-scroll-wrap::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.municipio-vie-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    margin: 0;
}

.municipio-vie-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8fafc;
    border-bottom: 1px solid var(--c-border);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    padding: 0.75rem 1rem;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--c-text-muted);
}

.municipio-vie-table thead th.th-via,
.municipio-vie-table tbody td.td-via {
    width: 70%;
    text-align: left;
}

.municipio-vie-table thead th.th-particelle,
.municipio-vie-table tbody td.td-particelle {
    width: 30%;
    text-align: right;
}

.municipio-vie-table tbody td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--c-border-soft, #f1f5f9);
    vertical-align: middle;
}

.municipio-vie-table tbody tr:last-child td {
    border-bottom: none;
}

.via-row {
    transition: background-color var(--transition);
}

.via-row:hover {
    background-color: var(--c-bg-hover, #f8fafc);
}

.via-table-link {
    display: inline-block;
    color: var(--c-primary, #0055a4);
    text-decoration: none;
    font-weight: 500;
    line-height: 1.4;
    transition: color var(--transition);
}

.via-nome-text {
    font-size: 0.92rem;
    color: var(--c-primary, #0055a4);
    word-break: break-word;
}

.via-table-link:hover .via-nome-text {
    text-decoration: underline;
    color: #0d3566;
}

.particelle-badge {
    white-space: nowrap;
    display: inline-block;
}

/* Fallback per compatibilità classi precedenti */
.scrollable-tbody thead,
.scrollable-tbody tbody tr {
    display: table;
    width: 100%;
    table-layout: fixed;
}
.scrollable-tbody tbody {
    display: block;
    max-height: 400px;
    overflow-y: auto;
}

/* - Mappa Generale del Municipio - */
.via-map-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
    margin-top: 1.5rem;
}

.municipio-map-card {
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.via-map-card-header {
    padding: 0.9rem 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    border-bottom: 1px solid #f1f5f9;
}

.via-map-card-header h2,
.via-map-card-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
}

.via-map-badge {
    margin-left: auto;
    font-size: 0.75rem;
    background: #eff6ff;
    color: #1d4ed8;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    font-weight: 700;
    border: 1px solid #bfdbfe;
}

/* - Map placeholder & loading - */
.municipio-map-placeholder {
    height: 440px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    width: 100%;
}

.map-grid-pattern {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.7;
}

.map-loading-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.85);
    padding: 1.5rem 2.5rem;
    border-radius: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(4px);
    position: relative;
    z-index: 2;
}

.via-spin-icon {
    animation: via-spin 1.2s linear infinite;
}

.map-title-label {
    font-size: 1.1rem;
    font-weight: 700;
    color: #334155;
    letter-spacing: 0.02em;
    margin-top: 0.5rem;
}

.map-status-label {
    font-size: 0.85rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.municipio-map-container {
    height: 440px;
    width: 100%;
    display: none;
    background-color: #f8f5e6;
}

/* - Scheda SEO Testo Descrittivo del Comune - */
.via-seo-text-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
    margin-top: 2rem;
    margin-bottom: 2.5rem;
}

.via-seo-text-body {
    padding: 1.6rem 2rem;
    color: #334155;
    font-size: 0.95rem;
    line-height: 1.78;
}

.via-seo-text-body p {
    margin: 0 0 1.25rem;
}

.via-seo-text-body p:last-child {
    margin-bottom: 0;
}

.via-seo-text-body strong {
    color: #0f172a;
    font-weight: 700;
}

.text-error {
    color: #dc2626;
}

/* - Modal Parcela - */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    width: 90%;
    max-width: 440px;
    height: 350px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
}

.modal-title {
    margin-top: 0;
    margin-bottom: 12px;
    color: #0f172a;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.modal-body {
    margin: 8px 0;
    font-size: 0.95rem;
    color: #334155;
    line-height: 1.5;
    flex: 1;
    overflow-y: auto;
}

.modal-loading-wrap {
    height: 100%;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #64748b;
    font-size: 0.92rem;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
    flex-shrink: 0;
}

.btn-modal-close {
    padding: 8px 16px;
    border: 1px solid #cbd5e1;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color var(--transition);
}

.btn-modal-close:hover {
    background-color: #f1f5f9;
}

.btn-modal-link {
    padding: 8px 16px;
    background: #0055A4;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color var(--transition);
}

.btn-modal-link:hover {
    background: #003d75;
    color: #fff;
}

.modal-row {
    margin-bottom: 0.5rem;
    font-size: 0.92rem;
    color: #334155;
}

.modal-row strong {
    color: #0f172a;
    font-weight: 600;
}

/* ============================================================
   Buscador de parcelas a nivel de municipio â€” Dos modos por pestaÃ±as
   ============================================================ */
.municipio-search-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1000;
}

.municipio-search-header {
    padding: 0.9rem 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    border-bottom: 1px solid #f1f5f9;
}

.municipio-search-header h2,
.municipio-search-header h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
}

.municipio-search-badge {
    margin-left: auto;
    font-size: 0.75rem;
    background: #eff6ff;
    color: #1d4ed8;
    padding: 0.2rem 0.65rem;
    border-radius: 9999px;
    font-weight: 700;
    border: 1px solid #bfdbfe;
}

/* - PestaÃ±as / Tabs - */
.municipio-tabs-wrapper {
    padding: 0.9rem 1.4rem 0;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.municipio-tabs-nav {
    display: inline-flex;
    gap: 0.35rem;
    background: #e2e8f0;
    padding: 4px;
    border-radius: 10px;
    max-width: 100%;
}

.municipio-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.15rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: #475569;
    background: transparent;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.18s ease;
    user-select: none;
}

.municipio-tab-btn svg {
    color: #64748b;
    transition: color 0.18s ease;
    flex-shrink: 0;
}

.municipio-tab-btn:hover {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.6);
}

.municipio-tab-btn.is-active {
    background: #ffffff;
    color: #0055A4;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.municipio-tab-btn.is-active svg {
    color: #0055A4;
}

/* - Cuerpo del Buscador - */
.municipio-search-body {
    padding: 1.25rem 1.4rem 1.35rem;
}

.municipio-tab-panel {
    display: none;
}

.municipio-tab-panel.is-active {
    display: block;
}

/* - Layout Campos en Fila - */
.municipio-search-fields-row {
    display: grid;
    grid-template-columns: 1fr 1.3fr auto;
    gap: 1rem;
    align-items: flex-end;
}

.municipio-search-fields-row.single-field {
    grid-template-columns: 1fr;
}

.municipio-field-group {
    position: relative;
    display: flex;
    flex-direction: column;
}

.municipio-field-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.municipio-field-label-hint {
    font-size: 0.75rem;
    font-weight: 500;
    color: #64748b;
    text-transform: none;
    letter-spacing: normal;
}

.municipio-search-input-wrap {
    position: relative;
    width: 100%;
}

.municipio-search-prefix-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    display: flex;
    align-items: center;
    color: #64748b;
    z-index: 2;
}

.municipio-search-input {
    width: 100%;
    height: 48px;
    padding: 0 2.8rem 0 2.85rem;
    font-size: 0.95rem;
    color: #1e293b;
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    transition: all 0.2s ease;
    outline: none;
    box-sizing: border-box;
}

.municipio-search-input:focus {
    background: #fff;
    border-color: #0055A4;
    box-shadow: 0 0 0 4px rgba(0, 85, 164, 0.12);
}

.municipio-search-clear-btn {
    position: absolute;
    right: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    background: #e2e8f0;
    border: none;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #475569;
    padding: 0;
    transition: background 0.15s ease, color 0.15s ease;
    z-index: 2;
}

.municipio-search-clear-btn:hover {
    background: #cbd5e1;
    color: #0f172a;
}

.municipio-search-spinner {
    position: absolute;
    right: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 2;
}

/* Pulsante Cerca / Azione */
.municipio-btn-search {
    height: 48px;
    padding: 0 1.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.92rem;
    font-weight: 700;
    color: #fff;
    background: #0055A4;
    border: 1px solid #004588;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0, 85, 164, 0.2);
}

.municipio-btn-search:hover {
    background: #003d75;
    box-shadow: 0 4px 12px rgba(0, 85, 164, 0.3);
    transform: translateY(-1px);
}

.municipio-btn-search:active {
    transform: translateY(0);
}

.municipio-search-hint {
    margin-top: 0.75rem;
    font-size: 0.83rem;
    color: #64748b;
    line-height: 1.45;
}

.municipio-search-hint strong {
    color: #334155;
    font-weight: 600;
}

/* - Tendina Suggerimenti / Autocomplete - */
.municipio-search-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.14);
    max-height: 340px;
    overflow-y: auto;
    z-index: 1100;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.municipio-search-dropdown::-webkit-scrollbar {
    width: 6px;
}

.municipio-search-dropdown::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 4px;
}

.municipio-search-item {
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s ease;
}

.municipio-search-item:last-child {
    border-bottom: none;
}

.municipio-search-item:hover,
.municipio-search-item.is-active {
    background: #eff6ff;
}

/* Item Foglio specifico */
.municipio-foglio-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 1rem;
}

.foglio-item-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 700;
    color: #0f172a;
    font-size: 0.92rem;
}

.foglio-item-tag {
    font-size: 0.75rem;
    color: #64748b;
    background: #f1f5f9;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    font-weight: 500;
}

.municipio-foglio-item:hover .foglio-item-tag,
.municipio-foglio-item.is-active .foglio-item-tag {
    background: #dbeafe;
    color: #1d4ed8;
}

.search-item-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: #eff6ff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0055A4;
    transition: all 0.15s ease;
}

.municipio-search-item:hover .search-item-icon,
.municipio-search-item.is-active .search-item-icon {
    background: #0055A4;
    color: #fff;
}

.municipio-search-item:hover .search-item-icon svg,
.municipio-search-item.is-active .search-item-icon svg {
    stroke: #ffffff;
}

.search-item-info {
    flex: 1;
    min-width: 0;
}

.search-item-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-item-sub {
    font-size: 0.82rem;
    color: #64748b;
    margin-top: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-item-code {
    color: #1e293b;
    font-weight: 500;
}

.search-item-via {
    color: #0055A4;
    font-weight: 500;
}

.search-item-area {
    color: #475569;
}

.search-item-action {
    flex-shrink: 0;
}

.search-item-badge {
    font-size: 0.75rem;
    background: #f1f5f9;
    color: #475569;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.15s ease;
}

.municipio-search-item:hover .search-item-badge,
.municipio-search-item.is-active .search-item-badge {
    background: #0055A4;
    color: #fff;
}

.municipio-search-empty {
    padding: 1.4rem 1rem;
    text-align: center;
    color: #64748b;
    font-size: 0.88rem;
    line-height: 1.5;
}

/* - Marker Attivo sulla Mappa (Pulsante) - */
.active-parcel-pin-wrap {
    position: relative;
    pointer-events: none;
}

.active-parcel-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 44px;
    height: 44px;
    margin-top: -22px;
    margin-left: -22px;
    border-radius: 50%;
    background: rgba(0, 85, 164, 0.25);
    pointer-events: none;
}

.active-parcel-svg {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35));
    position: relative;
    z-index: 2;
}

/* Responsive */
@media (max-width: 768px) {
    .municipio-search-fields-row {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .municipio-btn-search {
        width: 100%;
        margin-top: 0.25rem;
    }

    .municipio-tabs-nav {
        width: 100%;
        display: flex;
    }

    .municipio-tab-btn {
        flex: 1;
        justify-content: center;
        padding: 0.55rem 0.75rem;
        font-size: 0.82rem;
    }
}

@media (max-width: 640px) {
    .municipio-search-body {
        padding: 1rem;
    }

    .municipio-search-input {
        font-size: 16px;
        /* evita zoom su iOS */
        height: 46px;
    }

    .search-item-action {
        display: none;
    }
}

/* - Altri comuni (Enlazado circular SEO) - */
.xor-grid-cercanos-wrap {
    max-width: 1100px;
    margin: 3rem auto 2.5rem;
    padding: 0 1rem;
    text-align: center;
    box-sizing: border-box;
    width: 100%;
}

.xor-grid-cercanos-wrap h3 {
    font-size: 1.15rem;
    color: #0f172a;
    font-weight: 700;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
    display: inline-block;
    max-width: 100%;
    word-break: break-word;
}

.xor-grid-cercanos {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
}

.xor-grid-cercanos a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-decoration: none;
    color: #334155;
    font-weight: 500;
    font-size: 0.9rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.xor-grid-cercanos a:hover {
    border-color: #0055A4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 85, 164, 0.1);
    color: #0055A4;
}

.xor-grid-cercanos a svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: #0055A4;
    stroke-width: 2;
}

.xor-grid-cercanos a span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1 1 0%;
}

@media (max-width: 900px) {
    .xor-grid-cercanos {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .xor-grid-cercanos-wrap {
        margin: 2rem auto 1.5rem;
        padding: 0;
    }

    .xor-grid-cercanos-wrap h3 {
        font-size: 1.05rem;
        margin-bottom: 1rem;
    }

    .xor-grid-cercanos {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.6rem;
    }

    .xor-grid-cercanos a {
        padding: 0.75rem 0.85rem;
        font-size: 0.85rem;
    }
}

/* - Intestazione Sezione Stradario - */
.municipio-section-header-wrap {
    margin-top: 2.25rem;
    margin-bottom: 0.85rem;
}

.municipio-section-header-wrap h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.35rem 0;
}

.municipio-section-header-wrap p {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
}


/* - Domande Frequenti (FAQ) - */
.municipio-faq-section {
    margin: 2.75rem auto 2.25rem;
    max-width: 1100px;
}

.faq-section-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}

.faq-section-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faq-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-item[open] {
    border-color: #0055A4;
    box-shadow: 0 4px 12px rgba(0, 85, 164, 0.06);
}

.faq-question {
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: 0.98rem;
    color: #1e293b;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: #f8fafc;
    transition: background 0.15s ease, color 0.15s ease;
    user-select: none;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question:hover {
    background: #eff6ff;
    color: #0055A4;
}

.faq-item[open] .faq-question {
    background: #eff6ff;
    color: #0055A4;
    border-bottom: 1px solid #e2e8f0;
}

.faq-chevron {
    flex-shrink: 0;
    transition: transform 0.25s ease;
    color: #64748b;
}

.faq-item[open] .faq-chevron {
    transform: rotate(180deg);
    color: #0055A4;
}

.faq-answer {
    padding: 1.15rem 1.25rem;
    font-size: 0.94rem;
    line-height: 1.65;
    color: #334155;
    background: #ffffff;
}

.faq-answer p {
    margin: 0;
}

.faq-answer p+p {
    margin-top: 0.75rem;
}

.faq-answer code {
    background: #f1f5f9;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
    color: #0f172a;
}

/* ── Comune Rurale — Blocco informativo ── */
.comune-rurale-info {
    display: flex;
    align-items: flex-start;
    gap: 1.1rem;
    background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
    border: 1px solid #bfdbfe;
    border-left: 4px solid #2563eb;
    border-radius: 12px;
    padding: 1.25rem 1.4rem;
    margin: 1.75rem 0 0.5rem;
    box-shadow: 0 2px 12px rgba(37, 99, 235, 0.07);
}

.comune-rurale-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: #dbeafe;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
}

.comune-rurale-body {
    flex: 1;
    min-width: 0;
}

.comune-rurale-title {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e3a8a;
    letter-spacing: -0.01em;
    margin-bottom: 0.35rem;
}

.comune-rurale-desc {
    font-size: 0.9rem;
    color: #374151;
    line-height: 1.6;
    margin: 0 0 0.9rem;
}

.comune-rurale-desc strong {
    color: #1d4ed8;
    font-weight: 700;
}

.comune-rurale-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.comune-rurale-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.18s, transform 0.15s, box-shadow 0.18s;
    line-height: 1.4;
}

.comune-rurale-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.comune-rurale-btn-primary {
    background: #2563eb;
    color: #fff;
}

.comune-rurale-btn-primary:hover {
    background: #1d4ed8;
    color: #fff;
}

.comune-rurale-btn-secondary {
    background: #fff;
    color: #374151;
    border: 1px solid #d1d5db;
}

.comune-rurale-btn-secondary:hover {
    background: #f9fafb;
    color: #111827;
}

@media (max-width: 560px) {
    .comune-rurale-info {
        flex-direction: column;
        gap: 0.8rem;
    }

    .comune-rurale-icon {
        width: 40px;
        height: 40px;
    }

    .comune-rurale-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ── Ottimizzazioni Responsive Stradario e Tabella Vie ── */
@media (max-width: 640px) {
    .municipio-section-header-wrap {
        margin-top: 1.75rem;
        margin-bottom: 0.65rem;
    }

    .municipio-section-header-wrap h2 {
        font-size: 1.1rem;
        line-height: 1.35;
    }

    .municipio-section-header-wrap p {
        font-size: 0.82rem;
        line-height: 1.45;
    }

    .municipio-table-scroll-wrap {
        max-height: 380px;
        border-radius: var(--radius-sm, 6px);
        margin-bottom: 1.5rem;
    }

    .municipio-vie-table thead th {
        padding: 0.65rem 0.6rem;
        font-size: 0.7rem;
        letter-spacing: 0.02em;
    }

    .municipio-vie-table thead th.th-via,
    .municipio-vie-table tbody td.td-via {
        width: 62%;
        padding: 0.65rem 0.6rem;
    }

    .municipio-vie-table thead th.th-particelle,
    .municipio-vie-table tbody td.td-particelle {
        width: 38%;
        padding: 0.65rem 0.6rem;
    }

    .via-nome-text {
        font-size: 0.88rem;
    }

    .particelle-badge {
        font-size: 0.74rem;
        padding: 0.18rem 0.5rem;
    }
}

@media (max-width: 360px) {
    .municipio-vie-table thead th.th-via,
    .municipio-vie-table tbody td.td-via {
        width: 58%;
        padding: 0.55rem 0.45rem;
    }

    .municipio-vie-table thead th.th-particelle,
    .municipio-vie-table tbody td.td-particelle {
        width: 42%;
        padding: 0.55rem 0.45rem;
    }

    .via-nome-text {
        font-size: 0.84rem;
    }

    .particelle-badge {
        font-size: 0.7rem;
        padding: 0.15rem 0.42rem;
    }
}