﻿/* =============== 
   FAMILY HOUSES - CSS UNIFICADO 
   Versión: 1.1 - Corregido y optimizado
   =============== */

:root {
    --primary: #4e3652;
    --dark: #222;
    --gray: #555;
    --light-gray: #f8f8f8;
    --white: #fff;
    --shadow: 0 4px 12px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--dark);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
    margin-top: 60px; /* Compensa top-header (60px) */
}

h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 200;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px; /* antes 0 20px */
}

/* === Centrar títulos === */
.about-content,
.tittle {
    max-width: 1000px;
    margin: 0 auto;
    text-align: left; /* antes center */
}

/* === Top Header - Responsivo y visible en móvil === */
.top-header {
    background-color: #4e3652;
    color: white;
    font-size: 14px;
    padding: 8px 0 4px;   /* === arriba, lateral, derecho === */
    position: static; /* No uses fixed no estoy seguro 24/08/25*/
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    min-height: 40px;
    z-index: 1010;
}

.top-header .contact-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 5px;
}

.top-header .contact-info span,
.top-header .contact-info a {
    color: white !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

@media (max-width: 768px) {
    .top-header {
        flex-direction: column;
        gap: 5px;
    }
    .top-header .contact-info {
        margin-bottom: 5px;
    }
}

/* Alturas fijas para controlar el diseño 21 08 25*/
.top-header {
    height: 100px;
}

/* === Navbar fijo (contenedor dinámico) ============================ */
#navbar-container {
    position: fixed;
    top: 60px; /* Debajo del top-header */
    left: 0;
    width: 100%;
    z-index: 1030;
    pointer-events: none;
}

#navbar-container .navbar {
    pointer-events: auto;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-bottom: 1px solid #eee;
    transition: background 0.3s ease;
}

/* === Estilos del navbar (inyectado) === */
.navbar {
    padding: 0.8rem 0;
}

