/* ===================================
   SAN EMILIO PROPIEDADES
   Premium Real Estate Platform
   ================================= */

/* ===== CSS VARIABLES ===== */
:root {
    /* Colors - Navy + Orange + Cream */
    --navy-900: #0B1A2E;
    --navy-800: #152844;
    --navy-700: #1F3654;
    --navy-600: #2C4A6E;
    --navy-500: #3A5A7C;

    --orange-primary: #FF6B35;
    --orange-light: #FF8A5C;
    --orange-dark: #E65528;

    --cream-bg: #F8F5F0;
    --cream-light: #FFFBF5;
    --pearl-gray: #E8E6E3;
    --pearl-dark: #D4D2CF;

    --white: #FFFFFF;
    --text-primary: #2A2A2A;
    --text-secondary: #5A5A5A;
    --text-tertiary: #7A7A7A;

    /* Typography */
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --container-max: 1280px;
    --section-padding: 100px;
    --section-padding-mobile: 60px;

    /* Effects */
    /* Effects Clean & Premium */
    --transition-base: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-slow: 0.6s cubic-bezier(0.22, 1, 0.36, 1);

    --shadow-sm: 0 2px 4px rgba(11, 26, 46, 0.04), 0 1px 2px rgba(11, 26, 46, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(11, 26, 46, 0.08), 0 4px 6px -2px rgba(11, 26, 46, 0.04);
    --shadow-lg: 0 20px 25px -5px rgba(11, 26, 46, 0.1), 0 10px 10px -5px rgba(11, 26, 46, 0.04);
    --shadow-premium: 0 25px 50px -12px rgba(11, 26, 46, 0.15);

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
}

/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background: var(--cream-bg);
    color: var(--text-primary);
    line-height: 1.7;
    font-size: 16px;
}

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

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-base);
}

button {
    border: none;
    background: none;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-base);
}

/* ===== TYPOGRAPHY ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-serif);
    font-weight: 600;
    line-height: 1.2;
    color: var(--navy-900);
}

h1 {
    font-size: clamp(36px, 5vw, 56px);
}

h2 {
    font-size: clamp(32px, 4vw, 44px);
}

h3 {
    font-size: clamp(24px, 3vw, 32px);
}

h4 {
    font-size: clamp(20px, 2.5vw, 26px);
}

p {
    margin-bottom: 1em;
}

.highlight {
    color: var(--orange-primary);
}

/* ===== UTILITIES ===== */
.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.sticky-sidebar {
    position: -webkit-sticky;
    position: sticky;
    top: 100px;
    height: fit-content;
}

.text-gradient {
    background: linear-gradient(135deg, var(--navy-900), var(--navy-600));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ===== UTILITIES ===== */
/* .page-header completo en la sección CATALOG PAGE (línea ~1052) */

/* Fade Animations — diferenciadas por tipo */
[data-fade-in] { opacity: 1 !important; visibility: visible !important; }

[data-fade-up] { opacity: 1 !important; visibility: visible !important; transform: none !important; }

/* Visible state now handled by defaults */

/* ===== HEADER — Premium Redesign ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #0B1A2E;
    border-bottom: 1px solid rgba(255, 107, 53, 0.18);
    transition: box-shadow 0.3s ease;
}

.header.scrolled {
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.55);
}

/* ── Navbar bar ── */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    padding: 0 16px;
}

/* ── Logo ── */
.logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    transition: opacity 0.2s;
    text-decoration: none;
}

.logo:hover {
    opacity: 0.85;
}

.logo img {
    height: 56px;
    width: auto;
    object-fit: contain;
    display: block;
    transition: transform var(--transition-base);
}

/* ── Nav Menu ── */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu>li>a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--orange-primary);
    border-radius: 8px;
    position: relative;
    transition: color 0.2s, background 0.2s;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.nav-menu>li>a::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 14px;
    width: 0;
    height: 2px;
    background: var(--orange-primary);
    border-radius: 2px;
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-menu>li>a:hover,
.nav-menu>li>a.active {
    color: #fff;
    background: rgba(255, 107, 53, 0.14);
}

