/**
 * Inmobiliaria Demo - Ibiza Luxury Properties
 * Custom CSS - Estilo Glass Mediterraneo
 * Sintesia Studio 2025
 */

/* ============================================
   VARIABLES CSS
============================================ */
:root {
    /* Colores principales */
    --color-primary: #0A8799;
    --color-primary-dark: #086d7a;
    --color-secondary: #F4A261;
    --color-accent: #E76F51;
    --color-success: #10B981;
    
    /* Backgrounds */
    --bg-light: #F8F9FA;
    --bg-glass: rgba(255, 255, 255, 0.75);
    --bg-glass-dark: rgba(255, 255, 255, 0.9);
    --bg-overlay: rgba(10, 135, 153, 0.85);
    
    /* Textos */
    --text-dark: #2D3748;
    --text-light: #718096;
    --text-muted: #A0AEC0;
    
    /* Sombras */
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.15);
    
    /* Borders */
    --border-radius: 20px;
    --border-radius-sm: 12px;
    --border-radius-lg: 30px;
    
    /* Tipografía */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* ============================================
   ESTILOS GENERALES
============================================ */
body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    background-attachment: fixed;
    padding-top: 0;
}

body.stretched {
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

#wrapper {
    position: relative;
    width: 100%;
    min-height: 100vh;
}

.bg-light {
    background-color: var(--bg-light) !important;
}

/* ============================================
   HEADER / NAVBAR
============================================ */
#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
}

#header.transparent-header {
    background: transparent;
}

#header.floating-header {
    top: 20px;
    width: calc(100% - 40px);
    margin: 0 20px;
}

#header-wrap {
    position: relative;
}

.backdrop-header {
    background: var(--bg-glass);
    backdrop-filter: blur(15px);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    padding: 0.75rem 1.5rem;
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#logo {
    display: flex;
    align-items: center;
}

#logo img {
    height: 40px;
    width: auto;
}

.logo-default {
    display: block;
}

.logo-dark {
    display: none;
}

/* Menu */
.primary-menu-trigger {
    display: none;
}

.primary-menu {
    display: flex;
    align-items: center;
}

.menu-container {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
}

.menu-item {
    position: relative;
}

.menu-link {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--text-dark);
    font-weight: 500;
    border-radius: var(--border-radius-sm);
    transition: all 0.3s ease;
}

.menu-link:hover,
.menu-link.active {
    background: rgba(10, 135, 153, 0.1);
    color: var(--color-primary);
}

.menu-icon {
    margin-right: 0.5rem;
}

/* Submenu */
.sub-menu-container {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--bg-glass-dark);
    backdrop-filter: blur(15px);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-lg);
    list-style: none;
    padding: 0.5rem 0;
    margin: 0.5rem 0 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 999;
}

.menu-item:hover .sub-menu-container {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sub-menu-container .menu-link {
    padding: 0.75rem 1.5rem;
}

/* Badge favoritos */
.badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.375rem;
}

.badge.bg-danger {
    background-color: var(--color-accent) !important;
}

/* Responsive Menu */
@media (max-width: 991px) {
    #header.floating-header {
        top: 0;
        width: 100%;
        margin: 0;
    }
    
    .primary-menu-trigger {
        display: block;
    }
    
    .cnvs-hamburger {
        background: none;
        border: none;
        padding: 0.5rem;
        cursor: pointer;
    }
    
    .cnvs-hamburger-box {
        width: 30px;
        height: 24px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    
    .cnvs-hamburger-inner,
    .cnvs-hamburger-inner::before,
    .cnvs-hamburger-inner::after {
        width: 100%;
        height: 3px;
        background-color: var(--text-dark);
        border-radius: 2px;
        transition: all 0.3s ease;
    }
    
    .primary-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 280px;
        height: calc(113vh - 80px);
        background: var(--bg-glass-dark);
        backdrop-filter: blur(15px);
        padding: 2rem;
        transition: left 0.3s ease;
        overflow-y: auto;
    }
    
    .primary-menu.active {
        left: 0;
    }
    
    .menu-container {
        flex-direction: column;
    }
    
    .sub-menu-container {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        margin-left: 1rem;
        background: rgba(255, 255, 255, 0.5);
    }
}

/* ============================================
   GLASS EFFECT COMPONENTS
============================================ */
.glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(15px);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

/* ============================================
   NAVBAR GLASS
============================================ */
.navbar-glass {
    background: var(--bg-glass) !important;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1rem 0;
}

.navbar-brand {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--color-primary) !important;
}

