/*
 * Restyle 2026: override leggeri sopra style.css e i css di sezione.
 * Font, articoli, ricerca e angoli restano quelli originali.
 * Per tornare indietro basta togliere l'enqueue in functions.php.
 */

:root {
    --ag-yellow: #fab900;
    --ag-surface: #f6f6f6;
    --ag-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 4px 14px rgba(0, 0, 0, .06);
    --ag-shadow-hover: 0 2px 4px rgba(0, 0, 0, .08), 0 10px 24px rgba(0, 0, 0, .12);
}

/* --- base --- */

:focus-visible {
    outline: 2px solid var(--ag-yellow);
    outline-offset: 2px;
}

/* --- header: la barra menu resta visibile scorrendo (offset calcolato in navigation.js) --- */

.site-header {
    position: sticky;
    top: var(--ag-sticky-top, 0);
    z-index: 1000;
}

.main-navigation a {
    transition: color .15s ease, background-color .15s ease;
}

/* --- barra menu: hover e pagina corrente con testo giallo e barra gialla sotto (come le tab dei widget),
   sottomenu squadrati scuri con righe divise da linee sottili (sotto 1000px c'è il menu mobile) --- */
@media screen and (min-width: 1001px) {
    #primary-menu > li > a {
        position: relative;
        background: transparent !important;
        transition: color .15s ease;
    }

    #primary-menu > li > a::after {
        content: "";
        position: absolute;
        left: .7em;
        right: .7em;
        bottom: 0;
        height: 3px;
        background: #fab900;
        opacity: 0;
        transition: opacity .15s ease;
    }

    #primary-menu > li:hover > a,
    #primary-menu > li > a:focus,
    #primary-menu > li.current-menu-item > a,
    #primary-menu > li.current-menu-ancestor > a,
    #primary-menu > li.current_page_item > a {
        color: #fab900;
    }

    #primary-menu > li:hover > a::after,
    #primary-menu > li > a:focus::after,
    #primary-menu > li.current-menu-item > a::after,
    #primary-menu > li.current-menu-ancestor > a::after,
    #primary-menu > li.current_page_item > a::after {
        opacity: 1;
    }

    #primary-menu ul {
        background: #393939;
        box-shadow: 0 6px 16px rgba(0, 0, 0, .18);
    }

    #primary-menu ul li + li {
        border-top: 1px solid rgba(255, 255, 255, .08);
    }

    #primary-menu ul a {
        background: transparent !important;
        transition: color .15s ease;
    }

    #primary-menu ul a:hover,
    #primary-menu ul a:focus {
        color: #fab900;
    }
}

/* --- foto dell'header: più bassa (era 230px desktop / 130px tablet). La scritta è al centro
   verticale dell'immagine e il cover taglia in parti uguali sopra e sotto, quindi resta intera --- */

@media screen and (min-width: 768px) and (max-width: 1024px) {
    .tophead-img {
        height: 110px;
    }

    /* la barra del menu sta sotto la foto con un margine pari alla sua altezza */
    .site-branding {
        margin-top: 110px;
    }
}

@media screen and (min-width: 1025px) {
    .tophead-img {
        height: 150px;
    }

    /* la barra del menu sta sotto la foto con un margine pari alla sua altezza */
    .site-branding {
        margin-top: 150px;
    }
}

/* --- ticker news (header.php): scorrimento orizzontale continuo --- */

@media screen and (min-width: 767px) {
    .site-tophead {
        display: flex;
        align-items: center;
    }

    .tophead-lastnews {
        position: static !important;
        display: flex !important;
        align-items: center;
        flex: 1;
        min-width: 0;
    }

    .tophead-social {
        flex: none;
        width: auto !important;
        float: none !important;
        padding-right: 12px;
    }

    /* icone social centrate nella barra da 30px, stessa dimensione e passo:
       i padding di style.css erano calibrati sui glifi Font Awesome */
    .social-icons {
        display: flex;
        align-items: center;
        gap: 14px;
        height: 30px;
        padding-left: 14px;
    }

    .social-icons li,
    .social-icons li a {
        display: flex;
        align-items: center;
        height: auto;
        padding: 0;
    }

    .social-icons li i,
    .social-icons li .telegram {
        margin: 0 !important;
        padding: 0 !important;
        font-size: 17px;
        vertical-align: 0;
    }
}

.tophead-lastnews .lastnews {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: none;
    height: 30px;
    padding-top: 0;
    padding-bottom: 0;
}

.lastnews-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ag-yellow);
    animation: ag-live-pulse 1.6s ease-out infinite;
}

@keyframes ag-live-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(250, 185, 0, .7); }
    100% { box-shadow: 0 0 0 7px rgba(250, 185, 0, 0); }
}

