/* ===== RIME — stile base elegante ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&family=Cormorant+Garamond:wght@400;600&display=swap');

:root {
  --bg: #b88f68;        /* beige scuro */
  --text: #ffffff;      /* testo bianco */
  --accent: #bfa77f;    /* oro tenue */
  --max-width: 980px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Cormorant Garamond', serif;
  line-height: 1.8;
  font-size: 18px;
}

html {
  scroll-behavior: smooth;
}

/* ----- Contenitori principali ----- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 60px 20px;
}

section {
  margin-bottom: 80px;
}

/* ----- Tipografia ----- */
h1, h2, h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  color: var(--text);
}

h1 {
  font-size: 46px;
  text-align: center;
  margin-bottom: 20px;
}

h2 {
  font-size: 32px;
  margin-top: 60px;
  margin-bottom: 20px;
}

p {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  margin-bottom: 16px;
  text-align: justify;
}

/* ----- Navigazione CLASSICA (non hero) ----- */
nav {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 30px 0;
}

nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 6px 18px;
  border-radius: 20px;
  transition: all 0.3s ease;
}

nav a:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

/* ----- Galleria semplice ----- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.gallery .ph {
  width: 100%;
  aspect-ratio: 1/1;
  background: rgba(255, 255, 255, 0.1);
  border: 1px dashed rgba(255, 255, 255, 0.3);
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.6);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  border-radius: 10px;
}

/* ----- Footer ----- */
footer {
  text-align: center;
  padding: 40px 20px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* ------------------------------
   FINESTRA DI VERIFICA ETÀ
------------------------------ */

.age-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #c1af8f;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 99999;
  text-align: center;
  color: #fff;
  font-family: "Cormorant Garamond", serif;
  overflow: hidden;
}

.age-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 70vw;
  max-width: 800px;
  transform: translate(-50%, -50%);
  opacity: 0.12;
  filter: invert(1) brightness(1.1);
  pointer-events: none;
  z-index: 1;
}

.age-box {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 12px;
  max-width: 420px;
  padding: 50px 35px;
  z-index: 2;
  box-shadow: 0 2px 18px rgba(0,0,0,0.3);
  animation: fadeIn 1.2s ease;
}

.age-box h2 {
  font-size: 26px;
  line-height: 1.4;
  color: #fff;
  margin-bottom: 30px;
}

.age-box .buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.age-box button {
  padding: 12px 28px;
  border-radius: 6px;
  border: 1px solid #fff;
  cursor: pointer;
  font-size: 16px;
  font-family: Inter, sans-serif;
  transition: all 0.25s ease;
  background: transparent;
  color: #fff;
}

.age-box button:hover {
  background: #fff;
  color: #222;
  transform: scale(1.05);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== HERO (immagine singola) ===== */
.hero {
  position: relative;
  min-height: 100vh;
  background: url('hero.jpg') center/cover no-repeat fixed;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

.hero__shade{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.25);
  z-index: 1;
}

.hero__content{
  position: relative;
  z-index: 2;
  padding: 0 20px;
  text-align: center;
}

.hero h1{
  font-family: "Cormorant Garamond", serif;
  font-size: 90px;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 25px;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.35);
}