.nav-menu>li>a:hover::after,
.nav-menu>li>a.active::after {
    width: calc(100% - 28px);
}

/* ── Dropdown ── */
.dropdown {
    position: relative;
}

.dropdown::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 0;
    width: 100%;
    height: 15px;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    background: #152844;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
    padding: 8px;
    min-width: 220px;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    pointer-events: none;
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    font-size: 13.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
}

.dropdown-menu a:hover {
    background: rgba(255, 107, 53, 0.18);
    color: var(--orange-primary);
}

.dropdown-menu a::after {
    display: none;
}

/* ── Header Actions ── */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    background: var(--orange-primary);
    color: #fff;
    font-weight: 700;
    font-size: 13.5px;
    border-radius: 10px;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 16px rgba(255, 107, 53, 0.35);
    white-space: nowrap;
    text-decoration: none;
}

.header-cta:hover {
    background: var(--orange-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(255, 107, 53, 0.45);
    color: #fff;
}

/* ── Mobile Toggle (Hamburger) ── */
.mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.mobile-toggle:hover {
    background: rgba(255, 255, 255, 0.13);
}

.mobile-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #FF6B35;
    border-radius: 2px;
    transform-origin: center;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s;
}

.mobile-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.mobile-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── Mobile Menu ── */
@media (max-width: 1023px) {
    .mobile-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        display: flex;
        /* siempre flex — max-height:0 oculta el contenido */
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        background: #0f2035;
        border-top: 1px solid rgba(255, 107, 53, 0.2);
        border-bottom: 3px solid rgba(255, 107, 53, 0.25);
        padding: 0 16px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s;
        pointer-events: none;
    }

    .nav-menu.is-open {
        display: flex;
        /* explícito — sobrescribe cualquier regla legacy */
        max-height: 520px;
        pointer-events: auto;
        padding: 10px 16px 18px;
    }

    .nav-menu>li>a {
        width: 100%;
        padding: 13px 16px;
        font-size: 15px;
        border-radius: 10px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-menu>li:last-child>a {
        border-bottom: none;
    }

    .nav-menu>li>a::after {
        display: none;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        pointer-events: auto;
        background: rgba(255, 255, 255, 0.05);
        border: none;
        border-radius: 10px;
        box-shadow: none;
        padding: 4px 0 4px 8px;
        margin-top: 2px;
        display: none;
        min-width: 0;
    }

    .dropdown.is-open .dropdown-menu {
        display: block;
    }

    .header-cta {
        display: none;
    }
}




/* ===== BUTTONS ===== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: var(--orange-primary);
    color: var(--white);
    font-weight: 600;
    font-size: 15px;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--orange-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.3);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: transparent;
    color: var(--navy-900);
    font-weight: 600;
    font-size: 15px;
    border: 2px solid var(--navy-900);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.btn-secondary:hover {
    background: var(--navy-900);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-large {
    padding: 18px 36px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* ===== HERO HOME ===== */
.hero-home {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 80px 0 200px;
    display: flex;
    align-items: flex-start;
}

.hero-text {
    max-width: 700px;
    padding: 40px 48px;
    background: linear-gradient(135deg, rgba(11, 26, 46, 0.75), rgba(11, 26, 46, 0.55));
    backdrop-filter: blur(8px);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-title {
    font-size: clamp(38px, 5.5vw, 64px);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 20px;
    color: var(--white);
    text-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
    letter-spacing: -0.5px;
}

.hero-description {
    font-size: clamp(16px, 1.8vw, 19px);
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 0;
    line-height: 1.6;
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.4);
    font-weight: 400;
}

/* Slider Controls */
.slider-controls {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 24px;
    z-index: 3;
}

.slider-arrow {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: all var(--transition-base);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.slider-arrow:hover {
    background: var(--orange-primary);
    border-color: var(--orange-primary);
    transform: scale(1.1);
}

.slider-dots {
    display: flex;
    gap: 12px;
}

.dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 4px;
    /* Animar width y border-radius para la pill animation */
    transition:
        width 0.4s cubic-bezier(0.22, 1, 0.36, 1),
        background 0.3s ease,
        transform 0.2s ease;
    cursor: pointer;
}

