/* ===========================================================================
   Bacheca Young Energy — foglio BLINDATO, dimensioni in PX assoluti.
   =========================================================================== */

.ye-bacheca {
    --ye-accent: #1a7f5a;
    --ye-accent-d: #14633f;
    --ye-ink: #1f2937;
    --ye-muted: #6b7280;
    --ye-line: #e5e7eb;
    --ye-bg-soft: #f5f8f6;

    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--ye-ink);
    -webkit-font-smoothing: antialiased;
    margin-top: 16px;
}
.ye-bacheca, .ye-bacheca * { box-sizing: border-box; }
.ye-bacheca p, .ye-bacheca h2, .ye-bacheca h3, .ye-bacheca h4,
.ye-bacheca ul, .ye-bacheca ol, .ye-bacheca li, .ye-bacheca a, .ye-bacheca span, .ye-bacheca div {
    font-family: inherit;
}
.ye-bacheca__sep { color: var(--ye-muted); margin: 0 6px; }

/* --- Tabs --- */
.ye-bacheca__tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--ye-line); margin-bottom: 18px; }
.ye-bacheca__tab {
    appearance: none; background: transparent; border: 0; cursor: pointer;
    padding: 12px 20px; font-size: 17px; font-weight: 600; color: var(--ye-muted);
    border-bottom: 3px solid transparent; margin-bottom: -2px; transition: color .15s, border-color .15s;
    font-family: inherit; line-height: 1.2;
}
.ye-bacheca__tab:hover { color: var(--ye-ink); }
.ye-bacheca__tab--active { color: var(--ye-accent); border-bottom-color: var(--ye-accent); }

/* --- Ricerca --- */
.ye-bacheca__search-wrap { margin-bottom: 16px; }
.ye-bacheca__search {
    width: 100%; padding: 12px 16px; font-size: 16px; color: var(--ye-ink);
    border: 1px solid #d1d5db; border-radius: 10px; outline: none; background: #fff; font-family: inherit;
}
.ye-bacheca__search:focus { border-color: var(--ye-accent); box-shadow: 0 0 0 3px rgba(26,127,90,.15); }

/* --- Barra filtri (provincia + conteggio) --- */
.ye-bacheca__filters { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.ye-bacheca__province {
    padding: 9px 13px; font-size: 15px; color: var(--ye-ink); font-family: inherit;
    border: 1px solid #d1d5db; border-radius: 8px; background: #fff; cursor: pointer; min-width: 200px;
}
.ye-bacheca__province:focus { outline: none; border-color: var(--ye-accent); box-shadow: 0 0 0 3px rgba(26,127,90,.15); }
.ye-bacheca__meta { font-size: 14px; color: var(--ye-muted); margin: 0 0 15px 0; }

/* --- Stati lista --- */
.ye-bacheca__list { position: relative; min-height: 80px; transition: opacity .15s; }
.ye-bacheca__list.is-loading { opacity: .4; pointer-events: none; }
.ye-bacheca__empty, .ye-bacheca__error { padding: 40px 16px; text-align: center; color: var(--ye-muted); font-size: 16px; }

/* --- Accordion item --- */
.ye-bacheca__item { border: 1px solid var(--ye-line); border-radius: 12px; margin-bottom: 12px; background: #fff; overflow: hidden; }
.ye-bacheca__item.is-open { border-color: var(--ye-accent); box-shadow: 0 2px 16px rgba(20,99,63,.09); }

.ye-bacheca__head {
    width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 16px 20px; background: transparent; border: 0; cursor: pointer; text-align: left; font-family: inherit;
}
.ye-bacheca__head:hover { background: var(--ye-bg-soft); }
.ye-bacheca__head-name { font-size: 15px; font-weight: 700; color: var(--ye-ink); line-height: 1.35; }
.ye-bacheca__item.is-open .ye-bacheca__head-name { color: var(--ye-accent-d); }

.ye-bacheca__head-chevron {
    flex: 0 0 auto; width: 11px; height: 11px; border-right: 2px solid var(--ye-muted);
    border-bottom: 2px solid var(--ye-muted); transform: rotate(45deg); transition: transform .2s; margin-top: -5px;
}
.ye-bacheca__item.is-open .ye-bacheca__head-chevron { transform: rotate(-135deg); margin-top: 3px; border-color: var(--ye-accent); }

.ye-bacheca__body { display: none; }
.ye-bacheca__item.is-open .ye-bacheca__body { display: block; }
.ye-bacheca__body-inner { padding: 0 20px 20px; border-top: 1px solid var(--ye-line); }

/* --- Contatti: uno sotto l'altro, niente box --- */
.ye-bacheca__contacts {
    display: flex; flex-direction: column; gap: 12px;
    margin: 18px 0 22px; padding-bottom: 18px; border-bottom: 1px solid var(--ye-line);
}
.ye-bacheca__contact { display: flex; flex-direction: column; gap: 2px; }
.ye-bacheca__contact-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ye-muted); }
.ye-bacheca__contact-value { font-size: 16px; color: var(--ye-ink); }
.ye-bacheca__contact-value a { color: var(--ye-accent); text-decoration: none; word-break: break-word; }
.ye-bacheca__contact-value a:hover { text-decoration: underline; }

