/* ==========================================================================
   Pagine interne — allineamento allo stile della home (restyling 2026-10)
   Caricato solo fuori dalla home. Header, menu e footer non vengono toccati.
   Token presi da :root di style.css e dal layout Comò del social feed.
   ========================================================================== */

:root {
    --tl-prugna: #9d6381;
    --tl-giallo: #ffd67f;
    --tl-azzurro: #5290a7;
    --tl-petrolio: #236368;
    --tl-crema: #fdf8e9;
    --tl-testo: #3c3c3b;
    --tl-bordo: #ece4cc;
    --tl-radius: 14px;
    --tl-card-shadow: 0 2px 0 var(--tl-giallo), 0 6px 18px rgba(35, 99, 104, .06);
    --tl-font-titoli: 'Bitter', Georgia, serif;
    --tl-font-ui: 'Poppins', system-ui, sans-serif;
    --tl-larghezza: 860px;
    /* libretto aperto (bianco, contorno azzurro, righe arancio): pallino degli elenchi */
    --tl-libro: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 14'%3E%3Cpath d='M7.6 2.6C5.8 1.3 3.5.8 1 1v10.6c2.5-.2 4.8.4 6.6 1.8z' fill='%23fff' stroke='%235290a7' stroke-width='1'/%3E%3Cpath d='M8.4 2.6C10.2 1.3 12.5.8 15 1v10.6c-2.5-.2-4.8.4-6.6 1.8z' fill='%23fff' stroke='%235290a7' stroke-width='1'/%3E%3Cpath d='M3 4.2c1.3 0 2.5.3 3.4.8M3 6.6c1.3 0 2.5.3 3.4.8M9.6 5c.9-.5 2.1-.8 3.4-.8M9.6 7.4c.9-.5 2.1-.8 3.4-.8' stroke='%23ffb43c' stroke-width='.8' fill='none'/%3E%3C/svg%3E");
    /* tre libretti in piedi, appoggiati sulla "mensola" (le linee divisorie) */
    --tl-libretti: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 72 48'%3E%3Cg transform='translate(0 -0.8)'%3E%3Crect x='9' y='13' width='15' height='35' rx='3' fill='%23e8735a' stroke='%23236368' stroke-width='1.6'/%3E%3Ccircle cx='14' cy='20' r='1.8' fill='%23ffd67f'/%3E%3Ccircle cx='19.5' cy='27' r='1.8' fill='%23ffd67f'/%3E%3Ccircle cx='14' cy='34' r='1.8' fill='%23ffd67f'/%3E%3Ccircle cx='19.5' cy='41' r='1.8' fill='%23ffd67f'/%3E%3Crect x='25.5' y='2' width='19' height='46' rx='3' fill='%232f7d83' stroke='%23236368' stroke-width='1.6'/%3E%3Crect x='25.5' y='8' width='19' height='3' fill='%23ffd67f'/%3E%3Crect x='25.5' y='40' width='19' height='3' fill='%23ffd67f'/%3E%3Cpath d='M35 18.5l2.3 4.6 5 .7-3.6 3.5.9 5-4.6-2.4-4.6 2.4.9-5-3.6-3.5 5-.7z' fill='%23ffd67f'/%3E%3Cg transform='rotate(14 61 48)'%3E%3Crect x='46' y='12' width='15' height='36' rx='3' fill='%239d6381' stroke='%23236368' stroke-width='1.6'/%3E%3Ccircle cx='55' cy='21' r='4.2' fill='%23fdf8e9'/%3E%3Ccircle cx='57' cy='19.8' r='3.6' fill='%239d6381'/%3E%3Crect x='46' y='40' width='15' height='2.5' fill='%23fdf8e9' opacity='.8'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* --- Fondo ----------------------------------------------------------------- */

body:not(.home) #main {
    background: var(--tl-crema);
    padding: 40px 20px 20px;
}

/* --- Testata di pagina e articolo ----------------------------------------- */

body:not(.home) .entry-header,
body:not(.home) .archive-header,
body:not(.home) .page-header {
    max-width: var(--tl-larghezza);
    margin: 0 auto 28px;
    padding: 0 0 46px;
    border: 0;
    border-bottom: 2px solid var(--tl-giallo);
    background: var(--tl-libretti) center bottom / 48px 32px no-repeat;
    box-shadow: none;
    text-align: center;
}

body:not(.home) .entry-title,
body:not(.home) .archive-title,
body:not(.home) .page-title {
    font-family: var(--tl-font-titoli);
    font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.6rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0;
    color: var(--tl-petrolio);
    margin: 0 0 10px;
}

/* Sottotitolo (plugin Secondary Title, stampato dentro l'h1) */
body:not(.home) .entry-title .subtitle {
    display: block;
    margin-top: 10px;
    font-family: var(--tl-font-ui);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: .3px;
    color: var(--tl-prugna);
}

body:not(.home) .archive-meta {
    max-width: 620px;
    margin: 0 auto;
    font-family: var(--tl-font-ui);
    font-size: .95rem;
    color: #6b6457;
}

/* Il segnalibro decorativo di style.css lascia il posto all'etichetta */
body:not(.home) .archive-header::before { content: none; }

