:root {
  --sea: #1f5f6e;
  --sea-dark: #16434d;
  --sand: #f4ede1;
  --terracotta: #c56b4b;
  --text: #2c2c2c;
  --muted: #6b6b6b;
}

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

body {
  font-family: 'Jost', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--text);
  background: #fff;
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.25;
}

a {
  color: inherit;
}

/* Header / hero */

.hero {
  background-size: cover;
  background-position: center 70%;
  color: #fff;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 60vh;
  max-height: 680px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.12) 40%, rgba(0, 0, 0, 0.55) 100%);
}

.hero .nav,
.hero .hero-content {
  position: relative;
  z-index: 1;
}

.hero-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-top: 0;
}

.hero-content h1,
.hero-content p {
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1.5rem 2rem;
  flex-wrap: wrap;
}

.nav .logo {
  height: 62px;
  width: 62px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  margin-right: auto;
}

.nav a {
  text-decoration: none;
  color: #fff;
  opacity: 0.85;
  font-size: 0.95rem;
}

.nav a:hover {
  opacity: 1;
}

.nav a.lang-link {
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 5px;
  padding: 0.2rem 0.55rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.hero-content {
  max-width: 700px;
  margin: 3rem auto 0;
  padding: 0 2rem;
  text-align: center;
}

.hero-content h1 {
  font-size: 2.75rem;
  font-weight: 300;
  margin-bottom: 0.75rem;
}

.hero-content p {
  font-size: 1.15rem;
  opacity: 0.9;
}

/* Sections */

main section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

section h2 {
  font-size: 2rem;
  text-align: center;
  color: var(--sea-dark);
}

.section-intro {
  text-align: center;
  color: var(--muted);
  max-width: 600px;
  margin: 0.75rem auto 3rem;
}

/* Apartment cards */

.apartment-card {
  display: flex;
  gap: 2.5rem;
  align-items: stretch;
  margin-bottom: 3rem;
  background: var(--sand);
  border-radius: 12px;
  overflow: hidden;
}

.apartment-card.reverse {
  flex-direction: row-reverse;
}

.apartment-image {
  flex: 1 1 40%;
  min-height: 280px;
}

.apartment-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.apartment-image.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(45deg, #e3d9c6, #e3d9c6 10px, #dbcfb8 10px, #dbcfb8 20px);
  color: var(--muted);
  font-style: italic;
}

.apartment-info {
  flex: 1 1 60%;
  padding: 2rem 2rem 2rem 0;
}

.apartment-card.reverse .apartment-info {
  padding: 2rem 0 2rem 2rem;
}

.apartment-info h3 {
  font-size: 1.4rem;
  color: var(--sea-dark);
  margin-bottom: 0.35rem;
}

.rating {
  color: var(--terracotta);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.specs {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.specs li::before {
  content: "· ";
}

.specs li:first-child::before {
  content: "";
}

.apartment-info p {
  margin-bottom: 1rem;
  color: var(--text);
}

.airbnb-link {
  display: inline-block;
  background: var(--terracotta);
  color: #fff;
  padding: 0.65rem 1.4rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.airbnb-link:hover {
  background: #a8563a;
}

/* Zona */

.zona-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  text-align: center;
}

.zona-item h4 {
  color: var(--sea);
  font-size: 1.3rem;
  margin-bottom: 0.4rem;
}

.zona-item p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Galleria */

.gallery-group {
  margin-bottom: 3rem;
}

.gallery-group:last-child {
  margin-bottom: 0;
}

.gallery-group h3 {
  text-align: center;
  color: var(--sea-dark);
  margin-bottom: 1rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}

.gallery-grid img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.gallery-grid img:hover {
  opacity: 0.85;
}

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 100;
  align-items: center;
  justify-content: center;
}

.lightbox.open {
  display: flex;
}

.lightbox-img {
  max-width: 85vw;
  max-height: 85vh;
  border-radius: 6px;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 1.4rem;
  border-radius: 50%;
  width: 44px;
  height: 44px;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox-close {
  top: 1.5rem;
  right: 1.5rem;
}

.lightbox-prev {
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
}

/* Disponibilità / calendario */

.calendars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.calendar-block {
  background: var(--sand);
  border-radius: 12px;
  padding: 1.5rem;
}

.calendar-block h3 {
  text-align: center;
  color: var(--sea-dark);
  margin-bottom: 0.75rem;
}

.cal-nav {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.cal-nav button {
  background: none;
  border: 1px solid var(--sea);
  color: var(--sea-dark);
  border-radius: 6px;
  width: 32px;
  height: 32px;
  font-size: 1.1rem;
  cursor: pointer;
}

.cal-nav button:hover:not(:disabled) {
  background: var(--sea);
  color: #fff;
}

.cal-nav button:disabled {
  opacity: 0.3;
  cursor: default;
}

.cal-month-label {
  text-align: center;
  font-weight: 600;
  color: var(--sea-dark);
  margin-bottom: 0.75rem;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-day-label {
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
  padding-bottom: 0.25rem;
}

.cal-cell {
  text-align: center;
  padding: 0.5rem 0;
  border-radius: 6px;
  font-size: 0.85rem;
}

.cal-cell.empty {
  visibility: hidden;
}

.cal-cell.available {
  background: #dff0e4;
  color: #256b3f;
}

.cal-cell.booked {
  background: #f3d9d4;
  color: #a13f2e;
  text-decoration: line-through;
  opacity: 0.75;
}

.cal-cell.past {
  color: #c7c7c7;
}

.cal-legend {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot.available { background: #4f9d6c; }
.dot.booked { background: #c1594a; }

/* Contatti */

.contatti {
  text-align: center;
  background: var(--sand);
  border-radius: 12px;
  max-width: 1000px;
}

.whatsapp-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #25d366;
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  margin: 1.25rem 0 2rem;
}

.whatsapp-btn:hover {
  background: #1ebe57;
}

.contact-form {
  max-width: 480px;
  margin: 0 auto;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-form label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--sea-dark);
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  padding: 0.65rem;
  border: 1px solid #d8cfc0;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.95rem;
}

.submit-btn {
  background: var(--terracotta);
  color: #fff;
  border: none;
  padding: 0.75rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 0.5rem;
}

.submit-btn:hover {
  background: #a8563a;
}

/* Footer */

footer {
  text-align: center;
  padding: 2rem;
  color: var(--muted);
  font-size: 0.85rem;
}

/* Responsive */

@media (max-width: 700px) {
  .apartment-card,
  .apartment-card.reverse {
    flex-direction: column;
  }

  .apartment-info,
  .apartment-card.reverse .apartment-info {
    padding: 1.5rem;
  }

  .hero-content h1 {
    font-size: 2.1rem;
  }
}
