/* --- VARIABLES DE MARCA --- */
:root {
    --primary: #1a2a40;    /* Azul Marino Profundo */
    --accent: #c5a059;     /* Dorado Champagne */
    --text: #333333;
    --text-light: #777777;
    --white: #ffffff;
    --border: #eeeeee;
    --bg-soft: #fafafa;
}

/* --- RESET & BASE --- */
* { box-sizing: border-box; }
/* --- FOOTER DISTINGUIDO --- */
.main-footer {
    padding: 80px 0 60px 0; /* Mucho espacio superior para elegancia */
    background-color: var(--white);
    border-top: 1px solid #f0f0f0;
    margin-top: 50px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.footer-logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.4rem;
    letter-spacing: 5px; /* Espaciado entre letras premium */
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
}

.footer-logo span {
    font-weight: 300;
    color: var(--accent);
}

.footer-separator {
    width: 40px;
    height: 1px;
    background-color: var(--accent);
    margin: 20px 0;
}

.footer-tagline {
    font-family: 'Lora', serif;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #999;
    margin: 0;
}

/* Ajuste responsivo para el footer */
@media (max-width: 768px) {
    .main-footer {
        padding: 50px 0;
    }
} { 
    margin: 0; 
    font-family: 'Raleway', sans-serif; 
    color: var(--text); 
    background-color: var(--white); /* Fondo blanco puro para elegancia */
    line-height: 1.6;
}

.container { 
    max-width: 1140px; 
    margin: 0 auto; 
    padding: 0 20px; 
}

img { max-width: 100%; height: auto; }

/* --- HEADER DISTINGUIDO --- */
.main-header { 
    padding: 25px 0; 
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: rgba(255,255,255,0.98);
    z-index: 1000;
}

.nav-container { display: flex; justify-content: space-between; align-items: center; }

.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-icon { 
    background: var(--primary); color: white; 
    width: 38px; height: 38px; border-radius: 50%; 
    display: flex; align-items: center; justify-content: center; 
    font-weight: bold; font-family: 'Playfair Display', serif;
}
.logo-text { 
    font-family: 'Playfair Display', serif; font-size: 1.3rem; 
    letter-spacing: 2px; color: var(--primary); font-weight: 700;
}
.logo-text span { color: var(--accent); font-weight: 300; }

.main-nav { display: flex; align-items: center; gap: 25px; }
.main-nav a { 
    text-decoration: none; color: var(--text); 
    font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px;
    transition: 0.3s;
}
.main-nav a:hover { color: var(--accent); }

/* --- BOTÓN LOGIN --- */
.btn-login { 
    border: 1px solid var(--primary); padding: 8px 20px; 
    border-radius: 2px; font-weight: 600;
}

/* --- BARRA DE BÚSQUEDA (INDEX) --- */
.search-section { padding: 40px 0; background: var(--bg-soft); border-bottom: 1px solid var(--border); }
.search-bar { 
    display: grid; grid-template-columns: 2fr 1fr 1fr 0.5fr; gap: 10px;
    background: white; padding: 10px; border-radius: 4px; border: 1px solid var(--border);
}
.search-bar input, .search-bar select { border: none; padding: 10px; font-family: 'Raleway'; outline: none; }
.btn-search { background: var(--primary); color: white; border: none; cursor: pointer; font-weight: 600; border-radius: 2px; }

/* --- GRID DE PROPIEDADES (INDEX) --- */
.property-grid { 
    display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); 
    gap: 40px; margin: 50px 0; 
}
.property-card { border: 1px solid var(--border); transition: 0.4s; position: relative; }
.property-card:hover { box-shadow: 0 15px 35px rgba(0,0,0,0.05); transform: translateY(-5px); }
.card-image { height: 240px; overflow: hidden; }
.card-image img { width: 100%; height: 100%; object-fit: cover; }
.card-content { padding: 25px; }
.card-content h3 { 
    margin: 0; font-family: 'Playfair Display', serif; 
    font-size: 1.6rem; color: var(--primary); 
}
.address { color: var(--text-light); margin: 5px 0 15px 0; font-size: 0.9rem; }
.specs-inline { font-size: 0.85rem; border-top: 1px solid #f5f5f5; padding-top: 15px; color: #666; }

/* --- DETALLE DE PROPIEDAD (DETALLE.HTML) --- */
.detail-layout { 
    display: grid; grid-template-columns: 2fr 1fr; 
    gap: 50px; margin: 40px 0; 
}

.price-box { margin-bottom: 30px; }
.price-box h1 { font-family: 'Playfair Display', serif; font-size: 2.8rem; margin: 0; color: var(--primary); }
.tag-venta { color: var(--accent); text-transform: uppercase; font-size: 0.8rem; font-weight: 700; letter-spacing: 1px; }

/* Carrusel */
/*.carousel { position: relative; width: 100%; height: 500px; background: #000; overflow: hidden; margin-bottom: 40px; }
.carousel-inner img { width: 100%; height: 100%; object-fit: cover; display: none; }
.carousel-inner img.active { display: block; animation: fade 0.5s; }*/

/* Grilla Técnica */
.tech-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 30px; border-top: 1px solid var(--border); padding-top: 30px; }
.tech-col h4 { font-family: 'Playfair Display', serif; font-size: 1.1rem; margin-bottom: 15px; color: var(--primary); }
.tech-col ul { list-style: none; padding: 0; font-size: 0.9rem; }
.tech-col li { margin-bottom: 10px; color: var(--text-light); }
.tech-col li strong { color: var(--text); }

