/*
Theme Name: Deverso BS5
Theme URI: https://example.com
Author: Deverso
Author URI: https://example.com
Description: Tema a template e widget (Model-View-Config) con Bootstrap 5.3, configurabile da Customizer e pannello Deverso.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.1
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: theme-bs5-deverso
Tags: bootstrap, bootstrap5, responsive, custom-menu, custom-logo, featured-images, translation-ready, accessibility-ready
*/

/* ==========================================================================
   Token del tema
   Header, footer e widget usano SOLO queste variabili: per adattare il tema
   a una nuova grafica si cambiano i valori qui (palette, font, misure).
   Valori predefiniti neutri, coppie testo/fondo con contrasto WCAG AA.
   ========================================================================== */
:root {
    /* Colori di marca */
    --website-primary: #103C1A;          /* Green Village: verde scuro (12.6:1 su bianco) */
    --website-primary-dark: #2E4A0D;     /* hover di primary (come --etg-primary-dark del tema precedente) */
    --website-secondary: #1D6D2F;
    --website-accent: #f093fb;

    /* Fondi */
    --website-white: #ffffff;
    --website-bkg-white: #ffffff;
    --website-bkg-light: #F5FCF7;        /* sezioni alternate */
    --website-bkg-body: #ffffff;

    /* Testi e bordi */
    --website-color-txt-title: #333333;  /* 12.6:1 su bianco */
    --website-color-txt-body: #151A1D;   /* 17:1 su bianco */
    --website-color-txt-muted: #5a6474;  /* 5.9:1 su bianco, 5.4:1 su bkg-light */
    --website-border-color: #d2d8df;

    /* Header */
    --website-bkg-header: #ffffff;
    --website-color-txt-header: #1a202c;

    /* Footer */
    --website-bkg-footer: #1a202c;
    --website-color-title-footer: #ffffff;  /* 16:1 su bkg-footer */
    --website-color-txt-footer: #EAEAEA;

    /* Font: file locali in assets/font (accodati in initFrontendScriptsAndStyles, functions.php) */
    --website-font-heading: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    --website-font-body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;

    /* Misure */
    --website-header-height: 80px;
    --website-container-full-max-width: 2400px;  /* larghezza massima della pagina */
    --website-container-max-width: 1100px;       /* .container */
    --website-box-max-width: 800px;              /* colonne di testo */
    --website-padding-top-bottom: 60px;          /* spazio verticale delle sezioni */
    --website-padding-top-bottom-mobile: 40px;

    /* Focus visibile (WCAG 2.4.7): anello doppio, leggibile su fondi chiari e scuri */
    --website-focus-color: var(--website-primary);
    --website-focus-ring: 0 0 0 2px var(--website-white), 0 0 0 4px var(--website-focus-color);
}

/* ==========================================================================
   Variabili del tema precedente (theme-bs5-deverso-etg), usate dai widget del sito:
   alias dei token, così un solo valore governa entrambi
   ========================================================================== */
:root {
    --etg-primary: var(--website-primary);
    --etg-primary-old: #2E4A0D;
    --etg-primary-light: #4E6A2D;
    --etg-primary-dark: var(--website-primary-dark);
    --etg-secondary-old: #4B7715;
    --etg-secondary: var(--website-secondary);
    --etg-secondary-dark: #0D5D1F;
    --etg-accent: var(--website-accent);
    --etg-bkg-light-old: #FAFEF6;
    --etg-bkg-light: var(--website-bkg-light);
    --etg-bkg-white: var(--website-bkg-white);
    --etg-color-txt-title: var(--website-color-txt-title);
    --etg-color-txt-body: var(--website-color-txt-body);
    --etg-color-txt-footer: var(--website-color-txt-footer);
    --etg-padding-top-bottom-mini: 32px;
    --etg-padding-top-bottom: var(--website-padding-top-bottom);
    --etg-padding-top-bottom-mobile: var(--website-padding-top-bottom-mobile);
    --etg-container-max-width: var(--website-container-full-max-width);
    --etg-container-stadard: var(--website-container-max-width);
    --etg-accordion-btn-focus-box-shadow: 0 0 0 0.25rem rgba(137, 106, 67, 0.25);
}

/* ==========================================================================
   Base
   ========================================================================== */
body {
    font-family: var(--website-font-body);
    font-size: 1rem;              /* testo base: mai sotto 1rem */
    line-height: 1.5;
    color: var(--website-color-txt-body);
    background-color: var(--website-bkg-body);
    max-width: var(--website-container-full-max-width);
    margin: 0 auto;
    overflow-x: hidden;
}

/* overflow-x:hidden sul body crea un contenitore di scroll che, sui browser mobile
   (Safari iOS in primis), rompe position:sticky dell'header. clip taglia lo sforamento
   orizzontale senza creare scroll container. */
@supports (overflow-x: clip) {
    body {
        overflow-x: clip;
    }
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--website-font-heading);
    color: var(--website-color-txt-title);
    line-height: 1.2;
    margin: 0 0 .5em;
}

a {
    color: var(--website-primary);
    text-underline-offset: .15em;
    transition: color .2s ease;
}

a:hover {
    color: var(--website-primary-dark);
}

/* Placeholder dei campi: #6b7280 = contrasto 4.8:1 su bianco (WCAG AA).
   Copre anche .form-control di Bootstrap; opacity 1 perché Firefox lo schiarisce di default. */
::placeholder,
.form-control::placeholder {
    color: #6b7280;
    opacity: 1;
}

.container {
    max-width: var(--website-container-max-width);
}

/* Fondo di header/main scelto dai widget header-class|v01 e body-class|v01 */
main#primary.bkgGrey,
header#website-header.bkgGrey {
    background-color: var(--website-bkg-light);
}

main#primary.bkgWhite,
header#website-header.bkgWhite {
    background-color: var(--website-bkg-white);
}

/* Tabelle nei contenuti */
table {
    border-collapse: collapse;
    width: 100%;
    margin: 10px 0 20px;
    border: 1px solid var(--website-border-color);
}

table th,
table td {
    padding: 8px;
    border: 1px solid var(--website-border-color);
}

table th {
    text-align: left;
    background: var(--website-bkg-light);
}

/* ==========================================================================
   Testi comuni dei widget
   ========================================================================== */
