
/* HERO SECTION */
.hero {
  background: url('images/puglia-hero.jpg') center/cover no-repeat;
  color: white;
  padding: 140px 20px;
  text-align: center;
  position: relative;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}
.hero-content {
  position: relative;
  z-index: 1;
}
.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  margin-bottom: 15px;
  letter-spacing: 0.5px;
}
.hero p {
  font-family: 'Open Sans', sans-serif;
  font-size: 1.25rem;
}

/* SECTION BASE */
.section-puglia.accommodation,
.section-puglia.car-hire,
.section-puglia.explore {
  padding: 80px 20px;
  text-align: center;
}
.section-puglia.accommodation {
  background: #fff8f0;
}
.section-puglia.car-hire {
  background: #f4f4f4;
}
.section-puglia.explore {
  background: #fafafa;
}
.section-puglia h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.4rem;
  margin-bottom: 25px;
}
.section-puglia.accommodation h2 { color: #3a2d1f; }
.section-puglia.car-hire h2 { color: #2c2c2c; }
.section-puglia.explore h2 { color: #2f2f2f; }

/* GENERAL TYPOGRAPHY */
.section-puglia p,
.section-puglia li {
  font-family: 'Open Sans', sans-serif;
  font-size: 1.1rem;
  line-height: 1.6;
  color: #4f4f4f;
}
.section-puglia.explore p {
  color: #555;
  max-width: 720px;
  margin: 0 auto 30px;
}

/* LISTS */
.puglia-list {
  list-style: none;
  padding-left: 0;
  max-width: 800px;
  margin: 30px auto;
  text-align: left;
}

/* ACCOMMODATION GRID */
.accommodation-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-top: 40px;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}
@media (min-width: 768px) {
  .accommodation-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.accommodation-card {
  background: #fff;
  border-radius: 12px;
  padding: 25px 30px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  text-align: left;
}
.accommodation-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  margin-bottom: 10px;
  color: #3d3024;
}
.accommodation-card p {
  font-size: 1rem;
  color: #444;
  margin-bottom: 12px;
}
.accommodation-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.accommodation-card ul li {
  margin-bottom: 8px;
}
.accommodation-card a {
  color: #f28e1c;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.accommodation-card a:hover {
  border-color: #f28e1c;
}

/* CAR HIRE */
.car-hire-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-top: 40px;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}
@media (min-width: 768px) {
  .car-hire-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}
.car-hire-card {
  background: #fff;
  border-radius: 12px;
  padding: 25px 30px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.car-hire-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  margin-bottom: 10px;
  color: #3a2d1f;
}
.car-hire-card p {
  font-size: 1rem;
  color: #444;
  margin-bottom: 15px;
}
.car-hire-card a {
  align-self: flex-start;
  font-weight: bold;
  color: #f28e1c;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.car-hire-card a:hover {
  border-color: #f28e1c;
}

/* SANNICOLA HERO BLOCK */
.highlight-hero-sannicola {
  display: flex;
  flex-direction: column;
  background: #fff8ed;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  margin-bottom: 60px;
}
.sannicola-full-image {
  width: 100%;
  object-fit: cover;
  max-height: 400px;
}
.sannicola-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: #fff8ed;
  padding: 40px;
  text-align: center;
}
.sannicola-content h3 {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  color: #3d3024;
  margin-bottom: 15px;
}
.sannicola-content p {
  font-family: 'Open Sans', sans-serif;
  font-size: 1.1rem;
  color: #444;
  line-height: 1.6;
  text-align: center;
  max-width: 600px;
  margin: 0 auto 20px;
}
.sannicola-program {
  text-align: center;
  list-style: none;
  padding-left: 0;
  font-family: 'Open Sans', sans-serif;
  font-size: 1rem;
  color: #333;
}
.sannicola-program li {
  margin-bottom: 10px;
}
@media (min-width: 768px) {
  .highlight-hero-sannicola {
    flex-direction: row;
  }
  .sannicola-full-image {
    width: 35%;
    max-height: none;
  }
  .sannicola-content {
    width: 50%;
  }
}

/* EXPLORE GRID */
.explore-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  margin-top: 20px;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}
@media (min-width: 768px) {
  .explore-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.explore-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 25px 30px;
  border-radius: 10px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.05);
  transition: transform 0.3s ease;
  text-align: left;
}
.explore-card:hover {
  transform: translateY(-4px);
}
.explore-image {
  width: 100%;
  max-width: 320px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.explore-text {
  width: 100%;
}
.explore-text h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: #3d3024;
  margin-bottom: 8px;
}
.explore-text p {
  font-family: 'Open Sans', sans-serif;
  font-size: 1rem;
  color: #555;
  line-height: 1.5;
}
@media (min-width: 768px) {
  .explore-card {
    flex-direction: row;
  }
  .explore-text {
    padding-left: 25px;
  }
}

