:root{
  --bg:#0b0f16;
  --panel:#0f1623;
  --text:#e7eefc;
  --muted:#a9b4c9;
  --accent:#b0121b;
  --accent2:#7d0f15;
  --line:rgba(255,255,255,.10);
  --shadow:0 18px 40px rgba(0,0,0,.35);
  --radius:18px;
  --max:1180px;
  --font: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0; max-width:100%; overflow-x:hidden}

body{
  font-family:var(--font);
  font-size:18px;
  line-height:1.65;
  background:
    radial-gradient(1200px 600px at 15% 0%, rgba(176,18,27,.25), transparent 60%),
    radial-gradient(1000px 600px at 85% 10%, rgba(176,18,27,.18), transparent 60%),
    var(--bg);
  color:var(--text);
  position:relative;
}

a{color:inherit;text-decoration:none}
img{max-width:100%;display:block;height:auto}
.container{max-width:var(--max); margin:0 auto; padding:0 18px}

/* ===========================
   TOPBAR
   =========================== */
.topbar{
  position:sticky;
  top:0;
  z-index:6000; /* sopra tutto */
  background: rgba(11,15,22,.70);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--line);
  overflow: visible;
}

.topbar-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:14px 0;
  flex-wrap:nowrap;
  overflow: visible;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  flex:0 0 auto;
}
.brand-logo{width:54px; height:auto}
.brand-name{font-weight:800; letter-spacing:.4px}
.brand-tagline{font-size:12px; color:var(--muted)}

.menu{
  list-style:none;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:18px;
  margin:0;
  padding:0;
  flex: 1 1 auto;
  min-width: 320px;
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}
.menu li{flex:0 0 auto}

.menu a{
  font-weight:600;
  color:var(--muted);
  padding:10px 8px;
  border-radius:10px;
  display:inline-block;
}
.menu a:hover{color:var(--text); background:rgba(255,255,255,.06)}
.menu a.active{color:var(--text); background:rgba(176,18,27,.16)}

.topbar-cta{
  flex:0 0 auto;
  visibility: visible;
  opacity: 1;
}
.topbar-cta .btn{ position:relative; z-index:6100; }

/* ===========================
   BUTTONS
   =========================== */
.btn, a.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.55rem;
  padding:12px 16px;
  border-radius:12px;
  font-weight:800;
  border:1px solid transparent;
  transition:.2s ease;
  cursor:pointer;
  user-select:none;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
  position:relative;
  z-index:2;
}

.btn-primary{
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 10px 22px rgba(176,18,27,.28);
  color:#fff;
}
.btn-primary:hover{transform: translateY(-1px)}

.btn-secondary{
  background: rgba(255,255,255,.06);
  border-color: var(--line);
  color: var(--text);
}

.btn-outline{
  background: transparent;
  border-color: rgba(255,255,255,.18);
  color: var(--text);
}
.btn-outline:hover{
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.28);
}

/* btn-sm: solo per UI compatta */
.btn-sm{
  padding:8px 12px;
  border-radius:12px;
  font-size:13px;
  font-weight:800
}

/* ===========================
   HERO
   =========================== */
