/* =====================================================================
   Lorda Negocios Inmobiliarios - Estilos del sitio público
   ===================================================================== */

:root {
  --color-bg: #f7f6f2;
  --color-surface: #ffffff;
  --color-border: #e6e2da;
  --color-text: #1f2430;
  --color-text-muted: #6b7180;
  --color-primary: #16233f;
  --color-primary-dark: #0c1526;
  --color-primary-light: #2a3c63;
  --color-accent: #b8823f;
  --color-accent-dark: #96692e;
  --color-success: #2f7d4f;
  --color-danger: #b23a3a;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(20, 20, 30, 0.08);
  --shadow-md: 0 8px 24px rgba(20, 20, 30, 0.10);
  --shadow-lg: 0 20px 50px rgba(12, 21, 38, 0.18);
  --container-w: 1180px;
  font-size: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

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

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

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

h1, h2, h3, h4 { font-family: 'Georgia', 'Times New Roman', serif; line-height: 1.2; margin: 0 0 .5em; color: var(--color-primary-dark); }
h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.section { padding: 64px 0; }
.section-tight { padding: 40px 0; }
.section-alt { background: var(--color-surface); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.section-header { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-header p { color: var(--color-text-muted); }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 700; color: var(--color-accent-dark); margin-bottom: 8px; display: block; }

/* ---------------------------------------------------------------- */
/* Botones                                                            */
/* ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-sm); font-weight: 600; font-size: .95rem;
  border: 1px solid transparent; cursor: pointer; transition: all .15s ease; line-height: 1;
}
.btn-primary { background: var(--color-accent); color: #fff; }
.btn-primary:hover { background: var(--color-accent-dark); }
.btn-outline { background: transparent; border-color: rgba(255,255,255,.5); color: inherit; }
.btn-dark { background: var(--color-primary); color: #fff; }
.btn-dark:hover { background: var(--color-primary-dark); }
.btn-ghost { background: transparent; color: var(--color-primary); border-color: var(--color-border); }
.btn-ghost:hover { border-color: var(--color-primary); }
.btn-sm { padding: 8px 16px; font-size: .85rem; }
.btn-block { width: 100%; }
.btn-danger { background: var(--color-danger); color: #fff; }

/* ---------------------------------------------------------------- */
/* Header                                                             */
/* ---------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--color-primary); color: #fff;
  box-shadow: var(--shadow-sm);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 1.1rem; color: #fff; line-height: 1.2; }
.brand-mark {
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--color-accent); color: #fff;
  font-family: 'Georgia', 'Times New Roman', serif; font-weight: 700; font-size: 1.3rem;
}
.brand-mark-footer { width: 38px; height: 38px; font-size: 1.1rem; }
@media (max-width: 900px) {
  .brand-mark { width: 38px; height: 38px; font-size: 1.1rem; }
  .brand-text { font-size: .98rem; }
}
.main-nav { display: flex; align-items: center; gap: 8px; }
.main-nav a { padding: 10px 14px; border-radius: var(--radius-sm); color: rgba(255,255,255,.85); font-weight: 500; font-size: .95rem; }
.main-nav a:hover, .main-nav a.active { color: #fff; background: rgba(255,255,255,.08); }
.main-nav a.btn { color: #fff; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: #fff; display: block; }

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute; top: 76px; left: 0; right: 0; background: var(--color-primary);
    flex-direction: column; align-items: stretch; padding: 10px 20px 20px; gap: 4px;
    display: none; box-shadow: var(--shadow-md);
  }
  .main-nav.open { display: flex; }
  .main-nav a { text-align: center; }
}

/* ---------------------------------------------------------------- */
/* Alertas y flash messages                                           */
/* ---------------------------------------------------------------- */
.alert { margin: 18px 0; padding: 14px 18px; border-radius: var(--radius-sm); font-size: .95rem; }
.alert-success { background: #e6f4ea; color: var(--color-success); border: 1px solid #bfe3cb; }
.alert-error { background: #fbe9e9; color: var(--color-danger); border: 1px solid #f3c6c6; }
.alert-info { background: #e8f0fb; color: #1c4c8c; border: 1px solid #c6d9f3; }

/* ---------------------------------------------------------------- */
/* Hero + buscador                                                    */
/* ---------------------------------------------------------------- */
.hero {
  background-image: linear-gradient(160deg, rgba(12,21,38,.92), rgba(22,35,63,.80) 65%), url('../../images/santa_rosa_aerea.jpeg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff; padding: 72px 0 110px; position: relative;
}
.hero-content { max-width: 720px; }
.hero h1 { color: #fff; }
.hero p.lead { color: rgba(255,255,255,.82); font-size: 1.15rem; max-width: 560px; }
.hero-stats { display: flex; gap: 32px; margin-top: 28px; flex-wrap: wrap; }
.hero-stats div strong { display: block; font-size: 1.6rem; font-family: Georgia, serif; color: var(--color-accent); }
.hero-stats div span { color: rgba(255,255,255,.75); font-size: .85rem; }

.search-card {
  background: var(--color-surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: 24px; margin-top: -64px; position: relative; z-index: 5;
}
.search-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.search-tabs a {
  padding: 8px 20px; border-radius: 999px; font-weight: 600; font-size: .9rem;
  color: var(--color-text-muted); border: 1px solid var(--color-border);
}
.search-tabs a.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.search-form { display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 12px; align-items: end; }
@media (max-width: 900px) { .search-form { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .search-form { grid-template-columns: 1fr; } }

.field label { display: block; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--color-text-muted); margin-bottom: 6px; }
.field select, .field input {
  width: 100%; padding: 11px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  background: #fff; font-size: .95rem; color: var(--color-text); font-family: inherit;
}
.field select:focus, .field input:focus { outline: 2px solid var(--color-accent); outline-offset: 1px; }

/* ---------------------------------------------------------------- */
/* Grilla de propiedades / cards                                      */
/* ---------------------------------------------------------------- */
.properties-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
@media (max-width: 980px) { .properties-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .properties-grid { grid-template-columns: 1fr; } }

.property-card {
  background: var(--color-surface); border-radius: var(--radius-md); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: transform .15s ease, box-shadow .15s ease; border: 1px solid var(--color-border);
  display: flex; flex-direction: column;
}
.property-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.property-card .thumb { position: relative; aspect-ratio: 4/3; overflow: hidden; background: #eee; }
.property-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.badge {
  position: absolute; top: 12px; left: 12px; background: var(--color-accent); color: #fff;
  padding: 5px 12px; border-radius: 999px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}
.badge-status { left: auto; right: 12px; background: var(--color-primary); }
.badge-featured { top: 12px; right: 12px; left: auto; background: #d3a84c; }
.property-card .body { padding: 18px 18px 20px; flex: 1; display: flex; flex-direction: column; }
.property-card .price { font-family: Georgia, serif; font-size: 1.3rem; color: var(--color-primary-dark); font-weight: 700; margin-bottom: 4px; }
.property-card .title { font-size: 1.02rem; font-weight: 600; margin-bottom: 4px; color: var(--color-text); }
.property-card .location { color: var(--color-text-muted); font-size: .88rem; margin-bottom: 12px; }
.property-card .specs { display: flex; gap: 14px; flex-wrap: wrap; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--color-border); color: var(--color-text-muted); font-size: .85rem; }
.property-card .specs span { display: flex; align-items: center; gap: 5px; }

.section-footer-cta { text-align: center; margin-top: 36px; }

/* ---------------------------------------------------------------- */
/* Barra / panel de filtros (listado)                                 */
/* ---------------------------------------------------------------- */
.filters-bar {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md);
  padding: 20px; margin-bottom: 30px;
}
.filters-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; align-items: end; }
@media (max-width: 980px) { .filters-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px) { .filters-grid { grid-template-columns: repeat(2, 1fr); } }
.results-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 10px; }
.results-bar strong { color: var(--color-primary-dark); }

.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 36px; flex-wrap: wrap; }
.pagination a, .pagination span {
  padding: 8px 14px; border-radius: var(--radius-sm); border: 1px solid var(--color-border); font-size: .9rem;
  background: var(--color-surface);
}
.pagination a:hover { border-color: var(--color-primary); }
.pagination .current { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

.empty-state { text-align: center; padding: 60px 20px; color: var(--color-text-muted); }

/* ---------------------------------------------------------------- */
/* Detalle de propiedad                                               */
/* ---------------------------------------------------------------- */
.breadcrumbs { font-size: .85rem; color: var(--color-text-muted); margin-bottom: 18px; }
.breadcrumbs a:hover { color: var(--color-primary); }

.gallery { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; border-radius: var(--radius-md); overflow: hidden; margin-bottom: 32px; }
.gallery .main-img { aspect-ratio: 16/11; overflow: hidden; cursor: zoom-in; background:#eee; }
.gallery .main-img img { width: 100%; height: 100%; object-fit: cover; }
.gallery .side-imgs { display: grid; grid-template-rows: 1fr 1fr; gap: 10px; }
.gallery .side-imgs div { aspect-ratio: 16/8; overflow: hidden; cursor: zoom-in; background:#eee; position: relative; }
.gallery .side-imgs img { width: 100%; height: 100%; object-fit: cover; }
.gallery .more-overlay { position: absolute; inset: 0; background: rgba(12,21,38,.6); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }
@media (max-width: 760px) { .gallery { grid-template-columns: 1fr; } .gallery .side-imgs { grid-template-columns: 1fr 1fr; grid-template-rows: none; } }

.detail-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 900px) { .detail-layout { grid-template-columns: 1fr; } }

.detail-header { display: flex; justify-content: space-between; align-items: start; gap: 20px; flex-wrap: wrap; margin-bottom: 6px; }
.detail-price { font-family: Georgia, serif; font-size: 2rem; color: var(--color-primary-dark); font-weight: 700; }
.detail-location { color: var(--color-text-muted); margin-bottom: 20px; }

.specs-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 24px 0; }
@media (max-width: 640px) { .specs-grid { grid-template-columns: repeat(2, 1fr); } }
.spec-item { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-sm); padding: 14px; text-align: center; }
.spec-item strong { display: block; font-size: 1.2rem; color: var(--color-primary-dark); font-family: Georgia, serif; }
.spec-item span { font-size: .78rem; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: .03em; }

.feature-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.feature-list li { padding-left: 24px; position: relative; color: var(--color-text); }
.feature-list li::before { content: "✓"; position: absolute; left: 0; color: var(--color-success); font-weight: 700; }

.map-wrap { border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--color-border); margin-top: 16px; }
.map-wrap #map { height: 320px; width: 100%; }

.sidebar-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 24px; position: sticky; top: 96px; }
.sidebar-card h3 { margin-bottom: 4px; }
.sidebar-card .muted { color: var(--color-text-muted); font-size: .9rem; margin-bottom: 16px; }
.contact-actions { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }

.form-grid { display: grid; gap: 14px; }
.form-grid label { font-size: .82rem; font-weight: 700; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: .03em; margin-bottom: 4px; display: block; }
.form-grid input, .form-grid select, .form-grid textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  font-family: inherit; font-size: .95rem; background: #fff;
}
.form-grid textarea { resize: vertical; min-height: 100px; }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus { outline: 2px solid var(--color-accent); outline-offset: 1px; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(10,14,24,.92); z-index: 100; display: none; align-items: center; justify-content: center; padding: 30px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 82vh; object-fit: contain; border-radius: 6px; }
.lightbox-close, .lightbox-prev, .lightbox-next { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: 50%; width: 46px; height: 46px; font-size: 1.3rem; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }

/* ---------------------------------------------------------------- */
/* Blog                                                               */
/* ---------------------------------------------------------------- */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
@media (max-width: 980px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .blog-grid { grid-template-columns: 1fr; } }
.blog-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; display: flex; flex-direction: column; }
.blog-card .thumb { aspect-ratio: 16/10; overflow: hidden; background: #eee; }
.blog-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.blog-card .body { padding: 20px; }
.blog-card .date { font-size: .78rem; color: var(--color-accent-dark); text-transform: uppercase; font-weight: 700; letter-spacing: .04em; }
.post-content { max-width: 760px; margin: 0 auto; font-size: 1.05rem; }
.post-content img { border-radius: var(--radius-md); margin: 20px 0; }
.post-content ul { padding-left: 20px; }
.post-hero-img { border-radius: var(--radius-md); margin-bottom: 30px; aspect-ratio: 21/9; overflow: hidden; }
.post-hero-img img { width: 100%; height: 100%; object-fit: cover; }

/* ---------------------------------------------------------------- */
/* Nosotros / valores                                                 */
/* ---------------------------------------------------------------- */
.founder-grid { display: grid; grid-template-columns: 300px 1fr; gap: 48px; align-items: center; }
@media (max-width: 760px) { .founder-grid { grid-template-columns: 1fr; } }
.founder-photo { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); border: 1px solid var(--color-border); background: var(--color-surface); }
.founder-photo img { width: 100%; height: auto; aspect-ratio: 427 / 585; object-fit: cover; object-position: top center; }
.founder-role { color: var(--color-accent-dark); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; font-size: .82rem; margin-bottom: 14px; }

.values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 760px) { .values-grid { grid-template-columns: 1fr; } }
.value-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 26px; }
.value-card .num { font-family: Georgia, serif; font-size: 1.8rem; color: var(--color-accent); font-weight: 700; }

.cta-band { background: var(--color-primary); color: #fff; border-radius: var(--radius-lg); padding: 48px; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.8); }

/* ---------------------------------------------------------------- */
/* Footer                                                             */
/* ---------------------------------------------------------------- */
.site-footer { background: var(--color-primary-dark); color: rgba(255,255,255,.8); padding: 56px 0 0; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding-bottom: 40px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.brand-footer { color: #fff; margin-bottom: 12px; }
.footer-tagline { color: rgba(255,255,255,.6); font-size: .9rem; }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: .9rem; }
.footer-links a:hover { color: #fff; }
.site-footer h4 { color: #fff; font-family: inherit; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 16px; }
.social-links { display: flex; gap: 14px; margin-top: 14px; font-size: .85rem; }
.social-links a { text-decoration: underline; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 18px 0; text-align: center; font-size: .82rem; }

/* WhatsApp flotante */
.whatsapp-fab {
  position: fixed; bottom: 24px; right: 24px; width: 58px; height: 58px; border-radius: 50%;
  background: #25D366; color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg); z-index: 60; transition: transform .15s ease;
}
.whatsapp-fab:hover { transform: scale(1.08); }

/* Utilidades */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }
