/*
Template:       neeon
Theme Name:     Neeon Child Theme
Theme URI:      http://radiustheme.com/demo/wordpress/themes/neeon
Author:         RadiusTheme
Author URI:     http://radiustheme.com
Description:    Neeon is a Responsive News, Blog & Magazine WordPress Theme.
Version:        1.1.0
Text Domain:    neeon-child
Tags: theme-options, featured-images, post-formats, one-column, two-columns, right-sidebar, custom-background, custom-header, editor-style, sticky-post, threaded-comments, translation-ready
License:        Envato split License
License URI:    https://themeforest.net/licenses/terms/regular
*/

/* ==========================================================================
   1. UTILITY E SCREEN READER
   ========================================================================== */

.screen-reader-text,
.skip-link.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    -webkit-clip-path: inset(50%);
    clip-path: inset(50%);
    height: 1px;
    width: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    word-wrap: normal !important;
}

/* Skip link visibile on focus */
.screen-reader-text:focus,
.skip-link.screen-reader-text:focus,
.skip-link.screen-reader-text:active {
    -webkit-clip-path: none;
    clip-path: none;
    background-color: #000000 !important;
    color: #ffffff !important;
    display: block;
    height: auto !important;
    left: 20px !important;
    line-height: 1.4;
    padding: 12px 16px !important;
    top: 20px !important;
    width: auto !important;
    overflow: visible !important;
    z-index: 100001 !important;
    text-decoration: none !important;
    border-radius: 4px !important;
    outline: 3px solid #ffffff !important;
    outline-offset: 2px !important;
}

.header__switch .screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    -webkit-clip-path: inset(50%);
    clip-path: inset(50%);
    height: 1px;
    width: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    word-wrap: normal !important;
}

//* ==========================================================================
   2. FOCUS VISIBILE E IDENTIFICAZIONE LINK (SC 1.4.1, SC 2.4.7)
   ========================================================================== */

/* Forza il focus visibile elencando i tag in modo che MAUVE++ li legga esplicitamente */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus,
[tabindex]:focus,
[role="button"]:focus,
[role="switch"]:focus {
    outline: 4px solid #2962ff !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 4px rgba(41, 98, 255, 0.5) !important;
    background-color: transparent;
}

/* Sottolineatura obbligatoria per identificare i link testuali */
p a,
li a,
.entry-content a,
.site-content a:not(.elementor-button),
.site-footer a {
    text-decoration: underline !important;
    text-underline-offset: 3px;
    text-decoration-thickness: 1.5px;
}

/* Rimuove sottolineatura dove non serve (bottoni, menu principali, titoli) */
.site-header .main-navigation a,
.button-style-1, .button-style-2, .button-style-3, .button-style-4,
.search-icon a,
.tophead-social li a,
.mobile-top-bar .mobile-social li a,
.footer-social li a,
.entry-title a,
.rt-button-cap,
.post-terms a {
    text-decoration: none !important;
}

.site-header .main-navigation a:hover,
.site-header .main-navigation a:focus {
    text-decoration: underline !important;
}


/* ==========================================================================
   3. SPAZIATURA, TIPOGRAFIA E DIMENSIONI (SC 1.4.12, 1.4.4)
   ========================================================================== */

/* Forza spaziature flessibili (Tech C21 globale) */
body *,
body, p, li, a, h1, h2, h3, h4, h5, h6, span {
    line-height: 1.5 !important; /* Valore WCAG sicuro */
    letter-spacing: 0.05em;
}

/* Assicura che i contenitori non abbiano altezze fisse rigide (Tech C28) */
.elementor-widget-container,
.e-con-inner {
    height: auto !important;
    min-height: min-content !important;
}

/* Target cliccabili minimi 44px, convertiti in em flessibili */
.tophead-social li a,
.mobile-top-bar .mobile-social li a,
.footer-social li a,
.header__switch__label,
.header__switch_settings,
.header__switch__dark,
.search-icon a,
.sidebarBtn,
.widget-cerca .e-search-submit {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 2.75em !important;
    min-height: 2.75em !important;
    height: auto !important;
}

.sidebarBtn {
    cursor: pointer;
}

/* Switch Dark Mode Accessibile */
.header__switch__label {
    width: 2.75em !important;
    height: auto !important;
    min-height: 2.75em !important;
    position: relative;
    cursor: pointer;
}

.header__switch__main {
    position: absolute;
    background: #0034c2;
    width: 100%;
    height: auto !important;
    min-height: 100%;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    cursor: pointer;
    transition: all 0.4s ease;
}

.header__switch__input:focus + .header__switch__main,
.header__switch__label:focus-within .header__switch__main {
    outline: 3px solid #2962ff !important;
    outline-offset: 3px;
}


/* ==========================================================================
   4. CONTRASTO COLORI (SC 1.4.3) E NOMI ACCESSIBILI (SC 2.5.3)
   ========================================================================== */

.title-animation-black-normal a{
    font-weight: 600;
}

/* Switch: forza contrasto icone */
.header__switch__settings i,
.header__switch__dark i {
    color: #ffffff !important;
}

/* Metadati scuri su sfondo garantito chiaro per MAUVE++ */
.entry-meta,
.entry-meta li,
.entry-meta li a,
.post-date,
.post-author a,
.post-comment a,
.breadcrumb-area .entry-breadcrumb span a,
.breadcrumb-trail ul.trail-items li a,
.breadcrumb-trail ul.trail-items li,
.entry-meta i,
.post-date i {
    color: #111111 !important; /* Nero forte */
}

/* Titoli bianchi sulle immagini: aggiungiamo uno sfondo nero in RGBa
   in modo che MAUVE++ calcoli un contrasto esatto > 4.5:1 */
.rt-post-slider-default .entry-title a,
.rt-post-overlay-default .entry-title a,
.elementor-element-9247f7e .rt-post-list-default .rt-item .entry-title a,
.elementor-element-768ae4c .rt-post-list-default .rt-item .entry-title a,
.elementor-element-c51ef07 .rt-post-list-default .rt-item .entry-title a {
    color: #ffffff !important;
    background-color: rgba(0, 0, 0, 0.7) !important; /* Sfondo scuro approvato dal validatore */
    padding: 2px 5px !important;
    display: inline;
}

.home .rt-post-overlay-default .rt-item .rt-image > a:first-of-type::after {
    background-color: #000000 !important;
    opacity: 0.5 !important;
}

/* Categorie: Colore blu scuro su sfondo bianco forzato */
.post-terms a span.category-style,
.rt-post-tab-default .post-cat-tab a {
    color: #ffffff !important;
    background-color: #002E7A !important;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 4px;
}

.category .entry-banner .entry-banner-content h1{
    font-size: 38px;
    font-weight: 700;
    color: #002E7A;
}

.category .title-animation-black-bold a{
    background: none !important;
    background-color: transparent !important;
    font-weight: 600 !important;
}

.elementor-element-b3d2f0c .rt-post-tab-default .post-cat-tab a{
    color: #111111 !important;
    background-color: transparent !important;
}

.elementor-element-b3d2f0c .rt-post-tab-default .post-cat-tab a.current{
    color: #ffffff !important;
    background-color: #2962ff !important;
}

.category .blog-img.normal{
    text-align: center;
}

/* Social: Assicura che se c'è un titolo nel link, sia prioritario per lo screen reader */
.footer-social li a[title]::before {
    content: attr(title);
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================================================
   5. COMPORTAMENTI MENU E ANIMAZIONI
   ========================================================================== */

/* Menu: apertura anche con tastiera */
.main-navigation ul li.menu-item-has-children:focus-within > ul.sub-menu,
.main-navigation ul li.menu-item-has-children:hover > ul.sub-menu {
    display: block;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.mean-container .mean-nav ul li:focus-within > ul {
    display: block;
}

/* Riduzione animazioni per utenti sensibili */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}


/* ==========================================================================
   6. FIX COMPONENTI E LAYOUT SPECIFICI
   ========================================================================== */

/* Form ricerca visibile nell'header */
.header-tools-with-search {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-search-inline {
    min-width: 280px;
}

.header-search-inline .search-form,
.header-search-inline .custom-search-input {
    margin: 0;
}

.header-search-inline .input-group {
    display: flex;
    align-items: stretch;
    flex-wrap: nowrap;
}

.header-search-inline .search-query.form-control {
    min-width: 220px;
    height: 42px;
    border: 1px solid #d1d5db;
    border-right: 0;
    border-radius: 6px 0 0 6px;
    padding: 0 14px;
    box-shadow: none;
}

.header-search-inline .input-group-btn {
    display: flex;
}

.header-search-inline .input-group-btn .btn {
    height: 42px;
    min-width: 46px;
    border: 1px solid #d1d5db;
    border-left: 0;
    border-radius: 0 6px 6px 0;
    background: #2962ff;
    color: #ffffff;
}

.header-search-inline .input-group-btn .btn:hover,
.header-search-inline .input-group-btn .btn:focus {
    background: #0034c2;
    color: #ffffff;
}

/* Moduli di ricerca generale (risoluzione altezze fisse) */
.widget-cerca .e-search-form {
    max-height: none;
}

.widget-cerca .e-search-input {
    min-height: 44px !important;
    height: 44px !important;
    padding-top: 0.4em !important;
    padding-bottom: 0.4em !important;
    line-height: 1.4 !important;
}

.widget-cerca .e-search-submit {
    min-height: 44px !important;
    height: 44px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Fix Colonne Bug Elementor */
#homeSidebarDX {
    display: block;
}

#homeSidebarDX .col-lg-6 {
    width: 100% !important;
}

.fixCol60 > .elementor-container > .elementor-col-66 {
    width: 100%;
}

/* Slider Notizie */
#slider-notizie {
    overflow: hidden;
}

/* Blocco Notizie e Immagini Home */
.blocco-notizie .rt-post-tab-style1 .rt-item-list {
    display: block;
}

.blocco-notizie .rt-post-tab-style1 .rt-item-list .rt-image {
    width: 100%;
    margin-bottom: 15px;
}

.blocco-notizie .rt-post-tab-style1 .rt-item-list .entry-content {
    padding: 0 15px;
}

.blocco-notizie .rt-ajax-tab-content .col-xl-3,
.blocco-notizie .rt-ajax-tab-content .col-lg-3,
.blocco-notizie .rt-ajax-tab-content .col-md-6 {
    display: flex;
}

.blocco-notizie .rt-ajax-tab-content .rt-item {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blocco-notizie .rt-ajax-tab-content .rt-image {
    height: 180px;
    overflow: hidden;
}

.blocco-notizie .rt-ajax-tab-content .rt-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.home .rt-swiper-slider .swiper-wrapper {
    display: flex;
}

.home .rt-swiper-slider .swiper-slide {
    height: auto;
    display: flex;
}

.home .rt-swiper-slider .rt-item {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    margin-bottom: 0;
}

.home .rt-swiper-slider .entry-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.home .rt-swiper-slider .entry-meta {
    margin-top: auto;
}

.home .rt-swiper-slider .rt-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    max-height: 600px;
    object-fit: cover;
    display: block;
}

.home .box-primo-piano.rt-post-slider-default .rt-swiper-slider {
    display: flex;
}

.home .footer-content-area {
    padding: 50px 0 0 0;
}

/* Commenti nascosti */
#comments {
    display: none;
}

/*CANALE YOUTUBE*/
.yt-grid-accessibile {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding: 10px 0;
}
.yt-video-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}
.yt-thumbnail-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* Rapporto 16:9 */
    background-color: #000;
    overflow: hidden;
    border-radius: 8px;
}
.yt-thumbnail-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.yt-video-card:hover .yt-thumbnail-wrapper img {
    transform: scale(1.05);
}
.yt-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 40px;
    color: #fff;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 50%;
    opacity: 0.8;
    transition: opacity 0.3s;
}
.yt-video-card:hover .yt-play-icon {
    opacity: 1;
}
.yt-video-title {
    font-size: 16px;
    margin-top: 10px;
    line-height: 1.4;
    font-weight: 600;
}
.yt-video-card button.yt-play-trigger {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    text-align: left;
    font-family: inherit;
    cursor: pointer;
    display: block;
    width: 100%;
    color: inherit;
}
.yt-video-card button.yt-play-trigger:focus {
    outline: 2px solid #0073aa; /* Evidenziazione per chi naviga con la tastiera */
}

/*MULTIMEDIA*/
.elementor-12606 .elementor-element.elementor-element-555eb89 h3>a, .elementor-12606 .elementor-element.elementor-element-8a7319b h3>a{
    background-color: transparent !important;
    background: none !important;
}

/* ==========================================================================
   7. MEDIA QUERIES (MOBILE E TABLET)
   ========================================================================== */

@media (max-width: 1199px) {
    .header-search-inline {
        min-width: 220px;
    }

    .header-search-inline .search-query.form-control {
        min-width: 160px;
    }
}

@media (max-width: 991px) {
    .header-search-inline {
        display: none;
    }

    .mobile-top-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        background-color: #2363ae;
    }

    .mobile-top-bar .mobile-top,
    .mobile-top-bar .mobile-social {
        display: flex;
        align-items: center;
    }

    .mobile-top-bar .fa-calendar-alt,
    .mobile-top-bar .info-text,
    .mobile-top-bar .mobile-social li a,
    .mobile-top-bar .mobile-social li a i {
        color: #ffffff !important;
    }

    .mobile-top-bar .mobile-social li a {
        background-color: #2363ae;
        padding: 10px;
    }

    .mobile-top-bar .mobile-social li a:hover,
    .mobile-top-bar .mobile-social li a:focus,
    .mobile-top-bar .mobile-social li a:focus-visible {
        text-decoration: underline;
    }
}

/* Focus interno per i widget per evitare che venga tagliato da overflow:hidden */
.rt-post-grid-default .rt-item a:focus,
.rt-post-slider-default .rt-item a:focus,
.rt-post-tab-default .rt-item a:focus,
.elementor-widget-container a:focus {
    outline: 3px solid #000000 !important;
    outline-offset: -3px !important; /* Offset NEGATIVO: sposta il bordo dentro l'immagine */
    box-shadow: inset 0 0 0 3px #ffffff !important; /* Bordo bianco interno per contrasto */
    display: block;
}

/* Rimuove i residui grafici dei titoli vuoti segnalati */
.section-title .related-title .titledot,
.section-title .related-title .titleline {
    display: none !important;
}

/* Neutralizza gli span decorativi per i validatori e gli screen reader */
.titledot,
.titleline {
    display: none !important;
    visibility: hidden !important;
    speak: none !important; /* Dice agli screen reader di ignorarli */
}

/* Assicura che il titolo H2 rimanga leggibile e pulito */
h2.entry-title,
h2.related-title {
    overflow: visible !important;
    height: auto !important;
}

/* =============================================================
   OTTIMIZZAZIONE FILTRI CATEGORIE (POST TAB) - 100% WIDTH
   ============================================================= */

/* Rende il contenitore dei filtri un blocco a tutta larghezza */
.section-title.rt_ajax_tab_section .post-cat-tab {
    display: flex !important;
    flex-wrap: wrap !important; /* Permette ai link di andare a capo su mobile */
    width: 100% !important;
    gap: 5px; /* Spazio tra i bottoni */
    margin-top: 10px;
}

/* Rende i singoli link larghi al 100% (o distribuiti equamente) */
.section-title.rt_ajax_tab_section .post-cat-tab a {
    flex: 1 1 auto !important; /* Si allungano per coprire lo spazio disponibile */
    display: flex !important;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 44px !important; /* Altezza minima a norma PA per il tocco */
    padding: 10px 20px !important;
    background-color: #f1f1f1; /* Colore di fondo neutro per i link non attivi */
    color: #111 !important;
    text-decoration: none !important;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
}

/* Stato Attivo (Categoria selezionata) */
.section-title.rt_ajax_tab_section .post-cat-tab a.current {
    background-color: #2962ff !important; /* Blu istituzionale */
    color: #ffffff !important;
}

/* Hover e Focus (per tastiera) */
.section-title.rt_ajax_tab_section .post-cat-tab a:hover,
.section-title.rt_ajax_tab_section .post-cat-tab a:focus {
    background-color: #0034c2 !important;
    color: #ffffff !important;
    outline: 3px solid #000 !important;
    outline-offset: 2px;
}

/* Fix per Mobile: se vuoi che su cellulare siano uno sotto l'altro (100% reale) */
@media (max-width: 767px) {
    .section-title.rt_ajax_tab_section .post-cat-tab a {
        flex: 1 1 100% !important; /* Forza ogni link su una riga nuova */
        width: 100% !important;
    }
}

/* ==========================================================================
   APPLICAZIONE META BIANCHI A TUTTI I BLOCCHI INDICATI (ELEMENTOR IDs)
   ========================================================================== */

/* Selettore cumulativo per gli ID che hai indicato */
.elementor-element-9247f7e .entry-meta,
.elementor-element-768ae4c .entry-meta,
.elementor-element-2bc49c8 .entry-meta,
.elementor-element-c51ef07 .entry-meta,
.elementor-element-9247f7e .entry-meta a,
.elementor-element-768ae4c .entry-meta a,
.elementor-element-2bc49c8 .entry-meta a,
.elementor-element-c51ef07 .entry-meta a,
.elementor-element-9247f7e .entry-meta i,
.elementor-element-768ae4c .entry-meta i,
.elementor-element-2bc49c8 .entry-meta i,
.elementor-element-c51ef07 .entry-meta i,
#slider-notizie .entry-meta i,
    /* Selettori universali per i widget in overlay di Neeon */
.rt-post-overlay-default .entry-meta,
.rt-post-overlay-default .entry-meta li,
.rt-post-overlay-default .entry-meta li a,
.rt-post-overlay-default .entry-meta li i {
    color: #ffffff !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7) !important; /* Protezione per immagini chiare */
}

/* Assicura che il prefisso "by" e la data siano bianchi */
.elementor-element-9247f7e .post-author,
.elementor-element-9247f7e .post-author a,
.elementor-element-c51ef07 .post-author,
.elementor-element-c51ef07 .post-author a,
.elementor-element-9247f7e .post-date,
.elementor-element-9247f7e .post-date a,
.elementor-element-768ae4c .post-date,
.elementor-element-768ae4c .post-date a,
.elementor-element-2bc49c8 .post-author,
.elementor-element-2bc49c8 .post-author a,
.elementor-element-2bc49c8 .post-date,
.elementor-element-2bc49c8 .post-date a,
.elementor-element-c51ef07 .post-date,
.elementor-element-c51ef07 .post-date a,
#slider-notizie .post-date,
#slider-notizie .post-author,
#slider-notizie .post-author a {
    color: #ffffff !important;
}

/* Hover sui link degli autori nei blocchi indicati */
.elementor-element-9247f7e .entry-meta li a:hover,
.elementor-element-768ae4c .entry-meta li a:hover,
.elementor-element-2bc49c8 .entry-meta li a:hover,
.elementor-element-c51ef07 .entry-meta li a:hover {
    color: #cccccc !important;
    text-decoration: underline !important;
}

/* Skip link visibile on focus con sottolineatura obbligatoria per MAUVE++ */
.screen-reader-text:focus,
.skip-link.screen-reader-text:focus,
.skip-link.screen-reader-text:active {
    -webkit-clip-path: none;
    clip-path: none;
    background-color: #000000 !important;
    color: #ffffff !important;
    display: block;
    height: auto !important;
    left: 20px !important;
    line-height: 1.4;
    padding: 12px 16px !important;
    top: 20px !important;
    width: auto !important;
    overflow: visible !important;
    z-index: 100001 !important;

    /* MODIFICA QUI: Forza la sottolineatura per superare il criterio F73 */
    text-decoration: underline !important;
    text-underline-offset: 3px !important;
    text-decoration-thickness: 2px !important;

    border-radius: 4px !important;
    outline: 3px solid #ffffff !important;
    outline-offset: 2px !important;
}

/* ==========================================================================
   FIX FOCUS ICONE SOCIAL (SC 2.4.7)
   ========================================================================== */

/* Forza il focus ad alto contrasto sui link dei social network */
.tophead-social li a:focus,
.mobile-top-bar .mobile-social li a:focus,
.footer-social li a:focus,
.rt-social-icons a:focus,
.social-profile a:focus {
    outline: 3px solid #000000 !important;
    outline-offset: 2px !important;
    background-color: #ffff00 !important; /* Giallo PA */
    border-radius: 4px !important; /* Evita che il focus venga tagliato dai cerchi */
    overflow: visible !important;
    display: inline-flex !important; /* Dà spazio fisico all'outline */
    box-shadow: none !important;
}

/* Assicura che l'icona interna diventi nera per contrastare col giallo */
.tophead-social li a:focus i,
.mobile-top-bar .mobile-social li a:focus i,
.footer-social li a:focus i,
.rt-social-icons a:focus i,
.social-profile a:focus i {
    color: #000000 !important;
}

/* ==========================================================================
   FIX FOCUS SUL LOGO PRINCIPALE (SC 2.4.7)
   ========================================================================== */