.hero{padding:56px 0 26px}
.hero-grid{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap:18px;
  align-items:stretch;
}
.hero-card{
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border:1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.hero-main{padding:28px}
.kicker{
  color:rgba(255,255,255,.85);
  font-weight:900;
  letter-spacing:.6px;
  text-transform:uppercase;
  font-size:12px;
}
.h1{
  font-size:44px;
  line-height:1.15;
  margin:10px 0 12px;
  font-weight:900;
}
.p{color:var(--muted); margin:0 0 18px; font-size:1rem; line-height:1.65}
.hero-actions{display:flex; gap:10px; flex-wrap:wrap}

.hero-media{
  height:100%;
  min-height:320px;
  background:
    linear-gradient(0deg, rgba(11,15,22,.70), rgba(11,15,22,.18)),
    url('../img/hero.jpg') center/cover no-repeat;
}

/* ===========================
   SECTIONS / CARDS
   =========================== */
.section{padding:26px 0; overflow:visible}
.section-title{
  font-size:26px;
  margin:0 0 14px;
  font-weight:900;
}
.grid-3{display:grid; grid-template-columns:repeat(3,1fr); gap:14px}

.card{
  background: rgba(255,255,255,.04);
  border:1px solid var(--line);
  border-radius: var(--radius);
  padding:16px;
  position:relative;
  z-index:1;
  overflow:visible;
}
.card h3{
  margin:0 0 8px;
  font-size:20px;
  line-height:1.3;
}
.card p{margin:0; color:var(--muted); font-size:1rem; line-height:1.65}
.badge{display:inline-flex; align-items:center; gap:8px; font-size:14px; color:var(--muted)}

/* Gallery */
.gallery{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
}
.gallery img{
  width:100%;
  aspect-ratio: 4 / 3;
  height:auto;
  object-fit:cover;
  border-radius:14px;
  border:1px solid var(--line);
  background:#000;
}

/* ===========================
   FOOTER
   =========================== */
.footer{
  margin-top:34px;
  border-top:1px solid var(--line);
  background: rgba(11,15,22,.60);
  padding:22px 0;
  overflow:visible;
}

.footer-grid{display:grid; grid-template-columns:1.2fr .8fr; gap:14px}
.small{color:var(--muted); font-size:15px; line-height:1.6}
.footer strong{display:block; margin-bottom:6px}

.footer-legal{
  margin-top:10px;
  font-size:14px;
  color:var(--muted);
}

/* link footer sempre visibili */
.footer a,
.footer-legal a{
  color:#fff;
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,.30);
  text-underline-offset: 3px;
}
.footer a:hover,
.footer-legal a:hover{
  text-decoration-color: rgba(255,255,255,.75);
}

/* ===========================
   INTERNAL PAGES
   =========================== */
.page-hero{padding:40px 0 10px; overflow:visible}
.page-hero-card{
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border:1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding:24px;
  position:relative;
  z-index:1;
}
.page-h1{margin:10px 0 10px; font-size:36px; line-height:1.15; font-weight:900}
.page-lead{margin:0; color:var(--muted); max-width:900px; font-size:1rem; line-height:1.65}

.two-col{display:grid; grid-template-columns:1fr 1fr; gap:14px}
.list-clean{margin:0; padding-left:18px; color:var(--muted); font-size:1rem; line-height:1.65}
.list-clean li{margin:6px 0}

/* CTA banner */
.cta-banner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  background: linear-gradient(135deg, rgba(176,18,27,.20), rgba(255,255,255,.04));
  border:1px solid var(--line);
  border-radius: var(--radius);
  padding:18px;
}
.cta-title{font-weight:900; font-size:20px}

/* ===========================
   LIGHTBOX
   =========================== */
.no-scroll{overflow:hidden}
.lightbox{position:fixed; inset:0; display:none; z-index:999}
.lightbox.open{display:block}
.lightbox-backdrop{
  position:absolute; inset:0;
  background: rgba(0,0,0,.68);
  backdrop-filter: blur(6px);
}
.lightbox-content{
  position:relative;
  max-width: 980px;
  width: calc(100% - 28px);
  margin: 70px auto 0;
  background: rgba(15,22,35,.92);
  border:1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 14px;
}
.lightbox-content img{
  width:100%;
  height:auto;
  border-radius: 14px;
  border:1px solid var(--line);
}
.lightbox-caption{
  color: var(--muted);
  font-size: 14px;
  margin-top: 10px;
  line-height:1.6;
}
.lightbox-close{
  position:absolute;
  top: 10px;
  right: 10px;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.06);
  color: var(--text);
  font-size: 22px;
  cursor:pointer;
}
.lightbox-close:hover{background: rgba(255,255,255,.10)}

