/* =================================================================
   Huby - Buscador de coworkings en España
   Design system: dark premium, acento esmeralda único, Poppins.
   ================================================================= */

/* ---------- Tokens ---------- */
:root {
  --bg: #0a0e0d;
  --bg-elev: #0f1513;
  --surface: #131b18;
  --surface-2: #18211d;
  --surface-3: #1e2a25;

  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text: #eef3f0;
  --text-muted: #9fb1a8;
  --text-faint: #6b7c73;

  --accent: #3ee08f;
  --accent-2: #2bc77a;
  --accent-ink: #04160d;
  --accent-soft: rgba(62, 224, 143, 0.12);
  --accent-line: rgba(62, 224, 143, 0.32);

  --star: #f5c451;
  --danger: #ff7a7a;

  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --r-pill: 999px;

  --shadow-sm: 0 4px 16px -8px rgba(0, 0, 0, 0.6);
  --shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.85);
  --shadow-accent: 0 18px 50px -20px rgba(62, 224, 143, 0.35);

  --container: 1200px;
  --section-y: clamp(4rem, 9vw, 7.5rem);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* ---------- Reset / base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Glow ambiental sutil del fondo (difuso, no neón) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 50% at 78% -5%, rgba(62, 224, 143, 0.1), transparent 60%),
    radial-gradient(50% 40% at 8% 8%, rgba(43, 199, 122, 0.06), transparent 55%);
  pointer-events: none;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input,
select,
textarea {
  font-family: inherit;
  font-size: 1rem;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

/* ---------- Layout primitives ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2.5rem);
}

.section {
  padding-block: var(--section-y);
}

.section-head {
  max-width: 60ch;
  margin-bottom: clamp(2rem, 4vw, 3.25rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.eyebrow::before {
  content: '';
  width: 22px;
  height: 1px;
  background: var(--accent-line);
}

h1,
h2,
h3 {
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.section-title {
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  margin-bottom: 1rem;
}

.section-sub {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 54ch;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--r);
  font-weight: 600;
  font-size: 0.97rem;
  white-space: nowrap;
  transition:
    transform 0.18s var(--ease),
    background 0.18s var(--ease),
    border-color 0.18s var(--ease),
    box-shadow 0.18s var(--ease);
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: var(--shadow-accent);
}

.btn-primary:hover {
  background: #54e89e;
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn-block {
  width: 100%;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 72px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition:
    background 0.3s var(--ease),
    border-color 0.3s var(--ease);
}

.site-header.scrolled {
  background: rgba(10, 14, 13, 0.78);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.main-nav a {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 500;
  position: relative;
  padding-block: 0.25rem;
  transition: color 0.2s var(--ease);
}

.main-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.25s var(--ease);
}

.main-nav a:hover {
  color: var(--text);
}

.main-nav a:hover::after {
  width: 100%;
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-strong);
  align-items: center;
  justify-content: center;
}

.nav-toggle svg {
  width: 22px;
  height: 22px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-top: clamp(2.5rem, 5vw, 4rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  letter-spacing: -0.035em;
}

.hero-title .accent {
  color: var(--accent);
}

.hero-sub {
  margin-top: 1.4rem;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--text-muted);
  max-width: 46ch;
}

/* Buscador del hero */
.hero-search {
  margin-top: 2.2rem;
  display: flex;
  gap: 0.6rem;
  padding: 0.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  max-width: 540px;
}

.hero-search .field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding-inline: 0.9rem;
}

.hero-search .field svg {
  width: 20px;
  height: 20px;
  color: var(--text-faint);
  flex-shrink: 0;
}

.hero-search input {
  width: 100%;
  border: none;
  background: transparent;
  padding-block: 0.8rem;
}

.hero-search input::placeholder {
  color: var(--text-faint);
}