.website-title {
    font-family: var(--website-font-heading);
    color: var(--website-color-txt-title);
    font-size: 2.5rem;
    line-height: 1.2;
    font-weight: 600;
    overflow-wrap: break-word;
}

.website-subtitle {
    font-family: var(--website-font-heading);
    color: var(--website-color-txt-muted);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: .05em;
}

.website-text,
.website-content {
    color: var(--website-color-txt-body);
    font-size: 1.125rem;
    line-height: 1.6;
}

.website-content {
    margin: 16px 0;
}

/* Parti di testo evidenziate con #parola# (funzione wrapHashTags) */
.website-text-emphasis {
    color: var(--website-primary);
}

@media (max-width: 767px) {
    .website-title {
        font-size: 1.75rem;
    }
}

/* ==========================================================================
   Accessibilità
   ========================================================================== */

/* Focus visibile su tutto ciò che riceve il focus da tastiera */
:focus-visible {
    outline: 3px solid var(--website-focus-color);
    outline-offset: 2px;
}

/* Testo solo per screen reader (alias di .visually-hidden di Bootstrap) */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Skip link ("Vai al contenuto principale"): visibile quando riceve il focus */
.visually-hidden-focusable:focus,
.visually-hidden-focusable:focus-within {
    position: fixed !important;
    top: 10px;
    left: 10px;
    z-index: 3000;
    width: auto !important;
    height: auto !important;
    padding: 10px 20px !important;
    margin: 0 !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: normal !important;
    background: var(--website-primary);
    color: var(--website-white);
    text-decoration: none;
    border-radius: 4px;
    box-shadow: var(--website-focus-ring);
}

@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;
    }
}

/* ==========================================================================
   Bottoni
   .btnStyle1 = bottone principale (default per <button> e <a> con aspetto da bottone)
   .btnStyle2 = bottone alternativo (pieno, colore secondario)
   Contrasto AA in tutti gli stati; focus con --website-focus-ring.
   ========================================================================== */
.btnStyle1,
.btnStyle2 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    width: fit-content;
    min-height: 44px;             /* area di tocco (WCAG 2.5.8) */
    padding: 10px 28px;
    font-family: var(--website-font-body);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.btnStyle1 {
    background-color: var(--website-primary);
    border-color: var(--website-primary);
    color: var(--website-white);
}

.btnStyle1:hover {
    background-color: var(--website-primary-dark);
    border-color: var(--website-primary-dark);
    color: var(--website-white);
}

.btnStyle2 {
    background-color: var(--website-white);
    border-color: var(--website-primary);
    color: var(--website-primary);
}

.btnStyle2:hover {
    background-color: var(--website-primary);
    border-color: var(--website-primary);
    color: var(--website-white);
}

.btnStyle1:focus-visible,
.btnStyle2:focus-visible {
    outline: none;
    box-shadow: var(--website-focus-ring);
}

.btnStyle1:disabled,
.btnStyle1[aria-disabled="true"],
.btnStyle2:disabled,
.btnStyle2[aria-disabled="true"] {
    background-color: #e2e6ea;
    border-color: #e2e6ea;
    color: #4a5568;               /* 6.2:1 sul fondo disabilitato */
    cursor: not-allowed;
}

.btnStyle1 svg,
.btnStyle2 svg {
    flex: none;
    fill: currentColor;
}

/* ==========================================================================
   Framework Deverso
   ========================================================================== */

/* Overlay di caricamento (Customizer → SETUP: Minify Js & Css → White Overlay), rimosso da theme.js */
body > div.deversoOverlayLoadingPage {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--website-white);
}

body > div.deversoOverlayLoadingPage img,
body > div.deversoOverlayLoadingPage svg {
    max-width: 200px;
    height: auto;
    opacity: .1;
}

/* Campo multilingua senza traduzione (solo con WP_DEBUG, vedi DeversoWidget::getMultilingualThemeMod) */
.withoutTranslation {
    background-color: #ffff00 !important;
    color: #000000 !important;
}

/* Output di "npm run minify" lanciato dal reset cache (?resetDeversoCache=1) */
.shellOutput {
    width: min(1200px, 100% - 2rem);
    max-height: 400px;
    margin: 20px auto;
    padding: 20px;
    overflow: auto;
    border-radius: 10px;
    background-color: #000;
    color: #fff;
}

.shellOutput code {
    color: #fff;
    font-size: .875rem;
    white-space: nowrap;
}

/* Evidenziazione dei widget nell'anteprima del Customizer / pannello Deverso */
.highlightWidgetBorder {
    border: 3px dashed #EE6440CC !important;
}

/* Widget in modifica (anteprima DT / Editor Live): con lo script assets/js/deverso-highlight-tracer.js
   attivo (classe dvs-tracer-on su <html>) l'evidenziazione è un cursore che percorre il perimetro,
   in un overlay esterno al widget. Senza script: outline. */
html:not(.dvs-tracer-on) .highlightWidget {
    outline: 5px dashed #EE6440CC !important;
    outline-offset: -3px !important;
}

.dvs-tracer {
    position: absolute;
    z-index: 99989; /* sotto le icone dell'Editor Live (99990) */
    pointer-events: none;
}

.dvs-tracer-svg {
    display: block;
    overflow: visible;
}

.dvs-tracer-base {
    fill: none;
    stroke: #EE6440;
    stroke-opacity: .35;
    stroke-width: 1.5;
    stroke-dasharray: 6 6;
}

.dvs-tracer-run {
    fill: none;
    stroke: #EE6440;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 4px rgba(238, 100, 64, .85));
}

@media (prefers-reduced-motion: reduce) {
    .dvs-tracer-run { display: none; }
    .dvs-tracer-base { stroke-opacity: .9; stroke-width: 3; }
}

.blurWidget {
    filter: blur(5px) !important;
}

/* Avvisi di WPML in ambienti di sviluppo e selettore lingue automatico nel footer */
body .otgs-development-site-front-end,
body #included-files-fie-on-wp-footer,
body .wpml-ls-legacy-list-horizontal.wpml-ls-statics-footer {
    display: none !important;
}

/* Paginazione (bs5Pagination, functions-utility.php) */
.website-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    padding: 0;
    margin: 2rem 0;
    list-style: none;
}

