/*
 Theme Name:   Astra Child
 Theme URI:    https://wpastra.com/
 Description:  Child theme di Astra per personalizzazioni (header ad altezza automatica)
 Author:       Fipel
 Template:     astra
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  https://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  astra-child
*/

.hero-slider {
  position: relative;
  overflow: hidden;
	height:100vh;
}

.hero-slider .my-title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  text-align: center;
	width:80%
}
.hero-slider .my-title h1,
.hero-slider .my-title .elementor-widget-container{ 
	width:100%; 
	padding:0 !important; 
	font-size:60px; 
	color:#fff;
margin:auto}
.hero-slider .my-title  span{ 
	color:#fff; 
	font-size:30px}


#masthead{
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  width: 100%;
  background: transparent;
  transition: background-color .2s ease, box-shadow .2s ease, backdrop-filter .2s ease;
}

/* Nessuna altezza fissa: header e tutti i suoi contenitori si adattano al contenuto */
#masthead,
#masthead .ast-desktop-header,
#masthead .ast-mobile-header-wrap,
#masthead .ast-main-header-wrap,
#masthead .main-header-bar-wrap,
#masthead .ast-primary-header-bar,
#masthead .ast-primary-header,
#masthead .main-header-bar,
#masthead .site-primary-header-wrap,
#masthead .ast-builder-grid-row,
#masthead .site-header-section,
#masthead .site-branding,
#masthead .ast-builder-layout-element,
#masthead .ast-main-header-bar-alignment,
#masthead .main-header-bar-navigation,
#masthead .ast-builder-menu,
#masthead .ast-button-wrap {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
}

#masthead .ast-primary-header-bar .site-primary-header-wrap,
#masthead .ast-mobile-header-wrap .ast-primary-header-bar {
  padding-top: 0.75em;
  padding-bottom: 0.75em;
}

#masthead .ast-desktop .ast-primary-header-bar .main-header-menu > .menu-item,
#masthead .main-header-menu .menu-item,
#masthead .ast-desktop .ast-primary-header-bar .ast-header-woo-cart,
#masthead .ast-desktop .ast-primary-header-bar .ast-header-edd-cart {
  line-height: normal !important;
  min-height: 0 !important;
}

#masthead .site-primary-header-wrap {
  align-items: center;
}

/* Transizioni per header compatto allo scroll */
#masthead .ast-primary-header-bar,
#masthead .ast-above-header-bar,
#masthead .ast-below-header-bar,
#masthead .ast-primary-header-bar .site-primary-header-wrap,
#masthead .ast-mobile-header-wrap .ast-primary-header-bar {
  transition: padding 0.3s ease;
}

/* Stato dopo scroll: header alto quanto il contenuto (logo ~90px), niente padding extra */
body.has-scrolled #masthead .ast-primary-header-bar,
body.has-scrolled #masthead .ast-primary-header-bar .site-primary-header-wrap,
body.has-scrolled #masthead .ast-mobile-header-wrap .ast-primary-header-bar,
body.has-scrolled #masthead .ast-main-header-wrap,
body.has-scrolled #masthead .main-header-bar-wrap {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  min-height: 0 !important;
}

body.has-scrolled #masthead .ast-above-header-bar,
body.has-scrolled #masthead .ast-below-header-bar {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  min-height: 0 !important;
}

/* La riga dell'header segue l'altezza del contenuto (logo + menu centrati) */
body.has-scrolled #masthead .site-primary-header-wrap .ast-builder-grid-row,
body.has-scrolled #masthead .ast-builder-grid-row {
  min-height: 0 !important;
  align-items: center;
}

body.has-scrolled #masthead .site-primary-header-wrap.ast-container {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* Altezza fissa della sezione sinistra (logo) allo scroll */
body.has-scrolled #masthead .site-header-primary-section-left {
  height: 120px !important;
}