.tophead-lastnews .lastnews-item {
    display: block;
    flex: 1;
    min-width: 0;
    padding: 0;
    overflow: hidden;
    /* sfumatura ai bordi */
    -webkit-mask-image: linear-gradient(to right, transparent, #000 24px, #000 calc(100% - 40px), transparent);
    mask-image: linear-gradient(to right, transparent, #000 24px, #000 calc(100% - 40px), transparent);
}

.lastnews-track {
    display: flex;
    width: max-content;
    animation: ag-ticker var(--ag-ticker-duration, 60s) linear infinite;
}

.lastnews-item:hover .lastnews-track,
.lastnews-item:focus-within .lastnews-track {
    animation-play-state: paused;
}

@keyframes ag-ticker {
    to { transform: translateX(-50%); }
}

.lastnews-item .lastnews-track ul {
    display: flex;
    margin: 0;
    padding: 0;
    animation: none;
}

.lastnews-item .lastnews-track li {
    display: flex;
    align-items: center;
    height: 30px;
    line-height: 30px;
    white-space: nowrap;
}

/* separatore giallo tra le notizie */
.lastnews-item .lastnews-track li::after {
    content: "";
    width: 5px;
    height: 5px;
    margin: 0 18px;
    border-radius: 50%;
    background: var(--ag-yellow);
}

.lastnews-item .lastnews-track a {
    color: inherit;
    text-decoration: none;
    transition: color .15s ease;
}

.lastnews-item .lastnews-track a:hover {
    color: #c99400;
}

.lastnews-item .lastnews-track time {
    margin-right: 8px;
    color: #999;
    font-size: .85em;
}

/* --- icone Phosphor (al posto di Font Awesome 4): equivalenti di fa-2x, fa-3x, fa-spin --- */

/* in linea col testo: il glifo Phosphor sta sulla linea di base, quello FA era centrato */
.ph {
    vertical-align: -.125em;
}

.ph-2x {
    font-size: 2em;
}

.ph-3x {
    font-size: 3em;
}

.ph-spin {
    animation: ph-spin 1s linear infinite;
}

@keyframes ph-spin {
    to {
        transform: rotate(360deg);
    }
}

/* icona + testo centrati tra loro con uno spazio fisso (prima &nbsp; e padding calibrati su Font Awesome) */
#whatsapp-subscribe a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#whatsapp-subscribe a .ph,
.mercatino-toggle .ph {
    font-size: 17px;
    vertical-align: 0;
}

/* il pulsante esiste solo da desktop: da mobile resta il display: none di style.css */
@media screen and (min-width: 1000px) {
    .mercatino-toggle {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }
}

/* --- homepage --- */

.featured-entries {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.featured-entries > .sticky-entry {
    width: auto !important;
    margin: 0 !important;
    float: none !important;
    overflow: hidden;
    box-shadow: var(--ag-shadow);
    transition: box-shadow .2s ease;
}

.featured-entries > .sticky-entry:hover {
    box-shadow: var(--ag-shadow-hover);
}

/* card: immagine 16:9 uniforme, sotto titolo (max 2 righe) e voto/data ancorati in fondo:
   lo spazio in più finisce tra i due, così le righe restano allineate tra le card */
.featured-entries > .sticky-entry > a {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: #393939;
}

.featured-entries .sticky-entry img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: filter .3s ease;
}

/* hover: solo illuminazione, niente zoom (lo scale(1.1) di style.css tagliava l'immagine) */
.featured-entries .sticky-entry:hover img {
    transform: none;
    filter: brightness(1.12);
}

.featured-entries .sticky_title_bottom {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    flex: 1;
    max-height: none;
    padding: 10px 14px 12px;
    text-align: left;
}

.sticky-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    order: 2;
    margin-top: auto;
    padding-top: 8px;
    font-family: 'Oswald', sans-serif;
    font-size: 13px;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: #bbb;
}

.sticky-meta-vote {
    padding: 1px 7px;
    background-color: var(--ag-yellow);
    color: #393939;
}

.featured-entries .sticky_title_bottom h3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    margin: 0;
    transition: color .15s ease;
}

.featured-entries .sticky-entry:hover .sticky_title_bottom h3 {
    color: var(--ag-yellow);
}

.responsive.slider .slick-slide {
    padding: 0 4px;
}

/* hover: stessa illuminazione delle in evidenza */
.responsive.slider .slick-slide img {
    transition: filter .3s ease;
}

.responsive.slider .slick-slide:hover img,
.responsive.slider .slick-slide:focus-visible img {
    filter: brightness(1.12);
}


/* --- lista post (template-parts/content.php in home, archivi, ricerca): stesso stile della lista news --- */

#main > .entry-global:has(.index-post-left, .index-post-right-nothumb) {
    padding: 14px 0;
    border-bottom: 1px solid #e6e6e6;
}

.entry-content:has(> .index-post-left) {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

/* il clearfix ::before/::after di style.css in flex diventava un elemento vuoto + gap (18px di rientro) */
.entry-content:has(> .index-post-left)::before,
.entry-content:has(> .index-post-left)::after {
    display: none;
}

.entry-content > .index-post-left {
    flex: none;
    width: 42%;
    max-width: 320px;
    height: auto;
    margin: 0;
    float: none;
}

.index-post-left img {
    display: block;
    width: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: filter .3s ease;
}

.entry-global:hover .index-post-left img {
    filter: brightness(1.12);
}

.entry-content > .index-post-right {
    flex: 1;
    min-width: 0;
    margin: 0;
    padding: 0;
}

.index-post-right .entry-title-home a,
.index-post-right-nothumb .entry-title-home a {
    transition: color .15s ease;
}

.entry-global:hover .entry-title-home a {
    color: #c99400;
}

/* riga meta più leggera: linea sottile al posto di quella scura da 2px */
.index-post-right .entry-meta,
.index-post-right-nothumb .entry-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    margin: 6px 0 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e6e6e6;
}

/* anteprima su 3 righe intere */
.index-post-right > p,
.index-post-right-nothumb > p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    margin-bottom: 8px;
    text-align: left;
}

.index-post-right .entry-footer,
.index-post-right-nothumb .entry-footer {
    float: none !important;
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
    height: auto;
    line-height: 1;
}

/* "Leggi tutto" e freccia sulla stessa linea: niente padding verticale sul link né spostamento della freccia */
.index-post-right .entry-footer a,
.index-post-right-nothumb .entry-footer a {
    padding: 0;
    line-height: 1;
}

.index-post-right .entry-footer .arrowicon,
.index-post-right-nothumb .entry-footer .arrowicon {
    display: inline-flex;
    top: 0 !important;
    margin-left: 0;
    line-height: 1;
}

/* freccia sottile "→" dello stesso colore del testo al posto del chevron giallo */
.index-post-right .entry-footer .arrowicon i,
.index-post-right-nothumb .entry-footer .arrowicon i {
    display: none;
}

.index-post-right .entry-footer .arrowicon::after,
.index-post-right-nothumb .entry-footer .arrowicon::after {
    content: "\2192";
    color: #393939;
    font-size: 14px;
    line-height: 1;
}

.index-post-right .entry-footer .arrowicon,
.index-post-right-nothumb .entry-footer .arrowicon {
    transition: transform .2s ease;
}

.entry-global:hover .entry-footer .arrowicon {
    margin-left: 0;
    transform: translateX(3px);
}

@media (max-width: 767px) {
    .entry-content:has(> .index-post-left) {
        flex-direction: column;
        gap: 12px;
    }

    .entry-content > .index-post-left {
        width: 100%;
        max-width: none;
    }
}

/* slider dei video confronti e ultime news: fasce con sfondo leggero ed etichetta, per staccarle dagli in evidenza */
.home-slider-box,
.news-box {
    margin-bottom: 22px;
    padding: 14px;
    background-color: #f2f2f2;
}

/* ogni slide ha 6px di margine + 4px di padding per lato: -10px allinea le copertine al titolo e ai bordi della fascia */
.home-slider-box .responsive.slider {
    width: calc(100% + 20px);
    margin-left: -10px;
    margin-bottom: 0 !important;
}