/* Colapsable */
.hidden-content { display: none; margin-top: 15px; }
.hidden-content.show { display: block; }
.view-more-btn { background: none; border: none; color: var(--accent); font-weight: 700; cursor: pointer; padding: 0; font-size: 0.85rem; }

/* Sidebar */
.sidebar-box { border: 1px solid var(--border); padding: 30px; margin-bottom: 30px; border-radius: 2px; }
.agent-header { display: flex; align-items: center; gap: 15px; margin-bottom: 25px; }
.agent-img { width: 60px; height: 60px; border-radius: 50%; }
.btn-primary { background: var(--primary); color: white; border: none; width: 100%; padding: 15px; cursor: pointer; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; transition: 0.3s; }
.btn-primary:hover { background: var(--accent); }

.contact-card {
    background: var(--light-bg);
    padding: 30px;
    border-radius: 8px;
}

.contact-card input, .contact-card textarea {
    width: 100%;
    margin-bottom: 15px;
    padding: 10px;
    border: 1px solid #ddd;
    box-sizing: border-box;
}

/* --- RESPONSIVIDAD (MÓVIL) --- */
@media (max-width: 992px) {
    .detail-layout { grid-template-columns: 1fr; }
    .search-bar { grid-template-columns: 1fr; }
    .nav-container { flex-direction: column; gap: 20px; }
}

@media (max-width: 768px) {
    .tech-grid { grid-template-columns: 1fr; gap: 20px; }
    /*.carousel { height: 300px; }*/
    .price-box h1 { font-size: 2rem; }
    .main-nav { flex-wrap: wrap; justify-content: center; gap: 15px; }
}

@keyframes fade { from { opacity: 0.5; } to { opacity: 1; } }

/* --- CAROUSEL ACTUALIZADO (MÁS GRANDE Y COMPLETO) --- */
.carousel { 
    position: relative; 
    width: 100%; 
    height: 600px; /* Aumentamos la altura de 450px/500px a 600px */
    background: #111; /* Fondo oscuro para que las fotos resalten si no ocupan todo el ancho */
    overflow: hidden; 
    margin-bottom: 40px;
    border-radius: 4px; /* Un toque de elegancia en los bordes */
}

.carousel-inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center; /* Centra la foto verticalmente si es más baja */
    justify-content: center; /* Centra la foto horizontalmente */
}



.carousel-inner img.active { 
    display: block; 
    animation: fadeIn 0.8s ease-in-out; 
}

/* Botones de navegación con mejor visibilidad */
.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 20px 15px;
    cursor: pointer;
    font-size: 24px;
    transition: 0.3s;
    z-index: 10;
}

.prev:hover, .next:hover { background: rgba(255, 255, 255, 0.5); }
.next { right: 0; }

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Ajuste para celulares: bajamos la altura para que no ocupe toda la pantalla */
@media (max-width: 768px) {
    .carousel { height: 350px; }
}

.carousel-inner img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; /* Ahora sí, porque tus fotos están estandarizadas */
    display: none; 
}

/* estilos del formulario d contacto */
/* Estilos para el input de error */
.form-control {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #eeeeee;
    border-radius: 2px;
    font-family: 'Raleway', sans-serif;
    outline: none;
    transition: border-color 0.3s;
}

.form-control:focus {
    border-color: var(--accent);
}

.btn-submit {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 30px;
    cursor: pointer;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: 0.3s;
    display: inline-block; /* Importante para que el mensaje salga al lado */
}

.btn-submit:hover {
    background: var(--accent);
}

/* Animación de entrada para el mensaje de OK */
@keyframes fadeIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

/* --- FOOTER DISTINGUIDO --- */
.main-footer {
    padding: 80px 0 60px 0; /* Mucho espacio superior para elegancia */
    background-color: var(--white);
    border-top: 1px solid #f0f0f0;
    margin-top: 50px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.footer-logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.4rem;
    letter-spacing: 5px; /* Espaciado entre letras premium */
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
}

.footer-logo span {
    font-weight: 300;
    color: var(--accent);
}

.footer-separator {
    width: 40px;
    height: 1px;
    background-color: var(--accent);
    margin: 20px 0;
}

.footer-tagline {
    font-family: 'Lora', serif;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #999;
    margin: 0;
}

/* Ajuste responsivo para el footer */
@media (max-width: 768px) {
    .main-footer {
        padding: 50px 0;
    }
}

/* Asegura que el video se comporte como las imágenes del carrusel */
.carousel-inner video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* O 'contain' si prefieres ver el video completo sin recortes */
    display: none;
}

.carousel-inner video.active {
    display: block;
    animation: fadeIn 0.8s ease-in-out;
}