/* ==========================================
   MORARETO AGRITURISMO - DESIGN SYSTEM
   ========================================== */

/* Import font moderni per agriturismo elegante */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Inter:wght@300;400;500;600;700&display=swap');

/* CSS Variables - Design System */
:root {
  /* Palette Colori Natura */
  --forest-green: #2C5530;
  --earth-brown: #8B7355;
  --natural-gold: #D4AF37;
  --warm-white: #F8F6F0;
  --charcoal: #4A4A4A;
  --pure-white: #FFFFFF;
  --light-grey: #F5F5F5;
  
  /* Typography */
  --font-serif: 'Cormorant Garamond', serif;
  --font-sans: 'Inter', sans-serif;
  
  /* Spacing */
  --section-padding: 5rem 0;
  --container-max-width: 1200px;
  --border-radius: 12px;
  
  /* Transitions */
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
  --transition-fast: all 0.2s ease;
}

/* ==========================================
   BASE STYLES
   ========================================== */

* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  margin: 0;
  padding: 0;
  background-color: var(--pure-white);
  color: var(--charcoal);
  line-height: 1.7;
  overflow-x: hidden;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-behavior: smooth;
}

/* ==========================================
   LOADER - Elegante e pulito
   ========================================== */

#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, var(--warm-white) 0%, var(--pure-white) 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#loader img {
  width: 140px;
  height: auto;
  animation: gentle-pulse 2s infinite ease-in-out;
}

@keyframes gentle-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.02);
    opacity: 1;
  }
}

body.loaded #loader {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ==========================================
   HOME BUTTON - Moderno e pulito
   ========================================== */

.home-button {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  background-color: var(--forest-green);
  color: var(--pure-white);
  border-radius: 50%;
  padding: 0.1rem 0.7rem;
  font-size: 1.7rem;
  z-index: 10000;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
  border: 2px solid transparent;
}

.home-button.visible {
  opacity: 1;
  visibility: visible;
}

.home-button:hover {
  background-color: var(--natural-gold);
  transform: translateY(-2px);
  border-color: var(--forest-green);
}



/* ==========================================
   FIXED NAVIGATION - Moderna e elegante
   ========================================== */

.fixed-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(44, 85, 48, 0.95);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.3);
  z-index: 1000;
  transition: var(--transition-smooth);
  padding: 0.75rem 0;
}

.fixed-nav.scrolled {
  background: rgba(44, 85, 48, 0.98);
  padding: 0.5rem 0;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.nav-logo {
  display: flex;
  align-items: center;
}

.nav-logo-img {
  height: 40px;
  width: auto;
  transition: var(--transition-smooth);
}

.nav-logo-img:hover {
  transform: scale(1.05);
}

.nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2rem;
}

.nav-links li {
  opacity: 1;
  transform: none;
}

.nav-links a {
  color: var(--pure-white);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: var(--font-sans);
  text-transform: capitalize;
  letter-spacing: 0.5px;
  transition: var(--transition-smooth);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--natural-gold);
  transition: var(--transition-smooth);
}

.nav-links a:hover {
  color: var(--natural-gold);
  background: rgba(255, 255, 255, 0.1);
}

.nav-links a:hover::after {
  width: 80%;
}

/* Hamburger moderno */
.hamburger {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  gap: 4px;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--pure-white);
  transition: var(--transition-smooth);
  transform-origin: center;
}

.hamburger:hover span {
  background: var(--natural-gold);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ==========================================
   LANGUAGE BAR - Integrata nella nav
   ========================================== */

.language-bar {
  position: relative;
  display: flex;
  align-items: center;
}

.language-toggle {
  cursor: pointer;
  user-select: none;
  transition: var(--transition-smooth);
  color: var(--pure-white);
  font-size: 0.85rem;
  font-family: var(--font-sans);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 6px;
}

.language-toggle:hover {
  color: var(--natural-gold);
  background: rgba(255, 255, 255, 0.1);
}

.language-options {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background: rgba(44, 85, 48, 0.95);
  border-radius: var(--border-radius);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(212, 175, 55, 0.3);
  min-width: 100px;
  z-index: 1001;
}

.language-options a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--pure-white);
  text-decoration: none;
  font-size: 0.85rem;
  transition: var(--transition-smooth);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-family: var(--font-sans);
}

