/* =========================================================
   Villa Katerina & Pool — main stylesheet
   ========================================================= */

:root {
  --ink: #1c1917;          /* dark sections, text */
  --ink-2: #292420;
  --text: #2d2926;
  --muted: #6e655d;
  --paper: #fffdf9;        /* default background */
  --cream: #f6f1e8;        /* alternate background */
  --line: rgba(28, 25, 23, 0.1);
  --brand: #7d2e23;        /* terracotta from the logo */
  --brand-dark: #63231a;
  --gold: #c9a84c;
  --gold-soft: #e2cf98;

  --serif: 'EB Garamond', Georgia, 'Times New Roman', serif;
  --script: 'Great Vibes', 'EB Garamond', Georgia, serif;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(28, 25, 23, 0.04), 0 10px 30px -12px rgba(28, 25, 23, 0.18);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 72px;
}

/* EB Garamond's Greek letters are old-style; Greek pages use a serif with modern Greek */
html[lang="el"] {
  --serif: 'Noto Serif Display', Georgia, 'Times New Roman', serif;
  --script: 'Noto Serif Display', Georgia, serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.no-scroll { overflow: hidden; }

img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.15; }
p { margin: 0; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0 1.75rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.btn:hover { transform: translateY(-2px); }

.btn--primary { background: var(--brand); color: #fff; box-shadow: 0 8px 24px -10px rgba(125, 46, 35, 0.7); }
.btn--primary:hover { background: var(--brand-dark); }

.btn--ghost { color: #fff; border-color: rgba(255, 255, 255, 0.6); backdrop-filter: blur(6px); background: rgba(255, 255, 255, 0.06); }
.btn--ghost:hover { background: #fff; color: var(--ink); border-color: #fff; }

.btn--outline { color: var(--brand); border-color: rgba(125, 46, 35, 0.35); background: transparent; }
.btn--outline:hover { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  color: #fff;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.45), transparent);
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease), color 0.35s var(--ease);
}

.site-header.is-solid {
  background: rgba(255, 253, 249, 0.94);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  box-shadow: 0 1px 0 var(--line);
  color: var(--ink);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  white-space: nowrap;
  margin-right: auto;
}
.brand img { width: 44px; height: 44px; border-radius: 50%; background: #f2f2f2; }
.brand em { font-style: italic; font-weight: 500; opacity: 0.85; }

.main-nav { display: flex; align-items: center; gap: 0.25rem; }
.main-nav a {
  position: relative;
  padding: 0.5rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.2s;
}
.main-nav a::after {
  content: '';
  position: absolute;
  left: 0.8rem; right: 0.8rem; bottom: 0.2rem;
  height: 1.5px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.main-nav a:hover, .main-nav a.is-current { opacity: 1; }
.main-nav a:hover::after, .main-nav a.is-current::after { transform: scaleX(1); }

/* language picker */
.lang { position: relative; }
.lang-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  height: 40px;
  padding: 0 0.75rem;
  border-radius: 999px;
  border: 1px solid currentColor;
  border-color: rgba(127, 127, 127, 0.35);
  background: transparent;
  cursor: pointer;
}
.lang-btn img { width: 22px; height: 22px; object-fit: contain; }
.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 180px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #fff;
  color: var(--text);
  border-radius: 12px;
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s, transform 0.2s var(--ease), visibility 0.2s;
}
.lang.is-open .lang-menu { opacity: 1; visibility: visible; transform: none; }
.lang-menu button {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 0;
  border-radius: 8px;
  background: none;
  text-align: left;
  font-size: 0.9rem;
  cursor: pointer;
}
.lang-menu button:hover { background: var(--cream); }
.lang-menu button.is-current { font-weight: 700; }
.lang-menu img { width: 22px; height: 22px; object-fit: contain; }
.contact-list a img { width: 20px; height: 20px; object-fit: contain; }

/* mobile toggle */
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 0;
  background: none;
  cursor: pointer;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 11px; right: 11px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s;
}
.nav-toggle span:nth-child(1) { top: 15px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 27px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
  background: var(--ink);
}

.hero-slides, .hero-slide, .hero-shade { position: absolute; inset: 0; }
.hero-slide {
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 1.6s ease, transform 8s linear;
}
.hero-slide.is-active { opacity: 1; transform: scale(1); }
.hero-slide--first { background-image: url('../images/hero/hero-1.jpg'); }
@media (max-width: 900px) {
  .hero-slide--first { background-image: url('../images/hero/hero-1-sm.jpg'); }
}

.hero-shade {
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.1) 35%, rgba(0, 0, 0, 0.45) 100%),
    radial-gradient(ellipse at center, rgba(0, 0, 0, 0.25), transparent 70%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 820px;
  padding-top: var(--header-h);
  animation: rise 1.1s var(--ease) both 0.15s;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.1rem, 5vw, 3.75rem);
  font-weight: 500;
  letter-spacing: -0.005em;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.35);
  text-wrap: balance;
}

