/* ==========================================================================
   OASI — News ed Eventi (listing + single + banda dona)
   Refs Figma 474:2069 (News listing), 563:2383 (single News).
   Stili condivisi anche dai template Evento (eventi.css aggiunge il badge data).
   ========================================================================== */

/* --------------------------------------------------------------------------
   INTESTAZIONE LISTING (centrata)
   -------------------------------------------------------------------------- */
.listing-page { background: var(--paper); }

.listing-head { padding: clamp(90px, 11vw, 140px) 0 clamp(30px, 4vw, 48px); text-align: center; }
.lh-crumb { font-family: var(--font-display); font-weight: 600; font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); display: inline-flex; align-items: center; gap: 12px; }
.lh-crumb a { color: var(--muted); transition: color .2s; }
.lh-crumb a:hover { color: var(--orange); }
.lh-crumb .sep { color: var(--orange); }
.lh-crumb .here { color: var(--teal); }
.listing-head h1 { margin-top: 22px; font-family: var(--font-display); font-weight: 800; letter-spacing: -.03em; line-height: 1; color: var(--teal); font-size: clamp(3rem, 8vw, 6rem); }

/* --------------------------------------------------------------------------
   IN EVIDENZA (featured)
   -------------------------------------------------------------------------- */
.featured-wrap { padding: clamp(20px, 3vw, 40px) 0 clamp(70px, 8vw, 110px); }
.featured { display: grid; grid-template-columns: 1.08fr 1fr; gap: clamp(32px, 4.5vw, 64px); align-items: center; }
.ft-pic { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #c5b8a0; }
.ft-pic img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.ft-pic:hover img { transform: scale(1.04); }
.ft-meta { display: flex; align-items: center; gap: 14px; font-family: var(--font-display); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 22px; }
.ft-cat { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--teal); }
.ft-cat::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); flex-shrink: 0; }
.ft-title { font-family: var(--font-display); font-weight: 800; letter-spacing: -.02em; line-height: 1.05; font-size: clamp(1.8rem, 3.2vw, 3rem); color: var(--teal); }
.ft-title a { color: inherit; transition: color .2s; }
.ft-title a:hover { color: var(--orange); }
.ft-excerpt { margin-top: 22px; font-size: 1.02rem; line-height: 1.7; color: var(--muted); max-width: 520px; }
.ft-link { display: inline-flex; align-items: center; gap: 10px; margin-top: 30px; font-family: var(--font-display); font-weight: 700; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; color: var(--teal); border-bottom: 1.5px solid var(--teal); padding-bottom: 8px; transition: color .2s, border-color .2s; }
.ft-link:hover { color: var(--orange); border-color: var(--orange); }
.ft-link svg { width: 14px; height: 14px; }

/* --------------------------------------------------------------------------
   LISTA (righe)
   -------------------------------------------------------------------------- */
.listing { padding: 0 0 clamp(80px, 10vw, 130px); }
.related-listing { padding: clamp(70px, 8vw, 110px) 0; background: var(--paper); }

.listing-bar { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; padding-bottom: 22px; border-bottom: 1.5px solid var(--border-default); }
.lb-label { font-family: var(--font-display); font-weight: 700; font-size: clamp(1rem, 1.6vw, 1.2rem); letter-spacing: .02em; color: var(--teal); }
/* Filtro a dropdown (categorie news / prossimi-passati eventi). Riprende il
   linguaggio del menu di navigazione: pill come trigger, pannello .fm-drop. */
.lb-filter { position: relative; }
.lb-drop-toggle { display: inline-flex; align-items: center; gap: 10px; padding: 11px 20px; border: 1px solid var(--border-default); border-radius: 999px; background: #fff; font-family: var(--font-display); font-weight: 700; font-size: .88rem; color: var(--teal); cursor: pointer; transition: background .2s, border-color .2s; }
.lb-drop-toggle:hover { background: var(--paper-2); }
.lb-drop-toggle .chev { width: 11px; height: 11px; opacity: .7; transition: transform .2s; }
.lb-drop-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }

.lb-drop { position: absolute; top: calc(100% + 10px); left: 0; z-index: 60; min-width: 240px; display: flex; flex-direction: column; gap: 2px; padding: 12px; border: 1px solid rgba(11, 37, 48, .08); border-radius: 18px; background: rgba(247, 244, 238, .96); backdrop-filter: blur(24px) saturate(140%); -webkit-backdrop-filter: blur(24px) saturate(140%); box-shadow: 0 30px 60px -20px rgba(0, 40, 60, .28); }
.lb-drop a { padding: 10px 16px; border-radius: 999px; font-family: var(--font-display); font-weight: 600; font-size: .88rem; color: var(--teal); white-space: nowrap; transition: background .2s, color .2s; }
.lb-drop a:hover { background: rgba(11, 37, 48, .06); }
.lb-drop a[aria-current="true"] { color: var(--orange); }
/* Chiuso solo con JS attivo: senza, il dropdown resta una lista di link. */
.js-lb .lb-filter:not(.is-open) .lb-drop { opacity: 0; visibility: hidden; transform: translateY(-6px); transition: all .22s cubic-bezier(.2, .8, .2, 1); }

/* Ricerca: la lente apre il campo (main.js). Senza JS il campo e' gia' visibile. */
.lb-search { display: inline-flex; align-items: center; gap: 4px; background: #fff; border: 1px solid var(--border-default); border-radius: 999px; padding: 5px; }
.lb-input { width: 190px; border: 0; background: transparent; padding: 8px 14px; font-family: var(--font-body); font-size: .9rem; color: var(--teal); transition: width .25s, padding .25s, opacity .2s; }
.lb-input::placeholder { color: var(--muted); }
.lb-input:focus { outline: none; }
.lb-search-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex-shrink: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; transition: background .2s, color .2s; }
.lb-search-btn:hover { background: var(--paper-2); color: var(--teal); }
.lb-search-btn svg { width: 20px; height: 20px; }
/* Stato chiuso: solo la lente (lo imposta main.js, mai senza JS) */
.js-lb .lb-search:not(.is-open) .lb-input { width: 0; padding: 8px 0; opacity: 0; }

.lb-result { margin-top: 18px; font-family: var(--font-body); font-size: .95rem; color: var(--muted); }
.lb-result a { margin-left: 10px; font-family: var(--font-display); font-weight: 700; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--teal); border-bottom: 1.5px solid var(--teal); transition: color .2s, border-color .2s; }
.lb-result a:hover { color: var(--orange); border-color: var(--orange); }

@media (max-width: 860px) {
  .lb-input { width: 140px; }
}

.list-rows { display: block; }
.list-item { display: grid; grid-template-columns: 150px 210px 1fr 56px; gap: clamp(20px, 3vw, 40px); align-items: center; padding: 26px 0; border-bottom: 1px solid var(--border-default); transition: background .2s; }
.list-item:hover { background: rgba(0, 84, 112, .03); }

