/************************************************************
 1. EL ESQUELETO (VARIABLES DINÁMICAS)
 *************************************************************/
:root {
    /* Estos valores se sobreescriben desde el indexHead.php 
    son necesarios como un fallback o respaldo
    */
    --primary: #842020;
    --secondary: #103C42;
    --accent: #DE9E36;
    --banda: #eeeeee;
    --dark: #1E1E1E;
    --light: #fcfcfc;
    --white: #ffffff;
    
    /* Sombras */
    --shadow-menu: 0 15px 35px rgba(0, 0, 0, 0.2);
    --shadow-pildora: 0 10px 30px rgba(0,0,0,0.15);
}

/************************************************************
 2. BASE Y TIPOGRAFÍA
 *************************************************************/
body { 
    font-family: 'Inter', sans-serif; 
    color: var(--dark); 
    background-color: var(--light);
    font-size: 0.9rem;
    -webkit-font-smoothing: antialiased;
}

h1, h2 { font-weight: 700; color: var(--secondary); }
h3, h4 { font-weight: 600; color: var(--primary); }

/************************************************************
 3. NAVBAR Y MENÚ
 *************************************************************/
.navbar-main {
    /* 1. Fondo blanco sólido (sin esto se ve transparente) */
    background-color: #ffffff !important; 
    
    /* 2. Definimos el borde inferior sutil */
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    
    /* 3. La sombra para despegarlo del fondo de la página */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);

    /* 4. Aseguramos que siempre esté arriba de todo */
    z-index: 1050;
}

 .navbar-main .nav-link {
    color: var(--secondary) !important;
    font-weight: 600;
}

/* Agregá o revisá esto en tu archivo de estilos */
.dropdown-menu {
    display: none; /* Por defecto oculto */
}

.dropdown:hover > .dropdown-menu {
    display: block; /* Que se vea al pasar el mouse */
    margin-top: 0; 
}

/* Evita que se cierre si el mouse se mueve un poco */
.dropdown-menu.show {
    display: block !important;
}
/************************************************************
 4. INDEX: HERO Y BUSCADOR
 *************************************************************/
/* ---------------------------------------------------------
   HERO INDEX - CENTRADO PERFECTO
   --------------------------------------------------------- */
.hero-index-home {
    height: 85vh !important;
    background-size: cover !important;
    background-position: center !important;
    display: flex !important;
    align-items: center !important; /* Centro vertical */
    justify-content: center !important; /* Centro horizontal */
    padding: 0 !important;
    margin: 0 !important;
    width: 100%;
}

.hero-wrapper-central {
    width: 100%;
    /* Eliminamos cualquier margen que empuje */
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Forzamos al form a no tener espacios extras abajo */
.hero-index-home form {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}
   

.hero-subtitle {
    letter-spacing: 0.2rem !important;
}

.hero-lema {
    font-size: 0.85rem !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase;
}

/* Ajuste para el buscador dentro del hero */
.hero-index-home .container {
    background: transparent !important;
}
 /************************************************************
 7. UTILIDADES Y BOTONES (DINÁMICOS)
 *************************************************************/
.btn-primary { 
    background-color: var(--primary) !important; 
    border-color: var(--primary) !important; 
    color: var(--white) !important;
}

.btn-primary:hover { 
    background-color: var(--secondary) !important; 
    border-color: var(--secondary) !important;
    transform: translateY(-2px);
}

/* Alinea los números a la derecha */
.text-end {                
    text-align: right;
}
/* Clases de texto para usar en cualquier lado */
.text-propio-primary { color: var(--primary) !important; }
.text-propio-secondary { color: var(--secondary) !important; }
.text-propio-accent { color: var(--accent) !important; }

/* Bordes de tarjetas que reaccionan al acento */
.card-propiedad:hover {
    border-color: var(--accent) !important; 
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1) !important;
}
/* Botón de contacto específico (el del menú) */
.btn-outline-propio {
    color: var(--primary) !important;
    border: 2px solid var(--primary) !important;
    background-color: transparent !important;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-propio:hover {
    background-color: var(--primary) !important;
    color: var(--white) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(132, 32, 32, 0.2); /* Sombra con el color primario */
}


/************************************************************
 8. MODAL DE FOTOS (CARRUSEL)
 *************************************************************/
.modal-fotos {
    display: none; /* Se activa con JavaScript */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95); /* Fondo negro traslúcido */
    z-index: 3000; /* Por encima de la navbar (1050) */
    align-items: center;
    justify-content: center;
}

/* Botón de cierre (la X) */
.modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: none;
    color: var(--white);
    font-size: 3rem;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.3s ease;
    z-index: 3100;
}

.modal-close:hover {
    transform: scale(1.2);
    color: var(--accent);
}

/* Contenedor del Carrusel dentro del Modal */
.modal-content {
    width: 90%;
    max-width: 1100px;
    background: transparent !important;
    border: none !important;
}

