/* ==========================================================================
   ELOHIM - hoja de estilos principal
   Sin frameworks ni build. Personalice la marca en las variables :root.
   ========================================================================== */

:root {
  --ink: #203858;
  --ink-2: #33475f;
  --muted: #6b7280;
  --bg: #ffffff;
  --surface: #f5f2ec;
  --surface-2: #ece7dd;
  --line: #e0dacb;
  --dark: #16283f;
  --dark-2: #1d3350;
  --accent: #a8824e;
  --accent-dark: #8a6839;
  --accent-soft: rgba(168, 130, 78, 0.12);
  --success: #2f7d54;
  --danger: #b23b3b;

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --radius: 4px;
  --radius-lg: 10px;
  --shadow-sm: 0 1px 2px rgba(16, 18, 22, 0.06);
  --shadow: 0 12px 30px rgba(16, 18, 22, 0.10);
  --shadow-lg: 0 24px 60px rgba(16, 18, 22, 0.16);
  --container: 1200px;
  --header-h: 78px;
  --transition: 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: 0.01em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1rem; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: 820px; }

.section { padding: 96px 0; }
.section--tight { padding: 64px 0; }
.section--surface { background: var(--surface); }
.section--dark { background: var(--dark); color: #d9dbe0; }
.section--dark h2, .section--dark h3 { color: #fff; }

.section__head { max-width: 720px; margin-bottom: 48px; }
.section__head--center { margin-left: auto; margin-right: auto; text-align: center; }

.eyebrow {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 14px;
}

.lead { font-size: 1.08rem; color: var(--muted); }

/* ------------------------------ Botones --------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 14px 28px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  background: none;
  color: inherit;
  white-space: nowrap;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn--ink { background: var(--ink); color: #fff; }
.btn--ink:hover { background: #000; transform: translateY(-1px); }
.btn--ghost { border-color: currentColor; }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.12); }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--surface-2); }
.btn--block { width: 100%; }
.btn--sm { padding: 10px 18px; font-size: 0.72rem; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.link-arrow::after { content: "\2192"; transition: var(--transition); }
.link-arrow:hover::after { transform: translateX(5px); }

/* ------------------------------ Header ---------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  height: var(--header-h);
  display: flex;
  align-items: center;
  color: #fff;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0));
  pointer-events: none;
  transition: opacity var(--transition);
}
.site-header.is-solid {
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.site-header.is-solid::before { opacity: 0; }

.header-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; color: inherit; }
.brand svg { height: 42px; width: auto; display: block; }
.brand img { height: 48px; width: auto; display: block; }
.brand .logo-dark { display: none; }
.site-header.is-solid .brand .logo-light { display: none; }
.site-header.is-solid .brand .logo-dark { display: block; }
.admin-header .brand .logo-dark { display: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__name { font-family: var(--serif); font-size: 1.28rem; letter-spacing: 0.02em; }
.brand__sub { font-size: 0.62rem; letter-spacing: 0.3em; text-transform: uppercase; opacity: 0.7; }

.nav { display: flex; align-items: center; gap: 30px; }
.nav a {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.92;
  position: relative;
  padding: 4px 0;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 1px;
  background: currentColor;
  transition: var(--transition);
}
.nav a:hover::after, .nav a.is-active::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 16px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 42px; height: 42px;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  cursor: pointer;
  color: inherit;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: currentColor;
  transition: var(--transition);
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ------------------------------ Hero ------------------------------------ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
  background: var(--dark);
}
.hero__media { position: absolute; inset: 0; }
.hero__media img, .hero__media .hero__bg {
  width: 100%; height: 100%; object-fit: cover;
}
.hero__bg {
  background:
    radial-gradient(1200px 600px at 70% 20%, rgba(168, 130, 78, 0.35), transparent 60%),
    linear-gradient(135deg, #1d3350 0%, #16283f 55%, #203858 100%);
}
.hero__media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(8, 9, 11, 0.82) 0%, rgba(8, 9, 11, 0.5) 55%, rgba(8, 9, 11, 0.35) 100%);
}
.hero__inner { position: relative; z-index: 2; padding: calc(var(--header-h) + 40px) 0 60px; width: 100%; }
.hero__content { max-width: 760px; }
.hero__title { color: #fff; margin-bottom: 18px; }
.hero__subtitle { font-size: 1.1rem; color: rgba(255, 255, 255, 0.86); max-width: 560px; margin-bottom: 40px; }

/* ------------------------------ Buscador -------------------------------- */
.search-bar {
  background: rgba(255, 255, 255, 0.97);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.2fr auto;
  gap: 14px;
  align-items: end;
  max-width: 980px;
}
.search-bar .field label {
  display: block;
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 6px;
}
.search-bar select, .search-bar input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-size: 0.92rem;
  font-family: inherit;
}
.search-bar select:focus, .search-bar input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ------------------------------ Grids ----------------------------------- */
.grid { display: grid; gap: 32px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ------------------------------ Tarjetas de valor ----------------------- */
.value-card {
  padding: 38px 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  transition: var(--transition);
}
.value-card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: var(--shadow); }
.value-card__num {
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 12px;
}
.value-card h3 { margin-bottom: 10px; }
.value-card p { color: var(--muted); margin: 0; }

/* ------------------------------ Split feature --------------------------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: stretch;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--dark);
  color: #d9dbe0;
}
.split__media { min-height: 440px; position: relative; }
.split__media img, .split__media .media-fill {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.media-fill {
  background:
    radial-gradient(600px 300px at 30% 30%, rgba(168, 130, 78, 0.4), transparent 65%),
    linear-gradient(160deg, #223c5c, #16283f);
}
.split__body { padding: 64px 56px; display: flex; flex-direction: column; justify-content: center; }
.split__body h2 { color: #fff; }
.split__body p { color: #c3c7ce; }

/* ------------------------------ Propiedades ----------------------------- */
.property-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }

.property-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.property-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.property-card__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-2); }
.property-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.property-card:hover .property-card__media img { transform: scale(1.05); }
.badge {
  position: absolute;
  top: 14px; left: 14px;
  padding: 6px 12px;
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  border-radius: 2px;
  background: var(--accent);
  color: #fff;
}
.badge--rent { background: var(--ink); }
.badge--star { left: auto; right: 14px; background: rgba(255, 255, 255, 0.92); color: var(--ink); }
.property-card__body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.property-card__type {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
}
.property-card h3 { font-size: 1.28rem; margin-bottom: 6px; }
.property-card__loc { font-size: 0.88rem; color: var(--muted); margin-bottom: 16px; }
.property-card__price {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--ink);
}
.property-card__price small { font-family: var(--sans); font-size: 0.72rem; color: var(--muted); letter-spacing: 0.08em; }
.property-card__meta {
  display: flex;
  gap: 18px;
  margin-top: 14px;
  font-size: 0.82rem;
  color: var(--muted);
}
.property-card__meta span { display: inline-flex; align-items: center; gap: 6px; }

/* ------------------------------ Filtros --------------------------------- */
.filters {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr) auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 40px;
  box-shadow: var(--shadow-sm);
}
.filters .field label {
  display: block; font-size: 0.66rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 6px;
}
.filters select, .filters input {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line);
  border-radius: var(--radius); background: #fff; font-family: inherit; font-size: 0.9rem; color: var(--ink);
}
.filters select:focus, .filters input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.results-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; color: var(--muted); font-size: 0.9rem; }

/* ------------------------------ Page hero ------------------------------- */
.page-hero {
  padding: calc(var(--header-h) + 64px) 0 56px;
  background: var(--dark);
  color: #fff;
  position: relative;
}
.page-hero::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(800px 400px at 80% 0%, rgba(176, 137, 79, 0.28), transparent 60%);
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { color: #fff; margin-bottom: 10px; }
.page-hero p { color: rgba(255, 255, 255, 0.8); max-width: 620px; margin: 0; }
.breadcrumb { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.6); margin-bottom: 14px; }
.breadcrumb a:hover { color: #fff; }

/* ------------------------------ Detalle --------------------------------- */
.detail { display: grid; grid-template-columns: 1.7fr 1fr; gap: 48px; align-items: start; }
.gallery__main {
  position: relative; aspect-ratio: 16 / 10; border-radius: var(--radius-lg);
  overflow: hidden; background: var(--surface-2);
}
.gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumbs {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 12px;
}
.gallery__thumbs button {
  padding: 0; border: 2px solid transparent; border-radius: var(--radius);
  overflow: hidden; cursor: pointer; aspect-ratio: 4/3; background: var(--surface-2);
}
.gallery__thumbs button.is-active { border-color: var(--accent); }
.gallery__thumbs img { width: 100%; height: 100%; object-fit: cover; }

.detail__price { font-family: var(--serif); font-size: 2.2rem; color: var(--ink); margin: 4px 0 2px; }
.detail__price small { font-family: var(--sans); font-size: 0.8rem; color: var(--muted); letter-spacing: 0.08em; }
.specs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 28px 0; }
.spec {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
}
.spec strong { display: block; font-family: var(--serif); font-size: 1.5rem; color: var(--ink); }
.spec span { font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.tag {
  font-size: 0.78rem; padding: 7px 14px; border-radius: 100px;
  background: var(--accent-soft); color: var(--accent-dark); font-weight: 500;
}
.detail__map { margin-top: 32px; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); }
.detail__map iframe { width: 100%; height: 340px; border: 0; display: block; }