.hero-lead {
  margin: 1.25rem auto 0;
  max-width: 600px;
  font-size: clamp(1rem, 1.5vw, 1.1rem);
  color: rgba(255, 255, 255, 0.88);
  white-space: pre-line;
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2.25rem;
}

.hero-dots {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 2.25rem;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}
.hero-dots button {
  width: 26px; height: 3px;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: width 0.4s var(--ease), background 0.4s;
}
.hero-dots button::before { content: ''; display: block; height: 20px; margin-top: -9px; } /* bigger tap target */
.hero-dots button.is-active { width: 44px; background: #fff; }

.scroll-cue {
  position: absolute;
  z-index: 2;
  right: 32px;
  bottom: 28px;
  width: 26px; height: 42px;
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  border-radius: 14px;
}
.scroll-cue span {
  position: absolute;
  left: 50%; top: 8px;
  width: 3px; height: 8px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: #fff;
  animation: cue 1.8s ease-in-out infinite;
}

@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* ---------- Sections ---------- */
.section { padding: clamp(4.5rem, 9vw, 7.5rem) 0; }
.section--cream { background: var(--cream); }
.section--dark { background: var(--ink); color: #f4efe7; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brand);
}
.eyebrow::before { content: ''; width: 28px; height: 1.5px; background: currentColor; }
.eyebrow--light { color: var(--gold-soft); }
.eyebrow--light::before { display: none; }

.section-head { text-align: center; max-width: 640px; margin: 0 auto 2.75rem; }
/* section titles in an elegant script font (Great Vibes) */
.section-title {
  font-family: var(--script);
  font-size: clamp(3rem, 6vw, 4.4rem);
  font-weight: 400;
  line-height: 1.1;
  color: var(--ink);
}
.section-title em { font-style: normal; color: var(--brand); }
/* Great Vibes has no Greek letters, so Greek titles keep the serif font */
html[lang="el"] .section-title {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4.2vw, 3.1rem);
  font-weight: 500;
}
html[lang="el"] .section-title em { font-style: italic; }
.section-head .section-title::after {
  content: '';
  display: block;
  width: 44px; height: 2px;
  margin: 1.1rem auto 0;
  background: var(--gold);
}
.section-sub { margin-top: 1rem; color: var(--muted); font-size: 1.05rem; }
.section--dark .section-title { color: #fff; }
.section--dark .section-sub { color: rgba(244, 239, 231, 0.7); }

/* reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: center;
}

.about-desc { margin-top: 1.5rem; font-size: 1.1rem; color: var(--muted); max-width: 560px; }

.features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
}
.features li {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.features li:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.features .fa {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(125, 46, 35, 0.08);
  color: var(--brand);
  font-size: 1.1rem;
}
.guest-count { font-variant-numeric: tabular-nums; }

.about-photo { position: relative; margin: 0; }
.about-photo > img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 200px 200px var(--radius) var(--radius);
  box-shadow: 0 30px 60px -30px rgba(28, 25, 23, 0.45);
}
.about-photo figcaption {
  position: absolute;
  left: -28px;
  bottom: 40px;
  padding: 10px;
  background: var(--paper);
  border-radius: 50%;
  box-shadow: var(--shadow);
}
.about-photo figcaption img { width: 64px; height: 64px; border-radius: 50%; }

/* ---------- Chips (filters / tabs) ---------- */
.chips {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.25rem;
}
.chip {
  min-height: 42px;
  padding: 0 1.15rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.chip:hover { color: var(--ink); border-color: rgba(28, 25, 23, 0.3); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

.chips--dark .chip { border-color: rgba(255, 255, 255, 0.16); color: rgba(255, 255, 255, 0.7); }
.chips--dark .chip:hover { color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.chips--dark .chip.is-active { background: var(--gold); border-color: var(--gold); color: var(--ink); }

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.g-item {
  position: relative;
  display: block;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #e9e2d6;
  cursor: zoom-in;
  opacity: 0;
  transform: translateY(16px);
  animation: tileIn 0.7s var(--ease) forwards;
}
/* Only the FIRST photo is large. All small photos keep the same height;
   if the last row is not full, its photos share the row equally (no holes). */
@media (min-width: 701px) {
  .gallery-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .g-item { grid-column: span 2; }
  .g-item:first-child { grid-column: span 4; grid-row: span 2; aspect-ratio: auto; }
  /* 2 photos left in the last row -> half width each, same height */
  .g-item:last-child:nth-child(3n+2):nth-child(n+5),
  .g-item:nth-last-child(2):nth-child(3n+1):nth-child(n+4) { grid-column: span 3; aspect-ratio: 2 / 1; }
}
@media (max-width: 700px) {
  .gallery-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .g-item { grid-column: span 3; }
  .g-item:first-child { grid-column: span 6; }
  /* odd number of small photos -> last row has 3 photos instead of 1 */
  .g-item:nth-last-child(3):nth-child(even),
  .g-item:nth-last-child(3):nth-child(even) ~ .g-item { grid-column: span 2; aspect-ratio: 8 / 9; }
}

.g-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.6s ease, transform 0.8s var(--ease);
}
.g-item img.is-loaded { opacity: 1; transform: scale(1); }
.g-item:hover img.is-loaded { transform: scale(1.06); }

.g-item::after {
  content: '\f00e';
  font-family: 'FontAwesome';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  color: #fff;
  background: rgba(28, 25, 23, 0.35);
  opacity: 0;
  transition: opacity 0.35s;
}
.g-item:hover::after { opacity: 1; }

@keyframes tileIn { to { opacity: 1; transform: none; } }

.gallery-empty {
  padding: 4rem 1rem;
  text-align: center;
  color: var(--muted);
  border: 1px dashed rgba(28, 25, 23, 0.2);
  border-radius: var(--radius);
}
.gallery-empty .fa { display: block; font-size: 2rem; margin-bottom: 0.75rem; color: var(--gold); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(14, 12, 11, 0.95);
  opacity: 0;
  transition: opacity 0.3s ease;
  touch-action: pan-y;
}
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }

.lb-stage {
  position: relative;
  margin: 0;
  display: grid;
  place-items: center;
  width: min(92vw, 1500px);
  height: 86vh;
}
.lb-stage img {
  /* sized against the screen, so tall photos always fit */
  width: auto;
  height: auto;
  max-width: min(92vw, 1500px);
  max-height: 86vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  transition: opacity 0.3s ease;
  user-select: none;
}
.lb-stage img.is-swapping { opacity: 0; }

.lb-spinner {
  position: absolute;
  width: 34px; height: 34px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.lb-spinner.is-on { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }

.lb-btn {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
  transition: background 0.2s;
}
.lb-btn:hover { background: rgba(255, 255, 255, 0.2); }
.lb-close { top: 18px; right: 18px; font-size: 1.2rem; }
.lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 18px; top: 50%; transform: translateY(-50%); }

.lb-counter {
  position: absolute;
  left: 50%; bottom: 18px;
  transform: translateX(-50%);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.7);
}

/* ---------- Rental ---------- */
.rental-panel { display: none; justify-content: center; flex-wrap: wrap; gap: 24px; }
.rental-panel.is-active { display: flex; animation: rise 0.6s var(--ease) both; }

.rent-card {
  width: 320px;
  max-width: 100%;
  background: var(--ink-2);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.4s;
}
.rent-card:hover { transform: translateY(-4px); border-color: rgba(201, 168, 76, 0.4); }

.rent-media {
  position: relative;
  height: 300px;
  padding: 1.5rem;
  background: radial-gradient(circle at 50% 40%, #4a423b 0%, #2c2622 70%);
}
.rent-media > img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.35)); }