/* la barretta visibile dei pallini (3px) è centrata in un'area cliccabile da 16px: con 8px di padding
   sotto e 6px sopra, a vista restano ~14px come sugli altri lati della fascia */
.home-slider-box {
    padding-bottom: 8px;
}

.home-slider-box .responsive.slider .slick-dots {
    margin-top: 6px;
}

.home-slider-title,
.news-box .news-title {
    width: auto;
    margin-bottom: 12px;
    padding: 0 0 0 8px;
    border-left: 3px solid var(--ag-yellow);
    background: none;
    color: #393939;
    font-family: 'Oswald', sans-serif;
    font-size: 14px;
    letter-spacing: .5px;
    line-height: 1.2;
    text-transform: uppercase;
}

/* le righe delle news partono già con 14px di padding sopra */
.news-box .news-title {
    margin-bottom: 0;
}

.news-box .news-container {
    margin-bottom: 0;
}

.news-box .news-item {
    border-bottom-color: #e0e0e0;
}

/* titolo sotto ogni copertina: le copertine dicono poco su cosa si confronta */
.home-slider-item-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    margin-top: 6px;
    color: #393939;
    font-family: 'museo_slab500', sans-serif;
    font-size: 14px;
    line-height: 1.3;
    transition: color .15s ease;
}

.responsive.slider .slick-slide:hover .home-slider-item-title {
    color: #c99400;
}

/* lo slider aveva margin-bottom 35px (stile inline in content-homeslider.php) per far posto ai pallini in assoluto:
   ora i segmenti stanno nel flusso, basta poco spazio prima di "Ultime news" */
.responsive.slider {
    margin-bottom: 14px !important;
}

/* pallini dello slider in home: segmenti orizzontali sotto lo slider (prima pallini da 6px in assoluto
   che finivano sulla barra "Ultime news"); area cliccabile 28x16px */
.responsive.slider .slick-dots {
    position: static;
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 12px 0 0;
    padding: 0;
}

.responsive.slider .slick-dots li {
    width: auto;
    height: auto;
    margin: 0;
}

.responsive.slider .slick-dots li::before {
    display: none;
}

.responsive.slider .slick-dots li button {
    position: relative;
    width: 28px;
    height: 16px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    cursor: pointer;
}

.responsive.slider .slick-dots li button::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    width: auto;
    height: 3px;
    margin-top: -1.5px;
    background: #e6e6e6;
    opacity: 1;
    transition: background-color .15s ease;
}

.responsive.slider .slick-dots li button:hover::before,
.responsive.slider .slick-dots li button:focus-visible::before {
    background: #999;
}

.responsive.slider .slick-dots li.slick-active button::before {
    background: #393939;
}

/* --- sidebar: top 10 (ag-topten), preferiti (ag-top-gadgets), articoli recenti --- */

/* scuro del sito: sempre #393939 (style.css usava #404040 e nero) */
.widget-title {
    background-color: #393939;
    color: #393939;
}

.search-form,
.search-form .search-field,
.search-form .search-field::placeholder {
    color: #393939;
}

/* linea sotto il cerca della sidebar: 1px come i bordi dei bottoni della scheda tecnica (style.css: 2px !important) */
#secondary .search-form {
    border-bottom: 1px solid #393939 !important;
}

/* spazio netto tra un widget e l'altro */
#secondary .widget:has(> .widget-title) {
    margin-bottom: 28px;
}

/* tab come controllo segmentato (stesso stile dei bottoni Scheda tecnica / Recensione):
   celle bordate #393939, testo scuro, attiva piena #393939 con testo bianco */
.tabPanel-widget > h2,
.tabPanel-widget2 > h2,
.tabPanel-widget > label,
.tabPanel-widget2 > label {
    box-sizing: border-box;
}

/* tab attaccate al titolo scuro */
.widget-title:has(+ .tabPanel-widget, + .tabPanel-widget2) {
    margin-bottom: 0;
}

.tabPanel-widget,
.tabPanel-widget2 {
    margin-top: 0;
    background: #fff;
}

.tabPanel-widget > h2,
.tabPanel-widget2 > h2 {
    background: #fff !important;
    color: #393939;
    border-right: 1px solid #393939;
    border-bottom: 1px solid #393939;
    transition: background-color .15s ease, color .15s ease;
}

.tabPanel-widget > h2:first-of-type,
.tabPanel-widget2 > h2:first-of-type {
    border-left: 1px solid #393939;
}

.tabPanel-widget > label:hover + input + h2,
.tabPanel-widget2 > label:hover + h2 {
    background: #f6f6f6 !important;
}

.tabPanel-widget input[type="radio"]:checked + h2,
.tabPanel-widget2 input[type="radio"]:checked + label + h2 {
    background: #393939 !important;
    color: #fff;
}

.tabPanel-widget input[type="radio"]:checked + h2::after,
.tabPanel-widget2 h2::after {
    display: none !important;
}

.tabPanel-widget > div,
.tabPanel-widget2 > div {
    background: #fff;
}

.tabPanel-widget input:checked + h2 + div,
.tabPanel-widget2 input:checked + label + h2 + div {
    padding: 12px 0 0 !important;
}

/* righe: immagine | nome | voto, divise da linee sottili */
.top10-list {
    margin: 0;
    padding: 0;
}

.top10-list li {
    margin: 0 !important;
    padding: 0 !important;
    border-bottom: 1px solid #e6e6e6;
    transition: background-color .15s ease;
}

.top10-list li:last-child {
    border-bottom: 0;
}

.top10-list li:hover {
    background-color: var(--ag-surface);
}

.top10-list li > a {
    display: block;
    padding: 9px 12px;
}

.top10-list li > a > div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.top10-img {
    display: flex;
    justify-content: center;
    flex: none;
    width: 50px;
}

.top10-name,
.top10-nameg {
    position: static !important;
    flex: 1;
    min-width: 0;
    max-width: none !important;
    margin: 0;
    padding: 0;
    transform: none !important;
    color: #393939;
    transition: color .15s ease;
}

.top10-list li:hover .top10-name,
.top10-list li:hover .top10-nameg {
    color: #c99400;
}

/* numeri: quadrato con bordo #393939 come i bottoni segmentati, cifre a larghezza fissa;
   in hover sulla riga si riempie di scuro con numero giallo */
.top10-score {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    float: none;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid #393939;
    background-color: #fff !important;
    color: #393939;
    font-size: 13px !important;
    font-variant-numeric: tabular-nums;
    transition: background-color .15s ease, color .15s ease;
}

