:root {
  --navy: #0f2a3d;
  --navy-soft: #1d4259;
  --sand: #f6f1e9;
  --gold: #c19a5b;
  --ink: #1b2a33;
  --muted: #5d6b73;
  --white: #fff;
  --wa: #1fa855;
  --wa-dark: #178a45;
  --radius: 14px;
  --shadow: 0 6px 20px rgba(15, 42, 61, .12);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  padding-bottom: 76px; /* espacio para el botón flotante */
}

h1, h2, h3 { font-family: "Playfair Display", Georgia, serif; line-height: 1.2; margin: 0 0 .6rem; }
h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; }

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

/* Barra superior */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 20px;
  background: var(--white);
  border-bottom: 1px solid #e6e0d6;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__logo { height: 34px; width: auto; display: block; }
.brand__sub { display: none; font-size: .85rem; color: var(--muted); border-left: 1px solid #d8d0c4; padding-left: 10px; }
@media (min-width: 420px) { .brand__sub { display: inline; } }

/* Botones (áreas táctiles de 48px mínimo) */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px;
  border: 0; border-radius: 999px;
  font: 700 1rem "Inter", sans-serif;
  text-decoration: none; cursor: pointer;
  transition: background .2s, transform .1s;
}
.btn:active { transform: scale(.98); }
[hidden] { display: none !important; }
.btn--wa { background: var(--wa); color: var(--white); }
.btn--wa:hover { background: var(--wa-dark); }
.btn--large { width: 100%; font-size: 1.05rem; }
.btn--small { min-height: 40px; padding: 0 16px; font-size: .9rem; }
.btn--outline { background: transparent; border: 2px solid var(--navy); color: var(--navy); }
.btn--outline:hover { background: var(--navy); color: var(--white); }