/* Estilo para las imágenes dentro del carrusel del modal */
.carousel-item img {
    max-height: 85vh;
    object-fit: contain; /* Para que no se corte la foto */
    margin: 0 auto;
}

/* btones de detalles (mostrar mas mostrar menos ) de la ficha*/
/* Contenedor del texto de detalles */
.detalles-wrapper {
    position: relative;
    max-height: 200px; /* Altura donde se corta el texto */
    overflow: hidden;
    transition: max-height 0.5s ease;
}

/* El degradado para que no se vea el corte seco */
.detalles-wrapper::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: linear-gradient(transparent, #fcfcfc); /* El color debe ser igual al fondo bg-light */
    transition: opacity 0.3s;
}

/* Cuando está abierto, quitamos el límite y el degradado */
.detalles-wrapper.abierto {
    max-height: none;
}

.detalles-wrapper.abierto::after {
    opacity: 0;
    pointer-events: none;
}

/************************************************************
 10. LIMPIEZA FINAL DE LOGO Y MARCA
 *************************************************************/
/* Eliminamos cualquier fondo, polígono o adorno detrás del logo */
.navbar-brand, 
.navbar-brand::before, 
.navbar-brand::after {
    background: transparent !important;
    clip-path: none !important;
    content: none !important; /* Quita pseudo-elementos decorativos */
    mask-image: none !important;
    border: none !important;
}

/* Aseguramos que el logo respire y no tenga recortes */
.navbar-logo {
    max-height: 50px;
    width: auto;
    display: block;
    position: relative;
    z-index: 10;
}

/* Si el polígono es un contenedor padre, lo limpiamos también */
.navbar-main .container {
    background: transparent !important;
}
/***********************************************
11. BOTON SESIONES (MODULAR & CLEAN)
************************************************/
/* Separador sutil a la derecha de contacto */
.user-nav-separator {
    border-left: 1px solid rgba(0,0,0,0.1);
    margin-left: 15px;
    padding-left: 10px;
    display: flex;
    align-items: center;
}

.user-menu-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.btn-session {
    background: transparent !important;
    border: none;
    font-size: 1.2rem;
    color: var(--secondary);
    cursor: pointer;
    padding: 5px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    position: relative;
}

.btn-session:hover { color: var(--primary); transform: scale(1.05); }
.btn-session.is-on { color: var(--primary); }

/* Dropdown: Forzamos el fondo y la visibilidad */
.user-dropdown { 
    position: relative; 
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%; /* Pegado al borde inferior de la navbar */
    background-color: #ffffff !important; /* Blanco sólido garantizado */
    min-width: 200px;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.08);
    padding: 12px 0;
    z-index: 9999; /* Por encima de todo */
    list-style: none;
    margin-top: 10px;
    /* Sombra profunda para que se vea el fondo blanco */
    box-shadow: 0 10px 25px rgba(0,0,0,0.15) !important;
}

/* Mostramos el menú al pasar el mouse por el contenedor */
.user-dropdown:hover .dropdown-content { 
    display: block !important; 
}

/* Datos del usuario en el menú */
.user-info-brief {
    padding: 5px 15px 10px 15px;
    line-height: 1.3;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 5px;
}

.user-info-brief small { color: #999; font-size: 0.7rem; text-transform: uppercase; }
.user-info-brief strong { color: var(--secondary); display: block; font-size: 0.9rem; }

.dropdown-content a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: var(--secondary);
    font-size: 0.85rem;
    transition: background 0.2s;
}

.dropdown-content a:hover {
    background-color: #f8fafc;
    color: var(--primary);
}

/* El punto de sesión activa */
.status-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    background-color: var(--accent);
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px var(--accent);
}

/* ==============================
   BADGES OPERACIÓN PROPIEDADES
================================ */

/* Base común */
.badge-operacion {
    font-weight: 600;
    padding: 0.5em 0.8em;
    font-size: 0.75rem;
    border-radius: 0.5rem;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

/* Venta */
.badge-venta {
    background-color: var(--secondary);
    color: #ffffff;
}

/* Alquiler */
.badge-alquiler {
    background-color: var(--accent);
    color: #ffffff;
       color: var(--secondary);
    font-weight: 700;
}

/* Alquiler Temporal */
.badge-temporal {
    background-color: var(--primary);
    color: #ffffff;
 
}

/* Hover opcional (suave) */
.badge-operacion:hover {
    filter: brightness(0.92);
    transition: 0.2s ease-in-out;
}
.badge-operacion {
    font-weight: 600;
    padding: 0.5em 0.9em;
    font-size: 0.75rem;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    border-radius: 50px; /* efecto píldora real */
}

/* control y visual de inputs y forms */
/* Remarcado global de Inputs y Selects */
.form-control, .form-select {
    border: 1.5px solid #ced4da !important; /* Un gris más definido que el de serie */
    transition: all 0.2s ease-in-out;
}

/* Efecto cuando el usuario hace clic o está escribiendo */

/* Para que se note aún más el contraste en el modo espartano */
.header-espartano .form-control {
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

