/* ========================================================= */
/* HOJA DE ESTILOS - SITIO PÚBLICO (CLEAN) */
/* ========================================================= */




/* 1. GLOBALES */
body {
    font-family: 'Open Sans', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #fafafa;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: 80px; /* Espacio para el header fijo */
}

.container, .container-main {
    max-width: 1200px;
    width: 100%;
    margin: auto;
    padding: 0 25px;
    box-sizing: border-box;
}
.container-main {
    padding-top: 25px;
    padding-bottom: 25px;
    flex-grow: 1;
}















/* 2. ENCABEZADO Y NAVEGACIÓN */
header {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
    background-color: white; box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

header.scrolled {
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    background-color: rgba(255, 255, 255, 0.98);
}

.navbar .container {
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 15px 25px;
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    transition: padding 0.3s ease; 
    position: relative;
}

header.scrolled .navbar .container { padding: 10px 25px; }

.logo-link { display: flex; align-items: center; height: 100%; }
.logo-img { height: 45px; width: auto; transition: height 0.3s ease; }
header.scrolled .logo-img { height: 35px; }

/* Menú Escritorio */
.nav-menu {
    list-style: none; padding: 0; margin: 0;
    display: flex; align-items: center; gap: 5px;
}

.nav-menu li a {
    color: #333; text-decoration: none; padding: 8px 12px;
    display: block; font-weight: 600; font-size: 15px;
    position: relative; transition: color 0.3s;
}

.nav-menu li a::after {
    content: ''; position: absolute; width: 0; height: 2px;
    bottom: 0; left: 0; background-color: #007bff; transition: width 0.3s ease;
}

.nav-menu li a:hover { color: #007bff; }
.nav-menu li a:hover::after { width: 100%; }
.nav-menu li a.active { color: #007bff; }
.nav-menu li a.active::after { width: 100%; }

/* Botón Hamburguesa (Móvil) */
.menu-toggle {
    display: none; background: none; border: none;
    font-size: 1.8em; color: #333; cursor: pointer;
}


















/* 3. HERO / CARRUSEL (Inicio) */
#hero-carousel-outer {
    position: relative; width: 100%; height: 500px; overflow: hidden;
    margin-bottom: 0; background-color: #333;
}
#hero-carousel-outer::before {
    content: ''; position: absolute;
    top: -20px; left: -20px; right: -20px; bottom: -20px;
    background-image: var(--bg-image, url('../img/Fondo 1.jpg'));
    background-size: cover; background-position: center;
    filter: blur(15px) brightness(0.7); z-index: 0;
    transition: background-image 1s ease-in-out;
}
#hero-carousel-inner {
    position: relative; max-width: 1200px; width: 100%; height: 100%; margin: 0 auto;
    display: flex; align-items: center; justify-content: center; text-align: center;
    background-image: url('../img/Fondo 1.jpg'); background-size: cover; background-position: center;
    z-index: 1; box-shadow: 0 0 30px rgba(0,0,0,0.5);
    transition: background-image 1s ease-in-out;
}
.hero-content { 
    z-index: 2; 
    color: white; 
    width: 100%;       /* Ocupa todo el ancho posible */
    max-width: 1200px; /* <--- AUMENTADO para dejar crecer al buscador */
    padding: 20px;
    box-sizing: border-box; 
}
.hero-content h2 { 
    font-size: 2.8em; 
    margin-bottom: 15px; 
    font-weight: 700; 
    text-shadow: 2px 2px 4px rgba(0,0,0,0.6); 
}
.z-index-high { 
    position: relative; 
    z-index: 10; }



/* ESTILOS DEL LOGO PRINCIPAL EN EL HERO */
.hero-logo {
    width: 100%;             /* Base responsiva */
    max-width: 350px;        /* Ancho máximo en pantallas grandes (ajústalo a tu gusto) */
    height: auto;            /* Mantiene la proporción para no deformarse */
    display: block;          /* Necesario para centrar con márgenes */
    margin: 0 auto 30px auto; /* Centrado horizontal y margen inferior de 30px */
    
    /* Opcional: una sombra muy sutil para separarlo del fondo si la foto es muy clara en esa zona */
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2));
    filter: brightness(0) invert(1);
}




