/* =========================
   RESET & GLOBALI
========================= */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
:root { --header-h: 60px; }

body {
  margin: 0; padding: 0;
  font-family: 'Helvetica Neue','Segoe UI',Tahoma,Geneva,Verdana,sans-serif;
  color: #222; background: #fff; text-align: center;
  -webkit-text-size-adjust: 100%;
}
img, iframe { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }

/* Bottoni */
.btn {
  display: inline-block; padding: 12px 30px; font-size: 1rem;
  color: #fff; background: #333; border: 0; border-radius: 8px;
  text-decoration: none; cursor: pointer;
  transition: background-color .3s, transform .2s;
}
.btn:hover { background: #555; transform: scale(1.03); }

/* =========================
   HEADER FISSO + HAMBURGER
========================= */
header.site-header{
  position: fixed; top: 0; left: 0; right: 0; z-index: 3000;
  display: flex; align-items: center; justify-content: flex-end;
  height: var(--header-h);
  padding: 10px 16px; background: #fff; border-bottom: 1px solid #eee;
}
header.site-header .brand { display: none !important; }

.hamburger{
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid #ddd; border-radius: 10px; background: #fff; cursor: pointer;
}
.hamburger span{
  display: block; width: 20px; height: 2px; margin: 3px 0; background: #000;
  transition: transform .25s ease, opacity .2s ease;
}
.hamburger.is-open span:nth-child(1){ transform: translateY(5px) rotate(45deg); }
.hamburger.is-open span:nth-child(2){ opacity: 0; }
.hamburger.is-open span:nth-child(3){ transform: translateY(-5px) rotate(-45deg); }

/* Menu: fisso sotto l’header, scrollabile se lungo */
#site-menu.site-menu{
  position: fixed; right: 16px; top: calc(var(--header-h) + 0px);
  z-index: 3001;
  display: flex; flex-direction: column; gap: 8px;
  background: #fff; padding: 12px; border: 1px solid #eee; border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12); min-width: 220px;
  max-height: calc(100vh - var(--header-h) - 20px);
  overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
}
#site-menu a{
  display: block; padding: 12px 20px; font-size: 16px; color: #000;
  text-decoration: none; border-bottom: 1px solid #eee; transition: background .3s;
}
#site-menu a:last-child{ border-bottom: none; }
#site-menu a:hover{ background: #f0f0f0; }

/* Overlay che non copre l’header */
.menu-overlay{
  position: fixed; left: 0; right: 0; top: var(--header-h); bottom: 0;
  z-index: 2500; background: transparent;
}

/* Spingi giù il primo blocco sotto l’header (pagine interne) */
.site-header + .page-title,
.site-header + header,
.site-header + main { margin-top: var(--header-h); }

/* =========================
   HOME / HERO
========================= */
.hero {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 100svh;  /* usa viewport “small” per iOS/Android */
  gap: 20px; padding: 20px;
}
.hero-logo { max-width: 90vw; max-height: 60vh; height: auto; opacity: 0; animation: fadeInUp 1s .3s forwards; }
.subtitle  { font-size: 1.6rem; color: #333; margin: 0; opacity: 0; animation: fadeInUp 1s .8s forwards; }
.hero .btn { opacity: 0; animation: fadeInUp 1s 1.3s forwards; }

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

/* Bottone “Installa app” (index) */
.btn-install{
  position: absolute; top: 16px; left: 16px;
  padding: 10px 18px; font-size: 14px; font-weight: 700;
  background: #4CAF50; color: #fff; border: 0; border-radius: 30px;
  text-decoration: none; box-shadow: 0 4px 6px rgba(0,0,0,.1);
  cursor: pointer; display: inline-flex; align-items: center; gap: 8px; z-index: 10;
}
.btn-install:hover{ background: #449c49; }

/* Sezione SCOPRI (index) */
#scopri {
  scroll-margin-top: calc(var(--header-h) + 12px);
  background-image: url('img/Esterno3.jpg');
  background-size: cover; background-position: center 40%; background-repeat: no-repeat;
  position: relative; color: #fff; padding: 80px 20px; min-height: 540px;
}
#scopri::before{
  content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.25); z-index: 1;
}
#scopri > * { position: relative; z-index: 2; }

.key-points{
  display: flex; flex-wrap: wrap; justify-content: center; gap: 30px; margin-bottom: 40px;
}
.point{
  background: #fff; border-radius: 12px; padding: 40px 30px; width: 180px;
  box-shadow: 0 3px 8px rgba(0,0,0,.1); font-size: 1.5rem; font-weight: 700; color: #111;
  text-decoration: none; display: flex; align-items: center; justify-content: center;
  transition: box-shadow .3s, transform .3s;
}
.point:hover{ box-shadow: 0 10px 25px rgba(0,0,0,.2); transform: translateY(-5px); }

/* Mobile: centra card con forza */
@media (max-width: 768px){
  .key-points { flex-direction: column; align-items: center; gap: 20px; }
  .point { width: min(420px, 90vw); padding: 30px 20px; font-size: 1.3rem; }
}

/* =========================
   TITOLI PAGINE
========================= */
.page-title {
  padding: 20px; text-align: center; background: #f5f5f5;
  font-size: 1.8rem; font-weight: 700; border-bottom: 1px solid #ddd;
}