.top10-list li:hover .top10-score {
    background-color: #393939 !important;
    color: #fab900;
}

/* --- popup "Confronta smartphone" (plugin ag-compare): header scuro come le sezioni, righe come le top 10,
   footer con due bottoni segmentati (Confronta = azione principale in giallo) --- */
#compare-box {
    /* ag-compare.css usa bottom: -27px per compensare il vecchio padding: senza, il footer finiva fuori schermo */
    bottom: 0;
    width: 340px;
    padding: 0;
    border: 1px solid #393939;
    box-shadow: 0 6px 24px rgba(57, 57, 57, .25);
}

#compare-box .cmp-box-title {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    padding: 10px 12px;
    background-color: #393939;
    cursor: pointer;
}

#compare-box .cmp-box-title span {
    padding: 0;
    color: #fff;
}

#compare-box .cmp-chevron,
#compare-box .cmp-chevron i {
    position: static;
    color: #fab900;
}

#compare-body {
    margin: 0;
    padding: 0;
}

#compare-box #compare-list {
    padding: 0;
}

#compare-box li {
    margin: 0;
    padding: 9px 12px;
    border-bottom: 1px solid #e6e6e6;
    font-weight: 400;
}

#compare-box li.no-smart {
    padding: 14px 12px !important;
    color: #999;
}

/* il riquadro di ag-compare.js riusa .top10-img/.top10-name: riga in flex come nelle top 10,
   altrimenti il nome finisce sotto la foto */
#compare-box li > div {
    display: flex;
    align-items: center;
    gap: 12px;
}

#compare-box li > div > a {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

#compare-box li > div > a:hover .top10-name {
    color: #c99400;
}

#compare-box .cmp-minus {
    display: flex;
    flex: none;
    float: none;
    width: 28px;
    height: 28px;
    margin-left: auto;
    padding: 0;
    border: 1px solid #e6e6e6;
    transition: background-color .15s ease, border-color .15s ease;
}

#compare-box .cmp-minus a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #393939;
}

#compare-box .cmp-minus:hover {
    border-color: #393939;
    background: #393939;
}

#compare-box .cmp-minus:hover a {
    color: #fab900;
}

#compare-box .cmp-footer {
    float: none;
    padding: 12px;
    border-top: 0;
}

#compare-box #compara {
    display: flex;
    border: 1px solid #393939;
}

#compare-box #addaltro,
#compare-box #confronta {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    width: auto;
    padding: 8px 10px;
    border: 0;
    font-family: 'Oswald', sans-serif;
    letter-spacing: .5px;
    text-transform: uppercase;
    transition: background-color .15s ease, color .15s ease;
}

#compare-box #addaltro {
    color: #393939;
    background: #fff;
}

#compare-box #addaltro:hover {
    background: #f6f6f6;
}

#compare-box #confronta {
    border-left: 1px solid #393939;
    color: #393939;
    background: #fab900;
}

#compare-box #confronta:hover {
    color: #fab900;
    background: #393939;
}

#compare-box #aggiungi-altro {
    padding-top: 8px;
    color: #999;
    font-size: 12px;
    text-align: center;
}

/* articoli recenti (markup da functions.php): miniatura 16:9 | titolo + data */
.widget_recent_entries .ag-recent {
    margin: 0;
    padding: 0;
}

.widget_recent_entries .ag-recent li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-left: 0 !important;
    padding: 10px 12px;
    font-weight: 400;
}

/* niente chevron di style.css */
.widget_recent_entries .ag-recent li::before {
    display: none;
}

.ag-recent-thumb {
    flex: none;
    width: 84px;
}

.ag-recent-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: filter .3s ease;
}

.ag-recent li:hover .ag-recent-thumb img {
    filter: brightness(1.12);
}

.ag-recent-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ag-recent-body a {
    color: #393939;
    font-weight: 600;
    line-height: 1.35;
    transition: color .15s ease;
}

.ag-recent li:hover .ag-recent-body a {
    color: #c99400;
}

.ag-recent .post-date {
    margin-top: 3px;
    color: #999;
    font-family: 'Oswald', sans-serif;
    font-size: 12px;
    letter-spacing: .5px;
    text-transform: uppercase;
}

/* --- pagina articolo: solo la struttura intorno al testo, testo e font invariati --- */

/* zona titolo: titolo a tutta larghezza (lo spazio a destra era per i bottoni share),
   riga meta con tag da "disegno tecnico" e linea sottile */
.single .entry-header .title-large {
    width: 100%;
    margin-bottom: 12px;
    line-height: 1.2;
}

.single .entry-header .entry-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    margin: 0 0 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid #393939;
}

:is(.single .entry-header, .index-post-right, .index-post-right-nothumb) .cat-group {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
}

:is(.single .entry-header, .index-post-right, .index-post-right-nothumb) .cat-links {
    display: inline-flex;
    margin: 0;
}

:is(.single .entry-header, .index-post-right, .index-post-right-nothumb) .cat-links a,
:is(.single .entry-header, .index-post-right, .index-post-right-nothumb) .cat-icon {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border: 1px solid #393939;
    font-family: 'Oswald', sans-serif;
    font-size: 12px !important;
    font-weight: 400;
    letter-spacing: .5px;
    line-height: 1.4;
    text-transform: uppercase;
    transition: background-color .15s ease, color .15s ease;
}

:is(.single .entry-header, .index-post-right, .index-post-right-nothumb) .cat-links a {
    background: transparent;
    color: #393939;
}

:is(.single .entry-header, .index-post-right, .index-post-right-nothumb) .cat-links a:hover {
    background: #393939;
    color: #fff;
}

/* tipo (recensione): icona gialla su scuro attaccata al tag */
:is(.single .entry-header, .index-post-right, .index-post-right-nothumb) .cat-icon {
    padding: 3px 7px;
    border-right: 0;
    background: #393939;
    color: #fab900;
}

:is(.single .entry-header, .index-post-right, .index-post-right-nothumb) :is(.posted-on, .posted-on a, .comments-link, .comments-link a) {
    margin: 0;
    color: #999;
    font-family: 'Oswald', sans-serif;
    font-size: 12px;
    letter-spacing: .5px;
    text-transform: uppercase;
}

/* video in testa: 16:9 esatto (prima 60%, con bande nere) */
.video-wrapper {
    height: auto;
    padding-bottom: 0;
    aspect-ratio: 16 / 9;
    background: #393939;
}

