/* ===================================================================
   ESTILOS GENERALES DEL PLUGIIN EASYBROKER
   Usado por: [easybroker_properties] y la estructura del sitio
   =================================================================== */

/* --- ESTRUCTURA PRINCIPAL Y FILTROS --- */
.eb-grid-container {
    display: flex;
    gap: 30px;
    padding: 20px 0;
    background-color: transparent;
}

.eb-filter-sidebar {
    width: 280px;
    flex-shrink: 0;
    padding: 20px;
    background-color: white;
    box-shadow: none;
    border-right: none;
}

.eb-filter-sidebar h5 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.eb-filter-group select,
.eb-filter-group input[type="text"] {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.eb-filter-group {
    padding: 15px 0 5px 0;
}

.eb-filter-title {
    font-weight: 500;
    margin: 0;
    color: #444;
    display: block;
}

.eb-filter-group hr {
    border: none;
    border-bottom: 1px solid #eee;
    margin-top: 10px;
}

/* --- NUEVOS ESTILOS PARA LA ESTRUCTURA DE FILTROS COMPLEJOS --- */

/* Contenedor de inputs Mínimo/Máximo o Selectores Min/Max */
.eb-range-inputs {
    display: flex;
    gap: 10px; /* Pequeño espacio entre los campos Mínimo y Máximo */
    margin-top: 5px;
}

/* Aplicar el 50% de ancho a cada input/select dentro del grupo de rango */
.eb-range-inputs input[type="number"],
.eb-range-inputs select {
    width: 50%;
    /* Reutiliza el estilo base ya definido para select e input */
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Estilo para los selectores de Moneda */
#eb_currency {
    width: 100%;
    padding: 8px;
    margin-top: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Estilo para el botón Aplicar */
.eb-apply-filter {
    background-color: #174d8c; /* Color primario para destacar */
    color: white;
    border: none;
    padding: 8px 15px;
    margin-top: 15px;
    width: 100%;
    cursor: pointer;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.eb-apply-filter:hover {
    background-color: #103c6b;
}

/* Asegurar que la etiqueta hr siempre separe */
.eb-filter-group hr {
    margin-bottom: 20px; /* Separación después del grupo */
}

/* --- REGLAS DE RESPONSIVE PARA EL SIDEBAR --- */
/* En móvil, los inputs de rango deben seguir siendo 50% */
@media (max-width: 992px) {
    /* (Ya definido: .eb-filter-sidebar width: 100%) */
    
    .eb-range-inputs {
        /* Mantener la estructura de 50% en móvil */
        flex-wrap: nowrap; 
    }
}

/* --- LISTADO DE PROPIEDADES --- */
.eb-properties-list-wrapper {
    flex-grow: 1;
    padding-top: 20px;
    position: relative;
}

.eb-list-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 30px;
}

#eb_sort_by {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    min-width: 200px;
}

.eb-properties-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

/* --- TARJETA BASE (LISTADO Y CARRUSEL) --- */
.eb-property-card {
    /* Altura uniforme con Flexbox */
    display: flex;
    flex-direction: column;
    min-height: 400px; /* Ajusta este valor */
    
    /* Estilos visuales */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    overflow: hidden;
    background: #fff;
    border-radius: 6px;
}

.eb-property-card a {
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Estira el enlace para contener todo */
    text-decoration: none;
    color: inherit;
}

.eb-card-image-wrapper {
    position: relative;
    overflow: hidden;
    padding-bottom: 60%;
    height: 0;
}

.eb-card-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.eb-status-tag {
    position: absolute;
    bottom: 0;
    left: 0;
    background-color: #5cb85c;
    color: white;
    padding: 5px 12px;
    font-size: 0.85em;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.eb-card-info {
    padding: 15px 20px;
    flex-grow: 1; /* Permite crecer */
    display: flex;
    flex-direction: column;
}

.eb-price-status {
    font-size: 1.4em;
    font-weight: 700;
    color: #174d8c;
    margin-bottom: 5px;
}

.eb-card-title {
    font-size: 1.1em;
    font-weight: 600;
    margin: 0 0 5px 0;
    line-height: 1.4;
}

.eb-card-location {
    font-size: 0.9em;
    color: #777;
    margin-bottom: 15px;
}

.eb-property-features {
    display: flex;
    justify-content: space-between;
    font-size: 0.85em;
    color: #555;
    padding-top: 10px;
    border-top: 1px solid #eee;
    margin-top: auto; /* Empuja las características al fondo */
}

.eb-property-features span {
    display: flex;
    align-items: center;
}

.eb-property-features .dashicons {
    font-size: 1.1em;
    margin-right: 5px;
    color: #888;
}


/* ===================================================================
   ESTILOS DE PÁGINA DE DETALLE
   =================================================================== */

.eb-detail-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.eb-gallery-header {
    background-color: #F0CECE;
    border-bottom: 1px solid #eee;
    padding-top: 50px; /* Añadir padding vertical para el fondo */
    padding-bottom: 50px;
    width: 100vw; 
    margin-left: calc(50% - 50vw);
}

.eb-header-content {
    /* Estas propiedades centran el contenido al ancho deseado */
    max-width: 1200px; 
    margin: 0 auto; 
    padding-left: 20px;
    padding-right: 20px;
}

.eb-gallery-header h1 {
    font-size: 2.5em;
    margin-top: 0;
    margin-bottom: 5px;
}

.eb-header-top-row {
    display: flex; /* Habilita Flexbox */
    justify-content: space-between; /* Empuja el primer elemento a la izquierda y el último a la derecha */
    align-items: center; /* Centra verticalmente la ubicación y el precio */
    margin-bottom: 5px; /* Pequeño espacio debajo de esta fila */
}

.eb-price-detail {
    font-size: 2.5em;
    font-weight: bold;
    color: #000;
    margin: 0;
}

/* --- CONTENEDOR DE CARRUSEL DE IMÁGENES PRINCIPAL --- */
.eb-detail-carousel-container {
    /* --- PROPIEDADES DE FULL WIDTH --- */
    width: 100vw; 
    margin-left: calc(50% - 50vw); 
    
    /* --- PROPIEDADES DE ALTURA FIJA --- */
    height: 700px; /* Altura Fija */
    max-height: 90vh; 
    padding-top: 0; 
    
    /* --- PROPIEDADES DEL CARRUSEL --- */
    position: relative;
    overflow: hidden; 
    margin-bottom: 30px;
}

.eb-detail-carousel {
    display: flex; 
    transition: transform 0.5s ease-in-out; 
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* --- ESTILO DE SLIDE PRINCIPAL (1 IMAGEN A LA VEZ) --- */
/* USAMOS ESPECIFICIDAD PARA NO CHOCAR CON EL CARRUSEL DE DESTACADAS */
.eb-detail-carousel-container .eb-carousel-slide {
    min-width: 100% !important; /* Fuerza 100% de ancho (1 slide visible) */
    width: 100% !important;
    height: 100%;
    flex-shrink: 0; /* Evita que el slide se encoja */
}

.eb-detail-carousel-container .eb-detail-photo {
    width: 100%;
    height: 100% !important; 
    max-width: none !important; 
    object-fit: cover !important; 
    object-position: center top; 
}

.eb-detail-photo {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    object-position: center top;
}
/* Estilos para las flechas de navegación del Carrusel Principal */
.eb-detail-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 10;
}
.eb-prev-btn { left: 20px; }
.eb-next-btn { right: 20px; }

/* GRID DE CONTENIDO (70% - 30%) */
.eb-content-grid {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
}

.eb-column-main {
    flex: 3;
}

.eb-column-sidebar {
    flex: 1;
}

/* BARRA DE ESPECIFICACIONES */
.eb-specs-bar {
    display: flex;
    justify-content: space-around;
    background-color: #f7f7f7;
    padding: 15px;
    margin-bottom: 30px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.eb-spec {
    display: flex;
    align-items: center;
    font-weight: 600;
}

.eb-spec .dashicons {
    margin-right: 5px;
    font-size: 1.2em;
    color: #174d8c;
}

.eb-section-title {
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-top: 30px;
    margin-bottom: 20px;
}

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

/* --- DETALLES Y ASESOR --- */

/* Contenedor principal para dividir Descripción y Detalles Clave */
.eb-detail-features-grid {
    display: flex;
    flex-wrap: wrap; 
    gap: 30px; 
    margin-bottom: 30px;
}

/* La descripción ocupa más espacio */
.eb-description-content {
    flex: 2; 
    min-width: 300px; 
}

/* La lista de detalles clave */
.eb-key-details-list {
    flex: 1; 
    list-style: none; 
    padding: 0;
    margin: 0;
    border-left: 1px solid #eee; 
    padding-left: 30px;
}

.eb-key-details-list li {
    margin-bottom: 10px;
    font-size: 1em;
    line-height: 1.5;
}

.eb-key-details-list i {
    color: #174d8c; 
    margin-right: 8px;
}

/* Tarjeta de Asesor */
.eb-advisor-card {
    border: 1px solid #ddd;
    padding: 20px;
    margin-bottom: 10px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    background-color: #f9f9f9;
}

.eb-advisor-img {
    width: 100px;
    height: 100px;
    border-radius: 50%; 
    object-fit: cover;
    margin-bottom: 15px;
    border: 3px solid #174d8c; 
}

.eb-advisor-card h4 {
    margin: 0 0 5px 0;
    color: #333;
}

.eb-advisor-title {
    margin: 0 0 15px 0;
    font-size: 0.9em;
    color: #666;
}

.eb-advisor-contact {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.eb-advisor-btn {
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
}

.eb-phone-btn {
    background-color: #25d366; 
    color: white;
}

.eb-email-btn {
    background-color: #174d8c;
    color: white;
}

.eb-advisor-btn i {
    margin-right: 5px;
    font-size: 1.2em;
}

.eb-contact-form-mock {
    border: 1px solid #ccc;
    padding: 20px;
    border-radius: 8px;
}

/* --- MAPA Y OVERLAY DE UBICACIÓN --- */
.eb-map-section {
    margin-top: 40px;
    margin-bottom: 40px;
}

.eb-map-container {
    max-width: 100%;
    margin: 20px 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    overflow: hidden;
    position: relative !important; /* CLAVE para el centrado del overlay */
}

.eb-map-container iframe {
    display: block;
    width: 100%; 
    height: 450px; 
}

/* ---------------------------------------------------- */
/* ESTILOS DE LA BARRA DE INFORMACIÓN (OVERLAY) CENTRADA */
/* ---------------------------------------------------- */
.eb-map-info-overlay {
    /* Posicionamiento y Dimensiones */
    position: absolute !important; 
    bottom: 20px !important;
    
    /* Ajuste al contenido y display */
    display: inline-flex !important; 
    
    /* CENTRADO HORIZONTAL */
    left: 50% !important;
    transform: translateX(-50%) !important; 
    
    /* Color y Estilo */
    background: rgba(0, 0, 0, 0.75); 
    color: white;
    padding: 15px 20px;
    border-radius: 4px;
    
    align-items: center;
    font-size: 1.1em;
    z-index: 10; 
}

.eb-map-label {
    font-weight: bold;
    margin-right: 10px;
    color: #ccc; 
}

.eb-map-address-overlay {
    font-weight: 500;
}


/* ===================================================================
   CARRUSEL DE DESTACADAS [easybroker_featured_carousel]
   =================================================================== */

.eb-featured-bottom {
    margin-top: 40px;
}

.eb-carousel-container {
    position: relative;
    padding: 0 60px; 
}

.eb-featured-carousel-wrapper {
    overflow: hidden !important;
}

.eb-featured-carousel {
    display: flex;
    gap: 20px;
    transition: transform 0.4s ease-in-out;
    width: max-content !important; 
    padding: 10px 0;
}

/* --- ESTILOS DE SLIDE DESTACADO (MÚLTIPLES COLUMNAS) --- */
/* USAMOS ESPECIFICIDAD PARA NO CHOCAR CON EL CARRUSEL PRINCIPAL */
.eb-carousel-container .eb-carousel-slide {
    flex-shrink: 0;
    /* Ancho fijo para escritorio */
    min-width: 350px !important;
    width: 350px !important;
}

/* --- ESTILOS VISUALES DENTRO DEL SLIDE --- */

.eb-featured-tag {
    position: absolute;
    top: 0px; 
    left: 0px; 
    right: auto; 
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 10px;
    font-size: 0.8em;
    font-weight: 500;
    z-index: 5;
    border-radius: 3px;
    text-transform: uppercase;
}

.eb-featured-price-overlay {
    position: absolute;
    bottom: 0; 
    left: 0;
    right: 0;
    
    background: rgba(0, 0, 0, 0.6); 
    color: white;
    
    padding: 15px 20px; 
    font-size: 1.4em;
    font-weight: 700;
    z-index: 5;
    text-shadow: none; 
}

.eb-featured-info {
    background-color: white;
    border-top: none;
    padding: 20px 20px; 
    flex-grow: 1; 
    display: flex;
    flex-direction: column;
}

.eb-featured-location {
    font-size: 0.9em;
    color: #777;
    margin-bottom: 15px;
}

.eb-featured-row {
    display: flex;
    justify-content: space-between; 
    gap: 10px; 
    font-size: 0.85em;
    color: #555;
    padding-top: 10px;
    border-top: 1px solid #eee; 
    margin-top: auto;
}

.eb-featured-row span {
    display: flex;
    align-items: center;
    flex-direction: column; 
    text-align: center;
    flex-grow: 1;
}

.eb-featured-row .dashicons {
    font-size: 1.1em;
    margin-right: 0; 
    margin-bottom: 3px;
    color: #174d8c; 
}

/* --- BOTONES DE NAVEGACIÓN DE DESTACADAS --- */
.eb-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    color: black;
    width: 60px;
    height: 60px;
    z-index: 10;
    cursor: pointer;
    font-size: 1.5em; 
    border: none !important;
    box-shadow: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.eb-carousel-nav:hover {
    background: rgba(0, 0, 0, 0.05);
}

.prev-btn {
    left: -20px; 
}

.next-btn {
    right: 0px; 
}

.eb-carousel-nav .dashicons {
    font-size: 2em; 
}

.eb-carousel-nav[disabled] {
    opacity: 1; 
    cursor: default;
}


/* ===================================================================
   MEDIA QUERIES (RESPONSIVE)
   =================================================================== */

@media (max-width: 992px) {
    /* Listado principal */
    .eb-grid-container {
        flex-direction: column;
        gap: 10px;
    }
    .eb-filter-sidebar {
        width: 100%;
        padding: 20px;
    }
    .eb-properties-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* Detalle de propiedad */
    .eb-content-grid {
        flex-direction: column;
        gap: 20px;
    }
    .eb-specs-bar {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    /* Carrusel de Destacadas en móvil */
    .eb-carousel-container .eb-carousel-slide {
        width: 90% !important; 
        min-width: 90% !important;
    }
    .eb-carousel-container {
        padding: 0 40px; 
    }
}

/* --- ESTILOS DE PAGINACIÓN --- */
.eb-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    gap: 8px;
}

.eb-page-link {
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    text-decoration: none;
    color: #333;
    background-color: #f0f0f0;
    border-radius: 4px;
    border: 1px solid #ccc;
    transition: all 0.2s;
    font-weight: 500;
}

.eb-page-link:hover {
    background-color: #e0e0e0;
    border-color: #aaa;
    color: #000;
}

.eb-page-link.current-page {
    background-color: #0073aa; 
    color: white;
    border-color: #0073aa;
    cursor: default;
    pointer-events: none; 
}

.eb-page-dots {
    color: #666;
    padding: 0 5px;
}

/* ===================================================================
   ESTILOS MODERNOS PARA CONTACT FORM 7
   =================================================================== */

/* Estilos para el contenedor del formulario (si usas un wrapper alrededor del shortcode) */
.wpcf7 {
    /* Opcional: Centrar y dar un ancho máximo si no está en un contenedor de columna */
    max-width: 600px;
    margin: 0 auto;
}

/* Contenedor de cada grupo de campo (Label + Input) */
.wpcf7 p {
    margin-bottom: 20px;
}

/* Etiqueta del campo */
.wpcf7 label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: #333; /* Color de texto oscuro */
    font-size: 0.95em;
}

/* Campos de texto, email, teléfono y textarea */
.wpcf7 input:not([type="submit"]),
.wpcf7 textarea {
    /* Diseño Base Moderno */
    margin-top: 5px;
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd; /* Borde suave */
    border-radius: 8px; /* Bordes redondeados modernos */
    background-color: #f9f9f9; /* Fondo muy claro */
    font-size: 1em;
    color: #444;
    transition: border-color 0.3s ease, box-shadow 0.3s ease; /* Transiciones suaves */
    box-sizing: border-box; /* Asegura que el padding no aumente el ancho */
}

/* Estado de Foco (Moderno y Destacado) */
.wpcf7 input:not([type="submit"]):focus,
.wpcf7 textarea:focus {
    border-color: #174d8c; /* Color primario al enfocarse */
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(23, 77, 140, 0.15); /* Sombra de enfoque sutil */
    outline: none;
}

/* Estilo del Textarea */
.wpcf7 textarea {
    resize: vertical; /* Permitir redimensionamiento vertical */
    min-height: 120px;
}

/* Botón de Envío (Submit) */
.wpcf7 input[type="submit"] {
    display: inline-block;
    width: 100%; /* Ocupa todo el ancho */
    padding: 14px 25px;
    margin-top: 15px;
    
    /* Diseño Destacado */
    background-color: #174d8c; /* Color Primario Fuerte */
    color: white;
    border: none;
    border-radius: 8px; 
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

/* Hover y Activo del Botón */
.wpcf7 input[type="submit"]:hover {
    background-color: #103c6b; /* Color un poco más oscuro al pasar el ratón */
}

.wpcf7 input[type="submit"]:active {
    transform: translateY(1px); /* Efecto de "clic" */
}

/* Mensajes de Validación/Error de CF7 (Asegurar visibilidad) */
.wpcf7-response-output {
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
    text-align: center;
}

/* Estilos para el campo no válido (si CF7 lo marca) */
.wpcf7 input.wpcf7-not-valid,
.wpcf7 textarea.wpcf7-not-valid {
    border-color: #d9534f; /* Rojo para error */
}

/* Oculta la etiqueta <p> que contiene el shortcode visible */
.wpcf7 p:has(> [eb_hidden_fields]) { 
    display: none !important;
}

/* Oculta el contenedor del shortcode eb_hidden_fields */
.eb-hide-shortcode {
    display: none !important;
}