/* =========================
   LAYOUT GENERICO CONTENUTI
========================= */
main.container {
  display: flex; max-width: 1000px; margin: 30px auto; gap: 40px; padding: 0 20px;
}

/* =========================
   APPARTAMENTO
========================= */
.left-col{
  flex: 1; display: flex; flex-direction: column; gap: 20px; align-items: stretch;
}
.carousel{
  position: relative; max-width: 480px; aspect-ratio: 4/3;
  overflow: hidden; border-radius: 10px; box-shadow: 0 0 12px rgba(0,0,0,.15);
}
.carousel img{
  width: 100%; height: 100%; object-fit: contain; background: #f5f5f5;
  display: none; border-radius: 10px; user-select: none;
}
.carousel img.active{ display: block; }
.carousel button{
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,.3); border: 0; color: #fff; font-size: 2rem;
  padding: 0 12px; cursor: pointer; border-radius: 4px; user-select: none;
}
.carousel button:hover{ background: rgba(0,0,0,.6); }
.prev{ left: 10px; } .next{ right: 10px; }

.info-box-scrollable{
  width: 100%; max-width: 480px; background: #f9f9f9; border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,.1);
  display: flex; flex-direction: column; max-height: 500px;
}
.info-box-scrollable h3{
  font-size: 1.4rem; margin: 0; padding: 16px 20px;
  border-bottom: 1px solid #ddd; background: #eee; border-radius: 12px 12px 0 0;
}
.scrollable-content{ padding: 20px; overflow-y: auto; -webkit-overflow-scrolling: touch; }

.description{ flex: 1.2; font-size: 1.1rem; color: #222; line-height: 1.5; text-align: justify; }
.description h2{ margin: 0 0 15px 0; font-size: 2rem; font-weight: 700; }

@media (max-width: 768px){
  main.container{ flex-direction: column; }
  .carousel{ aspect-ratio: auto; height: 300px; max-width: 100%; }
  .info-box-scrollable{ max-width: 100%; max-height: 360px; }
}

/* =========================
   COSA FARE – CENTRA IMMAGINI
========================= */
main .sezione { text-align: center; }
main .sezione img {
  margin: 0 auto 15px auto; display: block;
  width: 100%; max-width: 480px; border-radius: 10px;
  box-shadow: 0 0 12px rgba(0,0,0,0.15);
}

/* =========================
   CONTATTI
========================= */
.contact-section { padding: 50px 20px; background: #f7f7f7; color: #333; }
.contact-section, .contact-container { overflow-wrap: anywhere; }
.contact-head { text-align: center; max-width: 900px; margin: 0 auto 24px; }
.contact-head a { word-break: break-word; }
.contact-container{
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; padding: 0 20px;
}
.map-col, .form-col { min-width: 0; }
.form-col form label { display: block; margin: 10px 0 6px; text-align: left; font-weight: 500; }
.form-col form input, .form-col form select, .form-col form textarea, .form-col form button{
  width: 100%; display: block; padding: 10px; border: 1px solid #ccc; border-radius: 6px; font-size: 1rem;
}
.form-col form textarea{ resize: vertical; min-height: 120px; }
.iti{ width: 100%; }
.map-container iframe{ width: 100%; border: 0; border-radius: 8px; }
@media (min-width: 901px){ .map-container iframe{ height: 450px; } }
@media (max-width: 900px){
  .contact-container{ grid-template-columns: 1fr; gap: 18px; }
  .map-container iframe{ height: auto; aspect-ratio: 4 / 3; }
}

/* =========================
   INFO LINKS (immagini cliccabili)
========================= */
.info-links{
  display: flex; justify-content: center; align-items: center; gap: 30px; flex-wrap: wrap;
  margin: 40px auto; max-width: 1000px; text-align: center;
}
.info-links a{ display: flex; flex-direction: column; align-items: center; text-decoration: none; }
.info-img{
  width: 300px; height: 200px; object-fit: contain; background: #fff;
  border-radius: 12px; box-shadow: 0 3px 10px rgba(0,0,0,.15); transition: transform .3s;
}
.info-img:hover{ transform: scale(1.05); }

/* =========================
   FOOTER
========================= */
.contact-footer{
  margin-top: 60px; padding: 20px; text-align: center; background: #000;
  display: flex; justify-content: center; align-items: center; gap: 25px; flex-wrap: wrap;
}
.contact-footer img{
  height: 40px; width: auto; object-fit: contain; vertical-align: middle;
  transition: transform .3s ease;
}
.contact-footer img:hover{ transform: scale(1.2); }
.footer-link{
  font-size: 1.1rem; text-decoration: none; background: #444; color: #fff;
  padding: 6px 16px; border-radius: 6px; transition: background-color .3s;
}
.footer-link:hover{ background: #666; }

#scopri h2 {
  margin-top: 50px; /* aumenta spazio sopra il titolo */
  margin-bottom: 30px; /* spazio sotto il titolo */
}

#scopri p {
  margin-bottom: 80px; /* spazio sotto il testo */
}

#scopri .key-points {
  margin-top: 50px; /* spazio tra testo e bottoni */
}

.zoom-img {
  max-width: 300px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

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