:root {
    --primary: #000000;
    --gold: #D4AF37;
    --gold-hover: #B4942E;
}

body { font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background: #f9f9f9; color: #333; }

/* --- HEADER / NAVBAR --- */
/* Navbar Base (Páginas Interiores - Negro Sólido) */
.navbar {
    background-color: #000 !important;
    position: relative;
    width: 100%;
    z-index: 1030;
    /* Ajustamos el padding para que no se vea doble de grueso */
    padding: 0.8rem 0;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Modificador para Home (Transparente y Flotante) */
.navbar.home-nav {
    background: linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%) !important;
    background-color: transparent !important;
    position: absolute;
    top: 0;
    left: 0;
    box-shadow: none;
    padding: 1.5rem 0; /* Un poco más alto en la home queda bien */
}

/* Estilos comunes del menú */
.navbar-brand img { 
    filter: brightness(0) invert(1) drop-shadow(0 2px 4px rgba(0,0,0,0.5));
    transition: 0.3s;
}

.nav-link { 
    color: #fff !important; 
    text-transform: uppercase; 
    font-size: 0.9rem; 
    letter-spacing: 1px; 
    font-weight: 500;
    transition: color 0.3s;
}
.nav-link:hover { color: var(--gold) !important; }

/* Dropdown Menu */
.dropdown-menu { 
    background: #000; 
    border: 1px solid #333; 
    margin-top: 10px; 
    border-radius: 0;
}
.dropdown-item { color: #ccc; }
.dropdown-item:hover { background: #222; color: var(--gold); }
.navbar-toggler { border-color: rgba(255,255,255,0.5); }


/* --- HERO SECTION & BUSCADOR --- */
.hero-section {
    height: 90vh;
    min-height: 600px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 80px; 
}

/* Buscador (Estilo Desktop Default) */
.search-box {
    background: #fff;
    padding: 10px;
    border-radius: 50px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    display: inline-block;
    max-width: 950px;
    width: 100%;
    margin: 30px auto 0;
}
.search-input {
    border: none;
    background: transparent;
    border-right: 1px solid #eee;
    border-radius: 0;
    padding: 15px 20px;
    font-size: 1rem;
    height: 100%;
    color: #333;
}
.search-input:focus { box-shadow: none; background: #f9f9f9; }
.search-input:last-child { border-right: none; }

.btn-search-round {
    border-radius: 50px;
    padding: 15px 40px;
    background: var(--gold);
    color: white;
    font-weight: bold;
    border: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: 0.3s;
    white-space: nowrap;
    width: 100%;
}
.btn-search-round:hover { background: var(--gold-hover); transform: scale(1.02); }

/* --- ESTILOS MÓVIL PARA BUSCADOR (IMPORTANTE) --- */
@media (max-width: 991px) {
    .hero-section {
        height: auto;
        min-height: 85vh;
        padding-top: 120px; /* Más espacio para el header en móvil */
        padding-bottom: 60px;
        align-items: flex-start;
    }

    /* Hacemos el buscador cuadrado y apilado en móvil */
    .search-box {
        background: rgba(255, 255, 255, 0.98); /* Fondo blanco casi sólido */
        border-radius: 15px; /* Esquinas menos redondeadas */
        padding: 20px;
        width: 95%; /* Ocupa casi todo el ancho */
    }

    /* La caja flex interna se convierte en columna */
    .search-box .d-flex {
        flex-direction: column;
        gap: 15px; /* Espacio entre campos */
    }

    /* Los contenedores de los inputs ocupan todo el ancho */
    .search-box .px-2 {
        width: 100%;
        padding: 0 !important;
    }

    /* Estilo de los inputs en móvil */
    .search-input {
        border: 1px solid #ddd; /* Borde completo */
        border-radius: 8px;
        background: #fff; /* Fondo blanco puro */
        text-align: center; /* Texto centrado */
        padding: 12px;
        margin-bottom: 0; /* El gap del flex se encarga del margen */
    }
    
    /* El botón también cuadrado y full width */
    .btn-search-round {
        border-radius: 8px;
        padding: 15px;
    }
}


/* --- FICHA INMUEBLE & TARJETAS --- */
.feature-box {
    background: #fff;
    border: 1px solid #e0e0e0;
    padding: 25px 15px;
    text-align: center;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
    transition: 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.feature-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    border-color: var(--gold);
}
.feature-box i { font-size: 2.5rem; color: var(--gold); margin-bottom: 15px; display: block; }
.feature-box span { font-size: 1.4rem; font-weight: bold; color: #000; display: block; }
.feature-box small { color: #888; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 1px; display: block; }

/* Tarjeta de Propiedad (Catálogo) */
.property-card { overflow: hidden; transition: 0.3s; }
.property-card:hover { box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important; transform: translateY(-3px); }
.img-wrapper { overflow: hidden; height: 250px; }
.property-card img { height: 100%; width: 100%; object-fit: cover; transition: 0.5s; }
.property-card:hover img { transform: scale(1.05); }
.badge-overlay {
    position: absolute; top: 15px; left: 15px;
    background: var(--gold); color: #fff;
    padding: 5px 12px; text-transform: uppercase; font-size: 0.75rem; font-weight: bold;
    border-radius: 4px; z-index: 2;
}
.property-card .btn-outline-dark {
    background: #000; color: #fff; border: none;
    padding: 10px; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 1px;
    width: 100%; display: block; text-align: center; text-decoration: none; transition: 0.3s;
}
.property-card .btn-outline-dark:hover { background: var(--gold); }


/* --- UTILIDADES GENERALES --- */
.text-gold { color: var(--gold) !important; }
.bg-black { background: #000 !important; }
.bg-gold { background: var(--gold) !important; }
.btn-gold { background: var(--gold); color: #fff; border: 0; font-weight: bold; }
.btn-gold:hover { background: var(--gold-hover); color: #fff; }
.btn-black { background: #000; color: #fff; border: 0; text-transform: uppercase; letter-spacing: 1px; }
.btn-black:hover { background: #333; color: #fff; }

/* WhatsApp Flotante */
.float-whatsapp { 
    position: fixed; bottom: 30px; right: 30px; z-index: 999; 
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
    transition: 0.3s;
}
.float-whatsapp:hover { transform: scale(1.1); }

/* --- ESTILOS GALERÍA PANTALLA COMPLETA (LIGHTBOX) --- */

/* Badge de contador de fotos sobre el carrusel */
.photo-count-badge {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 8px 15px;
    border-radius: 30px;
    font-size: 0.9rem;
    z-index: 10;
    pointer-events: none; /* Para que el click pase a la imagen */
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Cursor de lupa para indicar que se puede ampliar */
.cursor-zoom {
    cursor: zoom-in;
}

/* El Modal (Fondo negro) */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 9999; /* Por encima de todo */
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.95);
}

/* Botón Cerrar (X) */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 10000;
}
.lightbox-close:hover,
.lightbox-close:focus {
    color: var(--gold);
    text-decoration: none;
    cursor: pointer;
}

/* Imagen dentro del modal */
.lightbox-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 1200px;
    max-height: 85vh;
    object-fit: contain;
    animation-name: zoom;
    animation-duration: 0.3s;
}

@keyframes zoom {
    from {transform:scale(0)}
    to {transform:scale(1)}
}

/* Botones Siguiente/Anterior */
.lightbox-prev, .lightbox-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 30px;
    transition: 0.3s;
    border-radius: 0 3px 3px 0;
    user-select: none;
    -webkit-user-select: none;
    background: rgba(0,0,0,0.2);
}
.lightbox-next {
    right: 0;
    border-radius: 3px 0 0 3px;
}
.lightbox-prev:hover, .lightbox-next:hover {
    background-color: rgba(0, 0, 0, 0.8);
    color: var(--gold);
}

/* Texto de contador en el modal (1/15) */
.lightbox-number {
    color: #f2f2f2;
    font-size: 14px;
    padding: 8px 12px;
    position: absolute;
    top: 10px;
    left: 10px;
    font-family: sans-serif;
}

/* Ajuste móvil */
@media only screen and (max-width: 700px) {
    .lightbox-content {
        width: 100%;
    }
}