/* --- Variables de Color y Fuentes --- */
:root {
    --primary-color: #0b1e36; 
    --accent-blue: #3b82a6;  
    --text-muted: #555555;   
    --bg-light: #ffffff;
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-light);
    overflow-x: hidden;
    padding-top: 70px; /* Compensación por el Navbar fijo */
}

/* ================= BARRA DE NAVEGACIÓN (NAVBAR) ================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background-color: rgba(11, 30, 54, 0.95);
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 10000;
}

.nav-container {
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.nav-brand {
    color: #ffffff;
    font-size: 1.4rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.5px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent-blue);
}

/* ================= DISEÑO ESTRUCTURAL GENERAL ================= */
.hero-container, .about-container, .clients-container, 
.business-container, .specialties-title-container, .spec-detail-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
    position: relative;
    flex-wrap: wrap;
}

.hero-left, .hero-right, .about-left, .about-right, 
.clients-left, .clients-right, .business-left, .business-right,
.spec-title-left, .spec-title-right, .spec-detail-left, .spec-detail-right {
    flex: 1 1 50%;
    position: relative;
}

/* --- Vinculación de imágenes con dobles comillas --- */
.img-bg-hero { background-image: url("herramientas construccion.png"); }
.img-bg-about { background-image: url("piezas industriales.png"); }
.img-bg-clients { background-image: url("compas.png"); }
.img-bg-business { background-image: url("laptop y casco.png"); }
.img-bg-spec-title { background-image: url("plomería y planos.png"); }
.img-bg-spec-1 { background-image: url("instalación de tejas.png"); }
.img-bg-spec-2 { background-image: url("instalación de la grifería con la llave ajustable.png"); }
.img-bg-spec-3 { background-image: url("motores industriales.png"); }
.img-bg-spec-4 { background-image: url("camión de transporte de residuos peligrosos.png"); }

.hero-right, .about-left, .clients-left, .business-right, 
.spec-title-left, .image-side {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll !important; /* Asegura el comportamiento estático sin zoom */
    min-height: 500px;
}

/* Logos Corporativos */
.main-logo {
    max-width: 240px;
    height: auto;
    display: block;
}

/* Insignias Flotantes */
.floating-badge {
    position: absolute;
    top: 50%;
    z-index: 10;
}
.hero-badge, .about-badge, .clients-badge, .business-badge, .spec-title-badge, .spec-detail-badge {
    left: 50%;
    transform: translate(-50%, -50%);
}
.spec-detail-badge-right {
    right: 50%;
    top: 50%;
    transform: translate(50%, -50%);
}

