/* =========================================================
   KEND INMOBILIARIA — Hoja de estilos principal
   Paleta tomada del logo: azul marino, naranja, amarillo dorado,
   sobre fondo blanco.
   ========================================================= */

:root {
  --navy: #0E2A54;
  --navy-dark: #081b38;
  --orange: #F0791E;
  --orange-dark: #d9660e;
  --yellow: #F7C41E;
  --white: #FFFFFF;
  --cream: #FAFAF8;
  --gray-100: #F2F3F5;
  --gray-300: #D8DCE1;
  --gray-500: #8A93A0;
  --gray-700: #4A5160;
  --text: #16202E;

  --font-display: "Cormorant Garamond", serif;
  --font-body: "Inter", sans-serif;

  --radius: 10px;
  --shadow-sm: 0 2px 8px rgba(14, 42, 84, 0.08);
  --shadow-md: 0 8px 24px rgba(14, 42, 84, 0.12);
  --shadow-lg: 0 20px 48px rgba(14, 42, 84, 0.18);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.5;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy);
  margin: 0 0 0.5em;
  font-weight: 600;
}

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

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

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  height: 76px;
  width: auto;
}

.main-nav {
  display: flex;
  gap: 32px;
}

.main-nav a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--navy);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

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

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--navy);
  color: var(--white) !important;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.header-cta:hover { background: var(--orange); }

/* ---------- Hero ---------- */

.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  padding: 92px 0 68px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 15% 20%, rgba(240, 121, 30, 0.18), transparent 45%),
              radial-gradient(circle at 85% 80%, rgba(247, 196, 30, 0.14), transparent 45%);
  pointer-events: none;
}

.hero .container { position: relative; }

.hero h1 {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  max-width: 780px;
  margin: 0 auto 16px;
  color: var(--white);
}

.hero p {
  max-width: 620px;
  margin: 0 auto 32px;
  color: #C9D2E0;
  font-size: 1.1rem;
}

.hero-tags {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-tag {
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--white);
  backdrop-filter: blur(2px);
}

.hero-tag.accent-yellow { border-color: var(--yellow); background: rgba(247, 196, 30, 0.16); }
.hero-tag.accent-orange { border-color: var(--orange); background: rgba(240, 121, 30, 0.2); }

/* ---------- Section headers ---------- */

.section {
  padding: 56px 0;
  border-top: 1px solid var(--gray-100);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 12px;
}

.section-head h2 {
  font-size: 2rem;
  margin: 0;
}

.section-label {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 6px;
}

.section-count {
  font-size: 0.9rem;
  color: var(--gray-500);
  font-weight: 500;
}

/* ---------- Property grid & cards ---------- */

.property-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.property-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.property-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.property-card-img {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--gray-100);
  overflow: hidden;
}

.property-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.property-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--navy);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
}

.property-badge.orange { background: var(--orange); }
.property-badge.yellow { background: var(--yellow); color: var(--navy-dark); }

.property-card-body {
  padding: 18px 20px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.property-card-body h3 {
  font-size: 1.3rem;
  margin-bottom: 4px;
}

.property-location {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-bottom: 10px;
}

.property-desc {
  font-size: 0.92rem;
  color: var(--gray-700);
  margin-bottom: 16px;
  flex: 1;
}

.property-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--gray-100);
  padding-top: 14px;
}

.property-price {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
}

.property-link {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--orange);
}

/* ---------- Empty state ("Próximamente") ---------- */

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 56px 24px;
  background: var(--cream);
  border: 1.5px dashed var(--gray-300);
  border-radius: var(--radius);
}

.empty-state .empty-icon {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.empty-state h3 {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--gray-700);
  max-width: 420px;
  margin: 0 auto;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.btn-primary {
  background: var(--navy);
  color: var(--white);
}
.btn-primary:hover { background: var(--navy-dark); }

.btn-orange {
  background: var(--orange);
  color: var(--white);
}
.btn-orange:hover { background: var(--orange-dark); }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--navy);
  color: var(--navy);
}
.btn-outline:hover { background: var(--navy); color: var(--white); }

/* ---------- Lightbox ---------- */

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 27, 56, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 24px;
}

.lightbox-overlay.active { display: flex; }

.lightbox-box {
  background: var(--white);
  border-radius: 14px;
  max-width: 780px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.lightbox-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--gray-100);
  overflow: hidden;
  border-radius: 14px 14px 0 0;
}

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

.lightbox-body { padding: 28px 32px 32px; }

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--white);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.lightbox-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

/* ---------- Franja de contacto ---------- */

.cta-band {
  background: linear-gradient(120deg, var(--orange) 0%, var(--orange-dark) 100%);
  margin-top: 40px;
}

.cta-band-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 44px 0;
}

.cta-band h2 {
  color: var(--white);
  font-size: 1.7rem;
  margin-bottom: 6px;
}

.cta-band p {
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  font-size: 1.02rem;
}

.btn-white {
  background: var(--white);
  color: var(--orange-dark);
  white-space: nowrap;
}
.btn-white:hover { background: var(--navy); color: var(--white); }

/* ---------- WhatsApp flotante ---------- */

.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  background: #25D366;
  color: var(--white);
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  font-size: 1.6rem;
  transition: transform 0.2s;
}

.whatsapp-float:hover { transform: scale(1.08); }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy);
  color: var(--white);
  padding: 48px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.site-footer h4 {
  color: var(--white);
  font-size: 1rem;
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.site-footer a, .site-footer p {
  color: #C9D2E0;
  font-size: 0.9rem;
}

.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a:hover { color: var(--yellow); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 20px;
  font-size: 0.8rem;
  color: #8FA0BF;
  text-align: center;
}

/* ---------- Detail page ---------- */

.detail-hero {
  aspect-ratio: 21 / 9;
  background: var(--gray-100);
  overflow: hidden;
}

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

.detail-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin: 24px 0;
}

.detail-gallery img {
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 8px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  margin-top: 32px;
}

.detail-specs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 24px 0;
}

.spec-item {
  background: var(--gray-100);
  border-radius: 8px;
  padding: 14px 16px;
}

.spec-item .label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray-500);
  font-weight: 700;
}

.spec-item .value {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
}

.detail-sidebar {
  background: var(--cream);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 28px;
  position: sticky;
  top: 100px;
  height: fit-content;
}

.detail-hero img, .detail-gallery img { cursor: zoom-in; }

.photo-viewer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 27, 56, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 40px;
}

.photo-viewer-overlay.active { display: flex; }

.photo-viewer-overlay img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 6px;
}

.photo-viewer-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: rgba(255,255,255,0.15);
  border: none;
  color: var(--white);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
}
.photo-viewer-close:hover { background: rgba(255,255,255,0.3); }

.photo-viewer-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  border: none;
  color: var(--white);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-size: 1.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-viewer-nav:hover { background: rgba(255,255,255,0.3); }
.photo-viewer-nav.prev { left: 20px; }
.photo-viewer-nav.next { right: 20px; }

.photo-viewer-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--white);
  font-size: 0.85rem;
  background: rgba(255,255,255,0.15);
  padding: 4px 14px;
  border-radius: 999px;
}

@media (max-width: 600px) {
  .photo-viewer-nav { width: 40px; height: 40px; font-size: 1.4rem; }
  .photo-viewer-nav.prev { left: 6px; }
  .photo-viewer-nav.next { right: 6px; }
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin: 20px 0;
}
.breadcrumb a { color: var(--navy); font-weight: 600; }

@media (max-width: 860px) {
  .main-nav { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-sidebar { position: static; }
}