.language-options a:last-child {
  border-bottom: none;
}

.language-options a:hover {
  background: var(--natural-gold);
  color: var(--forest-green);
}

.language-options.visible {
  display: block;
}

/* ==========================================
   HERO SECTION - Full Screen elegante
   ========================================== */

.hero-section {
  min-height: 70vh;
  background-image: url('sfondoheader.jpeg'); /* oppure montetexture.jpg */
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  padding: 8rem 2rem 4rem;
  margin-bottom: 0px;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, rgba(44, 85, 48, 0.7) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
}

.hero-logo {
  margin-bottom: 2rem;
  opacity: 0;
  animation: hero-fade-up 1s ease-out 0.3s forwards;
}

.hero-logo img {
  width: 100%;
  max-width: 350px;
  height: auto;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--forest-green);
  margin: 0 0 1rem 0;
  text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.8);
  opacity: 0;
  animation: hero-fade-up 1s ease-out 0.6s forwards;
}

.hero-subtitle {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  color: var(--earth-brown);
  margin: 0 0 2rem 0;
  opacity: 0;
  animation: hero-fade-up 1s ease-out 0.9s forwards;
}

.hero-description {
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-family: var(--font-sans);
  line-height: 1.8;
  color: var(--charcoal);
  margin: 0 0 3rem 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  background: rgba(255, 255, 255, 0.9);
  padding: 1.8rem 2rem;
  border-radius: var(--border-radius);
  border-left: 4px solid var(--natural-gold);
  opacity: 0;
  animation: hero-fade-up 1s ease-out 1.2s forwards;
}

.hero-cta {
  display: flex;
  gap: 1.8rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 4rem;
  opacity: 0;
  animation: hero-fade-up 1s ease-out 1.5s forwards;
}

.cta-primary,
.cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.1rem;
  transition: var(--transition-smooth);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cta-primary {
  background: var(--forest-green);
  color: var(--pure-white);
  border: 2px solid var(--forest-green);
}

.cta-primary:hover {
  background: var(--natural-gold);
  border-color: var(--natural-gold);
  color: var(--forest-green);
  transform: translateY(-3px);
}

.cta-secondary {
  background-color: rgba(255, 255, 255, 0.35);

  color: var(--forest-green);
  border: 2px solid var(--forest-green);
}

.cta-secondary:hover {
  background: var(--forest-green);
  color: var(--pure-white);
  transform: translateY(-3px);
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--forest-green);
  font-size: 1.8rem;
  animation: bounce 2s infinite;
  z-index: 2;
}

@keyframes hero-fade-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

/* ==========================================
   SECTION SPACING - Arioso e moderno
   ========================================== */

section {
  margin-bottom: 6rem;
}



/* ==========================================
   SERVIZI - Cards eleganti e moderne
   ========================================== */

#servizi {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: var(--section-padding);
  background: var(--pure-white);
}

#servizi a {
  text-decoration: none;
}

#servizi h2 {
  text-align: center;
  font-size: clamp(2.5rem, 5vw, 3rem);
  font-weight: 600;
  color: var(--forest-green);
  font-family: var(--font-serif);
  letter-spacing: 1px;
  margin: 0 auto 4rem;
  padding: 0 2rem;
}

#servizi h2 span {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
}

.service-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 3rem;
  padding: 0 2rem;
}

.service-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.8rem;
  background: var(--pure-white);
  border-radius: var(--border-radius);
  padding: 2.5rem 2rem;
  transition: var(--transition-smooth);
  border: 1px solid var(--light-grey);
  position: relative;
  overflow: hidden;
}

.service-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--forest-green), var(--natural-gold));
  opacity: 0;
  transition: var(--transition-smooth);
}

