/* =========================================================
   Sa Piscina Tarbena — stylesheet
   Hand-written CSS (no build step) replicating the original
   Tailwind-based Lovable design so the site runs on plain
   PHP hosting with zero front-end tooling.
   ========================================================= */

:root {
  --radius: 0.75rem;

  --background: #fdfaf5;
  --foreground: #2c1f16;
  --card: #ffffff;

  --primary: #b6552c;         /* terracotta */
  --primary-foreground: #fffaf3;
  --secondary: #f1e6d3;
  --secondary-foreground: #3c2e1e;
  --muted-foreground: #7c6a58;

  --accent: #4f95b3;           /* pool blue */
  --accent-foreground: #fffaf3;
  --sun: #e3a94a;              /* warm sun yellow */
  --whatsapp: #2fae60;
  --whatsapp-foreground: #fbfff9;

  --border: #e4d9c4;

  --shadow-warm: 0 20px 50px -20px rgba(182,85,44,0.35);
  --shadow-soft: 0 10px 30px -12px rgba(60,46,30,0.2);

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Manrope", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
figure { margin: 0; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-body);
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0;
}
p { margin: 0; }
ul, dl { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }

.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 6rem 0; }
@media (max-width: 767px) { .section { padding: 4rem 0; } }
.bg-tint { background: rgba(241,230,211,0.4); }

.kicker {
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--primary);
}
.kicker.light { color: rgba(255,255,255,0.85); text-shadow: 0 1px 3px rgba(0,0,0,0.55), 0 1px 8px rgba(0,0,0,0.35); }
.kicker.accent { color: var(--accent); }

.h2 { margin-top: 1rem; font-size: 2.5rem; line-height: 1.15; }
.h2.serif { color: #0f1c3a; }
.h2.max-w-2 { max-width: 42rem; }
@media (min-width: 768px) { .h2 { font-size: 3rem; } }

.accent-text { color: var(--accent); }

.prose { margin-top: 1.5rem; }
.prose p { margin-top: 1rem; color: var(--muted-foreground); line-height: 1.7; }
.prose p:first-child { margin-top: 0; }
.prose-single { margin-top: 1.5rem; color: var(--muted-foreground); line-height: 1.7; }
.prose-single.center { max-width: 42rem; margin-left: auto; margin-right: auto; }

.section-head { max-width: 42rem; }
.section-head-center { max-width: 42rem; margin: 0 auto; text-align: center; }

/* ---------- grid helpers ---------- */
.grid-2 { display: grid; gap: 3rem; grid-template-columns: 1fr; }
.grid-5 { display: grid; gap: 3rem; grid-template-columns: 1fr; }
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-5 { grid-template-columns: repeat(5, 1fr); }
  .col-span-2 { grid-column: span 2; }
  .col-span-3 { grid-column: span 3; }
  .order-1-md-2 { order: 2; }
  .order-2-md-1 { order: 1; }
}
.items-center { align-items: center; }
.gap-xl { gap: 3rem; }

/* Pool section: give the text column a bit more room so the price
   ("Un chapuzón por 2 €.") doesn't wrap onto its own line. */
