/* ============================================================
   KMA PROPIEDADES — MAIN CSS
   Premium Dark Theme Real Estate
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --bg-card-hover: #243347;
    --border: #334155;
    --border-light: #475569;
    --accent: #f97316;
    --accent-hover: #fb923c;
    --accent-dim: rgba(249, 115, 22, 0.15);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --success: #10b981;
    --error: #ef4444;
    --info: #3b82f6;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.4);
    --shadow-lg: 0 20px 48px rgba(0,0,0,0.5);
    --shadow-accent: 0 8px 32px rgba(249,115,22,0.25);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --navbar-height: 70px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }

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

ul { list-style: none; }

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

h1, h2, h3, h4, h5 {
    line-height: 1.2;
    font-weight: 700;
    color: var(--text-primary);
}

/* ---------- Container ---------- */
.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-16px) rotate(3deg); }
}

@keyframes floatReverse {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(-3deg); }
}

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

@keyframes pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(251,191,36,0.6); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 14px rgba(251,191,36,0); }
}

@keyframes pulseBig {
    0%, 100% { box-shadow: 0 4px 20px rgba(37,211,102,0.5); }
    50% { box-shadow: 0 4px 40px rgba(37,211,102,0.9), 0 0 0 10px rgba(37,211,102,0.1); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes countUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- Scroll Animations ---------- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s cubic-bezier(0.4,0,0.2,1), transform 0.7s cubic-bezier(0.4,0,0.2,1);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-delay-1 { transition-delay: 0.1s; }
.animate-delay-2 { transition-delay: 0.2s; }
.animate-delay-3 { transition-delay: 0.3s; }
.animate-delay-4 { transition-delay: 0.4s; }
.animate-delay-5 { transition-delay: 0.5s; }

/* ---------- Navbar ---------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--navbar-height);
    transition: background var(--transition), backdrop-filter var(--transition), border-color var(--transition);
}

.site-header.scrolled {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--navbar-height);
    gap: 24px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.navbar-logo {
    max-height: 52px;
    width: auto;
    height: auto;
    display: block;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
    background: rgba(255,255,255,0.06);
}

.nav-link.active {
    color: var(--accent);
}

.navbar-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    padding: 8px;
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition);
}

.navbar-toggle:hover {
    background: rgba(255,255,255,0.06);
    border-color: var(--accent);
}

.nav-whatsapp {
    margin-left: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.05rem;
    border-radius: var(--radius-lg);
}

.btn-accent {
    background: var(--accent);
    color: #1a1100;
    font-weight: 700;
}

.btn-accent:hover {
    background: var(--accent-hover);
    color: #1a1100;
    box-shadow: var(--shadow-accent);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-dim);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    padding: 8px;
}

.btn-ghost:hover {
    color: var(--accent);
    background: var(--accent-dim);
}

.btn-whatsapp {
    background: #25d366;
    color: #fff;
    font-weight: 700;
}

.btn-whatsapp:hover {
    background: #22c55e;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37,211,102,0.35);
}

/* ---------- Main Content Offset ---------- */
.main-content {
    padding-top: var(--navbar-height);
}

/* ---------- Hero Section ---------- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a 0%, #0d1c35 50%, #1a1040 100%);
    margin-top: calc(-1 * var(--navbar-height));
    padding-top: var(--navbar-height);
}

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.2;
}

.hero-orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #f97316, transparent 70%);
    top: -200px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.hero-orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #3b82f6, transparent 70%);
    bottom: -100px;
    left: -100px;
    animation: floatReverse 10s ease-in-out infinite;
}

.hero-orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #8b5cf6, transparent 70%);
    top: 40%;
    left: 30%;
    animation: float 12s ease-in-out infinite;
    opacity: 0.1;
}

.hero-grid-pattern {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 80px 0;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-dim);
    border: 1px solid rgba(245,158,11,0.3);
    color: var(--accent);
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
    animation: fadeInUp 0.8s ease both;
}

.hero-badge-dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.hero-title {
    font-size: clamp(2.4rem, 5.5vw, 4.5rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 20px;
    animation: fadeInUp 0.8s 0.1s ease both;
}

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

.hero-subtitle {
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    color: var(--text-secondary);
    max-width: 580px;
    margin-bottom: 40px;
    line-height: 1.7;
    animation: fadeInUp 0.8s 0.2s ease both;
}

/* Hero Search Box */
.hero-search {
    background: rgba(30,41,59,0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 8px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    max-width: 720px;
    animation: fadeInUp 0.8s 0.3s ease both;
    box-shadow: var(--shadow-lg);
}

.hero-search-field {
    flex: 1;
    min-width: 180px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: border-color var(--transition);
    outline: none;
}

.hero-search-field:focus {
    border-color: var(--accent);
    background: rgba(245,158,11,0.05);
}

.hero-search-field option {
    background: var(--bg-secondary);
}

.hero-search-btn {
    padding: 12px 24px;
    border-radius: var(--radius-md);
    white-space: nowrap;
}

.hero-stats {
    display: flex;
    gap: 32px;
    margin-top: 48px;
    animation: fadeInUp 0.8s 0.4s ease both;
    flex-wrap: wrap;
}

.hero-stat {
    text-align: center;
}

.hero-stat-num {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--accent);
    line-height: 1;
    display: block;
}

.hero-stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 4px;
    display: block;
}

/* ---------- Sections ---------- */
.section {
    padding: 96px 0;
}

.section-sm {
    padding: 64px 0;
}

.section-alt {
    background: var(--bg-secondary);
}

.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-tag {
    display: inline-block;
    background: var(--accent-dim);
    color: var(--accent);
    border: 1px solid rgba(251,191,36,0.25);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ---------- Property Cards ---------- */
.property-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.property-card {
    background: rgba(30, 41, 59, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    position: relative;
}

.property-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.property-card-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--bg-primary);
    cursor: pointer;
}

.property-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4,0,0.2,1);
}