/* Etichetta sopra il titolo negli elenchi, come "Dalla nostra pagina" in home */
.tl-eyebrow {
    display: block;
    margin-bottom: 6px;
    font-family: var(--tl-font-ui);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--tl-prugna);
}

/* Libri dal Comò: sfondo che cambia piano piano (js/cambiobackground.js).
   Le regole originali in style.css sono rimaste dentro un commento. */
body.category-libridalcomo #main { transition: background-color 10s ease-in-out; }
body.category-libridalcomo #main.sfondo-colore-1 { background-color: #fdf8e9; }
body.category-libridalcomo #main.sfondo-colore-2 { background-color: #eef5f6; }
body.category-libridalcomo #main.sfondo-colore-3 { background-color: #f8eff3; }
body.category-libridalcomo #main.sfondo-colore-4 { background-color: #fff4da; }

@media (prefers-reduced-motion: reduce) {
    body.category-libridalcomo #main { transition: none; }
}

/* --- Meta dell'articolo su una riga di etichette -------------------------- */

body.single .entry-header .entry-meta {
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
    font-family: var(--tl-font-ui);
    font-size: .82rem;
}

body.single .entry-header .entry-meta > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 4px 12px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid var(--tl-bordo);
    color: var(--tl-testo);
}

body.single .entry-header .entry-meta > span::before { margin: 0 !important; }
body.single .entry-header .entry-meta a { color: var(--tl-petrolio); text-decoration: none; }
body.single .entry-header .entry-meta a:hover { color: var(--tl-prugna); }

/* --- Corpo come card del feed ---------------------------------------------- */

body:not(.home) .hentry { padding: 0; background: none; }

body:not(.home) .entry-content,
body:not(.home) .page-content {
    max-width: var(--tl-larghezza);
    margin: 0 auto 36px;
    padding: 36px 44px;
    background: #fff;
    border: 0;
    border-radius: var(--tl-radius);
    box-shadow: var(--tl-card-shadow);
    font-size: 17px;
    line-height: 1.75;
    color: var(--tl-testo);
}

/* style.css dà ai paragrafi dimgray (e su mobile #333 a 16px): gli elenchi
   seguono la card, quindi testo e grassetti risultavano diversi */
body:not(.home) .entry-content p { color: inherit; font-size: inherit; }

/* Elenchi puntati: libretto aperto al posto del pallino */
body:not(.home) .entry-content ul.wp-block-list,
body:not(.home) .entry-content > ul:not([class]) { list-style: none; padding-left: 1.7em; }
body:not(.home) .entry-content ul.wp-block-list > li,
body:not(.home) .entry-content > ul:not([class]) > li { position: relative; margin-bottom: .25em; }
body:not(.home) .entry-content ul.wp-block-list > li::before,
body:not(.home) .entry-content > ul:not([class]) > li::before {
    content: "";
    position: absolute;
    left: -1.7em;
    top: calc((1.75em - 14px) / 2);
    width: 16px;
    height: 14px;
    background: var(--tl-libro) center / contain no-repeat;
}

body:not(.home) .entry-content h2,
body:not(.home) .entry-content h3,
body:not(.home) .entry-content h4 {
    font-family: var(--tl-font-titoli);
    color: var(--tl-petrolio);
    letter-spacing: 0;
    margin: 1.6em 0 .6em;
}

/* Solo i link di testo: quelli con una classe sono bottoni o componenti
   (es. .feature-card-button in L'Angolo Magico) e tengono il loro stile. */
body:not(.home) .entry-content a:not([class]) {
    color: var(--tl-azzurro);
    text-decoration: underline;
    text-decoration-color: rgba(82, 144, 167, .35);
    text-underline-offset: 3px;
}
body:not(.home) .entry-content a:not([class]):hover { color: var(--tl-prugna); text-decoration-color: currentColor; }

body:not(.home) .entry-content img { border-radius: 10px; }

/* Blocco Immagine centrato: style.css dà a .aligncenter width 100%, e la figure
   restava larga quanto la card con l'immagine a sinistra */
body:not(.home) .entry-content figure.aligncenter {
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.5em;
}

body:not(.home) .entry-content hr,
body:not(.home) .entry-content .wp-block-separator {
    border: 0;
    height: 32px;
    margin: 2.2em auto;
    max-width: 200px;
    opacity: 1;
    background: var(--tl-libretti) center top / 45px 30px no-repeat,
                linear-gradient(var(--tl-giallo), var(--tl-giallo)) center bottom / 100% 2px no-repeat;
}

body:not(.home) .entry-content blockquote {
    margin: 1.5em auto;
    padding: 14px 22px;
    border: 0;
    border-left: 4px solid var(--tl-giallo);
    border-radius: 0 10px 10px 0;
    background: var(--tl-crema);
    font-family: var(--tl-font-titoli);
    font-style: italic;
    color: var(--tl-petrolio);
}

/* Citazione breve centrata (blocco Citazione con classe tl-citazione-breve) */
body:not(.home) .entry-content blockquote.tl-citazione-breve {
    width: fit-content;
    max-width: min(100%, 480px);
    text-align: center;
}
body:not(.home) .entry-content blockquote.tl-citazione-breve p { margin: 0; }