/* Hero Interno (Otras páginas) */
.hero-internal {
    background-image: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('../img/Fondo_PP.png');
    background-size: cover; background-position: center; height: 250px;
    display: flex; align-items: center; justify-content: center; text-align: center;
    color: white; border-radius: 0 0 8px 8px; margin-bottom: 50px;
}
.hero-internal h1 { font-size: 2.5em; margin-bottom: 10px; }
.hero-internal p { font-size: 1.2em; font-weight: 300; }




















/* 4. BUSCADOR (Estilo Fincaraíz - CORREGIDO) */
.finca-search-wrapper { 
    max-width: 1050px; /* AUMENTADO: Antes era 850px */
    width: 95%;        /* NUEVO: Ocupa el 95% de la pantalla si es menor a 1050px */
    margin: 30px auto 0 auto; 
    text-align: left; 
    position: relative; 
    z-index: 20; 
}

.search-tabs { 
    display: flex; 
    gap: 5px; 
    margin-bottom: 0; 
    padding-left: 10px; 
}
.tab-btn {
    background-color: rgba(0, 0, 0, 0.4); 
    color: white; 
    border: none; 
    padding: 10px 25px;
    border-radius: 8px 8px 0 0; 
    font-size: 1rem; 
    cursor: pointer; 
    font-weight: 600; 
    transition: all 0.2s;
}
.tab-btn.active { 
    background-color: white; 
    color: #007bff; 
}

.search-bar-container {
    background-color: white; 
    border-radius: 8px; 
    display: flex; 
    align-items: center; 
    padding: 5px; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.2); 
    height: 50px;
}

.search-input-group { 
    position: relative; 
    display: flex; 
    align-items: center; 
    padding: 0 15px; 
    height: 100%; 
}

/* Grupo Tipo (Izquierda) */
.type-group { 
    width: 40%; 
    cursor: pointer; 
    position: relative;
}
/* Grupo Ubicación (Derecha) */
.location-group { 
    width: 60%; 
}

.input-icon { 
    color: #007bff; 
    font-size: 1.2em; 
    margin-right: 12px; 
    pointer-events: none; 
}

/* SELECT PERSONALIZADO (Sin flecha nativa) */
.finca-select { 
    border: none; outline: none; width: 100%; font-size: 1rem; 
    color: #333; background: transparent; cursor: pointer;
    /* Truco para ocultar la flecha del navegador */
    appearance: none; 
    -webkit-appearance: none; 
    -moz-appearance: none;
    padding-right: 20px; /* Espacio para que el texto no toque la flecha */
    position: relative; z-index: 2; /* Encima del icono */
}

