/* Allineamento al sito originale vivo gestionale-backup.local.
 * Codice riscritto da zero: nessun PHP/JS del backup compromesso viene eseguito.
 */

/* HEADER — misure e comportamento ricavati dal template Elementor 988581 */
@media (min-width:1025px) {
  .site-header { position:relative; z-index:10000; }
  .site-header__bar { background:#073A7C; }
  .site-header__inner { min-height:104px; padding:0 40px 0 0; }
  .site-header__logo img { width:412px; height:auto; max-width:none; }
  .menu-nav--principale > li > a {
    font-family:"Montserrat",sans-serif; font-size:16px; font-weight:600;
    line-height:26px; padding:20px 18px; color:#fff;
  }
  .menu-nav--principale > li > a:hover,
  .menu-nav--principale > li.current-menu-item > a,
  .menu-nav--principale > li.current-menu-ancestor > a,
  .menu-nav--principale > li.current-page-ancestor > a {
    background:#FFBC39; color:#000;
  }
  .site-header__search { margin-left:20px; padding:28px 28px 28px 20px; color:#fff; }
  .site-header__search svg { width:22px; height:22px; }
  .site-header__bar--didattica {
    position:absolute; left:0; right:0; top:100%; z-index:9999;
    background:rgba(7,58,124,.50); border:0;
  }
  .site-header__inner--didattica { padding-right:40px; justify-content:flex-end; }
  .menu-nav--didattica > li > a {
    font-family:"Montserrat",sans-serif; font-size:16px; font-weight:600;
    text-transform:uppercase; line-height:26px; letter-spacing:0;
    padding:15px 12px; color:#fff;
  }
  .menu-nav--didattica > li > a:hover,
  .menu-nav--didattica > li.current-menu-item > a,
  .menu-nav--didattica > li.current-menu-ancestor > a { background:#FFBC39; color:#000; }
  .menu-nav ul.sub-menu {
    min-width:18rem; padding:0; background:#fff; box-shadow:0 12px 28px rgba(0,0,0,.2);
  }
  .menu-nav ul.sub-menu a {
    font-family:"Inter",sans-serif; font-size:16px; font-weight:400;
    color:#282828; padding:15px 25px; line-height:1.35;
  }
  .menu-nav ul.sub-menu a:hover { background:#282828; color:#fff; }
}

/* Header mobile/tablet originale: unico blocco sticky con logo, cerca e burger. */
@media (max-width:1024px) {
  .site-header { position:sticky; top:0; z-index:10000; background:#073A7C; }
  .site-header__bar { background:#073A7C; }
  .site-header__inner { min-height:78px; padding:0 18px; }
  .site-header__logo { margin-right:auto; }
  .site-header__logo img { width:min(56vw,300px); height:auto; max-height:58px; }
  .site-header__search { margin-left:auto; padding:18px 14px; }
  .site-header__toggle { display:inline-flex; border:0; width:48px; height:48px; padding:12px; }
  .site-header__panel {
    position:fixed; top:78px; left:0; right:0; bottom:0; overflow:auto;
    padding:16px 24px 42px; background:#073A7C; z-index:10001;
  }
  .site-header__panel[hidden] { display:none !important; }
  .menu-mobile + .menu-mobile { margin-top:18px; padding-top:18px; border-top:1px solid rgba(255,255,255,.25); }
  .menu-mobile > li > a { font-family:"Montserrat",sans-serif; font-size:17px; font-weight:600; padding:13px 0; }
  .menu-mobile ul a { font-family:"Inter",sans-serif; font-size:15px; padding:9px 0; }
  .menu-mobile ul { padding-left:18px; }
  html.menu-mobile-open, html.menu-mobile-open body { overflow:hidden; }
}

/* FOOTER — template Elementor 987836 */
.site-footer { margin-top:96px; background:#EDEDED; }
.site-footer > div:first-child { max-width:1440px !important; }
.site-footer .footer-logo { align-self:start; }
.site-footer .footer-logo img { display:block; width:min(395px,100%); height:auto; }
.site-footer .footer-address p:first-child { font-weight:700; }
.site-footer .footer-bar > div { max-width:1440px !important; }

/* Rifiniture footer misurate sul CSS Elementor originale 987836. */
.site-footer { background:#F1F1F1; }
.site-footer > div:first-child { padding-top:40px !important; padding-bottom:40px !important; padding-left:20px !important; padding-right:20px !important; }
.site-footer .footer-logo img { width:100% !important; max-width:185px !important; }
.site-footer .footer-address p:first-child,
.site-footer .footer-contacts h2 { color:#494948 !important; font-family:"Montserrat",sans-serif !important; font-size:19px !important; font-weight:700 !important; line-height:23px !important; }
.site-footer .footer-address p:last-child,
.site-footer .footer-contacts p,
.site-footer .footer-contacts a,
.site-footer .footer-contacts span { color:#494948; font-family:"Montserrat",sans-serif; font-size:16px; font-weight:300; line-height:19px; }
.site-footer .footer-contacts svg { width:38px !important; height:38px !important; color:#BFCBC8 !important; }
.site-footer .footer-bar { background:#073A7C !important; }
.site-footer .footer-bar > div { padding:10px 45px !important; }
.site-footer .footer-bar, .site-footer .footer-bar a, .site-footer .footer-bar span { color:#fff; font-family:"Montserrat",sans-serif; font-size:14px; line-height:14px; }
.site-footer .footer-bar > div > div:first-child > span:first-child { font-weight:700; }
.site-footer .footer-bar svg { width:30px !important; height:30px !important; }
@media (max-width:1024px) {
  .site-footer .footer-bar { padding:20px 10px; }
  .site-footer .footer-bar > div { padding:0 !important; }
}

/* Mobile header: layout originale 80/10/10 su tablet, 100 + 50/50 su telefono. */
@media (max-width:1024px) and (min-width:768px) {
  .site-header__inner { flex-wrap:wrap; padding:0; min-height:80px; }
  .site-header__logo { width:80%; }
  .site-header__logo img { width:100%; max-width:412px; height:80px; object-fit:cover; object-position:center; }
  .site-header__search { width:10%; min-height:80px; margin:0; padding:0 20px; background:#FAFAFA; color:#292929; }
  .site-header__toggle { width:10%; min-height:80px; height:80px; margin:0; background:#fff; color:#292929; border:0; }
}
@media (max-width:767px) {
  .site-header__inner { flex-wrap:wrap; padding:0; min-height:0; }
  .site-header__logo { width:100%; }
  .site-header__logo img { width:100%; max-width:412px; height:80px; object-fit:cover; object-position:center; }
  .site-header__search { width:50%; min-height:60px; margin:0; padding:0; background:#FAFAFA; color:#292929; }
  .site-header__toggle { width:50%; min-height:60px; height:60px; margin:0; background:#fff; color:#292929; border:0; }
  .site-header__panel { top:140px; }
  .menu-mobile a { padding-top:20px; padding-bottom:20px; font-size:17px; }
}

/* Popup ricerca originale 7592: pannello che entra dall'alto in 0.2 s. */
.igu-search-popup { position:fixed; inset:0; z-index:11000; background:rgba(0,0,0,.28); }
.igu-search-popup[hidden] { display:none !important; }
.igu-search-popup.is-open { animation:iguSearchIn .2s ease both; }
.igu-search-popup__spacer { height:clamp(88px,12vh,150px); }
.igu-search-popup__body { position:relative; background:#fff; padding:42px 20px 54px; box-shadow:0 18px 45px rgba(0,0,0,.18); }
.igu-search-popup__close { position:absolute; top:10px; right:22px; border:0; background:transparent; color:#292929; font-size:34px; line-height:1; cursor:pointer; }
.igu-search-form { width:min(100%,900px); margin:0 auto; display:flex; border-bottom:2px solid #292929; }
.igu-search-form__input { flex:1; min-width:0; border:0 !important; outline:0; background:transparent; padding:15px 10px; color:#292929; font-family:"Montserrat",sans-serif; font-size:26px; }
.igu-search-form__submit { width:62px; border:0; background:transparent; color:#292929; padding:16px; }
.igu-search-form__submit svg { width:24px; height:24px; fill:currentColor; }
@keyframes iguSearchIn { from { opacity:0; transform:translateY(-24px); } to { opacity:1; transform:none; } }

/* HOME — hero desktop originale (Elementor page 70) */
@media (min-width:1025px) {
  .igu-mobile-hero { display:none !important; }
  .igu-hero-desktop h1[style*="font-size:300px"] {
    font-size:300px !important; line-height:1.2em !important;
    letter-spacing:-30px !important; white-space:nowrap;
  }
  .igu-hero-desktop .igu-hero-letter {
    --igu-x:0px; --igu-y:0px;
    transform:translate3d(var(--igu-x),var(--igu-y),0);
    will-change:transform,opacity;
    opacity:0;
  }
  .igu-hero-desktop.igu-hero-ready .igu-hero-letter {
    animation:iguHeroFlash 1s ease var(--igu-delay) both;
  }
  .igu-hero-desktop .igu-hero-copy,
  .igu-hero-desktop .igu-hero-cta { opacity:0; }
  .igu-hero-desktop.igu-hero-ready .igu-hero-copy,
  .igu-hero-desktop.igu-hero-ready .igu-hero-cta {
    animation:iguFadeIn .9s ease var(--igu-delay) both;
  }
  .igu-hero-desktop .wp-block-cover:has(> img[src*="home-hero-bg-img"]) {
    padding:200px 30px 170px !important;
    min-height:100vh;
  }
  .igu-hero-desktop .wp-block-cover:has(> img[src*="home-hero-bg-img"]) h3 {
    margin-top:0 !important; color:#fff; font-family:"Montserrat",sans-serif;
    font-size:30px !important; font-weight:900 !important; line-height:40px !important;
  }
  .igu-hero-desktop .wp-block-group[style*="margin:-80px 0px 0px 0px"] { margin-top:-80px !important; }
}

@keyframes iguHeroFlash {
  0%,50%,100% { opacity:1; }
  25%,75% { opacity:0; }
}
@keyframes iguFadeIn { from {opacity:0} to {opacity:1} }

/* Hero tablet/mobile separata, come nell'originale. */
.igu-mobile-hero { display:none; }
@media (max-width:1024px) {
  /* La hero desktop è il primo gruppo Gutenberg della home. Nasconderla anche
     strutturalmente evita il flash/doppione se il JS che aggiunge
     .igu-hero-desktop parte in ritardo o viene bloccato. */
  .home-original > .igu-hero-desktop,
  .home-original > .wp-block-group:first-of-type { display:none !important; }
  .igu-mobile-hero {
    display:flex; position:relative; isolation:isolate; overflow:hidden;
    min-height:70vh; padding:72px 28px 54px;
    background-image:linear-gradient(rgba(0,0,0,.15),rgba(0,0,0,.15)),url('/wp-content/uploads/2024/06/home-hero-bg-img.jpg');
    background-size:cover; background-position:center;
    color:#fff;
  }
  .igu-mobile-hero__seal {
    position:absolute; inset:0; z-index:-1; pointer-events:none;
    background:url('/wp-content/uploads/2024/06/home-hero-bg-logo.svg') no-repeat 50% 48% / min(65vw,420px) auto;
  }
  .igu-mobile-hero__inner { width:100%; max-width:720px; margin:auto; }
  .igu-mobile-hero__title {
    margin:0; color:#fff; font-family:"Work Sans","Montserrat",sans-serif;
    font-size:150px; font-weight:700; line-height:.8; letter-spacing:-10px;
    text-transform:uppercase;
  }
  .igu-mobile-hero__copy { margin-top:56px; max-width:520px; }
  .igu-mobile-hero__copy h3 {
    margin:0 0 24px; color:#fff; font-family:"Montserrat",sans-serif;
    font-size:30px; font-weight:900; line-height:40px;
  }
  .igu-mobile-hero__cta {
    display:inline-flex; gap:12px; align-items:center; color:#fff; text-decoration:none;
    font-family:"Montserrat",sans-serif; font-size:18px; font-weight:400;
  }
  .igu-mobile-hero__cta:hover { color:#FFBC39; }
}
@media (max-width:767px) {
  .igu-mobile-hero { min-height:70vh; padding:54px 22px 42px; }
  .igu-mobile-hero__seal { background-size:250px auto; background-position:48% 68%; }
  .igu-mobile-hero__title { font-size:80px; line-height:.8; letter-spacing:-5px; }
  .igu-mobile-hero__copy { margin-top:44px; }
  .igu-mobile-hero__copy h3 { font-size:24px; line-height:1.28; }
  .igu-mobile-hero__cta { font-size:16px; }
}

@media (prefers-reduced-motion:reduce) {
  .igu-hero-desktop .igu-hero-letter,
  .igu-hero-desktop .igu-hero-copy,
  .igu-hero-desktop .igu-hero-cta { opacity:1 !important; animation:none !important; transform:none !important; }
}

/* Pagine Eventi — griglia del widget Posts Elementor originale. */
.igu-event-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:35px 30px;
  margin-top:30px;
}
.igu-event-card {
  position:relative;
  display:flex;
  flex-direction:column;
  min-width:0;
  background:#fff;
  box-shadow:0 2px 12px rgba(0,0,0,.10);
  overflow:hidden;
}
.igu-event-card__image { display:block; position:relative; padding-bottom:66%; overflow:hidden; }
.igu-event-card__image img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.igu-event-card__badge {
  position:absolute; top:20px; right:20px; z-index:2;
  padding:7px 10px; background:#073A7C; color:#fff;
  font-family:"Montserrat",sans-serif; font-size:12px; font-weight:600;
}
.igu-event-card__body { padding:20px 30px 12px; }
.igu-event-card__title { margin:0 0 14px; font-family:"Montserrat",sans-serif; font-size:22px; line-height:1.25; font-weight:700; }
.igu-event-card__title a { color:#292929; text-decoration:none; }
.igu-event-card__title a:hover { color:#073A7C; }
.igu-event-card__excerpt { color:#292929; font-family:"Montserrat",sans-serif; font-size:14px; line-height:1.55; }
.igu-event-card__excerpt p { margin:0; }
.igu-event-card__more { display:inline-block; margin-top:20px; color:#073A7C; text-decoration:none; font-size:13px; font-weight:700; }
.igu-event-card__more:hover { color:#FFBC39; }
.igu-event-card__date { margin-top:auto; padding:0 30px 24px; color:#777; font-family:"Montserrat",sans-serif; font-size:13px; }
@media (max-width:1024px) {
  .igu-event-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:767px) {
  .igu-event-grid { grid-template-columns:1fr; }
  .igu-event-card__image { padding-bottom:50%; }
}