.navbar-brand {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem; /* === Tamaño de letra del logo === */
    font-weight: 500;
    color: var(--primary) !important;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.navbar-brand img {
    max-height: 40px;
    max-width: 180px;
    width: auto;
    height: auto;
}

.nav-link {
    color: var(--dark) !important;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-link.active {
    background-color: var(--primary) !important;
    color: white !important;
    border-radius: 8px;
    padding: 1px 4px;
    font-weight: 600;
    box-shadow: 0 0 0 2px rgba(78, 54, 82, 0.3);
}

.navbar-nav {
    flex-wrap: nowrap;
}

.navbar-collapse {
    overflow: visible !important;
}

/* === Hero === */
.hero {
    text-align: center;
    padding: 20px 20px 20px; /* === antes 60px 20px 40px === */
    background: var(--light-gray);
    color: var(--dark);
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 16px;
    line-height: 1.3;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
    line-height: 1.2; /* === altura entre lineas === */
}

.hero h2 {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.hero p {
    font-size: 1.1rem;
    color: var(--gray);
    max-width: 1000px;           /* Ancho máximo del párrafo */
    margin: 0 auto 20px;        /* Centra el texto y agrega espacio abajo */
    line-height: 1.6;           /* Mejora la legibilidad */
    text-align: center;         /* Asegura que el texto esté centrado */
}

@media (max-width: 768px) {
    .hero p {
        max-width: none; /* Vuelve al 100% en móviles */
        padding: 0 15px;
    }
}

/* === Swiper - Fondo más transparente y texto en la parte inferior === */
.swiper {
    width: 100%;
    height: 800px; /* Altura más realista antes decia 600*/
    margin-bottom: 40px;
    position: relative; /* Necesario para que el absolute funcione */
    overflow: hidden;
}

.swiper-slide {
    background-size: cover;
    background-position: center;
    height: 100%;
}

.slide-content {
    position: absolute;
    bottom: 20px; /* Ajusta para subir o bajar el texto */
    left: 50%;
    transform: translateX(-50%);
    background: none; /* Fondo  antes rgba(0, 0, 0, 0.1) semi-transparente 0.7*/
    /* eliminado: backdrop-filter: blur(8px); Efecto de vidrio*/
    /* eliminado: box-shadow: 0 4px 15px rgba(0,0,0,0.2);*/
    /* eliminado: border: 1px solid rgba(255, 255, 255, 0.2);; borde de recuadro*/
    padding: 25px 40px;
    border-radius: 12px;
    max-width: 1000px; /* antes 800 */
    width: 90%;
    text-align: center;
    color: white;
    z-index: 2;       
}

.slide-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
    color: white;
}

.slide-content p {
    font-size: 1rem;
    color: #ddd;
    margin: 0;
}

/* Botones de navegación */
.swiper-button-next,
.swiper-button-prev {
    color: white;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 2rem;
}

/* Indicadores */
.swiper-pagination {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

/* Ajuste para móviles */
@media (max-width: 768px) {
    .swiper {
        height: 400px;
    }
    .slide-content {
        padding: 20px 30px;
        max-width: 90%;
    }
    .slide-content h2 {
        font-size: 1.6rem;
    }
    .slide-content p {
        font-size: 0.9rem;
    }
}

/* === Ajuste para móviles muy pequeños (hasta 480px) === */
@media (max-width: 480px) {
    .swiper {
        height: 280px;
    }
    .slide-content {
        padding: 12px 16px;
        max-width: 85%;
        border-radius: 8px;
    }
    .slide-content h2 {
        font-size: 1.2rem;    /* Título más pequeño */
        line-height: 1.3;
        margin-bottom: 8px;
    }
    .slide-content p {
        font-size: 0.8rem;    /* Texto secundario más pequeño */
    }
}

/* === Ajuste adicional para pantallas verticales con alta densidad === */
@media (max-height: 600px) and (max-width: 768px) {
    .slide-content {
        bottom: 20px; /* Sube el texto si la pantalla es muy corta */
    }
    .swiper-pagination {
        bottom: 10px;
    }
}

/* el tiempo entre imagenes se regula en script.js */

/* === Nuestra Propuesta (3 en fila) === */
.construction-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 40px;
}

.construction-item {
    flex: 1;
    min-width: 280px;
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.construction-item:hover {
    transform: translateY(-5px);
}

.cns-img img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.cns-content {
    padding: 20px;
}

.cns-content h3 {
    margin-bottom: 12px;
    font-size: 1.4rem;
    color: var(--dark);
}

/* === Galería Responsiva (única definición) ================================ */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 30px;
}

.gallery-item {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gallery-grid a {
    display: block;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--white);
    transition: transform 0.3s ease;
    text-decoration: none;
}

/* Imágenes y videos */
.gallery-item img,
.gallery-item .video-container {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Títulos en galería */
.gallery-item h4,
.gallery-grid a h4,
.blog_content h4 {
    text-align: left;
    font-size: 0.95rem;
    color: var(--dark);
    margin: 10px 0;
    padding: 0 10px;
    line-height: 1.4;
    font-weight: 400;
}

/* === Features Por qué elegirnos === */
.features {
    padding: 40px 0;
    background: var(--white);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    text-align: left;
    padding: 30px;
    background: #4e3652);
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.feature-card i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.feature-card h4 {
    margin-bottom: 10px;
    font-size: 1.3rem;
}

/* === Cards con hover === */
.feature-card, .remodel-card {
    transition: transform 0.3s, box-shadow 0.3s;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.feature-card:hover, .remodel-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

/* === Two-column === */
.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    padding: 80px 0;
}

.two-column img {
    width: 100%;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.checklist {
    margin-top: 20px;
}

.check-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    font-size: 1rem;
}

.check-item i {
    color: var(--primary);
    margin-right: 10px;
    font-size: 1.2rem;
}

/* === Achievements (nosotros.html) === */
.achievements {
    padding: 80px 0;
    background: var(--light-gray);
    text-align: center;
}

.achievements h2 {
    color: var(--primary);
    margin-bottom: 50px;
    font-size: 2.2rem;
}

.achievement-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.achievement-item {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.counter {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 10px;
}

.achievement-item h4 {
    font-size: 1.2rem;
    color: var(--dark);
    margin: 0;
}

/* === Modelos Section === */
.model-section {
    padding: 20px 0;
    background: var(--light-gray);
}

.model-header {
    text-align: center;
    margin-bottom: 30px;
}

.model-header h3 {
    font-size: 1.4rem;
    color: var(--dark);
    font-weight: 500;
}

.model-gallery-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    overflow-x: auto;
    padding: 10px 0 20px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.model-gallery-row::-webkit-scrollbar {
    height: 8px;
}

.model-gallery-row::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

.model-img {
    min-width: 280px;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--white);
}

.model-img img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.model-img:hover img {
    transform: scale(1.05);
}

.label {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0,0,0,0.6);
    color: white;
    font-size: 0.9rem;
    padding: 8px;
    text-align: center;
}

.model-img.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    border: 2px dashed #ccc;
}

/* === Remodelaciones === */
.remodelaciones {
    padding: 80px 0;
}

.remodel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.remodel-card {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.remodel-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.remodel-card h3 {
    margin: 15px 0;
    font-size: 1.4rem;
    text-align: center;
}

/* === Footer - Diseño moderno y responsive === */
footer {
    background: #4e3652; /* Color corporativo: violeta oscuro */
    color: white;
    padding: 30px 0 20px; /* Espacio arriba más generoso, abajo ajustado */
    font-size: 14px;
    width: 100%;
    margin: 60px 0 0;
    clear: both;
    min-height: auto;
}

footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Títulos en el footer */
footer h4, footer h6 {
    color: white;
    margin: 0 0 10px 0;
    font-weight: 500;
}

footer h4 {
    font-size: 1.5rem;
}

footer h6 {
    font-size: 1.1rem;
}

/* Texto y enlaces */
footer p {
    margin: 0;
    line-height: 1.5;
    color: #ddd;
    font-size: 0.95rem;
}

footer a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

footer a:hover {
    color: #e0c8f7; /* Tonos suaves y elegantes */
}

/* Alineación en móviles */
footer .text-center {
    text-align: center !important;
}

footer .align-items-center {
    align-items: center;
}

/* Redes sociales */
.social-links {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 8px;
}

.social-links a {
    font-size: 20px;
}

.social-links a:hover {
    transform: scale(1.1);
}

/* Iconos de contacto */
footer i.fas {
    font-size: 14px;
    width: 18px;
    text-align: center;
}

/* Línea divisoria */
footer hr {
    border-top: 1px solid #666;
    margin: 20px 0;
    opacity: 0.3;
}

/* Derechos reservados */
footer small {
    color: #ccc;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Responsive en pantallas pequeñas */
@media (max-width: 768px) {
    footer .row > div {
        text-align: center !important;
        margin-bottom: 15px;
    }
    footer .social-section {
        text-align: center;
    }
    footer .social-links {
        justify-content: center;
    }
    footer [class*="col-"] {
        text-align: center !important;
    }
}

/* === WhatsApp === */
.whatsapp {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2em;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 1000;
    transition: var(--transition);
}

.whatsapp:hover {
    transform: scale(1.1);
}

/* Reducir tamaño en dispositivos móviles */
@media (max-width: 767px) {
    .whatsapp {
        width: 45px;
        height: 45px;
        font-size: 1.5em;
    }

    .whatsapp:hover {
        transform: scale(1.05); /* Ajusta el hover también si quieres */
    }
}
/* === Cookies === */
.cookies {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    padding: 15px;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.1);
    text-align: center;
    z-index: 10000;
    display: none;
    font-size: 14px;
    line-height: 1.5;
}

.cookies button {
    margin-top: 10px;
    padding: 8px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* === Media Queries === */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.2rem;
    }
    .hero h2 {
        font-size: 1.6rem;
    }
    .top-header {
        padding: 10px 0;
        font-size: 14px;
    }
    .top-header .contact-info {
        gap: 5px;
    }
    .top-header .contact-info span,
    .top-header .contact-info a {
        font-size: 13px;
    }
}

/* Ajuste para móviles pequeños */
@media (max-width: 575.98px) {
    body {
        margin-top: 50px;
    }
    .top-header {
        min-height: 50px;
        padding: 10px 0;
    }
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* === Estilo para enlaces en la página de contacto === */
.contact-info a,
.contact-info .social-links a {
    color: #000; /* Negro */
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-info a:hover,
.contact-info .social-links a:hover {
    color: #333; /* Gris oscuro al pasar el mouse */
}

/* === Efectos modernos y animaciones === */
.animated {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease;
}
.animated.visible {
    opacity: 1;
    transform: translateY(0);
}

/* === Tooltip informativo - agrega una i para el popup 31 08 25 === */
.info-tooltip-wrapper {
    position: relative;
    display: inline-block;
    cursor: help;
    margin-left: 5px;
    font-size: 14px;
    color: #007bff;
    vertical-align: middle;
}

.info-tooltip-wrapper .info-tooltip-text {
    visibility: hidden;
    width: auto;
    max-width: 300px;
    min-width: 200px;
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    font-size: 14px;
    border-radius: 6px;
    padding: 12px 16px;
    position: absolute;
    z-index: 1000; /* Alto, pero puede no ser suficiente */
    bottom: 140%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    line-height: 1.4;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    word-wrap: break-word;
    white-space: normal;
    text-align: left;
}

.info-tooltip-wrapper .info-tooltip-text::before {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-left: -5px;
    border-width: 6px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.9) transparent transparent transparent;
}

.info-tooltip-wrapper:hover .info-tooltip-text {
    visibility: visible;
    opacity: 1;
}
/* === Prevención de corte en tooltips === */
.feature-card,
.features,
.container,
.swiper,
.swiper-wrapper,
.swiper-slide {
    overflow: visible !important;
    z-index: auto !important;
}

/* Evita que el navegador agregue viñetas o símbolos automáticos */
.budget-list {
    list-style-type: none; /* Elimina viñetas automáticas */
    margin: 0;
    padding-left: 0;
}

.budget-list li {
    position: relative;
    padding: 0.5rem 0;
    counter-increment: item-counter;
}

.budget-list li::before {
    content: counter(item-counter) ". ";
    font-weight: bold;
    color: #0d6efd;
    margin-right: 0.5rem;
}

/* Asegura que el tooltip no se muestre como cuadro */
.info-tooltip-wrapper {
    display: inline-block;
    margin-left: 0.3rem;
    cursor: pointer;
    color: #0d6efd;
    border: none;
    background: none;
    padding: 0;
    font-size: 0.8em;
}

.info-tooltip-wrapper .fa-info-circle {
    vertical-align: middle;
}

/* === Separación entre posts del blog === */
.blog-post {
    margin-bottom: 2rem; /* Espacio grande entre posts */
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee; /* Línea sutil de separación */
}

/* Elimina el borde del último post */
.blog-post:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

/* Asegura que el contenedor de video no tenga márgenes extraños */
.video-container {
    margin: 1.5rem 0;
}

/* Estilo para enlaces externos */
.blog-external-link {
    margin-top: 1rem;
}

/* Responsive: menos espacio en móviles */
@media (max-width: 768px) {
    .blog-post {
        margin-bottom: 2.5rem;
        padding-bottom: 1.5rem;
    }
}