.side-card {
  position: sticky; top: calc(var(--header-h) + 20px);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 30px; box-shadow: var(--shadow-sm);
}
.side-card h3 { margin-bottom: 4px; }
.side-card .agent { display: flex; align-items: center; gap: 14px; margin: 18px 0; }
.side-card .agent__avatar {
  width: 52px; height: 52px; border-radius: 50%; background: var(--dark); color: #fff;
  display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 1.3rem;
}
.side-card .agent small { color: var(--muted); display: block; }
.side-card hr { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
.side-actions { display: flex; flex-direction: column; gap: 10px; }

/* ------------------------------ Prose ----------------------------------- */
.prose { max-width: 70ch; }
.prose p { color: var(--ink-2); }
.prose h2 { margin-top: 1.6em; }

/* ------------------------------ Revista --------------------------------- */
.article-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; transition: var(--transition);
}
.article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.article-card__media { aspect-ratio: 16/10; background: var(--surface-2); }
.article-card__media img, .article-card__media .media-fill { width: 100%; height: 100%; object-fit: cover; }
.article-card__body { padding: 24px; }
.article-card time { font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.article-card h3 { font-size: 1.2rem; margin: 10px 0; }
.article-card p { color: var(--muted); font-size: 0.94rem; margin: 0; }

/* ------------------------------ CTA band -------------------------------- */
.cta-band {
  background: var(--dark); color: #fff; border-radius: var(--radius-lg);
  padding: 64px; display: flex; align-items: center; justify-content: space-between;
  gap: 40px; position: relative; overflow: hidden;
}
.cta-band::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(600px 300px at 90% 50%, rgba(176,137,79,0.3), transparent 60%);
}
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { color: #fff; margin-bottom: 8px; }
.cta-band p { color: rgba(255,255,255,0.82); margin: 0; max-width: 520px; }

/* ------------------------------ Newsletter ------------------------------ */
.newsletter { background: var(--surface); }
.newsletter__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.newsletter form { display: flex; gap: 12px; }
.newsletter input {
  flex: 1; padding: 15px 18px; border: 1px solid var(--line); border-radius: var(--radius);
  font-family: inherit; font-size: 0.95rem;
}
.newsletter input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ------------------------------ Contacto -------------------------------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.info-list .ico {
  width: 42px; height: 42px; border-radius: 50%; background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center; color: var(--accent-dark); flex: 0 0 auto;
}
.info-list strong { display: block; color: var(--ink); font-size: 0.95rem; }
.info-list span { color: var(--muted); font-size: 0.92rem; }

/* ------------------------------ Formularios ----------------------------- */
.form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field label {
  display: block; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; margin-bottom: 7px;
}
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--radius);
  font-family: inherit; font-size: 0.95rem; background: #fff; color: var(--ink);
}
.form-field textarea { min-height: 140px; resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-field--check { display: flex; align-items: center; gap: 10px; }
.form-field--check input { width: auto; }
.checkbox-inline { display: flex; align-items: center; gap: 10px; font-size: 0.88rem; color: var(--muted); }

.alert { padding: 16px 18px; border-radius: var(--radius); font-size: 0.92rem; border: 1px solid transparent; }
.alert--success { background: #eaf5ee; color: var(--success); border-color: #cbe6d6; }
.alert--error { background: #fbecec; color: var(--danger); border-color: #f0cccc; }
.alert--info { background: var(--accent-soft); color: var(--accent-dark); border-color: #ead9be; }
[hidden] { display: none !important; }

/* ------------------------------ Estado vacío ---------------------------- */
.empty-state {
  text-align: center; padding: 80px 24px; color: var(--muted);
  border: 1px dashed var(--line); border-radius: var(--radius-lg); background: var(--surface);
}
.empty-state h3 { color: var(--ink); }

/* ------------------------------ Footer ---------------------------------- */
.site-footer { background: var(--dark); color: #b9bdc4; padding: 80px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; }
.site-footer h4 {
  color: #fff; font-family: var(--sans); font-size: 0.74rem; letter-spacing: 0.18em;
  text-transform: uppercase; margin-bottom: 20px;
}
.site-footer a { color: #b9bdc4; }
.site-footer a:hover { color: #fff; }
.site-footer p { color: #8f949c; font-size: 0.92rem; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; font-size: 0.92rem; }
.footer-brand svg { color: #fff; height: 46px; margin-bottom: 18px; }
.footer-brand .footer-logo { height: 58px; width: auto; margin-bottom: 18px; }
.socials { display: flex; gap: 12px; margin-top: 18px; }
.socials a {
  width: 38px; height: 38px; border: 1px solid rgba(255,255,255,0.2); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; transition: var(--transition);
}
.socials a:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.footer-bottom {
  margin-top: 60px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.12);
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  font-size: 0.82rem; color: #7e838b;
}

/* ------------------------------ WhatsApp flotante ----------------------- */
.whatsapp-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 70;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25d366; color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow); transition: var(--transition);
}
.whatsapp-fab:hover { transform: scale(1.08); }

/* ------------------------------ Utilidades ------------------------------ */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.text-center { text-align: center; }
.muted { color: var(--muted); }
.hidden { display: none; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ============================== ADMIN =================================== */
.admin-body { background: var(--surface); color: var(--ink-2); }
.admin-header {
  background: var(--dark); color: #fff; padding: 0 24px; height: 66px;
  display: flex; align-items: center; justify-content: space-between;
}
.admin-header .brand__name { font-size: 1.1rem; }
.admin-header nav { display: flex; gap: 22px; font-size: 0.82rem; }
.admin-header nav a { opacity: 0.85; }
.admin-header nav a:hover { opacity: 1; }
.admin-main { max-width: 1080px; margin: 0 auto; padding: 36px 24px 80px; }
.admin-title { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.panel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 28px; margin-bottom: 28px; box-shadow: var(--shadow-sm);
}
.panel h2 { font-size: 1.5rem; margin-bottom: 18px; }
.panel--auth { max-width: 420px; margin: 60px auto; }
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--dark); }
.login-card { width: 100%; max-width: 400px; background: #fff; border-radius: var(--radius-lg); padding: 40px; box-shadow: var(--shadow-lg); }
.login-card .brand { justify-content: center; color: var(--ink); margin-bottom: 26px; }
.login-card h1 { font-size: 1.7rem; text-align: center; margin-bottom: 6px; }
.login-card .sub { text-align: center; color: var(--muted); font-size: 0.9rem; margin-bottom: 26px; }

.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th, .table td { text-align: left; padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.table tr:hover td { background: var(--surface); }
.table .thumb { width: 64px; height: 48px; object-fit: cover; border-radius: var(--radius); background: var(--surface-2); }
.row-actions { display: flex; gap: 8px; }
.icon-btn {
  border: 1px solid var(--line); background: #fff; border-radius: var(--radius);
  padding: 7px 12px; font-size: 0.78rem; cursor: pointer; transition: var(--transition);
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent-dark); }
.icon-btn--danger:hover { border-color: var(--danger); color: var(--danger); }

.photo-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 8px; }
.photo-item { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4/3; background: var(--surface-2); }
.photo-item img { width: 100%; height: 100%; object-fit: cover; }
.photo-item .remove {
  position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%;
  background: rgba(0,0,0,0.6); color: #fff; border: 0; cursor: pointer; line-height: 1; font-size: 14px;
}
.photo-item.is-removed { opacity: 0.35; }
.photo-item.is-removed::after { content: "se eliminará"; position: absolute; inset: auto 0 0 0; background: var(--danger); color: #fff; font-size: 0.6rem; text-align: center; padding: 2px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
.help { font-size: 0.8rem; color: var(--muted); margin-top: 6px; }

/* ------------------------------ Responsive ------------------------------ */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .property-grid { grid-template-columns: repeat(2, 1fr); }
  .search-bar { grid-template-columns: 1fr 1fr; }
  .search-bar .btn { grid-column: 1 / -1; }
  .filters { grid-template-columns: 1fr 1fr; }
  .detail { grid-template-columns: 1fr; }
  .side-card { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; }
  .split__media { min-height: 320px; }
}

@media (max-width: 768px) {
  .section { padding: 64px 0; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .newsletter__inner, .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .cta-band { flex-direction: column; align-items: flex-start; padding: 44px 32px; }
  .hero { min-height: auto; }
  .hero__inner { padding-top: calc(var(--header-h) + 60px); }
  .search-bar { grid-template-columns: 1fr; }
  .gallery__thumbs { grid-template-columns: repeat(3, 1fr); }
  .specs { grid-template-columns: repeat(2, 1fr); }
  .photo-grid, .form-grid { grid-template-columns: repeat(2, 1fr); }

  .nav-toggle { display: flex; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: #fff; color: var(--ink); padding: 12px 24px 24px;
    box-shadow: var(--shadow);
    transform: translateY(-130%); transition: transform var(--transition);
  }
  .nav.is-open { transform: none; }
  .nav a { width: 100%; padding: 16px 0; border-bottom: 1px solid var(--line); }
  .header-inner .header-actions .btn { display: none; }
}

@media (max-width: 560px) {
  .container { padding: 0 18px; }
  .property-grid { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-band { padding: 36px 24px; }
  .split__body { padding: 40px 26px; }
  .hero__title { font-size: 2.1rem; }
}