.service-item:hover::before {
  opacity: 1;
}

.service-item:hover {
  transform: translateY(-5px);
  border-color: var(--forest-green);
}

.service-item img {
  width: 100%;
  height: 250px;
  border-radius: var(--border-radius);
  object-fit: cover;
  transition: var(--transition-smooth);
}

.service-item:hover img {
  transform: scale(1.05);
}

.service-text {
  text-align: center;
  flex: 1;
}

.service-text h3 {
  margin: 0 0 1rem 0;
  color: var(--forest-green);
  font-family: var(--font-serif);
  font-size: 2.0rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.service-text h3 i {
  color: var(--natural-gold);
  font-size: 1.2rem;
}

.service-text p {
  margin: 0;
  font-size: 1rem;
  color: var(--charcoal);
  line-height: 1.7;
  font-family: var(--font-sans);
  font-weight: 400;
}

/* ==========================================
   SEZIONE HERO - Quote elegante
   ========================================== */

.mezzo {
  position: relative;
  background-image: url("malgafotomezzo.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  min-height: 70vh;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 6rem 0;
  border-radius: var(--border-radius);
  overflow: hidden;
}

.mezzo::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

.mezzo p {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.95);
  color: var(--forest-green);
  padding: 3rem 4rem;
  border-radius: var(--border-radius);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  text-align: center;
  max-width: 800px;
  line-height: 1.6;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  border: 3px solid var(--natural-gold);
}

/* ==========================================
   DETAILED SERVICES - Layout elegante
   ========================================== */

.detailed-service {
  display: flex;
  gap: 4rem;
  padding: 4rem 2rem;
  margin: 6rem auto;
  max-width: var(--container-max-width);
  background: var(--pure-white);
  border-radius: var(--border-radius);
  border: 1px solid var(--light-grey);
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}

.detailed-service::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--forest-green), var(--natural-gold));
  border-radius: 0 0 4px 4px;
}

.detailed-service img {
  width: 100%;
  max-width: 500px;
  display: block;
  margin: 0 auto;
  border-radius: var(--border-radius);
  transition: var(--transition-smooth);
  opacity: 1;
}

.detailed-service img:hover {
  transform: scale(1.02);
}

.descrizione-servizio {
  flex: 1;
  min-width: 300px;
}

.descrizione-servizio h3 {
  font-size: 2rem;
  margin-bottom: 1.8rem;
  color: var(--forest-green);
  font-family: var(--font-serif);
  font-weight: 600;
}

.descrizione-servizio p {
  margin-bottom: 1.8rem;
  line-height: 1.8;
  font-family: var(--font-sans);
  color: var(--charcoal);
  font-size: 1.05rem;
}

.descrizione-servizio ul {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
}

.descrizione-servizio ul li {
  margin-bottom: 1rem;
  padding-left: 2rem;
  position: relative;
  font-size: 1rem;
  color: var(--charcoal);
  font-family: var(--font-sans);
  line-height: 1.6;
}

.descrizione-servizio ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--natural-gold);
  font-weight: bold;
  font-size: 1.2rem;
}

#slideshow-img,
#slideshow-yoga,
#slideshow-stanza,
#slideshow-trekking,
#slideshow-gruppo {
  width: 100%;
  max-width: 500px;
  display: block;
  margin: 0 auto;
  border-radius: var(--border-radius);
  transition: var(--transition-smooth);
  opacity: 1;
}

.btn-cta {
  display: inline-block;
  margin-top: 2rem;
  padding: 1rem 2rem;
  background-color: var(--forest-green);
  color: var(--pure-white);
  text-decoration: none;
  border-radius: var(--border-radius);
  font-weight: 500;
  font-family: var(--font-sans);
  text-transform: capitalize;
  letter-spacing: 0.5px;
  transition: var(--transition-smooth);
  border: 2px solid var(--forest-green);
}

