/* ============================================================
   Casa Punta del Sol — Estilo mediterráneo luminoso
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Nunito:wght@300;400;500;600&display=swap');

:root {
  --azul:       #1a6fa0;
  --azul2:      #1588c0;
  --azul-claro: #e8f4fb;
  --arena:      #f5f0e8;
  --arena2:     #ede5d4;
  --blanco:     #ffffff;
  --text:       #2c2c2c;
  --muted:      #7a7a7a;
  --border:     #e2ddd4;
  --verde:      #3a8a5c;
  --radius:     10px;
  --shadow:     0 4px 28px rgba(26,111,160,.10);
  --trans:      .25s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Nunito', sans-serif;
  background: var(--blanco);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }

/* ── Utilidades ─────────────────────────────────────────────── */
.container    { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.section      { padding: 88px 0; }
.section-alt  { background: var(--arena); }
.eyebrow {
  display: inline-block;
  font-size: 11px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--azul); font-weight: 600; margin-bottom: 12px;
}
.section-title {
  font-family: 'Libre Baskerville', serif;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 400; line-height: 1.2; color: var(--text);
  margin-bottom: 14px;
}
.section-title em { font-style: italic; color: var(--azul); }
.section-sub {
  font-size: 16px; color: var(--muted); max-width: 540px;
  font-weight: 300; line-height: 1.75;
}
.text-center { text-align: center; }
.text-center .section-sub { margin: 0 auto; }

/* ── Botones ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px; border-radius: 50px;
  font-family: 'Nunito', sans-serif; font-size: 15px; font-weight: 600;
  cursor: pointer; border: 2px solid transparent;
  transition: all var(--trans); letter-spacing: .2px;
}
.btn-primary  { background: var(--azul); color: #fff; }
.btn-primary:hover { background: var(--azul2); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(26,111,160,.3); }
.btn-outline  { background: #0d2d45; color: var(--blanco); border-color: #0d2d45; }
.btn-outline:hover { background: #0a2338; border-color: #0a2338; }
.btn-sand     { background: var(--arena2); color: var(--text); border-color: var(--arena2); }
.btn-sand:hover { background: #e0d8c6; }

/* ── HEADER ─────────────────────────────────────────────────── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  background: #0d2d45;
  box-shadow: 0 2px 16px rgba(0,0,0,.25);
  transition: box-shadow var(--trans);
  padding: 0;
}
.site-header.scrolled {
  background: #0d2d45;
  box-shadow: 0 2px 24px rgba(0,0,0,.35);
}
.header-inner {
  display: flex; align-items: center; gap: 24px; height: 70px;
}
.logo {
  font-family: 'Libre Baskerville', serif;
  font-size: 20px; font-weight: 400; letter-spacing: .5px;
  color: var(--blanco); flex: 1;
  display: flex; align-items: center;
}
.logo img {
  height: 52px;
  width: auto;
  display: block;
}
.logo span { font-style: italic; color: rgba(255,255,255,.55); font-size: 15px; display: block; font-weight: 400; line-height: 1; }

.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a {
  font-size: 14px; font-weight: 500; color: rgba(255,255,255,.75);
  transition: color var(--trans); letter-spacing: .2px;
}
.main-nav a:hover { color: #fff; }
.nav-cta {
  background: var(--azul) !important;
  color: #fff !important;
  padding: 8px 22px; border-radius: 50px; font-weight: 700 !important;
  box-shadow: 0 4px 14px rgba(26,111,160,.4);
}
.nav-cta:hover { background: var(--azul2) !important; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: rgba(255,255,255,.8); margin: 5px 0; border-radius: 2px;
  transition: var(--trans);
}

/* ── HERO ────────────────────────────────────────────────────── */
.hero {
  min-height: 100vh; position: relative;
  display: flex; align-items: center;
  color: var(--blanco); overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
}
.hero-bg img {
  width: 100%; height: 100%; object-fit: cover;
}
/* Overlay is now on each slide via _site.php inline style */
.hero-bg::after { display: none; }
.hero-content {
  position: relative; z-index: 2;
  padding-top: 90px; padding-bottom: 80px; max-width: 620px;
}
.hero-eyebrow {
  font-size: 12px; letter-spacing: 4px; text-transform: uppercase;
  color: #fff; margin-bottom: 18px; display: block;
  font-weight: 600; text-shadow: 0 2px 16px rgba(0,0,0,.9), 0 1px 4px rgba(0,0,0,.7), 2px 2px 0 rgba(0,0,0,.3);
}
.hero h1 {
  font-family: 'Libre Baskerville', serif;
  font-size: clamp(40px, 6.5vw, 72px);
  font-weight: 400; line-height: 1.08;
  margin-bottom: 22px; letter-spacing: -.5px; color: #fff;
  text-shadow: 0 2px 16px rgba(0,0,0,.9), 0 1px 4px rgba(0,0,0,.7), 2px 2px 0 rgba(0,0,0,.3);
}
.hero h1 em { font-style: italic; color: #a8d8f0; }
.hero p {
  font-size: 17px; color: #fff;
  margin-bottom: 40px; font-weight: 400; line-height: 1.75;
  max-width: 480px; text-shadow: 0 2px 16px rgba(0,0,0,.9), 0 1px 4px rgba(0,0,0,.7), 2px 2px 0 rgba(0,0,0,.3);
}
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-stats { display: none; }
.stat .lbl {
  font-size: 12px; color: rgba(255,255,255,.7);
  margin-top: 4px; display: block; font-weight: 400; letter-spacing: .5px;
}

/* ── APARTAMENTOS ────────────────────────────────────────────── */
.apts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px; margin-top: 52px;
}
.apt-card {
  background: var(--blanco);
  border-radius: 16px; overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform var(--trans), box-shadow var(--trans);
}
.apt-card:hover { transform: translateY(-5px); box-shadow: 0 16px 48px rgba(26,111,160,.14); }
.apt-img {
  height: 240px; overflow: hidden; position: relative;
  background: var(--azul-claro);
}
.apt-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.apt-card:hover .apt-img img { transform: scale(1.04); }
.apt-badge {
  position: absolute; top: 14px; left: 14px;
  background: var(--blanco); color: var(--azul);
  font-size: 12px; font-weight: 700; padding: 4px 12px;
  border-radius: 20px; letter-spacing: .3px;
}
.apt-body { padding: 24px 26px 28px; }
.apt-name {
  font-family: 'Libre Baskerville', serif;
  font-size: 20px; font-weight: 400; margin-bottom: 8px;
}
.apt-desc { font-size: 14px; color: var(--muted); margin-bottom: 18px; line-height: 1.65; white-space: pre-line; }
.apt-meta {
  display: flex; gap: 16px; flex-wrap: wrap;
  padding-top: 16px; border-top: 1px solid var(--border);
}
.apt-meta-item {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--muted); font-weight: 500;
}
.apt-meta-item svg { color: var(--azul); flex-shrink: 0; }