.hero__subtitle{
  font-family: "Cormorant Garamond", serif;
  font-size: 36px;
  font-weight: 300;
  color: #f8f8f8;
  text-align: center;
  margin-top: 10px;
  text-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.hero__scroll{
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  color: rgba(255,255,255,.9);
  text-decoration: none;
  font-size: 28px;
  z-index: 2;
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse{
  0%,100%{ transform: translate(-50%,0); opacity:.9; }
  50%{ transform: translate(-50%,8px); opacity:.6; }
}

@media (max-width: 880px){
  .hero h1{ font-size: 40px; }
  .hero__subtitle{ font-size: 18px; }
}
@media (max-width: 520px){
  .hero h1{ font-size: 32px; }
  .hero__subtitle{ font-size: 16px; }
}

/* =======================
   HEADER CENTRALE E MENU
======================= */

.hero-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-top: 10px;
  z-index: 9999;
  pointer-events: auto;
}

/* LOGO centro in alto */
.hero-logo {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  transition: all .35s ease;
  pointer-events: auto;
}

.hero-logo img {
  height: 200px;
  width: auto;
  display: block;
  filter: none;
  transition: all 0.35s ease;
}

.hero-logo:hover img { 
  transform: scale(1.04); 
}

/* Stato scrollato: logo a sinistra */
body.is-scrolled .hero-logo {
  left: 20px;
  transform: none;
}
body.is-scrolled .hero-logo img {
  height: 108px;
}


/* Barra menu: centrata sotto il logo (desktop) */
.hero-nav {
  position: fixed;
  top: calc(10px + 200px + 10px);
  left: 50%;
  transform: translate(-50%, -8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
}

/* HOVER SOLO DESKTOP */
@media (min-width: 821px){
  .hero-header:hover .hero-nav,
  .hero-logo:hover ~ .hero-nav,
  .hero-nav:hover {
    opacity: 1;
    transform: translate(-50%, 0);
    pointer-events: auto;
  }
}

/* Link menu hero */
.hero-nav a {
  color: #fff;
  text-decoration: none;
  font-family: "Cormorant Garamond", serif;
  font-size: 20px;
  letter-spacing: 0.5px;
  padding: 8px 16px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 18px;
  backdrop-filter: blur(6px);
  background: rgba(0,0,0,0.22);
  transition: color 0.25s ease, transform 0.25s ease, background 0.25s ease;
}
.hero-nav a:hover {
  color: #f6e6be;
  transform: translateY(-2px);
  background: rgba(0,0,0,0.32);
}

/* Stato scrollato (sticky) desktop */
body.is-scrolled .hero-logo {
  left: 20px;
  transform: none;
}
body.is-scrolled .hero-logo img {
  height: 108px;
}

body.is-scrolled .hero-nav {
  left: 0;
  top: 18px;
  transform: none;
  justify-content: flex-start;
  opacity: 0;
  pointer-events: none;
  margin-left: 530px;
}

@media (min-width: 821px){
  body.is-scrolled .hero-header:hover .hero-nav,
  body.is-scrolled .hero-logo:hover ~ .hero-nav,
  body.is-scrolled .hero-nav:hover {
    opacity: 1;
    pointer-events: auto;
  }
}

/* Sicurezza */
.hero-logo{ pointer-events: auto; z-index: 10000; }

/* ========= Mobile (≤ 820px) ========= */
@media (max-width: 820px){

  /* Logo: grande, poi piccolo quando scrolli */
  .hero-logo img{
    height: 90px;
    transition: height .3s ease;
  }
  body.is-scrolled .hero-logo img{
    height: 55px;
  }

  /* Menu mobile: chiuso di default, sotto al logo */
  .hero-nav{
    position: fixed;
    top: 90px;                   /* distanza dal top */
    left: 50%;
    transform: translate(-50%, -8px);
    gap: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
  }

  /* disattiva qualsiasi hover su mobile */
  .hero-header:hover .hero-nav,
  .hero-logo:hover ~ .hero-nav,
  .hero-nav:hover{
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translate(-50%, -8px) !important;
  }

  /* Stato aperto: il JS aggiunge .open */
  .hero-nav.open{
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translate(-50%, 0) !important;
    margin-left: 20px !important;  /* un filo più a destra rispetto al logo */
  }

  /* Quando scrolli: menu a destra del logo */
  body.is-scrolled .hero-nav{
    top: 14px;
    left: 90px;
    right: auto;
    transform: none;
    margin-left: 0 !important;
  }
  body.is-scrolled .hero-nav.open{
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translate(0, 0) !important;
  }
}

/* ====== 4 QUADRI ====== */
.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 22px;
  margin-top: 30px;
}
@media (max-width: 820px){
  .cards { grid-template-columns: 1fr; }
}

.card {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 160px;
  padding: 22px 24px;
  text-decoration: none;
  color: #fff;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 16px;
  background: rgba(0,0,0,.18);
  backdrop-filter: blur(6px);
  transition: transform .25s ease, background .25s ease, border-color .25s ease;
}
.card h3 {
  font-size: 26px;
  letter-spacing: .3px;
}
.card p {
  margin: 0;
  text-align: left;
  color: rgba(255,255,255,.9);
  font-family: "Inter", sans-serif;
}
.card:hover {
  transform: translateY(-4px);
  background: rgba(0,0,0,.28);
  border-color: rgba(255,255,255,.4);
}

/* ====== BANNER DIVISORE ====== */
.divider-banner {
  position: relative;
  min-height: 42vh;
  background: url('assets/css/hero.jpg') center/cover no-repeat fixed;
  margin: 40px 0;
}
.divider-banner::before{
  content:"";
  position:absolute; inset:0;
  background: linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,.25));
}

