/* =========================================================
   Domus Olivae — custom styles
   ========================================================= */

:root {
  --green: #416600;
  --green-dark: #2d4700;
  --cream: #f7f4ec;
  --sand: #e8e1cf;
  --ink: #1b1b1b;
  --muted: #6b6b6b;
  --white: #ffffff;
  --radius: 6px;
  --max: 1280px;
  --serif: 'Adamina', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--green); }

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.center { text-align: center; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 28px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .25s ease, background .25s ease, color .25s ease;
  border: 1.5px solid transparent;
}
.btn-primary {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}
.btn-primary:hover {
  background: var(--green-dark);
  color: var(--white);
  transform: translateY(-2px);
}
.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}
.btn-outline:hover {
  background: var(--white);
  color: var(--green);
  transform: translateY(-2px);
}

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 24px;
}
.logo img {
  height: 48px;
  width: auto;
}
.main-nav ul {
  display: flex;
  gap: 36px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-nav a {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink);
  position: relative;
  padding: 6px 0;
}
.main-nav a.active,
.main-nav a:hover { color: var(--green); }
.main-nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--green);
  transform: scaleX(0);
  transition: transform .25s ease;
}
.main-nav a:hover::after,
.main-nav a.active::after { transform: scaleX(1); }

.header-cta {
  color: var(--green);
  border-color: var(--green);
  padding: 10px 22px;
  font-size: 12px;
}
.header-cta:hover {
  background: var(--green);
  color: var(--white);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  width: 32px;
  height: 32px;
  flex-direction: column;
  justify-content: space-around;
  cursor: pointer;
  padding: 4px;
}
.menu-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  transition: transform .25s ease, opacity .25s ease;
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  background:
    linear-gradient(rgba(0,0,0,0.35), rgba(0,0,0,0.55)),
    url('../images/Rectangle-16.png') center/cover no-repeat;
  color: var(--white);
}
.hero-inner {
  display: flex;
  justify-content: flex-end;
  width: 100%;
}
.hero-copy {
  max-width: 620px;
  padding: 56px 48px;
  text-align: right;
}
.hero-eyebrow {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin: 0 0 20px;
  color: rgba(255,255,255,0.85);
}
.hero-eyebrow em {
  font-style: italic;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: none;
  color: var(--white);
}
.hero-title {
  font-family: var(--serif);
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 400;
  margin: 0 0 36px;
  line-height: 1.08;
  color: var(--white);
  text-shadow: 0 4px 24px rgba(0,0,0,0.35);
}

/* =========================================================
   BOOKING BAR
   ========================================================= */
.booking {
  margin: -64px auto 0;
  position: relative;
  z-index: 5;
  padding: 0 24px 64px;
}
.booking-form {
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 25px 50px rgba(0,0,0,0.15);
  padding: 32px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr auto;
  gap: 20px;
  align-items: end;
  max-width: var(--max);
  margin: 0 auto;
  border: 1px solid rgba(102, 112, 0, 0.08);
}
.booking-form .field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}
.booking-form label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 4px;
}
.booking-form input,
.booking-form select {
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px 16px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  background: #fafafa;
  color: var(--ink);
  outline: none;
  transition: all 0.2s ease;
  width: 100%;
  cursor: pointer;
}
.booking-form .date-display {
  caret-color: transparent;
}
.booking-form .date-display::placeholder {
  color: #9ca3af;
  opacity: 1;
}

/* Modern calendar popup */
.date-popup {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  z-index: 50;
  width: 320px;
  max-width: calc(100vw - 32px);
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 -10px 40px -8px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(102, 112, 0, 0.08);
  padding: 16px;
  font-family: var(--sans);
  animation: dpFade 0.18s ease-out;
}
@keyframes dpFade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.date-popup .dp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 4px 12px;
}
.date-popup .dp-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.2px;
}
.date-popup .dp-nav {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.date-popup .dp-nav:hover {
  background: rgba(102, 112, 0, 0.08);
  color: var(--green);
}

.date-popup .dp-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  padding: 4px 0 8px;
  border-bottom: 1px solid #f1f1ee;
  margin-bottom: 6px;
}
.date-popup .dp-weekdays span {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9ca3af;
}

