/*
Theme Name: Kadence Child
Template: kadence
*/

/* === HERO SLIDESHOW === */
.hero-slideshow-wrapper {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.hero-slideshow {
  display: flex;
  transition: transform 0.6s ease-in-out;
}

.hero-slide {
  min-width: 100%;
  height: calc(100vh - 146px) !important;  /* 100% viewport meno l'altezza dell'header */
  min-height: 300px;                        /* sicurezza su schermi molto bassi */
  background-size: cover !important;
  background-position: center center !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  position: relative;
}

@media (max-width: 768px) {
  .hero-slide {
    height: auto !important;
    aspect-ratio: 4/3;        /* si adatta al formato dell'immagine */
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-color: #fffce5;  /* stesso colore del sito */
  }
}

.hero-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35); /* overlay scuro per leggibilità testo */
}

.hero-slide-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  padding: 0 20px;
}

.hero-slide-content h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.hero-cta {
  display: inline-block;
  margin-top: 1rem;
  padding: 12px 32px;
  background: #0077b6; /* adatta al colore hotel */
  color: #fff;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s;
}

.hero-cta:hover { background: #005f8e; }

@media (max-width: 768px) {
  .hero-slide { height: 280px; }
}


/* === HEADER TRASPARENTE OVERLAY SU HERO === */

/* Header fuori dal flusso, fluttua sopra lo slideshow */
#masthead {
  position: relative !important; /* torna nel flusso normale */
  background: rgba(255, 244, 208, 0.88) !important;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Con admin bar (quando sei loggato) */
body.admin-bar #masthead {
  top: 32px !important;
}
body:not(.admin-bar) #masthead {
  top: 0 !important;
}

/* Admin bar mobile è 46px */
@media screen and (max-width: 782px) {
  body.admin-bar #masthead {
    top: 46px !important;
  }
}

/* Testo delle slide: padding-top per non finire coperto dall'header */
.hero-slide-content {
  padding-top: 0px;
}

#masthead .kadence-sticky-header.item-is-fixed.item-is-stuck {
  background: rgba(255, 244, 208, 0.97) !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12) !important;
}

/* Sticky header: quando scrolla diventa opaco */
#masthead .kadence-sticky-header.item-is-fixed.item-is-stuck,
#masthead .site-main-header-wrap.item-is-fixed.item-is-stuck {
  background: rgba(255, 244, 208, 0.97) !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12) !important;
  position: fixed !important;
  top: 0 !important;
}

body.admin-bar #masthead .kadence-sticky-header.item-is-fixed.item-is-stuck {
  top: 32px !important;
}

.main-navigation .primary-menu-container > ul > li.menu-item > a {

      color: #080808 !important;
    font-weight: bold;
}

/* === FRECCE SLIDESHOW === */
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: transparent !important;
  color: #fff;
  border: none;
  outline: none;
  width: 48px;
  height: 48px;
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 0;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}
.hero-arrow:hover,
.hero-arrow:focus,
.hero-arrow:active {
  background: transparent !important;
  outline: none;
  box-shadow: none;
  opacity: 0.7;
}
.hero-arrow-prev { left: 16px; }
.hero-arrow-next { right: 16px; }

/* === PALLINI === */
.hero-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 8px;
}
.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s;
}
.hero-dot.active { background: #fff; }

@media (max-width: 768px) {
  .hero-arrow { width: 36px; height: 36px; font-size: 1.6rem; }
}