/* Titolo a nuvola (blocco Titolo con classe tl-nuvola, pagina AmbaRabà).
   Crema e non bianca: sulla card bianca la nuvola originale spariva. */
body:not(.home) .entry-content .tl-nuvola {
    width: fit-content;
    max-width: 90%;
    margin: 2.4em auto 1em;
    padding: .55em 1.6em;
    background: var(--tl-crema);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    box-shadow: 0 -10px 0 0 var(--tl-crema), 0 10px 0 0 var(--tl-crema),
                10px 0 0 0 var(--tl-crema), -10px 0 0 0 var(--tl-crema),
                0 14px 0 0 var(--tl-giallo);
    font-size: 1.9rem;
    line-height: 1.2;
}

/* Scaletta oraria (Gruppo con classe tl-scaletta, una riga per orario:
   Gruppo tl-scaletta__riga con il paragrafo tl-scaletta__ora e il testo).
   Griglia propria: il layout dei Gruppi su Aruba non arriva. */
body:not(.home) .entry-content .tl-scaletta { margin: .4em 0 1.6em; }
body:not(.home) .entry-content .tl-scaletta__riga {
    display: grid;
    grid-template-columns: 4.6em 1fr;
    gap: .9em;
    align-items: start;
    padding: .7em 0;
    border-bottom: 1px dashed rgba(35, 99, 104, .18);
}
/* Col tema classico il Gruppo avvolge i figli in __inner-container: senza
   questo la griglia vedrebbe un solo elemento, stretto nella prima colonna */
body:not(.home) .entry-content .tl-scaletta__riga > .wp-block-group__inner-container { display: contents; }
body:not(.home) .entry-content .tl-scaletta__riga:last-child { border-bottom: 0; }
/* blocks.css di Twenty Thirteen dà ai figli del contenitore interno width 604px
   (specificità 0,4,0): qui serve passare anche dal contenitore per superarla */
body:not(.home) .entry-content .tl-scaletta > .wp-block-group__inner-container > .tl-scaletta__riga,
body:not(.home) .entry-content .tl-scaletta__riga > .wp-block-group__inner-container > p { width: auto; max-width: none; }
body:not(.home) .entry-content .tl-scaletta__riga p { margin: 0; }
body:not(.home) .entry-content p.tl-scaletta__ora {
    justify-self: start;
    padding: .15em .6em;
    border-radius: 999px;
    background: var(--tl-giallo);
    font-family: var(--tl-font-ui);
    font-weight: 700;
    font-size: .85em;
    color: var(--tl-petrolio);
    white-space: nowrap;
}
@media (max-width: 480px) {
    body:not(.home) .entry-content .tl-scaletta__riga { grid-template-columns: 1fr; gap: .35em; }
}

/* Mappa al clic (blocco HTML .tl-mappa, pagina Dove siamo): Google si carica
   solo dopo il clic su "Mostra la mappa" (js/mappa-al-clic.js) */