.dot.active {
    background: var(--orange-primary);
    width: 28px;
}

.dot:hover:not(.active) {
    background: rgba(255, 255, 255, 0.75);
    transform: scale(1.25);
}

/* Hero Search */
.hero-search {
    position: absolute;
    bottom: 60px;
    left: 0;
    right: 0;
    z-index: 3;
}

.search-box {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-xl);
    box-shadow: 0 16px 64px rgba(11, 26, 46, 0.25);
    padding: 36px 40px;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.search-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--pearl-gray);
    padding-bottom: 16px;
}

.search-tab {
    padding: 10px 24px;
    font-weight: 600;
    font-size: 15px;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
}

.search-tab.active {
    background: var(--orange-primary);
    color: var(--white);
}

.search-form {
    display: grid;
    grid-template-columns: 2fr 2fr 1.2fr 1.2fr auto;
    gap: 16px;
    align-items: end;
}

.search-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-field input,
.search-field select {
    padding: 14px 16px;
    border: 1.5px solid var(--pearl-gray);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--white);
    transition: all var(--transition-base);
}

.search-field input:focus,
.search-field select:focus {
    outline: none;
    border-color: var(--orange-primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.btn-search {
    padding: 14px 28px;
    background: var(--navy-900);
    color: var(--white);
    font-weight: 600;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-base);
}

.btn-search:hover {
    background: var(--orange-primary);
    transform: translateY(-2px);
}

/* ===== SECTIONS ===== */
section {
    padding: var(--section-padding) 0;
}

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

.section-title {
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

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

/* ===== PROPERTIES FEATURED ===== */
.properties-featured {
    background: var(--white);
}

.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 32px;
}

.property-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(11, 26, 46, 0.06);
    /* Transiciones separadas — transform en GPU, shadow en CPU */
    transition:
        transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    border: 1px solid var(--pearl-gray);
    will-change: transform;
}

.property-card:hover {
    transform: translateY(-10px);
    /* Shadow doble simula altura real del elemento levitado */
    box-shadow: 0 20px 40px rgba(11, 26, 46, 0.12), 0 8px 16px rgba(11, 26, 46, 0.07);
}

.property-image-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
}

.property-image {
    width: 100%;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

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

.property-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 6px 14px;
    background: var(--orange-primary);
    color: var(--white);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--radius-sm);
}

.badge-new {
    background: var(--navy-900);
}

.badge-opportunity {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.property-favorite {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    opacity: 0;
    transition: all var(--transition-base);
}

.property-card:hover .property-favorite {
    opacity: 1;
}

.property-favorite:hover {
    background: var(--orange-primary);
    color: var(--white);
    transform: scale(1.1);
}

.property-content {
    padding: 24px;
}

.property-price {
    font-family: var(--font-serif);
    font-size: 28px;
    font-weight: 700;
    color: var(--navy-900);
    margin-bottom: 12px;
}

.property-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.property-location {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
}

.property-features {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-top: 1px solid var(--pearl-gray);
    border-bottom: 1px solid var(--pearl-gray);
    margin-bottom: 20px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.btn-ver-detalles {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 24px;
    background: transparent;
    color: var(--navy-900);
    font-weight: 600;
    font-size: 15px;
    border: 2px solid var(--navy-900);
    border-radius: var(--radius-sm);
    opacity: 0;
    transform: translateY(10px);
    transition: all var(--transition-base);
}

.property-card:hover .btn-ver-detalles {
    opacity: 1;
    transform: translateY(0);
}

.btn-ver-detalles:hover {
    background: var(--navy-900);
    color: var(--white);
}

/* ===== WHY US (PILLARS) ===== */
.why-us {
    background: var(--cream-light);
}

.pillars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}

.pillar-card {
    text-align: center;
    padding: 40px 32px;
    background: var(--white);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    border: 1px solid var(--pearl-gray);
}

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

.pillar-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, var(--cream-bg), var(--pearl-gray));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--navy-900);
    transition: all var(--transition-base);
}