.hero-quick {
  margin-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.hero-quick span {
  font-size: 0.85rem;
  color: var(--text-faint);
  margin-right: 0.25rem;
}

.quick-chip {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 0.4rem 0.9rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  transition: all 0.18s var(--ease);
}

.quick-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Collage visual del hero */
.hero-visual {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(2, 1fr);
  gap: 0.9rem;
  aspect-ratio: 1 / 1;
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
}

.hero-visual .v1 {
  grid-row: span 2;
}

.hero-badge {
  position: absolute;
  right: -0.5rem;
  bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 1.1rem;
  background: rgba(15, 21, 19, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-strong);
  border-radius: var(--r);
  box-shadow: var(--shadow);
}

.hero-badge .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.hero-badge strong {
  display: block;
  font-size: 0.95rem;
}

.hero-badge small {
  color: var(--text-muted);
  font-size: 0.78rem;
}

/* ---------- Stats strip ---------- */
.stats {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.stat {
  padding: clamp(1.5rem, 3vw, 2.5rem) 1.25rem;
  text-align: center;
  border-left: 1px solid var(--border);
}

.stat:first-child {
  border-left: none;
}

.stat-num {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--accent);
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-top: 0.35rem;
}

/* ---------- Search / results ---------- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.city-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.city-pill {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.55rem 1.1rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: all 0.18s var(--ease);
}

.city-pill:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.city-pill.active {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.controls {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.select-wrap svg {
  position: absolute;
  right: 0.85rem;
  width: 16px;
  height: 16px;
  color: var(--text-faint);
  pointer-events: none;
}

.select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 0.7rem 2.6rem 0.7rem 1rem;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.18s var(--ease);
}

.select-wrap select:hover {
  border-color: var(--border-strong);
}

.results-meta {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.results-meta strong {
  color: var(--text);
}

/* ---------- Card grid ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.cw-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: pointer;
  transition:
    transform 0.25s var(--ease),
    border-color 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.cw-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

.cw-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.cw-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.cw-card:hover .cw-media img {
  transform: scale(1.06);
}

.cw-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 14, 13, 0.55), transparent 45%);
}

.badge-featured {
  position: absolute;
  top: 0.9rem;
  left: 0.9rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.35rem 0.7rem;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--accent-ink);
}

.badge-featured svg {
  width: 13px;
  height: 13px;
}

.cw-price {
  position: absolute;
  bottom: 0.9rem;
  right: 0.9rem;
  z-index: 2;
  background: rgba(15, 21, 19, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
}

.cw-price strong {
  color: var(--accent);
  font-size: 1rem;
}

.cw-body {
  padding: 1.25rem 1.35rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}

.cw-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.cw-name {
  font-size: 1.18rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.cw-rating {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.9rem;
  font-weight: 600;
  flex-shrink: 0;
}

.cw-rating svg {
  width: 15px;
  height: 15px;
  color: var(--star);
}

.cw-location {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.cw-location svg {
  width: 15px;
  height: 15px;
  color: var(--text-faint);
  flex-shrink: 0;
}

.cw-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cw-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 0.6rem;
}

.tag {
  font-size: 0.76rem;
  color: var(--text-muted);
  padding: 0.3rem 0.65rem;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.tag.more {
  color: var(--accent);
}

/* ---------- Featured carousel ---------- */
.featured-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.featured-track {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--surface-3) transparent;
}

.featured-track::-webkit-scrollbar {
  height: 8px;
}

.featured-track::-webkit-scrollbar-thumb {
  background: var(--surface-3);
  border-radius: var(--r-pill);
}

.featured-track .cw-card {
  scroll-snap-align: start;
  flex: 0 0 min(420px, 82vw);
}

/* ---------- How it works ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
}

.step {
  position: relative;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.step-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--r);
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 1.1rem;
}

.step-icon svg {
  width: 24px;
  height: 24px;
}

.step-num {
  position: absolute;
  top: 1.5rem;
  right: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-faint);
}

.step h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.step p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 1.02rem;
}

.about-points {
  list-style: none;
  margin-top: 1.5rem;
  display: grid;
  gap: 0.9rem;
}

.about-points li {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  color: var(--text);
}

.about-points svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
}

.about-visual {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 4 / 3;
}

.about-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.contact-info {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
}

.contact-item {
  display: flex;
  gap: 0.9rem;
  align-items: center;
}

.contact-item .ic {
  width: 44px;
  height: 44px;
  border-radius: var(--r);
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--accent);
  flex-shrink: 0;
}

.contact-item .ic svg {
  width: 20px;
  height: 20px;
}

.contact-item small {
  display: block;
  color: var(--text-faint);
  font-size: 0.8rem;
}

.contact-item strong {
  font-weight: 500;
}

.form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  display: grid;
  gap: 1.1rem;
}

.field-group {
  display: grid;
  gap: 0.45rem;
}

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

.field-group label {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
}

.field-group input,
.field-group textarea {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 0.8rem 1rem;
  color: var(--text);
  transition: border-color 0.18s var(--ease);
}

.field-group input::placeholder,
.field-group textarea::placeholder {
  color: var(--text-faint);
}

.field-group input:focus,
.field-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.field-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-status {
  font-size: 0.9rem;
  min-height: 1.2rem;
}

.form-status.ok {
  color: var(--accent);
}

.form-status.err {
  color: var(--danger);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
  background: var(--bg-elev);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  color: var(--text-muted);
  margin-top: 1rem;
  max-width: 36ch;
  font-size: 0.95rem;
}

.footer-col h4 {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 1.1rem;
  font-weight: 600;
}

.footer-col ul {
  list-style: none;
  display: grid;
  gap: 0.7rem;
}

.footer-col a {
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: color 0.18s var(--ease);
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--text-faint);
  font-size: 0.88rem;
}

/* ---------- Loading / empty states ---------- */
.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.skeleton {
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--surface);
}

.skeleton .sk-media {
  aspect-ratio: 16 / 10;
}