.btn-cta:hover {
  background-color: var(--natural-gold);
  border-color: var(--natural-gold);
  color: var(--forest-green);
  transform: translateY(-2px);
}

.detailed-service:nth-child(even) {
  background: linear-gradient(135deg, var(--warm-white) 0%, var(--pure-white) 100%);
}


/* ==========================================
   GALLERIA - Slideshow elegante
   ========================================== */

#galleria {
  max-width: var(--container-max-width);
  margin: 6rem auto;
  padding: 0 2rem;
  text-align: center;
}

.gallery-slideshow {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 15 / 8;
  overflow: hidden;
  border-radius: var(--border-radius);
  background: var(--light-grey);
  border: 1px solid var(--light-grey);
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0;
  box-sizing: border-box;
}

.slide.active {
  opacity: 1;
  position: relative;
  z-index: 1;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--border-radius);
  pointer-events: none;
  display: block;
  transition: var(--transition-smooth);
}

.gallery-slideshow button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.437);
  border: none;
  color: var(--pure-white);
  font-size: 1.8rem;
  padding: 0.2rem 0.8rem;
  cursor: pointer;
  z-index: 2;
  border-radius: 50%;
  transition: var(--transition-smooth);
  backdrop-filter: blur(10px);
}

.gallery-slideshow button:hover {
  background: var(--natural-gold);
  color: var(--forest-green);
  transform: translateY(-50%) scale(1.1);
}

.gallery-slideshow .prev {
  left: 1.3rem;
}

.gallery-slideshow .next {
  right: 1.3rem;
}

.dots-container {
  position: absolute;
  bottom: 2rem;
  width: 100%;
  text-align: center;
  z-index: 2;
}

.dots-container .dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin: 0 6px;
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: 2px solid var(--pure-white);
}

.dots-container .dot.active {
  background-color: var(--natural-gold);
  transform: scale(1.3);
}


/* ==========================================
   CONTATTI - Layout moderno e pulito
   ========================================== */

.contenitore-contatti {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 3rem;
  justify-content: center;
  max-width: var(--container-max-width);
  margin: 6rem auto;
  padding: 0 2rem;
}

.blocco {
  background: var(--pure-white);
  border-radius: var(--border-radius);
  border: 1px solid var(--light-grey);
  padding: 2rem;
  box-sizing: border-box;
  transition: var(--transition-smooth);
  position: relative;
}

.blocco::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--forest-green), var(--natural-gold));
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.blocco:hover {
  transform: translateY(-5px);
  border-color: var(--forest-green);
}

.blocco1 {
  background: var(--pure-white);
  border-radius: var(--border-radius);
  border: 1px solid var(--light-grey);
  padding: 2rem;
  box-sizing: border-box;
  min-height: 500px;
  transition: var(--transition-smooth);
  position: relative;
}

.blocco1::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--forest-green), var(--natural-gold));
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.blocco1:hover {
  transform: translateY(-5px);
  border-color: var(--forest-green);
}

.blocco1 h2 {
  font-size: 1.75rem;
  margin-bottom: 1.8rem;
  color: var(--forest-green);
  font-family: var(--font-serif);
  text-align: center;
  font-weight: 600;
}

.blocco1 h2 i {
  margin-left: 0.75rem;
  color: var(--natural-gold);
}

.blocco.padded {
  padding: 2.5rem;
}

.blocco h2 {
  font-size: 1.75rem;
  margin-bottom: 1.8rem;
  color: var(--forest-green);
  font-family: var(--font-serif);
  text-align: center;
  font-weight: 600;
}

.blocco h2 i {
  margin-left: 0.75rem;
  color: var(--natural-gold);
}
.orari-apertura {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 350px;
  color: #333;
  font-size: 1.05rem;
}

.orari-apertura li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  line-height: 1.4;
}

.orari-apertura i {
  color: #0b0e08;
  font-size: 1.2rem;
  min-width: 1.8rem;
  text-align: center;
}

/* Evidenziazione prenotazione */
.important {
  background: #fef7e0;
  padding: 0.7rem;
  border-left: 4px solid #d7a91c;
  border-radius: 8px;
}