/* --- Gruppi (sottosezioni) --- */
.ye-bacheca__group { margin-top: 22px; }
.ye-bacheca__group:first-child { margin-top: 6px; }
.ye-bacheca__group-title {
    font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
    color: var(--ye-accent); margin: 0 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--ye-line);
}

/* --- Domanda / Risposta --- */
.ye-bacheca__qa { padding: 10px 0; border-bottom: 1px dashed #eef0ef; }
.ye-bacheca__qa:last-child { border-bottom: 0; }
.ye-bacheca__q { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; color: var(--ye-muted); margin-bottom: 5px; }
.ye-bacheca__a { font-size: 16px; color: var(--ye-ink); line-height: 1.6; }
.ye-bacheca__a a { color: var(--ye-accent); word-break: break-word; }

/* Testo ricco (HTML sanificato): px forzati, batte il serif del tema */
.ye-bacheca__rich, .ye-bacheca__rich * {
    font-family: inherit !important; font-size: 16px !important; line-height: 1.6 !important; color: var(--ye-ink) !important;
}
.ye-bacheca__rich p { margin: 0 0 10px !important; }
.ye-bacheca__rich p:last-child { margin-bottom: 0 !important; }
.ye-bacheca__rich ul, .ye-bacheca__rich ol { margin: 0 0 10px 20px !important; padding: 0 !important; }
.ye-bacheca__rich li { margin: 0 0 4px !important; font-size: 16px !important; }
.ye-bacheca__rich a { color: var(--ye-accent) !important; }
.ye-bacheca__rich strong, .ye-bacheca__rich b { font-weight: 700 !important; }

/* --- Paginazione --- */
.ye-bacheca__pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 26px; }
.ye-bacheca__page {
    min-width: 40px; text-align: center; padding: 8px 12px; border: 1px solid #d1d5db;
    border-radius: 8px; color: var(--ye-ink); text-decoration: none; cursor: pointer; font-size: 15px; line-height: 1.4;
}
.ye-bacheca__page:hover { border-color: var(--ye-accent); color: var(--ye-accent); }
.ye-bacheca__page--active { background: var(--ye-accent); border-color: var(--ye-accent); color: #fff; }
.ye-bacheca__page--disabled { opacity: .4; pointer-events: none; }

/* --- Controlli: ricerca + provincia sulla stessa riga --- */
.ye-bacheca__controls { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.ye-bacheca__search { flex: 1 1 260px; }   /* la ricerca si allarga, la provincia resta compatta */
.ye-bacheca__province-slot { flex: 0 0 auto; }
.ye-bacheca__province {
    padding: 12px 14px; font-size: 15px; color: var(--ye-ink); font-family: inherit;
    border: 1px solid #d1d5db; border-radius: 10px; background: #fff; cursor: pointer; min-width: 200px;
}
.ye-bacheca__province:focus { outline: none; border-color: var(--ye-accent); box-shadow: 0 0 0 3px rgba(26,127,90,.15); }

/* --- Azione: download PDF (solo ETS) --- */
.ye-bacheca__actions { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--ye-line); }
.ye-bacheca__pdf {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 18px; font-size: 14px; font-weight: 600; font-family: inherit;
    color: #fff; background: var(--ye-accent); border-radius: 8px; text-decoration: none;
    transition: background .15s;
}
.ye-bacheca__pdf:hover { background: var(--ye-accent-d); color: #fff; text-decoration: none; }
.ye-bacheca__pdf-icon {
    width: 12px; height: 14px; flex: 0 0 auto; position: relative;
    border: 2px solid #fff; border-radius: 2px;
}
.ye-bacheca__pdf-icon::after {
    content: ""; position: absolute; left: 2px; right: 2px; bottom: 2px; height: 2px;
    background: #fff; box-shadow: 0 -4px 0 #fff;
}
