:root {
  --bg: #f5f6f8;
  --bg-alt: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #075985; /* azzurro più elegante */
  --radius: 1.1rem;
}

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

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  scroll-behavior: smooth;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.logo-img {
  height: 40px; /* regola la dimensione qui */
  width: auto;
  display: block;
}

@media (max-width: 480px) {
  .logo span {
    font-size: 0.8rem;
  }
  .logo-img {
    height: 30px;
  }
}

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

.container {
  width: min(1100px, 100% - 2.5rem);
  margin: 0 auto;
}

/* NAVBAR */
.topbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  transition: 0.25s ease;
  background: rgba(245, 246, 248, 0.05);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
}
.topbar.scrolled {
  background: rgba(245, 246, 248, 0.96);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
}
.logo {
  font-weight: 700;
  letter-spacing: 0.03em;
}
.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}
.nav-link {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  position: relative;
}
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.6rem;
  width: 100%;
  height: 2px;
  background: var(--primary);
  border-radius: 999px;
}

.nav-link[href="#prenota"] {
  background: var(--primary);
  color: white;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-weight: 600;
  transition: 0.2s ease;
}
.nav-link[href="#prenota"]:hover {
  background: #084c6e;
  color: white;
}
.nav-link[href="#prenota"]::after {
  display: none;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
}

/* HERO */
.hero {
  position: relative;
  min-height: 70vh;
  background: url("../images/terrazza.webp") center/cover no-repeat;
  display: flex;
  align-items: center;
  padding-top: 5.5rem;
}
.hero .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(7, 89, 133, 0.55), rgba(15, 23, 42, 0.25));
}
.hero-content {
  position: relative;
  max-width: 540px;
  padding: 4rem 0 4.5rem;
  color: white;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.68rem;
  margin-bottom: 0.75rem;
  opacity: 0.9;
}
.hero h1 {
  font-size: clamp(2.5rem, 4vw, 3rem);
  margin-bottom: 1rem;
}
.hero-text {
  margin-bottom: 1.5rem;
  color: rgba(255, 255, 255, 0.85);
}
.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.btn {
  background: white;
  color: #0f172a;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid transparent;
  transition: 0.2s;
}
.btn:hover {
  background: transparent;
  color: white;
  border-color: rgba(255, 255, 255, 0.5);
}
.ghost-link {
  color: white;
  text-decoration: none;
  align-self: center;
}

/* SECTION */
.section {
  padding: 4.5rem 0;
}
.section-alt {
  background: var(--bg-alt);
}
.section h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}
.intro {
  max-width: 650px;
  color: var(--muted);
  margin-bottom: 2.5rem;
}
.intra {
  color: var(--muted);
  margin-bottom: 2.5rem;
}
/* two cols */
.two-cols {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: center; /* Ripristinato ad align-items: center */
}
.side-image img {
  border-radius: 1.2rem;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.15);
}

/* MODIFICA: Aggiunti stili per le Card Comfort */
.comfort-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem; /* Spazio dopo il paragrafo intro */
}

.comfort-card {
  background: white;
  border-radius: 0.9rem;
  padding: 1.5rem 1.3rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.03);
  text-align: center;
}

.comfort-card .comfort-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}

.comfort-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.comfort-card p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}
/* Fine stili Card Comfort */


/* features */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.feature {
  background: white;
  border-radius: 0.9rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.03);
}
.feature h3 {
  margin-bottom: 0.4rem;
}

/* timeline */
.timeline {
  display: grid;
  gap: 1.5rem;
}
.timeline-item {
  background: white;
  border-left: 4px solid var(--primary);
  border-radius: 0.9rem;
  padding: 1rem 1.3rem 1rem 1.2rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.03);
}

/* gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.gallery-item {
  border-radius: 1rem;
  overflow: hidden;
  background: #0f172a;
  aspect-ratio: 4 / 3;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.25s;
}
.gallery-item:hover img {
  transform: scale(1.04);
}

/* map */
.map-wrapper {
  margin-top: 1rem;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.35);
}
.note {
  margin-top: 1rem;
  color: var(--muted);
}

/* footer */
.footer {
  background: #0f172a;
  color: rgba(255, 255, 255, 0.6);
  padding: 1.5rem 0;
}
.footer-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