/* scheda tecnica: griglia di celle divise da linee sottili */
.specs {
    display: flex;
    /* foto del telefono centrata in verticale rispetto alla griglia */
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.specs-img {
    float: none;
    flex: none;
    width: 18%;
    padding-top: 0;
    text-align: center;
}

.specs-box {
    float: none;
    flex: 1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    width: auto;
    min-height: 0;
    padding: 0;
    border: 1px solid #e6e6e6;
    background-color: #e6e6e6;
}

.specs-box .specs-item {
    display: block;
    /* style-reviews.css forza 20%/45% !important nelle media query */
    width: auto !important;
    /* altezza fissa + overflow nascosto di style-reviews.css tagliavano il testo: la griglia
       allunga ogni cella all'altezza della riga */
    height: auto !important;
    overflow: visible;
    margin: 0;
    padding: 12px;
    background: #fff;
    text-align: left;
}

.specs-item i {
    color: #fab900;
}

.datasheet-link {
    flex-basis: 100%;
}

/* barrette a fianco delle sezioni della recensione: linea da 1px con segmento giallo
   in alto che segna l'inizio della sezione (testo e rientro invariati) */
#summary .summary-item {
    position: relative;
    border-left: 1px solid #e6e6e6;
}

#summary .summary-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: -2px;
    width: 3px;
    height: 24px;
    background: #fab900;
}

/* voti: etichetta e valore sulla stessa riga, barra sottile sotto; voto finale separato da una linea */
#marks {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: baseline;
    column-gap: 12px;
}

#marks .marks-bar-empty {
    grid-column: 1 / -1;
    height: 6px;
    margin: 4px 0 14px;
}

#marks .marks-bar {
    height: 6px;
    margin: 0;
}

/* voto finale: valore nel badge giallo come "VOTO 8.8" delle card in home, barra scura */
#marks h3:last-of-type,
#marks span:last-of-type {
    margin-top: 10px;
}

#marks span:last-of-type {
    padding: 1px 8px;
    background-color: #fab900;
}

#marks .marks-bar-empty:last-of-type .marks-bar {
    background-color: #393939;
}

/* correlati e commenti: header scuro come le sezioni della sidebar */
.related-post-head,
.comment-reply-title {
    width: auto;
    margin: 0 0 16px;
    padding: 10px 12px;
    border: 0;
    background: #393939;
    color: #fff;
    text-align: left;
    font-family: 'Oswald', sans-serif;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: .5px;
    text-transform: uppercase;
}

.box_related_posts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.box_related_posts .related-post-head {
    grid-column: 1 / -1;
    margin-bottom: 0;
}

.box_related_posts .related-post {
    float: none;
    width: auto;
    height: auto;
    padding: 0;
    border: 0;
    text-align: left;
}

.related-post-thumb {
    padding-bottom: 0;
}

.related-post-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: filter .3s ease;
}

.related-post:hover .related-post-thumb img {
    filter: brightness(1.12);
}

.related-post-title {
    padding-top: 8px;
    text-align: left;
}

.related-post:hover > .related-post-title a {
    color: #c99400 !important;
}

.comment-form textarea,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
    border: 1px solid #e6e6e6;
    transition: border-color .15s ease;
}

.comment-form textarea:focus,
.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus {
    border-color: #393939;
    outline: none;
}

.comment-form input[type="submit"] {
    padding: 10px 18px;
    border: 0;
    background: #393939;
    color: #fff;
    font-family: 'Oswald', sans-serif;
    letter-spacing: .5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}

.comment-form input[type="submit"]:hover {
    background: #fab900;
    color: #393939;
}

@media (max-width: 767px) {
    .specs-img {
        width: 100%;
    }

    .specs-box {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .box_related_posts {
        grid-template-columns: 1fr;
    }
}

/* articoli recenti: titolo troncato con "…" su 2 righe */
.ag-recent-body a {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

/* ricerca: titoli di sezione come barre scure (come header dei widget e "Ultime news") */
.search .page-header {
    margin: 0;
    padding: 0;
    border: 0;
}

.search .page-header .page-title {
    margin: 24px 0 0;
    padding: 10px 12px;
    background: #393939;
    color: #fff;
    font-family: 'Oswald', sans-serif;
    font-size: 15px;
    font-weight: 400;
    letter-spacing: .5px;
    text-transform: uppercase;
}

.search #main > .page-header:first-child .page-title {
    margin-top: 0;
}

/* ricerca: box delle schede tecniche in griglia a celle con linee sottili */
.datasheet-container-search {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    margin-top: 16px;
    border: 1px solid #e6e6e6;
    background: #e6e6e6;
}

.datasheet-container-search > article {
    margin: 0;
    padding: 0;
    background: #fff;
}

.datasheet-container-search .datasheet-block {
    display: flex;
    flex-direction: column;
    width: auto;
    height: 100%;
    margin: 0;
    border: 0;
    transition: box-shadow .15s ease;
}

.datasheet-container-search .datasheet-block-img {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 170px;
    padding: 14px;
    /* bianco: alcune foto hanno lo sfondo bianco incorporato */
    background: #fff;
}

.datasheet-container-search .datasheet-block-img img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    margin: 0;
    padding: 0;
    object-fit: contain;
    transition: filter .3s ease;
}

.datasheet-container-search .datasheet-block-nome {
    float: none;
    flex: 1;
    width: auto;
    height: auto;
    padding: 10px 12px;
    /* fascia gialla come in origine, ma testo scuro (più leggibile del bianco) */
    background: #fab900;
    color: #393939;
    text-align: left;
    transition: background-color .15s ease, color .15s ease;
}

.datasheet-container-search .datasheet-block:hover > .datasheet-block-nome {
    background: #393939;
    color: #fab900;
}

.datasheet-container-search .datasheet-block:hover img {
    filter: brightness(1.05);
}