.contatti-list {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 350px;
  color: #0b0e08;
}

.contatti-list li {
  display: flex;
  align-items: center;
  font-size: 1.1rem;
}

.contatti-list i {
  margin-right: 0.75rem;
  color: #0b0e08;
  font-size: 1.2rem;
  min-width: 1.8rem;
  text-align: center;
}

.contatti-list a {
  color: #0b0e08;
  text-decoration: none;
}

.contatti-list a:hover {
  text-decoration: underline;
}

.blocco p {
  text-align: center;
  margin-bottom: 1rem;
  color: #0b0e08;
  font-size: 1.05rem;
}

iframe {
  width: 100%;
  height: 280px;
  border: none;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.form-prenotazione {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

label {
  font-weight: 600;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

input,
textarea {
  padding: 0.7rem;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  background-color: #f0f4f2;
  color: #0b0e08;
  font-family: var(--font-sans);
}

textarea {
  resize: vertical;
}

button {
  background-color: #0b0e08;
  color: #fff;
  padding: 0.9rem;
  font-size: 1rem;
  font-weight: bold;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

button:hover {
  background-color: #3d4f2f;
}
/* ==========================================
   FOOTER - Design elegante e moderno
   ========================================== */

#footer {
  background: linear-gradient(135deg, var(--forest-green) 0%, #1e3a21 100%);
  color: var(--pure-white);
  padding: 4rem 2rem 2rem;
  margin-top: 6rem;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  max-width: var(--container-max-width);
  margin: 0 auto;
  align-items: flex-start;
  text-align: left;
}

.footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-logo img {
  max-width: 180px;
  height: auto;
  transition: var(--transition-smooth);
}

.footer-logo img:hover {
  transform: scale(1.05);
}

.footer-info,
.footer-services,
.footer-social {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-info h4,
.footer-services h4,
.footer-social h4 {
  font-size: 1.25rem;
  margin-bottom: 1.8rem;
  margin-top: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--pure-white);
}

#footer i {
  color: var(--natural-gold);
  margin-right: 0.75rem;
}

.footer-info h4 {
  margin-top: 0;
}

.footer-info p,
.footer-services p {
  margin: 0;
  line-height: 1.7;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
  font-family: var(--font-sans);
}

.footer-info a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.8);
  transition: var(--transition-fast);
  font-family: var(--font-sans);
}

.footer-info a:hover {
  color: var(--natural-gold);
  padding-left: 0.5rem;
}

.footer-social a {
  font-size: 1.8rem;
  margin-right: 1.8rem;
  color: rgba(255, 255, 255, 0.8);
  transition: var(--transition-fast);
  text-decoration: none;
}

.footer-social a:hover {
  color: var(--natural-gold);
  transform: scale(1.1);
}

.icon {
  min-width: 20px;
  text-align: center;
  color: var(--natural-gold);
}

#mini-footer {
  background: #1a2e1d;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  padding: 1.8rem;
  font-size: 0.9rem;
  font-weight: 400;
  font-family: var(--font-sans);
  letter-spacing: 0.5px;
  user-select: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-fab {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column-reverse; /* pulsante in basso, menu sopra */
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.contact-fab.visible {
  opacity: 1;
  visibility: visible;
}
.contact-fab button {
  background-color: #000000;
  color: white;
  border: none;
  border-radius: 50%;
  padding: 0.9rem;
  font-size: 1.5rem;
  cursor: pointer;
  transition: background-color 0.3s;
  z-index: 10000;
  box-shadow: 0 0 10px rgb(255, 255, 255);
}

.contact-fab button:hover {
  background-color: #000000;
}

.fab-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px); /* parte da sotto */
  transition: all 0.3s ease;
  pointer-events: none;
}

.contact-fab.open .fab-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.fab-menu a {
  background-color: #000000;
  color: white;
  text-decoration: none;
  margin: 0.3rem 0;
  padding: 0.7rem;
  border-radius: 50%;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.15);
  transition: background-color 0.3s;
}