/* responsive */
@media (max-width: 900px) {
  .two-cols {
    grid-template-columns: 1fr;
  }
  .hero {
    text-align: left;
  }
}
@media (max-width: 768px) {
  .nav-links {
    position: absolute;
    top: 62px;
    right: 1rem;
    background: white;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 0.75rem;
    padding: 1rem;
    display: none;
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
  .nav-links.active {
    display: flex;
  }
  .menu-toggle {
    display: block;
  }
  .hero {
    min-height: 72vh;
  }
  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-flex {
    flex-direction: column;
  }

  .nav-link[href="#prenota"] {
    padding: 0.75rem 1rem;
    text-align: center;
  }
}
.hero {
  position: relative;
  min-height: 80vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding-top: 5.5rem;
}

.carousel {
  position: absolute;
  inset: 0;
}

.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.slide.active {
  opacity: 1;
}

.hero .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(7, 89, 133, 0.5), rgba(15, 23, 42, 0.25));
}

/* --- Miglioramento impaginazione galleria casa --- */
/* MODIFICA: Stili galleria ripristinati alla versione originale per foto più grandi */
.house-gallery {
  margin-top: 3rem;
  padding: 0 3vw; /* respiro laterale fluido */
  max-width: 1600px;
  margin-left: auto;
  margin-right: auto;
}

.house-gallery .gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.house-gallery .gallery-item {
  border-radius: 1rem;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.house-gallery .gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.house-gallery .gallery-item img:hover {
  transform: scale(1.05);
}
/* Fine ripristino galleria */


.food-gallery {
  background: #f5f6f8;
}

.food-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.2rem;
}

.food-card {
  background: #fff;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.food-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.food-info {
  padding: 0.9rem 1rem 1.1rem;
}

.food-info h3 {
  margin-bottom: 0.35rem;
  font-size: 1rem;
}

.food-info p {
  font-size: 0.8rem;
  color: #64748b;
}

.map-wrapper {
  position: relative;
  width: 100%;
  height: 70vh; /* riempie il 70% dell’altezza dello schermo */
  max-height: 600px;
  border-radius: 1.1rem;
  overflow: hidden;
  margin-top: 2rem;
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.08);
}

.map-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 768px) {
  .map-wrapper {
    height: 350px; /* più bassa su mobile */
  }
}
.section-map {
  padding: 0 5%;
}
@media (max-width: 768px) {
  .lang-switch {
    margin-top: 0.5rem;
  }
}
.hero-content h1 {
  white-space: nowrap;
}
@media (max-width: 768px) {
  .hero-content h1 {
    white-space: normal;
    font-size: 2rem;
  }
}
.position-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 1.25rem 2.5rem;
  margin-bottom: 1.5rem;
}

.position-list ul {
  list-style: disc;
  padding-left: 1.1rem;
}

.position-list li {
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.position-foot {
  color: var(--muted);
}

@media (max-width: 720px) {
  .position-list {
    grid-template-columns: 1fr;
  }
}

.info-note {
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 1rem;
  padding: 1rem 1.2rem;
  margin-top: 2rem;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.03);
}

.info-note p {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
}

.info-note .icon {
  font-size: 1.2rem;
}
.whatsapp-form {
  max-width: 700px; /* Limita la larghezza del form */
  margin: 2.5rem auto 0;
  background: white;
  padding: 2.5rem;
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 0.75rem;
  font-family: inherit;
  font-size: 1rem;
  transition: 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(7, 89, 133, 0.1);
}

.form-group textarea {
  resize: vertical;
}

.btn-whatsapp {
  /* Stile bottone primario, ma verde */
  background: #25d366;
  color: white;
  width: 100%;
  font-size: 1.1rem;
  border: none;
  cursor: pointer;
}

.btn-whatsapp:hover {
  background: #1ebe5a;
  color: white;
  border: none;
}

@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr; /* Colonna singola su mobile */
    gap: 0;
  }
  
  .whatsapp-form {
    padding: 1.5rem;
  }
}
.footer {
  background: #0d1524;
  padding: 25px 0;
  border-top: 1px solid rgba(255,255,255,0.05);
  font-size: 0.9rem;
}

.footer-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-col {
  color: rgba(255,255,255,0.75);
}

.footer-links a,
.footer-credit a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  transition: opacity 0.2s;
}

.footer-links a:hover,
.footer-credit a:hover {
  opacity: 1;
}

.footer-links span {
  margin: 0 6px;
  opacity: 0.6;
}

.footer-credit {
  opacity: 0.75;
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .footer-wrapper {
    flex-direction: column;
    text-align: center;
  }
}