@media (min-width: 768px) {
  #pool .grid-5 { grid-template-columns: 46% 54%; }
  #pool .col-span-3, #pool .col-span-2 { grid-column: span 1; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: opacity 0.2s, transform 0.2s, background-color 0.2s;
  white-space: nowrap;
}
.btn-sm { padding: 0.5rem 1rem; font-size: 0.875rem; }
.btn-primary { background: var(--primary); color: var(--primary-foreground); }
.btn-primary:hover { opacity: 0.9; }
.btn-sun { background: var(--sun); color: #2c1f16; box-shadow: 0 10px 30px -10px rgba(0,0,0,0.6); }
.btn-sun:hover { transform: scale(1.05); }
.btn-outline { border-color: var(--border); background: transparent; }
.btn-outline:hover { background: var(--secondary); }
.btn-outline-light { border-color: rgba(255,255,255,0.5); color: #fff; background: rgba(255,255,255,0.05); backdrop-filter: blur(4px); }
.btn-outline-light:hover { background: rgba(255,255,255,0.15); }
.btn-whatsapp { background: var(--whatsapp); color: var(--whatsapp-foreground); }
.btn-whatsapp:hover { opacity: 0.9; }
.icon { width: 1rem; height: 1rem; }
.icon-sm { width: 1rem; height: 1rem; }

.cta-row { margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.cta-row.center { justify-content: center; margin-top: 3rem; }

/* ---------- header / nav ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(253,250,245,0.7);
  border-bottom: 1px solid rgba(228,217,196,0.5);
}
.header-inner {
  height: 4rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand { font-family: var(--font-display); font-size: 1.25rem; letter-spacing: -0.02em; flex-shrink: 0; }
.brand .accent { color: var(--primary); }
.main-nav { display: none; align-items: center; gap: 1.75rem; font-size: 0.9rem; }
.main-nav a:hover { color: var(--primary); }
@media (min-width: 1024px) { .main-nav { display: flex; } }
.header-right { display: flex; align-items: center; gap: 1rem; flex-shrink: 0; }
.lang-switcher { display: flex; align-items: center; gap: 0.25rem; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.15em; }
.lang-switcher .dot { color: rgba(0,0,0,0.25); margin: 0 0.25rem; }
.lang-switcher a { color: var(--muted-foreground); }
.lang-switcher a.active { color: var(--primary); font-weight: 600; }
.lang-switcher a:hover { color: var(--foreground); }

.phone-btn { gap: 0.4rem; }
.phone-btn-icon { display: none; }
@media (max-width: 640px) {
  .phone-btn-text { display: none; }
  .phone-btn-icon { display: inline-flex; }
  .phone-btn { padding: 0.55rem; border-radius: 999px; }
}

.nav-toggle {
  display: flex; flex-direction: column; justify-content: center; gap: 4px;
  width: 2rem; height: 2rem; background: none; border: none; padding: 0;
}
@media (min-width: 1024px) { .nav-toggle { display: none; } }
.nav-toggle span { display: block; height: 2px; background: var(--foreground); border-radius: 1px; }
.mobile-nav {
  display: none; flex-direction: column;
  background: var(--background); border-top: 1px solid var(--border);
  padding: 0.5rem 1.5rem 1rem;
}
.mobile-nav.open { display: flex; }
.mobile-nav a { padding: 0.6rem 0; border-bottom: 1px solid var(--border); font-size: 0.95rem; }
@media (min-width: 1024px) { .mobile-nav { display: none !important; } }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: flex-end;
  overflow: hidden; background: #000;
}
.hero-media { position: absolute; inset: 0; overflow: hidden; }
.hero-media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: saturate(1.1) contrast(1.05) brightness(1.05);
}
@keyframes heroZoom { 0% { transform: scale(1.08) translate3d(0,0,0); } 100% { transform: scale(1.18) translate3d(-1.5%,-1%,0); } }
.hero-kenburns { animation: heroZoom 22s ease-in-out infinite alternate; will-change: transform; }
@keyframes sunFlare { 0%,100% { opacity: .55; transform: translate(0,0) scale(1); } 50% { opacity: .9; transform: translate(-2%,1%) scale(1.08); } }
.hero-sun {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 78% 22%, rgba(242,232,197,0.9), rgba(217,181,110,0.4) 25%, transparent 45%);
  animation: sunFlare 9s ease-in-out infinite; mix-blend-mode: screen;
}
.hero-grain {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.3; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.9  0 0 0 0 0.75  0 0 0 0 0.55  0 0 0 0.35 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/></svg>");
}
.hero-fade-top { position: absolute; inset: 0 0 auto 0; height: 10rem; background: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent); pointer-events: none; }
.hero-fade-bottom { position: absolute; inset: auto 0 0 0; height: 50%; background: linear-gradient(to top, rgba(0,0,0,0.75), rgba(0,0,0,0.25), transparent); pointer-events: none; }
.hero-content { position: relative; padding: 8rem 1.5rem 6rem; width: 100%; }
.hero-title {
  font-size: 2.75rem; color: #fff; line-height: 0.98; max-width: 48rem;
  text-shadow: 0 2px 6px rgba(0,0,0,0.6), 0 4px 24px rgba(0,0,0,0.45);
}
.hero-title em { color: var(--sun); font-style: normal; }
@media (min-width: 768px) { .hero-title { font-size: 4.5rem; } }
@media (min-width: 1024px) { .hero-title { font-size: 5.5rem; } }
.hero-sub { margin-top: 1.5rem; font-size: 1.125rem; color: rgba(255,255,255,0.9); max-width: 34rem; text-shadow: 0 1px 4px rgba(0,0,0,0.6), 0 2px 10px rgba(0,0,0,0.35); }
.hero-cta { margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: 1rem; }

/* Mobile: tighter, more opaque shadow for stronger contrast over the
   lighter/sunlit patches of the background photo. */
@media (max-width: 640px) {
  .hero-title, .hero-sub, .kicker.light {
    text-shadow: 0 1px 2px rgba(0,0,0,0.75), 0 2px 6px rgba(0,0,0,0.6);
  }
}

/* Google Reviews widget */
.reviews-widget {
  margin-top: 1.5rem; display: inline-flex; align-items: center; gap: 0.6rem;
  background: rgba(255,255,255,0.96); color: var(--foreground);
  padding: 0.6rem 1.1rem; border-radius: 999px;
  box-shadow: 0 10px 25px -10px rgba(0,0,0,0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}
.reviews-widget:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -10px rgba(0,0,0,0.45); }
.reviews-stars-wrap { position: relative; display: inline-flex; }
.reviews-stars { display: inline-flex; gap: 0.1rem; }
.reviews-stars-filled-clip { position: absolute; top: 0; left: 0; overflow: hidden; white-space: nowrap; }
.reviews-star { width: 1.05rem; height: 1.05rem; color: var(--border); flex-shrink: 0; }
.reviews-star-filled { color: var(--sun); }
.reviews-divider { width: 1px; height: 1.1rem; background: var(--border); }
.reviews-score { font-family: var(--font-display); font-weight: 600; font-size: 1rem; }
.reviews-count { font-size: 0.85rem; color: var(--muted-foreground); white-space: nowrap; }
@media (max-width: 400px) {
  .reviews-widget { flex-wrap: wrap; gap: 0.4rem 0.6rem; }
}

/* ---------- about ---------- */
.stats-row { margin-top: 2.5rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.stat-num { font-family: var(--font-display); font-size: 1.5rem; color: var(--primary); }
.stat-label { margin-top: 0.25rem; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-foreground); }
.about-media { position: relative; }
.about-img { border-radius: 1rem; box-shadow: var(--shadow-warm); width: 100%; height: 30rem; object-fit: cover; }
.quote-card {
  position: absolute; bottom: -1.5rem; left: -1.5rem; max-width: 220px;
  background: var(--card); padding: 1.25rem; border-radius: 0.75rem; box-shadow: var(--shadow-soft);
  display: none;
}
@media (min-width: 768px) { .quote-card { display: block; } }
.quote-text { font-size: 0.875rem; font-style: italic; }
.quote-attr { margin-top: 0.5rem; font-size: 0.75rem; color: var(--muted-foreground); }

/* ---------- feature image + kv list (pool/cyclists/climbing/hiking) ---------- */
.feature-img { border-radius: 1rem; box-shadow: var(--shadow-warm); width: 100%; height: 31.25rem; object-fit: cover; }
.kv-list { margin-top: 2rem; display: flex; flex-direction: column; gap: 1rem; }
.kv-list li { display: flex; align-items: baseline; gap: 1rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--border); }
.kv-key { flex-shrink: 0; width: 6rem; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-foreground); }
.kv-list-wide .kv-key { width: 7rem; }

/* ---------- plan your stop ---------- */
.steps-grid { margin-top: 3rem; display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .steps-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .steps-grid { grid-template-columns: repeat(4, 1fr); } }
.step-card { background: var(--card); padding: 1.5rem; border-radius: 1rem; box-shadow: var(--shadow-soft); border: 1px solid var(--border); }
.step-icon {
  width: 3rem; height: 3rem; border-radius: 999px; background: rgba(182,85,44,0.1);
  display: flex; align-items: center; justify-content: center; color: var(--primary); margin-bottom: 1rem;
}
.step-icon .icon { width: 1.5rem; height: 1.5rem; }
.step-title { font-size: 1.25rem; }
.step-desc { margin-top: 0.5rem; font-size: 0.9rem; color: var(--muted-foreground); line-height: 1.6; }

/* ---------- restaurant showcase ---------- */
.showcase-grid { margin-top: 3rem; display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .showcase-grid { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 240px; } }
.showcase-item { position: relative; overflow: hidden; border-radius: 0.75rem; box-shadow: var(--shadow-soft); height: 16rem; }
@media (min-width: 768px) { .showcase-item { height: auto; } .showcase-item.shot-big { grid-column: span 2; grid-row: span 2; } }
.showcase-item img, .showcase-item video { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s; }
.showcase-item:hover img, .showcase-item:hover video { transform: scale(1.05); }
.showcase-item figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 0.75rem;
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: #fff;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
}

