/*
 Theme Name:   Astra Child
 Theme URI:    https://wpastra.com/
 Description:  Sanifarm Verbano Child theme
 Author:       Publycom
 Template:     astra
 Version:      1.0.0
 Text Domain:  astra-child
*/


@media (min-width: 922px) {
  .toc-sticky {
    position: sticky;
    top: 120px;
    max-height: calc(100vh - 140px);
    overflow: auto;
  }
}

body {
  background: #D2C49D url("/wp-content/themes/astra-child/assets/images/sand-bg.jpg") repeat left top !important;
}

/* Top bar */
.ast-above-header-bar {
  background: #cf2b6a;
  color: #ecc96b;
}

.ast-above-header-bar .ast-header-menu,
.ast-above-header-bar .ast-above-header-menu {
  margin-left: auto;
}

.ast-above-header-bar a {
  text-decoration: none;
  color: #fff;
  font-family: Helvetica, Arial, sans-serif;
  font-weight: bold;
  font-size: 1.05em;
  text-shadow: 0px 1px 2px #444;
}

.ast-above-header-bar .menu-item {
  margin-left: 32px;          /* distanza tra voci */
  padding: 4px 10px;
  border-radius: 5px;
}

.ast-above-header-bar .menu-item:hover {
  background-color: #3b8b79;  /* verde hover */
}

.ast-above-header-bar .menu-item > a {
  color: #fff;
}

@media (min-width: 922px) {

  .site-primary-header-wrap.ast-builder-grid-row-container {
    position: relative;
  }

  .site-primary-header-wrap.ast-builder-grid-row-container::after {
    content: "";
    position: absolute;
    inset: 0;
    background: url("/wp-content/themes/astra-child/assets/images/veils.png") no-repeat right center;
    background-size: 100% 100%;   /* tutta l’altezza della barra */
    pointer-events: none;
    z-index: 0;
  }

  /* Mantiene i contenuti (logo/testo/menu) sopra l’overlay */
  .site-primary-header-wrap.ast-builder-grid-row-container > * {
    position: relative;
    z-index: 1;
  }
}

@media (min-width: 922px) {
  .hdr-right-badge {
    display: block;
    text-align: right;
    overflow: hidden;
    background: transparent
      url("/wp-content/themes/astra-child/assets/images/sanitaria-small.webp")
      no-repeat right center;
    padding-right: 85px;
  }

  .hdr-right-badge .hdr-right-text {
    color: #b5d0cb;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 2.6em;
    font-weight: 800;
    line-height: 1em;
  }
}

@media (max-width: 921px) {
  .hdr-right-badge {
    display: none !important;
  }
}

/* Sottomenu */
.ast-above-header-bar .sub-menu {
  background-color: #272727;
  padding: 6px 0;
  min-width: 200px;
}

.ast-above-header-bar .sub-menu .menu-item {
  margin: 0;
  padding: 6px 12px;
}

.ast-above-header-bar .sub-menu .menu-item:hover {
  background-color: #272727;
}

.ast-above-header-bar .sub-menu a {
  font-weight: normal;
  color: #fff;
}

@media (min-width: 922px) {
  .ast-above-header-bar .menu-item:hover > .sub-menu {
    display: block;
  }
}

.ast-above-header-bar a:hover {
  text-decoration: none;
}

.ast-above-header-bar .sub-menu {
  transition: none;
}


.ast-primary-header-bar {
  background: #2f8f84; /* verde/teal */
}

/* Immagine destra */
.header-right-image {
  height: 90px;      /* regola */
  width: auto;
  display: block;
}


/* Logo sinistra coerente */
.ast-site-identity img {
  max-height: 90px;  /* regola */
}

/* Titolo sito accanto al logo */
.ast-site-title-wrap .site-title,
.ast-site-title-wrap .site-title a {
  font-family: "Paytone One", Helvetica, Arial, sans-serif;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
  text-transform: none;
  text-shadow: 0px 1px 2px #444;
  margin: 0;
}

/* Hover: niente underline */
.ast-site-title-wrap .site-title a:hover {
  text-decoration: none;
}

header.entry-header .entry-title {
  border-bottom: 3px solid #968562;
  color: #968562;
  font: 3em/1.2 normal Tahoma, Geneva, sans-serif;
  font-weight: bold;
  margin: 1em 0;
  text-transform: uppercase;
  text-shadow: 1px 0 0 #F7E8C1, -2px 0 0 #666;
}

