/* ==========================================================================
   ANXA 2.0 - NUMERI UTILI E SOS (css/numeri-utili.css)
   Stili specifici per la pagina dei recapiti d'emergenza e pubblica utilità
   ========================================================================== */

/* Page Header Title H1 */
.page-title-sos {
    font-size: 2.2rem;
    font-weight: 900;
    color: #0033A0;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 15px 0 10px 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.page-title-sos .lang-en {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-muted, #666);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Text Intro Card */
.numeri-intro-card {
    background: var(--card-bg, #ffffff);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid var(--border-color, rgba(0, 51, 160, 0.12));
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.numeri-intro-text {
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--text-main, #222);
    margin: 0;
    font-weight: 500;
    text-align: justify;
}

/* Subtitle Headers (H2) */
.section-subtitle {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0033A0;
    margin: 30px 0 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--yellow-anxa, #FFD54F);
}

.section-subtitle .header-icon-svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    flex-shrink: 0;
}

.section-subtitle.emergency-header {
    color: #d32f2f;
    border-bottom-color: #ef4444;
}

/* Badges per distinzione Nazionale vs Locale */
.badge-tag {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-block;
    margin-left: 8px;
    vertical-align: middle;
}

.badge-nazionale {
    background: rgba(211, 47, 47, 0.1);
    color: #d32f2f;
    border: 1px solid rgba(211, 47, 47, 0.3);
}

.badge-locale {
    background: rgba(0, 51, 160, 0.08);
    color: #0033A0;
    border: 1px solid rgba(0, 51, 160, 0.25);
}

/* ==========================================
   1. EMERGENZE IN EVIDENZA (TOP HIGHLIGHT SECTION)
   ========================================== */
.emergenze-top-container {
    margin-bottom: 30px;
}

.emergenze-top-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.card-emergency-highlight {
    background: linear-gradient(135deg, rgba(211, 47, 47, 0.04) 0%, rgba(255, 255, 255, 1) 100%);
    border: 2px solid #ef4444;
    border-radius: 16px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
    overflow: hidden;
}

.card-emergency-highlight:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.25);
    border-color: #d32f2f;
}

.card-emergency-highlight:active {
    transform: scale(0.98);
}

/* Variant sobria per il 1522 */
.card-emergency-highlight.card-1522 {
    border-color: #7b1fa2;
    background: linear-gradient(135deg, rgba(123, 31, 162, 0.04) 0%, rgba(255, 255, 255, 1) 100%);
    box-shadow: 0 4px 15px rgba(123, 31, 162, 0.12);
}

.card-emergency-highlight.card-1522:hover {
    border-color: #6a1b9a;
    box-shadow: 0 8px 25px rgba(123, 31, 162, 0.25);
}

.emergency-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #ffebee;
    color: #d32f2f;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(211, 47, 47, 0.2);
}

.card-1522 .emergency-icon-wrap {
    background: #f3e5f5;
    color: #7b1fa2;
    box-shadow: 0 2px 8px rgba(123, 31, 162, 0.2);
}

.emergency-icon-wrap svg {
    width: 26px;
    height: 26px;
    fill: currentColor;
}

.emergency-info {
    flex: 1;
    margin: 0 12px;
}