.rent-dims {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.rent-dims div { padding: 1rem 1.25rem; }
.rent-dims div + div { border-left: 1px solid rgba(255, 255, 255, 0.07); }
.rent-dims dt { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(244, 239, 231, 0.55); }
.rent-dims dd { margin: 0.2rem 0 0; font-family: var(--serif); font-size: 1.35rem; color: var(--gold-soft); }

/* before / after slider */
.compare { cursor: ew-resize; user-select: none; -webkit-user-select: none; }
.compare-base, .compare-top {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  padding: 1.5rem;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.35));
}
.compare-top { clip-path: inset(0 50% 0 0); }
#rent-table .compare-top { padding: 2.75rem; }

.compare-handle {
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  width: 2px;
  margin-left: -1px;
  background: rgba(255, 255, 255, 0.85);
  pointer-events: none;
  z-index: 3;
}
.compare-handle span {
  position: absolute;
  top: 50%; left: 50%;
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.compare-range {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%; height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  -webkit-appearance: none;
  appearance: none;
}
.compare-hint {
  position: absolute;
  z-index: 3;
  left: 50%; bottom: 0.85rem;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 1.5rem);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  pointer-events: none;
  transition: opacity 0.3s;
}
.compare.is-touched .compare-hint { opacity: 0; }