/* ====== GALLERIA ORIZZONTALE (vecchio stile) ====== */
.hscroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 6px;
}
.hscroll img {
  height: 220px;
  width: auto;
  flex: 0 0 auto;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.12);
  scroll-snap-align: start;
  object-fit: cover;
  transition: transform .25s ease;
}
.hscroll img:hover { transform: scale(1.02); }

/* ====== CONTATTI ====== */
.contacts {
  background: rgba(0,0,0,.14);
  border-top: 1px solid rgba(255,255,255,.18);
  border-bottom: 1px solid rgba(255,255,255,.18);
  padding: 40px 0;
}
.contacts__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}
.btn {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 24px;
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.22);
  transition: background .25s ease, transform .2s ease;
}
.btn:hover {
  background: rgba(0,0,0,.32);
  transform: translateY(-2px);
}


/* ===== QUADRI FULL SCREEN 2x2 ===== */
#sezioni.cards-full,
#sezioni {
  position: relative;
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 0;
}

#sezioni .card {
  display: block;
  position: relative;
  margin: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
  cursor: pointer;
}

#sezioni .card--storia   { background-image: url('../css/storia1.jpeg'); }
#sezioni .card--visione  { background-image: url('../css/visione1.jpeg'); }
#sezioni .card--identita { background-image: url('../css/identita1.jpeg'); }
#sezioni .card--prodotti { background-image: url('../css/prodotti1.jpeg'); }

#sezioni .card::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.28) 0%, rgba(0,0,0,.45) 100%);
  pointer-events: none;
}

#sezioni .card__overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 24px;
  color: #fff;
  z-index: 1;
}
#sezioni .card__overlay h3 {
  font-family: "Cormorant Garamond", serif;
  font-size: 42px;
  line-height: 1.1;
  margin: 0 0 10px;
}
#sezioni .card__overlay p {
  font-family: "Inter", sans-serif;
  font-size: 18px;
  line-height: 1.6;
  margin: 0;
  color: #f3f3f3;
}

.hero + #sezioni { margin-top: 0; }
#sezioni + *     { margin-top: 0; }

@media (max-width: 880px){
  #sezioni { height: auto; grid-template-columns: 1fr; grid-template-rows: none; }
  #sezioni .card { min-height: 28vh; }
  #sezioni .card__overlay h3 { font-size: 28px; }
  #sezioni .card__overlay p  { font-size: 16px; }
}

.hero {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}
#sezioni {
  margin-top: 0 !important;
  padding-top: 0 !important;
}
/* ===== GALLERIA – sfondo travertino sfocato (visibile) ===== */

#galleria{
  position: relative;
  overflow: hidden;
  padding: 60px 0;
}

/* Immagine di sfondo sfocata */
#galleria::before{
  content: "";
  position: absolute;
  inset: 0;

  /* ✅ percorso corretto (travertino.jpeg in assets/css/) */
  background: url("travertino.jpeg") center/cover no-repeat;

  /* sfocatura reale e compatibile */
  filter: blur(3px);
  transform: scale(1.08); /* evita bordi vuoti dopo blur */
  opacity: 0.78;

  z-index: 0;
}