.date-popup .dp-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  padding-top: 4px;
}
.date-popup .dp-day {
  aspect-ratio: 1 / 1;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s ease;
  font-variant-numeric: tabular-nums;
}
.date-popup .dp-day:hover:not(.disabled):not(.other):not(.selected) {
  background: rgba(102, 112, 0, 0.1);
  color: var(--green);
}
.date-popup .dp-day.today {
  box-shadow: inset 0 0 0 1.5px rgba(102, 112, 0, 0.5);
  color: var(--green);
  font-weight: 600;
}
.date-popup .dp-day.selected {
  background: var(--green);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 10px -2px rgba(102, 112, 0, 0.4);
}
.date-popup .dp-day.disabled {
  color: #d1d5db;
  cursor: not-allowed;
}
.date-popup .dp-day.other {
  color: #e5e7eb;
  cursor: default;
}

@media (max-width: 480px) {
  .date-popup { width: 288px; padding: 14px; }
  .date-popup .dp-day { font-size: 12.5px; }
}

/* Make the entire field container clickable */
.booking-form .field {
  cursor: pointer;
  transition: all 0.2s ease;
}

.booking-form .field:hover {
  transform: translateY(-1px);
}

.booking-form .field:hover input,
.booking-form .field:hover select {
  border-color: var(--green);
  background: var(--white);
  transform: none;
}
.booking-form input:focus,
.booking-form select:focus,
.booking-form .date-field.open .date-display {
  border-color: var(--green);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(102, 112, 0, 0.1);
  transform: translateY(-1px);
}
.booking-form input:hover,
.booking-form select:hover {
  border-color: #d1d5db;
  background: var(--white);
}
.booking-form > button {
  align-self: stretch;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: all 0.2s ease;
  min-height: 52px;
}
.booking-form > button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 112, 0, 0.3);
}

/* Select Arrow Styling */
.booking-form select {
  appearance: none;
  background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23667000" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
  padding-right: 40px;
}

/* =========================================================
   VILLA LISTING
   ========================================================= */
.villa-listing { padding: 48px 0 96px; }
.villa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
  justify-items: center;
}
.villa-card {
  max-width: 560px;
  text-align: left;
  transition: transform .3s ease;
}
.villa-card:hover { transform: translateY(-4px); }
.villa-card img {
  border-radius: var(--radius);
  aspect-ratio: 16/9;
  object-fit: cover;
  margin-bottom: 16px;
}
.villa-card h3 {
  font-family: var(--serif);
  font-size: 28px;
  margin: 0 0 8px;
  font-weight: 400;
}
.villa-card .price {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--muted);
  margin: 0;
}
.villa-card .price span { color: var(--green); font-weight: 600; }

/* =========================================================
   ABOUT
   ========================================================= */
.about {
  padding: 96px 0;
}
.eyebrow {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--green);
  text-align: center;
  margin: 0 0 12px;
}
.section-title {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 400;
  text-align: center;
  margin: 0 0 48px;
  line-height: 1.2;
  color: var(--ink);
}
.about-text {
  max-width: 820px;
  margin: 0 auto 48px;
  font-size: 16px;
  color: #333;
}
.about-text p { margin: 0 0 18px; }

/* =========================================================
   PURPOSE / MISSION / VISION
   ========================================================= */
.pmv {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.pmv-card {
  position: relative;
  min-height: 560px;
  color: var(--white);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
  cursor: pointer;
}
.pmv-card:nth-child(1) {
  background-image: url('../images/Rectangle-16.png');
}
/* Rectangle-337 and Rectangle-340 have transparent rounded-corner padding
   baked into the PNG. Scale the background up so the transparent border
   is clipped by the card's overflow:hidden, leaving only the photo. */
.pmv-card:nth-child(2) {
  background-image: url('../images/8R7A9917_web.jpg');
  background-size: cover;
  background-position: center center;
}
.pmv-card:nth-child(3) {
  background-image: url('../images/8R7A9877_web.jpg');
  background-size: cover;
  background-position: center center;
}

.pmv-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  transition: background .5s ease;
  pointer-events: none;
  z-index: 1;
}
.pmv-card:hover .pmv-overlay {
  background: rgba(0, 0, 0, 0.7);
}