body:not(.home) .entry-content .tl-mappa {
    margin: 1.4em 0 2em;
    padding: 28px 20px 22px;
    border-radius: 14px;
    background: var(--tl-crema);
    box-shadow: 0 2px 0 var(--tl-giallo);
    text-align: center;
}
body:not(.home) .entry-content .tl-mappa__indirizzo { margin: 0 0 1em; color: var(--tl-petrolio); }
body:not(.home) .entry-content .tl-mappa__indirizzo::before {
    content: "";
    display: block;
    width: 28px;
    height: 36px;
    margin: 0 auto 10px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 36'%3E%3Cpath d='M14 1C7 1 1.5 6.4 1.5 13.3 1.5 22.4 14 35 14 35s12.5-12.6 12.5-21.7C26.5 6.4 21 1 14 1z' fill='%23236368'/%3E%3Ccircle cx='14' cy='13.3' r='4.6' fill='%23ffd67f'/%3E%3C/svg%3E") center / contain no-repeat;
}
body:not(.home) .entry-content .tl-mappa__azioni {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 0 0 .8em;
}
body:not(.home) .entry-content .tl-mappa__mostra,
body:not(.home) .entry-content .tl-mappa__indicazioni {
    padding: 10px 22px;
    border: 2px solid var(--tl-petrolio);
    border-radius: 999px;
    font-family: var(--tl-font-ui);
    font-size: .95rem;
    font-weight: 500;
    line-height: 1.3;
    text-decoration: none;
    cursor: pointer;
}
body:not(.home) .entry-content .tl-mappa__mostra { background: var(--tl-petrolio); color: #fff; }
body:not(.home) .entry-content .tl-mappa__indicazioni { background: transparent; color: var(--tl-petrolio); }
body:not(.home) .entry-content .tl-mappa__mostra:hover { background: var(--tl-prugna); border-color: var(--tl-prugna); }
body:not(.home) .entry-content .tl-mappa__indicazioni:hover { border-color: var(--tl-prugna); color: var(--tl-prugna); }
body:not(.home) .entry-content .tl-mappa__mostra:focus-visible,
body:not(.home) .entry-content .tl-mappa__indicazioni:focus-visible { outline: 3px solid var(--tl-azzurro); outline-offset: 2px; }
body:not(.home) .entry-content .tl-mappa__nota { margin: 0; font-size: .85em; color: #6b6457; }
/* Mappa aperta: iframe in cima al riquadro, sotto restano indirizzo e indicazioni */
body:not(.home) .entry-content .tl-mappa.is-aperta { padding: 0 0 18px; }
body:not(.home) .entry-content .tl-mappa.is-aperta .tl-mappa__indirizzo { margin-top: 16px; }
body:not(.home) .entry-content .tl-mappa.is-aperta .tl-mappa__indirizzo::before { display: none; }
body:not(.home) .entry-content .tl-mappa iframe {
    display: block;
    width: 100%;
    height: 420px;
    border: 0;
    border-radius: 14px 14px 0 0;
}

/* Riga piccola in fondo (paragrafo con classe tl-nota) */
body:not(.home) .entry-content p.tl-nota { margin-top: 2em; font-size: .85em; color: #6b6457; }

/* Riquadro di sintesi (Gruppo con classe tl-riquadro, Termini e Spedizioni).
   I figli del contenitore interno vanno a tutta larghezza: blocks.css di
   Twenty Thirteen li fissa a 604px (specificità 0,4,0) */
body:not(.home) .entry-content .wp-block-group.tl-riquadro {
    margin: 1.5em 0;
    padding: 18px 24px;
    border: 1px solid var(--tl-bordo);
    border-radius: var(--tl-radius);
    background: var(--tl-crema);
}
body:not(.home) .entry-content .wp-block-group.tl-riquadro > .wp-block-group__inner-container > * { width: auto; }
body:not(.home) .entry-content .wp-block-group.tl-riquadro h3 { margin-top: 0; }
body:not(.home) .entry-content .wp-block-group.tl-riquadro > .wp-block-group__inner-container > :last-child { margin-bottom: 0; }
@media (max-width: 480px) {
    body:not(.home) .entry-content .wp-block-group.tl-riquadro { padding: 14px 16px; }
}

/* Griglia di loghi (Galleria con classe tl-loghi, pagina Libri e giocattoli).
   Griglia propria: il layout flex della Galleria su Aruba non arriva. */
body:not(.home) .entry-content .wp-block-gallery.tl-loghi {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 16px;
    margin: 1.2em 0 2em;
}
body:not(.home) .entry-content .wp-block-gallery.tl-loghi > figure.wp-block-image {
    display: flex;
    flex-direction: column;
    width: auto !important;
    margin: 0;
    padding: 10px 10px 8px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 0 0 1px var(--tl-bordo);
    transition: box-shadow .2s, transform .2s;
}
body:not(.home) .entry-content .wp-block-gallery.tl-loghi > figure.wp-block-image:hover {
    box-shadow: 0 0 0 2px var(--tl-giallo);
    transform: translateY(-2px);
}
body:not(.home) .entry-content .wp-block-gallery.tl-loghi figure.wp-block-image a { display: block; }
body:not(.home) .entry-content .wp-block-gallery.tl-loghi figure.wp-block-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: contain;
    border-radius: 0;
}
/* La didascalia della Galleria è in sovrimpressione: qui va sotto il logo */
body:not(.home) .entry-content .wp-block-gallery.tl-loghi figure.wp-block-image figcaption {
    position: static;
    max-height: none;
    margin: 6px 0 0;
    padding: 0;
    background: none;
    font-family: var(--tl-font-ui);
    font-size: .78rem;
    font-style: normal;
    font-weight: 500;
    line-height: 1.3;
    text-align: center;
    text-shadow: none;
    color: var(--tl-petrolio);
}
body:not(.home) .entry-content .wp-block-gallery.tl-loghi figure.wp-block-image figcaption::before { content: none; }

@media (max-width: 767px) {
    body:not(.home) .entry-content .wp-block-gallery.tl-loghi { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    body:not(.home) .entry-content .wp-block-gallery.tl-loghi > figure.wp-block-image { padding: 6px 6px 6px; }
    body:not(.home) .entry-content .wp-block-gallery.tl-loghi figure.wp-block-image figcaption { font-size: .7rem; }
}

/* Recensioni Google (plugin Rich Showcase, pagina Recensioni): card come il resto */
body:not(.home) .entry-content .wp-gr .grw-review-inner.grw-backgnd {
    background: #fff !important;
    border-radius: 12px !important;
    box-shadow: 0 0 0 1px var(--tl-bordo);
}
body:not(.home) .entry-content .wp-gr .wp-google-name { color: var(--tl-petrolio) !important; font-family: var(--tl-font-ui); }
body:not(.home) .entry-content .wp-gr .wp-google-url {
    display: table;
    margin: 14px auto 0;
    padding: 9px 24px;
    border-radius: 20px;
    background: var(--tl-petrolio);
    color: #fff !important;
    font-family: var(--tl-font-ui);
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
}
body:not(.home) .entry-content .wp-gr .wp-google-url:hover { background: var(--tl-prugna); }

body:not(.home) footer.entry-meta:empty { display: none; }

/* --- Bottoni e form (Contact Form 7, ricerca, commenti) ------------------- */

body:not(.home) .entry-content input[type="text"],
body:not(.home) .entry-content input[type="email"],
body:not(.home) .entry-content input[type="tel"],
body:not(.home) .entry-content textarea,
body:not(.home) .comment-respond input[type="text"],
body:not(.home) .comment-respond input[type="email"],
body:not(.home) .comment-respond textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--tl-bordo);
    border-radius: 10px;
    background: #fffdf7;
    font: inherit;
    font-size: 16px;
    transition: border-color .2s, box-shadow .2s;
}

body:not(.home) .entry-content input:focus,
body:not(.home) .entry-content textarea:focus,
body:not(.home) .comment-respond input:focus,
body:not(.home) .comment-respond textarea:focus {
    outline: none;
    border-color: var(--tl-azzurro);
    box-shadow: 0 0 0 3px rgba(82, 144, 167, .18);
}

body:not(.home) .entry-content input[type="submit"],
body:not(.home) .entry-content button[type="submit"],
body:not(.home) .comment-respond input[type="submit"] {
    padding: 10px 28px;
    border: 0;
    border-radius: 20px;
    background: var(--tl-petrolio);
    color: #fff;
    font-family: var(--tl-font-ui);
    font-size: .9rem;
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: none;
    box-shadow: none;
    cursor: pointer;
    transition: background-color .2s;
}

body:not(.home) .entry-content input[type="submit"]:hover,
body:not(.home) .entry-content button[type="submit"]:hover,
body:not(.home) .comment-respond input[type="submit"]:hover { background: var(--tl-prugna); }

/* Contact Form 7: casella privacy allineata al testo e modulo staccato da ciò che segue */
body:not(.home) .entry-content .wpcf7-acceptance .wpcf7-list-item { margin: 0; }
body:not(.home) .entry-content .wpcf7-acceptance label { display: inline-flex; align-items: center; gap: 8px; }
body:not(.home) .entry-content .wpcf7-acceptance input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--tl-petrolio);
}
body:not(.home) .entry-content .wpcf7 { margin-bottom: 1.8em; }

