/* ============================================
   Piher & Asociados — hoja de estilos compartida
   ============================================ */

:root {
  --navy-dark: #0d1c33;
  --navy: #13284a;
  --navy-light: #1c3a63;
  --gold: #c9a227;
  --gold-light: #e0be55;
  --bg: #f5f7fa;
  --white: #ffffff;
  --text: #1f2937;
  --muted: #667085;
  --border: #e3e7ee;
  --success: #1f9d55;
  --radius: 10px;
  --shadow: 0 4px 18px rgba(13, 28, 51, 0.08);
  --shadow-hover: 0 10px 28px rgba(13, 28, 51, 0.14);
  --max-width: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
}

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

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

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

h1, h2, h3, h4 { margin: 0 0 12px; color: var(--navy-dark); line-height: 1.25; }
p { margin: 0 0 14px; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 8px;
  display: block;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }

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

.btn-gold { background: var(--gold); color: var(--navy-dark); }
.btn-gold:hover { background: var(--gold-light); }

.btn-outline { background: transparent; border-color: var(--white); color: var(--white); }
.btn-outline:hover { background: rgba(255,255,255,0.12); }

.btn-whatsapp { background: #25D366; color: var(--white); }
.btn-whatsapp:hover { background: #1ebc59; }

/* ---------- Header ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
  gap: 20px;
}
.logo img { height: 42px; width: auto; }
.main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  flex: 1;
  justify-content: center;
  flex-wrap: wrap;
}
.main-nav a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover,
.main-nav a.active { border-color: var(--gold); color: var(--navy-dark); }

.header-actions { display: flex; align-items: center; gap: 14px; }
.wa-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #25D366;
}
.wa-icon-link svg { width: 22px; height: 22px; fill: white; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--navy);
  cursor: pointer;
}

@media (max-width: 860px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 24px;
    box-shadow: var(--shadow);
    gap: 14px;
  }
  .main-nav.open { display: flex; }
  .nav-toggle { display: block; }
  .header-inner { position: relative; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: var(--white);
  padding: 90px 0 70px;
  background-image: url("../img/site/hero.jpg");
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.hero-inner { position: relative; max-width: 640px; }
.hero .eyebrow { text-shadow: 0 2px 8px rgba(0,0,0,0.75); }
.hero h1 { color: var(--white); font-size: 2.4rem; margin-bottom: 16px; text-shadow: 0 2px 10px rgba(0,0,0,0.7), 0 1px 3px rgba(0,0,0,0.85); }
.hero p.lead { color: rgba(255,255,255,0.95); font-size: 1.05rem; max-width: 520px; text-shadow: 0 2px 8px rgba(0,0,0,0.7); }

.page-hero {
  background: linear-gradient(120deg, var(--navy-dark) 0%, var(--navy) 100%);
  color: var(--white);
  padding: 64px 0 48px;
  text-align: center;
}
.page-hero h1 { color: var(--white); margin-bottom: 8px; }
.page-hero p { color: rgba(255,255,255,0.82); max-width: 620px; margin: 0 auto; }

/* ---------- Buscador ---------- */
.search-box {
  position: relative;
  margin-top: 34px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 10px;
  box-shadow: var(--shadow-hover);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 780px;
}
.op-toggle { display: flex; background: var(--bg); border-radius: 8px; padding: 4px; }
.op-toggle button {
  border: none;
  background: transparent;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
}
.op-toggle button.active { background: var(--navy); color: var(--white); }

.search-field {
  flex: 1;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 8px;
}
.search-field label {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}
.search-field select {
  border: none;
  background: transparent;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy-dark);
  padding: 2px 0;
  cursor: pointer;
}
.search-field select:focus { outline: none; }
.search-btn-wrap { display: flex; align-items: center; }
.search-btn-wrap .btn { white-space: nowrap; }

/* ---------- Categorías ---------- */
.categorias {
  background: var(--white);
  padding: 44px 0;
  border-bottom: 1px solid var(--border);
}
.cat-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
  text-align: center;
}
.cat-item {
  padding: 18px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s ease;
}
.cat-item:hover { background: var(--bg); }
.cat-item .icon {
  width: 54px; height: 54px;
  margin: 0 auto 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--navy);
}
.cat-item .icon svg { width: 32px; height: 32px; }
.cat-item strong { display: block; font-size: 0.98rem; color: var(--navy-dark); }
.cat-item span.sub { font-size: 0.78rem; color: var(--muted); }

@media (max-width: 760px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Sección genérica ---------- */
.section { padding: 60px 0; }
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}
.section-header h2 { margin: 0; font-size: 1.7rem; }
.link-arrow { font-weight: 700; color: var(--navy); white-space: nowrap; }
.link-arrow:hover { color: var(--gold); }

/* ---------- Tarjetas de propiedad ---------- */
.prop-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
@media (max-width: 1000px) { .prop-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .prop-grid { grid-template-columns: 1fr; } }