.property-card:hover .property-card-image img {
    transform: scale(1.08);
}

.property-card-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    z-index: 2;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-venta { background: rgba(245,158,11,0.9); color: #1a1100; }
.badge-alquiler { background: rgba(59,130,246,0.9); color: #fff; }
.badge-destacada {
    background: rgba(245,158,11,0.15);
    color: var(--accent);
    border: 1px solid rgba(245,158,11,0.4);
    backdrop-filter: blur(10px);
}

.badge-tipo {
    background: rgba(30,41,59,0.9);
    color: var(--text-secondary);
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
}

.badge-success { background: rgba(16,185,129,0.2); color: #34d399; border: 1px solid rgba(16,185,129,0.3); }
.badge-info { background: rgba(59,130,246,0.2); color: #60a5fa; border: 1px solid rgba(59,130,246,0.3); }
.badge-warning { background: rgba(249,115,22,0.2); color: var(--accent); border: 1px solid rgba(249,115,22,0.3); }
.badge-danger { background: rgba(239,68,68,0.2); color: #f87171; border: 1px solid rgba(239,68,68,0.3); }
.badge-muted { background: rgba(100,116,139,0.2); color: var(--text-muted); border: 1px solid var(--border); }

.property-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(15,23,42,0.8) 100%);
    pointer-events: none;
}

.property-card-body {
    padding: 20px;
}

.property-card-price {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--accent);
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    display: block;
}

.property-card-title {
    font-size: 1.0rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.property-card-location {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.property-card-features {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    border-top: 1px solid var(--border);
    padding-top: 14px;
}

.property-feature {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.property-feature svg {
    color: var(--accent);
    flex-shrink: 0;
}

.property-card-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0,0,0,0.15);
}

.property-card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent);
    font-size: 0.87rem;
    font-weight: 600;
    transition: gap var(--transition);
}

.property-card-link:hover {
    gap: 10px;
}

/* ---------- Stats Bar ---------- */
.stats-bar {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 40px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    text-align: center;
}

.stat-item {
    position: relative;
    padding: 24px 16px;
}

.stat-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 25%;
    height: 50%;
    width: 1px;
    background: var(--border);
}

.stat-number {
    font-size: 2.8rem;
    font-weight: 900;
    color: var(--accent);
    letter-spacing: -0.03em;
    display: block;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 8px;
    display: block;
}

/* ---------- Page Header ---------- */
.page-header {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    border-bottom: 1px solid var(--border);
    padding: 48px 0 40px;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(245,158,11,0.08), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.page-header-tag {
    display: inline-block;
    background: var(--accent-dim);
    color: var(--accent);
    padding: 4px 14px;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
}

.page-header-title {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 900;
    letter-spacing: -0.03em;
}

.page-header-desc {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-top: 12px;
}

/* ---------- Filters & Layout (venta/alquiler) ---------- */
.listings-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    align-items: start;
    padding: 48px 0;
}