.fab-menu a:hover {
  background-color: #2e3c22;
}


/* Efetti JS */

.fade-in {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-right {
  opacity: 0;
  transform: translateX(40px);
  transition: all 0.6s ease-out;
}
.fade-right.visible {
  opacity: 1;
  transform: translateX(0);
}
.fade-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: all 0.6s ease-out;
}
.fade-left.visible {
  opacity: 1;
  transform: translateX(0);
}

/* ==========================================
   LAZY LOADING STYLES
   ========================================== */

/* Stile per le immagini durante il caricamento lazy */
img[loading="lazy"] {
  transition: opacity 0.3s ease-in-out;
}

/* Placeholder per immagini non ancora caricate (solo per fallback JS) */
img[loading="lazy"]:not(.lazy-loaded):not(.lazy-error) {
  background-color: #f5f5f5;
  background-image: linear-gradient(45deg, #f0f0f0 25%, transparent 25%), 
                    linear-gradient(-45deg, #f0f0f0 25%, transparent 25%), 
                    linear-gradient(45deg, transparent 75%, #f0f0f0 75%), 
                    linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  min-height: 200px;
}

/* Smooth transition quando l'immagine è caricata */
img[loading="lazy"].lazy-loaded {
  opacity: 1;
}

/* Stile per immagini con errore di caricamento */
img[loading="lazy"].lazy-error {
  opacity: 0.5;
  background-color: #f8f8f8;
  border: 2px dashed #ddd;
}


/* ==========================================
   RESPONSIVE DESIGN - Mobile First
   ========================================== */

@media (max-width: 768px) {
  /* Mobile Navigation */

  body {
  background-color: #fffdf4;
  }
  .nav-container {
    padding: 0 1rem;
  }
  
  .nav-logo-img {
    height: 35px;
  }

  .hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 80%;
    max-width: 300px;
    background: linear-gradient(135deg, var(--forest-green) 0%, #1e3a21 100%);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: var(--transition-smooth);
    z-index: 1001;
    overflow-y: auto;
    padding: 2rem;
  }

  .nav-links.show {
    right: 0;
  }

  .nav-links li {
    margin: 0;
    width: 100%;
    text-align: center;
  }

  .nav-links a {
    font-size: 1.2rem;
    padding: 1rem;
    width: 100%;
    display: block;
    border-radius: var(--border-radius);
    background: rgba(255, 255, 255, 0.1);
    margin-bottom: 0.5rem;
  }

  .nav-links a::after {
    display: none;
  }

  /* Mobile overlay */
  .nav-links.show::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
  }

  /* Language bar mobile */
  .language-toggle {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }

  /* Hero mobile */
  .hero-section {
    min-height: 70vh;
    padding: 6rem 1rem 4rem;
    background-attachment: scroll;
  }

  .hero-logo img {
    max-width: 280px;
  }

  .hero-title {
    font-size: clamp(2rem, 8vw, 2.8rem);
  }

  .hero-subtitle {
    font-size: clamp(1rem, 4vw, 1.4rem);
  }

  .hero-description {
    font-size: 1rem;
    padding: 1.2rem 1.8rem;
    margin-bottom: 2rem;
  }

  .hero-cta {
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 3rem;
  }

  .cta-primary,
  .cta-secondary {
    font-size: 1rem;
    padding: 0.9rem 1.8rem;
    width: 100%;
    max-width: 250px;
  }

  /* Servizi mobile */
  .service-list {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }

  .service-item {
    padding: 1.2rem;
  }

  /* Detailed service mobile */
  .detailed-service {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
    padding: 2rem 1rem;
  }

  .detailed-service img {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 12px;
  }

  .descrizione-servizio {
    min-width: auto;
    text-align: center;
  }
  .hero-cta .cta-primary, .hero-cta .cta-secondary {
    max-width: 100%;
    text-align: center;
  }
  #content{
    overflow: hidden;
  }

  .descrizione-servizio h3 {
    font-size: 1.8rem;
    text-align: center;
  }

  .mezzo {
        background-attachment: scroll;
        height: 300px;
  }
  .mezzo p {
    font-size: 1.4rem;
    padding: 0.2rem;
    max-width: 90%;
    margin: 0 auto;
    background-color: rgba(255, 255, 255, 0.754);
  }   

  #galleria {
    border-radius: 15px;
    margin-bottom: 8vh;
    width: 100%;
    background-color: #ffffff9f;
  }
#galleria .prev,
#galleria .next  {
  display: none;
} 

  .gallery-slideshow {
    aspect-ratio: 6 / 8; /* adatta a schermi più piccoli */
    border-radius: 12px;
  }
  
  .dots-container {
    display: none;
  }


  .slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;    

  }

  .caption {
    font-size: 1rem;
    padding: 8px 12px;
    border-radius: 0 0 12px 12px;
  }


  #contatti-mappa{
  width: 90%;
 margin: auto;
  }
  .blocco1,
  .blocco {
    flex: 1 1 100%;
    height:auto;
  }

  form {
    grid-template-columns: 1fr 1fr;
    gap: 1rem 2rem;
  }

  label,
  input,
  textarea {
    grid-column: span 2;
  }

  /* Per affiancare nome e email */
  #nome,
  #email,
  #telefono,
  #data,
  #persone {
    grid-column: span 1;
  }

  button {
    grid-column: span 2;
    justify-self: start;
    padding: 0.75rem 2rem;
  }

  #footer {
   margin-top: 3rem;
   height: auto;
  }
  .footer-container {
    text-align: left;
  }

  .footer-logo,
  .footer-info,
  .footer-services,
  .footer-social {
    align-items: left;
  }

  .footer-social {
    display: none;
  }
    .contact-fab {
    bottom: 0.7rem;
    right: 0.7rem;
    flex-direction: column-reverse; /* mantiene il layout */
  }

  .contact-fab button {
    padding: 0.5rem 0.5rem;
    font-size: 1.2rem;
    box-shadow: 0 0 6px rgb(255, 255, 255);
  }

  .fab-menu a {
    margin: 0.25rem 0;
    padding: 0.6rem;
    font-size: 1.1rem;
    width: 40px;
    height: 40px;
  }
    .home-button {
    bottom: 0.7rem;
    left: 0.7rem;
    padding: 0.1rem 0.5rem;
    font-size: 1rem;
    box-shadow: 0 0 6px rgb(255, 255, 255);
  }
}