.website-page-item .website-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0 .75rem;
    border: 1px solid var(--website-border-color);
    border-radius: 4px;
    color: var(--website-primary);
    text-decoration: none;
}

.website-page-item.active .website-page-link,
.website-page-item .website-page-link[aria-current] {
    background-color: var(--website-primary);
    border-color: var(--website-primary);
    color: var(--website-white);
}


/* ==========================================================================


/* ==========================================================================
   Regole del sito Green Village (dal vecchio assets/css/theme.css del tema theme-bs5-deverso-etg).
   Vengono dopo la base del tema e prevalgono su di essa: da smistare nel CSS dei widget che le usano.
   ========================================================================== */

*:focus {
    outline: none!important;
    box-shadow: 0 0 0 0.25rem rgba(137, 106, 67, 0.05)!important;
}

*:focus-visible {
    outline: 2px solid var(--etg-primary)!important;
    outline-offset: 4px!important;
    border:4px!important;
    box-shadow: 0 0 0 0.25rem rgba(137, 106, 67, 0.1)!important;
}

h1, h2, h3, h4, h5, h6{
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}

/**
WP
 */
.has-large-font-size {
    margin: 40px 0 20px 0;
    line-height: var(--wp--preset--font-size--x-large);
}

h2.wp-block-heading {
    font-family: "DM Sans", sans-serif;
    font-size: 1.5rem;
    font-weight: normal;
}

/*
ul.wp-block-list {
    list-style-image: url('assets/images/li-icon.svg');
}
*/

h2.wp-block-heading {
    font-family: "DM Sans", sans-serif;
    font-size: 1.5rem;
    font-weight: normal;
}

ul.wp-block-list {
    list-style: none;
    padding-left: 0;
}

.wp-block-list li {
    margin: 10px 0;
    padding-left: 24px;
    position: relative;
}

.wp-block-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 14px;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background-image: url('assets/images/li-icon.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}


.shellOutput{
    margin: 20px auto;
    padding:20px;
    border-radius: 10px;
    background-color: #000;
    color: #fff;
    width: 1200px;
    max-height: 400px;
    overflow: auto;
}

.shellOutput code{
    color:#fff;
    font-size: 12px;
    white-space: nowrap;
}

.shellOutput .alert{
    font-size: 14px;
}


.etg-container-1100 {
    max-width: var(--etg-container-stadard);
}

.container {
    max-width: var(--etg-container-stadard);
}

.etg-bkg-light{
    background-color: var(--etg-bkg-light);
}

.etg-bkg-white{
    background-color: #fff;
}


.etg-title{
    font-family: "Manrope", sans-serif;
    color: var(--etg-primary);
    font-size: 2.5rem;
    line-height: 1.2;
    font-weight: 500;
    word-wrap: break-word;
    margin-top: 20px;
    margin-bottom: 20px;
}

.etg-title-big{
    font-size: 3rem;
    line-height: 1.2;
}

.etg-subtitle{
    color: var(--etg-secondary);
    font-size: 1.125rem;
    line-height: 1.2;
    font-weight: 500;
    margin: 10px auto;
    letter-spacing: 1.6px;
}

.etg-text{
    color: var(--etg-color-txt-body);
    font-size: 1.125rem;
    line-height: 1.75rem;
    margin: 10px auto;
}

.etg-contentBox{
    max-width: 912px;
    margin: 0 auto;
}

.etg-contentBox-left{
    max-width: 723px;
    margin: 0;
    padding: 0 12px 0 0;
}

.etg-contentBox-left-full-text{
    max-width: none;
    margin: 0;
    padding: 0;
}


.etg-content {
    /*
    font-family: "Lato", sans serif;
    */
    font-family: "DM Sans", sans-serif;
    color: var(--etg-color-txt-body);
    font-size: 1.125rem;
    font-style: normal;
    font-weight: 400;
    line-height: 1.625rem;
}

.shadowWhite{
    box-shadow: 0 4px 24px 0 rgba(173, 173, 173, 0.25);
}
/*
.etg-content a{
    color: var(--etg-primary);
}
*/

/* ==========================================================================
   Font generali
   ========================================================================== */

.font-title{
    /*
    font-family: "Abhaya Libre", serif;
    */
    font-family: "Manrope", sans-serif;
}

.font-text{
    /*
    font-family: "Lato", sans-serif;
     */
    font-family: "DM Sans", sans-serif;
}

/* ==========================================================================
   Stili generali
   ========================================================================== */
body {
    /*
    font-family: 'Lato', sans-serif;
    */
    font-family: "DM Sans", sans-serif;
    padding-top: 100px; /* Per navbar fixed-top */
    color: var(--etg-color-txt-body);
    font-size: 1.125rem;
    max-width: var(--etg-container-max-width);
    margin: 0 auto;
}


body.admin-bar.logged-in{
    padding-top: 68px;
}

a {
    transition: all 0.3s ease;
}

.withoutTranslation{
    background-color: #ffff00!important;
    color: #000000!important;
}

/* ==========================================================================
   Header e Navigazione Accessibile
   ========================================================================== */
.site-header {
    background: #ffffff;
    /*
    box-shadow: 0 2px 4px rgba(0,0,0,.08);
     */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 100px;
}

.header-container {
    height: 100%;
    padding: 0 30px;
    max-width: var(--etg-container-max-width);
    margin: 0 auto;
}

@media (max-width: 767px) {
    .header-container {
        padding: 0 1rem;
    }
}

.header-content {
    height: 100%;
    align-items: center;
    justify-content: space-between;
}

/* Header sections */
.header-left,
.header-right {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
    min-width: 25%;
}

@media (max-width: 767px) {
    .header-left,
    .header-right {
        min-width: 5%;
    }
}


.header-left{
    justify-content: flex-start;
}
.header-right {
    justify-content: flex-end;
}


.header-center {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Logo */
.site-logo,
.custom-logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: var(--etg-primary);
    font-size: 1.5rem;
    font-weight: 700;
    transition: transform 0.3s ease;
}

/* .site-logo:hover, */
.custom-logo-link:hover {
    transform: scale(1.05);
}

.custom-logo {
    max-height: 50px;
    width: auto;
}

/* ==========================================================================
   Hamburger Menu Button
   ========================================================================== */

.menu-toggle {
    background: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    position: relative;
    border:1px solid #333;
    border-radius: 0;
}

.menu-toggle:focus {
    /*
    outline: none;
    border-color: var(--etg-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
     */
}

.hamburger-box {
    width: 48px;
    height: 48px;
    display: inline-block;
    position: relative;
}

.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
    width: 24px;
    height: 3px;
    background-color: #333;
    border-radius: 3px;
    position: absolute;
    transition: transform 0.3s ease;
}