.pillar-card:hover .pillar-icon {
    background: var(--orange-primary);
    color: var(--white);
    transform: scale(1.05);
}

.pillar-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--navy-900);
}

.pillar-description {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===== TESTIMONIALS ===== */
.testimonials {
    background: var(--white);
}

.testimonials-carousel {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 80px;
}

.testimonials-wrapper {
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.testimonial-track {
    display: flex;
    transition: transform var(--transition-slow);
}

.testimonial-card {
    min-width: 100%;
    padding: 48px;
    background: var(--cream-light);
    border-radius: var(--radius-lg);
}

.testimonial-stars {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
}

.testimonial-text {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-primary);
    margin-bottom: 32px;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 16px;
}

.author-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--white);
    font-size: 18px;
}

.author-name {
    font-weight: 700;
    font-size: 16px;
    color: var(--navy-900);
}

.author-role {
    font-size: 14px;
    color: var(--text-secondary);
}

.testimonial-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: var(--white);
    border: 2px solid var(--pearl-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--navy-900);
    transition: all var(--transition-base);
}

.testimonial-prev {
    left: 0;
}

.testimonial-next {
    right: 0;
}

.testimonial-arrow:hover {
    background: var(--orange-primary);
    border-color: var(--orange-primary);
    color: var(--white);
}

/* ===== CTA FINAL ===== */
.cta-final {
    background: linear-gradient(135deg, var(--navy-900), var(--navy-600));
    color: var(--white);
    text-align: center;
}

.cta-title {
    font-size: clamp(32px, 4vw, 48px);
    color: var(--white);
    margin-bottom: 16px;
}

.cta-description {
    font-size: 18px;
    color: var(--cream-light);
    margin-bottom: 40px;
}

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

/* ===== FOOTER ===== */
.footer {
    background: var(--navy-900);
    color: var(--cream-light);
    padding: 80px 0 32px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 2fr;
    gap: 64px;
    margin-bottom: 48px;
}

.footer-tagline {
    color: var(--text-tertiary);
    margin: 16px 0 24px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
}

.footer-social a:hover {
    background: var(--orange-primary);
    transform: translateY(-4px);
}

.footer-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.footer-column h4 {
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
    color: var(--white);
}

.footer-column a {
    display: block;
    color: var(--cream-light);
    font-size: 14px;
    margin-bottom: 12px;
    transition: all var(--transition-base);
}

.footer-column a:hover {
    color: var(--orange-primary);
    padding-left: 4px;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-tertiary);
    font-size: 14px;
}

.footer-legal {
    display: flex;
    gap: 24px;
}

.footer-legal a:hover {
    color: var(--orange-primary);
}

/* ===== PAGE HEADER (EDITORIAL & MINIMALIST) ===== */
.page-header {
    padding: 220px 0 80px;
    background-color: var(--cream-bg);
    border-bottom: 1px solid var(--pearl-dark);
    text-align: left;
}

.page-header .catalog-header-container {
    position: relative;
    z-index: 2;
    padding: 0 32px; /* Alineado justo con el borde del sidebar */
    margin: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.page-title {
    color: var(--navy-900);
    margin-bottom: 24px;
    font-size: clamp(52px, 7vw, 84px);
    font-weight: 500;
    letter-spacing: -2px;
    line-height: 1.05;
    font-family: var(--font-serif);
}

.page-subtitle {
    font-size: clamp(22px, 3vw, 28px);
    color: var(--navy-700);
    max-width: 800px;
    font-weight: 400;
    line-height: 1.5;
    margin: 0;
}

/* ===== CATALOG SECTION ===== */
.catalog-section {
    padding: 60px 0 100px;
    background: var(--cream-bg);
}

.catalog-wrapper {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    align-items: start;
}

/* Sidebar Filters */
.catalog-sidebar {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px;
    position: sticky;
    top: 100px;
    box-shadow: var(--shadow-sm);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--pearl-gray);
}