.pmv-card h3 {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 32px;
  font-family: var(--serif);
  font-size: 42px;
  font-weight: 400;
  margin: 0;
  text-align: center;
  text-shadow: 0 2px 12px rgba(0,0,0,0.6);
  transition: bottom .5s ease, font-size .5s ease, top .5s ease;
  z-index: 2;
}
.pmv-card:hover h3 {
  bottom: auto;
  top: 56px;
  font-size: 48px;
}

.pmv-card .pmv-body {
  position: absolute;
  inset: 0;
  padding: 140px 56px 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity .5s ease, transform .5s ease;
  z-index: 2;
}
.pmv-card .pmv-body p {
  margin: 0;
  max-width: 420px;
  font-size: 14px;
  line-height: 1.7;
  text-align: center;
  position: relative;
  padding: 28px;
}
.pmv-card .pmv-body p::before,
.pmv-card .pmv-body p::after {
  content: '';
  position: absolute;
  width: 32px;
  height: 32px;
  border: 1.5px solid rgba(255,255,255,0.85);
}
.pmv-card .pmv-body p::before {
  top: 0;
  left: 0;
  border-right: none;
  border-bottom: none;
}
.pmv-card .pmv-body p::after {
  bottom: 0;
  right: 0;
  border-left: none;
  border-top: none;
}
.pmv-card:hover .pmv-body {
  opacity: 1;
  transform: scale(1);
}

/* =========================================================
   ACCOMMODATION
   ========================================================= */
.accommodation {
  padding: 96px 0;
  background: var(--cream);
}
.accommodation img {
  border-radius: var(--radius);
  margin: 0 auto;
  max-width: 100%;
}

/* =========================================================
   VILLA DETAIL (TerRallia / Vedere)
   ========================================================= */
.villa-detail {
  padding: 96px 0 48px;
  background: var(--cream);
}
.villa-detail-alt {
  background: linear-gradient(135deg, #f7f4ec 0%, #efe8d4 100%);
}
.villa-desc {
  max-width: 900px;
  margin: 0 auto 24px;
  font-size: 16px;
  color: #333;
  text-align: justify;
}
.amenity-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  padding-top: 32px;
  padding-bottom: 64px;
}
.amenity {
  flex: 1 1 140px;
  min-width: 140px;
  max-width: 180px;
  background: var(--white);
  border: 1px solid #e5dfcc;
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
  transition: transform .25s ease, box-shadow .25s ease;
}
.amenity:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}
.amenity-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  margin-bottom: 10px;
}
.amenity-icon svg {
  max-height: 40px;
  width: auto;
}
.amenity span:last-child {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

/* =========================================================
   SERVICES
   ========================================================= */
.services {
  padding: 96px 0;
  background: var(--sand);
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}
.service {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 16px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
  transition: transform .25s ease, box-shadow .25s ease;
}
.service:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(0,0,0,0.08);
}
.service-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 64px;
  margin-bottom: 14px;
}
.service-icon svg {
  max-height: 56px;
  width: auto;
}
.service h4 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink);
}

/* =========================================================
   GALLERY
   ========================================================= */