.icon-circle {
    width: 100px;
    height: 100px;
    background-color: var(--accent-blue);
    border: 4px solid #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}
.icon-circle i {
    color: #ffffff;
    font-size: 2.5rem;
    transition: transform 0.5s ease; 
}
.icon-circle:hover i {
    transform: rotate(25deg) scale(1.1);
}

/* ================= SECCIÓN 1: HERO ================= */
.hero-left { display: flex; flex-direction: column; justify-content: space-between; padding: 3rem 10% 3rem 8%; }
.hero-content { margin: 4rem 0; }
.hero-content h1 { font-size: 3.5rem; font-weight: 700; color: var(--primary-color); text-transform: uppercase; margin-bottom: 1rem;}
.hero-content .subtitle { font-size: 1.35rem; color: var(--text-muted); line-height: 1.5; max-width: 500px; }
.date-text { font-size: 1rem; font-weight: 600; color: var(--primary-color); }
.hero-right { border-left: 2px solid #eaeaea; }

/* ================= SECCIÓN 2: NUESTRA EMPRESA ================= */
.about-left { border-right: 2px solid #eaeaea; }
.about-right { display: flex; align-items: center; padding: 5rem 8% 5rem 10%; }
.about-content h2 { font-size: 2.8rem; font-weight: 700; color: var(--primary-color); margin-bottom: 2rem; }
.about-content p { font-size: 1.1rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 1.5rem; text-align: justify; }

/* ================= SECCIÓN 3: CLIENTES ================= */
.clients-left { border-right: 2px solid #eaeaea; }
.clients-right { display: flex; align-items: center; justify-content: center; padding: 5rem 5%; }
.clients-content h2 { font-size: 2.6rem; font-weight: 700; color: var(--primary-color); margin-bottom: 3rem; text-align: center; }
.logos-stack { display: flex; flex-direction: column; align-items: center; gap: 2.5rem; }

.client-logo-wrapper {
    width: 240px;
    height: 75px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.client-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* ================= SECCIÓN 4: ÁREAS DE NEGOCIOS ================= */
.business-left { display: flex; align-items: center; padding: 5rem 10% 5rem 8%; }
.business-content h2 { font-size: 2.5rem; font-weight: 700; color: var(--primary-color); margin-bottom: 2.5rem; }
.business-content h3 { font-size: 1.4rem; font-weight: 700; color: #000000; margin-bottom: 1.2rem; }
.business-content p { font-size: 1.05rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 1.5rem; }
.business-content .list-intro { font-weight: 600; color: var(--primary-color); margin-bottom: 0.8rem; }
.specialties-list { list-style: none; padding-left: 5px; }
.specialties-list li { font-size: 1.1rem; font-weight: 600; color: #000000; margin-bottom: 0.4rem; }
.business-right { border-left: 2px solid #eaeaea; }

/* ================= SECCIÓN 5: TITULAR ESPECIALIDADES ================= */
.spec-title-left { border-right: 2px solid #eaeaea; }
.spec-title-right { display: flex; align-items: center; padding: 5rem 10%; }
.spec-title-content h2 { font-size: 3.5rem; font-weight: 700; color: var(--primary-color); letter-spacing: 2px; }

/* ================= ESTILOS DESGLOSE DE ESPECIALIDADES ================= */
.spec-detail-content { width: 100%; }
.spec-detail-content h2 { font-size: 2.5rem; font-weight: 700; color: var(--primary-color); margin-bottom: 2rem; line-height: 1.2; }
.bullet-list { list-style: none; padding-left: 0; }
.bullet-list li { font-size: 1.1rem; color: #000000; line-height: 1.6; margin-bottom: 0.6rem; position: relative; padding-left: 20px; }
.bullet-list li::before { content: "•"; color: var(--primary-color); font-weight: bold; font-size: 1.3rem; position: absolute; left: 0; top: -2px; }

.sub-block { margin-bottom: 2rem; }
.sub-block:last-child { margin-bottom: 0; }
.sub-block h3 { font-size: 1.15rem; font-weight: 700; color: var(--primary-color); margin-bottom: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; }

/* Cortes Diagonales Estilizados */
@media (min-width: 993px) {
    .type-diagonal-left .image-side { clip-path: polygon(0 0, 100% 0, 85% 100%, 0 100%); z-index: 2; }
    .type-diagonal-left .text-side { margin-left: -7%; padding: 5rem 8% 5rem 12%; display: flex; align-items: center; }
    
    .type-diagonal-right .text-side { padding: 5rem 12% 5rem 8%; display: flex; align-items: center; z-index: 2; }
    .type-diagonal-right .image-side { clip-path: polygon(15% 0, 100% 0, 100% 100%, 0 100%); margin-left: -7%; }
}

/* ================= SECCIÓN 10: CONTACTO / FOOTER ================= */
.footer-container {
    display: flex;
    width: 100%;
    min-height: 60vh;
    background-color: var(--bg-light);
    position: relative;
    align-items: center;
    padding: 4rem 5%;
}

.footer-graphics {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 35%;
    overflow: hidden;
}

.triangle-layer { position: absolute; top: 0; left: 0; height: 100%; width: 100%; }
.layer-1 { background-color: #0b1e36; clip-path: polygon(0 0, 100% 50%, 0 100%); z-index: 1; }
.layer-2 { background-color: #17365d; clip-path: polygon(0 0, 85% 50%, 0 100%); z-index: 2; }
.layer-3 { background-color: #265584; clip-path: polygon(0 0, 70% 50%, 0 100%); z-index: 3; }

.footer-body { display: flex; width: 65%; margin-left: auto; align-items: center; justify-content: center; gap: 4rem; z-index: 5; }

.footer-logo {
    max-width: 250px;
    height: auto;
    display: block;
}

.footer-divider-line { width: 2px; height: 180px; background-color: #000000; }
.footer-info-area { display: flex; flex-direction: column; gap: 1.2rem; }

.contact-item { display: flex; align-items: center; gap: 1rem; color: #0b1e36; font-size: 1.1rem; font-weight: 600; }
.contact-item i { font-size: 1.4rem; color: var(--accent-blue); width: 30px; text-align: center; }

/* ================= RESPONSIVIDAD GENERAL CORREGIDA (TABLETS Y MÓVILES) ================= */
@media (max-width: 992px) {
    .navbar { display: none; } 
    body { padding-top: 0; }

    .hero-container, .about-container, .clients-container, 
    .business-container, .specialties-title-container, .spec-detail-container {
        flex-direction: column;
        min-height: auto;
    }
    
    .hero-left, .hero-right, .about-left, .about-right, 
    .clients-left, .clients-right, .business-left, .business-right,
    .spec-title-left, .spec-title-right, .spec-detail-left, .spec-detail-right {
        flex: 1 1 100%; 
        width: 100%;
    }
    
    .hero-left, .about-right, .clients-right, .business-left, .spec-title-right, 
    .type-diagonal-left .text-side, .type-diagonal-right .text-side {
        padding: 4rem 1.5rem !important; 
        margin-left: 0 !important;
    }

    /* Ordenamiento de bloques */
    .hero-left { order: 1; } .hero-right { order: 2; }
    .about-left { order: 2; } .about-right { order: 1; }
    .clients-left { order: 2; } .clients-right { order: 1; }
    .business-left { order: 1; } .business-right { order: 2; }
    .spec-title-left { order: 2; } .spec-title-right { order: 1; }
    
    .type-diagonal-left .image-side { order: 1; clip-path: none; }
    .type-diagonal-left .text-side { order: 2; }
    .type-diagonal-right .text-side { order: 1; }
    .type-diagonal-right .image-side { order: 2; clip-path: none; margin-left: 0; }
    
    /* Corrección crítica en móvil: Muestra las imágenes completas de borde a borde sin recortes */
    .hero-right, .about-left, .clients-left, .business-right,
    .spec-title-left, .image-side {
        min-height: auto;
        height: 56vw; 
        background-size: contain; 
        background-color: #ffffff;
    }
    
    .hero-content h1 { font-size: 2.2rem; }
    .about-content h2, .clients-content h2, .business-content h2, .spec-title-content h2, .spec-detail-content h2 { font-size: 1.8rem; }
    
    /* Reposicionamiento exacto de las insignias en la unión móvil */
    .hero-badge, .business-badge, .spec-detail-badge { 
        top: auto;
        bottom: 56vw; 
        left: 50%; 
        transform: translate(-50%, 50%); 
    }
    .about-badge, .clients-badge, .spec-title-badge, .spec-detail-badge-right { 
        top: 0; 
        left: 50%; 
        transform: translate(-50%, -50%); 
        right: auto; 
    }

    /* Footer Responsivo */
    .footer-container { flex-direction: column; padding: 3rem 1.5rem; }
    .footer-graphics { width: 100%; height: 100px; position: relative; margin-bottom: 2rem; }
    .layer-1 { clip-path: polygon(0 0, 50% 100%, 100% 0); }
    .layer-2 { clip-path: polygon(0 0, 50% 85%, 100% 0); }
    .layer-3 { clip-path: polygon(0 0, 50% 70%, 100% 0); }
    
    .footer-body { width: 100%; flex-direction: column; gap: 2rem; }
    .footer-divider-line { width: 120px; height: 2px; }
    .footer-info-area { align-items: center; text-align: center; }
}

@media (max-width: 480px) {
    .hero-content h1 { font-size: 2rem; }
    .hero-content .subtitle, .about-content p, .business-content p, .bullet-list li, .contact-item { font-size: 1rem; }
    .about-content h2, .clients-content h2, .business-content h2, .spec-title-content h2, .spec-detail-content h2 { font-size: 1.6rem; }
    .client-logo-wrapper { width: 180px; height: 60px; }
    .icon-circle { width: 80px; height: 80px; }
    .icon-circle i { font-size: 2rem; }
}

/* ================= EFECTOS DE MOVIMIENTO Y TRANSICIONES ================= */
.hero-content, .about-content, .clients-content, .business-content, .spec-detail-content, .spec-title-content {
    opacity: 0;
    transform: translateY(30px);
    animation: aparecerSuave 1s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes aparecerSuave {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.about-content { animation-delay: 0.2s; }
.clients-content { animation-delay: 0.3s; }
.business-content { animation-delay: 0.2s; }

.icon-circle, .client-logo-wrapper img, .contact-item {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.client-logo-wrapper:hover img {
    transform: scale(1.08);
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.1));
}

/* ================= BOTÓN FLOTANTE DE WHATSAPP ================= */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    text-decoration: none;
    transition: transform 0.3s ease;
    animation: pulse-whatsapp 2s infinite;
}

.whatsapp-btn:hover {
    transform: scale(1.15);
    background-color: #20ba5a;
}

@keyframes pulse-whatsapp {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

@media (max-width: 480px) {
    .whatsapp-btn {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 1.8rem;
    }
}