/* ── Apt card facilities ─────────────────────────────────────── */
.apt-capacity-badge {
  position: absolute; bottom: 14px; right: 14px;
  background: rgba(13,45,69,.75); color: #fff;
  font-size: 12px; font-weight: 600; padding: 4px 10px;
  border-radius: 20px; backdrop-filter: blur(4px);
  letter-spacing: .2px;
}

.apt-facilities {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 16px;
}
.apt-facility {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 20px;
  background: var(--azul-claro); border: 1px solid rgba(26,111,160,.15);
  font-size: 12px; font-weight: 500; color: var(--azul);
  white-space: nowrap; transition: all .15s;
}
.apt-card:hover .apt-facility {
  background: rgba(26,111,160,.12);
  border-color: rgba(26,111,160,.25);
}
.apt-facility-icon { font-size: 13px; line-height: 1; }
.apt-facility-label { color: var(--text); font-weight: 500; }
.apt-facility-more {
  background: var(--arena2); border-color: var(--border);
  color: var(--muted); font-weight: 600;
}

.apt-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding-top: 16px; border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.apt-card-footer .apt-meta {
  padding: 0; border: none; flex-wrap: nowrap; gap: 12px;
}
.apt-card-btn {
  font-size: 13px; padding: 9px 20px; border-radius: 50px;
  white-space: nowrap; flex-shrink: 0;
}