.li-left { display: flex; flex-direction: column; gap: 8px; }
.li-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--orange); }
.li-date { font-family: var(--font-display); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

.li-thumb { aspect-ratio: 16 / 10; overflow: hidden; background: #c5b8a0; }
.li-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.list-item:hover .li-thumb img { transform: scale(1.05); }

.li-body { min-width: 0; }
.li-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.15rem, 1.7vw, 1.4rem); line-height: 1.2; letter-spacing: -.01em; color: var(--teal); transition: color .2s; }
.list-item:hover .li-title { color: var(--orange); }
.li-excerpt { margin-top: 10px; font-size: .92rem; line-height: 1.6; color: var(--muted); max-width: 620px; }
.li-tag { display: inline-block; margin-top: 14px; font-family: var(--font-display); font-weight: 600; font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

.li-arrow { width: 52px; height: 52px; border-radius: 50%; border: 1.5px solid var(--border-default); display: inline-flex; align-items: center; justify-content: center; color: var(--teal); justify-self: end; transition: background .2s, color .2s, border-color .2s; }
.li-arrow svg { width: 20px; height: 20px; }
.list-item:hover .li-arrow { background: var(--orange); border-color: var(--orange); color: #fff; }

.listing-empty { padding: 40px 0; color: var(--muted); }

/* --------------------------------------------------------------------------
   PAGINAZIONE
   -------------------------------------------------------------------------- */
.pagination { display: flex; gap: 8px; justify-content: center; align-items: center; margin-top: clamp(48px, 6vw, 72px); }
.pagination .page-numbers { min-width: 46px; height: 46px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; font-size: .95rem; color: var(--teal); border: 1.5px solid var(--border-default); border-radius: 999px; transition: background .2s, color .2s, border-color .2s; }
.pagination a.page-numbers:hover { border-color: var(--orange); color: var(--orange); }
.pagination .page-numbers.current { background: var(--teal); border-color: var(--teal); color: #fff; }
.pagination .page-numbers.dots { border: 0; }

/* --------------------------------------------------------------------------
   SINGLE (News / Evento condiviso)
   -------------------------------------------------------------------------- */
.single-article { background: var(--paper); }
.single-hero { padding: clamp(90px, 10vw, 130px) 0 clamp(36px, 4vw, 52px); }
.single-hero .lh-crumb { justify-content: flex-start; }
.sh-grid { display: grid; grid-template-columns: 1.5fr .85fr; gap: clamp(32px, 4vw, 56px); align-items: end; margin-top: 26px; }
.sh-title { font-family: var(--font-display); font-weight: 800; letter-spacing: -.025em; line-height: 1.04; color: var(--teal); font-size: clamp(2.1rem, 4.4vw, 3.6rem); }
.sh-meta { display: flex; flex-direction: column; gap: 12px; padding-bottom: 8px; }
.sh-cat { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; color: var(--teal); }
.sh-cat .d { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
.sh-date, .sh-author { font-family: var(--font-display); font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* La posizione verticale del crop la decide single.php in base all'orientamento
   della foto (inline style + data-parallax-y): su una verticale il centro cade
   sul petto e taglia la testa. */
.single-photo { height: clamp(300px, 42vw, 560px); background-size: cover; background-position: center; }

.single-body { padding: clamp(60px, 8vw, 100px) 0; }
.sb-grid { display: grid; grid-template-columns: 1fr 380px; gap: clamp(40px, 5vw, 72px); align-items: start; }
/* Sidebar condivisa spenta (tutti i blocchi off): niente colonna vuota. */
.sb-grid--solo { grid-template-columns: minmax(0, 852px); }

.article-content { max-width: 720px; font-family: var(--font-body); color: var(--muted); }
.article-content > p { font-size: 1.05rem; line-height: 1.8; margin-bottom: 1.4em; }
.article-content > p:first-of-type { font-size: 1.2rem; line-height: 1.7; color: var(--ink); }
.article-content h2 { font-family: var(--font-display); font-weight: 800; color: var(--teal); font-size: clamp(1.6rem, 2.6vw, 2.2rem); line-height: 1.15; margin: 1.6em 0 .6em; }
.article-content h3 { font-family: var(--font-display); font-weight: 700; color: var(--teal); font-size: 1.35rem; margin: 1.4em 0 .5em; }
.article-content a { color: var(--orange); text-decoration: underline; text-underline-offset: 3px; }
.article-content ul, .article-content ol { margin: 0 0 1.4em 1.2em; }
.article-content li { margin-bottom: .5em; line-height: 1.7; }
.article-content img { max-width: 100%; height: auto; margin: 1.6em 0; }
.article-content blockquote { border-left: 3px solid var(--orange); padding-left: 24px; margin: 1.6em 0; font-family: var(--font-display); font-size: 1.3rem; line-height: 1.4; color: var(--teal); }

/* --------------------------------------------------------------------------
   RESPONSIVE (pass di base — il pass completo è nella fase responsive)
   -------------------------------------------------------------------------- */
@media (max-width: 1000px) {
    .featured { grid-template-columns: 1fr; gap: 28px; }
    .sh-grid { grid-template-columns: 1fr; align-items: start; gap: 24px; }
    .sb-grid, .sb-grid--solo { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .list-item { grid-template-columns: 76px 1fr; grid-template-areas: "left body"; gap: 16px; }
    .li-thumb, .li-arrow { display: none; }
    .li-daybig { font-size: 1.7rem !important; }
}
