/* Fattoria dell'Aglio - static site overrides
   Keeps the original visual design while providing portable responsive behaviour. */
html { scroll-behavior: smooth; scroll-padding-top: 150px; }
body { overflow-x: hidden; }

#masthead {
  position: sticky !important;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 9999;
  background: #fff;
  isolation: isolate;
  transition: box-shadow .22s ease;
}
#masthead .ast-primary-header-bar,
#masthead .ast-above-header-bar,
#masthead .site-primary-header-wrap,
#masthead .site-above-header-wrap,
#masthead .custom-logo-link img,
#masthead .site-branding img {
  transition: min-height .22s ease, height .22s ease, width .22s ease, max-width .22s ease, padding .22s ease;
}
#masthead.site-header-condensed { box-shadow: 0 6px 20px rgba(0,0,0,.10); }

@media (min-width: 922px) {
  #masthead.site-header-condensed .ast-above-header-bar,
  #masthead.site-header-condensed .site-above-header-wrap { min-height: 38px !important; }
  #masthead.site-header-condensed .ast-primary-header-bar,
  #masthead.site-header-condensed .site-primary-header-wrap { min-height: 62px !important; }
  #masthead.site-header-condensed .custom-logo-link img,
  #masthead.site-header-condensed .site-branding img { width: 205px !important; max-width: 205px !important; }
}

@media (max-width: 921px) {
  html { scroll-padding-top: 120px; }
  #masthead.site-header-condensed .ast-above-header-bar,
  #masthead.site-header-condensed .site-above-header-wrap { min-height: 36px !important; }
  #masthead.site-header-condensed .ast-primary-header-bar,
  #masthead.site-header-condensed .site-primary-header-wrap { min-height: 60px !important; }
  #masthead.site-header-condensed .custom-logo-link img,
  #masthead.site-header-condensed .site-branding img { width: 145px !important; max-width: 145px !important; }
}

/* Accessibility and resilient media rules. */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid currentColor !important;
  outline-offset: 3px !important;
}
img, svg, video, iframe { max-width: 100%; }
.elementor-video iframe { width: 100%; height: 100%; border: 0; }

/* Keep the historical empty brand-logo slot on Prodotti without a broken image icon. */
.asset-storico-non-disponibile { min-height: 1px; }

/* Desktop full-width layout requested for the static Kuaby ghost site. */
@media (min-width: 922px) {
  .ast-container,
  .site-primary-header-wrap.ast-container,
  .site-above-header-wrap.ast-container {
    width: 100% !important;
    max-width: none !important;
  }

  #content > .ast-container {
    width: 100% !important;
    max-width: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .elementor-section.elementor-section-boxed > .elementor-container {
    width: 100% !important;
    max-width: none !important;
  }
}

/* Lightweight YouTube placeholders: thumbnails load cheaply; the heavy iframe
   is created only when the visitor chooses a video. */
.kuaby-video-placeholder {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 0;
  overflow: hidden;
  cursor: pointer;
  background: #111;
}
.kuaby-video-placeholder img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.kuaby-video-placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.08);
  transition: background .18s ease;
}
.kuaby-video-placeholder:hover::after,
.kuaby-video-placeholder:focus-visible::after {
  background: rgba(0,0,0,.18);
}
.kuaby-video-play {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 46px;
  border-radius: 12px;
  background: rgba(255,0,0,.92);
  box-shadow: 0 3px 12px rgba(0,0,0,.30);
}
.kuaby-video-play::before {
  content: "";
  position: absolute;
  left: 26px;
  top: 13px;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 17px solid #fff;
}
.kuaby-video-placeholder:focus-visible {
  outline: 3px solid currentColor !important;
  outline-offset: 3px !important;
}
/* Preserve responsive behavior for two historical SiteOrigin cells that carry fixed inline widths. */
@media (max-width: 921px) {
  #pgc-2-10-2,
  #pgc-2-11-0 {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
}