.filters-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    position: sticky;
    top: calc(var(--navbar-height) + 16px);
}

.filter-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
}

.filter-group {
    margin-bottom: 20px;
}

.filter-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

.filter-input, .filter-select {
    width: 100%;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: border-color var(--transition);
    outline: none;
}

.filter-input:focus, .filter-select:focus {
    border-color: var(--accent);
}

.filter-select option { background: var(--bg-secondary); }

.filter-price-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.filter-actions {
    display: flex;
    gap: 8px;
    margin-top: 20px;
    border-top: 1px solid var(--border);
    padding-top: 20px;
}

.filter-actions .btn {
    flex: 1;
    padding: 10px;
    font-size: 0.85rem;
}

/* ---------- Results Header ---------- */
.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.results-count {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

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

/* ---------- Pagination ---------- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 48px;
    flex-wrap: wrap;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.page-btn:hover, .page-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #1a1100;
}

.page-btn.active {
    pointer-events: none;
}

/* ---------- Empty State ---------- */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
}

.empty-state svg {
    margin: 0 auto 20px;
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

/* ---------- Loading Skeleton ---------- */
.skeleton {
    background: linear-gradient(90deg, var(--bg-card) 25%, rgba(255,255,255,0.05) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

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

/* ---------- Property Detail ---------- */
.property-detail-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    padding: 48px 0;
    align-items: start;
}

.gallery-main {
    aspect-ratio: 16/9;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-secondary);
    position: relative;
    cursor: pointer;
    border: 1px solid var(--border);
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-main:hover img { transform: scale(1.03); }

.gallery-zoom-hint {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(10px);
    color: #fff;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    gap: 6px;
    pointer-events: none;
}

.gallery-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.gallery-thumb {
    width: 80px;
    height: 60px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color var(--transition), transform var(--transition);
    flex-shrink: 0;
}

.gallery-thumb:hover { border-color: var(--accent); transform: scale(1.05); }
.gallery-thumb.active { border-color: var(--accent); }

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

.detail-price {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--accent);
    letter-spacing: -0.03em;
    margin: 16px 0;
}

.detail-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.detail-location {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 24px;
}

.detail-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.detail-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 24px 0;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.detail-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
}

.detail-feature-icon {
    width: 36px;
    height: 36px;
    background: var(--accent-dim);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    flex-shrink: 0;
}

.detail-feature-info small {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

.detail-feature-info span {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.detail-desc {
    font-size: 0.97rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-top: 20px;
    padding: 24px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.detail-desc h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

/* Sidebar */
.contact-sidebar {
    position: sticky;
    top: calc(var(--navbar-height) + 16px);
}

.contact-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
}

.contact-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

/* ---------- Forms ---------- */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 11px 14px;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: border-color var(--transition), background var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--accent);
    background: rgba(245,158,11,0.04);
}

.form-control::placeholder { color: var(--text-muted); }

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.form-control option { background: var(--bg-secondary); }

.form-error {
    color: var(--error);
    font-size: 0.82rem;
    margin-top: 4px;
}

.form-success-msg {
    background: rgba(16,185,129,0.1);
    border: 1px solid rgba(16,185,129,0.3);
    color: #34d399;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.form-error-msg {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.3);
    color: #f87171;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

/* ---------- About Section (index) ---------- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.about-image-stack {
    position: relative;
    height: 440px;
}

.about-img-main {
    width: 75%;
    height: 340px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 2px solid var(--border);
    position: absolute;
    top: 0;
    left: 0;
    background: var(--bg-secondary);
}

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

.about-img-secondary {
    width: 55%;
    height: 220px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 2px solid var(--accent);
    position: absolute;
    bottom: 0;
    right: 0;
    background: var(--bg-secondary);
    box-shadow: var(--shadow-accent);
}

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

.about-years {
    position: absolute;
    bottom: 70px;
    left: 60%;
    transform: translateX(-50%);
    background: var(--accent);
    color: #1a1100;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    text-align: center;
    font-weight: 900;
    box-shadow: var(--shadow-accent);
    z-index: 2;
}

.about-years-num { font-size: 2rem; line-height: 1; }
.about-years-text { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; }

.about-text h2 {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.8;
}

.about-values {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 24px 0;
}

.about-value {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.about-value-icon {
    width: 32px;
    height: 32px;
    background: var(--accent-dim);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    flex-shrink: 0;
}

.about-value h4 {
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.about-value p {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

/* ---------- CTA Section ---------- */
.cta-section {
    background: linear-gradient(135deg, rgba(245,158,11,0.1) 0%, rgba(251,191,36,0.05) 100%);
    border: 1px solid rgba(245,158,11,0.2);
    border-radius: var(--radius-xl);
    padding: 64px 48px;
    text-align: center;
    margin: 80px 0;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(245,158,11,0.12), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.cta-section h2 {
    font-size: clamp(1.6rem, 3.5vw, 2.5rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.cta-section p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 480px;
    margin: 0 auto 32px;
    line-height: 1.7;
}

.cta-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ---------- Contact Page ---------- */
.contact-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 40px;
}

.contact-info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: border-color var(--transition), transform var(--transition);
}

.contact-info-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.contact-info-icon {
    width: 44px;
    height: 44px;
    background: var(--accent-dim);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    flex-shrink: 0;
}

.contact-info-text h4 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}