.sidebar-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.btn-reset-filters {
    font-size: 13px;
    font-weight: 600;
    color: var(--orange-primary);
    text-decoration: underline;
}

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

.filter-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.filter-select,
.filter-input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--pearl-gray);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--white);
    transition: all var(--transition-base);
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: var(--orange-primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-option,
.checkbox-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: background var(--transition-base);
}

.radio-option:hover,
.checkbox-option:hover {
    background: var(--cream-bg);
}

.radio-option input,
.checkbox-option input {
    accent-color: var(--orange-primary);
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.price-separator {
    color: var(--text-secondary);
}

.number-selector {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.number-btn {
    padding: 10px;
    border: 1.5px solid var(--pearl-gray);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    transition: all var(--transition-base);
}

.number-btn:hover,
.number-btn.active {
    background: var(--orange-primary);
    border-color: var(--orange-primary);
    color: var(--white);
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ── Price Range Double Slider ──────────────────────────────── */
.price-range-slider {
    position: relative;
    height: 36px;
    display: flex;
    align-items: center;
    /* CSS vars set by JS */
    --range-low:  0%;
    --range-high: 100%;
}

.price-range-slider input[type="range"] {
    position: absolute;
    width: 100%;
    left: 0;
    height: 4px;
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
    pointer-events: none;
}

/* Track behind both sliders */
.price-range-slider::before {
    content: '';
    position: absolute;
    left: 0; right: 0;
    height: 4px;
    background: var(--pearl-gray);
    border-radius: 2px;
    z-index: 0;
}

/* Filled track between thumbs — painted via background on the wrapper */
.price-range-slider::after {
    content: '';
    position: absolute;
    left: var(--range-low);
    right: calc(100% - var(--range-high));
    height: 4px;
    background: var(--orange-primary);
    border-radius: 2px;
    z-index: 1;
}

/* Thumb styling */
.price-range-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--white);
    border: 2px solid var(--orange-primary);
    border-radius: 50%;
    cursor: pointer;
    pointer-events: all;
    position: relative;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: transform 0.15s, box-shadow 0.15s;
}
.price-range-slider input[type="range"]::-webkit-slider-thumb:hover,
.price-range-slider input[type="range"]:active::-webkit-slider-thumb {
    transform: scale(1.25);
    box-shadow: 0 0 0 6px rgba(255,107,53,0.15);
}
.price-range-slider input[type="range"]::-moz-range-thumb {
    width: 18px; height: 18px;
    background: var(--white);
    border: 2px solid var(--orange-primary);
    border-radius: 50%;
    cursor: pointer;
    pointer-events: all;
}

/* Mobile sidebar toggle button active state */
.btn-toggle-sidebar.active {
    background: var(--orange-primary);
    color: var(--white);
}

/* Catalog Main */
.catalog-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--white);
    padding: 20px 28px;
    border-radius: var(--radius-lg);
    margin-bottom: 32px;
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
    gap: 20px;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.btn-toggle-sidebar {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--cream-bg);
    border-radius: var(--radius-sm);
    font-weight: 600;
}

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

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.sort-dropdown label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.sort-select {
    padding: 10px 14px;
    border: 1.5px solid var(--pearl-gray);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: var(--white);
}

.view-toggles {
    display: flex;
    gap: 8px;
    background: var(--cream-bg);
    padding: 6px;
    border-radius: var(--radius-sm);
}

.view-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: all var(--transition-base);
}

.view-toggle.active {
    background: var(--orange-primary);
    color: var(--white);
}

.view-toggle:not(.active):hover {
    color: var(--navy-900);
}

/* Properties Views */
.properties-view {
    display: none;
}

.properties-view.active {
    display: block;
}

.properties-grid-catalog {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}

.property-card-catalog {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-slow);
    border: 1px solid var(--pearl-gray);
    display: flex;
    flex-direction: column;
    min-height: 400px; /* Garantizar tamaño */
    opacity: 1 !important; /* SEGURIDAD */
    visibility: visible !important;
}