/* MailPoet modulo 2 (pagina Newsletter): gli stili del plugin, stampati con l'id
   del modulo, danno campi da 200px e un riquadro bianco con padding. L'id nel
   selettore basta a superarli; !important solo contro lo style inline dei campi.
   Il modulo del footer (home) è il numero 1 e non è dentro .entry-content. */
body:not(.home) .entry-content #mailpoet_form_2,
body:not(.home) .entry-content #mailpoet_form_2 form.mailpoet_form { padding: 0; background: none; }
body:not(.home) .entry-content #mailpoet_form_2 .mailpoet_text { width: 100%; padding: 11px 14px !important; }
body:not(.home) .entry-content #mailpoet_form_2 .mailpoet_paragraph { margin-bottom: 16px; line-height: inherit; }

/* Blocco Pulsanti dell'editor: pillola petrolio come i bottoni della home.
   Il tema padre dà ai pulsanti un gradiente arancione con un selettore lungo,
   per questo il selettore qui è altrettanto specifico. */
/* Il layout flex lo stampa WordPress nel footer, e su Aruba quegli stili si perdono */
body:not(.home) .entry-content .wp-block-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 1.2em 0; }
body:not(.home) .entry-content .wp-block-buttons.is-content-justification-center { justify-content: center; }
body:not(.home) .entry-content .wp-block-buttons.is-content-justification-right { justify-content: flex-end; }
body:not(.home) .entry-content .wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-background) {
    display: inline-block;
    padding: 10px 26px;
    border: 0;
    border-radius: 20px;
    background: var(--tl-petrolio);
    box-shadow: none;
    color: #fff;
    font-family: var(--tl-font-ui);
    font-size: .9rem;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    transition: background-color .2s;
}
body:not(.home) .entry-content .wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-background):hover { background: var(--tl-prugna); color: #fff; }

/* MailPoet (pagina Newsletter): lo stile inline del plugin vince senza !important */
body:not(.home) .entry-content .mailpoet_submit {
    padding: 10px 28px !important;
    border: 0 !important;
    border-radius: 20px !important;
    background: var(--tl-petrolio) !important;
    color: #fff !important;
    font-family: var(--tl-font-ui);
    font-size: .9rem;
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: none;
    cursor: pointer;
}
body:not(.home) .entry-content .mailpoet_submit:hover { background: var(--tl-prugna) !important; }

/* Modulo di ricerca (pagina 404 e risultati vuoti) */
body:not(.home) .search-form { display: flex; gap: 8px; max-width: 420px; }
body:not(.home) .search-form label { flex: 1; }
body:not(.home) .search-form .search-field {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid var(--tl-bordo);
    border-radius: 20px;
    background: #fffdf7;
    font-size: 16px;
}
body:not(.home) .search-form .search-submit {
    padding: 10px 22px;
    border: 0;
    border-radius: 20px;
    background: var(--tl-petrolio);
    color: #fff;
    font-family: var(--tl-font-ui);
    font-weight: 600;
    box-shadow: none;
}

/* --- Articolo singolo: contenitore, navigazione, commenti ------------------ */

/* Il vecchio stile dava agli articoli una riga grigia sotto e un velo azzurro al passaggio del mouse */
body.single .site-main article.post,
body.single .site-main article.post:hover {
    border-bottom: 0;
    background: none;
}

body:not(.home) .post-navigation,
body:not(.home) .paging-navigation {
    max-width: var(--tl-larghezza);
    margin: 0 auto 36px;
    padding: 0;
    background: none;
}

/* In style.css .nav-links ha margini negativi e una riga grigia che sbordava */
body:not(.home) .post-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin: 0;
    padding: 0;
    border: 0;
}

