/**
 * Tee19 – fix mobile (breakpoint tema Hub: max-width 1199px)
 */
 @media screen and (max-width: 1199px) {

  /* --- Header mobile: griglia lingua | logo | menu (ordine DOM ≠ ordine visivo) --- */
  .lqd-mobile-sec {
    overflow: visible !important;
  }

  .lqd-mobile-sec-inner {
    display: grid !important;
    grid-template-columns: max-content 1fr max-content;
    grid-template-areas: "lang logo menu";
    align-items: center;
    min-height: 0;
    overflow: visible !important;
  }

  .lqd-mobile-sec-inner > * {
    overflow: visible !important;
  }

  .lqd-mobile-sec .navbar-brand {
    grid-area: logo;
    justify-self: center;
    position: static !important;
    transform: none !important;
    margin: 0 !important;
    padding: 10px 8px !important;
    max-width: min(52vw, 200px);
    justify-content: center !important;
    z-index: 1;
  }

  .lqd-mobile-sec .navbar-brand img {
    max-height: 64px;
    width: auto;
    height: auto;
    display: block;
  }

  .lqd-mobile-sec .navbar-brand .navbar-brand-inner {
    margin-inline-start: 0 !important;
    margin-inline-end: 0 !important;
  }

  .lqd-mobile-sec .navbar-toggle {
    grid-area: menu;
    justify-self: end;
    position: relative;
    z-index: 2;
    min-height: 44px;
    flex: none;
    margin: 0 !important;
  }

  :root {
    --lqd-mobile-sec-height: 92px;
  }

  /* Logo non invade il pannello menu a tendina */
  html.mobile-nav-activated .lqd-mobile-sec .navbar-brand {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  .lqd-mobile-sec-nav {
    z-index: 25 !important;
  }

  /* Nascondi originale in header desktop (Hub usa il clone in .lqd-mobile-modules-container) */
  .lqd-head-sec-wrap .header-module.lqd-show-on-mobile {
    display: none !important;
  }

  /* Hamburger su header mobile grigio */
  .lqd-mobile-sec .nav-trigger .bar {
    background-color: #102020 !important;
  }

  /* Selettore lingua (modulo spostato in .lqd-mobile-modules-container) */
  .lqd-mobile-modules-container:not(.empty) {
    grid-area: lang;
    display: flex;
    align-items: center;
    justify-self: start;
    padding-left: 4px;
    padding-right: 4px;
    position: relative;
    z-index: 30;
    overflow: visible !important;
  }

  .lqd-mobile-sec .header-module {
    position: relative;
    overflow: visible !important;
  }

  .lqd-mobile-sec [class*="ld_header_lang_switcher"] {
    position: relative;
    overflow: visible !important;
  }

  .lqd-mobile-sec [class*="ld_header_lang_switcher"] .ld-module-trigger,
  .lqd-mobile-sec [class*="ld_header_lang_switcher"] .ld-module-trigger-txt,
  .lqd-mobile-sec [class*="ld_header_lang_switcher"] .ld-module-trigger .lqd-icn-ess {
    color: #102020 !important;
  }

  .lqd-mobile-sec [class*="ld_header_lang_switcher"] .ld-module-trigger-txt {
    font-size: 14px;
    font-weight: 500;
  }

  /* Dropdown lingue: toggle JS tee19-lang-open (no Bootstrap collapse) */
  .lqd-mobile-sec [class*="ld_header_lang_switcher"] .ld-module-dropdown {
    display: none !important;
    position: absolute !important;
    top: calc(100% + 6px) !important;
    left: 0 !important;
    right: auto !important;
    height: auto !important;
    background-color: #fff !important;
    background: #fff !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
    z-index: 999 !important;
    min-width: 10rem;
    padding: 0 !important;
  }

  .lqd-mobile-sec [class*="ld_header_lang_switcher"] .ld-module-dropdown.tee19-lang-open {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .lqd-mobile-sec [class*="ld_header_lang_switcher"] .ld-dropdown-menu-content {
    background-color: #fff !important;
    background: #fff !important;
    padding: 0.35rem 0 !important;
  }

  .lqd-mobile-sec [class*="ld_header_lang_switcher"] .ld-module-dropdown ul {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .lqd-mobile-sec [class*="ld_header_lang_switcher"] .ld-module-dropdown li > a {
    display: block;
    padding: 0.55rem 1rem;
    color: #102020 !important;
  }

  .lqd-mobile-sec [class*="ld_header_lang_switcher"] .lang-item.current-lang > a {
    color: #2e5335 !important;
    font-weight: 600;
  }

  /* --- Hero: titolo --- */
  h1.ld-fh-element,
  .ld-fh-element h1 {
    font-size: clamp(26px, 6.5vw, 34px) !important;
    line-height: 1.15 !important;
  }

  /* Carousel eventi / immagini sotto --- */
  .vc_custom_1770135495216 {
    padding-top: 40px !important;
    padding-bottom: 40px !important;
  }

  .vc_custom_1770135495216 .carousel-dots,
  .vc_custom_1770135495216 .flickity-page-dots {
    bottom: auto !important;
    margin-top: 0.5rem !important;
  }

  /* --- Contatti: sezione + form CF7 --- */
  #contatti.vc_custom_1770139200212,
  section#contatti {
    padding: 48px 20px 56px !important;
  }

  #contatti .vc_col-sm-6,
  #contatti .vc_col-sm-8 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  #contatti .vc_custom_1770141307809 {
    margin-right: 0 !important;
    margin-bottom: 28px !important;
  }

  #contatti [class*="ld_cf7"] .wpcf7-form-control-wrap {
    margin-bottom: 16px !important;
  }

  #contatti .wpcf7 p {
    margin-bottom: 0 !important;
  }

  #contatti .wpcf7-submit {
    margin-top: 8px;
  }

  /* --- Altre sezioni (padding WPBakery) --- */
  .vc_custom_1779119598514 {
    padding-bottom: 60px !important;
  }

  .vc_custom_1770139223920,
  .vc_custom_1770122157223 {
    padding-top: 60px !important;
  }

  .vc_custom_1779176890148 {
    padding-bottom: 60px !important;
  }

  .vc_custom_1770043612992 {
    border-bottom-width: 40px !important;
  }

  /* Colonne immagine 25vh: troppo alte su mobile */
  .vc_custom_1779176041249,
  .vc_custom_1779176610665,
  .vc_custom_1779176679255 {
    padding-top: 12vh !important;
    padding-bottom: 12vh !important;
    min-height: 220px;
  }

  /* --- Footer --- */
  .main-footer h3 {
    font-size: 28px !important;
  }
}

/*
 * Selettore lingua – solo desktop (header overlay su hero)
 * Non applicare sotto 1200px: il modulo finisce nella barra mobile grigia
 */
@media screen and (min-width: 1200px) {
  .main-header.main-header-overlay:not(.is-stuck) .lqd-head-sec [class*="ld_header_lang_switcher"] .ld-module-trigger,
  .main-header.main-header-overlay:not(.is-stuck) .lqd-head-sec [class*="ld_header_lang_switcher"] .ld-module-trigger-txt,
  .main-header.main-header-overlay:not(.is-stuck) .lqd-head-sec [class*="ld_header_lang_switcher"] .ld-module-trigger .lqd-icn-ess {
    color: #fff !important;
  }

  .main-header .lqd-head-sec [class*="ld_header_lang_switcher"] .ld-module-dropdown a {
    color: #102020 !important;
  }
}