/* ── AMENITIES ───────────────────────────────────────────────── */
.amenities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px; margin-top: 52px;
}
.amenity {
  background: var(--blanco);
  border-radius: var(--radius); padding: 24px 20px;
  box-shadow: 0 2px 16px rgba(0,0,0,.06);
  border: 1px solid var(--border);
  text-align: center;
  transition: transform var(--trans), box-shadow var(--trans);
}
.amenity:hover { transform: translateY(-3px); box-shadow: 0 8px 28px rgba(26,111,160,.1); }
.amenity-icon { font-size: 30px; margin-bottom: 10px; display: block; }
.amenity h4 { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.amenity p  { font-size: 12px; color: var(--muted); line-height: 1.5; }

/* ── BOOKING ─────────────────────────────────────────────────── */
#reservar { background: #f8fafc; color: var(--text); }
#reservar .section-title { color: var(--text); }
#reservar .section-sub   { color: var(--muted); }
#reservar .eyebrow       { color: #a8d8f0; }

.booking-card {
  background: var(--blanco);
  border-radius: 20px;
  padding: 36px 40px;
  box-shadow: 0 16px 60px rgba(0,0,0,.15);
  margin-top: 44px;
  max-width: 800px; margin-left: auto; margin-right: auto;
}
.booking-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 18px; margin-bottom: 20px;
}
.form-group label {
  display: block; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .8px;
  color: var(--muted); margin-bottom: 6px;
}
.form-group input, .form-group select {
  width: 100%; padding: 12px 14px; font-size: 15px;
  border: 1.5px solid var(--border); border-radius: 8px;
  background: var(--arena); color: var(--text);
  font-family: 'Nunito', sans-serif;
  outline: none; transition: border var(--trans);
}
.form-group input:focus, .form-group select:focus {
  border-color: var(--azul); background: #fff;
}
.price-preview {
  background: var(--arena); border-radius: 10px;
  padding: 20px 24px; margin-bottom: 20px; display: none;
}
.price-preview.show { display: block; }
.price-row {
  display: flex; justify-content: space-between;
  padding: 5px 0; font-size: 14px; color: var(--text);
  border-bottom: 1px solid var(--border);
}
.price-row:last-child { border: none; font-weight: 700; font-size: 17px; padding-top: 12px; margin-top: 4px; }
.guest-section { display: none; }
.guest-section.show { display: block; }
.guest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px; margin-bottom: 18px;
}
.divider { border: none; border-top: 1px solid var(--border); margin: 22px 0; }
.btn-full { width: 100%; justify-content: center; padding: 15px; font-size: 16px; }
.alert { padding: 13px 16px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; }
.alert-error   { background: #fce8e8; color: #8b1a1a; border-left: 4px solid #e53e3e; }
.alert-success { background: #e8f5ee; color: #1a5c35; border-left: 4px solid #38a169; }
.spinner {
  width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff; border-radius: 50%;
  animation: spin .7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── PRECIOS TABLA ───────────────────────────────────────────── */
.prices-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px; margin-top: 52px;
}
.price-card {
  background: var(--blanco);
  border-radius: 14px; padding: 28px 24px;
  text-align: center;
  border: 1.5px solid var(--border);
  transition: transform var(--trans), box-shadow var(--trans);
}
.price-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.price-card.destacado {
  background: var(--azul); color: #fff;
  border-color: var(--azul);
}
.price-season { font-size: 11px; text-transform: uppercase; letter-spacing: 2px; color: var(--muted); margin-bottom: 12px; }
.price-card.destacado .price-season { color: rgba(255,255,255,.65); }
.price-card .amount {
  font-family: 'Libre Baskerville', serif;
  font-size: 44px; font-weight: 700; line-height: 1;
  color: var(--azul);
}
.price-card.destacado .amount { color: #fff; }
.price-card .per { font-size: 13px; color: var(--muted); }
.price-card.destacado .per { color: rgba(255,255,255,.65); }
.price-card .dates { font-size: 13px; color: var(--muted); margin-top: 12px; line-height: 2; }
.price-card.destacado .dates { color: rgba(255,255,255,.7); }
.price-note {
  text-align: center; font-size: 13px; color: var(--muted);
  margin-top: 20px;
}

/* ── UBICACIÓN ───────────────────────────────────────────────── */
.location-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 48px; align-items: center; margin-top: 52px;
}
.location-map {
  border-radius: 16px; overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid var(--border);
}
.location-map iframe { width: 100%; height: 380px; border: 0; display: block; }
.distances { margin-top: 24px; }
.distance-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.distance-item:last-child { border-bottom: none; }
.dist-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--azul-claro); display: flex;
  align-items: center; justify-content: center;
  font-size: 17px; flex-shrink: 0;
}
.dist-label { flex: 1; font-weight: 500; }
.dist-time  { color: var(--azul); font-weight: 600; font-size: 13px; }

/* ── GALERÍA ─────────────────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 10px; margin-top: 44px;
}
.gallery-grid img {
  width: 100%; height: 240px; object-fit: cover;
  border-radius: 10px; cursor: pointer;
  transition: opacity var(--trans), transform var(--trans);
}
.gallery-grid img:hover { opacity: .9; transform: scale(.99); }
.gallery-grid .g-tall  { height: 490px; grid-row: span 2; }
.gallery-grid .g-wide  { grid-column: span 2; }

/* ── FOOTER ─────────────────────────────────────────────────── */
footer {
  background: #0d2d45; color: rgba(255,255,255,.6);
  padding: 56px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 40px; margin-bottom: 44px;
}
.footer-brand .logo-foot {
  font-family: 'Libre Baskerville', serif;
  font-size: 22px; color: #fff; margin-bottom: 12px; display: block;
}
.footer-brand p { font-size: 13px; line-height: 1.8; font-weight: 300; }
footer h4 {
  color: #fff; font-size: 13px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1.5px;
  margin-bottom: 16px;
}
footer a { font-size: 14px; color: rgba(255,255,255,.6); display: block; margin-bottom: 8px; transition: color var(--trans); }
footer a:hover { color: #a8d8f0; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 24px; display: flex;
  justify-content: space-between; align-items: center;
  font-size: 12px; flex-wrap: wrap; gap: 8px;
}

