/*
 * Archivo: style.css
 * URL: assets/css/style.css
 */

/* Variables de Color */
:root {
    --main-color: #221FFF; /* Color principal */
    --accent-color: #FF1F26; /* Color de acento (rojo) */
    --header-bg-color: #1506F3; /* Fondo de Header/Search Box */
    --white-color: #FFFFFF;
}

/* Base y Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: var(--white-color);
    color: #333;
}

/* 2. Caja div contenedora */
#main-container {
    width: 100%;
    /* Altura 100% solo se usa con viewports (vh) para asegurar la altura de la ventana */
    min-height: 100vh; 
    background-color: var(--main-color);
    padding-top: 50px; /* Espacio para el header fijo si se aplica */
}

/* 3. Header */
.main-header {
    background-color: var(--header-bg-color);
    color: var(--accent-color);
    text-align: center;
    padding: 10px 0;
    position: fixed; /* Fijo en la parte superior */
    top: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid var(--white-color); /* Borde de 1px color #FFFFFF */
}

.main-header h1 {
    font-size: 1.8em;
    margin: 0;
    text-shadow: 1px 1px 1px #000; /* Bordeado sutil */
}

/* 4. Nav */
.main-nav {
    background-color: var(--main-color);
    padding: 10px 20px;
    z-index: 999;
}

.main-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.main-nav ul li {
    margin: 5px 10px;
}

.main-nav a, .main-nav span {
    color: var(--white-color);
    text-decoration: none;
    padding: 5px 10px;
    display: block;
    transition: background-color 0.3s;
}

.main-nav a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.main-nav select {
    padding: 5px;
    border-radius: 4px;
    background-color: var(--white-color);
    color: var(--main-color);
}

/* 1. Contenedor de secciones 3 a 11 (dentro de la 2, menos 1 y 2) */
.content-wrapper {
    background-color: var(--white-color); /* Fondo para las secciones internas */
}

/* 5. Hero/Search */
.hero-search {
    height: 540px; /* Altura 300px */
    width: 100%; /* Ancho 100% */
    background-image: url('../img/site/mostrando.png');
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.search-box {
    width: 1330px; /* Ancho 1330px */
    height: 140px; /* Alto 140px */
    background-color: var(--header-bg-color);
    color: var(--accent-color);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

.search-box h2 {
    font-size: 1.5em;
    margin-bottom: 10px;
}

.search-box form {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.search-box select, .search-box input[type="number"], .search-box input[type="submit"] {
    padding: 10px;
    border: none;
    border-radius: 4px;
}

.search-box input[type="submit"] {
    background-color: var(--accent-color);
    color: var(--white-color);
    cursor: pointer;
    font-weight: bold;
}

/* 6. Map */
.property-map {
    width: 100%;
    padding: 20px;
    text-align: center;
}

.map-placeholder {
    width: 100%;
    height: 400px; /* Alto 400px */
    background-color: #ddd;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #666;
    border: 1px solid #ccc;
    margin-top: 10px;
}

/* 7. Property Carousel */
.property-carousel-section {
    padding: 20px;
    text-align: center;
}

.carousel-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.property-card {
    border: 1px solid #ccc;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.property-card .property-type {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--accent-color);
    color: var(--white-color);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    z-index: 10;
}

.carousel-wrapper {
    position: relative;
}

.cost-overlay {
    position: absolute;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: var(--white-color);
    padding: 5px 10px;
    font-weight: bold;
    z-index: 10;
}

.image-carousel {
    width: 100%;
    height: 200px; /* Altura fija para la imagen del carrusel */
    overflow: hidden;
    position: relative;
}

.image-carousel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: pointer;
}

.zoom-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.6);
    color: var(--white-color);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    font-size: 18px; /* Tamaño del ícono */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.3s;
    /* Dimensiones requeridas 18px * 18px para el ícono/lupa */
    /* La lupa como botón tendrá un tamaño mayor para ser clickeable */
}

.owner-status {
    background-color: var(--main-color);
    color: var(--white-color);
    padding: 5px 10px;
    display: block;
    font-size: 0.9em;
}

.property-details {
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    font-size: 0.9em;
}

.property-details span i {
    color: var(--accent-color);
    margin-right: 5px;
}

/* Modal de Zoom */
.modal {
    display: none; /* Oculto por defecto */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 800px;
    position: relative;
    border-radius: 8px;
    text-align: center;
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    left: 10px; /* Posición superior izquierda */
    cursor: pointer;
}

.zoom-carousel {
    width: 300px; /* Ancho requerido para la imagen grande */
    height: 300px; /* Alto requerido para la imagen grande */
    margin: 20px auto;
    overflow: hidden;
    position: relative;
}

.zoom-carousel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none; /* Se maneja con JS para mostrar solo una */
}

.zoom-carousel img:first-child {
    display: block; /* Muestra la primera por defecto */
}

.zoom-thumbnails img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    margin: 5px;
    cursor: pointer;
    border: 2px solid transparent;
}

.zoom-thumbnails img:hover {
    border-color: var(--accent-color);
}


/* 8. Paginación */
.pagination {
    text-align: center;
    padding: 20px;
}

.page-link {
    display: inline-block;
    padding: 8px 15px;
    margin: 0 4px;
    text-decoration: none;
    color: var(--main-color);
    border: 1px solid var(--main-color);
    border-radius: 4px;
}

.page-link.active {
    background-color: var(--main-color);
    color: var(--white-color);
}

/* 9. Testimonials */
.testimonials {
    padding: 40px 20px;
    background-color: #f4f4f4;
    text-align: center;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.testimonial-card {
    background-color: var(--white-color);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: left;
}

.testimonial-card .rating i {
    color: gold;
}

.testimonial-card .name {
    font-weight: bold;
    margin-top: 10px;
    color: var(--main-color);
}

/* 10. Contact Form */
.contact-form {
    padding: 40px 20px;
    text-align: center;
}

.contact-form form {
    max-width: 600px;
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
}

.contact-form textarea {
    resize: vertical;
    min-height: 100px;
}

.contact-form button {
    background-color: var(--main-color);
    color: var(--white-color);
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.contact-form button:hover {
    background-color: #1a1a9f;
}

/* 11. Footer */
.main-footer {
    background-color: #333;
    color: var(--white-color);
    padding: 20px;
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 20px;
    font-size: 0.9em;
}

.main-footer h3 {
    color: var(--accent-color);
    margin-bottom: 10px;
}

/* 12. Botones flotantes */
#scroll-to-top, #whatsapp-btn {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 50px;
    height: 50px;
    background-color: var(--accent-color);
    color: var(--white-color);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5em;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 1001;
}

#whatsapp-btn {
    bottom: 80px; /* Separado del botón de subir */
    background-color: #25D366; /* Color de WhatsApp */
}


/* Responsive Design */
@media (max-width: 1350px) {
    .search-box {
        width: 90%; /* Ajuste para el cuadro de búsqueda en pantallas medianas */
    }
}

@media (max-width: 768px) {
    .main-nav ul {
        flex-direction: column;
    }

    .search-box form {
        flex-direction: column;
        gap: 5px;
    }

    .search-box select, .search-box input {
        width: 100%;
    }

    .main-footer {
        flex-direction: column;
    }

    .testimonial-grid {
        grid-template-columns: 1fr;
    }
}