@media (max-width: 480px) {
  /* Extra small mobile */
  .nav-logo-img {
    height: 30px;
  }
  
  .language-toggle {
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
  }

  .hero-section {
    padding: 5rem 1rem 3rem;
  }

  .hero-logo img {
    max-width: 240px;
  }

  .hero-title {
    font-size: clamp(1.8rem, 7vw, 2.4rem);
  }

  .hero-description {
    font-size: 0.95rem;
    padding: 1rem 1.2rem;
  }

  .cta-primary,
  .cta-secondary {
    font-size: 0.95rem;
    padding: 0.8rem 1.8rem;
  }

  .service-item {
    padding: 1rem;
  }

  .detailed-service {
    padding: 1.8rem 0.8rem;
  }

  .gallery-slideshow .prev,
  .gallery-slideshow .next {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
  }

  .dots-container {
    bottom: 0.5rem;
  }
}

@media (min-width: 769px) {
  /* Desktop: hide hamburger and show normal navigation */
  .hamburger {
    display: none;
  }
  
  .nav-links {
    position: static;
    flex-direction: row;
    background: none;
    height: auto;
    width: auto;
    padding: 0;
    transform: none;
    transition: none;
  }

  .nav-links li {
    width: auto;
  }

  .nav-links a {
    width: auto;
    background: none;
    margin: 0;
  }

  .hero-section {
    background-attachment: fixed;
  }
}