/* Velo elegante sopra l’immagine (opzionale ma consigliato) */
#galleria::after{
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.22);
  z-index: 1;
}

/* Contenuti sopra lo sfondo */
#galleria .container{
  position: relative;
  z-index: 2;
}

/* Non coprire con background beige */
.gallery-section{
  background: transparent !important;
  padding: 0 !important; /* il padding sta su #galleria */
}

/* Layout galleria con frecce */
.gallery-wrap{
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
}

/* Traccia orizzontale */
.gallery-section .hscroll{
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 12px 4px;
}
.gallery-section .hscroll::-webkit-scrollbar{ display:none; }
.gallery-section .hscroll{ scrollbar-width:none; }

/* ✅ Forza dimensione quadri galleria */
#galleria .hscroll img{
  width: 380px !important;
  height: 380px !important;
  object-fit: cover !important;
  border-radius: 14px;
  flex: 0 0 auto;
  cursor: zoom-in;
  box-shadow: 0 4px 20px rgba(0,0,0,.25);
  transition: transform .25s ease;
}
#galleria .hscroll img.g-item:hover{
  transform: translateY(-4px);
}

/* Frecce */
#galleria .g-btn{
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(0,0,0,.25);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 28px; line-height: 0;
  display: grid; place-items: center;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease;
}
#galleria .g-btn:hover{ transform: scale(1.08); background: rgba(0,0,0,.35); }
#galleria .g-prev{ margin-left: 4px; }
#galleria .g-next{ margin-right: 4px; }

/* Lightbox */
.lightbox{
  position: fixed; inset: 0;
  background: rgba(0,0,0,.7);
  display: none;
  align-items: center; justify-content: center;
  z-index: 99999;
  padding: 24px;
}
.lightbox img{
  max-width: 92vw; max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,.5);
}
.lb-close{
  position: absolute; top: 14px; right: 18px;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.4);
  background: rgba(0,0,0,.35);
  color:#fff; font-size: 24px; line-height: 0; cursor: pointer;
}

/* Mobile */
@media (max-width: 720px){
  #galleria .hscroll img.g-item{
    width: 220px !important;
    height: 220px !important;
  }
}

#sezioni, 
#contatti,
.contacts, 
footer {
  background: var(--bg) !important;
  color: var(--text);
}

/* ===== HERO SLIDER ===== */
.hero-slider{
  position: relative;
  min-height: 92vh;
  overflow: hidden;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

.hero-slider .slide{
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.4s ease-in-out;
}
.hero-slider .slide.active{ opacity: 1; }

.hero-slider .hero-txt{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 1100px);
  text-align: center;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,.35);
  padding: 0 16px;
}

.hero-slider .hero-txt h1{
  font-family: "Cormorant Garamond", serif;
  font-size: 72px;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 14px;
}

.hero-slider .hero-sub{
  font-family: "Cormorant Garamond", serif;
  font-size: 36px;
  margin-top: 20px;
  display: block;
  text-align: center;
  letter-spacing: 0.5px;
}

.hero-slider .hero-scroll{
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  color: rgba(255,255,255,.95);
  text-decoration: none;
  font-size: 28px;
  animation: pulse 1.8s ease-in-out infinite;
}

@media (max-width: 880px){
  .hero-slider{ min-height: 70vh; }
  .hero-slider .hero-txt h1{ font-size: 40px; }
  .hero-slider .hero-sub{ font-size: 18px; }
}
@media (max-width: 520px){
  .hero-slider{ min-height: 64vh; }
  .hero-slider .hero-txt h1{ font-size: 32px; }
  .hero-slider .hero-sub{ font-size: 16px; }
}

section.hero-slider{ 
  margin-bottom: 0 !important; 
  padding-bottom: 0 !important;
}
.cards-section{
  margin-top: 0 !important;
  padding-top: 0 !important;
}
.hero-slider + section,
.hero + section {
  margin-top: 0 !important;
  padding-top: 0 !important;
}