.prop-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
  display: flex;
  flex-direction: column;
}
.prop-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.prop-media { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--border); }
.prop-media img { width: 100%; height: 100%; object-fit: cover; }
.prop-tag {
  position: absolute; top: 12px; left: 12px;
  padding: 5px 12px;
  border-radius: 5px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--white);
  text-transform: uppercase;
}
.prop-tag.venta { background: var(--navy); }
.prop-tag.renta { background: var(--success); }
.prop-tag.pendiente { background: var(--muted); }
.prop-body { padding: 16px 18px 18px; flex: 1; display: flex; flex-direction: column; }
.prop-price { font-size: 1.25rem; font-weight: 800; color: var(--navy-dark); margin-bottom: 2px; }
.prop-title { font-weight: 600; margin-bottom: 4px; }
.prop-loc { font-size: 0.86rem; color: var(--muted); margin-bottom: 10px; display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.map-link { color: var(--navy); font-weight: 700; text-decoration: underline; }
.map-link:hover { color: var(--gold); }
.prop-specs { display: flex; gap: 14px; font-size: 0.82rem; color: var(--muted); margin-bottom: 14px; }
.prop-specs span { display: flex; align-items: center; gap: 4px; }
.prop-body .btn { margin-top: auto; justify-content: center; width: 100%; }

.prop-body.pendiente-body { justify-content: center; text-align: center; }
.pendiente-msg { color: var(--muted); font-size: 0.9rem; margin-bottom: 14px; }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: var(--navy);
  color: var(--white);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  border-radius: var(--radius);
  overflow: hidden;
}
.cta-banner-text { padding: 46px; display: flex; flex-direction: column; justify-content: center; }
.cta-banner-text h2 { color: var(--white); font-size: 1.6rem; }
.cta-banner-text p { color: rgba(255,255,255,0.82); }
.cta-banner-img { position: relative; min-height: 260px; }
.cta-banner-img .overlay-text {
  position: absolute; bottom: 20px; right: 20px;
  font-family: Georgia, serif;
  font-style: italic;
  color: var(--white);
  font-size: 1.05rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
@media (max-width: 760px) { .cta-banner { grid-template-columns: 1fr; } }

/* ---------- Trust strip ---------- */
.trust-strip {
  background: var(--white);
  padding: 40px 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr) 1.3fr;
  gap: 20px;
  align-items: stretch;
}
.trust-item { text-align: center; padding: 10px; }
.trust-item .icon { width: 44px; height: 44px; margin: 0 auto 10px; color: var(--navy); }
.trust-item strong { display: block; font-size: 0.92rem; color: var(--navy-dark); }

.whatsapp-cta {
  background: var(--navy-dark);
  color: var(--white);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.whatsapp-cta p { margin: 0; font-weight: 600; }
.whatsapp-cta .sub { font-weight: 400; color: rgba(255,255,255,0.7); font-size: 0.85rem; margin-top: 2px;}

@media (max-width: 980px) {
  .trust-strip { grid-template-columns: repeat(2, 1fr); }
  .whatsapp-cta { grid-column: 1 / -1; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.75);
  padding: 50px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 30px;
  margin-bottom: 30px;
}
.footer-grid h4 { color: var(--white); font-size: 0.95rem; margin-bottom: 14px; }
.footer-grid a { display: block; color: rgba(255,255,255,0.75); margin-bottom: 8px; font-size: 0.92rem; }
.footer-grid a:hover { color: var(--gold-light); }
.footer-logo img { height: 46px; margin-bottom: 12px; filter: brightness(0) invert(1); }
.social-icons { display: flex; gap: 12px; margin-top: 10px; }
.social-icons a {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
}
.social-icons a:hover { background: var(--gold); color: var(--navy-dark); }
.social-icons svg { width: 18px; height: 18px; fill: currentColor; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
}
.footer-bottom a { color: rgba(255,255,255,0.65); }
.footer-bottom a:hover { color: var(--gold-light); }

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

/* ---------- Contenido de texto (Nosotros / Noticias / Privacidad) ---------- */
.content-block { background: var(--white); border-radius: var(--radius); padding: 40px; box-shadow: var(--shadow); margin-bottom: 26px; }
.content-block h3 { color: var(--navy); font-size: 1.15rem; margin-top: 26px; }
.content-block h3:first-child { margin-top: 0; }
.two-col { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 36px; align-items: center; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.img-placeholder {
  background: var(--border);
  border: 2px dashed #b9c2d0;
  border-radius: var(--radius);
  min-height: 260px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  text-align: center;
  padding: 20px;
  font-size: 0.9rem;
}
.badge-showcase {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
  border-radius: var(--radius);
  min-height: 260px;
  display: flex; align-items: center; justify-content: center;
  padding: 30px;
}
.badge-img { width: 100%; max-width: 280px; height: auto; filter: drop-shadow(0 8px 20px rgba(0,0,0,0.35)); }

.pdf-download {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 14px 20px;
  border-radius: 8px;
  margin-top: 10px;
}
.pdf-download .pdf-icon {
  width: 38px; height: 38px;
  background: #d92d20;
  color: white;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
}

/* ---------- Filtros página Propiedades ---------- */
.filters-bar {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 30px;
  margin-top: -46px;
  position: relative;
  z-index: 5;
}
.filters-bar .search-field { background: var(--bg); }
.filters-bar .op-toggle { background: var(--bg); }
.results-count { color: var(--muted); font-size: 0.9rem; margin-bottom: 18px; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }

/* ---------- Contacto ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px;
}
.contact-row { display: flex; gap: 14px; margin-bottom: 20px; align-items: flex-start; }
.contact-row .icon { width: 40px; height: 40px; border-radius: 50%; background: var(--bg); display: flex; align-items: center; justify-content: center; color: var(--navy); flex-shrink: 0; }
.map-embed { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); min-height: 320px; border: 0; width: 100%; }

/* ---------- Modal de detalle de propiedad ---------- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(13,28,51,0.6);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-card {
  background: var(--white);
  border-radius: var(--radius);
  max-width: 780px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(13,28,51,0.55);
  color: white;
  border: none;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}
.modal-close:hover { background: var(--navy-dark); }
.modal-img { width: 100%; max-height: 360px; object-fit: cover; display: block; }
.modal-info { padding: 26px 30px 30px; }
.modal-info p { color: var(--text); }

/* Stub pages */
.stub-box {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 50px;
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}