.nav-link {
    font-weight: 500;
    color: var(--text-dark) !important;
    padding: 0.5rem 1rem !important;
    border-radius: var(--border-radius-sm);
    transition: all 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    background: rgba(10, 135, 153, 0.1);
    color: var(--color-primary) !important;
}

.btn-favoritos {
    position: relative;
}

.badge-favoritos {
    position: absolute;
    top: 0;
    right: 5px;
    background: var(--color-accent);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
}

/* ============================================
   HERO/SLIDER SECTION
============================================ */
.hero-section {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    color: white;
    margin-top: 0;
    padding-top: 100px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-overlay);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

/* Search Box Glass */
.search-box-glass {
    background: var(--bg-glass-dark);
    backdrop-filter: blur(15px);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-xl);
}

.search-box-glass .form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Stats Section */
.stats-section {
    margin-top: -50px;
    position: relative;
    z-index: 10;
    padding: 2rem 0;
}

.stat-card {
    text-align: center;
    padding: 2.5rem 1.5rem !important;
}

.stat-icon {
    font-size: 3rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-light);
    font-weight: 500;
}

/* ============================================
   BOTONES
============================================ */
.btn-primary-custom {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    border: none;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
}

.btn-secondary-custom {
    background: white;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    padding: 0.75rem 2rem;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary-custom:hover {
    background: var(--color-primary);
    color: white;
}

/* ============================================
   PROPERTY CARDS
============================================ */
.property-card {
    background: var(--bg-glass-dark);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    position: relative;
}

.property-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.property-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.property-favorite {
    position: absolute;
    top: 15px;
    right: 15px;
    background: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    z-index: 10;
}

.property-favorite i {
    color: var(--text-light);
    font-size: 1.2rem;
}

.property-favorite.active i,
.property-favorite:hover i {
    color: var(--color-accent);
}

.property-price {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

/* ============================================
   BADGES
============================================ */
.badge-luxury {
    background: linear-gradient(135deg, var(--color-secondary), var(--color-accent));
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================================
   FOOTER
============================================ */
#footer {
    background: #1a1a1a;
    color: #f5f5f5;
    padding: 2rem 0 0;
}

#footer.dark {
    background: #1a1a1a;
}

#copyrights {
    background: rgba(0, 0, 0, 0.3);
    padding: 2rem 0;
    margin-top: 2rem;
}

.copyright-links {
    margin-top: 0.5rem;
}

.copyright-links a {
    color: #f5f5f5;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.copyright-links a:hover {
    opacity: 1;
}

.middot {
    margin: 0 0.5rem;
    opacity: 0.5;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin: 0 0.25rem;
    color: white;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.social-icon i:first-child {
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
}

.social-icon i:last-child {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.3s ease;
}

.social-icon:hover i:first-child {
    transform: scale(1.2);
}

.social-icon:hover i:last-child {
    transform: translate(-50%, -50%) scale(1);
}

.h-bg-instagram {
    background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);
}

.h-bg-facebook {
    background: #3b5998;
}

.h-bg-linkedin {
    background: #0077b5;
}

.bi-envelope, .fa-solid {
    margin-right: 0.5rem;
}

#gotoTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    font-size: 1.5rem;
}

#gotoTop.active {
    opacity: 1;
    visibility: visible;
}

#gotoTop:hover {
    background: var(--color-primary-dark);
    transform: translateY(-5px);
}

/* ============================================
   BOTONES FLOTANTES
============================================ */
.whatsapp-float, .chatbot-float {
    position: fixed;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.75rem;
    box-shadow: var(--shadow-xl);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
}

.chatbot-float {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.75rem;
    box-shadow: var(--shadow-xl);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
}

.chatbot-float:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(10, 135, 153, 0.4);
}

.chatbot-float .badge-new {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--color-accent);
    color: white;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 10px;
}

/* Animación bounce para comparador */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    25% { transform: translateY(-10px); }
    50% { transform: translateY(0); }
    75% { transform: translateY(-5px); }
}

.animate-bounce {
    animation: bounce 0.6s ease-in-out 3;
}

/* Animación heartbeat para favoritos - agregar */
@keyframes heartbeat {
    0% { transform: scale(1); }
    15% { transform: scale(1.3); }
    30% { transform: scale(1); }
    45% { transform: scale(1.2); }
    60% { transform: scale(1); }
}

.animate-heartbeat {
    animation: heartbeat 0.8s ease-in-out;
}

/* Animación fadeOut para favoritos - eliminar */
@keyframes fadeOutPulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.8); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

.animate-fadeout {
    animation: fadeOutPulse 0.5s ease-in-out;
}

/* Botones de comparar */
.compare-btn {
    transition: all 0.3s ease;
}