.hamburger-inner {
    top: 50%;
    left: 25%;
    transform: translateY(-50%);
}

.hamburger-inner::before {
    content: '';
    top: -8px;
    left: 0;
}

.hamburger-inner::after {
    content: '';
    top: 8px;
    left: 0;
}

/* Animated hamburger when active */
.menu-toggle[aria-expanded="true"] .hamburger-inner {
    background-color: transparent;
}

.menu-toggle[aria-expanded="true"] .hamburger-inner::before {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .hamburger-inner::after {
    transform: translateY(-8px) rotate(-45deg);
}

/* Impostazioni iniziali del bottone per l'animazione */
.menu-toggle {
    background: none;
    border: none;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

/* Cambia il colore delle tre linee all'hover */
.menu-toggle:hover .hamburger-inner,
.menu-toggle:hover .hamburger-inner::before,
.menu-toggle:hover .hamburger-inner::after {
    background-color: var(--etg-primary);
    transition: all 0.5s ease;
}

.menu-toggle:hover .hamburger-inner {
    width: 12px;
    left: 25%;
    transition: all 0.5s ease;
}

.menu-toggle[aria-expanded="true"]:hover .hamburger-inner {
    background-color: transparent;
}


























.menu-label {
    font-weight: 500;
    color: #333;
}

/* Phone CTA */
.header-phone {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    padding: 15px 24px;
    color: var(--etg-color-txt-title);
    background: #fff;
    text-decoration: none;
    border-radius: 0;
    font-weight: 700;
    transition: all 0.5s ease;
}

.header-phone span.phone-number{
    border-bottom: 1px solid transparent;
    transition: all 0.5s ease;
}


.header-phone:hover span.phone-number{
    color: var(--etg-primary);
    border-bottom: 1px solid var(--etg-primary);
    transition: all 0.5s ease;
}

.header-phone:focus {
    outline: none;
    color: var(--etg-color-txt-title);
    box-shadow: 0 0 0 3px rgba(118, 75, 162, 0.2);
}

.header-phone-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--etg-primary);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}


/* ==========================================================================
   Mega Menu - Accessible & Responsive
   ========================================================================== */
.mega-menu {
    position: fixed;
    top: 100px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0s ease, visibility 0s ease;
}

.mega-menu[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
}

.mega-menu-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.mega-menu-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    max-height: 100vh;
    overflow-y: auto;
    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}
/*
.mega-menu[aria-hidden="false"] .mega-menu-content {
    transform: translateY(0);
}
*/

.mega-menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: 2px solid transparent;
    padding: 12px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    z-index: 10;
}

.mega-menu-close:hover {
    background: #f8f9fa;
}