.skeleton .sk-line {
  height: 14px;
  margin: 1rem 1.35rem;
  border-radius: 6px;
}

.skeleton .sk-line.short {
  width: 50%;
}

.shimmer {
  background: linear-gradient(
    100deg,
    var(--surface-2) 30%,
    var(--surface-3) 50%,
    var(--surface-2) 70%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-muted);
}

.empty-state svg {
  width: 48px;
  height: 48px;
  color: var(--text-faint);
  margin-bottom: 1rem;
}

.empty-state h3 {
  color: var(--text);
  margin-bottom: 0.5rem;
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease);
  will-change: opacity, transform;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

/* =================================================================
   Página de detalle
   ================================================================= */
.detail-main {
  min-height: 60vh;
}

.detail-loading,
.detail-error {
  display: grid;
  place-items: center;
  min-height: 50vh;
  text-align: center;
  color: var(--text-muted);
  gap: 1rem;
  padding: 2rem;
}

.spinner {
  width: 38px;
  height: 38px;
  border: 3px solid var(--border-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.detail-hero {
  position: relative;
  height: clamp(340px, 45vw, 520px);
  overflow: hidden;
}

.detail-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg) 4%, rgba(10, 14, 13, 0.35) 55%, transparent);
}

.detail-hero-content {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.breadcrumb {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb svg {
  width: 14px;
  height: 14px;
  color: var(--text-faint);
}

.detail-title {
  font-size: clamp(2rem, 5vw, 3.25rem);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 0.9rem;
  color: var(--text);
}

.detail-meta .m {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.95rem;
}

.detail-meta svg {
  width: 17px;
  height: 17px;
  color: var(--accent);
}

.detail-meta .stars svg {
  color: var(--star);
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: clamp(1.5rem, 4vw, 3rem);
  padding-block: clamp(2.5rem, 5vw, 4rem);
  align-items: start;
}

.detail-block {
  margin-bottom: 2.75rem;
}

.detail-block h2 {
  font-size: 1.5rem;
  margin-bottom: 1.1rem;
}

.detail-block p {
  color: var(--text-muted);
  font-size: 1.03rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.85rem;
}

.gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--r);
  border: 1px solid var(--border);
  cursor: pointer;
  transition:
    transform 0.25s var(--ease),
    border-color 0.25s var(--ease);
}

.gallery img:hover {
  transform: scale(1.02);
  border-color: var(--accent);
}

.amenities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.85rem;
}

.amenity {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  font-size: 0.95rem;
}

.amenity svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
  flex-shrink: 0;
}

.map-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  padding: 1.1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  transition: border-color 0.18s var(--ease);
}

.map-link:hover {
  border-color: var(--accent);
}

.map-link .addr {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.map-link .addr svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

.map-link .go {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
}

/* Sidebar de detalle */
.detail-aside {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 1.25rem;
}

.price-card,
.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.5rem;
}

.price-card h3,
.info-card h3 {
  font-size: 1.15rem;
  margin-bottom: 1.1rem;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-block: 0.7rem;
  border-bottom: 1px solid var(--border);
}

.price-row:last-of-type {
  border-bottom: none;
}

.price-row .lbl {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.price-row .val {
  font-weight: 600;
}

.price-row.lead .val {
  color: var(--accent);
  font-size: 1.3rem;
}

.price-card .btn {
  margin-top: 1.25rem;
}

.price-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: 0.6rem;
}

.price-actions .btn {
  margin-top: 0;
  padding-inline: 0.5rem;
}

.info-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.info-row svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.hours {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.hours-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
}

.hours-row .day {
  color: var(--text-muted);
}

/* ---------- Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  place-items: center;
  padding: 1.5rem;
  background: rgba(5, 8, 7, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal.open {
  display: grid;
}

.modal-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

.modal-card h3 {
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
}

.modal-card > p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.modal-card .form {
  background: none;
  border: none;
  padding: 0;
}

.modal-close {
  float: right;
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  display: grid;
  place-items: center;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.modal-close:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.modal-success {
  text-align: center;
  display: none;
}

.modal-success.show {
  display: block;
}

.modal-success .check {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin: 0 auto 1rem;
}

.modal-success .check svg {
  width: 30px;
  height: 30px;
}

.demo-note {
  font-size: 0.78rem;
  color: var(--text-faint);
  text-align: center;
  margin-top: 1rem;
}

/* =================================================================
   Responsive
   ================================================================= */
@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    order: -1;
    aspect-ratio: 16 / 10;
    max-height: 320px;
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-aside {
    position: static;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .main-nav,
  .header-cta .btn-ghost {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .main-nav.open {
    display: block;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg-elev);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.25rem 1.5rem;
  }

  .main-nav.open ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .main-nav.open a {
    padding-block: 0.6rem;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stat:nth-child(odd) {
    border-left: none;
  }

  .stat:nth-child(n + 3) {
    border-top: 1px solid var(--border);
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .hero-search {
    flex-direction: column;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