.gallery { padding: 96px 0; background: var(--cream); }
.gallery-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 48px;
}
.tab {
  background: transparent;
  border: 1px solid #d5d5d5;
  padding: 10px 20px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--ink);
  border-radius: 999px;
  cursor: pointer;
  transition: all .25s ease;
}
.tab.active,
.tab:hover {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 48px;
}
.gallery-grid img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius);
  transition: transform .3s ease;
  cursor: pointer;
}
.gallery-grid img:hover { transform: scale(1.02); }
.gallery-grid img.hidden { display: none; }
.gallery-grid img.extra-hidden { display: none; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(10, 10, 10, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: lbFade 0.2s ease-out;
  -webkit-tap-highlight-color: transparent;
}
.lightbox[hidden] { display: none; }
@keyframes lbFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.lightbox-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 100%;
  max-height: 100%;
}
.lightbox-img {
  max-width: min(92vw, 1400px);
  max-height: 82vh;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  user-select: none;
  animation: lbZoom 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes lbZoom {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}
.lightbox-counter {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}
.lightbox-btn {
  position: absolute;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.15s ease, transform 0.15s ease;
}
.lightbox-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(1.06);
}
.lightbox-close { top: 24px; right: 24px; }
.lightbox-prev  { left: 24px;  top: 50%; transform: translateY(-50%); }
.lightbox-next  { right: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-prev:hover { transform: translateY(-50%) scale(1.06); }
.lightbox-next:hover { transform: translateY(-50%) scale(1.06); }

@media (max-width: 640px) {
  .lightbox-btn { width: 40px; height: 40px; }
  .lightbox-close { top: 16px; right: 16px; }
  .lightbox-prev  { left: 12px; }
  .lightbox-next  { right: 12px; }
  .lightbox-img   { max-width: 96vw; max-height: 75vh; }
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  color: var(--white);
  padding: 80px 0 32px;
  text-align: center;
}
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 32px; }
.footer-logo { max-width: 340px; height: auto; }
.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-nav a {
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
  opacity: 0.9;
}
.footer-nav a:hover { opacity: 1; color: var(--white); text-decoration: underline; }
.social { display: flex; gap: 16px; }
.social a { display: inline-flex; transition: transform .25s ease; }
.social a:hover { transform: translateY(-3px); }
.footer-divider {
  width: 100%;
  max-width: 960px;
  border: none;
  border-top: 1px solid rgba(255,255,255,0.25);
  margin: 16px 0 0;
}
.copyright {
  margin: 0;
  font-size: 13px;
  opacity: 0.85;
}
.copyright a { color: #9fe8ff; text-decoration: underline; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
  .main-nav,
  .header-cta { display: none; }
  .menu-toggle { display: flex; }
  .main-nav.open {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
    padding: 24px;
  }
  .main-nav.open ul {
    flex-direction: column;
    gap: 16px;
  }
  .booking-form {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 24px;
  }
  .booking-form > button {
    grid-column: 1 / -1;
    margin-top: 8px;
  }
  .booking-form .field {
    gap: 6px;
  }
  .booking-form input,
  .booking-form select {
    padding: 12px 14px;
    font-size: 14px;
  }
  .pmv { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

/* =========================================================
   BOOKING FORM ENHANCEMENTS
   ========================================================= */

.detailed-booking {
  background: var(--white);
  border-radius: 12px;
  padding: 32px;
  margin-top: 32px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
}

.booking-summary {
  background: var(--cream);
  border: 1px solid var(--sand);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 32px;
  text-align: center;
}

.booking-summary h4 {
  margin: 0 0 16px;
  color: var(--green);
  font-family: var(--serif);
}

.booking-summary .summary-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.booking-summary .total {
  font-size: 1.25em;
  font-weight: 700;
  color: var(--green);
  border-top: 1px solid var(--sand);
  padding-top: 16px;
  margin-top: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.form-section h4 {
  margin: 0 0 20px;
  color: var(--green);
  font-family: var(--serif);
  border-bottom: 1px solid var(--sand);
  padding-bottom: 8px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: var(--ink);
}

.field input,
.field select {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--sand);
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 14px;
  background: var(--white);
  transition: border-color .25s ease;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--green);
}

.booking-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
}

.availability-message {
  background: #d4edda;
  color: #155724;
  padding: 16px 20px;
  border-radius: 8px;
  margin: 16px 0;
  text-align: center;
  border: 1px solid #c3e6cb;
}

.availability-message.unavailable {
  background: #f8d7da;
  color: #721c24;
  border-color: #f5c6cb;
}

