:root {
    /* Colores principales */
    --primary: #3A3A3A;
    --primary-dark: #2B2B2B;
    --primary-light: #4A4A4A;
    
    /* Naranja suavizado como secundario */
    --secondary: #E87740;      
    --secondary-dark: #D46632; 
    --secondary-light: #F5A574;
    --secondary-pale: #FFF4EE; 
    
    /* Colores complementarios */
    --accent: #5A5A5A;
    --accent-light: #6A6A6A;
    
    /* Neutros */
    --white: #FFFFFF;
    --light: #F5F1ED;
    --gray-light: #E8E4E1;
    --gray: #95908A;
    --gray-dark: #5A5550;
    
    /* Texto */
    --text: #2B2622;
    --text-light: #F9F9F9;
    --text-muted: #B0B0B0;
    
    /* Fondos alternativos */
    --bg-warm: #FFF8F3;
    --bg-section: #2F2F2F;
    --bg-card: #FFFFFF;
    
    /* Efectos */
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 15px 35px rgba(0, 0, 0, 0.4);
    --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.2);
    --shadow-orange: 0 8px 24px rgba(232, 119, 64, 0.3);
    
    /* Transiciones */
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-fast: all 0.15s ease;
    
    /* Border radius */
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --border-radius-lg: 24px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--light);
    color: var(--text);
    line-height: 1.6;
    opacity: 0;
    animation: fadeIn 0.6s ease forwards;
}

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

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 80px 40px;
    text-align: center;
    margin-bottom: 40px;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 16px;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.9;
}

/* Main Content */
main {
    padding: 0 0 60px; 
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 0 20px; 
}

.section-title {
    font-size: 1.8rem;
    color: var(--primary);
    font-weight: 600;
}

.properties-count {
    background: var(--secondary);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Grid de propiedades */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
    padding: 0 20px;
}

/* Card de propiedad */
.card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

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

.carousel {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.carousel-images {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    height: 100%;
}

.carousel-images img,
.carousel-images video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
    border-radius: 12px; 
    transition: transform 0.3s ease; 
}

.card:hover .carousel-images img,
.card:hover .carousel-images video {
    transform: scale(1.02);
}

.carousel button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 3;
}

.carousel button:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translateY(-50%) scale(1.1);
}

.carousel .prev {
    left: 12px;
}

.carousel .next {
    right: 12px;
}

.card-content {
    padding: 24px;
}

.card-content h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: var(--primary);
    font-weight: 600;
    line-height: 1.3;
}

.precio {
    font-size: 1.5rem;
    color: var(--secondary);
    font-weight: 700;
    margin-bottom: 8px;
}

.card-location {
    display: flex;
    align-items: center;
    color: var(--gray);
    margin-bottom: 16px;
    font-size: 0.95rem;
}

.card-location i {
    margin-right: 8px;
    color: var(--secondary);
}

.desc {
    color: var(--text);
    margin-bottom: 20px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white;
    padding: 10px 20px;
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    gap: 8px;
}

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

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray);
    grid-column: 1 / -1;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: var(--gray-light);
}

.empty-state p {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.footer-info h3 {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Responsive */
@media (max-width: 992px) {
    .hero {
        padding: 60px 20px;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .grid {
        grid-template-columns: 1fr;
    }
    
}

@media (max-width: 576px) {

    
    .hero {
        padding: 40px 15px;
        margin-bottom: 30px;
    }
    
    main {
        padding: 0 0 40px;
    }
    
    .section-header,
    .grid {
        padding: 0 15px;
    }
}

/* ==========================
   NUEVO BUSCADOR
========================== */
.buscador {
    width: 100%;
    margin: 0;
    padding: 125px 0;
    border-radius: 0;
    background: url("/content/oficina.jpg") no-repeat center/cover;
    position: relative;
    box-shadow: var(--shadow);
    overflow: hidden;     /* recomendado */
}

.buscador::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1;
    pointer-events: none;
}

/* Contenido arriba del overlay */
.buscador-content {
    position: relative;
    z-index: 2;
    max-width: 1000px;  /* Añade esto para centrar el contenido */
    margin: 0 auto;      /* Añade esto para centrar el contenido */
    padding: 0 20px;     /* Añade esto para dar espacio en móviles */
}


/* Tabs */
.buscador-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.buscador-tabs .tab {
    padding: 10px 20px;
    border: 1px solid var(--gray-light);
    background: rgba(255,255,255,0.9);
    color: var(--dark);
    font-weight: 500;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;  
    z-index: 10;         
}

.buscador-tabs .tab.active {
    background: var(--secondary);
    color: white;
    font-weight: 600;
}

.buscador-tabs .tab:hover {
    background: var(--gray-light);
}

/* Barra de búsqueda */
.buscador-bar {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid var(--gray-light);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    max-width: 1000px;
    margin: 0 auto;
}

.buscador-bar select,
.buscador-bar input {
    padding: 14px 16px;
    border: none;
    outline: none;
    font-size: 1rem;
    color: var(--text);
    background: white;
}

.buscador-bar select {
    border-right: 1px solid var(--gray-light);
    min-width: 160px;
}

.buscador-bar input {
    flex: 1;
    border-right: 1px solid var(--gray-light);
}

/* Botón lupa */
.buscador-bar button {
    height: 100%;
    min-height: 48px;
    background: var(--secondary);
    color: white;
    border: none;
    padding: 0 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.buscador-bar button:hover {
    background: #2b80c5; /* tono más oscuro del secondary */
}

.buscador-bar i {
    font-size: 1.2rem;
    width: 1em;
    height: 1em;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive */
@media (max-width: 768px) {
    .buscador-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .buscador-bar select,
    .buscador-bar input {
        border-right: none;
        border-bottom: 1px solid var(--gray-light);
        width: 100%;
    }

    .buscador-bar button {
        width: 100%;
        padding: 14px;
    }
    
    .buscador {
        padding: 150px 0;
    }
}

/* Badges para tipo y operación */
.property-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge.operation {
    background-color: var(--secondary);
    color: white;
}

.badge.type {
    background-color: var(--primary);
    color: white;
}

/* Mejoras para el estado vacío */
.empty-state a {
    margin-top: 15px;
}

/* Mejoras responsive */
@media (max-width: 768px) {
    .property-badges {
        flex-wrap: wrap;
    }
    
    .buscador-tabs {
        justify-content: center;
    }
    
    .buscador-tabs .tab {
        flex: 1;
        text-align: center;
        min-width: 80px;
    }
}

/* Badges sobre las imágenes */
.property-image-badges {
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 15px;
    z-index: 2;
}

.image-badge {
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.image-badge.type-badge {
    background-color: var(--primary);
}

.image-badge.operation-badge {
    background-color: var(--secondary);
}

/* Carousel position relative para posicionar los badges */
.carousel {
    position: relative;
}

/* Características de la propiedad (habitaciones, baños, superficie) */
.property-features {
    display: flex;
    gap: 15px;
    margin: 12px 0;
    flex-wrap: wrap;
}

.feature {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    color: var(--gray);
}

.feature i {
    color: var(--secondary);
    font-size: 0.9rem;
}

/* Ajustes para la tarjeta con nueva información */
.card-content {
    padding: 20px;
}

.card-content h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.precio {
    font-size: 1.4rem;
    margin-bottom: 12px;
}

.card-location {
    margin: 12px 0;
}

.desc {
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 576px) {
    .property-features {
        gap: 10px;
    }
    
    .feature {
        font-size: 0.8rem;
    }
    
    .image-badge {
        padding: 4px 8px;
        font-size: 0.7rem;
    }
}