/* RESET BASE */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: #222;
  /* background: #fff; */
  background: #f4f4f4;
}

/* HEADER */
.site-header {
  padding: 15px 20px;
  border-bottom: 1px solid #eee;
  font-weight: 600;
}

/* CONTAINER */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
  padding-top: 30px;
}

/* HERO */
.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 30px;
}

.hero-image {
  flex: 1 1 45%;
}

.hero-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

.hero-text {
  flex: 1 1 45%;
}

h1 {
  font-size: 2rem;
  line-height: 1.3;
  margin-bottom: 15px;
  max-width: 600px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

h2 {
  font-weight: 600;
  color: #111;
}

p {
  font-size: 1.1rem;
  line-height: 1.5;
  max-width: 700px;
  color: #444;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .hero {
    flex-direction: column;
  }

  h1 {
    font-size: 1.6rem;
  }

  .panorama-content {
    flex-direction: column;
  }
}

/* INTRO */
.intro {
  max-width: 800px;
  margin: 60px auto;
  padding: 0 20px;
}

.intro h2 {
  font-size: 1.6rem;
  margin-bottom: 20px;
}

.intro p {
  margin-bottom: 15px;
}

/* GALLERY */
.gallery {
  max-width: 1100px;
  margin: 60px auto;
  padding: 0 20px;
}

.gallery h2 {
  margin-bottom: 20px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
}

.gallery-grid img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

/* DETTAGLI */
.details {
  max-width: 1100px;
  margin: 60px auto;
  padding: 0 20px;
}

.details h2 {
  margin-bottom: 20px;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 15px;
}

.details-grid img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

/* PANORAMA */
.panorama {
  max-width: 1100px;
  margin: 60px auto;
  padding: 0 20px;
}

.panorama-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 30px;
}

.panorama-text {
  flex: 1 1 45%;
}

.panorama-image {
  flex: 1 1 45%;
}

.panorama-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

/* CONTATTO */
.contact {
  max-width: 600px;
  margin: 80px auto;
  padding: 30px 25px;
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;

  /* NUOVO */
  box-shadow: 0 8px 30px rgba(0,0,0,0.06);
}

.contact h2,
.contact > p {
  text-align: center;
}

.contact h2 {
  margin-bottom: 10px;

  /* NUOVO */
  font-size: 1.6rem;
}

.contact p {
  margin-bottom: 30px;

  /* NUOVO */
  color: #555;
}

/* FORM */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* LABEL */
.contact-form label {
  font-size: 0.9rem;
  color: #444;
}

/* INPUT */
.contact-form input,
.contact-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 12px;
  font-size: 1rem;

  /* MIGLIORATO */
  border: 1px solid #ddd;
  border-radius: 6px;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

/* FOCUS */
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #999;
  outline: none;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.05);
}

/* CHECKBOX */
.contact-form .privacy-check {
  align-self: flex-start;
}

/* BUTTON */
.contact-form button {
  padding: 14px;
  font-size: 1rem;
  border: none;

  /* MIGLIORATO */
  background: linear-gradient(135deg, #222, #444);
  color: #fff;
  cursor: pointer;
  border-radius: 6px;

  font-weight: 600;
  letter-spacing: 0.5px;

  transition: all 0.2s ease;
}

/* HOVER */
.contact-form button:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #111, #333);
}

/* PRIVACY CHECK */
.privacy-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  margin-top: 10px;
  max-width: none;
}

.privacy-check input {
  margin: 0;
}

/* FOOTER */
.site-footer {
  margin-top: 60px;
  padding: 20px;
  text-align: center;
  border-top: 1px solid #eee;
  font-size: 0.9rem;
}

.site-footer a {
  color: #222;
  text-decoration: underline;
}

/* PRIVACY PAGE */
.privacy {
  max-width: 800px;
  margin: 60px auto;
  padding: 0 20px;
}

.privacy h1 {
  margin-bottom: 20px;
}

.privacy p {
  margin-bottom: 15px;
}

/* ALTRE FOTO */
.more-photos {
  max-width: 1100px;
  margin: 60px auto;
  padding: 0 20px;
  text-align: center;
}

.more-photos h2 {
  margin-bottom: 10px;
}

.more-photos .subtitle {
  margin-bottom: 20px;
  color: #555;
}

.more-photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
}

.more-photos-grid img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

/* MAPPA */
.map {
  max-width: 1100px;
  margin: 60px auto;
  padding: 0 20px;
  text-align: center;
  margin-top: 80px;
}

.map h2 {
  margin-bottom: 20px;
}