@media (max-width: 767px) {
    .datasheet-container-search {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ricerca: link "Vedi tutte le N schede tecniche" sotto le prime 8 (search.php) */
.datasheet-search-more {
    margin: 12px 0 28px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e6e6e6;
    text-align: right;
    font-family: 'Oswald', sans-serif;
    letter-spacing: .5px;
    text-transform: uppercase;
}

.datasheet-search-more a {
    color: #393939;
}

.datasheet-search-more i {
    margin-left: 4px;
    color: #fab900;
    font-size: 12px !important;
}

/* --- pagina scheda tecnica (single-schede-tecniche) e comparatore (page-comparephones): stesso linguaggio di articoli e sidebar --- */

/* bottoni Scheda tecnica / Recensione / Confronta: controllo segmentato squadrato, staccato da titolo e data */
:is(.single-schede-tecniche, .page-template-page-comparephones) .nav-datasheet {
    margin: 16px 0 22px;
    padding-top: 0;
}

:is(.single-schede-tecniche, .page-template-page-comparephones) .nav-datasheet ul {
    display: inline-flex;
    margin: 0;
    border: 1px solid #393939;
}

:is(.single-schede-tecniche, .page-template-page-comparephones) .nav-datasheet li {
    margin: 0;
    padding: 0;
    background: #fff;
    transition: background-color .15s ease;
}

:is(.single-schede-tecniche, .page-template-page-comparephones) .nav-datasheet li + li {
    border-left: 1px solid #393939;
}

:is(.single-schede-tecniche, .page-template-page-comparephones) .nav-datasheet li:last-child {
    margin-left: 0;
}

:is(.single-schede-tecniche, .page-template-page-comparephones) .nav-datasheet li a {
    display: block;
    padding: 8px 18px;
    color: #393939;
    letter-spacing: .5px;
}

:is(.single-schede-tecniche, .page-template-page-comparephones) .nav-datasheet li:hover {
    background: #f6f6f6;
}

:is(.single-schede-tecniche, .page-template-page-comparephones) .nav-datasheet li.active {
    background: #393939;
}

:is(.single-schede-tecniche, .page-template-page-comparephones) .nav-datasheet li.active a {
    color: #fff;
}

/* data di uscita */
:is(.single-schede-tecniche, .page-template-page-comparephones) .date-datasheet {
    color: #999;
    letter-spacing: .5px;
}

:is(.single-schede-tecniche, .page-template-page-comparephones) .date-datasheet .date-number {
    color: #393939;
}

/* voti: come nelle recensioni, barra sottile e voto finale nel badge giallo con barra scura */
:is(.single-schede-tecniche, .page-template-page-comparephones) .marks-datasheet-id {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-bottom: 0;
}

:is(.single-schede-tecniche, .page-template-page-comparephones) .marks-datasheet-id h3 {
    margin: 0;
}

:is(.single-schede-tecniche, .page-template-page-comparephones) .marks-bar-empty-datasheet,
:is(.single-schede-tecniche, .page-template-page-comparephones) .marks-bar-datasheet {
    height: 6px;
    margin: 4px 0 12px;
}

:is(.single-schede-tecniche, .page-template-page-comparephones) .marks-bar-datasheet {
    margin: 0;
}

/* il penultimo figlio è l'etichetta del voto finale (l'ultimo è la sua barra) */
:is(.single-schede-tecniche, .page-template-page-comparephones) #marks-datasheet .marks-datasheet-id:nth-last-child(2) span {
    padding: 1px 8px;
    background-color: #fab900;
}

:is(.single-schede-tecniche, .page-template-page-comparephones) #marks-datasheet .marks-bar-empty-datasheet:last-of-type .marks-bar-datasheet {
    background-color: #393939;
}

/* titoli Pro / Giudizio: barre scure come le sezioni della sidebar */
:is(.single-schede-tecniche, .page-template-page-comparephones) .datasheet-left-area.title,
:is(.single-schede-tecniche, .page-template-page-comparephones) .datasheet-left-area .title {
    margin: 16px 0 10px;
    padding: 8px 12px;
    background-color: #393939;
    color: #fff;
    text-align: left;
    font-size: 14px;
    letter-spacing: .5px;
}

:is(.single-schede-tecniche, .page-template-page-comparephones) .pros-datasheet-item {
    padding-top: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e6e6e6;
}

:is(.single-schede-tecniche, .page-template-page-comparephones) .pros-datasheet-item:last-child {
    border-bottom: 0;
}

/* tabelle specifiche: barra scura attaccata a una tabella a celle con linee sottili */
:is(.single-schede-tecniche, .page-template-page-comparephones) .datasheet-table-title {
    /* stessa larghezza della tabella (style-datasheet.css la allarga al 130%) */
    display: block;
    box-sizing: border-box;
    width: 130%;
    margin: 24px 0 0;
    padding: 8px 12px;
    background: #393939;
    color: #fff;
    font-family: 'Oswald', sans-serif;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: .5px;
    text-transform: uppercase;
}

/* sotto i 1024px style-datasheet.css porta la tabella al 100%: il titolo la segue */
@media screen and (max-width: 1024px) {
    :is(.single-schede-tecniche, .page-template-page-comparephones) .datasheet-table-title {
        width: 100%;
    }
}

:is(.single-schede-tecniche, .page-template-page-comparephones) .datasheet-table {
    border: 1px solid #e6e6e6;
    border-top: 0;
}

:is(.single-schede-tecniche, .page-template-page-comparephones) .dt-row + .dt-row {
    border-top: 1px solid #e6e6e6;
}

:is(.single-schede-tecniche, .page-template-page-comparephones) .dt-row > .dt-left {
    padding: 8px 12px;
    background: #f6f6f6 !important;
    color: #393939;
    text-align: left;
    border-right: 1px solid #e6e6e6;
}

:is(.single-schede-tecniche, .page-template-page-comparephones) .dt-row > .dt-right {
    padding: 8px 12px;
    background: #fff !important;
    border-bottom: 0;
}

/* comparatore: titolo sezione a tutta larghezza (qui è uno span dentro .lower-part) */
.page-template-page-comparephones .datasheet-table-title {
    float: none;
    width: 100%;
}

/* comparatore: l'etichetta della riga va sopra i valori (prima era in assoluto fuori dalla tabella e
   sotto i 1550px compariva solo in hover); i valori restano allineati alle colonne dei telefoni */
.page-template-page-comparephones .specs-block {
    float: none;
    margin-bottom: 30px;
    border: 1px solid #e6e6e6;
    border-top: 0;
}

.page-template-page-comparephones .specs-row {
    display: flex;
    flex-wrap: wrap;
    float: none;
    background: #fff !important;
}

.page-template-page-comparephones .specs-row + .specs-row {
    border-top: 1px solid #e6e6e6;
}

.page-template-page-comparephones .specs-row > .label-col {
    position: static;
    flex: 0 0 100%;
    width: auto;
    margin: 0;
    padding: 8px 12px 2px;
    background: transparent !important;
    color: #999 !important;
    font-size: 11px;
    letter-spacing: .5px;
    text-align: left;
    display: block;
}