/* Hero */
.hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-soft) 100%);
  color: var(--white);
  padding: 56px 20px 64px;
}
.hero__inner { max-width: 640px; margin: 0 auto; }
.eyebrow { color: var(--gold); font-weight: 500; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; }
.hero__lead { font-size: 1.05rem; color: #dbe5eb; margin-bottom: 1.5rem; }
.hero__note { margin: .8rem 0 0; font-size: .85rem; color: #b8c7d0; text-align: center; }

/* Secciones */
.section { padding: 56px 0; }
.section--alt { background: var(--sand); }
.section__lead { color: var(--muted); margin-bottom: 1.6rem; }

/* Tarjetas de propiedades */
.cards { display: grid; gap: 20px; }
.card {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  display: flex; flex-direction: column;
}
.card__img {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--navy-soft), var(--gold));
  background-size: cover; background-position: center;
  position: relative;
}
.card__tag {
  position: absolute; top: 12px; left: 12px;
  background: var(--white); color: var(--navy);
  font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: 4px 10px; border-radius: 999px;
}
.card__body { padding: 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card__body p { color: var(--muted); font-size: .95rem; margin: 0; }
.topbar__actions { display: flex; align-items: center; gap: 10px; }
.lang { min-width: 44px; min-height: 40px; padding: 0 10px; border: 1.5px solid var(--navy); border-radius: 999px; background: transparent; color: var(--navy); font: 700 .85rem "Inter", sans-serif; cursor: pointer; }
.lang:hover { background: var(--navy); color: var(--white); }
/* Menú de idiomas con banderas */
.langmenu { position: relative; }
.langmenu__btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border: 1.5px solid var(--navy); border-radius: 999px; background: transparent; color: var(--navy); font: 700 .8rem "Inter", sans-serif; cursor: pointer; }
.langmenu__btn:hover { background: rgba(0, 0, 0, .05); }
.langmenu__flag { width: 24px; height: 18px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); }
.langmenu__list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; margin: 0; padding: 6px; list-style: none; min-width: 190px; max-height: 70vh; overflow-y: auto; background: var(--white); border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); }
.langmenu__list[hidden] { display: none; }
.langmenu__list li { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 8px; color: var(--navy); font-size: .92rem; cursor: pointer; }
.langmenu__list li:hover, .langmenu__list li:focus { background: #f1ece3; outline: none; }
.langmenu__list li[aria-selected="true"] { font-weight: 700; }
/* Ocultar la barra y los avisos de Google Translate */
body { top: 0 !important; }
.skiptranslate iframe, .goog-te-banner-frame, #goog-gt-tt, .goog-tooltip { display: none !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }
.btn--gold { background: var(--gold); color: var(--navy); }
.btn--gold:hover { background: #d4ad6e; }
.card__subdetails { margin: 0 14px 8px; border-top: 1px solid #e6e0d6; }
.card__subdetails summary { min-height: 44px; display: flex; align-items: center; font-weight: 500; font-size: .88rem; color: var(--navy); cursor: pointer; }
.card__subdetails ul { margin: 0; padding: 0 0 10px 18px; font-size: .82rem; color: var(--muted); }
.card__subdetails li { margin-bottom: 4px; }
.card__badges { list-style: none; margin: 0; padding: 0; position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.card__badges li { background: var(--gold); color: var(--navy); font-weight: 700; font-size: .78rem; padding: 5px 11px; border-radius: 999px; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
.card__gallery { display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; margin: 4px -2px 2px; -webkit-overflow-scrolling: touch; }
.card__thumb { flex: 0 0 auto; width: 92px; height: 68px; padding: 0; border: 0; border-radius: 8px; overflow: hidden; cursor: pointer; scroll-snap-align: start; background: var(--sand); }
.card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card__details { margin-top: 6px; border: 1px solid #e6e0d6; border-radius: 10px; background: var(--sand); }
.card__details summary { min-height: 44px; display: flex; align-items: center; padding: 0 14px; font-weight: 500; font-size: .93rem; color: var(--navy); cursor: pointer; }
.models, .amen { list-style: none; margin: 0; padding: 0 14px 12px; }
.models li { padding: 8px 0; border-top: 1px solid #e6e0d6; display: grid; gap: 2px; }
.models strong { font-size: .92rem; color: var(--navy); }
.models small { color: var(--muted); font-size: .82rem; }
.models__price { color: var(--navy); font-weight: 700; font-size: .85rem; }
.amen { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 4px; }
.amen li { background: var(--white); border: 1px solid #e0d6c4; border-radius: 999px; padding: 5px 11px; font-size: .8rem; color: var(--ink); }
.card__note { margin: 6px 0 0; font-size: .72rem; color: var(--muted); }
.viewer { position: fixed; inset: 0; z-index: 60; background: rgba(8, 20, 30, .94); display: flex; align-items: center; justify-content: center; }
.viewer[hidden] { display: none; }
.viewer img { max-width: 100%; max-height: 86dvh; object-fit: contain; }
.viewer__close, .viewer__nav { position: absolute; border: 0; background: rgba(255, 255, 255, .14); color: var(--white); cursor: pointer; border-radius: 50%; width: 48px; height: 48px; font-size: 1.8rem; line-height: 1; }
.viewer__close { top: 12px; right: 12px; }
.viewer__nav { top: 50%; transform: translateY(-50%); }
.viewer__prev { left: 8px; }
.viewer__next { right: 8px; }
.viewer__count { position: absolute; bottom: 14px; left: 0; right: 0; margin: 0; text-align: center; color: #dbe5eb; font-size: .85rem; }
body.viewer-open { overflow: hidden; }
.card__list { margin: 6px 0 0; padding-left: 18px; font-size: .88rem; color: var(--muted); }
.card__list li { margin-bottom: 4px; }
/* Tarjeta tipo galería de lujo: foto grande con degradado y texto encima */
.card__img { aspect-ratio: 4 / 5; }
.card__overlay { position: absolute; left: 0; right: 0; bottom: 0; padding: 70px 18px 18px; color: var(--white); background: linear-gradient(to top, rgba(8, 20, 30, .88) 0%, rgba(8, 20, 30, .55) 55%, rgba(8, 20, 30, 0) 100%); }
.card__overlay .card__price { margin: 0 0 6px; color: var(--white); font: 600 1.35rem/1.2 "Playfair Display", serif; }
.card__overlay h3 { margin: 0; color: var(--white); font: 500 .95rem/1.35 "Inter", sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.card__overlay .card__city { margin: 4px 0 0; color: rgba(255, 255, 255, .85); font-size: .85rem; letter-spacing: .06em; }
.card__overlay .card__badges { position: static; margin-top: 12px; }
.card__img { transition: filter .3s; }
.card:hover .card__img { filter: brightness(1.06); }
.card__price { color: var(--navy); font-weight: 700; font-size: 1.05rem; }
.card__body .btn { margin-top: 12px; }

/* Valores */
.values { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 16px; }
.values li { background: var(--white); border-left: 4px solid var(--gold); border-radius: 8px; padding: 18px; }
.values p { margin: 0; color: var(--muted); }

/* Formulario */
.form { display: grid; gap: 8px; max-width: 480px; }
.form label { font-weight: 500; font-size: .95rem; margin-top: 8px; }
.form input, .form select {
  width: 100%; min-height: 48px; padding: 0 14px;
  border: 1.5px solid #c9d2d8; border-radius: 10px;
  font: 1rem "Inter", sans-serif; background: var(--white);
}
.form input:focus, .form select:focus { outline: 3px solid rgba(193, 154, 91, .45); border-color: var(--gold); }
.form .btn { margin-top: 14px; }
.form__error { color: #b3261e; font-size: .9rem; margin: 4px 0 0; }

/* Cifras */
.stats { background: var(--navy); color: var(--white); padding: 28px 20px; }
.stats__list { list-style: none; margin: 0 auto; padding: 0; max-width: 1080px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px 12px; text-align: center; }
.stats__list strong { display: block; font: 700 1.8rem "Playfair Display", serif; color: var(--gold); line-height: 1.1; }
.stats__list span { font-size: .85rem; color: #dbe5eb; }

/* Filtro por ciudad */
.filters { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 20px; -webkit-overflow-scrolling: touch; }
.chip {
  flex: 0 0 auto; min-height: 44px; padding: 0 18px;
  border: 1.5px solid var(--navy); border-radius: 999px;
  background: transparent; color: var(--navy);
  font: 500 .95rem "Inter", sans-serif; cursor: pointer;
}
.chip.is-active { background: var(--navy); color: var(--white); }

/* Listas de confianza */
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-width: 640px; }
.checks li { position: relative; padding-left: 30px; }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--gold); font-weight: 700; }
.awards { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.awards li { background: var(--white); border-radius: 8px; padding: 18px; border-left: 4px solid var(--gold); }
.awards strong { display: block; font-family: "Playfair Display", serif; font-size: 1.1rem; color: var(--navy); }
.awards span { color: var(--muted); font-size: .95rem; }

/* Ficha de Turquesa Los Cabos */
.section--dark { background: linear-gradient(160deg, var(--navy) 0%, var(--navy-soft) 100%); color: var(--white); }
.section--dark .section__lead { color: #dbe5eb; }
.sub { margin: 2.2rem 0 .8rem; font-size: 1.2rem; color: var(--gold); }
.units { display: grid; gap: 14px; }
.unit { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); border-radius: var(--radius); padding: 18px; text-align: center; }
.unit p { margin: 0; }
.unit__label { color: #dbe5eb; font-size: .95rem; }
.unit__m2 { font: 700 2rem "Playfair Display", serif; color: var(--white); }
.unit__note { color: var(--gold); font-size: .85rem; }
.units__common { margin: 12px 0 0; font-size: .92rem; color: #b8c7d0; }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { background: rgba(193, 154, 91, .18); border: 1px solid var(--gold); border-radius: 999px; padding: 8px 14px; font-size: .92rem; }
.checks--light li::before { color: var(--gold); }
.highlight { background: rgba(255, 255, 255, .08); border-left: 4px solid var(--gold); border-radius: 8px; padding: 14px 16px; margin-bottom: 1rem; }
.highlight strong { color: var(--gold); }
.specs { display: grid; gap: 8px; margin-bottom: 2rem; }
.specs details { background: rgba(255, 255, 255, .06); border-radius: 10px; }
.specs summary { min-height: 48px; display: flex; align-items: center; padding: 0 16px; font-weight: 500; cursor: pointer; }
.specs ul { margin: 0; padding: 0 16px 14px 34px; color: #dbe5eb; font-size: .93rem; }
.specs li { margin-bottom: 6px; }
.badges { list-style: none; margin: 0 0 1.2rem; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.badges li { background: var(--gold); color: var(--navy); font-weight: 700; font-size: .85rem; padding: 6px 14px; border-radius: 999px; }
.promo { background: rgba(193, 154, 91, .14); border: 1px dashed var(--gold); border-radius: 10px; padding: 14px 16px; margin: 1rem 0; }
.promo h4 { margin: 0 0 6px; color: var(--gold); font-size: 1rem; }
.promo p { margin: 0 0 6px; font-size: .93rem; }
.promo ul { margin: 0; padding-left: 20px; font-size: .93rem; color: #dbe5eb; }
.cover { display: block; width: 100%; height: auto; max-height: 420px; object-fit: cover; border-radius: var(--radius); margin: 1.4rem 0; }
.gallery {
  display: flex; gap: 10px; margin: 1.2rem -20px 0; padding: 0 20px 8px;
  overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
}
.gallery img { flex: 0 0 auto; height: 220px; width: auto; border-radius: 10px; scroll-snap-align: start; }
.card { scroll-margin-top: 80px; transition: box-shadow .3s; }
.card--destacada { box-shadow: 0 0 0 3px var(--gold), var(--shadow); }
.card__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.btn--ghost { background: var(--sand); color: var(--navy); border: 1px solid #e0d6c4; padding: 0 10px; font-size: .85rem; text-align: center; }
.btn--ghost:hover { background: #ece3d3; }
.card__more { align-self: center; margin-top: 4px; color: var(--navy); font-weight: 500; font-size: .95rem; padding: 10px; }
@media (min-width: 720px) {
  .units { grid-template-columns: repeat(2, 1fr); max-width: 560px; }
  .section--dark .btn--large { width: auto; }
}

/* Footer y botón flotante */
.footer { background: var(--navy); color: #b8c7d0; text-align: center; padding: 24px 20px; font-size: .85rem; }
.footer p { margin: 0 0 6px; }
.footer a, .contact__alt a { color: inherit; text-underline-offset: 3px; }
.contact__legal { margin-top: 10px; font-size: .8rem; color: var(--muted); max-width: 480px; }
.contact__legal a { color: var(--navy); }
.contact__alt { margin-top: 20px; font-size: .95rem; color: var(--muted); }
.contact__alt a { color: var(--navy); font-weight: 500; }
.fab {
  position: fixed; right: 16px; bottom: 16px; z-index: 20;
  min-height: 52px; padding: 0 22px;
  display: inline-flex; align-items: center;
  background: var(--wa); color: var(--white);
  border-radius: 999px; font-weight: 700; text-decoration: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
}

/* Tablet y escritorio */
@media (min-width: 720px) {
  h1 { font-size: 2.8rem; }
  h2 { font-size: 2rem; }
  .hero { padding: 96px 20px 104px; }
  .hero__inner { text-align: left; }
  .btn--large { width: auto; min-width: 280px; }
  .hero__note { text-align: left; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .values { grid-template-columns: repeat(3, 1fr); }
  .stats__list { grid-template-columns: repeat(4, 1fr); }
  .stats__list strong { font-size: 2.4rem; }
  .awards { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