@media (max-width: 640px) {
  .hero { min-height: 70vh; }
  .hero-copy { padding: 32px 24px; text-align: center; }
  .booking-form {
    grid-template-columns: 1fr;
    padding: 24px 20px;
    gap: 16px;
  }
  .booking-form .field {
    gap: 6px;
  }
  .booking-form input,
  .booking-form select {
    padding: 16px 14px;
    font-size: 16px; /* Prevent zoom on iOS */
  }
  .booking-form > button {
    margin-top: 12px;
    min-height: 48px;
  }
  .booking { margin-top: -32px; padding-bottom: 48px; }
  .about, .services, .gallery, .accommodation, .villa-detail { padding: 64px 0; }
  .gallery-grid { grid-template-columns: 1fr; }
  .amenity-strip { gap: 12px; }
  .amenity { flex: 1 1 45%; min-width: 120px; }
  .footer-nav ul { gap: 20px; }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .detailed-booking {
    padding: 20px;
  }

  .booking-actions {
    flex-direction: column;
  }

  .booking-actions .btn {
    width: 100%;
  }

  .villas-grid {
    grid-template-columns: 1fr;
  }

  .villa-availability-card {
    margin-bottom: 2rem;
  }

  .calendar-grid {
    font-size: 0.875rem;
  }
}

/* =========================================================
   VILLA AVAILABILITY SYSTEM
   ========================================================= */

.villa-availability {
  background: var(--white);
  border-radius: 12px;
  padding: 32px;
  margin-top: 32px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
}

.availability-summary {
  background: var(--cream);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  margin-bottom: 32px;
}

.search-params {
  font-weight: 600;
  color: var(--green);
}

.villas-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.villa-availability-card {
  border: 2px solid var(--sand);
  border-radius: 12px;
  overflow: hidden;
  background: var(--white);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.villa-availability-card.available {
  border-color: var(--green);
}

.villa-availability-card:hover {
  transform: translateY(-2px);
}

.villa-header {
  padding: 20px;
  background: var(--cream);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--sand);
}

.villa-header h4 {
  margin: 0;
  font-family: var(--serif);
  color: var(--green);
}

.villa-rate {
  font-weight: bold;
  color: var(--ink);
}

.villa-rate span {
  font-size: 0.875em;
  font-weight: normal;
  color: var(--muted);
}

.villa-image {
  height: 200px;
  overflow: hidden;
}

.villa-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.villa-status {
  padding: 20px;
  text-align: center;
}

.status-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.875em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.status-badge.available {
  background: #d4edda;
  color: #155724;
}

.status-badge.fully-booked {
  background: #f8d7da;
  color: #721c24;
}

.villa-status p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.9em;
}

/* Calendar Styles */
.booking-calendar {
  padding: 20px;
  border-top: 1px solid var(--sand);
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.calendar-header h5 {
  margin: 0;
  font-family: var(--serif);
  color: var(--green);
}

.calendar-nav {
  background: none;
  border: 1px solid var(--sand);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.calendar-nav:hover {
  background: var(--cream);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--sand);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
}

.calendar-day-header {
  background: var(--green);
  color: var(--white);
  padding: 8px 4px;
  text-align: center;
  font-size: 0.75em;
  font-weight: 600;
  text-transform: uppercase;
}

.calendar-day {
  background: var(--white);
  padding: 12px 4px;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s ease;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875em;
}

.calendar-day:hover {
  background: var(--cream);
}

.calendar-day.other-month {
  color: var(--muted);
  background: #fafafa;
}

.calendar-day.past {
  color: var(--muted);
  background: #f5f5f5;
  cursor: not-allowed;
}

.calendar-day.booked {
  background: #f8d7da;
  color: #721c24;
  cursor: not-allowed;
}

.calendar-day.available {
  background: var(--white);
  border: 1px solid transparent;
}

.calendar-day.selected {
  background: var(--green);
  color: var(--white);
}

.calendar-day.in-range {
  background: rgba(65, 102, 0, 0.1);
}

.calendar-legend {
  display: flex;
  justify-content: center;
  gap: 16px;
  font-size: 0.8em;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

.legend-color.available {
  background: var(--white);
  border: 1px solid var(--sand);
}

.legend-color.selected {
  background: var(--green);
}

.legend-color.booked {
  background: #f8d7da;
}

/* Selection Summary */
.selection-summary {
  background: var(--cream);
  border-radius: 8px;
  padding: 20px;
  margin-top: 16px;
  text-align: center;
}

.selected-dates {
  margin-bottom: 8px;
  color: var(--ink);
}

.selected-total {
  margin-bottom: 16px;
  font-size: 1.1em;
  color: var(--green);
}

.availability-actions {
  text-align: center;
}