.entry-content h2 {
  font-size: 1.8em;
  text-shadow: 0px 1px 2px #666;
  text-transform: uppercase;
}


.sidebar-main h2,
.site-footer h2 {
  font-size: 1.2em;
  text-align: left;
  font-style: normal;
  text-transform: none;
}

@media (max-width: 768px) {
  .entry-header .entry-title {
    font-size: 36px;
  }

  .entry-content h2 {
    font-size: 26px;
  }
}

/* FOOTER MIDDLE BAR */
.footer-middlebar {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 180px;              
  background: #3c8c7b;
  border-top: 3px solid #988753;
  border-bottom: 2px solid #988753;
}

.footer-middlebar .mid-img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto 10px;
  transition: transform 180ms ease, filter 180ms ease;
}

.footer-middlebar .mid-item:hover .mid-img {
  transform: translateY(-2px) scale(1.03);
  filter: brightness(1.12) contrast(1.05) drop-shadow(0 10px 14px rgba(0,0,0,.25));
}

.footer-middlebar a {
  display: block;
  color: #aaa;
  font-family: Tahoma, Geneva, sans-serif;
  font-size: 2em;
  font-weight: bold;
  text-decoration: none;
}

.footer-middlebar a:hover {
  color: #fff;
}

.site-above-footer-wrap[data-section="section-above-footer-builder"],
.site-above-footer-wrap[data-section="section-above-footer-builder"] .ast-builder-grid-row {
  background-color: transparent !important;
  padding: 0 !important;
}



/* FOOTER COLUMNS */

.site-primary-footer-wrap[data-section="section-primary-footer-builder"] {
  background: transparent !important;
  border-top: 0px !important;
}

.site-footer {
  background-image: url("/wp-content/themes/astra-child/assets/images/sand-stone.jpg") !important;
  background-repeat: no-repeat !important;
  background-position: right bottom !important;
  background-size: auto !important; /* oppure: 320px auto; */
}

.site-footer .wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column {
  border-left: 1px dotted #666 !important;
}

.site-footer .wp-block-column {
  padding-left: 20px;
}

/* Easy TOC */
.sidebar-main #ez-toc-container,
.sidebar-main .ez-toc-container,
.site-footer #ez-toc-container,
.site-footer .ez-toc-container {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  font-size: 0.8em;
}

.site-footer #ez-toc-container a,
.site-footer .ez-toc-container a,
.site-footer #ez-toc-container a:visited,
.site-footer .ez-toc-container a:visited {
  color: #444 !important;          
}

/* Sidebar sticky (desktop) */
@media (min-width: 922px) {
  .sidebar-main {
    position: sticky;
    top: 90px;          /* regola questo valore */
    align-self: flex-start;
  }
}

/* Sidebar main: sfondo primario, testo bianco, maiuscolo, tipografia responsive */
.sidebar-main {
  background: var(--ast-global-color-0);
  color: #fff;
}
.sidebar-main #ez-toc-container li {
  padding-bottom: 20px;
}

.sidebar-main .ez-toc-list li a {
  color: #fff !important;
  text-transform: uppercase;
  font-size: 1.5em !important;
}

.sidebar-main .ez-toc-list a:visited {
  color: #fff !important;
}
.sidebar-main a:hover {
  text-decoration: underline;
}
.ast-separate-container #secondary .widget {
  background-color: transparent !important;
}



/* PAGINE PRODOTTI */

.prod-card h2 {
  text-align: center;
  margin: 0 0 10px;
  font-weight: bold;
}

.brand-logo {
  float: left;
  margin: 0 30px 20px 0;
  max-width: 200px;
}

.brand-gallery .wp-block-image img,
.brand-gallery img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
}

.entry-content table {
  background-color: rgba(var(--ast-global-color-0-rgb), 0.5);
}

/* Mobile: hamburger (toggle) bianco */
@media (max-width: 921px) {
  /* Se l’icona è SVG (spesso Astra usa SVG) */
  .ast-header-break-point .ast-button-wrap .menu-toggle .ast-mobile-svg,
  .ast-header-break-point .ast-button-wrap .menu-toggle svg {
    fill: #fff !important;
  }
}

.wpcf7 input[type="submit"]:disabled,
.wpcf7 button[type="submit"]:disabled {
  opacity: .5;
  cursor: not-allowed;
}