.page-template-page-comparephones .specs-row > .label-col::before {
    display: none;
}

.page-template-page-comparephones .specs-row > .specs-col {
    flex: 1 1 0;
    min-width: 0;
    padding: 2px 12px 8px;
    background: transparent !important;
    border-right: 0;
}

.page-template-page-comparephones .specs-row > .specs-col + .specs-col {
    border-left: 1px solid #e6e6e6;
}

/* --- pagina elenco schede tecniche (page-datasheet.php) --- */

/* intestazione pagina: titolo, sottotitolo grigio e linea da 1px come nella zona titolo degli articoli */
.page-template-page-datasheet .entry-header {
    margin: 0 0 24px;
    padding: 20px 0 14px;
    border-bottom: 1px solid #393939;
}

.page-template-page-datasheet .entry-header .entry-title {
    width: 100%;
    margin: 0;
    padding: 0;
    line-height: 1.2;
}

.page-template-page-datasheet .ds-page-subtitle {
    margin: 6px 0 0;
    color: #999;
    font-family: 'Oswald', sans-serif;
    font-size: 13px;
    letter-spacing: .5px;
    text-transform: uppercase;
}

.page-template-page-datasheet .ds-container-left {
    margin-top: 0;
}

/* titoli di sezione: barre scure come in ricerca */
.page-template-page-datasheet .ds-container-title {
    margin: 0 0 16px !important;
    padding: 10px 12px;
    background: #393939;
    color: #fff;
    text-align: left;
    font-size: 15px;
    letter-spacing: .5px;
}

/* card dei telefoni: nome in testa, poi foto | 4 specifiche a celle | bottoni; altezza libera (prima 130px fissi
   con overflow nascosto: la foto veniva tagliata) */
.page-template-page-datasheet .title-dslargebox {
    padding: 10px 12px;
    border: 1px solid #e6e6e6;
    border-bottom: 0;
    background: #fff;
    font-size: 15px;
    letter-spacing: .5px;
    transition: color .15s ease;
}

.page-template-page-datasheet a:hover > .title-dslargebox {
    color: #c99400;
}

.page-template-page-datasheet .dslargebox {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr) 150px;
    align-items: stretch;
    height: auto;
    margin-bottom: 20px;
    padding: 0;
    overflow: visible;
    border: 1px solid #e6e6e6;
}

.page-template-page-datasheet .dslargebox > a {
    grid-column: 1;
    grid-row: 1;
    display: flex;
}

.page-template-page-datasheet .dslargebox-img {
    float: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px;
}

.page-template-page-datasheet .dslargebox-img img {
    display: block;
    max-width: 100%;
    max-height: 140px;
    object-fit: contain;
}

.page-template-page-datasheet .dslargebox-box {
    grid-column: 2;
    grid-row: 1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    float: none;
    width: auto;
    min-height: 0;
    padding: 0;
    border-left: 1px solid #e6e6e6;
    border-right: 1px solid #e6e6e6;
    background: #e6e6e6;
}

.page-template-page-datasheet .dslargebox-item {
    display: block;
    width: auto;
    height: auto;
    margin: 0;
    padding: 12px;
    background: #fff;
}

.page-template-page-datasheet .dslargebox-item i {
    color: #fab900;
}

/* icone delle specifiche (elenco schede, recensioni, embed): stessa misura ovunque, staccate dal titolo */
.dslargebox-item > .ph,
.specs-item > .ph {
    display: block;
    margin-bottom: 6px;
    font-size: 20px;
}

.page-template-page-datasheet .dslargebox-act {
    grid-column: 3;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    float: none;
    width: auto;
    min-height: 0;
    padding: 0;
}

/* tre bottoni a filo dei bordi della card: si dividono l'altezza della colonna, separati da linee sottili;
   Scopri (prezzi) = azione principale in giallo */
.page-template-page-datasheet .dslargebox-act > * {
    display: flex;
    flex: 1;
    border: 0;
}

.page-template-page-datasheet .dslargebox-act > * + * {
    border-top: 1px solid #e6e6e6;
}

.page-template-page-datasheet .dslargebox-price {
    display: flex;
    flex: 1;
    /* style-datasheet.css: margin-bottom 5px lasciava una striscia bianca sotto il giallo */
    margin: 0;
    align-items: center;
    justify-content: center;
    height: auto;
    padding: 7px 10px;
    border: 0;
    background-color: #fff;
    color: #393939;
    font-size: 13px;
    letter-spacing: .5px;
    transition: background-color .15s ease, color .15s ease;
}

.page-template-page-datasheet .dslargebox-act > *:first-child .dslargebox-price {
    background-color: #fab900;
}

.page-template-page-datasheet .dslargebox-act a:hover .dslargebox-price,
.page-template-page-datasheet .dslargebox-act > *:first-child:hover .dslargebox-price {
    background-color: #393939;
    color: #fab900;
}

/* naviga per marca (page-datasheet.php): le 8 marche con più schede in card, le altre in indice A–Z */
.ds-brands {
    margin-top: 24px;
}

.ds-brands-top {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 0 1px 1px 0;
}

.ds-brand-card {
    display: flex;
    flex-direction: column;
    margin: 0 -1px -1px 0;
    padding: 12px;
    border: 1px solid #e6e6e6;
    background: #fff;
}

.ds-brand-img {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 110px;
    margin-bottom: 10px;
}

.ds-brand-img img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: filter .3s ease;
}

.ds-brand-name {
    color: #393939;
    font-family: 'Oswald', sans-serif;
    font-size: 15px;
    letter-spacing: .5px;
    text-transform: uppercase;
    transition: color .15s ease;
}

.ds-brand-count {
    color: #999;
    font-family: 'Oswald', sans-serif;
    font-size: 12px;
    letter-spacing: .5px;
    text-transform: uppercase;
    font-variant-numeric: tabular-nums;
}

.ds-brand-card:hover .ds-brand-name,
.ds-brands-index a:hover span:first-child {
    color: #c99400;
}

.ds-brand-card:hover img {
    filter: brightness(1.08);
}

.ds-brands-index {
    margin-top: 24px;
}

.ds-brands-index-title {
    display: block;
    padding-bottom: 8px;
    border-bottom: 1px solid #393939;
    color: #393939;
    font-family: 'Oswald', sans-serif;
    font-size: 14px;
    letter-spacing: .5px;
    text-transform: uppercase;
}