.emergency-title {
    font-size: 0.98rem;
    font-weight: 800;
    color: var(--text-main, #111);
    margin-bottom: 2px;
    display: flex;
    flex-direction: column;
}

.emergency-title .lang-en {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted, #666);
}

.emergency-number {
    font-size: 1.7rem;
    font-weight: 900;
    color: #d32f2f;
    letter-spacing: 1px;
    line-height: 1.1;
}

.card-1522 .emergency-number {
    color: #7b1fa2;
}

.emergency-btn-call {
    background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
    color: #ffffff;
    padding: 9px 14px;
    border-radius: 25px;
    font-weight: 800;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 3px 10px rgba(211, 47, 47, 0.3);
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.card-1522 .emergency-btn-call {
    background: linear-gradient(135deg, #7b1fa2 0%, #4a148c 100%);
    box-shadow: 0 3px 10px rgba(123, 31, 162, 0.3);
}

.emergency-btn-call svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
}

/* ==========================================
   2. SPLITTED LAYOUT (PC & MOBILE)
   ========================================== */
.numeri-split-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

@media (min-width: 992px) {
    .numeri-split-container {
        display: grid;
        grid-template-columns: 1fr 340px;
        align-items: start;
        gap: 30px;
    }

    .numeri-left-col {
        order: 1;
    }

    .numeri-right-col {
        order: 2;
        position: sticky;
        top: 90px;
    }
}

/* Mobile Order Override */
@media (max-width: 991px) {
    .numeri-split-container {
        display: flex;
        flex-direction: column;
    }

    .numeri-right-col {
        order: 1;
    }

    .numeri-left-col {
        order: 2;
    }
}

/* ==========================================
   3. SEARCH DIRECTORY WIDGET
   ========================================== */
.search-directory-card {
    background: var(--card-bg, #ffffff);
    border: 2px solid var(--yellow-anxa, #FFD54F);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 6px 20px rgba(255, 213, 79, 0.2);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.directory-card-title {
    font-weight: 800;
    font-size: 1.1rem;
    color: #0033A0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.directory-card-title .search-svg {
    width: 22px;
    height: 22px;
    fill: #0033A0;
}

.directory-form-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.directory-input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1.5px solid var(--border-color, #ccc);
    font-size: 0.95rem;
    font-family: inherit;
    box-sizing: border-box;
    outline: none;
    background: var(--input-bg, #fff);
    color: var(--text-main, #000);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.directory-input:focus {
    border-color: #0033A0;
    box-shadow: 0 0 0 3px rgba(0, 51, 160, 0.15);
}

.directory-options-row {
    display: flex;
    gap: 8px;
    width: 100%;
}

.dir-option-label {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 6px;
    border-radius: 10px;
    border: 1.5px solid var(--border-color, #e0e0e0);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 700;
    user-select: none;
    background: var(--card-bg, #fff);
    color: var(--text-main, #333);
    transition: border-color 0.2s, background 0.2s;
}

.dir-option-label:has(input:checked) {
    border-color: #0033A0;
    background: rgba(0, 51, 160, 0.06);
    color: #0033A0;
}

.dir-radio {
    accent-color: #0033A0;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.btn-search-elenco {
    width: 100%;
    padding: 13px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #FFE066 0%, #FFB300 100%);
    color: #000000;
    font-weight: 900;
    font-size: 0.95rem;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 224, 102, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.1s ease, box-shadow 0.2s ease;
}

.btn-search-elenco:hover {
    box-shadow: 0 6px 20px rgba(255, 179, 0, 0.5);
}

.btn-search-elenco:active {
    transform: scale(0.98);
}

.btn-search-icon {
    width: 18px;
    height: 18px;
    fill: #000000;
}

/* ==========================================
   4. CARDS DEI NUMERI (LISTA GENERALE)
   ========================================== */
.num-category-header {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0033A0;
    margin: 25px 0 12px 0;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--border-color, #e5e7eb);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.num-category-header-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.num-category-header .lang-en {
    font-size: 0.88rem;
    color: var(--text-muted, #666);
    font-weight: 600;
}

.numbers-cards-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.num-card {
    background: var(--card-bg, #ffffff);
    border: 1.5px solid var(--border-color, #e2e8f0);
    border-radius: 14px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    min-height: 64px;
}

.num-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 51, 160, 0.12);
    border-color: #0033A0;
}

.num-card:active {
    transform: scale(0.99);
}

/* Card non-link container (es. Incendi Boschivi con pulsanti multipli) */
.num-card.card-non-link {
    cursor: default;
}
.num-card.card-non-link:hover {
    transform: none;
}

/* Card 1522 estesa nella lista */
.num-card.card-1522-detail {
    border-color: rgba(123, 31, 162, 0.3);
    background: linear-gradient(135deg, rgba(123, 31, 162, 0.02) 0%, rgba(255, 255, 255, 1) 100%);
}

.num-card.card-1522-detail:hover {
    border-color: #7b1fa2;
    box-shadow: 0 6px 18px rgba(123, 31, 162, 0.15);
}

/* Card Incendi Boschivi */
.num-card.card-incendi {
    border-color: rgba(224, 86, 36, 0.3);
    background: linear-gradient(135deg, rgba(224, 86, 36, 0.03) 0%, rgba(255, 255, 255, 1) 100%);
}

.num-card.card-incendi .card-icon-wrap {
    background: rgba(224, 86, 36, 0.1);
    color: #e05624;
}

.card-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(0, 51, 160, 0.08);
    color: #0033A0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.card-1522-detail .card-icon-wrap {
    background: rgba(123, 31, 162, 0.1);
    color: #7b1fa2;
}

.card-icon-wrap svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.card-content-body {
    flex: 1;
    margin: 0 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-service-name {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-main, #111827);
    line-height: 1.25;
    display: flex;
    flex-direction: column;
}

.card-service-name .lang-en {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted, #6b7280);
}

.card-service-desc {
    font-size: 0.86rem;
    color: var(--text-muted, #555);
    margin-top: 4px;
    line-height: 1.4;
    font-weight: 500;
}

.card-phone-display {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0033A0;
    margin-top: 2px;
    letter-spacing: 0.5px;
}

.card-1522-detail .card-phone-display {
    color: #7b1fa2;
}

/* Pulsanti Azione Singoli e Doppi */
.card-call-action-pill {
    background: #2e7d32;
    color: #ffffff;
    padding: 8px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(46, 125, 50, 0.25);
    transition: background 0.2s ease, transform 0.1s ease;
    text-decoration: none;
}

.card-call-action-pill.btn-red {
    background: #d32f2f;
    box-shadow: 0 2px 6px rgba(211, 47, 47, 0.25);
}

.card-call-action-pill.btn-red:hover {
    background: #b71c1c;
}

.card-1522-detail .card-call-action-pill {
    background: #7b1fa2;
    box-shadow: 0 2px 6px rgba(123, 31, 162, 0.3);
}

.card-call-action-pill svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.num-card:hover .card-call-action-pill {
    background: #1b5e20;
}

.num-card.card-1522-detail:hover .card-call-action-pill {
    background: #4a148c;
}

.card-dual-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    flex-shrink: 0;
}

/* No Search Results Message */
.no-results-msg {
    padding: 25px;
    text-align: center;
    background: var(--card-bg, #fff);
    border-radius: 14px;
    border: 1px dashed var(--border-color, #ccc);
    color: var(--text-muted, #666);
    font-weight: 600;
    font-size: 0.95rem;
    margin: 15px 0;
}

/* Accessibility Focus States */
.num-card:focus-visible,
.card-emergency-highlight:focus-visible,
.btn-search-elenco:focus-visible,
.directory-input:focus-visible,
.card-call-action-pill:focus-visible {
    outline: 3px solid #FFD54F;
    outline-offset: 2px;
}