.compare-btn.active {
    background: #F4A261 !important;
    color: white !important;
    border-color: #F4A261 !important;
    animation: pulseScale 0.4s ease;
}

@keyframes pulseScale {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes bounceScale {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.2); }
    50% { transform: scale(0.95); }
    75% { transform: scale(1.1); }
}

/* Badges del header */
#favoritos-count,
#compare-count-header {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 20px;
    height: 20px;
    background: var(--color-accent);
    color: white;
    border-radius: 10px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 6px;
}

#favoritos-count.visible,
#compare-count-header.visible {
    display: flex;
}

/* ============================================
   FILTROS
============================================ */
.filters-sidebar {
    background: var(--bg-glass-dark);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 100px;
}

.filter-group {
    margin-bottom: 2rem;
}

.filter-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    display: block;
}

/* ============================================
   MAPA
============================================ */
#map {
    height: calc(100vh - 100px);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

.leaflet-popup-content {
    font-family: var(--font-body);
}

.popup-property-card {
    min-width: 250px;
}

.popup-property-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: var(--border-radius-sm);
    margin-bottom: 1rem;
}

/* ============================================
   COMPARADOR
============================================ */
.comparison-table {
    background: var(--bg-glass-dark);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.comparison-table th,
.comparison-table td {
    padding: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    text-align: center;
}

.comparison-table thead th {
    background: var(--color-primary);
    color: white;
    font-weight: 600;
}

.comparison-check {
    color: var(--color-success);
    font-size: 1.5rem;
}

.comparison-cross {
    color: var(--text-muted);
    font-size: 1.5rem;
}

/* ============================================
   CALCULADORA HIPOTECA
============================================ */
.calculator-card {
    background: var(--bg-glass-dark);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.calculator-result {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: white;
    padding: 2rem;
    border-radius: var(--border-radius-sm);
    margin-top: 2rem;
}

.calculator-result-value {
    font-size: 2.5rem;
    font-weight: 700;
}

/* ============================================
   MARKET REPORT
============================================ */
.market-chart {
    background: var(--bg-glass-dark);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}

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

.market-stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: 1rem 0;
}

.market-stat-change {
    font-weight: 600;
    font-size: 1.1rem;
}

.market-stat-change.positive {
    color: var(--color-success);
}

.market-stat-change.negative {
    color: var(--color-accent);
}

/* ============================================
   ZONAS Y TESTIMONIALS
============================================ */
.zone-card {
    position: relative;
    display: block;
    border-radius: var(--border-radius);
    overflow: hidden;
    height: 250px;
    text-decoration: none;
    transition: all 0.3s ease;
}

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

.zone-card:hover img {
    transform: scale(1.1);
}

.zone-overlay, .zone-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
}

.zone-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.zone-count {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0;
}

.testimonial-card {
    padding: 2rem;
    text-align: center;
}

.testimonial-stars {
    color: #FFD700;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.testimonial-text {
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    min-height: 80px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.testimonial-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--color-primary);
}

.testimonial-info h6 {
    margin: 0;
    font-weight: 600;
}

.testimonial-info p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.property-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--color-accent);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 5;
}

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 991px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .filters-sidebar {
        position: static;
        margin-bottom: 2rem;
    }
    
    .whatsapp-float {
        bottom: 100px;
        right: 20px;
    }
    
    .chatbot-float {
        right: 20px;
        bottom: 30px;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .property-card img {
        height: 200px;
    }
    
    .comparison-table {
        font-size: 0.875rem;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 0.75rem;
    }
}

/* ============================================
   UTILIDADES
============================================ */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 3rem;
}

