/* =========================================================
   BASE / THEME
========================================================= */
:root{
  --bg:#f0f0f0;
  --brand:#2e1760;
  --rose:#ff6688;
  --ink:#111;
  --text:#3a2a20;
  --paper:#fff;
  --muted:#666;
  --muted-2:#444;
  --ring:rgba(122,59,46,.18);
  --shadow:0 8px 24px rgba(0,0,0,.08);
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body{
  margin:0; padding:0;
  background:var(--bg);
  font-family:'Playfair Display', serif;
  color:var(--ink);
}

html.no-scroll,
html.menu-open { overflow:hidden; }

a{ color:inherit; text-decoration:none; }
a:focus-visible,
button:focus-visible{ outline:2px solid var(--rose); outline-offset:2px; }

img{ max-width:100%; display:block; }

/* Smooth scroll + compensazione header sticky */
html{ scroll-behavior:smooth; scroll-padding-top: var(--header-h, 72px); }

/* Riduci animazioni se richiesto */
@media (prefers-reduced-motion: reduce){
  *{ animation-duration:0.01ms !important; animation-iteration-count:1 !important; transition-duration:0.01ms !important; scroll-behavior:auto !important; }
}

/* Utilità */
.visually-hidden{ position:absolute !important; height:1px; width:1px; overflow:hidden; clip:rect(1px,1px,1px,1px); white-space:nowrap; }

/* =========================================================
   HEADER / NAV
========================================================= */
.site-header{
  position:sticky; top:0; z-index:9000;
  background:var(--brand);
  box-shadow:0 2px 6px rgba(0,0,0,0.1);
}

/* Griglia simmetrica: left | logo | right */
.nav-container{
  width:100%;
  max-width:1200px;
  margin:0 auto;
  padding:10px 20px;
  display:grid;
  grid-template-columns: 1fr auto 1fr;
  align-items:center;
  gap:20px;
  position:relative;
}
.nav-left{ justify-self:start; display:flex; gap:20px; }
.nav-right{ justify-self:end; display:flex; align-items:center; gap:20px; }

/* Link desktop */
.nav-left a, .nav-right a{
  color:#fff; font-weight:500; font-size:1rem; text-transform:capitalize;
  position:relative; padding-bottom:4px; transition:color .3s ease;
}
.nav-left a::after, .nav-right a::after{
  content:""; position:absolute; left:0; bottom:0; width:0%; height:2px; background:var(--rose);
  transition: width .35s cubic-bezier(.34,1.56,.64,1);
}
.nav-left a:hover::after, .nav-right a:hover::after{ width:100%; }
.nav-left a:hover, .nav-right a:hover{ color:var(--rose); }

/* Logo */
.logo{ text-align:center; color:var(--rose); padding:4px; transform:translateX(8px); } /* compensazione ottica */
.logo-main{ font-weight:700; letter-spacing:2px; text-transform:uppercase; }
.logo-sub{ font-size:.85rem; color:var(--rose); margin-top:2px; }

/* CTA Prenota (desktop) */
.nav-right a.cta-prenota{
  background:var(--rose);
  color:#fff !important;
  font-weight:600;
  padding:10px 22px;
  border-radius:30px;
  text-transform:uppercase;
  letter-spacing:.5px;
  box-shadow:0 4px 12px rgba(255,102,136,.3);
  transition:all .35s ease;
  margin-left:20px;
  top:-2px; position:relative;
}
.nav-right a.cta-prenota:hover{
  background:var(--brand);
  color:#fff !important;
  transform:translateY(-2px);
  box-shadow:0 6px 18px rgba(46,23,96,.35);
}
/* niente underline per la CTA */
.nav-right a.cta-prenota::after{ display:none; }

/* Hamburger (mobile) */
.hamburger{
  display:none; flex-direction:column; gap:5px; cursor:pointer; background:none; border:0;
}
.hamburger span{ width:25px; height:3px; background:#fff; border-radius:3px; transition:transform .3s ease, opacity .3s ease; }
.hamburger.active span:nth-child(1){ transform:rotate(45deg) translate(5px,5px); }
.hamburger.active span:nth-child(2){ opacity:0; }
.hamburger.active span:nth-child(3){ transform:rotate(-45deg) translate(6px,-6px); }

/* Mobile menu: overlay fisso sotto l’header */
.mobile-menu{
  position: fixed;
  inset: calc(var(--header-h, 64px)) 0 0 0; /* top = altezza header, resto pieno */
  display: none;
  flex-direction: column;
  gap: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  padding: 20px;
  z-index: 11000;
  overflow-y: auto;
}
.mobile-menu a{
  color: var(--brand);
  font-weight: 500;
  font-size: 1.1rem;
  padding: 12px 4px;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.mobile-menu.is-open{ display:flex; }

/* CTA mobile */
.mobile-menu a.cta-prenota{
  background:var(--rose); color:#fff !important; display:block; text-align:center;
  border-radius:40px; padding:14px 0; margin-top:10px; font-size:1rem;
  box-shadow:0 3px 10px rgba(255,102,136,.35); transition:background .3s ease;
}
.mobile-menu a.cta-prenota:active{ background:var(--brand); transform:scale(.98); }

/* Backdrop opzionale */
.mobile-backdrop{
  position: fixed; inset: calc(var(--header-h, 64px)) 0 0 0;
  background: rgba(0,0,0,.35); z-index:10000; display:none;
}
.mobile-backdrop.is-open{ display:block; }

/* Responsive nav */
@media (max-width:768px){
  .nav-left, .nav-right{ display:none; }
  .hamburger{ display:flex; }
}

/* =========================================================
   HERO
========================================================= */
.hero{
  position:relative; height:92vh; color:#fff; text-align:center;
  display:flex; align-items:flex-end; justify-content:center; overflow:hidden;
  --video-scale: 1;
  --overlay-alpha: 0.600;
  --content-opacity: 1;
  --content-translate: 0px;
  --video-blur: 0px;
}
.hero-video{
  position:absolute; inset:0; width:100%; height:100%;
  object-fit:cover; z-index:0;
  transform: scale(var(--video-scale));
  transform-origin:center center;
  filter: blur(var(--video-blur));
  will-change: transform, filter;
  pointer-events:none;
}
.hero-overlay{
  position:absolute; inset:0; background:rgba(0,0,0,var(--overlay-alpha)); z-index:1;
  will-change: background-color;
}
.hero-content{
  position:relative; z-index:2; max-width:700px; padding:20px; margin-bottom:60px;
  opacity: var(--content-opacity);
  transform: translateY(var(--content-translate));
  will-change: opacity, transform;
}
.hero-content h1{
  font-size:clamp(2rem, 4.5vw, 3rem); line-height:1.3; font-weight:600; color:rgb(230,235,255);
}

/* Prefer reduced motion */
@media (prefers-reduced-motion: reduce){
  .hero-video{ transform: scale(1) !important; filter:none !important; }
  .hero-overlay{ background: rgba(0,0,0,0.40) !important; }
  .hero-content{ opacity:1 !important; transform:none !important; }
}

/* =========================================================
   SOCIAL FIXED
========================================================= */
.social-icons{
  position:fixed; top:50%; right:20px; transform:translateY(-50%);
  display:flex; flex-direction:column; gap:20px; z-index:5;
}
.social-icons a{
  color:#fff; font-size:1.5rem;
  transition: color .5s ease, transform .4s cubic-bezier(.34,1.56,.64,1), filter .5s ease, text-shadow .3s ease;
}
@media (hover:hover){
  .social-icons a:hover, .social-icons a:focus{
    transform:translateX(-8px) scale(1.15);
    color:var(--rose); text-shadow:0 0 10px rgba(245,169,255,.6);
  }
}
@media (max-width:768px){ .social-icons{ display:none; } }
.social-icons.scrolled a{ color:#000; filter:brightness(.6); }

/* Bande laterali decorative */
.side-colors{ position:fixed; top:0; bottom:0; width:60px; z-index:1; }
.side-left{ left:0; background:var(--brand); z-index:2; }
.side-right{ right:0; background:transparent; }
@media (max-width:768px){ .side-colors{ width:8px; } }

/* =========================================================
   PARALLAX QUOTE
========================================================= */
.parallax-zoom-section{
  background-image:url('/assets/img/coppia-design.webp');
  background-position:center; background-repeat:no-repeat; background-size:cover;
  background-attachment:fixed;
  min-height:80vh; display:flex; justify-content:center; align-items:center; color:#fff; text-align:center; padding:20px; position:relative;
}
.parallax-content blockquote{
  font-size:clamp(1.6rem, 2.5vw, 2rem);
  max-width:800px; background:rgba(0,0,0,.4); padding:30px 20px; border-radius:10px; line-height:1.5;
}
.parallax-content cite{ display:block; margin-top:15px; font-size:1.1rem; font-style:italic; color:#ffd1dc; }

/* Evita background-attachment su iOS/Android */
@supports (-webkit-touch-callout: none){
  .parallax-zoom-section{ background-attachment:scroll; }
}

/* =========================================================
   BIO
========================================================= */
.bio-section{ background:rgb(230,235,255); padding:60px 20px; text-align:center; }
.bio-section h2{ font-size:2.5rem; margin-bottom:20px; color:var(--brand); }
.bio-section p{ font-size:1.15rem; max-width:800px; margin:0 auto 20px; color:#333; text-align:left; }
.bio-container p:first-child{ padding-top:40px; }

/* =========================================================
   SERVICES (SEZIONE + CARDS HERO)
========================================================= */
.services-section{ background:rgb(230,235,255); padding:60px 20px; text-align:center; position:relative; overflow:hidden; }
.services-section h2{ font-size:2.5rem; margin-bottom:40px; color:var(--brand); }

.cards-section{
  display:grid; grid-template-columns:repeat(2, 1fr);
  gap:10px; width:100%;
}
@media (max-width:1024px){ .cards-section{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:600px){ .cards-section{ grid-template-columns:1fr; } }

.card{
  position:relative; height:400px; color:#fff; display:flex; align-items:flex-end; overflow:hidden;
}
.card-bg{
  position:absolute; inset:0; background-size:cover; background-position:center; filter:brightness(70%); transition:transform .4s ease;
}
@media (hover:hover){ .card:hover .card-bg{ transform:scale(1.05); } }
.card-content{ position:relative; z-index:2; margin:0 auto; padding:2rem; text-align:left; }
.card h3{ font-size:1.4rem; line-height:1.4; margin:0 0 1rem 0; }
.card .cta{
  background:#fff; color:var(--brand); font-size:1rem; padding:12px 24px; border:0; border-radius:6px; cursor:pointer;
  transition:transform .35s cubic-bezier(.34,1.56,.64,1), box-shadow .35s ease, background-color .35s ease, color .35s ease;
}
@media (hover:hover){
  .card .cta:hover, .card .cta:focus{
    transform:translateY(-4px) scale(1.05); box-shadow:0 8px 18px rgba(0,0,0,.15); background:var(--brand); color:#fff;
  }
}
@media (max-width:600px){ .card{ height:300px; } }

/* Entrata sezione servizi */
.services-section .container{
  max-width:1100px; margin:0 auto; padding:0 20px;
  position:relative; z-index:2;
  opacity:0; transform:translateY(40px);
  transition:opacity .9s ease-out, transform .9s ease-out;
}
.services-section.carousel.visible .container{ opacity:1; transform:translateY(0); }

/* Overlay/parallax del carousel */
.services-section.carousel{ padding:72px 0; color:var(--text); background:#fff; }
.services-section.carousel::before{
  content:""; position:absolute; inset:0; background:rgba(0,0,0,.0);
  transform:translateY(0); transition:transform .9s ease-out, background .6s ease; z-index:1;
}
.services-section.carousel.scrolled::before{
  background:rgba(0,0,0,.06); transform:translateY(-12%);
}

/* =========================================================
   SWIPER “SERVICE-CARD”
========================================================= */
.services-swiper{ position:relative; padding:14px 6px 48px; }

.service-card{
  background:var(--paper) url('/assets/img/melograno.png') center/cover no-repeat fixed;
  border-radius:20px; box-shadow:var(--shadow); padding:24px 18px; height:100%;
  display:flex; flex-direction:column; align-items:center; text-align:center;
  transition:transform .25s ease, box-shadow .25s ease; border:1px solid rgba(0,0,0,0);
}
@media (hover:hover){ .service-card:hover{ transform:translateY(-4px); box-shadow:0 12px 28px rgba(0,0,0,.10); } }
.service-icon{ width:72px; height:72px; margin-bottom:12px; }
.service-title{ font-size:1.2rem; margin:6px 0 8px; color:rgb(230,235,255); }
.service-text{ font-size:.95rem; line-height:1.5; font-weight:300; color:var(--ink); }

.swiper-button-prev,.swiper-button-next{
  width:40px; height:40px; background:var(--paper); box-shadow:var(--shadow); border:1px solid rgba(0,0,0,.05);
  top:80% !important;
}
.swiper-button-prev::after,.swiper-button-next::after{ font-size:16px; color:var(--brand); }
.swiper-pagination-bullet{ background:#c58f82; opacity:.6; }
.swiper-pagination-bullet-active{ background:var(--brand); opacity:1; box-shadow:0 0 0 6px var(--ring); }

/* Uniforma altezza slide specifica */
#swiper-altri .swiper-slide{ height:auto; }
#swiper-altri .service-card{ height:100%; }
@media (max-width:480px){ #swiper-altri .service-text{ font-size:.92rem; } }

#servizi-altri{ padding:10px 40px 80px; }

/* Fallback no-JS */
.no-js .services-section.carousel .container{ opacity:1 !important; transform:none !important; }
.no-js-grid ul{
  display:grid; grid-template-columns:repeat(auto-fit, minmax(220px,1fr));
  gap:12px; margin-top:20px; list-style:none; padding:0;
}
.no-js-grid li{
  background:var(--paper); border-radius:12px; padding:14px; border:1px solid rgba(0,0,0,.05);
}

/* =========================================================
   METODO
========================================================= */
.metodo-section{ background:rgb(230,235,255); padding:80px 20px; text-align:center; }
.metodo-container{ max-width:800px; margin:0 auto; color:#333; }
.metodo-container h2{ font-size:2.6rem; margin-bottom:30px; color:var(--brand); }
.metodo-container p{ font-size:1.15rem; line-height:1.7; margin-bottom:20px; }
strong{ color:var(--rose); }
@media (max-width:768px){
  .metodo-container h2{ font-size:2.2rem; }
  .metodo-container p{ font-size:1.05rem; }
}

/* =========================================================
   FAQ
========================================================= */
.faq-section{ background:#f9f9f9; padding:80px 20px; }
.faq-container{ max-width:1200px; margin:0 auto; display:flex; gap:60px; align-items:flex-start; }
.faq-left{ flex:1; }
.faq-left h2{ font-size:2.5rem; margin-bottom:20px; color:#1e1e1e; }
.faq-left p{ font-size:1.1rem; color:#666; }
.faq-right{ flex:2; }

.faq-item{ margin-bottom:20px; border-bottom:1px solid #ddd; }
.faq-question{
  width:100%; background:none; border:none; text-align:left; padding:15px 0;
  font-size:1.2rem; font-weight:700; cursor:pointer; position:relative;
}
.faq-question::after{ content:'▾'; position:absolute; right:0; transition:transform .3s ease; }
.faq-answer{
  display:block; height:0; overflow:hidden; padding:0;
  transition: height .35s ease, padding .35s ease;
  font-size:1rem; color:#444; padding-right:20px;
}
.faq-item.active .faq-answer{ padding:10px 0; } /* height:auto gestita da JS */
.faq-item.active .faq-question::after{ transform:rotate(180deg); }

@media (max-width:768px){ .faq-container{ flex-direction:column; } }

/* =========================================================
   ICON SECTION (optional)
========================================================= */
.icon-features{ display:flex; justify-content:center; gap:40px; margin-top:30px; }
.icon-box{ text-align:center; width:160px; }
.icon-box i{ font-size:2.5rem; color:var(--rose); margin-bottom:10px; }
.icon-box p{ font-size:1.1rem; margin:0; color:var(--brand); }
@media (max-width:768px){ .icon-features{ flex-direction:column; align-items:center; } }

/* =========================================================
   MODAL FULL PAGE
========================================================= */
.modal[aria-hidden="true"]{ display:none; }
.modal{
  position:fixed; inset:0; z-index:12000; display:flex; align-items:center; justify-content:center; overflow-y:auto;
}
.modal-overlay{
  position:absolute; inset:0; background:rgba(0,0,0,.75); backdrop-filter:blur(6px); transition:opacity .3s ease; z-index:1;
}
.modal-dialog{
  position:relative; background:#fff; border-radius:16px; 
  width: min(760px, calc(100vw - 32px));
  margin: 16px;
  padding:28px;
  max-height: calc(100dvh - 160px);
  overflow:auto;
  box-shadow:0 10px 40px rgba(0,0,0,.3); z-index:2; transform:scale(.95); opacity:0; transition:all .3s ease;
}
.modal[aria-hidden="false"] .modal-dialog{ transform:scale(1); opacity:1; }
.modal-close{ position:absolute; top:10px; right:12px; border:0; background:transparent; font-size:28px; cursor:pointer; }
.modal-body h2{ margin:0 0 .5rem; font-size:1.8rem; }
.modal-body p{ margin:.5rem 0 1rem; line-height:1.6; }

.services{ list-style:none; margin:0; padding:0; display:grid; grid-template-columns:1fr 1fr; gap:.6rem 1rem; }
.services li button{
  width:100%; text-align:left; background:#f8f8f8; border:1px solid #e5e5e5; border-radius:8px; padding:.7rem 1rem; cursor:pointer; transition:background .2s ease;
}
@media (hover:hover){ .services li button:hover{ background:#ececec; } }
@media (max-width:640px){ .services{ grid-template-columns:1fr; } }

/* Modal mobile 375x667 */
@media (max-width:480px){
  .modal-dialog{
    width: calc(100vw - 24px);
    margin: 12px; padding: 16px; border-radius: 12px;
    max-height: calc(100dvh - 160px);
  }
}
@supports (padding: max(0px)){
  .modal-dialog{ padding-bottom: max(16px, env(safe-area-inset-bottom)); }
}

/* =========================================================
   FOOTER
========================================================= */
.site-footer{
  background:rgb(230,235,255);
  padding:60px 0 0; color:var(--ink);
  opacity:0; transform:translateY(50px);
  transition:opacity 1s ease-out, transform 1s ease-out;
}
.site-footer.visible{ opacity:1; transform:translateY(0); }

.footer-top{ text-align:center; margin-bottom:50px; }
.footer-subtitle{ font-size:.9rem; text-transform:uppercase; letter-spacing:1px; margin-bottom:10px; color:#333; }
.footer-email{ font-size:1.8rem; font-weight:700; margin-bottom:10px; }
.footer-email a{ color:inherit; }
.footer-line{ width:80px; height:1px; background:#111; margin:0 auto; }

.footer-grid{
  display:grid; grid-template-columns:repeat(auto-fit, minmax(200px,1fr));
  gap:40px; margin-top:40px; text-align:center;
}
.footer-column h3{ text-transform:uppercase; font-size:1rem; margin-bottom:10px; color:#000; }
.footer-column p{ font-size:.95rem; margin:5px 0; }
.footer-column a{ color:#333; }

.footer-bottom{
  position:relative; z-index:1000;
  display:flex; justify-content:space-between; align-items:center; gap:16px;
  padding:0 40px; margin-top:50px; flex-wrap:wrap;
  background:var(--brand); color:#fff; font-size:.95rem; border-top:1px solid rgba(255,255,255,.1);
  opacity:0; transform:translateY(40px);
  transition:opacity 1s ease-out, transform 1s ease-out;
}
.footer-bottom.visible, .site-footer.visible .footer-bottom{
  opacity:1; transform:translateY(0); padding:20px;
}
.footer-left{ margin-left:50px; }
.footer-right{ margin-right:50px; }

.footer-left ul{ list-style:none; display:flex; gap:20px; margin:0; padding:0; }
.footer-left li{ position:relative; cursor:pointer; transition:color .3s ease; }
.footer-left li::after{
  content:""; position:absolute; bottom:-3px; left:0; width:0%; height:2px; background:var(--rose);
  transition:width .35s cubic-bezier(.34,1.56,.64,1);
}
@media (hover:hover){
  .footer-left li:hover{ color:var(--rose); }
  .footer-left li:hover::after{ width:100%; }
}
.footer-center{ text-align:center; flex:1; font-size:.9rem; opacity:.9; }
.footer-right{ font-size:.9rem; text-align:right; font-weight:500; cursor:pointer; transition:color .3s ease; }
@media (hover:hover){ .footer-right:hover{ color:var(--rose); } }

@media (max-width:768px){
  .footer-bottom{ flex-direction:column; text-align:center; gap:10px; padding:20px; }
  .footer-left{ margin-left:0; }
  .footer-right{ margin-right:0; text-align:center; }
  .footer-left ul{ justify-content:center; }
}

/* =========================================================
   FIX NAV MOBILE - logo centrato, hamburger a destra
========================================================= */
@media (max-width: 768px){
  .nav-container {
    width: 100%;
    max-width: none;
    padding: 10px 16px;
    display: grid;
    grid-template-columns: 1fr auto; /* logo centrato - hamburger a destra */
    align-items: center;
    position: relative;
  }

  /* Nascondi i menu desktop */
  .nav-left,
  .nav-right {
    display: none !important;
  }

  /* Logo centrato */
  .logo {
    grid-column: 1 / 2;
    justify-self: center;
    transform: none;
  }

  /* Hamburger a destra */
  .hamburger {
    grid-column: 2 / 3;
    justify-self: end;
    display: flex;
    position: relative;
    z-index: 9999; /* sopra overlay */
  }

  /* Evita che il logo si sposti quando il menu si apre */
  .mobile-menu.is-open {
    padding-top: calc(var(--header-h, 64px) + 10px);
  }

  /* Allinea hamburger verticalmente */
  .hamburger span {
    background: #fff;
  }
}

/* =========================================================
   TYPEWRITER EFFECT - seconda riga dinamica
========================================================= */
#typewriter-text {
  display: inline-block;
  color: #e6ebff;
  font-weight: 600;
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.3;
  text-align: center;
}

#typewriter-text .first-line {
  display: block;
  margin-bottom: 0.2em;
}

#typewriter-text .second-line {
  display: block;
}

.changing-word {
  border-right: 2px solid rgba(255, 255, 255, 0.8);
  padding-right: 4px;
  white-space: nowrap;
  overflow: hidden;
  display: inline-block;
  vertical-align: bottom;
  animation: blinkCursor 0.7s steps(1) infinite;
}

@keyframes blinkCursor {
  50% {
    border-color: transparent;
  }
}