.contact-info-text p {
    color: var(--text-primary);
    font-size: 0.95rem;
}

.contact-info-text a {
    color: var(--accent);
}

.map-placeholder {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 80px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 40px;
}

.map-placeholder-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 30px 30px;
}

.map-placeholder-pin {
    width: 60px;
    height: 60px;
    background: var(--accent-dim);
    border: 2px solid var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    margin: 0 auto 16px;
    position: relative;
    z-index: 1;
    animation: pulse 2s ease-in-out infinite;
}

.contact-form-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}

/* ---------- Nosotros ---------- */
.nosotros-hero {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    border-bottom: 1px solid var(--border);
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.team-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    transition: transform var(--transition), border-color var(--transition);
}

.team-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent);
}

.team-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 16px;
    background: var(--accent-dim);
    border: 2px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.8rem;
    font-weight: 900;
}

.team-card h3 {
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.team-card .role {
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
}

.team-card p {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.6;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.value-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.value-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.value-icon {
    width: 56px;
    height: 56px;
    background: var(--accent-dim);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    margin: 0 auto 20px;
}

.value-card h3 { font-size: 1.05rem; margin-bottom: 12px; }
.value-card p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.7; }

/* ---------- WhatsApp Float ---------- */
.whatsapp-float {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 999;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37,211,102,0.5);
    transition: transform var(--transition);
    animation: pulseBig 2.5s ease-in-out infinite;
}

.whatsapp-float:hover {
    transform: scale(1.12);
    color: #fff;
}

/* ---------- Lightbox ---------- */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.95);
    align-items: center;
    justify-content: center;
}

.lightbox.active { display: flex; animation: fadeIn 0.2s ease; }

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    position: relative;
    text-align: center;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--radius-md);
}

.lightbox-caption {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 12px;
}

.lightbox-counter {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 6px;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: fixed;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--transition);
    backdrop-filter: blur(10px);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(245,158,11,0.3); }

.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }

/* ---------- Spinner ---------- */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255,255,255,0.2);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 72px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--border);
}

.footer-logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    margin-bottom: 16px;
}

.footer-logo {
    max-height: 64px;
    width: auto;
    height: auto;
    display: block;
}

.footer-desc {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.footer-heading {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color var(--transition);
}

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

.footer-contact-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--text-muted);
    font-size: 0.87rem;
    line-height: 1.5;
}

.footer-contact-list li svg {
    color: var(--accent);
    flex-shrink: 0;
    margin-top: 2px;
}

.btn-whatsapp-footer {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #25d366;
    color: #fff;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 700;
    transition: all var(--transition);
}

.btn-whatsapp-footer:hover {
    background: #22c55e;
    color: #fff;
    transform: translateY(-2px);
}

.footer-bottom {
    padding: 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-bottom p { font-size: 0.83rem; color: var(--text-muted); }
.footer-bottom-links a { color: var(--text-muted); font-size: 0.83rem; }
.footer-bottom-links a:hover { color: var(--accent); }
.footer-address-pin { font-size: 0.85rem; color: var(--text-secondary); display: inline-block; }

/* Footer social icons */
.footer-social { display: flex; gap: 10px; margin-top: 14px; }
.footer-social-link {
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px;
    border: 1px solid var(--border); border-radius: 8px;
    color: var(--text-secondary); transition: all 0.2s;
}
.footer-social-link:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }

/* Navbar social icons */
.nav-social-icons { display: flex; align-items: center; gap: 4px; }
.nav-social-icon {
    display: flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 6px;
    color: var(--text-secondary); transition: all 0.2s;
}
.nav-social-icon:hover { color: var(--accent); background: rgba(245,158,11,0.1); }

/* ---------- Alerts ---------- */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.alert-success {
    background: rgba(16,185,129,0.1);
    border: 1px solid rgba(16,185,129,0.3);
    color: #34d399;
}

.alert-error {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.3);
    color: #f87171;
}

.alert-info {
    background: rgba(59,130,246,0.1);
    border: 1px solid rgba(59,130,246,0.3);
    color: #60a5fa;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .property-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .about-grid { gap: 40px; }
}

@media (max-width: 900px) {
    .listings-layout { grid-template-columns: 1fr; }
    .filters-sidebar { position: static; }
    .property-detail-layout { grid-template-columns: 1fr; }
    .contact-sidebar { position: static; }
    .team-grid { grid-template-columns: 1fr 1fr; }
    .values-grid { grid-template-columns: 1fr 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .about-grid { grid-template-columns: 1fr; }
    .about-image-stack { height: 280px; }
    .contact-form-section { grid-template-columns: 1fr; }
    .contact-info-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .section { padding: 64px 0; }
    .property-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }

    .navbar-nav {
        display: none;
        position: fixed;
        top: var(--navbar-height);
        left: 0;
        right: 0;
        background: rgba(15,23,42,0.97);
        backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border);
        padding: 16px;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        animation: slideDown 0.2s ease;
        z-index: 999;
    }

    .navbar-nav.open { display: flex; }

    .nav-link { padding: 12px 16px; border-radius: var(--radius-sm); }

    .nav-whatsapp { margin-left: 0; justify-content: center; margin-top: 8px; }

    .navbar-toggle { display: flex; }

    .hero-title { font-size: 2rem; }
    .hero-stats { gap: 20px; }
    .hero-search { padding: 8px; flex-direction: column; }
    .hero-search-field { min-width: unset; }
    .hero-search-btn { width: 100%; }

    .stats-grid { grid-template-columns: 1fr 1fr; }
    .stat-item:nth-child(2)::after,
    .stat-item:nth-child(4)::after { display: none; }

    .team-grid { grid-template-columns: 1fr; }
    .values-grid { grid-template-columns: 1fr; }
    .about-values { grid-template-columns: 1fr; }
    .detail-features { grid-template-columns: 1fr 1fr; }
    .cta-section { padding: 48px 24px; }
}

@media (max-width: 480px) {
    .section { padding: 48px 0; }
    .detail-features { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
    .stat-item::after { display: none; }
    .pagination { gap: 4px; }
    .page-btn { width: 36px; height: 36px; font-size: 0.82rem; }
}

/* ---------- Nosotros timeline ---------- */
.timeline {
    position: relative;
    padding-left: 32px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent), transparent);
}

.timeline-item {
    position: relative;
    padding-bottom: 32px;
}

.timeline-dot {
    position: absolute;
    left: -28px;
    top: 4px;
    width: 14px;
    height: 14px;
    background: var(--accent);
    border-radius: 50%;
    border: 2px solid var(--bg-primary);
}

.timeline-year {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}

.timeline-content h4 { font-size: 0.95rem; margin-bottom: 4px; }
.timeline-content p { font-size: 0.85rem; color: var(--text-secondary); }

/* ---------- Misc utilities ---------- */
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.78rem; }
.fw-bold { font-weight: 700; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: 16px; }
.mb-8 { margin-bottom: 32px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.w-100 { width: 100%; }

/* Hero Carousel */
.hero-carousel { position: absolute; inset: 0; z-index: 0; }
.hero-slide {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    opacity: 0; transition: opacity 1s ease;
}
.hero-slide.active { opacity: 1; }
.carousel-dots {
    position: absolute; bottom: 90px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 8px; z-index: 10;
}
.carousel-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: rgba(255,255,255,0.4); border: none; cursor: pointer;
    transition: all 0.3s; padding: 0;
}
.carousel-dot.active { background: var(--accent); width: 24px; border-radius: 4px; }
.carousel-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
    color: white; width: 44px; height: 44px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 10; transition: all 0.3s;
    backdrop-filter: blur(4px);
}
.carousel-arrow:hover { background: var(--accent); border-color: var(--accent); }
.carousel-prev { left: 24px; }
.carousel-next { right: 24px; }
