/* ============================================
   LEVIT INMOBILIARIA — Estilos globales
   ============================================ */

/* ── Reset & base ─────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-body, 'Inter', sans-serif);
    color: #222;
    background: #fff;
    line-height: 1.55;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--primary, #0d2340); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--accent, #c9a961); }
h1, h2, h3, h4 { font-family: var(--font-heading, 'Playfair Display', serif); font-weight: 600; line-height: 1.2; margin: 0 0 .5em; color: var(--primary-dark, #081729); }
h1 { font-size: clamp(2rem, 4vw + 1rem, 3.4rem); }
h2 { font-size: clamp(1.6rem, 2.5vw + .8rem, 2.4rem); }
h3 { font-size: 1.3rem; }
p  { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ── Botones ──────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 22px; border-radius: 10px; border: 1px solid transparent;
    font-weight: 500; font-size: .95rem; letter-spacing: .3px;
    cursor: pointer; transition: all .2s ease; text-decoration: none;
    white-space: nowrap;
}
.btn-primary  { background: var(--primary, #0d2340); color: #fff; }
.btn-primary:hover  { background: var(--primary-dark, #081729); color: #fff; transform: translateY(-1px); }
.btn-accent   { background: var(--accent, #c9a961); color: #fff; }
.btn-accent:hover   { background: #b3934f; color: #fff; }
.btn-outline  { background: transparent; color: var(--primary, #0d2340); border-color: var(--primary, #0d2340); }
.btn-outline:hover  { background: var(--primary, #0d2340); color: #fff; }
.btn-ghost    { background: rgba(255,255,255,.15); color: #fff; border-color: rgba(255,255,255,.3); backdrop-filter: blur(6px); }
.btn-ghost:hover    { background: rgba(255,255,255,.28); color: #fff; }
.btn-block    { width: 100%; }
.btn-lg       { padding: 15px 32px; font-size: 1rem; }

/* ── Header ───────────────────────────────── */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,.96); backdrop-filter: blur(10px);
    border-bottom: 1px solid #eaeaea;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 12px 24px; gap: 24px; }
.brand { display: inline-flex; align-items: center; color: var(--primary-dark, #081729); text-decoration: none; }
.brand-logo {
    height: 56px; width: auto; display: block;
    max-width: 100%;
    transition: opacity .2s ease;
}
.brand:hover .brand-logo { opacity: .85; }
.brand-logo-footer {
    height: 72px;
    filter: brightness(1.05);
}
/* Legacy — cuadrado con letra (queda por si se quiere alternar) */
.brand-mark {
    width: 42px; height: 42px; border-radius: 10px;
    background: var(--primary, #0d2340); color: var(--accent, #c9a961);
    display: grid; place-items: center; font-family: var(--font-heading, serif);
    font-size: 1.5rem; font-weight: 700;
}
.brand-text { display: none; }
.brand-name { font-family: var(--font-heading, serif); font-size: 1.15rem; font-weight: 600; letter-spacing: .5px; }
.brand-tag  { font-size: .72rem; color: #666; letter-spacing: 1.5px; text-transform: uppercase; }

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a { color: #333; font-size: .92rem; font-weight: 500; position: relative; }
.site-nav a::after {
    content: ''; position: absolute; left: 0; bottom: -6px;
    width: 0; height: 2px; background: var(--accent, #c9a961);
    transition: width .2s ease;
}
.site-nav a:hover::after, .site-nav a.active::after { width: 100%; }
.site-nav a.active { color: var(--primary, #0d2340); }
.site-nav .nav-cta {
    padding: 8px 18px; background: var(--primary, #0d2340); color: #fff !important;
    border-radius: 8px;
}
.site-nav .nav-cta::after { display: none; }
.site-nav .nav-cta:hover { background: var(--primary-dark, #081729); }

.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; flex-direction: column; gap: 5px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #222; transition: transform .2s ease; }

@media (max-width: 860px) {
    .nav-toggle { display: flex; }
    .brand-logo { height: 44px; }
    .site-nav {
        position: fixed; top: 68px; left: 0; right: 0;
        background: #fff; flex-direction: column; align-items: stretch; gap: 0;
        padding: 8px 0; box-shadow: 0 12px 24px rgba(0,0,0,.08);
        transform: translateY(-120%); transition: transform .25s ease;
    }
    .site-nav.open { transform: translateY(0); }
    .site-nav a { padding: 14px 24px; border-bottom: 1px solid #f0f0f0; }
    .site-nav a::after { display: none; }
    .site-nav .nav-cta { margin: 12px 24px; text-align: center; }
}

/* ── Hero ─────────────────────────────────── */
.hero {
    position: relative;
    min-height: 620px;
    display: grid; align-items: center;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(8,23,41,.75), rgba(13,35,64,.55)),
        url('https://images.unsplash.com/photo-1568605114967-8130f3a36994?auto=format&fit=crop&w=1900&q=80') center/cover;
}
.hero-inner { max-width: 720px; padding: 60px 0; }
.hero-badge {
    display: inline-block; padding: 6px 14px;
    background: rgba(201,169,97,.2); border: 1px solid var(--accent, #c9a961);
    color: var(--accent, #c9a961); font-size: .78rem; letter-spacing: 2px;
    text-transform: uppercase; border-radius: 999px; margin-bottom: 20px;
}
.hero h1 { color: #fff; margin-bottom: 20px; letter-spacing: .5px; }
.hero-subtitle { font-size: 1.15rem; opacity: .92; margin-bottom: 32px; max-width: 560px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* ── Search bar (buscador integrado hero) ── */
.search-bar {
    background: #fff; color: #222;
    border-radius: 16px; box-shadow: 0 20px 50px rgba(0,0,0,.15);
    padding: 22px; margin-top: 40px;
    display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 12px;
    max-width: 100%;
}
.search-bar .field { display: flex; flex-direction: column; gap: 4px; }
.search-bar label { font-size: .72rem; color: #666; letter-spacing: 1px; text-transform: uppercase; }
.search-bar select, .search-bar input {
    border: 0; border-bottom: 1px solid #ddd; padding: 6px 0;
    font-size: .95rem; background: transparent;
}
.search-bar select:focus, .search-bar input:focus { outline: none; border-color: var(--primary, #0d2340); }
.search-bar .btn { align-self: stretch; }
@media (max-width: 900px) {
    .search-bar { grid-template-columns: 1fr 1fr; }
    .search-bar .btn { grid-column: 1 / -1; }
}

/* ── Sección genérica ─────────────────────── */
.section { padding: 80px 0; }
.section-alt { background: #fafafa; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 50px; }
.section-head .eyebrow {
    color: var(--accent, #c9a961); font-size: .8rem; letter-spacing: 3px;
    text-transform: uppercase; margin-bottom: 12px; display: block;
}
.section-head h2 { margin-bottom: 12px; }
.section-head p { color: #666; font-size: 1.05rem; }

/* ── Grid de propiedades ──────────────────── */
.props-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}
.prop-card {
    background: #fff; border-radius: 16px; overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,.06);
    transition: transform .25s ease, box-shadow .25s ease;
    display: flex; flex-direction: column;
}
.prop-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,.12); }
.prop-media {
    position: relative;
    aspect-ratio: 4 / 3;
    background: #eee center/cover no-repeat;
    overflow: hidden;
}
.prop-badges { position: absolute; top: 14px; left: 14px; display: flex; gap: 6px; flex-wrap: wrap; }
.prop-badge {
    padding: 5px 10px; font-size: .7rem; text-transform: uppercase;
    letter-spacing: 1px; border-radius: 999px; font-weight: 600;
    background: var(--primary, #0d2340); color: #fff;
}
.prop-badge.destacado { background: var(--accent, #c9a961); }
.prop-badge.venta      { background: var(--primary, #0d2340); }
.prop-badge.alquiler   { background: #2c6e49; }
.prop-badge.alquiler_temporario { background: #6c757d; }
.prop-badge.estado {
    position: absolute; top: 14px; right: 14px;
    background: rgba(0,0,0,.7);
}
.prop-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.prop-tipo-zona {
    font-size: .78rem; color: var(--accent, #c9a961);
    letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 8px;
}
.prop-title {
    font-family: var(--font-heading, serif); font-size: 1.15rem; font-weight: 600;
    margin: 0 0 6px; color: var(--primary-dark, #081729);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.prop-address { font-size: .88rem; color: #666; margin-bottom: 14px; }
.prop-meta {
    display: flex; gap: 14px; flex-wrap: wrap;
    font-size: .82rem; color: #555; margin-bottom: 18px;
    padding-bottom: 16px; border-bottom: 1px solid #eee;
}
.prop-meta span { display: inline-flex; align-items: center; gap: 5px; }
.prop-meta i { color: var(--primary-light, #1e4275); }
.prop-footer {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: auto;
}
.prop-price {
    font-family: var(--font-heading, serif); font-size: 1.3rem;
    font-weight: 600; color: var(--primary, #0d2340);
}
.prop-price small { font-size: .75rem; color: #999; font-weight: 400; }
.prop-link { font-size: .85rem; font-weight: 500; color: var(--accent, #c9a961); }
.prop-link:hover { color: var(--primary, #0d2340); }

/* ── Filtros del listado ──────────────────── */
.filters-bar {
    background: #fff; border: 1px solid #eee; border-radius: 14px;
    padding: 20px; margin-bottom: 30px;
    display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px;
}
.filters-bar .field { display: flex; flex-direction: column; gap: 4px; }
.filters-bar label { font-size: .72rem; color: #666; letter-spacing: 1px; text-transform: uppercase; }
.filters-bar select, .filters-bar input {
    border: 1px solid #ddd; padding: 8px 10px; border-radius: 8px;
    font-size: .9rem;
}
.filters-bar .btn { align-self: flex-end; }
@media (max-width: 900px) {
    .filters-bar { grid-template-columns: 1fr 1fr; }
    .filters-bar .btn { grid-column: 1 / -1; }
}

.listing-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 20px; flex-wrap: wrap; gap: 10px;
}
.listing-count { color: #666; font-size: .9rem; }
.listing-sort select {
    border: 1px solid #ddd; border-radius: 8px; padding: 6px 10px; font-size: .88rem;
}

.empty-state {
    text-align: center; padding: 80px 20px;
    background: #fff; border-radius: 14px; border: 1px dashed #ddd;
    color: #888;
}
.empty-state i { font-size: 3rem; color: #ccc; margin-bottom: 16px; }
.empty-state h3 { color: #666; }

/* ── Detalle de propiedad ─────────────────── */
.detail-hero {
    padding-top: 24px;
}
.detail-breadcrumb { font-size: .82rem; color: #888; margin-bottom: 14px; }
.detail-breadcrumb a { color: #666; }
.detail-header {
    display: flex; justify-content: space-between; align-items: flex-start; gap: 24px;
    flex-wrap: wrap; margin-bottom: 24px;
}
.detail-title h1 { margin-bottom: 6px; }
.detail-title .address { color: #666; font-size: 1rem; }
.detail-price-block {
    text-align: right;
}
.detail-price {
    font-family: var(--font-heading, serif); font-size: 2.2rem;
    font-weight: 700; color: var(--primary, #0d2340); line-height: 1;
}
.detail-expensas { color: #666; font-size: .9rem; margin-top: 6px; }
.detail-ops { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }

.gallery {
    display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 240px 240px;
    gap: 8px; border-radius: 16px; overflow: hidden; margin-bottom: 30px;
}
.gallery .g-item {
    background: #eee center/cover no-repeat;
    cursor: pointer; transition: opacity .2s ease;
}
.gallery .g-item:hover { opacity: .9; }
.gallery .g-item:first-child { grid-row: 1 / -1; grid-column: 1; }
@media (max-width: 720px) {
    .gallery { grid-template-columns: 1fr 1fr; grid-template-rows: 200px 200px 200px; }
    .gallery .g-item:first-child { grid-column: 1 / -1; }
}

.detail-body { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; }
@media (max-width: 900px) { .detail-body { grid-template-columns: 1fr; } }
.detail-main h2 { margin-top: 40px; margin-bottom: 16px; font-size: 1.5rem; }
.detail-main h2:first-child { margin-top: 0; }
.detail-desc { color: #444; line-height: 1.7; white-space: pre-wrap; }
.detail-specs {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px; margin: 20px 0;
}
.spec {
    background: #fafafa; border-radius: 12px; padding: 14px;
    text-align: center;
}
.spec i { display: block; font-size: 1.4rem; color: var(--primary-light, #1e4275); margin-bottom: 6px; }
.spec .val { font-weight: 600; font-size: 1.05rem; color: var(--primary-dark, #081729); }
.spec .lbl { font-size: .72rem; color: #666; text-transform: uppercase; letter-spacing: 1px; }

.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    background: var(--primary-lighter, #e6ecf4); color: var(--primary, #0d2340);
    padding: 6px 12px; border-radius: 999px; font-size: .82rem;
}

.sidebar-card {
    background: #fff; border: 1px solid #eaeaea; border-radius: 16px;
    padding: 24px; position: sticky; top: 100px;
    box-shadow: 0 6px 24px rgba(0,0,0,.05);
}
.sidebar-card h3 { margin-top: 0; font-size: 1.15rem; }
.form-field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.form-field label { font-size: .78rem; color: #666; letter-spacing: 1px; text-transform: uppercase; }
.form-field input, .form-field textarea, .form-field select {
    border: 1px solid #ddd; border-radius: 8px; padding: 10px 12px;
    font-size: .95rem;
}
.form-field textarea { min-height: 90px; resize: vertical; }

.msg { padding: 12px 14px; border-radius: 10px; font-size: .9rem; margin-bottom: 14px; }
.msg-ok  { background: #e6f4ea; color: #206a3a; border: 1px solid #b6e0c1; }
.msg-err { background: #fdecea; color: #a1372c; border: 1px solid #f5c2bd; }

/* ── Servicios / Nosotros ─────────────────── */
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 28px; }
.svc-card {
    background: #fff; padding: 32px 28px; border-radius: 16px;
    border: 1px solid #eee; transition: all .2s ease;
    text-align: center;
}
.svc-card:hover { border-color: var(--accent, #c9a961); box-shadow: 0 10px 30px rgba(0,0,0,.08); transform: translateY(-3px); }
.svc-icon {
    width: 64px; height: 64px; border-radius: 50%;
    background: var(--primary-lighter, #e6ecf4); color: var(--primary, #0d2340);
    display: grid; place-items: center; font-size: 1.6rem; margin: 0 auto 18px;
}
.svc-card h3 { margin-bottom: 10px; }
.svc-card p  { color: #666; font-size: .95rem; margin: 0; }

/* ── Stats band (full-width, sin caja contenedora) ─────── */
.stats-band {
    position: relative;
    padding: 80px 24px;
    background:
        linear-gradient(135deg, rgba(8,23,41,.94), rgba(13,35,64,.94)),
        url('https://images.unsplash.com/photo-1449844908441-8829872d2607?auto=format&fit=crop&w=1900&q=80') center/cover;
    color: #fff;
    overflow: hidden;
}
.stats-band::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(8,23,41,.4) 100%);
    pointer-events: none;
}
.stats-band .container { position: relative; }
.stats-list {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px; align-items: center;
}
.stat-item {
    text-align: center;
    padding: 20px 24px;
    position: relative;
}
.stat-item + .stat-item::before {
    content: ''; position: absolute; left: 0; top: 20%; bottom: 20%;
    width: 1px; background: rgba(255,255,255,.15);
}
.stat-item .stat-icon {
    width: 52px; height: 52px; border-radius: 50%;
    background: rgba(201,169,97,.15); color: var(--accent, #c9a961);
    display: grid; place-items: center; font-size: 1.3rem;
    margin: 0 auto 16px;
    border: 1px solid rgba(201,169,97,.35);
}
.stat-item .num {
    font-family: var(--font-heading, serif); font-size: 2.6rem;
    color: var(--accent, #c9a961); font-weight: 700; line-height: 1;
    display: block; margin-bottom: 8px;
}
.stat-item .lbl {
    text-transform: uppercase; letter-spacing: 2.5px;
    font-size: .78rem; opacity: .88; color: #e0e6f0;
}
@media (max-width: 720px) {
    .stat-item + .stat-item::before { display: none; }
    .stats-band { padding: 60px 20px; }
}

/* ── CTA banner ───────────────────────────── */
.cta-banner {
    background: linear-gradient(135deg, var(--primary-dark, #081729), var(--primary, #0d2340));
    color: #fff; padding: 70px 0; text-align: center;
}
.cta-banner h2 { color: #fff; margin-bottom: 14px; }
.cta-banner p  { opacity: .9; max-width: 560px; margin: 0 auto 26px; font-size: 1.05rem; }

/* ── Footer ───────────────────────────────── */
.site-footer { background: #0a1a2e; color: #cfd6e4; padding: 60px 0 0; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1.4fr; gap: 40px; padding-bottom: 40px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; gap: 30px; } }
.footer-col h4 {
    color: #fff; font-family: var(--font-body, sans-serif); font-size: .85rem;
    letter-spacing: 2px; text-transform: uppercase; margin-bottom: 18px; font-weight: 600;
}
.footer-col a { display: block; color: #cfd6e4; font-size: .92rem; padding: 4px 0; }
.footer-col a:hover { color: var(--accent, #c9a961); }
.footer-col p { color: #cfd6e4; font-size: .9rem; display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.footer-col p i { color: var(--accent, #c9a961); margin-top: 4px; width: 16px; }
.footer-text { color: #a3adc0; }
.footer-social { display: flex; gap: 12px; margin-top: 16px; }
.footer-social a {
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(255,255,255,.08); color: #fff;
    display: grid; place-items: center; font-size: 1rem;
}
.footer-social a:hover { background: var(--accent, #c9a961); }
.footer-bottom {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 0; border-top: 1px solid rgba(255,255,255,.08);
    font-size: .8rem; color: #7c8899; flex-wrap: wrap; gap: 10px;
}
.footer-bottom a { color: var(--accent, #c9a961); }
.footer-credit { opacity: .8; }

/* ── WhatsApp bubble ──────────────────────── */
.wa-bubble {
    position: fixed; bottom: 24px; right: 24px; z-index: 90;
    width: 60px; height: 60px; border-radius: 50%;
    background: #25d366; color: #fff !important;
    display: grid; place-items: center; font-size: 1.7rem;
    box-shadow: 0 8px 24px rgba(37,211,102,.45);
    transition: transform .2s ease;
}
.wa-bubble:hover { transform: scale(1.08); color: #fff; }

/* ── Utilities ────────────────────────────── */
.text-center { text-align: center; }
.mt-lg { margin-top: 40px; }
.hidden { display: none !important; }