/* ---------- Rules ---------- */
/* layout: logo on the left, tabs + rules card on the right */
.rules-layout {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
}
.rules-logo { display: flex; justify-content: center; }
.rules-logo img {
  width: 100%;
  max-width: 420px;
  height: auto;
  filter: drop-shadow(0 24px 40px rgba(125, 46, 35, 0.18));
}
.rules-main { min-width: 0; }

/* tabs */
.rules-tabs {
  display: flex;
  justify-content: center;
  gap: 6px;
  width: max-content;
  max-width: 100%;
  margin: 0 0 1.5rem;
  padding: 6px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.rules-tab {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 48px;
  padding: 0 1.25rem 0 0.4rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.rules-tab:hover { color: var(--ink); }
.rules-tab.is-active { background: var(--ink); color: #fff; }

.rules-tab-icon {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--brand);
}
.rules-tab-icon img { width: 20px; height: 20px; }
.rules-tab-icon--double { width: 52px; border-radius: 999px; }
.rules-tab-icon--double img { width: 17px; height: 17px; }

/* panel: numbered list card */
.rules-panel {
  display: none;
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.rules-panel.is-active { display: block; animation: rise 0.6s var(--ease) both; }

.rules-body { padding: clamp(1.75rem, 4vw, 3rem); }
.rules-body h3 {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3vw, 2.1rem);
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 1.25rem;
}

.rules-list { margin: 0; padding: 0; list-style: none; counter-reset: rule; }
.rules-list li {
  counter-increment: rule;
  display: flex;
  gap: 1.1rem;
  align-items: baseline;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
  font-size: 1rem;
  color: var(--text);
}
.rules-list li::before {
  content: counter(rule, decimal-leading-zero);
  flex: none;
  min-width: 1.6rem;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--gold);
}

/* ---------- Contact ---------- */
/* one card: dark info panel + light form */
.contact-card {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  max-width: 1100px;
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
  background: var(--paper);
  box-shadow: 0 30px 70px -35px rgba(28, 25, 23, 0.45);
}

.contact-info {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: clamp(2rem, 4vw, 3rem);
  color: #f4efe7;
  background:
    linear-gradient(160deg, rgba(28, 25, 23, 0.9) 0%, rgba(28, 25, 23, 0.82) 55%, rgba(99, 35, 26, 0.88) 100%),
    url('../images/thumbs/pool/pool-3.jpg') center / cover;
}
.contact-info-logo { width: 64px; height: 64px; border-radius: 50%; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); }

.contact-info .label {
  display: block;
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.contact-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 1.4rem; }
.contact-list li { display: flex; align-items: center; gap: 1rem; }
.contact-list .fa {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(226, 207, 152, 0.35);
  background: rgba(255, 255, 255, 0.04);
  color: var(--gold-soft);
  font-size: 1.1rem;
}
.contact-list a, .contact-list .value {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.2rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  word-break: break-word;
  transition: color 0.2s;
}
.contact-list a:hover { color: var(--gold-soft); }

.contact-booking {
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.booking-links { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.9rem; }
.booking-links .btn { flex: 1 1 130px; }
.btn--gold { color: var(--gold-soft); border-color: rgba(226, 207, 152, 0.5); background: transparent; }
.btn--gold:hover { background: var(--gold); border-color: var(--gold); color: var(--ink); }

.contact-socials { display: flex; gap: 0.6rem; margin-top: auto; }
.contact-socials a {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  text-decoration: none;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.contact-socials a:hover { background: var(--gold); border-color: var(--gold); color: var(--ink); }

.contact-form { padding: clamp(1.75rem, 4vw, 3rem); }
.contact-form h3 { font-family: var(--serif); font-size: 2rem; font-weight: 500; color: var(--ink); margin-bottom: 1.75rem; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.1rem; }
.field--full { grid-column: 1 / -1; }

.field label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
}
.req { color: var(--brand); }

.field input, .field textarea, .field select {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.95rem;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--cream);
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
/* grows by itself with the text (script/main.js), visitors can't drag it */
.field textarea { resize: none; min-height: 110px; max-height: 340px; overflow-y: hidden; line-height: 1.5; }
.field-note { margin: 0.35rem 0 0; font-size: 0.8rem; color: var(--muted); }
.field input[readonly] { cursor: not-allowed; opacity: 0.75; }
.field select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 2.5rem;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%237d2e23' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}
.field input[type="date"] { cursor: pointer; }
.field input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: 0.6; }
.optional { font-weight: 500; letter-spacing: 0.04em; text-transform: none; color: var(--muted); }
.field input:hover, .field textarea:hover, .field select:hover { border-color: rgba(28, 25, 23, 0.12); }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  background: #fff;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(125, 46, 35, 0.1);
}
.field .is-invalid, .was-validated .field :invalid { border-color: #c0392b; background: #fffafa; }

.invalid-feedback { display: none; margin-top: 0.35rem; font-size: 0.8rem; color: #b03a2e; }
.field .is-invalid + .invalid-feedback,
.was-validated .field :invalid + .invalid-feedback { display: block; }

.form-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem 1.5rem; margin-top: 1.75rem; }
.mandatory { font-size: 0.85rem; color: var(--muted); }

/* spam trap field: off screen, invisible to people */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form { position: relative; }

.contact-form.is-sending #res-submit { opacity: 0.6; cursor: progress; }
.form-result {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 1.25rem 0 0;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  font-size: 0.95rem;
}
.form-result[hidden] { display: none; }
.form-result { transition: opacity 0.4s; }
.form-result.is-fading { opacity: 0; }
.form-result.is-sending { background: var(--cream); color: var(--muted); }
.form-result.is-sending::before {
  content: "";
  flex: none;
  width: 16px; height: 16px;
  border: 2px solid rgba(28, 25, 23, 0.15);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: form-spin 0.8s linear infinite;
}
.form-result.is-ok { background: #e8f5ec; color: #1d5b33; }
.form-result.is-error { background: #fdecea; color: #8a2a1f; }
@keyframes form-spin { to { transform: rotate(360deg); } }

.map {
  position: relative;
  max-width: 1100px;
  margin: 28px auto 0;
  border-radius: 20px;
  overflow: hidden;
  height: 380px;
  background: var(--cream);
  box-shadow: 0 30px 70px -40px rgba(28, 25, 23, 0.45);
}
.map-pill {
  position: absolute;
  z-index: 2;
  left: 16px; bottom: 16px;
  display: block;
  width: max-content;
  max-width: calc(100% - 32px);
  line-height: 1.4;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}
.map-pill .fa { color: var(--gold-soft); margin-right: 0.35rem; }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(244, 239, 231, 0.75); padding: 3.5rem 0 1.5rem; }
.footer-inner { display: flex; align-items: center; flex-wrap: wrap; gap: 1.5rem 2.5rem; }
.footer-inner .brand { color: #fff; margin-right: auto; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.footer-nav a { text-decoration: none; font-size: 0.9rem; transition: color 0.2s; }
.footer-nav a:hover { color: var(--gold-soft); }
.socials { display: flex; gap: 0.6rem; }
.socials a {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  text-decoration: none;
  font-size: 1.1rem;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.socials a:hover { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
  color: rgba(244, 239, 231, 0.5);
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 16px 1.25rem;
    background: rgba(255, 253, 249, 0.98);
    color: var(--ink);
    box-shadow: 0 20px 30px -20px rgba(0, 0, 0, 0.3);
    clip-path: inset(0 0 100% 0);
    visibility: hidden;
    transition: clip-path 0.4s var(--ease), visibility 0.4s;
  }
  .main-nav.is-open { clip-path: inset(0 0 0 0); visibility: visible; }
  .main-nav a { padding: 0.95rem 0.5rem; border-bottom: 1px solid var(--line); font-size: 0.85rem; }
  .main-nav a::after { display: none; }
  .main-nav a.is-current { color: var(--brand); }
  .nav-toggle { display: block; margin-right: -8px; }
  .header-inner { gap: 0.5rem; }
  .site-header.menu-open { background: var(--paper); color: var(--ink); }

  .about-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 460px; margin: 0 auto; width: 100%; }
  .about-photo figcaption { left: 12px; }

  .rules-layout { grid-template-columns: 1fr; max-width: 640px; gap: 2rem; }
  .rules-logo img { max-width: 200px; }
  .rules-tabs { margin: 0 auto 1.5rem; }
  .contact-card { grid-template-columns: 1fr; max-width: 640px; }
  .map { max-width: 640px; }
}

@media (max-width: 700px) {
  .container { padding: 0 16px; }
  .brand { font-size: 1.1rem; }
  .brand img { width: 38px; height: 38px; }
  .gallery-grid { gap: 8px; }
  .chips { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; margin: 0 -16px 1.75rem; padding: 0 16px 4px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .form-row { grid-template-columns: 1fr; }
  .rules-tabs { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; border-radius: var(--radius); }
  .rules-tab {
    flex-direction: column;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.7rem 0.35rem;
    border-radius: 10px;
    font-size: 0.78rem;
    line-height: 1.25;
    white-space: normal;
    text-align: center;
  }
  .rules-logo img { max-width: 150px; }
  .lb-prev, .lb-next { top: auto; bottom: 12px; transform: none; }
  .lb-stage { height: 78vh; }
  .lb-stage img { max-height: 78vh; }
  .scroll-cue { display: none; }
  .map { height: 300px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 420px) {
  .brand span { font-size: 1rem; }
  .features { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .reveal, .g-item { opacity: 1; transform: none; }
}