.mega-menu-close:focus {
    outline: none;
    border-color: var(--etg-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    padding: 60px 0 60px;
}

.mega-menu-column {
    animation: fadeInUp 0.5s ease backwards;
}

.mega-menu-column:nth-child(1) { animation-delay: 0.1s; }
.mega-menu-column:nth-child(2) { animation-delay: 0.2s; }
.mega-menu-column:nth-child(3) { animation-delay: 0.3s; }
.mega-menu-column:nth-child(4) { animation-delay: 0.4s; }

.column-title {
    font-size: 2rem;
    font-weight: normal;
    color: var(--etg-primary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    cursor: default;
}

.mega-menu-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-menu-column li {
    margin-bottom: 8px;
}

.mega-menu-column a {
    display: block;
    font-size: 1rem;
    padding: 5px 0;
    color: var(--etg-secondary);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
}

.mega-menu-column a:hover {
    /*
    background: rgba(102, 126, 234, 0.1);
    color: var(--etg-primary);
    transform: translateX(5px);

     */
}

.mega-menu-column a:focus {
    /*
    outline: none;
    border-color: var(--etg-primary);
    background: rgba(102, 126, 234, 0.05);

     */
}

/* Keyboard navigation indicator */
.mega-menu-column a:focus::before {
    /*
    content: '▸';
    position: absolute;
    left: -5px;
    color: var(--etg-primary);

     */
}

.menu-item-desc {
    display: block;
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 4px;
}

.mega-menu-footer {
    padding: 30px 0;
    border-top: 1px solid #f0f0f0;
    text-align: center;
}

.menu-cta p {
    margin-bottom: 15px;
    color: #6c757d;
}

/**
 * File: assets/css/header-animations.css
 * Animazioni e transizioni fluide per il menu accessibile
 */

/* ==========================================================================
   Animazioni di base
   ========================================================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* ==========================================================================
   Transizioni header
   ========================================================================== */
.site-header {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-header.scrolled {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.98);
}


/* ==========================================================================
   Mega Menu Animazioni
   ========================================================================== */
.mega-menu-content {
    animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1);
}

.mega-menu[aria-hidden="false"] .mega-menu-content {
    animation: slideDown 0.4s ease forwards;
}

.mega-menu[aria-hidden="true"] .mega-menu-content {
    animation: slideDown 0.3s ease reverse;
}

.mega-menu[aria-hidden="false"] .mega-menu-column {
    animation: fadeInUp 0.5s ease both;
}

.mega-menu[aria-hidden="false"] .mega-menu-column:nth-child(1) {
    animation-delay: 0.1s;
}

.mega-menu[aria-hidden="false"] .mega-menu-column:nth-child(2) {
    animation-delay: 0.15s;
}

.mega-menu[aria-hidden="false"] .mega-menu-column:nth-child(3) {
    animation-delay: 0.2s;
}

.mega-menu[aria-hidden="false"] .mega-menu-column:nth-child(4) {
    animation-delay: 0.25s;
}

/* Link hover effect */
.mega-menu-column a {
    position: relative;
}

.mega-menu-column a:hover {
    text-decoration: underline;
}

.mega-menu-column a::after {
    /*
    content: '';
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 5px;
    height: 2px;
    background: var(--etg-primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;

     */
}

.mega-menu-column a:hover::after,
.mega-menu-column a:focus::after {
    /*
    transform: scaleX(1);
    transform-origin: left;

     */
}

/* ==========================================================================
   Focus indicators creativi
   ========================================================================== */
.menu-toggle:focus-visible,
    /*.header-phone:focus-visible,*/
.lang-toggle:focus-visible,
.mega-menu-close:focus-visible {
    outline: none;
    box-shadow:
            0 0 0 3px rgba(255, 255, 255, 0.8),
            0 0 0 6px var(--etg-primary);
    animation: pulse 1s infinite;
}

.mega-menu-column a:focus-visible {
    outline: none;
    /*
    box-shadow: inset 0 0 0 2px var(--etg-primary);

     */
    /*
    background: rgba(102, 126, 234, 0.05);
    */
}

/* ==========================================================================
   Language Menu Animazioni
   ========================================================================== */
.language-menu{
    transform-origin: top right;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lang-toggle[aria-expanded="true"] + .language-menu {
    animation: fadeIn 0.3s ease;
}

.language-menu li {
    opacity: 0;
    transform: translateY(-10px);
    animation: fadeInUp 0.3s ease forwards;
}

.language-menu li:nth-child(1) { animation-delay: 0.05s; }
.language-menu li:nth-child(2) { animation-delay: 0.1s; }
.language-menu li:nth-child(3) { animation-delay: 0.15s; }
.language-menu li:nth-child(4) { animation-delay: 0.2s; }


.language-menu, .language-menu-mobile {
    transform-origin: top right;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    list-style: none;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: space-around;
    flex-direction: row;
    margin: 10px 20px;
    border-top: 1px solid #f0f0f0;
    padding: 30px 0 25px;
}

.language-menu, .language-menu-mobile .lang-item{
    padding:3px;
    border: 1px solid transparent;
    border-radius: 2px;
    min-width: 32px;
    text-align: center;
}

.language-menu, .language-menu-mobile .lang-item a{
    text-decoration: none ;
    color: var(--etg-color-txt-body);
}

.language-menu, .language-menu-mobile .lang-item.current-lang{
    border: 1px solid var(--etg-primary);
}

.language-menu, .language-menu-mobile .lang-item.current-lang a{
    color: var(--etg-color-txt-body);
}



/* ==========================================================================
   Mobile Menu Animazioni
   ========================================================================== */
@media (max-width: 767px) {
    .mega-menu-column {
        transform: translateX(-100%);
        opacity: 0;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .mega-menu[aria-hidden="false"] .mega-menu-column {
        transform: translateX(0);
        opacity: 1;
    }

    .mega-menu[aria-hidden="false"] .mega-menu-column:nth-child(1) {
        transition-delay: 0.1s;
    }

    .mega-menu[aria-hidden="false"] .mega-menu-column:nth-child(2) {
        transition-delay: 0.15s;
    }

    .mega-menu[aria-hidden="false"] .mega-menu-column:nth-child(3) {
        transition-delay: 0.2s;
    }

    .mega-menu[aria-hidden="false"] .mega-menu-column:nth-child(4) {
        transition-delay: 0.25s;
    }

    /* Accordion effect per mobile */
    .column-title {
        cursor: pointer;
        position: relative;
    }

    .column-title::after {
        content: '\f282'; /* Bootstrap icon chevron-down */
        font-family: 'bootstrap-icons';
        position: absolute;
        right: 0;
        transition: transform 0.3s ease;
        color: var(--etg-primary);
    }

    .mega-menu-column.expanded .column-title::after {
        transform: rotate(180deg);
    }

    .mega-menu-column ul {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .mega-menu-column.expanded ul {
        max-height: 500px;
    }
}

/* ==========================================================================
   Loading states
   ========================================================================== */
.menu-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.menu-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--etg-primary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ==========================================================================
   Micro-interazioni
   ========================================================================== */
.menu-toggle:active .hamburger-box {
    transform: scale(0.9);
}
/*
.header-phone:active {
    transform: translateY(1px);
}
*/
.mega-menu-close:hover {
    transform: rotate(90deg);
}

/* Effetto ripple su click */
@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    animation: ripple 0.6s linear;
    pointer-events: none;
}


/* ==========================================================================
   Mobile Responsive Styles
   ========================================================================== */
@media (max-width: 767px) {
    body {
        padding-top: 100px;
    }

    body.admin-bar.logged-in{
        padding-top: 54px;
    }

    .site-header {
        height: 100px;
    }

    .header-left {
        order: 1;
    }

    .header-center {
        order: 2;
        flex: 1;
    }

    .header-right {
        order: 3;
        gap: 10px;
    }

    .site-logo-mobile img {
        max-height: 40px;
    }

    .menu-label {
        display: none;
    }

    .lang-toggle-mobile {
        padding: 6px 10px;
        font-size: 0.875rem;
    }

    /* Mobile Mega Menu */
    .mega-menu-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 80px 20px 40px;
    }

    .column-title {
        font-size: 1.125rem;
        position: relative;
        padding-right: 30px;
    }

    /* Collapsible sections on mobile */
    .mega-menu-column {
        border:none;
        padding-bottom: 20px;
        margin-bottom: 20px;
    }

    .mega-menu-column:last-child {
        border-bottom: none;
    }
}

/* ==========================================================================
   Accessibility Utilities
   ========================================================================== */

.visually-hidden,
.visually-hidden-focusable {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

.visually-hidden:focus,
.visually-hidden-focusable:focus {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 3000;
    width: auto;
    height: auto;
    padding: 10px 20px;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    background: var(--etg-primary);
    color: white;
    text-decoration: none;
    border-radius: 4px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* Focus visible for better keyboard navigation */
*:focus-visible {
    outline: 3px solid var(--etg-primary);
    outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================================================
   Section
   ========================================================================== */
section.section-hero {
}

section.section-slider{
    margin-top: 24px;
}


/* ==========================================================================
   Cards e Post
   ========================================================================== */
.post-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.post-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

.post-meta {
    font-size: 0.875rem;
    color: #6c757d;
}

.post-meta i {
    margin-right: 0.25rem;
}

.badge-category {
    background: linear-gradient(135deg, var(--etg-primary) 0%, var(--etg-secondary) 100%);
    color: white;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
}

/* ==========================================================================
   Single Post
   ========================================================================== */
.single-post-header {
    background: linear-gradient(135deg, var(--etg-primary) 0%, var(--etg-secondary) 100%);
    color: white;
    padding: 80px 0;
    margin-bottom: 3rem;
}

.post-content {
    font-size: 1.125rem;
    line-height: 1.8;
}

.post-content h2 {
    margin: 2.5rem 0 1.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.post-content h3 {
    margin: 2rem 0 1rem;
    font-weight: 600;
    color: #34495e;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 2rem 0;
}

.post-content blockquote {
    border-left: 4px solid var(--etg-primary);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #6c757d;
}

/* ==========================================================================
   Sidebar e Widget
   ========================================================================== */
.widget {
    background: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.widget-title {
    position: relative;
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: linear-gradient(135deg, var(--etg-primary) 0%, var(--etg-secondary) 100%);
}

.widget ul {
    list-style: none;
    padding: 0;
}

.widget ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.widget ul li:last-child {
    border-bottom: none;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    background: #2c3e50;
    color: #ecf0f1;
    padding-top: 4rem;
    padding-bottom: 2rem;
    /*
    margin-top: 5rem;
     */
}
/*
.footer-widget h4 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.footer-widget ul {
    list-style: none;
    padding: 0;
}

.footer-widget ul li {
    padding: 0.35rem 0;
}

.footer-widget a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-widget a:hover {
    color: white;
    text-decoration: none;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    margin-top: 3rem;
    padding-top: 2rem;
    text-align: center;
    color: #95a5a6;
}
*/
/* ==========================================================================
   Bottoni personalizzati
   ========================================================================== */
.btn-gradient {
    background: linear-gradient(135deg, var(--etg-primary) 0%, var(--etg-secondary) 100%);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    font-weight: 500;
    border-radius: 50px;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
    color: white;
}

.btn-outline-gradient {
    background: transparent;
    color: var(--etg-primary);
    border: 2px solid var(--etg-primary);
    padding: 0.75rem 2rem;
    font-weight: 500;
    border-radius: 50px;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
}

.btn-outline-gradient:hover {
    background: linear-gradient(135deg, var(--etg-primary) 0%, var(--etg-secondary) 100%);
    color: white;
    border-color: transparent;
}

/* ==========================================================================
   Form e ricerca
   ========================================================================== */
.search-form .form-control {
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    border: 2px solid #e0e0e0;
}

.search-form .form-control:focus {
    border-color: var(--etg-primary);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.search-form .btn {
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
}

/* ==========================================================================
   Commenti
   ========================================================================== */
.comment-list {
    list-style: none;
    padding: 0;
}

.comment-body {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.comment-author img {
    border-radius: 50%;
}

.comment-metadata {
    font-size: 0.875rem;
    color: #6c757d;
}

.comment-reply-link {
    font-size: 0.875rem;
    color: var(--etg-primary);
}

/* ==========================================================================
   Animazioni
   ========================================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {

    .hero-section {
        padding: 60px 0;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .post-card .card-img-top {
        height: 150px;
    }

    .single-post-header {
        padding: 40px 0;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.25rem;
    }

    .hero-section h1 {
        font-size: 1.75rem;
    }
}

/* ==========================================================================
   Utility classes
   ========================================================================== */
.text-gradient {
    background: linear-gradient(135deg, var(--etg-primary) 0%, var(--etg-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--etg-primary) 0%, var(--etg-secondary) 100%);
}

.shadow-soft {
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.shadow-hover:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}




/**
simmulazione polylang
 */

/**
 * Stili per il language switcher con Polylang mock
 */

/* Language Switcher Container */
.language-switcher {
    position: relative;
    display: inline-block;
}

/* Toggle Button */
.lang-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #fff;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    text-transform: uppercase;
    transition: all 0.3s ease;
    color: #333;
    font-size: 1rem;
}

.lang-toggle:hover {
    /*
    background: #e9ecef;
    border-color: #dee2e6;

     */
}

.lang-toggle:focus {
    outline: none;
    border-color: #444;
    /*
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);

     */
}

.lang-toggle .bi-globe {
    font-size: 18px;
    color: #6c757d;
}

.lang-toggle .current-lang {
    font-weight: 600;
    color: #000;
}

.lang-toggle .bi-chevron-down {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.lang-toggle .bi-chevron-down::before {
    font-weight: bold;
    color:#000;
    font-size: 0.8rem;
}

.lang-toggle[aria-expanded="true"] .bi-chevron-down {
    transform: rotate(180deg);
}

/* Language Menu Dropdown */
.language-menu {
    position: absolute;
    top: calc(100% + 19px);
    right: -32px;
    background: white;
    border: 1px solid #fff;
    border-radius: 0 0 0 8px;
    box-shadow: none;
    list-style: none;
    padding: 8px 0;
    margin: 0;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 10000;
}

.language-mobile{
    display: none;
}

.language-menu li{
    width: 100%;
}

.lang-toggle[aria-expanded="true"] + .language-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Language Items */
.language-menu .lang-item {
    padding: 0;
    margin: 0;
    list-style: none;
}

.language-menu .lang-item a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: #333;
    text-decoration: none;
    transition: background 0.2s ease;
    font-size: 14px;
}

.language-menu .lang-item a:hover {
    background: #f8f9fa;
}

.language-menu .lang-item.current-lang a {
    background: #e7f3ff;
    color: #0066cc;
    font-weight: 600;
    position: relative;
}

.language-menu .lang-item.current-lang a::before {
    content: '✓';
    position: absolute;
    right: 16px;
    color: #0066cc;
}

/* Flag images */
.language-menu .lang-item img {
    width: 20px;
    height: 14px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Language name */
.language-menu .lang-item span {
    flex: 1;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .lang-toggle {
        padding: 6px 12px;
        font-size: 13px;
    }

    .lang-toggle .bi-globe {
        font-size: 16px;
    }

    .language-menu {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -5px 20px rgba(0,0,0,0.15);
        transform: translateY(100%);
        max-height: 50vh;
        overflow-y: auto;
    }

    .lang-toggle[aria-expanded="true"] + .language-menu {
        transform: translateY(0);
    }

    .language-menu .lang-item a {
        padding: 16px 20px;
        font-size: 16px;
    }

    /* Aggiungi handle per trascinare su mobile */
    .language-menu::before {
        content: '';
        display: block;
        width: 40px;
        height: 4px;
        background: #dee2e6;
        border-radius: 2px;
        margin: 12px auto 8px;
    }
}


/*
xs      <576px      col-            smart-phone
sm      ≥576px 	    col-sm
md      ≥768px 	    col-md          ipad
lg      ≥992px 	    col-lg          ipad pro
xl      ≥1200px 	col-xl          desktop
xxl     ≥1400px     col-xxl
*/

/*============================================================
 *
 * XXL  desktop large
 *
 */
@media (min-width: 1400px) {

}

/*============================================================
 *
 * XL   desktop
 *
 */
@media (max-width: 1399px) {

}

/*============================================================
 *
 * LG   small desktop
 *
 */

@media (max-width: 1199px) {

}

/*============================================================
 *
 * LG   ipadpro
 *
 */
@media (pointer:coarse) and (max-width: 1199px) {

}


/*============================================================
 *
 *  MD  ipad
 *
 */
@media (max-width: 991px) {

    .etg-title {
        font-size: 2.5rem;
    }

    body .mega-menu-grid {
        gap: 10px;
        padding: 30px 0 30px;
    }

    body .mega-menu-content>.container {
        padding: 0;
        margin: 20px auto;
        max-width: 96%
    }
    body .mega-menu-grid h3.column-title {
        font-size: 1.5rem;
        padding-bottom: 0;
    }
    body .mega-menu-column li {
        margin: 0;
    }
    body .mega-menu-column li a {
        font-size: 1rem;
        padding: 3px 0;
        border: 2px solid transparent;
        position: relative;
    }
}


/*============================================================
 *
 *  SM smart-phone 576-767
 *  XS 0-567
 */
@media (max-width: 767px) {

    .menu-toggle {
        border: 1px solid transparent;
    }

    .hamburger-box {
        width: 32px;
        height: 32px;
    }

    .hamburger-inner {
        left: 12.5%;
    }

    .menu-toggle:hover {
        border-color: transparent;
    }

    .menu-toggle:hover::before {
        transform: scaleX(0);
    }

    .menu-toggle:hover .hamburger-inner, .menu-toggle:hover .hamburger-inner::before, .menu-toggle:hover .hamburger-inner::after {
        background-color: #000;
    }

    .menu-toggle:hover .hamburger-inner {
        width: 24px;
        left: 12.5%;
    }

    svg.siteLogoFooterSvg,
    svg.siteLogoFooterSvgMobile {
        width: auto;
        height: 100px;
        transition: all 0.2s ease-out;
    }

    .header-phone-icon {
        background: transparent;
        color: #000;
        font-size: 1.5rem;
    }

    .etg-title {
        text-align: left;
        font-size: 1.825rem;
    }

    .etg-subtitle {
        text-align: left;
        font-size: 1.125rem;
    }

    .etg-content {
        text-align: left;
    }

    body .mega-menu {
        top: 69px;
    }

    body .mega-menu-grid {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 0 18px;
    }

    body .mega-menu-column {
        padding: 10px 0;
        margin: 0;
    }

    body .mega-menu-column h3.column-title {
        padding: 12px 0;
        font-size: 1.125rem;
        margin: 0;
        color: #000;
        transition: all 0.3s ease-out;
    }

    body .mega-menu-column h3.column-title[aria-expanded="true"] {
        color: var(--etg-primary);
        transition: all 0.3s ease-out;
    }

    body .mega-menu-column li a {
        padding: 4px 0;
    }

    .language-mobile{
        display: block;
    }

}


/*============================================================
 *
 * XS   smartphone
 *
 */
@media (min-width: 10px)  and (max-width: 575px) {

}

/**
FIX WPML BANNER
 */
body div.otgs-development-site-front-end{
    display: none!important;
}



/*============================================================
    BUTTONS LINK
 ============================================================*/

/*
    bkg: primary
    color: white
    border: primary

    hover:
    bkg: transparent
    color: primary
    border: primary

    no animation
 */
.btnStyle1{
    display: inline-block;
    background: var(--etg-primary);
    border: 1px solid var(--etg-primary);
    color: #fff;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.7px;
    font-weight: normal;
    text-decoration: none;
    transition: all 0.2s ease-in;
    padding: 12px 24px;
}
.btnStyle1 svg{
    width:16px;
    margin-top: -2px;
}

.btnStyle1:not(:disabled):hover{
    display: inline-block;
    background: transparent;
    color: var(--etg-primary);
    transition: all 0.3s ease-out;
}

/*
    bkg: transparent
    color: #333
    border: #333

    hover:
    bkg: primary
    color: #fff
    border: primary

    animation
 */

.btnStyle2 {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.70px;
    text-decoration: none;
    padding: 12px 24px;
    border: 1px solid var(--etg-secondary);
    background-color: transparent;
    color: var(--etg-secondary);
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.btnStyle2::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: var(--etg-secondary);
    z-index: -1;
    transition: width 0.3s ease;
}

.btnStyle2:not(:disabled):hover,
.btnStyle2:not(:disabled):focus {
    color: #fff;
    border-color: var(--etg-secondary);
}

.btnStyle2:not(:disabled):hover::before,
.btnStyle2:not(:disabled):focus::before {
    width: 100%;
}

.btnStyle2 svg {
    transition: color 0.3s ease;
}

.btnStyle2:not(:disabled):hover svg,
.btnStyle2:not(:disabled):focus svg {
    color: #fff;
}

/*
    bkg: primary
    color: white
    border: primary

    hover:
    bkg: primary-dark
    color: white
    border: primary-dark

    animation
 */

.btnStyle3 {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.70px;
    text-decoration: none;
    padding: 15px 24px;
    border: 1px solid var(--etg-secondary);
    background-color: var(--etg-secondary);
    color: #fff;
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.btnStyle3::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: var(--etg-secondary-dark);
    z-index: -1;
    transition: width 0.3s ease;
}

.btnStyle3:not(:disabled):hover,
.btnStyle3:not(:disabled):focus {
    color: #fff;
    border-color: var(--etg-secondary-dark);
}

.btnStyle3:focus {
    outline: 2px solid var(--etg-secondary-dark);
    outline-offset: 2px;
}


.btnStyle3:not(:disabled):hover::before,
.btnStyle3:not(:disabled):focus::before {
    width: 100%;
}

.btnStyle3 svg {
    transition: color 0.3s ease;
}

.btnStyle3:not(:disabled):hover svg,
.btnStyle3:not(:disabled):focus svg {
    color: #fff;
}


/*
    bkg: transparent
    color: white
    border: white

    hover:
    bkg: white
    color: primary
    border: white

    animation
 */


.btnStyle4 {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.70px;
    text-decoration: none;
    padding: 15px 24px;
    border: 1px solid #fff;
    background-color: transparent;
    color: #fff;
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.btnStyle4::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: #fff;
    z-index: -1;
    transition: width 0.3s ease;
}

.btnStyle4:not(:disabled):hover,
.btnStyle4:not(:disabled):focus {
    color: var(--etg-secondary);
}

.btnStyle4:not(:disabled):hover::before,
.btnStyle4:not(:disabled):focus::before {
    width: 100%;
}

.btnStyle4 svg {
    transition: color 0.3s ease;
}

.btnStyle4:not(:disabled):hover svg,
.btnStyle4:not(:disabled):focus svg {
    color: var(--etg-secondary);
}

/*
    bkg: transparent
    color: #333
    border: transparent

    hover:
    bkg: primary
    color: white
    border: primary

    animation
 */


.btnStyle5 {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.70px;
    text-decoration: none;
    padding: 15px 24px;
    border: 1px solid transparent;
    background-color: transparent;
    text-transform: uppercase;
    color: var(--etg-color-txt-body);
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.btnStyle5::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: var(--etg-secondary-dark);
    z-index: -1;
    transition: width 0.3s ease;
}

.btnStyle5:not(:disabled):hover,
.btnStyle5:not(:disabled):focus {
    color: #fff;
    border: 1px solid var(--etg-secondary-dark);
}

.btnStyle5:not(:disabled):hover::before,
.btnStyle5:not(:disabled):focus::before {
    width: 100%;
}

.btnStyle5 svg {
    transition: color 0.3s ease;
}

.btnStyle5:not(:disabled):hover svg,
.btnStyle5:not(:disabled):focus svg {
    color: #fff;
}

.btnStyle6 {
    display: inline-flex;
    gap: 0.25rem;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.70px;
    text-decoration: none;
    padding: 15px 24px;
    border: 1px solid var(--etg-secondary);
    background-color: #fff;
    text-transform: uppercase;
    color: var(--etg-secondary);
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.btnStyle6::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: var(--etg-bkg-light);
    z-index: -1;
    transition: width 0.3s ease;
}

.btnStyle6:not(:disabled):hover,
.btnStyle6:not(:disabled):focus {
    color: var(--etg-primary);
    border: 1px solid var(--etg-secondary);
}

.btnStyle6:not(:disabled):hover::before,
.btnStyle6:not(:disabled):focus::before {
    width: 100%;
}

.btnStyle6 svg {
    transition: color 0.3s ease;
    color: var(--etg-secondary);
}

.btnStyle6:not(:disabled):hover svg,
.btnStyle6:not(:disabled):focus svg {
    color: var(--etg-secondary);
}


/* Sito Green Village: le icone SVG dei pulsanti disegnate a tratto (fill="none") restano senza riempimento
   (il kit applica fill: currentColor alle svg di .btnStyle1/.btnStyle2) */
.btnStyle1 svg[fill="none"],
.btnStyle2 svg[fill="none"] {
    fill: none;
}

/* Sito Green Village: i pulsanti mantengono le misure del tema precedente (il kit imposta line-height 1.25,
   min-height 44px, angoli arrotondati e testo centrato, che le regole del sito non sovrascrivono) */
.btnStyle1,
.btnStyle2 {
    line-height: inherit;
    min-height: auto;
    border-radius: 0;
    text-align: inherit;
}

/* ==========================================================================
   Fascia Kinderhotels in cima all'header (26/11/2026)
   Visibile solo a inizio pagina: GreenvillageStickyHeader toglie la classe header-at-top appena si scorre, la fascia
   si chiude e resta l'header bianco (che su desktop si nasconde scorrendo verso il basso, come prima).
   ========================================================================== */
:root {
    --gv-kiho-height: 44px;            /* altezza della fascia aperta */
}

.site-header {
    --gv-kiho-offset: 0px;             /* spazio occupato ora dalla fascia */
    height: auto;
}

.site-header.header-at-top {
    --gv-kiho-offset: var(--gv-kiho-height);
}

.site-header .header-container {
    height: 100px;
}

.header-kinderhotels {
    display: flex;
    align-items: center;
    justify-content: center;
    height: var(--gv-kiho-offset);
    overflow: hidden;
    background-color: var(--website-secondary);
    visibility: hidden;
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 0.3s;
}

.site-header.header-at-top .header-kinderhotels {
    visibility: visible;
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s;
}

.header-kinderhotels-link {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
}

.header-kinderhotels-link img {
    display: block;
    width: 200px;
    height: auto;
}

.header-kinderhotels-link:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* spazio in cima alla pagina per header fisso + fascia */
body {
    padding-top: calc(100px + var(--gv-kiho-height));
}

body.admin-bar.logged-in {
    padding-top: calc(68px + var(--gv-kiho-height));
}

/* mega menu subito sotto l'header, fascia compresa se è aperta */
.mega-menu {
    top: calc(100px + var(--gv-kiho-offset));
}

@media (max-width: 991px) {
    body .mega-menu {
        top: calc(69px + var(--gv-kiho-offset));
    }
}

@media (max-width: 767px) {
    body {
        padding-top: calc(100px + var(--gv-kiho-height));
    }

    body.admin-bar.logged-in {
        padding-top: calc(54px + var(--gv-kiho-height));
    }

    .header-kinderhotels-link img {
        width: 180px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .header-kinderhotels,
    .site-header.header-at-top .header-kinderhotels {
        transition: none;
    }
}