/* indice in 3 colonne "da giornale": ogni lettera (quadrato con bordo, come i numeri delle top 10)
   con le sue marche sotto, senza spezzarsi tra due colonne */
.ds-brands-index {
    column-count: 3;
    column-gap: 32px;
}

.ds-brands-index-title {
    column-span: all;
    margin-bottom: 4px;
}

.ds-brands-letter {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #e6e6e6;
    break-inside: avoid;
}

.ds-brands-letter-head {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid #393939;
    color: #393939;
    font-family: 'Oswald', sans-serif;
    font-size: 14px;
}

.ds-brands-letter ul {
    display: block;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ds-brands-letter li {
    margin: 0;
    padding: 0;
}

.ds-brands-letter li::before {
    display: none;
}

.ds-brands-letter a {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 5px 0;
    color: #393939;
}

.ds-brands-letter a span:first-child {
    transition: color .15s ease;
}

@media (max-width: 767px) {
    .ds-brands-top {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ds-brands-index {
        column-count: 2;
    }

    .page-template-page-datasheet .dslargebox {
        grid-template-columns: 100px minmax(0, 1fr);
    }

    .page-template-page-datasheet .dslargebox-box {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        border-right: 0;
    }

    .page-template-page-datasheet .dslargebox-act {
        grid-column: 1 / -1;
        grid-row: 2;
        flex-direction: row;
        border-top: 1px solid #e6e6e6;
    }

    .page-template-page-datasheet .dslargebox-act > * {
        flex: 1;
    }

    .page-template-page-datasheet .dslargebox-act > * + * {
        border-top: 0;
        border-left: 1px solid #e6e6e6;
    }
}

/* --- footer: blocco scuro unico (menu + copyright), accento giallo in alto, voci separate da linee sottili --- */
.site-footer {
    margin: 0;
    padding: 18px 20px 14px;
    background: #393939;
    border-top: 3px solid #fab900;
}

.site-footer .footer-row {
    margin: 0;
    text-align: left;
}

.site-footer .menu-footer-container ul {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

.site-footer .menu-footer-container ul li {
    display: block;
    margin: 0;
    padding: 0;
}

.site-footer .menu-footer-container ul li + li {
    border-left: 1px solid rgba(255, 255, 255, .15);
}

.site-footer .menu-footer-container ul li a {
    display: block;
    margin: 0;
    padding: 2px 14px;
    color: #fff;
    letter-spacing: .5px;
    transition: color .15s ease;
}

.site-footer .menu-footer-container ul li:first-child a {
    padding-left: 0;
}

/* 120px sotto: a fine pagina il banner sticky in basso copre solo il fondo scuro, non il testo */
.copyrights {
    margin: 0;
    padding: 12px 20px 120px;
    border-top: 1px solid rgba(255, 255, 255, .12);
    background: #393939;
    color: #999;
    font-family: 'Oswald', sans-serif;
    font-size: 11px;
    line-height: 1.7;
    letter-spacing: .5px;
    text-align: left;
    text-transform: uppercase;
}

/* --- mobile --- */

/* menu hamburger: pannello a tutta larghezza sotto la barra (prima colonna stretta attaccata a destra)
   con sottomenu chiusi che si aprono col bottone accanto alla voce */
.sub-toggle {
    display: none;
}

@media screen and (max-width: 1000px) {
    .main-navigation.toggled .nav-menu {
        top: 100%;
        left: 0;
        right: 0;
        width: auto;
        max-height: calc(100vh - 120px);
        margin-top: 0;
        overflow-y: auto;
        border-top: 1px solid #4d4d4d;
        box-shadow: 0 10px 24px rgba(0, 0, 0, .25);
    }

    .main-navigation.toggled li {
        position: relative;
        border-bottom: 1px solid #4d4d4d;
    }

    .main-navigation.toggled li li:last-child {
        border-bottom: 0;
    }

    .main-navigation.toggled li a {
        padding: 14px 64px 14px 20px;
    }

    .main-navigation.toggled li li a {
        padding-left: 36px;
    }

    .main-navigation.toggled li li li a {
        padding-left: 52px;
    }

    /* :not(.sub-open) per battere ".main-navigation ul li:hover > ul" di style.css: su touch l'hover resta dopo il tap */
    .main-navigation.toggled li:not(.sub-open) > ul {
        display: none;
    }

    .main-navigation.toggled li.sub-open > ul {
        display: block;
    }

    .main-navigation.toggled .sub-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 0;
        right: 0;
        width: 56px;
        height: 47px;
        padding: 0;
        border: 0;
        border-left: 1px solid #4d4d4d;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        color: #fff;
    }

    .main-navigation.toggled .sub-toggle::before {
        content: "";
        width: 8px;
        height: 8px;
        border-right: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
        transform: translateY(-2px) rotate(45deg);
        transition: transform .2s ease;
    }

    .main-navigation.toggled li.sub-open > .sub-toggle::before {
        transform: translateY(2px) rotate(-135deg);
    }

    /* pannello ricerca: stessa posizione e stile del menu, campo grande (16px: niente zoom automatico su iOS) */
    .search-box-mobile {
        top: 100%;
        left: 0;
        right: 0;
        width: auto;
        margin-top: 0;
        padding: 14px 16px 16px;
        border-top: 1px solid #4d4d4d;
        border-bottom: 0;
        background-color: #393939;
        box-shadow: 0 10px 24px rgba(0, 0, 0, .25);
        z-index: 10;
    }

    .search-box-mobile .search-form {
        position: relative;
        max-width: none;
        border: 0 !important;
    }

    .search-box-mobile .search-form:before {
        top: 50%;
        left: 14px;
        z-index: 1;
        margin-top: 0 !important;
        transform: translateY(-50%);
        color: #999 !important;
        font-size: 16px !important;
    }

    .search-box-mobile .search-field {
        display: block;
        box-sizing: border-box;
        width: 100%;
        height: 48px;
        margin: 0;
        padding: 0 14px 0 42px !important;
        border: 0;
        background-color: #fff;
        color: #393939;
        font-size: 16px;
    }
}


@media (max-width: 767px) {
    .featured-entries {
        grid-template-columns: 1fr;
    }

    /* target touch di almeno 44px */
    .main-navigation button,
    .menu-toggle,
    .search-toggle,
    .calendar-toggle {
        min-width: 44px;
        min-height: 44px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }

    /* ticker fermo: le notizie si scorrono a mano */
    .tophead-lastnews .lastnews-item {
        overflow-x: auto;
    }
}