.site-branding a:focus,
.dark-logo:focus,
.light-logo:focus,
.mobile-logo:focus {
    outline: 4px solid #000000 !important;
    outline-offset: 4px !important;
    background-color: transparent !important;
    box-shadow: 0 0 0 8px #ffff00 !important; /* Doppio bordo Giallo/Nero */
    display: inline-block !important; /* Necessario per far applicare il bordo alle immagini */
    border-radius: 4px;
}

/* ==========================================================================
   FIX ACCESSIBILITA' SOTTOMENU E VOCI MENU (SC 1.4.4, 1.4.5, 2.4.7)
   ========================================================================== */

/* FIX C12: Forza le unità relative (rem) invece dei pixel per tutto il menu */
html body #site-navigation .menu-item a,
html body .main-navigation ul li a,
html body .main-navigation ul.sub-menu li a,
html body .mean-container .mean-nav ul li a {
    font-size: 1rem !important; /* 1rem equivale alla grandezza di base del browser, al posto dei px */
    line-height: 1.5 !important;
}

/* FIX F78/G195: Focus "inattaccabile" sui menu, con offset interno per non essere tagliato */
html body #site-navigation .menu-item a:focus,
html body #site-navigation .menu-item a:focus-visible,
html body .main-navigation ul li a:focus,
html body .main-navigation ul.sub-menu li a:focus,
html body .mean-container .mean-nav ul li a:focus {
    outline: 3px solid #000000 !important;
    outline-offset: -3px !important; /* OFFSET NEGATIVO: sposta il bordo DENTRO il link così non viene tagliato! */
    background-color: #ffff00 !important; /* Giallo PA */
    color: #000000 !important;
    box-shadow: inset 0 0 0 2px #ffffff !important; /* Bordino bianco interno per maggiore stacco */
    display: block !important;
    text-decoration: underline !important;
}

/* Gestione corretta dell'apertura del sottomenu con la tastiera */
html body .main-navigation ul li:focus-within > ul.sub-menu {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* ==========================================================================
   FIX FOCUS ICONA RICERCA (SC 2.4.7)
   ========================================================================== */

html body .search-icon a:focus {
    outline: 4px solid #000000 !important;
    outline-offset: 4px !important;
    background-color: #ffff00 !important; /* Sfondo Giallo PA */
    box-shadow: 0 0 0 4px #ffffff !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 4px !important; /* Smussa gli angoli per non tagliare il focus */
    overflow: visible !important;
}

/* ==========================================================================
   FIX BLOCCO CONSIGLIO REGIONALE HOME
   ========================================================================== */
.home .elementor-element-bef3c00.consiglio-regionale h3.single-title:hover>a{
    color: #ffffff !important;
}
.home .elementor-element-bef3c00.consiglio-regionale h3.small-title>a{
    background-color: transparent !important;
    background: none;
    color: #000000 !important;
}
.home .elementor-element-bef3c00.consiglio-regionale .rt-post-overlay-default .col-xl-5 ul.entry-meta>li, .home .elementor-element-bef3c00.consiglio-regionale .rt-post-overlay-default .col-xl-5 ul.entry-meta>li>a{
    color: #000 !important;
    text-shadow: none !important;
}

/* ==========================================================================
   FIX BLOCCO SIDEBAR HOME
   ========================================================================== */

/* 1. Distanzia i blocchi articolo SOLO per questo specifico widget */
.elementor-element-9247f7e .rt-post-list-default .rt-item .post-read-more {
    margin-bottom: 25px; /* Regola questo valore per aumentare o diminuire lo spazio */
}

/* Rimuove lo spazio extra sotto l'ultimo articolo */
.elementor-element-9247f7e .list-five-loadmore-items > div:last-child .rt-item .post-read-more{
    margin-bottom: 0;
}

/* 2. Risolve il problema del padding e dell'interlinea sul titolo */
.elementor-element-9247f7e .rt-post-list-default .entry-title a {
    line-height: 1.6 !important;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

/* Margine extra sotto il titolo per staccarlo dall'estratto */
.elementor-element-9247f7e .rt-post-list-default .entry-title {
    margin-bottom: 15px;
}

/* Fa diventare nera l'icona interna quando riceve il focus (per contrastare col giallo) */
html body .search-icon a:focus svg {
    color: #000000 !important;
    fill: #000000 !important;
}

@media (max-width: 767px) {
    .home .rt-swiper-slider .rt-image img {
        aspect-ratio: 4 / 3;
    }
}