body:not(.home) .post-navigation .nav-links a {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    margin: 0;
    padding: 14px 18px;
    border: 0;
    border-radius: var(--tl-radius);
    background: #fff;
    box-shadow: var(--tl-card-shadow);
    font-family: var(--tl-font-titoli);
    font-size: .98rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--tl-petrolio);
    text-decoration: none;
    transform: none;
}
body:not(.home) .post-navigation .nav-links a:hover { background: #fff; color: var(--tl-prugna); transform: translateY(-2px); }

/* Etichetta che spiega dove porta il link; la freccia del tema entra nell'etichetta */
body:not(.home) .post-navigation .nav-links .meta-nav { display: none; }
body:not(.home) .post-navigation .nav-links a::before {
    margin: 0;
    font-family: var(--tl-font-ui);
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--tl-prugna);
}
body:not(.home) .post-navigation .nav-links a[rel="prev"]::before { content: 'Articolo precedente'; }
body:not(.home) .post-navigation .nav-links a[rel="next"]::before { content: 'Articolo successivo'; }
body:not(.home) .post-navigation .nav-links a[rel="next"] { align-items: flex-end; text-align: right; }

/* Freccia SVG in un cerchio petrolio, prugna al passaggio del mouse */
body:not(.home) .post-navigation .nav-links a {
    position: relative;
    justify-content: center;
    min-height: 76px;
}
body:not(.home) .post-navigation .nav-links a[rel="prev"] { padding-left: 70px; }
body:not(.home) .post-navigation .nav-links a[rel="next"] { padding-right: 70px; }
body:not(.home) .post-navigation .nav-links a::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40px;
    height: 40px;
    margin-top: -20px;
    border-radius: 50%;
    background-color: var(--tl-petrolio);
    background-position: center;
    background-repeat: no-repeat;
    background-size: 20px;
    transition: background-color .2s, transform .2s;
}
body:not(.home) .post-navigation .nav-links a[rel="prev"]::after {
    left: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5M11 6l-6 6 6 6'/%3E%3C/svg%3E");
}
body:not(.home) .post-navigation .nav-links a[rel="next"]::after {
    right: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E");
}
body:not(.home) .post-navigation .nav-links a:hover::after { background-color: var(--tl-prugna); }
body:not(.home) .post-navigation .nav-links a[rel="prev"]:hover::after { transform: translateX(-3px); }
body:not(.home) .post-navigation .nav-links a[rel="next"]:hover::after { transform: translateX(3px); }
body:not(.home) .post-navigation .nav-links a:focus-visible { outline: 3px solid var(--tl-azzurro); outline-offset: 2px; }
body:not(.home) .post-navigation .nav-links a:only-child[rel="next"] { margin-left: auto; max-width: calc(50% - 8px); }
body:not(.home) .post-navigation .nav-links a:only-child[rel="prev"] { max-width: calc(50% - 8px); }

/* Commenti: card come il resto; il riquadro vuoto delle pagine sparisce */
body:not(.home) .comments-area {
    max-width: var(--tl-larghezza);
    margin: 0 auto 36px;
    padding: 28px 44px;
    border-radius: var(--tl-radius);
    background: #fff;
    box-shadow: var(--tl-card-shadow);
}
body:not(.home) .comments-area:not(:has(*)) { display: none; }
body:not(.home) .comment-reply-title {
    font-size: 1.3rem;
    color: var(--tl-petrolio);
    border-bottom: 2px solid var(--tl-giallo);
}

/* --- Pagine con immagine "banner" (Dove siamo, AMBARABA', L'Angolo Magico) - */

body:not(.home) .featured-image-as-banner {
    max-width: 1180px;
    margin: 0 auto;
    border-radius: var(--tl-radius);
}
/* Riporta il titolo sopra la sfumatura dell'immagine, come prima */
/* Altezza fissa pari alla risalita: il contenuto riparte sempre 32px sotto il banner,
   con o senza sottotitolo. */
body:not(.home) .featured-image-as-banner + .entry-header {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 170px;
    margin: -170px auto 32px;
    padding: 0 20px 22px;
    border: 0;
}
body:not(.home) .featured-image-as-banner + .entry-header .entry-title { margin: 0; }
body:not(.home) .featured-image-as-banner + .entry-header .subtitle { margin-top: 6px; }
body:not(.home) .featured-image-as-banner + .entry-header .entry-title { color: #fff; }
body:not(.home) .featured-image-as-banner + .entry-header .subtitle { color: var(--tl-giallo); }

/* --- Archivi di categoria a card (template category.php / archive.php) ---- */

.tl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 22px;
    max-width: 1180px;
    margin: 0 auto 36px;
}

.tl-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: var(--tl-radius);
    background: #fff;
    box-shadow: var(--tl-card-shadow);
    transition: transform .2s, box-shadow .2s;
}
/* Annulla le vecchie regole di style.css per "article.post" negli elenchi
   (padding con !important su mobile, righe alterne grigie, hover azzurro). */