.loader {
    border: 4px solid rgba(10, 135, 153, 0.2);
    border-top: 4px solid var(--color-primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.toast {
    position: fixed;
    top: 100px;
    right: 30px;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-xl);
    z-index: 9999;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============================================
   CHATBOT MODAL
============================================ */
.chatbot-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    overflow-y: auto;
    padding: 20px;
}

.chatbot-modal[style*="display: flex"] {
    display: flex !important;
}

.chatbot-container {
    background: white;
    width: 90%;
    max-width: 450px;
    height: 600px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chatbot-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header h5 {
    margin: 0;
    font-size: 1.1rem;
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chatbot-messages {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    background: #f8f9fa;
}

.chatbot-message {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.2rem;
}

.bot-message .message-avatar {
    background: var(--color-primary);
    color: white;
}

.user-message {
    flex-direction: row-reverse;
}

.user-message .message-avatar {
    background: var(--color-secondary);
    color: white;
}

.message-content {
    flex: 1;
    background: white;
    padding: 0.75rem 1rem;
    border-radius: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.user-message .message-content {
    background: var(--color-primary);
    color: white;
}

.message-content p {
    margin: 0;
    line-height: 1.5;
}

.message-content a {
    color: var(--color-primary);
    text-decoration: underline;
}

.user-message .message-content a {
    color: white;
}

.quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.quick-reply {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-reply:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
}

.chatbot-input {
    padding: 1rem;
    background: white;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 0.75rem;
}

.chatbot-input input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 25px;
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
    outline: none;
}

.chatbot-input input:focus {
    border-color: var(--color-primary);
}

.chatbot-input button {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--color-primary);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chatbot-input button:hover {
    background: var(--color-primary-dark);
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .chatbot-container {
        width: 100%;
        height: 100%;
        max-width: none;
        border-radius: 0;
    }
}

/* ============================================
   COMPARADOR MODERNO
============================================ */
.compare-property-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.compare-property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.compare-property-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.btn-remove-compare {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--color-accent);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.btn-remove-compare:hover {
    background: var(--color-accent);
    color: white;
    transform: scale(1.1);
}

.badge-destacada {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--color-accent);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
}

.compare-property-content {
    padding: 1.5rem;
}

.compare-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
}

.compare-price .price-period {
    font-size: 1rem;
    color: var(--text-light);
    font-weight: 400;
}

.compare-property-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.compare-property-location {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.compare-property-location i {
    color: var(--color-primary);
}

.compare-property-type {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.badge-outline {
    background: transparent;
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
}

/* Comparison Grid */
.comparison-grid {
    background: white;
    border-radius: 16px;
    padding: 2rem;
}

.comparison-headers {
    margin: 0;
    padding: 0;
    border-bottom: 2px solid #e0e0e0;
    background: white;
    top: 90px;
    z-index: 999;
    
}

.comparison-header-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.comparison-header-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--color-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.comparison-header-name {
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    color: var(--text-dark);
    line-height: 1.2;
}

.comparison-row {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid #e0e0e0;
    align-items: center;
}

.comparison-row:last-child {
    border-bottom: none;
}

.comparison-label {
    display: flex;
    align-items: center;
    font-size: 1rem;
}

.comparison-values {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.comparison-value {
    text-align: center;
    padding: 0.75rem;
    background: var(--bg-glass);
    border-radius: 12px;
    font-weight: 600;
}

.value-number {
    font-size: 1.5rem;
    color: var(--color-primary);
}

.value-unit {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-left: 4px;
}

.comparison-highlight {
    background: linear-gradient(135deg, #0A8799 0%, #065F6D 100%);
    border-radius: 20px;
    padding: 2rem 1.5rem;
    border: none;
    margin: 2rem 0;
    box-shadow: 0 10px 30px rgba(10, 135, 153, 0.25);
    position: relative;
    overflow: hidden;
}

.comparison-highlight::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

.comparison-highlight .comparison-label {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0;
}

.comparison-highlight .comparison-label i {
    font-size: 1.2rem;
    color: white !important;
}

.comparison-highlight .comparison-values {
    gap: 1.5rem;
}

.comparison-highlight .comparison-value {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    padding: 1.25rem;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

.comparison-highlight .value-number {
    font-size: 2rem;
    font-weight: 900;
    color: #0A8799;
    line-height: 1;
}

.comparison-highlight .value-unit {
    font-size: 1.1rem;
    color: #065F6D;
    font-weight: 600;
}

@media (max-width: 768px) {
    .comparison-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .comparison-values {
        grid-template-columns: 1fr;
    }
    
    .compare-property-img {
        height: 200px;
    }

    .stats-section {
        margin-top: 0 !important;
    }
}

/* ============================================
   CALCULADORA DE HIPOTECA
============================================ */
.calculator-result {
    background: var(--bg-glass);
    padding: 1.5rem;
    border-radius: 16px;
    transition: all 0.3s ease;
}

.calculator-result:hover {
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
}

.calculator-result-label {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calculator-result-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
}

.form-range {
    height: 8px;
}

.form-range::-webkit-slider-thumb {
    background: var(--color-primary);
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    width: 24px;
    height: 24px;
}

.form-range::-moz-range-thumb {
    background: var(--color-primary);
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    width: 24px;
    height: 24px;
}

.form-range::-webkit-slider-track {
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-accent) 100%);
    border-radius: 10px;
}

.form-range::-moz-range-track {
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-accent) 100%);
    border-radius: 10px;
}

@media (max-width: 768px) {
    .calculator-result-value {
        font-size: 1.5rem;
    }
}