/* ---------- menu / la carta ---------- */
.menu-section { background: #fdfaf5; }
.menu-tabs {
  margin-top: 2.5rem; display: flex; gap: 0.5rem; overflow-x: auto; padding-bottom: 0.5rem;
  margin-left: -1.5rem; margin-right: -1.5rem; padding-left: 1.5rem; padding-right: 1.5rem;
}
@media (min-width: 768px) { .menu-tabs { justify-content: center; flex-wrap: wrap; margin: 2.5rem 0 0; padding: 0; } }
.menu-tab {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 1rem; border-radius: 999px; font-size: 0.9rem; font-weight: 500;
  border: 1px solid var(--border); background: #fff; color: #0f1c3a;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.menu-tab:hover { border-color: rgba(227,169,74,0.6); }
.menu-tab.active { background: var(--sun); color: #fff; border-color: transparent; box-shadow: 0 1px 2px rgba(0,0,0,0.08); }
.menu-tab .icon { width: 1rem; height: 1rem; }

.menu-note { max-width: 48rem; margin: 2.5rem auto 0; text-align: center; font-size: 0.95rem; font-style: italic; color: var(--muted-foreground); }
.menu-panel.hidden { display: none; }
.menu-panel { margin-top: 2.5rem; }
.menu-items { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .menu-items { grid-template-columns: repeat(2, 1fr); } }
.menu-item {
  background: #fff; border: 1px solid var(--border); border-radius: 1rem; padding: 1.25rem;
  box-shadow: 0 1px 2px rgba(15,28,58,0.04); display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
}
.menu-item-name { font-family: var(--font-display); font-size: 1.1rem; color: #0f1c3a; }
.menu-item-desc { margin-top: 0.25rem; font-size: 0.875rem; color: var(--muted-foreground); }
.menu-item-price { flex-shrink: 0; font-family: var(--font-display); color: var(--sun); }

.menu-highlight {
  margin-top: 2rem; max-width: 48rem; margin-left: auto; margin-right: auto;
  border-radius: 1rem; border: 1px solid rgba(227,169,74,0.4); background: rgba(227,169,74,0.1); padding: 1.5rem;
}
.menu-highlight-title { font-family: var(--font-display); font-size: 1.1rem; color: #0f1c3a; }
.menu-highlight-text { margin-top: 0.5rem; font-size: 0.9rem; color: rgba(15,28,58,0.8); }

/* ---------- gallery ---------- */
.gallery-grid { margin-top: 3rem; display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 260px; gap: 1.5rem; } }
.gallery-img { border-radius: 0.75rem; width: 100%; height: 16rem; object-fit: cover; }
@media (min-width: 768px) { .gallery-img { height: 100%; } .gallery-big { grid-column: span 2; grid-row: span 2; } }

/* ---------- visit / contact ---------- */
.info-list { margin-top: 2.5rem; display: flex; flex-direction: column; gap: 1.5rem; }
.info-row { padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.info-row dt { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-foreground); }
.info-row dd { margin: 0.25rem 0 0; }
.info-row a:hover { color: var(--primary); }
.map-frame { border-radius: 1rem; overflow: hidden; box-shadow: var(--shadow-soft); min-height: 420px; }
.map-frame iframe { width: 100%; height: 100%; min-height: 420px; border: 0; }

/* ---------- footer ---------- */
.site-footer { padding: 3rem 0; border-top: 1px solid var(--border); }
.footer-inner { display: flex; flex-direction: column; gap: 1.5rem; justify-content: space-between; font-size: 0.9rem; color: var(--muted-foreground); }
@media (min-width: 768px) { .footer-inner { flex-direction: row; } }
.footer-brand { font-family: var(--font-display); font-size: 1.1rem; color: var(--foreground); }
.footer-social { margin-top: .75rem; display: flex; gap: .75rem; }
.footer-social a { color: var(--muted-foreground); display: inline-flex; }
.footer-social a:hover { color: var(--primary); }
.footer-right { text-align: left; }
@media (min-width: 768px) { .footer-right { text-align: right; } }
.footer-credit { margin-top: 0.35rem; font-size: 0.78rem; color: var(--muted-foreground); opacity: 0.8; }

/* ---------- utility ---------- */
.hidden { display: none; }

/* ---------- scroll-reveal (fade-up) transitions ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
/* small manual stagger for two-column / paired blocks */
.reveal-delay-1.in-view, .reveal-delay-1 { transition-delay: 0.12s; }
.reveal-delay-2.in-view, .reveal-delay-2 { transition-delay: 0.22s; }
.reveal-delay-3.in-view, .reveal-delay-3 { transition-delay: 0.32s; }

/* automatic stagger for grouped repeating items (stats, grids, lists) */
.reveal-group > .reveal:nth-child(1) { transition-delay: 0s; }
.reveal-group > .reveal:nth-child(2) { transition-delay: 0.09s; }
.reveal-group > .reveal:nth-child(3) { transition-delay: 0.18s; }
.reveal-group > .reveal:nth-child(4) { transition-delay: 0.27s; }
.reveal-group > .reveal:nth-child(5) { transition-delay: 0.36s; }
.reveal-group > .reveal:nth-child(6) { transition-delay: 0.45s; }
.reveal-group > .reveal:nth-child(n+7) { transition-delay: 0.5s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; opacity: 1; transform: none; }
}
/* Safety net: if JS never runs (blocked/slow), don't leave content invisible */
.no-js .reveal { opacity: 1; transform: none; }