.property-card-catalog:hover .property-image {
    transform: scale(1.06);
}

/* Btn ver detalles siempre visible en catálogo */
.property-card-catalog .btn-ver-detalles {
    opacity: 1;
    transform: translateY(0);
}

.property-card-catalog .property-favorite {
    opacity: 1;
}

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

.page-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1.5px solid var(--pearl-gray);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--text-primary);
    font-weight: 600;
    transition: all var(--transition-base);
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-btn:not(:disabled):hover,
.page-btn.active {
    background: var(--orange-primary);
    border-color: var(--orange-primary);
    color: var(--white);
}

.page-dots {
    color: var(--text-secondary);
}

/* Map View */
.map-view {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .catalog-wrapper {
        grid-template-columns: 280px 1fr;
    }
}

@media (max-width: 1024px) {
    :root {
        --section-padding: 80px;
    }

    .search-form {
        grid-template-columns: 1fr 1fr;
    }

    .search-field-small {
        grid-column: span 1;
    }

    .btn-search {
        grid-column: 1 / -1;
    }

    .catalog-wrapper {
        grid-template-columns: 1fr;
    }

    .catalog-sidebar {
        position: static;
        display: none;
    }

    .catalog-sidebar.active {
        display: block;
    }

    .btn-toggle-sidebar {
        display: flex;
    }

    .testimonials-carousel {
        padding: 0 60px;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 60px;
    }

    /* nav-menu y mobile-toggle ahora manejados por el bloque @media (max-width: 1023px) del header premium */

    .hero-content {
        padding: 40px 0 160px;
    }

    .hero-text {
        padding: 28px 32px;
        max-width: 100%;
    }

    .hero-search {
        bottom: 30px;
    }

    .search-box {
        padding: 24px 28px;
    }

    .search-form {
        grid-template-columns: 1fr;
    }

    .search-box {
        padding: 24px;
    }

    .properties-grid,
    .properties-grid-catalog {
        grid-template-columns: 1fr;
    }

    .pillars-grid {
        grid-template-columns: 1fr;
    }

    .testimonials-carousel {
        padding: 0 50px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-nav {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .toolbar-right {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .logo-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .hero-search {
        bottom: 20px;
    }

    .search-box {
        padding: 20px;
    }

    .slider-controls {
        bottom: 20px;
    }

    .testimonials-carousel {
        padding: 0;
    }

    .testimonial-arrow {
        width: 40px;
        height: 40px;
    }
}

/* ===== WHATSAPP FAB ===== */
.whatsapp-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #25D366;
    color: white;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition:
        transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.3s ease;
    will-change: transform;
}

.whatsapp-fab:hover {
    transform: scale(1.12) translateY(-3px);
    box-shadow: 0 8px 28px rgba(37, 211, 102, 0.6);
}

.whatsapp-fab:active {
    transform: scale(0.95);
}

/* Animación de pulso para llamar la atención (no intrusivo) */
@keyframes whatsapp-pulse {

    0%,
    100% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }

    50% {
        box-shadow: 0 4px 32px rgba(37, 211, 102, 0.7), 0 0 0 8px rgba(37, 211, 102, 0.12);
    }
}

.whatsapp-fab {
    animation: whatsapp-pulse 3s ease-in-out infinite;
}

.whatsapp-fab:hover {
    animation: none;
    /* Detener pulso al hacer hover */
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== KEYBOARD FOCUS — Navegación visible para todos los usuarios ===== */
:focus-visible {
    outline: 2px solid var(--orange-primary);
    outline-offset: 3px;
    border-radius: 4px;
}

:focus:not(:focus-visible) {
    outline: none;
}

/* ===== TOUCH DEVICES — Elementos ocultos por hover deben mostrarse siempre ===== */
/* En pantallas táctiles no existe el hover; nunca ocultar CTAs */
@media (hover: none) {
    .btn-ver-detalles {
        opacity: 1;
        transform: translateY(0);
    }

    .property-favorite {
        opacity: 1;
    }
}