.site-main .tl-grid > article.tl-card {
    margin: 0;
    padding: 0 !important;
    border: 0;
    background: #fff;
}

.tl-card:hover { transform: translateY(-3px); box-shadow: 0 2px 0 var(--tl-giallo), 0 12px 26px rgba(35, 99, 104, .12); }

.tl-card__img { position: relative; display: block; aspect-ratio: 4 / 3; background: #e8eef0; }
.tl-card__img img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }

.tl-card__date {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 10px;
    border-radius: 12px;
    background: var(--tl-giallo);
    font-family: var(--tl-font-ui);
    font-size: .72rem;
    font-weight: 600;
    color: var(--tl-testo);
}

.tl-card__body { display: flex; flex: 1; flex-direction: column; padding: 16px 18px 18px; }

.tl-card__title {
    margin: 0 0 4px;
    font-family: var(--tl-font-titoli);
    font-size: 1.08rem;
    line-height: 1.3;
    letter-spacing: 0;
}
.tl-card__title a { color: var(--tl-petrolio); text-decoration: none; }
.tl-card__title a:hover { color: var(--tl-prugna); }

.tl-card__sub {
    margin: 0 0 8px;
    font-family: var(--tl-font-ui);
    font-size: .76rem;
    font-weight: 500;
    color: var(--tl-prugna);
}

.tl-card__excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0 0 12px;
    font-size: .9rem;
    line-height: 1.55;
    color: #5a5650;
}

.tl-card__more {
    margin-top: auto;
    font-family: var(--tl-font-ui);
    font-size: .82rem;
    font-weight: 600;
    color: var(--tl-prugna);
    text-decoration: none;
}
.tl-card__more:hover { color: var(--tl-petrolio); }

.tl-card__img:not(:has(img)) {
    background: var(--tl-crema) url("/wp/wp-content/uploads/2016/05/COMO-COMPLETO-MONOCOLORE-AQUAMARINA-300x212.png") center / 45% no-repeat;
}

/* Paginazione degli elenchi (the_posts_pagination) */
body:not(.home) .navigation.pagination {
    max-width: 1180px;
    margin: 0 auto 40px;
    padding: 0;
    background: none;
}
body:not(.home) .pagination .nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 0;
}
body:not(.home) .pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    min-width: 40px;
    height: 40px;
    justify-content: center;
    padding: 0 14px;
    border: 2px solid var(--tl-petrolio);
    border-radius: 20px;
    font-family: var(--tl-font-ui);
    font-size: .85rem;
    font-weight: 600;
    white-space: nowrap;
    color: var(--tl-petrolio);
    text-decoration: none;
    transition: background-color .2s, color .2s;
}
body:not(.home) .pagination a.page-numbers:hover,
body:not(.home) .pagination .page-numbers.current { background: var(--tl-petrolio); color: #fff; }
body:not(.home) .pagination .page-numbers.dots { border-color: transparent; }
body:not(.home) .pagination .page-numbers.prev,
body:not(.home) .pagination .page-numbers.next { display: inline-flex; flex-direction: row; gap: 6px; }

/* --- Pagina Archivio (Simple Yearly Archive) ------------------------------ */

body:not(.home) .sya_container a[rel="section"] {
    display: block;
    margin: 1.6em 0 .6em;
    padding: 0 36px 6px 0;
    border-bottom: 2px solid var(--tl-giallo);
    background: var(--tl-libretti) right bottom / 27px 18px no-repeat;
    font-family: var(--tl-font-titoli);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--tl-petrolio);
    text-decoration: none;
}
/* il primo figlio è l'ancora vuota a#yearNNNN, quindi :first-of-type non basta */
body:not(.home) .sya_container > a[rel="section"]:first-of-type,
body:not(.home) .sya_container > a[id^="year"]:first-child + a[rel="section"] { margin-top: 0; }
body:not(.home) .sya_container a[id^="year"] { scroll-margin-top: 16px; }
/* con js/archivio-anni.js ogni anno sta in un .tl-anno: lo spazio va tra i gruppi visibili */
body:not(.home) .sya_container .tl-anno > a[rel="section"] { margin-top: 0; }
body:not(.home) .sya_container .tl-anno:not([hidden]) ~ .tl-anno { margin-top: 1.6em; }

