/* AZIENDE CON DURC — Plugin CSS v5 */
* { box-sizing: border-box; }
.acd-wrap, .acd-caro-wrap, .acd-req-wrap {
    font-family: Inter, 'Segoe UI', system-ui, sans-serif;
}

/* ── CATEGORIA FISSA ────────────────────────────────── */
.acd-cat-fixed {
    display: inline-flex; align-items: center; gap: 6px;
    background: #eff6ff; border: 1px solid #bfdbfe;
    border-radius: 20px; padding: 5px 14px;
    font-size: .8rem; font-weight: 600; color: #1a3a5c;
    margin-bottom: 1rem;
}

/* ── FILTRI ─────────────────────────────────────────── */
.acd-filtri {
    background: #fff; border-radius: 12px; padding: 1.25rem 1.5rem;
    box-shadow: 0 2px 16px rgba(0,0,0,.07); margin-bottom: 1.25rem;
    display: flex; gap: .85rem; flex-wrap: wrap; align-items: flex-end;
}
.acd-filtri__group { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 130px; }
.acd-filtri__group label { font-size: .76rem; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: .04em; }
.acd-filtri__group select,
.acd-filtri__group input {
    border: 1.5px solid #e2e8f0; border-radius: 8px;
    padding: .55rem .85rem; font-size: .88rem; font-family: inherit;
    color: #1e293b; background: #fff !important; transition: border-color .18s;
}
.acd-filtri__group select:focus,
.acd-filtri__group input:focus { outline: none; border-color: #1a3a5c; }
.acd-reset {
    padding: .55rem 1rem; background: #f8fafc;
    border: 1.5px solid #e2e8f0; border-radius: 8px;
    font-size: .83rem; font-weight: 600; cursor: pointer; color: #64748b;
    align-self: flex-end; white-space: nowrap; font-family: inherit; transition: all .15s;
}
.acd-reset:hover { border-color: #1a3a5c; color: #1a3a5c; }

/* ── GRID AZIENDE ───────────────────────────────────── */
.acd-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}
@media(max-width: 900px) { .acd-grid { grid-template-columns: repeat(2, 1fr); } }
@media(max-width: 540px) {
    .acd-grid { grid-template-columns: 1fr; }
    /* Mobile: foto sinistra, info destra */
    .acd-card {
        flex-direction: row !important;
        align-items: stretch;
    }
    .acd-card__foto {
        width: 90px !important; height: auto !important;
        min-height: 100px; flex-shrink: 0;
        border-radius: 12px 0 0 12px !important;
        object-fit: cover;
    }
    .acd-card__placeholder {
        width: 90px !important; height: auto !important;
        min-height: 100px; flex-shrink: 0;
        border-radius: 12px 0 0 12px !important;
        font-size: 2rem !important;
    }
    .acd-card__body { padding: .75rem !important; }
}

/* ── CARD AZIENDA ───────────────────────────────────── */
.acd-card {
    background: #fff; border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
    overflow: hidden; display: flex; flex-direction: column;
    transition: transform .2s, box-shadow .2s; border: 1px solid #f1f5f9;
}
.acd-card:hover { transform: translateY(-3px); box-shadow: 0 8px 28px rgba(0,0,0,.11); }
.acd-card__foto        { width: 100%; height: 130px; object-fit: cover; display: block; }
.acd-card__placeholder { width: 100%; height: 130px; background: linear-gradient(135deg, #e2e8f0, #f1f5f9); display: flex; align-items: center; justify-content: center; font-size: 3rem; }
.acd-card__body  { padding: .85rem; flex: 1; display: flex; flex-direction: column; gap: .35rem; }
.acd-card__settore { display: inline-flex; align-items: center; gap: 4px; font-size: .7rem; font-weight: 700; color: #1a3a5c; background: #eff6ff; border-radius: 20px; padding: 2px 9px; align-self: flex-start; }
.acd-card__nome  { font-weight: 700; font-size: .88rem; color: #1e293b; line-height: 1.3; }
.acd-card__durc  { display: inline-flex; align-items: center; gap: 4px; background: #dcfce7; color: #15803d; border-radius: 20px; padding: 2px 8px; font-size: 10px; font-weight: 700; align-self: flex-start; }
.acd-card__citta { font-size: .75rem; color: #64748b; display: flex; align-items: center; gap: 4px; }
.acd-card__desc  { font-size: .75rem; color: #64748b; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.acd-card__tags  { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: auto; padding-top: .4rem; }
.acd-card__tag   { background: #eff6ff; color: #1e40af; border-radius: 20px; padding: 1px 8px; font-size: 9px; font-weight: 600; }

/* ── FOOTER BAR (contatore aziende) ────────────────── */
.acd-footer-bar {
    display: flex; justify-content: flex-end;
    margin-top: .75rem; padding-top: .5rem;
}
.acd-count { font-size: .8rem; color: #94a3b8; }

/* ── PAGINATION ─────────────────────────────────────── */
.acd-pagination {
    display: flex; gap: .35rem; flex-wrap: wrap;
    justify-content: center; margin-top: 1rem; margin-bottom: .5rem;
}
.acd-pg {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 34px; height: 34px; padding: 0 .5rem;
    border: 1.5px solid #e2e8f0; border-radius: 8px;
    background: #fff; color: #64748b; font-size: .82rem; font-weight: 600;
    cursor: pointer; font-family: inherit; transition: all .15s;
}
.acd-pg:hover       { border-color: #1a3a5c; color: #1a3a5c; }
.acd-pg--active     { background: #1a3a5c; color: #fff; border-color: #1a3a5c; }
.acd-pg-dots        { display: inline-flex; align-items: center; color: #94a3b8; font-size: .9rem; padding: 0 .3rem; }

/* ── LOADING / EMPTY ────────────────────────────────── */
.acd-loading { grid-column: 1/-1; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 3rem; color: #64748b; }
.acd-spin    { width: 20px; height: 20px; border: 2px solid #e2e8f0; border-top-color: #1a3a5c; border-radius: 50%; animation: acdSpin .6s linear infinite; }
@keyframes acdSpin { to { transform: rotate(360deg); } }
.acd-empty   { grid-column: 1/-1; text-align: center; padding: 3rem; color: #64748b; }
.acd-empty__icon { font-size: 2.5rem; margin-bottom: .75rem; }

/* ══════════════════════════════════════════
   ULTIME RICHIESTE [acd_richieste]
══════════════════════════════════════════ */
.acd-req-wrap {
    font-family: Inter, 'Segoe UI', system-ui, sans-serif;
}
.acd-req-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: .75rem;
}
@media(max-width: 900px) { .acd-req-grid { grid-template-columns: repeat(2, 1fr); } }
@media(max-width: 540px) {
    .acd-req-grid { grid-template-columns: 1fr; }
}

/* Card richiesta */
.acd-req-card {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
    display: flex; flex-direction: row; overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    transition: box-shadow .2s;
}
.acd-req-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,.1); }

/* Lato sinistro — sfondo celestino con emoji */
.acd-req-card__left {
    width: 70px; flex-shrink: 0;
    background: linear-gradient(135deg, #e0f2fe, #bae6fd);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.75rem;
}

/* Lato destro — info */
.acd-req-card__right {
    flex: 1; padding: .85rem .9rem;
    display: flex; flex-direction: column; gap: .3rem; min-width: 0;
}
.acd-req-card__cat {
    font-size: .7rem; font-weight: 700; color: #1a3a5c;
    background: #eff6ff; border-radius: 20px; padding: 1px 8px;
    align-self: flex-start;
}
.acd-req-card__serv {
    font-weight: 700; font-size: .88rem; color: #1e293b;
    line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.acd-req-card__zona {
    font-size: .75rem; color: #64748b;
    display: flex; align-items: center; gap: 4px;
}
.acd-req-card__preview {
    font-size: .75rem; color: #94a3b8; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.acd-req-card__meta {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: auto; padding-top: .35rem; border-top: 1px solid #f1f5f9;
}
.acd-req-card__lock {
    display: inline-flex; align-items: center; gap: 3px;
    font-size: .7rem; color: #94a3b8; font-weight: 500;
}
.acd-req-card__data { font-size: .7rem; color: #94a3b8; }

/* Footer con contatore */
.acd-req-footer {
    display: flex; justify-content: flex-end;
    padding-top: .5rem;
}
.acd-req-count {
    font-size: .8rem; color: #94a3b8;
}

/* Mobile richieste: layout già orizzontale di default */
@media(max-width: 540px) {
    .acd-req-card__left { width: 60px; font-size: 1.4rem; }
    .acd-req-card__right { padding: .7rem .75rem; }
    /* Nascondi pills servizi su mobile */
    .acd-card__tags { display: none; }
}

/* ══════════════════════════════════════════
   CAROSELLO [acd_carosello]
══════════════════════════════════════════ */
.acd-caro-wrap {
    padding: 1.5rem 0; max-width: 1100px; margin: 0 auto;
}
.acd-caro-outer {
    display: flex; align-items: center; gap: .75rem;
}
.acd-caro-viewport { flex: 1; overflow: hidden; }
.acd-caro-track {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
}
@media(max-width: 820px) { .acd-caro-track { grid-template-columns: repeat(2, 1fr); } }
@media(max-width: 480px) { .acd-caro-track { grid-template-columns: 1fr; } }

.acd-caro-item[style*="none"] { display: none !important; }

.acd-caro-nav {
    flex-shrink: 0; width: 38px; height: 38px;
    border-radius: 50%; background: #fff;
    border: 1.5px solid #e2e8f0; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: #1a3a5c; transition: all .18s; box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.acd-caro-nav:hover  { background: #1a3a5c; color: #fff; border-color: #1a3a5c; }
.acd-caro-nav--off   { opacity: .35; cursor: default; pointer-events: none; }

.acd-caro-dots { display: flex; justify-content: center; gap: .4rem; margin-top: 1rem; }
.acd-caro-dot  {
    width: 8px; height: 8px; border-radius: 50%;
    background: #e2e8f0; cursor: pointer; transition: background .2s, transform .2s;
    display: inline-block;
}
.acd-caro-dot--active { background: #1a3a5c; transform: scale(1.25); }

/* ── Logo + badge sezione specifica ── */
.acd-section-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .6rem;
    margin-bottom: 1.5rem;
    text-align: center;
}
.acd-section-logo {
    height: 52px;
    width: auto;
    display: block;
}
.acd-section-header .acd-cat-fixed {
    margin-bottom: 0;
}