/* INPUT DE TEXTO */
.finca-input { 
    border: none; outline: none; width: 100%; font-size: 1rem; 
    color: #333; background: transparent; 
}
.finca-input::placeholder { color: #999; }

/* FLECHA CUSTOM (FontAwesome) */
.arrow-icon { 
    color: #aaa; font-size: 0.8em; 
    position: absolute; right: 15px; /* Pegada a la derecha */
    pointer-events: none; z-index: 1; /* Detrás del select transparente */
}

.search-divider { width: 1px; height: 35px; background-color: #eee; }

/* Autocomplete */
.autocomplete-results {
    position: absolute; top: 100%; left: 0; right: 0; background: white;
    border-radius: 0 0 8px 8px; box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    list-style: none; padding: 0; margin: 5px 0 0 0; max-height: 250px; overflow-y: auto; display: none; z-index: 100;
}
.autocomplete-results li { padding: 12px 20px; border-bottom: 1px solid #f9f9f9; cursor: pointer; display: flex; align-items: center; color: #444; }
.autocomplete-results li:hover { background-color: #f0f8ff; color: #007bff; }













/* 5. COMPONENTES HOME (Servicios y Destacados) */
.servicios-adicionales { background-color: #f0f4f8; padding: 50px 30px; text-align: center; margin-top: 40px; border-radius: 12px; }
.servicios-grid { display: flex; gap: 25px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
.servicio-item {
    background-color: white; padding: 30px; border-radius: 8px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    text-align: center; flex: 1 1 280px; max-width: 350px; transition: transform 0.3s; display: flex; flex-direction: column;
}
.servicio-item:hover { transform: translateY(-5px); }
.servicio-item i { font-size: 2.5em; color: #007bff; margin-bottom: 15px; }
.servicio-item h4 { font-size: 1.3em; margin: 10px 0; color: #333; }

.ver-mas-container { text-align: center; margin-top: 40px; }
.btn-ver-todo {
    display: inline-block; background-color: transparent; color: #007bff; border: 2px solid #007bff;
    padding: 12px 30px; border-radius: 50px; text-decoration: none; font-weight: bold; font-size: 1.1em; transition: all 0.3s;
}
.btn-ver-todo:hover { background-color: #007bff; color: white; transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0, 123, 255, 0.2); }

/* Destacados */
.destacados-grid { display: flex; gap: 25px; margin-bottom: 30px; flex-wrap: wrap; }
.card-inmueble {
    background-color: white; 
    border: 1px solid #eee; 
    border-radius: 8px; 
    overflow: hidden;
    flex: 1 1 260px; 
    display: flex; 
    flex-direction: column; 
    transition: box-shadow 0.3s; 
    cursor: pointer;
    max-width: 300px;
    margin: auto;
}
.card-inmueble:hover { box-shadow: 0 8px 20px rgba(0,0,0,0.1); }
.card-inmueble .card-img { width: 100%; height: 220px; object-fit: cover; display: block; }
.card-inmueble .card-body { padding: 20px; display: flex; flex-direction: column; flex-grow: 1; }
.card-inmueble .card-body i {color: #007bff;}
.card-inmueble h3 { font-size: 1.1em; margin: 0 0 10px 0; color: #333; line-height: 1.4; }
.card-inmueble .card-footer { margin-top: auto; padding-top: 15px; border-top: 1px solid #f0f0f0; display: flex; justify-content: space-between; align-items: center; }
.card-inmueble .precio { font-size: 1.2em; font-weight: 700; color: #007bff; }



















/* 6. CATÁLOGO DE INMUEBLES (Lista Horizontal) */
.resultados-header { margin-bottom: 20px; border-bottom: 1px solid #eee; padding-bottom: 15px; }
.breadcrumbs { font-size: 0.9em; color: #666; margin-bottom: 10px; }
.titulo-resultados { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; }
.ordenar-por select { padding: 8px; border: 1px solid #ddd; border-radius: 4px; color: #555; }

.layout-portal { display: grid; grid-template-columns: 280px 1fr; gap: 30px; align-items: start; }
.sidebar-filtros { background-color: #fff; border: 1px solid #eee; border-radius: 8px; padding: 20px; position: sticky; top: 100px; }
.filtro-grupo { margin-bottom: 25px; border-bottom: 1px solid #f9f9f9; padding-bottom: 15px; }
.input-lateral { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 4px; box-sizing: border-box; }
.checkbox-list label { display: block; margin-bottom: 8px; color: #555; cursor: pointer; font-size: 0.95em; }
.rango-precio { display: flex; gap: 5px; align-items: center; margin-bottom: 10px; }
.rango-precio input { width: 100%; padding: 8px; border: 1px solid #ddd; border-radius: 4px; font-size: 0.9em; box-sizing: border-box; }
.btn-aplicar-lateral { width: 100%; background-color: white; border: 1px solid #007bff; color: #007bff; padding: 8px; border-radius: 4px; cursor: pointer; font-weight: 600; transition: 0.2s; }
.btn-aplicar-lateral:hover { background-color: #f0f8ff; }
.btn-limpiar-lateral { width: 100%; background: none; border: none; color: #666; text-decoration: underline; cursor: pointer; font-size: 0.9em; margin-top: 10px;}

/* Tarjeta Horizontal */
.lista-inmuebles { display: grid; grid-template-columns: 1fr; gap: 25px; padding: 20px 0; }
.inmueble-card {
    background-color: white; border: 1px solid #e0e0e0; border-radius: 8px; overflow: hidden;
    display: flex; box-shadow: 0 4px 10px rgba(0,0,0,0.03); transition: box-shadow 0.3s; cursor: pointer; height: 240px;
}
.inmueble-card:hover { box-shadow: 0 8px 20px rgba(0,0,0,0.08); }
.inmueble-image-container { flex: 0 0 35%; position: relative; overflow: hidden; }
.inmueble-main-image { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.3s; }
.inmueble-info { flex: 1; padding: 20px 25px; display: flex; flex-direction: column; justify-content: space-between; }
.inmueble-info h3 { margin: 0 0 5px 0; color: #007bff; font-size: 1.4em; }
.inmueble-precio { font-size: 1.6em; font-weight: 700; color: #333; margin: 10px 0; }
.inmueble-details-row { display: flex; gap: 20px; color: #666; font-size: 0.95em; margin-bottom: 15px; }
.descripcion { font-size: 0.9em; color: #777; margin: 0; line-height: 1.5; }
.etiqueta-destacado { position: absolute; top: 10px; left: 10px; background-color: #ffc107; color: #333; padding: 4px 8px; font-size: 0.75em; font-weight: bold; border-radius: 3px; z-index: 5; text-transform: uppercase; box-shadow: 0 2px 4px rgba(0,0,0,0.2); }
.nav-arrow { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.5); color: white; border: none; padding: 10px; cursor: pointer; opacity: 0; transition: opacity 0.2s; }
.inmueble-card:hover .nav-arrow { opacity: 1; }
.nav-arrow.prev { left: 0; }
.nav-arrow.next { right: 0; }

/* Vista Toggle */
.vista-toggle-container { display: flex; justify-content: flex-end; margin-bottom: 15px; }
.vista-btn { background: white; border: 1px solid #ccc; padding: 8px 15px; cursor: pointer; }
.vista-btn.active { background: #007bff; color: white; border-color: #007bff; }

/* Paginación */
.pagination-container { display: flex; justify-content: center; align-items: center; margin-top: 40px; gap: 8px; padding: 20px 0; }
.page-btn { background-color: white; border: 1px solid #ddd; color: #333; padding: 8px 14px; border-radius: 4px; cursor: pointer; font-weight: 600; transition: all 0.2s; min-width: 35px; text-align: center; }
.page-btn:hover { background-color: #f1f1f1; border-color: #ccc; color: #007bff; }
.page-btn.active { background-color: #007bff; color: white; border-color: #007bff; }
.page-btn:disabled { background-color: #f9f9f9; color: #ccc; cursor: not-allowed; border-color: #eee; }


/* Ocultar botones móviles en escritorio */
.btn-filtros-movil, .btn-cerrar-modal {
    display: none;
}
















/* 7. DETALLES DEL INMUEBLE */
#detalle-inmueble-container { display: grid; grid-template-columns: 1fr 340px; gap: 30px; padding-bottom: 40px; }
#detalle-main { background-color: #fff; padding: 30px; border: 1px solid #eee; border-radius: 8px; overflow: hidden; min-width: 0; }
#detalle-titulo { font-size: 2.4em; margin: 0 0 5px 0; color: #222; }
#detalle-ubicacion { font-size: 1.1em; color: #666; margin-bottom: 25px; }


/* ==============================
   GALERÍA - IMAGEN PRINCIPAL
   Ratio flexible (4:3 / 16:9)
   ============================== */

#galeria-imagen-principal {
  width: 100%;
  aspect-ratio: 4 / 3;        /* 🔹 Default: 4:3 */
  background-color: #000;
  border-radius: 8px;
  overflow: hidden;

  display: flex;
  align-items: center;
  justify-content: center;
}

/* Imagen completa, sin recorte */
#galeria-imagen-principal img {
  width: 100%;
  height: 100%;
  object-fit: contain;        /* ✅ NO recorta */
  object-position: center;
  display: block;
}
/* Alternativa 16:9 */
#galeria-imagen-principal.ratio-16x9 {
  aspect-ratio: 16 / 9;
}

#galeria-miniaturas { display: flex; overflow-x: auto; gap: 10px; margin-top: 15px; padding-bottom: 10px; }
#galeria-miniaturas img { width: 90px; height: 70px; object-fit: cover; border-radius: 4px; cursor: pointer; flex-shrink: 0; border: 2px solid transparent; }
#galeria-miniaturas img.activa { border-color: #007bff; }
.detalle-seccion { margin-top: 40px; padding-top: 30px; border-top: 1px solid #f0f0f0; }
.caracteristicas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.caracteristicas-grid ul { list-style: none; padding: 0; }
.caracteristicas-grid li { padding-left: 25px; position: relative; margin-bottom: 8px; }
.caracteristicas-grid li::before { content: '✔'; position: absolute; left: 0; color: #28a745; }

#detalle-sidebar .precio-card {
  background: white;
  padding: 30px;
  border: 1px solid #eee;
  border-radius: 8px;
  position: sticky;
  top: 100px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);

  max-width: 100%;
  box-sizing: border-box;
}


#detalle-precio {
  font-size: 2.5em;          /* se mantiene */
  color: #007bff;
  margin: 10px 0;

  max-width: 100%;
  white-space: normal;       /* permite salto de línea */
  overflow-wrap: break-word; /* corta si es necesario */
  word-break: break-word;
  line-height: 1.2;          /* mejor en móvil */
}

.detalles-iconos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 15px;
  margin: 20px 0;

  max-width: 100%;
}

.detalles-iconos span { font-size: 1em; color: #555; display: flex; align-items: center; }
.detalles-iconos i { width: 25px; color: #999; margin-right: 8px; }
.btn-contacto-sidebar { width: 100%; background: #28a745; color: white; padding: 15px; border: none; border-radius: 6px; font-size: 1.1em; font-weight: bold; cursor: pointer; transition: 0.2s; }
.btn-contacto-sidebar:hover { background: #218838; }


















/* 8. PÁGINAS INTERNAS (Servicios, Nosotros) */
.intro-servicios, .about-intro { text-align: center; margin: 0 auto 30px auto; font-size: 1.1em; color: #555; line-height: 1.6; }
.intro-servicios p {margin: auto 100px auto 100px ;}
.about-intro { display: flex; gap: 30px; align-items: center; text-align: center; }
.about-text { flex: 1.5; } 
.about-image { flex: 1; }
.about-image img { width: 100%; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }

/* ---Tarjetas de Nosotros y Servivios--- */
.services-grid-page, .mv-grid { 
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 30px; 
    padding-bottom: 40px; 
}
.service-card-pro, .mv-card { 
    background: white; 
    padding: 40px 30px; 
    border-radius: 12px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); 
    border-top: 5px solid #007bff; 
    display: flex; 
    flex-direction: column; 
    transition: 0.3s; 
    text-align: center;
}
.service-card-pro:hover, .mv-card:hover { transform: translateY(-8px); }


/* ---Interior de Tarjetas de Nosotros y Servivios--- */
.icon-box i, .mv-card i { font-size: 2.5em; color: #007bff; }

.service-card-pro h3 {text-align: center; font-size: 1.1em; }

.service-list { list-style: none; padding: 0; margin-bottom: 30px; text-align: left; }
.service-list li { margin-bottom: 10px; color: #555; display: flex; align-items: flex-start; }
.service-list li i { color: #28a745; font-size: 1.5em; margin: auto 10px auto 0;}
.btn-service-action { 
    display: block; 
    width: 100%; 
    padding: 12px 0; 
    text-align: center; 
    border: 2px solid #007bff; 
    color: #007bff; 
    border-radius: 6px; 
    font-weight: bold; 
    text-decoration: none; 
    transition: all 0.3s; 
    margin-top: auto;
}
.btn-service-action:hover { background: #007bff; color: white; }


/* ---Portafolio de servicio--- */
.portfolio-cta { background-color: #e3f2fd; padding: 60px; border-radius: 12px; text-align: center; margin-bottom: 40px; }
.btn-download { display: inline-block; background-color: #ffc107; color: #333; padding: 15px 40px; border-radius: 50px; font-weight: bold; font-size: 1.2em; text-decoration: none; transition: all 0.3s; box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3); }
.btn-download:hover { background-color: #e0a800; transform: scale(1.05); }

/* Corrección para centrar la lista de Valores */
.valores-list {
    list-style: none;
    padding: 0;
    
    /* ▼▼▼ ESTO HACE LA MAGIA ▼▼▼ */
    margin: auto; /* Márgenes automáticos a los lados centran el bloque */
    width: fit-content;       /* La caja se ajusta al tamaño exacto del texto */
    text-align: left;         /* Mantiene los checks alineados uno bajo otro */
    display: block;           /* Asegura comportamiento de bloque */
}

.valores-list li {
    color: #555;
    display: block;
    align-items: center;
    font-size: 1.1em;
}

.valores-list li i {
    color: #007bff;
    margin: 10px;
    font-size: 1.2em;
}

















/* 9. CONTACTO Y FOOTER */
.contacto-section { 
    background-color: #f8f9fa; 
    padding: 60px 0; 
    margin-top: 50px; 
    border-top: 1px solid #e9ecef; 
}
.contacto-wrapper { display: flex; flex-wrap: wrap; gap: 40px; background: white; padding: 40px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.contacto-info { flex: 1; min-width: 280px; }
.contacto-form { flex: 1.5; min-width: 300px; }
.contacto-form input, .contacto-form select, .contacto-form textarea { width: 100%; padding: 12px 15px; margin-bottom: 15px; border: 1px solid #ddd; border-radius: 6px; box-sizing: border-box; transition: border-color 0.3s; }
.contacto-form input:focus, .contacto-form textarea:focus { border-color: #007bff; outline: none; }
.form-group-row { display: flex; gap: 15px; }
.form-group-row input { flex: 1; }
#btn-enviar-contacto { background-color: #007bff; color: white; padding: 12px 25px; border: none; border-radius: 6px; font-weight: bold; cursor: pointer; font-size: 1em; transition: background 0.3s; width: 100%; }
#btn-enviar-contacto:hover { background-color: #0056b3; }

.info-item { display: flex; align-items: center; margin-bottom: 15px; font-size: 1.1em; color: #555; }

.info-item i { 
    width: 40px; 
    height: 40px; 
    min-width: 40px; /* Fuerza el ancho mínimo */
    flex-shrink: 0;  /* Prohíbe que se encoja si el texto empuja */
    background: #e3f2fd; 
    color: #007bff; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    margin-right: 15px; 
}

/* Redes Sociales */
.social-media-contacto, .social-media-footer { display: flex; gap: 20px; justify-content: center; margin-top: 30px; width: 100%; }
.social-media-footer { 
    justify-content: center; 
    margin-top: 0; 
    gap: 20px; 
}
.social-icon { width: 55px; height: 55px; background-color: #fff; border: 1px solid #ddd; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #555; text-decoration: none; font-size: 1.6em; transition: all 0.3s ease; }
.footer-col .social-icon { width: 40px; height: 40px; font-size: 1.2em; } /* Iconos más chicos en footer */
.social-icon:hover { color: white; transform: translateY(-3px); border-color: transparent; }
.social-icon.facebook:hover { background-color: #1877f2; }
.social-icon.instagram:hover { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); border: none; }
.social-icon.tiktok:hover { background-color: #000; }

/* Footer */
.site-footer { background-color: #2c3e50; color: #ecf0f1; padding-top: 60px; margin-top: auto; font-size: 0.95em; }
.site-footer .container { max-width: 1100px; margin: 0 auto; padding: 0 30px; box-sizing: border-box; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; padding-bottom: 40px; text-align: center; }

.footer-logo { max-width: 160px; margin: 0 auto 20px auto; filter: brightness(0) invert(1); display: block; }

.footer-col h3 { color: white; font-size: 1.1em; margin-bottom: 25px; border-bottom: 2px solid #007bff; display: inline-block; padding-bottom: 5px; margin-top: 0; }

.footer-links, .footer-contact { list-style: none; padding: 0; margin: 0; }

.footer-links li, .footer-contact li { margin-bottom: 12px; }

.footer-links a, .footer-contact li { color: #bdc3c7; text-decoration: none; transition: 0.3s; display: flex; align-items: center; justify-content: center; }
.footer-links a i, .footer-contact i { font-size: 0.8em; margin-right: 10px; color: #007bff; }
.footer-contact i { margin-top: 4px; min-width: 20px; text-align: center; font-size: 1em; }
.footer-bottom { background-color: #233140; padding: 20px 0; text-align: center; border-top: 1px solid rgba(255,255,255,0.05); }

/* Botón Flotante */
.btn-wsp-flotante { position: fixed; width: 60px; height: 60px; bottom: 25px; right: 25px; background-color: #25d366; color: #FFF; border-radius: 50%; text-align: center; font-size: 35px; box-shadow: 2px 2px 10px rgba(0,0,0,0.2); z-index: 1000; display: flex; align-items: center; justify-content: center; text-decoration: none; transition: all 0.3s ease; }
.btn-wsp-flotante:hover { background-color: #1ebe57; transform: scale(1.1); }
























/* ========================================================= */
/* 10. RESPONSIVE GENERAL (CORREGIDO) */
/* ========================================================= */

/* --- RESPONSIVE (Tablet / Laptop Pequeña) --- */
/* Diseño: Logo arriba (ancho completo), 3 columnas abajo */
@media (max-width: 900px) {


    .intro-servicios p {margin: auto 0 ;}


    .services-grid-page, .mv-grid { 
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
}

    .footer-grid {
        /* Definimos 3 columnas para la fila de abajo */
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
        text-align: center; /* Centrado general */
    }

    /* La primera columna (Logo) se expande de lado a lado */
    .footer-col:first-child {
        grid-column: 1 / -1; /* Ocupa todo el ancho */
        border-bottom: 1px solid rgba(255,255,255,0.05); /* Línea sutil */
        padding-bottom: 20px;
        margin-bottom: 20px;
    }

    .footer-col .footer-desc {
        max-width: 500px;margin: auto;
    }

    /* Centrar el contenido de todas las columnas */
    .footer-links a, .footer-contact li, .social-media-footer { 
        justify-content: center; 
    }
    .footer-logo { margin: 0 auto 20px auto; }
}



@media (max-width: 768px) {

    /* --- MENÚ MÓVIL --- */
    .menu-toggle { display: block; }
    
    .nav-menu { 
        display: none; position: absolute; top: 100%; left: 0; width: 100%; 
        background-color: white; flex-direction: column; padding: 20px 0; 
        box-shadow: 0 10px 15px rgba(0,0,0,0.1); border-top: 1px solid #eee; gap: 0; 
    }
    
    .nav-menu.active { display: flex; animation: slideDown 0.3s ease forwards; }
    .nav-menu li { width: 100%; text-align: center; }
    .nav-menu li a { padding: 15px; font-size: 1.1em; border-bottom: 1px solid #f9f9f9; }
    .nav-menu li a::after { display: none; }
    .nav-menu li a:hover { background-color: #f0f8ff; }

    /* --- BUSCADOR (Estilo App) --- */
    .finca-search-wrapper { 
        width: 100%; 
        margin-top: 15px; 
    }
    .search-tabs { 
        padding-left: 0; 
        gap: 0; 
        display: flex; 
    }
    .tab-btn {
        flex: 1;
        text-align: center;
        padding: 12px 0;
        font-size: 1em;
    }
    
    .search-bar-container {
        flex-direction: column;
        height: auto; 
        padding: 0; 
        border-radius: 0 0 8px 8px; 
        overflow: hidden;
    }
    .search-input-group {
        width: 100%; 
        height: 60px; 
        border-bottom: 1px solid #eee; 
        padding: 0 20px; 
        box-sizing: border-box;
    }
    .location-group { border-bottom: none; }
    .search-divider { display: none; }
    .finca-select, .finca-input { font-size: 16px; }
    .arrow-icon { right: 20px; }

    /* --- LAYOUT GENERAL --- */
    .layout-portal, #detalle-inmueble-container { grid-template-columns: 1fr; }
    .sidebar-filtros { position: static; }
    .about-intro, .contacto-wrapper { flex-direction: column; }
    .form-group-row { flex-direction: column; gap: 0; }
    
    #hero-carousel-outer { height: 400px; }
    .hero-content h2 { font-size: 2em; }
    
    /* Logo Hero Móvil */
    .hero-logo { max-width: 280px; margin-bottom: 20px; }
    .hero-content { padding-top: 20px; }

    /* --- TARJETAS COMPACTAS --- */
    .lista-inmuebles { gap: 20px; padding: 10px 0; }
    .inmueble-card { flex-direction: column; height: auto; box-shadow: 0 4px 15px rgba(0,0,0,0.08); }
    .inmueble-image-container { width: 100%; height: 220px; }
    .inmueble-info { padding: 15px; }
    .inmueble-info h3 { font-size: 1.2em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .inmueble-precio { font-size: 1.5em; color: #2c3e50; margin: 5px 0 10px 0; }
    .descripcion { display: none; }
    .inmueble-details-row { gap: 15px; justify-content: space-between; font-size: 0.9em; margin-bottom: 0; border-top: 1px solid #f0f0f0; padding-top: 10px; }
    .nav-arrow { padding: 15px; background: rgba(0,0,0,0.3); }

    /* --- CONTACTO --- */
    .contacto-section { padding: 30px 0; }
    .contacto-section .container { padding: 0; }
    .contacto-wrapper { margin: 0; padding: 15px; gap: 30px; }
    .contacto-info, .contacto-form { min-width: 0; width: 100%; flex: none; }
    .info-item span { font-size: 0.85em; word-break: break-word; overflow-wrap: anywhere; line-height: 1.3; }
    .info-item i { margin-right: 10px; }

    .footer-grid {
        grid-template-columns: 1fr; /* 1 sola columna */
        gap: 40px;
    }
    
    /* Quitamos el borde y margen extra del logo en móvil */
    .footer-col:first-child {
        border-bottom: none;
        padding-bottom: 0;
        margin-bottom: 0;
    }

    /* Ajuste de Tarjetas Misión/Visión en Móvil */
    .service-card-pro, .mv-grid {
        gap: 20px; /* Menos separación vertical */
    }
    
    .service-card-pro, .mv-card {
        padding: 25px 20px; /* Reducir relleno interno para aprovechar espacio */
    }
    
    .service-card-pro i, .mv-card i {
        font-size: 2em; /* Icono un poco más pequeño */
        margin-bottom: 15px;
    }

    .btn-service-action i{
        font-size: 1em; /* Icono un poco más pequeño */
        padding: auto;
    }
    
    .service-card-pro h3, .mv-card h3 {
        font-size: 1.3em; /* Título ajustado */
    }

/* --- BOTONES DE CONTROL (Móvil) --- */
    .btn-filtros-movil {
        display: inline-block; /* Visible en móvil */
        margin-right: auto; /* Lo empuja a la izquierda */
        background-color: #007bff;
        color: white;
        border: none;
    }

    .btn-cerrar-modal {
        display: block;
        width: 100%;
        text-align: right;
        background: none;
        border: none;
        font-size: 1.2em;
        color: #333;
        margin-bottom: 20px;
        cursor: pointer;
    }

    /* --- BARRA LATERAL COMO MODAL (Off-Canvas) --- */
    .sidebar-filtros {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh; /* Pantalla completa */
        background-color: white;
        z-index: 2000; /* Por encima de TODO (incluso el header) */
        padding: 25px;
        overflow-y: auto; /* Scroll vertical interno */
        box-sizing: border-box;
        
        /* Animación de entrada */
        transform: translateX(-100%); /* Oculto a la izquierda */
        transition: transform 0.3s ease-in-out;
        
        /* Reseteamos estilos anteriores */
        order: unset; 
        display: block; 
        white-space: normal;
        border-right: none;
    }

    /* Clase para mostrar el menú */
    .sidebar-filtros.active {
        transform: translateX(0); /* Se desliza a la vista */
    }

    /* Ajustes internos para que se vea bien en el modal */
    .filtro-grupo { 
        display: block; 
        margin-bottom: 25px;
        border-bottom: 1px solid #eee;
        padding-bottom: 15px;
    }
    .filtro-grupo h3 { display: block; margin-bottom: 10px; font-size: 1.1em; }
    
    /* Botones grandes para el dedo */
    .input-lateral, .btn-aplicar-lateral {
        height: 50px;
    }
    
    /* Ocultar elementos innecesarios del layout anterior */
    .layout-portal { display: block; }


    
    #galeria-imagen-principal {
    max-height: 75vh;
  }
}





/* --- ANIMACIONES --- */
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}