body:not(.home) .sya_container ul { margin: 0; padding: 0; list-style: none; columns: 2 320px; column-gap: 36px; }
body:not(.home) .sya_container li { break-inside: avoid; padding: 5px 0; border-bottom: 1px solid #f1ecdc; font-size: .93rem; }
/* data in colonna fissa: il titolo che va a capo resta allineato a sé stesso */
body:not(.home) .sya_postcontent { display: grid; grid-template-columns: 84px 1fr; column-gap: 8px; align-items: baseline; }
body:not(.home) .sya_date { font-family: var(--tl-font-ui); font-size: .78rem; color: #8a8378; text-transform: lowercase; }
body:not(.home) .sya_sep { display: none; }
body:not(.home) .sya_postlink { text-decoration: none !important; }

/* indice degli anni sopra l'archivio */
body:not(.home) .entry-content .tl-anni { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 2em; }
body:not(.home) .entry-content .tl-anni a,
body:not(.home) .entry-content .tl-anni button {
    margin: 0;
    padding: 4px 14px;
    border: 1px solid var(--tl-giallo);
    border-radius: 20px;
    background: #fff;
    box-shadow: none;
    font-family: var(--tl-font-ui);
    font-size: .85rem;
    font-weight: 400;
    line-height: 1.6;
    color: var(--tl-petrolio);
    text-decoration: none;
    text-transform: none;
    cursor: pointer;
}
body:not(.home) .entry-content .tl-anni a:hover,
body:not(.home) .entry-content .tl-anni a:focus-visible,
body:not(.home) .entry-content .tl-anni button:hover,
body:not(.home) .entry-content .tl-anni button:focus-visible,
body:not(.home) .entry-content .tl-anni button[aria-pressed="true"] { background: var(--tl-petrolio); border-color: var(--tl-petrolio); color: #fff; }
body:not(.home) .entry-content .tl-anni .tl-anni-tutti { border-color: var(--tl-prugna); color: var(--tl-prugna); }
body:not(.home) .entry-content .tl-anni .tl-anni-tutti:hover,
body:not(.home) .entry-content .tl-anni .tl-anni-tutti:focus-visible { background: var(--tl-prugna); border-color: var(--tl-prugna); color: #fff; }
body:not(.home) .entry-content .tl-anni [hidden] { display: none; }

/* --- Mobile ----------------------------------------------------------------- */

@media (max-width: 767px) {
    body:not(.home) #main { padding: 24px 12px 8px; }
    body:not(.home) .entry-content,
    body:not(.home) .page-content { padding: 22px 18px; font-size: 16.5px; border-radius: 12px; }
    body:not(.home) .post-navigation .nav-links { flex-direction: column; gap: 12px; }
    body:not(.home) .post-navigation .nav-links a,
    body:not(.home) .post-navigation .nav-links a:only-child[rel] { max-width: none; margin: 0; }
    body:not(.home) .comments-area { padding: 22px 18px; border-radius: 12px; }
    body:not(.home) .sya_postcontent { grid-template-columns: 1fr; row-gap: 1px; }
    body:not(.home) .sya_container li { padding: 7px 0; }
    body:not(.home) .featured-image-as-banner { height: 260px; border-radius: 12px; }
    body:not(.home) .featured-image-as-banner + .entry-header { height: 140px; margin: -140px auto 24px; padding-bottom: 16px; }
    .tl-grid { grid-template-columns: 1fr; gap: 14px; }

    /* Citazioni centrate dall'editor classico (es. Chi siamo) con larghezza inline
       al 55%: su mobile andavano a capo ogni due parole. */
    body:not(.home) .entry-content div[style*="margin: auto"][style*="width"] { width: auto !important; }

    /* Card orizzontali: immagine piccola a sinistra, testo a destra */
    .tl-card { flex-direction: row; }
    .tl-card__img { flex: 0 0 112px; aspect-ratio: auto; min-height: 132px; }
    .tl-card__date { top: auto; bottom: 8px; left: 8px; padding: 2px 8px; font-size: .66rem; }
    .tl-card__body { min-width: 0; padding: 12px 14px; }
    .tl-card__title { font-size: 1rem; }
    .tl-card__excerpt { -webkit-line-clamp: 2; font-size: .85rem; margin-bottom: 8px; }
}

/* --- Widget "Valuta questo consiglio" (functions.php) ---------------------- */

/* Titolo centrato e media voti in un'etichetta sotto: in style.css il titolo
   finiva spostato a sinistra e il 5.0 giallo su crema si leggeva poco. */
body.single .trelibretti-rating-widget {
    margin: 36px 0 8px;
    border: 0;
    border-radius: var(--tl-radius);
    background: var(--tl-crema);
    box-shadow: inset 0 0 0 2px var(--tl-giallo);
}
body.single .trelibretti-rating-widget .rating-header {
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    margin-bottom: 14px;
}
body.single .trelibretti-rating-widget .rating-title { margin: 0; }
body.single .trelibretti-rating-widget .rating-stats {
    padding: 3px 12px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid var(--tl-bordo);
}
body.single .trelibretti-rating-widget .average-rating {
    font-size: 1rem;
    color: var(--tl-petrolio);
    text-shadow: none;
}
body.single .trelibretti-rating-widget .total-votes { font-size: .8rem; color: #6b6457; }

/* Iscrizioni Jetpack nel modulo commenti (visibili solo da connessi): casella
   accanto al testo, non su una riga a sé come faceva style.css. */
body:not(.home) .comment-form .comment-subscription-form {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 10px;
}
body:not(.home) .comment-form .comment-subscription-form input[type="checkbox"] {
    flex: 0 0 auto;
    width: 18px !important;
    height: 18px;
    margin: 3px 0 0;
    accent-color: var(--tl-petrolio);
}
body:not(.home) .comment-form .comment-subscription-form label {
    display: inline;
    margin: 0;
    font-size: .92rem;
    font-weight: 400;
    line-height: 1.5;
}
body:not(.home) .comment-form .comment-subscription-form + .comment-subscription-form { margin-bottom: 18px; }