/* ── Lightbox ────────────────────────────────────────────────── */
.lightbox {
  display: none; position: fixed; inset: 0; z-index: 999;
  background: rgba(0,0,0,.92); align-items: center;
  justify-content: center; cursor: pointer;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 90vh; border-radius: 8px; }

/* ── Confirmación ────────────────────────────────────────────── */
.confirm-box {
  text-align: center; padding: 32px 16px;
}
.confirm-box .icon { font-size: 56px; margin-bottom: 16px; }
.confirm-box h3 { font-family: 'Libre Baskerville', serif; font-size: 24px; margin-bottom: 8px; color: var(--verde); }
.confirm-box p  { color: var(--muted); margin-bottom: 24px; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .apts-grid       { grid-template-columns: 1fr; }
  .prices-grid     { grid-template-columns: 1fr; }
  .location-grid   { grid-template-columns: 1fr; }
  .footer-grid     { grid-template-columns: 1fr 1fr; }
  .gallery-grid    { grid-template-columns: 1fr 1fr; }
  .gallery-grid .g-tall  { height: 240px; grid-row: span 1; }
  .gallery-grid .g-wide  { grid-column: span 1; }
  .hero-stats-inner { flex-wrap: wrap; }
  .stat { flex: 0 0 50%; border-bottom: 1px solid rgba(255,255,255,.2); }
}
@media (max-width: 640px) {
  /* Menú lateral móvil */
  .main-nav {
    display: flex; flex-direction: column; align-items: flex-start;
    position: fixed; top: 0; right: 0; bottom: 0; width: 280px;
    background: #fff; box-shadow: -4px 0 24px rgba(0,0,0,.18);
    padding: 80px 24px 32px; z-index: 997;
    transform: translateX(100%); transition: transform .3s ease;
  }
  .main-nav.open { transform: translateX(0) !important; display: flex !important; }
  .nav-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.4); z-index: 996;
  }
  .nav-overlay.open { display: block; }
  .main-nav a { color: var(--text) !important; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 16px; }
  .main-nav .nav-cta { background: var(--azul) !important; color: #fff !important; border-radius: 8px; text-align: center; }
  .nav-toggle { display: block; }
  .booking-card { padding: 24px 20px; }
  .footer-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .hero-stats { display: none; }
  section { padding: 60px 0; }
}

/* ── Selector de idioma ── */
.lang-switcher{display:flex;gap:10px;align-items:center;margin-left:10px}
.lang-btn{display:flex;align-items:center;padding:0;background:none;border:none;outline:none;
  opacity:.5;transition:opacity .2s;cursor:pointer;text-decoration:none}
.lang-btn:hover{opacity:.85}
.lang-btn.active{opacity:1}
.lang-flag{width:18px;height:13px;display:inline-block;overflow:hidden;flex-shrink:0;border-radius:2px}
.lang-flag svg{width:100%;height:100%;display:block}
.lang-code{display:none}
.lang-code{display:none}

/* ── Testimonios ──────────────────────────────────────────── */
.testimonios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 40px;
}
.testimonio-card {
  background: var(--blanco);
  border-radius: 16px;
  padding: 28px 28px 24px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  display: flex;
  flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}
.testimonio-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,.1);
}
.testimonio-stars { color: #f59e0b; font-size: 16px; margin-bottom: 14px; }
.testimonio-texto {
  font-size: .95rem; line-height: 1.7; color: var(--text-muted);
  margin-bottom: 16px; font-style: italic;
}
.testimonio-autor { font-size: .875rem; font-weight: 600; }
.testimonio-pais  { color: var(--text-muted); font-weight: 400; }

/* ── Zonas comunes ────────────────────────────────────────── */
.zonas-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 40px;
}
@media(max-width:768px) { .zonas-grid { grid-template-columns: repeat(2,1fr); } }
@media(max-width:480px) { .zonas-grid { grid-template-columns: 1fr; } }
.zona-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4/3;
}
.zona-item img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .4s;
}
.zona-item:hover img { transform: scale(1.04); }
.zona-label {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 10px 14px;
  background: linear-gradient(transparent, rgba(0,0,0,.55));
  color: #fff; font-size: .875rem; font-weight: 600;
}