/* Logo: riduzione 20% allo scroll */
#masthead .site-branding {
  padding: 0 !important;
  transition: transform 0.3s ease;
  transform-origin: left center;
}
body.has-scrolled #masthead .site-branding {
  transform: scale(0.6);
}

/* Stato dopo scroll: stile visivo */
body.has-scrolled #masthead {
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
}

.testo-bianco p span,
.testo-bianco p { color:#fff !important}

.ast-builder-menu-1 .main-header-menu .sub-menu {
  background-color: #fff !important;
  margin-top: 0.5em;
}
.main-header-menu .sub-menu{
  padding-top:5px !important;
  padding-bottom:5px !important;
  border-radius:5px !important;
}
.main-header-menu .sub-menu .menu-link {
  padding: 10px 15px !important;
}
.main-header-menu .sub-menu a.menu-link:hover{
  color:#05a2dd !important;
}
.ast-builder-menu-1 .main-header-menu .sub-menu a { color: #000 !important; }

/* Pulsante menu mobile: sfondo e bordo colore tema, icona bianca */
#masthead .menu-toggle.main-header-menu-toggle.ast-mobile-menu-trigger-outline {
  background-color: var(--ast-global-color-0);
  border-color: var(--ast-global-color-0);
  color: #fff;
}
#masthead .menu-toggle.main-header-menu-toggle .ast-mobile-svg,
#masthead .menu-toggle.main-header-menu-toggle .mobile-menu-toggle-icon {
  color: #fff;
  fill: #fff;
}
#masthead .menu-toggle.main-header-menu-toggle svg {
  fill: #fff;
}

/* Menu mobile: nascosto di default, visibile solo al click sul pulsante */
.ast-mobile-header-content.content-align-flex-start {
  display: none !important;
}
.ast-mobile-header-content.content-align-flex-start:has(.main-header-bar-navigation.toggle-on) {
  display: flex !important;
  min-height: calc(100vh - 120px);
  height: calc(100vh - 120px);
  align-items: center;
  justify-content: center;
  padding: 2rem 0;
  background-color: #E7F6FF;
}
/* Tutti i div dentro il contenitore mobile: altezza come il contenitore padre */
.ast-mobile-header-content.content-align-flex-start div {
  height: 100%;
  min-height: 100%;
}
.ast-mobile-header-content .ast-builder-menu-mobile.ast-builder-menu-mobile-focus-item {
  height: 100% !important;
  min-height: 100% !important;
  flex: 1 1 0;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ast-mobile-header-content .ast-main-header-bar-alignment,
.ast-mobile-header-content .main-header-bar-navigation {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ast-mobile-header-content .main-navigation,
.ast-mobile-header-content #ast-hf-mobile-menu {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.ast-mobile-header-content .main-header-menu .menu-item {
  width: 100%;
  text-align: center;
  padding-top: 0.75em;
  padding-bottom: 0.75em;
}
.ast-mobile-header-content .main-header-menu .menu-link {
  font-size: 1.35rem;
  padding: 0.5em 0;
}

/* Pulsante Contattaci fisso in basso: solo sotto 920px */
.astra-child-contact-bottom-cta {
  display: none;
}

@media (max-width: 920px) {
  .astra-child-contact-bottom-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding: 1rem 1.5rem;
    background: var(--ast-global-color-0);
    border-color: var(--ast-global-color-0);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    z-index: 99998;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
  }
  .astra-child-contact-bottom-cta:hover {
    background: var(--ast-global-color-0);
    border-color: var(--ast-global-color-0);
    color: #fff;
    opacity: 0.9;
  }
}

/* Da 921px in giù: logo 120x120 px per evitare deformazioni */
@media (max-width: 921px) {
  #masthead .site-branding .custom-logo-link img,
  #masthead .site-branding .astra-logo-svg {
    width: 120px !important;
    height: 120px !important;
    object-fit: contain;
  }
}

.footer-widget-area .menu-item-has-children.menu-item-1180 .sub-menu {display:none}