.map-wrapper {
  position: relative;
  width: 100%;
  height: 400px;
}

.map-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 4px;
}

/* GENERALE IMMAGINI */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* SEZIONI */
section {
  margin-bottom: 40px;
}

/* MESSAGGI FORM */
#form-message {
  margin-bottom: 15px;
  font-weight: 600;
}

.privacy-check {
  display: flex;
  align-items: center;
  justify-content: flex-start !important;
  gap: 6px;
  width: auto;
}

.privacy-check a {
  display: inline;
  white-space: nowrap;
}
.contact-form .privacy-check input[type="checkbox"] {
  width: auto;
}

/* VIDEO */
.video {
  max-width: 1100px;
  margin: 60px auto;
  padding: 0 20px;
  text-align: center;
}

.video h2 {
  margin-bottom: 20px;
}

.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 4px;
}

.yt-facade {
  display: block;
  position: relative;
  border-radius: 4px;
  overflow: hidden;
}

.yt-facade img {
  width: 100%;
  height: auto;
  display: block;
}

.yt-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 48px;
  background: #ff0000;
  border-radius: 12px;
  pointer-events: none;
}

.yt-play-btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 55%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 10px 0 10px 20px;
  border-color: transparent transparent transparent #fff;
}

.yt-facade:hover .yt-play-btn {
  background: #cc0000;
}

/* IMAGE OVERLAY */
.img-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
  backdrop-filter: blur(2px);
}

.img-overlay.active {
  opacity: 1;
  visibility: visible;
}

.img-overlay-content {
  max-width: 90%;
  max-height: 90%;
  border-radius: 4px;
  object-fit: contain; /* 👈 fondamentale */
}

/* ============================= */
/* UPGRADE VISIVO NON INVASIVO   */
/* ============================= */

main.container {
  background: transparent;
}

main.container > section {
  background: #fff;
  padding: 25px;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.hero-text p {
  color: #555;
}

.gallery-grid img,
.details-grid img,
.more-photos-grid img {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.gallery-grid img:hover,
.details-grid img:hover,
.more-photos-grid img:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

/* FIX MOBILE DEFINITIVO */
@media (max-width: 768px) {

  /* elimina doppio padding laterale */
  .container {
    padding-left: 10px;
    padding-right: 10px;
  }

  /* le card NON devono avere padding laterale su mobile */
  main.container > section {
    padding: 15px 10px;
    border-radius: 4px;
  }

  /* hero senza effetto scatola interna */
  .hero {
    padding: 0;
    background: transparent;
  }

  /* immagine hero piena larghezza */
  .hero-image img {
    border-radius: 4px;
  }

}/* MESSAGGI FORM MIGLIORATI */
#form-message {
  margin-bottom: 20px;
  font-weight: 600;
  padding: 12px;
  border-radius: 6px;
  display: none;
}

#form-message.msg-success {
  display: block;
  background: #e6f4ea;
  color: #1e7e34;
  border: 1px solid #c3e6cb;
}

#form-message.msg-error {
  display: block;
  background: #f8d7da;
  color: #842029;
  border: 1px solid #f5c2c7;
}

/* ACCESSIBILITÀ — FOCUS VISIVO */
:focus {
  outline: 2px solid #000;
  outline-offset: 2px;
}

.img-overlay-close {
  position: fixed; /* 👈 cambia da absolute a fixed */
  top: 20px;
  right: 20px;
  background: #fff;
  border: none;
  font-size: 28px;
  cursor: pointer;
  border-radius: 4px;
  padding: 5px 10px;
  z-index: 10000;
}

@media (max-width: 768px) {
  .img-overlay-content {
    max-width: 95%;
    max-height: 80%;
  }
}

@media (max-width: 390px) {

  .img-overlay-close {
    top: 60px; /* sposta più in basso per evitare barra browser */
    left: 10px; /* come nel tuo screenshot */
    right: auto;
  }

}

#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #222;
  color: #fff;
  padding: 15px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  z-index: 10000;
}

#cookie-banner p {
  margin: 0;
  font-size: 0.9rem;
  color: #fff; /* ← aggiungi solo questa riga */
}

#cookie-banner a {
  color: #ffffff;
  text-decoration: underline;
  font-weight: 600;
}

#cookie-banner a:hover {
  color: #cccccc;
}

#cookie-banner button {
  background: #fff;
  color: #000;
  border: none;
  padding: 8px 15px;
  cursor: pointer;
  border-radius: 4px;
}

#cookie-banner p a {
  color: #ffffff !important;
}