/* ===========================
   CONTACT FORM
   =========================== */
.contact-form{position:relative; z-index:5;}
.contact-form .form-row{margin-bottom:12px}
.contact-form label{display:block; font-size:14px; color:var(--muted); margin-bottom:6px}

.contact-form input,
.contact-form textarea{
  width:100%;
  padding:12px 12px;
  border-radius:12px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.05);
  color:var(--text);
  font-size:1rem;
}
.contact-form textarea{resize:vertical}

/* Checkbox fix */
.contact-form label.checkbox{
  display:flex;
  align-items:center;
  gap:10px;
  font-size:14px;
  color:var(--muted);
  line-height:1.5;
}
.contact-form label.checkbox input[type="checkbox"]{
  width:18px;
  height:18px;
  accent-color: var(--accent);
}
.checkbox a{color:#fff;text-decoration:underline}

/* ===========================
   COOKIE BANNER (BOTTOM)
   =========================== */
.cookie-banner{
  position: fixed;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
  display: none; /* mostrato via JS con .is-visible */
}
.cookie-banner.is-visible{ display:block; }

.cookie-card{
  max-width: 980px;
  margin: 0 auto;
  background: rgba(15,22,35,.92);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 18px 45px rgba(0,0,0,.45);
  border-radius: 18px;
  padding: 16px 16px;
  backdrop-filter: blur(10px);
}

.cookie-row{
  display:flex;
  gap:16px;
  align-items:flex-start;
  justify-content:space-between;
}

.cookie-text{ flex: 1; min-width: 240px; }

.cookie-title{
  font-weight: 800;
  letter-spacing: .2px;
  margin: 0 0 6px 0;
  color: var(--text);
  font-size: 16px;
}

.cookie-desc{
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.cookie-links{
  margin-top: 8px;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.cookie-links a{
  color: #fff;
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,.35);
  text-underline-offset: 3px;
  font-size: 14px;
}
.cookie-links a:hover{
  text-decoration-color: rgba(255,255,255,.75);
}

.cookie-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  justify-content:flex-end;
}
.cookie-actions .btn{
  padding:.72rem .95rem;
  border-radius: 14px;
  font-size: 14px;
}
@media (max-width: 760px){
  .cookie-row{ flex-direction: column; }
  .cookie-actions{ justify-content:flex-start; width:100%; }
  .cookie-actions .btn{ width: 100%; }
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 980px){

  body{font-size:19px}

  .topbar-inner{
    display:grid;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px 0;
  }

  .brand{gap:10px}
  .brand-logo{width:42px}
  .brand-name{font-size:16px; line-height:1.1}
  .brand-tagline{font-size:12px}

  /* MENU MOBILE APP-LIKE (UNICA DEFINIZIONE) */
  .menu{
    position: sticky;
    top: 64px;
    z-index: 5900;

    width: 100%;
    justify-content:flex-start;
    overflow-x:auto;
    -webkit-overflow-scrolling: touch;

    gap:12px;
    padding: 10px 12px;

    background: rgba(11,15,22,.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);

    visibility: visible;
    opacity: 1;
  }
  .menu::-webkit-scrollbar{ display:none; }

  .menu a{
    white-space: nowrap;
    padding:14px 18px;
    border-radius:999px;
    color: var(--text);
    background: rgba(255,255,255,.06);
    font-size:18px;
    font-weight:800;
    min-height:48px;
    display:flex;
    align-items:center;
    justify-content:center;
    letter-spacing:.2px;
  }

  .menu a:hover{ background: rgba(255,255,255,.10); }
  .menu a.active{
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    box-shadow: 0 8px 20px rgba(176,18,27,.35);
    color:#fff;
  }

  .topbar-cta{width:100%}
  .topbar-cta .btn{
    width:100%;
    justify-content:center;
    padding: 10px 14px;
    font-size:16px;
    box-shadow: 0 8px 18px rgba(176,18,27,.22);
  }

  .hero{padding:28px 0 14px}
  .hero-grid{grid-template-columns:1fr; gap:12px}
  .hero-main{padding:16px}
  .kicker{font-size:11px; letter-spacing:.5px}
  .h1{font-size:32px; line-height:1.2}
  .p{font-size:18px; margin-bottom:12px}

  .hero-actions{flex-direction:column; gap:10px}
  .hero-actions .btn{width:100%; padding: 12px 16px}

  .hero .badge{
    margin-top:10px;
    font-size:14px;
    gap:8px;
    flex-wrap:wrap;
    opacity:.95;
  }

  .hero-card{border-radius:16px}
  .hero-card.hero-media{
    border-color: rgba(255,255,255,.06);
    background-color: rgba(255,255,255,.02);
  }
  .hero-media{min-height:180px; background-position:center}

  .section{padding:16px 0}
  .section-title{font-size:24px; margin:0 0 10px}
  .grid-3{grid-template-columns:1fr}
  .card{padding:14px}
  .card h3{font-size:20px}
  .card p{font-size:18px}

  .gallery{grid-template-columns: repeat(2, 1fr)}

  .footer{padding:18px 0}
  .footer-grid{grid-template-columns:1fr; gap:18px}
  .small{font-size:16px}

  .two-col{grid-template-columns:1fr}
  .cta-banner{flex-direction:column; align-items:flex-start}
}

@media (max-width: 520px){

  body{font-size:20px}

  .container{padding:0 14px}
  .h1{font-size:30px}
  .page-h1{font-size:30px}
  .brand-tagline{display:none}

  .gallery{grid-template-columns: 1fr; gap:14px}

  .cta-banner{padding:14px}
  .cta-title{font-size:18px}
}

.map-embed{
  width:100%;
  height:420px;
  border-radius:18px;
  overflow:hidden;
  border:1px solid var(--line);
  box-shadow: var(--shadow);
}
.map-embed iframe{
  width:100%;
  height:100%;
  border:0;
  display:block;
}
@media (max-width: 820px){
  .map-embed{ height:320px; }
}

/* ===== Sezione "Perché scegliere" ===== */
.section-header{
  margin-bottom: 18px;
}
.section-header.center{
  text-align: left; /* meglio in questo layout */
}

.grid-4{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.grid-4 .card{
  padding: 18px 18px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  box-shadow: 0 16px 32px rgba(0,0,0,.25);
}

.grid-4 .card h3{
  margin: 0 0 8px 0;
  font-size: 18px;
  line-height: 1.25;
}

.grid-4 .card p{
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.55;
}

/* Responsive */
@media (max-width: 1100px){
  .grid-4{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px){
  .grid-4{ grid-template-columns: 1fr; }
}

.why-icon{
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom: 10px;
  background: rgba(176,18,27,.18);
  border: 1px solid rgba(176,18,27,.35);
  color: #fff;
  font-weight: 700;
}

.section-why{
  padding-top: 32px;
  padding-bottom: 18px;
}

.section-why .section-lead{
  margin-top: 6px;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.70);
  font-weight: 800;
  position: relative;
  padding-left: 14px;
}
.section-why .section-lead:before{
  content:"";
  position:absolute;
  left:0;
  top:50%;
  width:6px;
  height:6px;
  transform: translateY(-50%);
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(176,18,27,.18);
}

/* ===== KICKER UNIFICATO (hero + sezioni) ===== */
.kicker{
  display: inline-flex;
  align-items: center;
  gap: 8px;

  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 800;
  color: rgba(255,255,255,.75);
}

.kicker::before{
  content:"";
  width:6px;
  height:6px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(176,18,27,.18);
}


.page-hero .kicker{
  color: rgba(255,255,255,.85);
}