/* FOOTER */
footer {
  background: #333;
  color: #eee;
  text-align: center;
  padding: 40px 20px;
  font-family: 'Open Sans', sans-serif;
  font-size: 0.95rem;
}
footer a {
  color: #f28e1c;
  text-decoration: none;
  font-weight: bold;
}

/* GLOBAL */
html { scroll-behavior: smooth; }
body { padding-top: 64px; } /* spazio per la topbar fissa su desktop */
@media (max-width: 768px) {
  body { padding-top: 56px; } /* spazio leggermente ridotto su mobile */
}

/* TOP NAV */
.topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: rgba(255,255,255,0.86);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  z-index: 9999;
}
.topnav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
}
.topnav .brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  color: #3a2d1f;
  text-decoration: none;
  white-space: nowrap;
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 0;
  flex: 1 1 auto;
}
.nav-links a {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-family: 'Open Sans', sans-serif;
  font-size: 0.98rem;
  color: #2f2f2f;
  transition: background-color .25s ease, color .25s ease, transform .05s ease;
}
.nav-links a:hover { background: rgba(0,0,0,0.06); }
.nav-links a.active {
  background: #3a2d1f;
  color: #fff;
}

/* LANG TOGGLE – sempre visibile nella topbar */
.lang-toggle {
  margin-left: auto;
  border: 1px solid rgba(0,0,0,0.12);
  background: #fff;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-family: 'Open Sans', sans-serif;
  font-size: 0.95rem;
  line-height: 1;
  transition: background-color .2s ease, border-color .2s ease, transform .05s ease;
}
.lang-toggle:hover { background: #f7f7f7; }
.lang-toggle:active { transform: translateY(1px); }

/* HERO corregge overlay con topbar */
.hero { margin-top: 0; }

@media (max-width: 700px) {
  /* Switch to two-row grid layout */
  .topnav-inner {
    display: grid;
    grid-template-columns: 1fr auto; /* brand + lang toggle */
    grid-template-rows: auto auto;   /* first row for brand/lang, second for links */
    align-items: center;
    gap: 6px 12px;
  }

  /* Brand: row 1, col 1 */
  .topnav .brand {
    grid-column: 1 / 2;
  }

  /* Lang toggle: row 1, col 2 */
  .lang-toggle {
    grid-column: 2 / 3;
    margin-left: 0;
  }

  /* Nav links: row 2, full width */
  .nav-links {
    grid-column: 1 / -1;   /* span full width */
    justify-content: center;
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
  }

  .nav-links a {
    white-space: nowrap;
    padding: 8px 12px;
    font-size: 0.95rem;
  }
}

/* === Fixes for mobile devices in "desktop mode" === */
@media (hover: none) and (pointer: coarse) {
  /* Keep explore cards single column */
  .explore-grid {
    grid-template-columns: 1fr;
  }
  .explore-card {
    flex-direction: column;
    min-width: 0; /* allow shrinking */
  }
  .explore-image {
    flex: 0 0 auto;
    max-width: 100%;
  }
  .explore-text {
    flex: 1 1 0;
    min-width: 0;
    padding-left: 0;
  }
  .explore-text h3,
  .explore-text p {
    overflow-wrap: break-word;
    hyphens: auto;
  }

  .explore-image {
    flex: 0 0 auto;
    max-width: 280px;  /* keeps image more modest in size */
    width: 100%;
    margin: 0 auto;    /* center in column layout */
    display: block;
  }
}


@media (hover: none) and (pointer: coarse) {
  /* Stop mobile browsers from arbitrarily boosting text sizes */
  html {
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%; /* Safari/Chrome iOS */
    -ms-text-size-adjust: 100%;     /* legacy */
  }

  /* Normalize card typography a bit */
  .explore-text h3 { font-size: 1.15rem; line-height: 1.25; }
  .explore-text p  { font-size: 1rem;   line-height: 1.55; }

  .accommodation-card p,
  .car-hire-card p { font-size: 1rem; line-height: 1.55; }
}


/* Intro paragraph under hero */
.hero-intro {
  font-family: 'Open Sans', sans-serif;
  font-size: 1.15rem;
  line-height: 1.7;
  color: #4f4f4f;
  max-width: 800px;
  margin: 30px auto 40px;
  padding: 0 20px;
  text-align: center;
}

/* Airport maps section */
.airport-maps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  max-width: 1100px;
  margin: 0 auto 60px;
  padding: 0 20px;
}

.map-item {
  text-align: center;
}

.map-item iframe {
  width: 100%;
  max-width: 500px;
  height: 300px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.map-label {
  margin-top: 10px;
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: #3a2d1f;
}

/* Two-column maps on larger screens */
@media (min-width: 768px) {
  .airport-maps {
    grid-template-columns: 1fr 1fr;
  }
}

