/* --- VARIABLES Y RESET --- */
:root {
    --primary: #0A3622;    /* Darker, richer primary green */
    --accent: #F1C40F;     
    --bg-body: #f8f9fa;    /* Slightly lighter, cleaner background */
    --white: #ffffff;
    --text-grey: #4a5568;  /* Softer text color */
    --dark-bg: #111111; 
    --darker-bg: #050505; 
    --shadow-sm: 0 4px 6px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 15px rgba(0,0,0,0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { 
    font-family: 'Inter', sans-serif; 
    color: #2d3748; 
    background: var(--bg-body);
    line-height: 1.7; 
    overflow-x: hidden;
    word-wrap: break-word; /* Prevent text overflow */
}

/* --- LIGHTBOX --- */
.lightbox-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.95); z-index: 99999;
    display: none; align-items: center; justify-content: center;
}
.lightbox-overlay.active { display: flex; animation: fadeIn 0.3s; }
.lightbox-content { max-width: 90%; max-height: 90vh; border-radius: 5px; box-shadow: 0 0 20px rgba(0,0,0,0.5); }
.close-lightbox {
    position: absolute; top: 20px; right: 30px; font-size: 40px; color: white; cursor: pointer;
}
.close-lightbox:hover { color: var(--accent); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* --- BARRA DE PROGRESO --- */
.scroll-progress-container { position: fixed; top: 0; left: 0; width: 100%; height: 4px; background: transparent; z-index: 10000; }
.scroll-progress-bar { height: 4px; background: var(--accent); width: 0%; }

/* --- LOGO --- */
.logo-container { padding: 10px 0; }
.main-logo { height: 100px; max-height: 8vw; width: auto; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.15)); transition: transform 0.3s ease; }
.main-logo:hover { transform: scale(1.02); }

/* --- TYPO --- */
h1, h2, h3, h4, h5, h6 { font-family: 'Roboto', sans-serif; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 900; color: var(--primary); }
.divider { height: 4px; width: 60px; background: var(--accent); margin: 20px auto; border-radius: 2px; }

/* --- HERO SECTION --- */
.hero-section { position: relative; height: 90vh; overflow: hidden; display: flex; flex-direction: column; background: #111; }

/* NAVBAR TRANSPARENTE */
.navbar {
    display: flex; justify-content: space-between; align-items: center; padding: 20px 5%;
    position: absolute; top: 0; left: 0; width: 100%; z-index: 1000;
    background: linear-gradient(to bottom, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
    border-bottom: none; box-shadow: none;
}
.nav-links a { color: var(--white); text-decoration: none; margin-left: 35px; font-weight: 600; font-size: 14px; text-transform: uppercase; transition: 0.3s; text-shadow: 0 2px 4px rgba(0,0,0,0.5); font-family: 'Inter', sans-serif; letter-spacing: 0.5px; }
.nav-links a:hover { color: var(--accent); }
.btn-nav { border: 2px solid var(--accent); padding: 10px 24px; color: var(--accent) !important; border-radius: 3px; }
.btn-nav:hover { background: var(--accent); color: var(--primary) !important; text-shadow: none; border-radius: 3px; }

/* ESTILOS DEL CONTENIDO HERO (ALTO CONTRASTE) */
.hero-content { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center; 
    text-align: center; 
    padding: 0 20px; 
    z-index: 2; 
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 50%);
}

.hero-content h1 { 
    font-family: 'Roboto', sans-serif;
    font-size: clamp(2.5rem, 5vw, 4.5rem); 
    line-height: 1.1;
    color: #ffffff; 
    text-transform: uppercase;
    font-weight: 900; 
    letter-spacing: -0.5px;
    margin-bottom: 24px;
    text-shadow: 0 10px 30px rgba(0,0,0,0.9);
    max-width: 1000px;
}

.hero-content h1 .text-highlight {
    color: var(--accent); 
    font-size: clamp(3rem, 6vw, 5rem); 
    display: block; 
    margin-top: 12px;
}

.hero-content p { 
    font-family: 'Inter', sans-serif;
    font-size: clamp(1rem, 2vw, 1.25rem); 
    max-width: 700px; 
    margin-bottom: 45px; 
    color: #f0f0f0; 
    font-weight: 400; 
    text-shadow: 0 2px 4px rgba(0,0,0,0.9); 
    letter-spacing: 0.2px;
    line-height: 1.8;
}

.btn-hero {
    background: var(--accent); 
    color: #000; 
    padding: 18px 50px; 
    text-decoration: none;
    font-weight: 800; 
    letter-spacing: 2px; 
    text-transform: uppercase;
    border-radius: 0; 
    transition: all 0.3s ease; 
    cursor: pointer;
    border: 2px solid var(--accent);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    clip-path: polygon(10% 0, 100% 0, 100% 70%, 90% 100%, 0 100%, 0 30%);
}

.btn-hero:hover { 
    background: transparent; 
    color: var(--accent); 
    transform: translateY(-5px) scale(1.05); 
    box-shadow: 0 20px 30px rgba(0,0,0,0.6);
}

/* --- STATS BAR --- */
.stats-bar {
    display: flex; justify-content: space-around; align-items: center;
    background: var(--primary); padding: 40px 5%; flex-wrap: wrap; gap: 20px;
}
.stat-item { text-align: center; }
.stat-item h2 { color: var(--accent); font-size: 2.5rem; font-weight: 900; }
.stat-item p { color: rgba(255,255,255,0.7); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 2px; margin-top: 5px; }

/* ==================================================
   INDUSTRIAL SERVICES SECTION  
   ================================================== */
.industrial-services-section {
    position: relative; min-height: 80vh; 
    padding: 120px 5%;
    display: flex; flex-direction: column; justify-content: center;
    overflow: hidden;
}

/* Fondo dinámico */
.dynamic-bg-container {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0;
}
.service-bg-layer {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover; background-position: center;
    opacity: 0; transition: opacity 0.8s ease-in-out; filter: brightness(0.25);
}
.service-bg-layer.active { opacity: 1; }

.vignette-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.6) 100%);
}
.industrial-overlay-gradient {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1;
    background: linear-gradient(to right, rgba(0,0,0,0.7) 0%, transparent 60%);
}

.industrial-container {
    position: relative; z-index: 2; max-width: 1300px; margin: 0 auto; width: 100%;
}

.section-header-industrial { text-align: left; margin-bottom: 60px; }
.section-header-industrial h2 { color: var(--white); font-size: 2.5rem; }
.divider-industrial { height: 3px; width: 60px; background: var(--accent); margin: 15px 0; }

.services-split-layout {
    display: flex; gap: 60px; align-items: flex-start;
}

/* Menú de navegación lateral */
.services-nav-menu {
    flex: 0 0 300px; display: flex; flex-direction: column; gap: 8px;
}
.service-nav-item {
    display: flex; align-items: center; gap: 15px;
    padding: 20px 24px; cursor: pointer; 
    border-left: 3px solid transparent;
    color: rgba(255,255,255,0.7); transition: all 0.3s ease-in-out;
    border-radius: 0 4px 4px 0;
}
.service-nav-item:hover { color: var(--white); border-left-color: rgba(241,196,15,0.5); background: rgba(255,255,255,0.08); transform: translateX(5px); }
.service-nav-item.active { color: var(--accent); border-left-color: var(--accent); background: rgba(241,196,15,0.15); transform: translateX(8px); }
.service-nav-item i { font-size: 22px; width: 25px; text-align: center; }
.service-nav-item span { font-weight: 600; font-size: 0.9rem; letter-spacing: 1px; text-transform: uppercase; font-family: 'Inter', sans-serif; }

/* Contenedor de contenido */
.services-content-wrapper {
    flex: 1; min-height: 400px; position: relative;
}
.service-tab-container {
    display: none; width: 100%; height: 100%; flex-direction: column;
}
.service-tab-container.active { display: flex; }

/* Vistas internas (Nivel 1, 2, 3) */
.view-level-1, .view-level-2, .view-level-3 { display: none; width: 100%; }
.view-level-1.active-view, .view-level-2.active-view, .view-level-3.active-view { display: block; }

.huge-stat { 
    font-family: 'Roboto', sans-serif; font-size: clamp(4rem, 8vw, 6.5rem); font-weight: 900; 
    color: var(--accent); line-height: 1; margin-bottom: 12px;
}
.industrial-subtitle { 
    color: var(--white); font-size: clamp(1.2rem, 3vw, 1.8rem); margin-bottom: 24px; 
    text-transform: uppercase; letter-spacing: 2px;
}
.industrial-desc { color: rgba(255,255,255,0.85); font-size: 1.1rem; max-width: 550px; margin-bottom: 45px; line-height: 1.8; }

/* Botón de acción industrial */
.btn-industrial {
    display: inline-block; padding: 16px 45px;
    background: transparent; border: 2px solid var(--accent);
    color: var(--accent); font-weight: 700; letter-spacing: 2px;
    text-transform: uppercase; cursor: pointer; transition: all 0.3s;
    font-family: 'Inter', sans-serif; font-size: 0.95rem;
    text-decoration: none; border-radius: 2px;
}
.btn-industrial:hover { background: var(--accent); color: var(--primary); transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.2); }

/* Encabezado de nivel */
.level-header { display: flex; align-items: center; gap: 20px; margin-bottom: 35px; }
.level-header h3 { color: var(--white); font-size: 1.4rem; }
.back-btn-gold { 
    background: rgba(255,255,255,0.05); border: 1px solid var(--accent); color: var(--accent); 
    padding: 10px 18px; cursor: pointer; font-family: 'Inter', sans-serif; 
    font-size: 0.9rem; font-weight: 600; transition: 0.3s; display: flex; align-items: center; gap: 8px; border-radius: 2px;
}
.back-btn-gold:hover { background: var(--accent); color: var(--primary); }

/* TARJETAS PREMIUM */
.premium-cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 25px; }
.premium-white-card {
    background: rgba(255,255,255,0.05); backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.1); cursor: pointer; 
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); overflow: hidden; border-radius: 6px;
    box-shadow: var(--shadow-sm);
}
.premium-white-card:hover { border-color: var(--accent); transform: translateY(-8px); background: rgba(255,255,255,0.1); box-shadow: var(--shadow-md); }

.card-img-thumb { position: relative; height: 120px; overflow: hidden; }
.card-img-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.premium-white-card:hover .card-img-thumb img { transform: scale(1.05); }
.card-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(241,196,15,0.3); display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: 0.3s;
}
.card-overlay i { color: white; font-size: 30px; }
.premium-white-card:hover .card-overlay { opacity: 1; }

.card-body { padding: 15px; }
.card-body h4 { color: var(--white); font-size: 0.95rem; margin-bottom: 5px; }
.card-body p { color: var(--accent); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; }

/* Vista de Detalle (Nivel 3) */
.project-details-container { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; }
.details-text-block { color: rgba(255,255,255,0.85); }
.detail-client-title { color: var(--white); font-size: 1.1rem; margin-bottom: 8px; font-weight: 600; }
.detail-client-name-dyn { color: var(--accent); }
.detail-project-desc-dyn { color: rgba(255,255,255,0.8); line-height: 1.8; font-size: 1.05rem; }
.details-images-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.detail-img-wrapper { position: relative; height: 220px; overflow: hidden; cursor: pointer; border-radius: 6px; box-shadow: var(--shadow-sm); }
.detail-img-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.detail-img-wrapper:hover img { transform: scale(1.08); }
.img-label {
    position: absolute; top: 12px; left: 12px; background: var(--accent); color: var(--primary);
    width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center;
    justify-content: center; font-weight: 900; font-size: 0.85rem; z-index: 2;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* --- BARRA DE ESTADÍSTICAS Y EXPERIENCIA --- */
.experience-badge {
    position: absolute; bottom: -20px; right: 20px; left: auto; background: var(--accent);
    color: var(--primary); padding: 25px; text-align: center; font-weight: 900;
    box-shadow: 0 15px 35px rgba(0,0,0,0.4); z-index: 3; border-radius: 4px;
}
.experience-badge span { font-size: 3rem; line-height: 1; display: block; margin-bottom: 5px; }
.experience-badge small { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; }

/* --- NOSOTROS INDUSTRIAL (DARK) --- */
.about-section-industrial {
    background-color: var(--dark-bg); color: var(--white); padding: 140px 5%;
    display: flex; justify-content: center;
}
.about-container {
    max-width: 1300px; width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center;
}
.about-text h2 { color: var(--white); font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1.2; }
.mini-tag { color: var(--accent); font-weight: 700; letter-spacing: 3px; margin-bottom: 15px; font-size: 0.95rem; text-transform: uppercase; }
.about-text p { color: #b3b3b3; margin-bottom: 25px; font-size: 1.1rem; line-height: 1.8; }
.about-features { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 40px; }
.feature-item { display: flex; align-items: flex-start; gap: 18px; }
.feature-item i { color: var(--accent); font-size: 32px; margin-top: 2px;}
.feature-item h4 { color: var(--white); margin: 0 0 5px 0; font-size: 1.1rem; }
.feature-item span { color: #888; font-size: 0.9rem; }

/* FIX IMAGEN LOGO NOSOTROS */
.about-image { 
    position: relative; 
    display: flex; 
    justify-content: center; 
    align-items: center;
    width: 100%;
    height: 500px; 
    overflow: hidden; 
}
.about-image .main-about-img { 
    width: auto !important; 
    height: auto !important; 
    max-width: 90% !important; 
    max-height: 90% !important; 
    object-fit: contain; 
    filter: none; 
    margin: 0 auto; 
}

/* --- CONTACTO INDUSTRIAL (CENTRADO) --- */
.contact-section-industrial {
    background-color: var(--darker-bg); color: var(--white); padding: 100px 5%; border-top: 1px solid #222;
    display: flex; justify-content: center;
}
.contact-grid { 
    display: grid; grid-template-columns: 1fr 1fr; gap: 80px; width: 100%; max-width: 1200px;
}
.contact-info-col h2 { color: var(--white); font-size: 2rem; }

.info-item-link { 
    display: flex; align-items: flex-start; gap: 20px; margin-bottom: 30px; 
    text-decoration: none; color: inherit; transition: 0.3s; padding: 10px; border-radius: 5px;
}
.info-item-link:hover { background: rgba(255,255,255,0.05); transform: translateX(10px); }
.info-item-link:hover h4 { color: var(--accent); }

.icon-circle {
    width: 50px; height: 50px; border: 2px solid var(--accent); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; color: var(--accent); font-size: 20px;
    flex-shrink: 0;
}
.info-item-link h4 { color: var(--white); margin-bottom: 5px; font-size: 1.1rem; transition: 0.3s; }
.info-item-link p { color: #888; margin: 0; font-size: 0.95rem; }

.form-box-dark { background: #1a1a1a; padding: 40px; border-radius: 5px; border: 1px solid #333; }
.form-box-dark h3 { color: var(--accent); margin-bottom: 30px; }
.input-group-dark { position: relative; margin-bottom: 30px; }
.input-group-dark input, .input-group-dark textarea {
    width: 100%; background: transparent; border: none; border-bottom: 2px solid #444;
    color: white; padding: 10px 0; font-size: 1rem; transition: 0.3s;
}
.input-group-dark input:focus, .input-group-dark textarea:focus { outline: none; border-bottom-color: var(--accent); }
.input-group-dark label {
    position: absolute; top: 10px; left: 0; color: #666; transition: 0.3s; pointer-events: none;
}
.input-group-dark input:focus ~ label,
.input-group-dark input:valid ~ label,
.input-group-dark textarea:focus ~ label,
.input-group-dark textarea:valid ~ label {
    top: -20px; font-size: 0.8rem; color: var(--accent);
}
.btn-industrial.full-width { width: 100%; }

/* --- FOOTER --- */
footer {
    background: #050505; color: #777; text-align: center; padding: 40px 20px;
    border-top: 1px solid #1a1a1a; font-size: 0.95rem;
}
.footer-content { display: flex; flex-direction: column; gap: 10px; }
.credits a { color: var(--accent); text-decoration: none; font-weight: 500; transition: color 0.3s; }
.credits a:hover { color: var(--white); }

/* --- WHATSAPP --- */
.whatsapp-float {
    position: fixed; width: 60px; height: 60px; bottom: 30px; right: 30px;
    background-color: #25d366; color: #FFF; border-radius: 50px; text-align: center; font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.3); z-index: 100; display: flex; align-items: center;
    justify-content: center; text-decoration: none; transition: 0.3s;
    animation: heartbeat 3s ease-in-out infinite both;
}
.whatsapp-float:hover { background-color: #128C7E; transform: scale(1.1); animation: none; }
@keyframes heartbeat {
    from { transform: scale(1); transform-origin: center center; animation-timing-function: ease-out; }
    10% { transform: scale(0.91); animation-timing-function: ease-in; }
    17% { transform: scale(0.98); animation-timing-function: ease-out; }
    33% { transform: scale(0.87); animation-timing-function: ease-in; }
    45% { transform: scale(1); animation-timing-function: ease-out; }
}

/* --- RESPONSIVE --- */
.burger-menu { display: none; cursor: pointer; z-index: 2001; }
.mobile-nav-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: rgba(10, 54, 34, 0.98); backdrop-filter: blur(10px); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 40px; transform: translateY(-100%); transition: 0.4s cubic-bezier(0.77, 0, 0.175, 1); z-index: 2000; }
.mobile-nav-overlay.active { transform: translateY(0); }
.mobile-nav-overlay a { color: white; text-decoration: none; font-size: 1.8rem; text-transform: uppercase; font-weight: 700; font-family: 'Roboto', sans-serif; letter-spacing: 2px; }
.close-btn { position: absolute; top: 40px; right: 40px; color: var(--accent); font-size: 2.5rem; cursor: pointer; transition: transform 0.3s; }
.close-btn:hover { transform: rotate(90deg); }

@media (max-width: 1024px) {
    .industrial-services-section { min-height: auto; padding: 100px 5%; }
    .services-split-layout { flex-direction: column; gap: 40px; }
    .services-nav-menu { flex: 0 0 auto; width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
    .service-nav-item { padding: 15px; border: 1px solid rgba(255,255,255,0.1); justify-content: center; text-align: center; flex-direction: column; gap: 8px; border-radius: 4px; border-left: 1px solid rgba(255,255,255,0.1); }
    .service-nav-item:hover, .service-nav-item.active { padding-left: 15px; border-color: var(--accent); background: rgba(241, 196, 15, 0.1); transform: none; }
    .service-nav-item i { margin-right: 0; font-size: 26px; }
    .about-container, .contact-grid { grid-template-columns: 1fr; gap: 50px; }
    .about-image { order: -1; margin-bottom: 20px; }
}

@media (max-width: 768px) {
    .desktop-only { display: none; }
    .burger-menu { display: block; }
    .hero-content h1 { font-size: 2.2rem; }
    .hero-content h1 .text-highlight { font-size: 2.8rem; }
    .hero-content p { font-size: 1rem; margin-bottom: 30px; }
    .btn-hero { padding: 14px 28px; font-size: 0.85rem; }
    .stats-bar { gap: 30px; flex-direction: column; padding: 60px 5%; }
    .services-nav-menu { grid-template-columns: repeat(2, 1fr); }
    .service-nav-item { flex-direction: column; padding: 15px 10px; }
    .service-nav-item i { margin-right: 0; font-size: 24px; margin-bottom: 5px; }
    .premium-cards-grid { grid-template-columns: 1fr; } 
    .project-details-container { grid-template-columns: 1fr; gap: 30px; }
    .details-images-grid { grid-template-columns: 1fr; }
    .detail-img-wrapper { height: 250px; }
    .about-features { grid-template-columns: 1fr; }
    .contact-section-industrial { padding: 80px 5%; }
    .form-box-dark { padding: 30px 20px; }
}

/* --- VIDEO BACKGROUND (DESKTOP) --- */
.video-bg-container {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    overflow: hidden; z-index: 0; 
}
.video-bg-container video {
    min-width: 100%; min-height: 100%; width: auto; height: auto;
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%); 
    object-fit: cover; filter: brightness(0.4); 
}

/* --- OPTIMIZACIÓN FORMULARIO --- */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* --- OPTIMIZACIÓN MÓVIL --- */
@media (max-width: 768px) {
    /* 1. Apilar formulario */
    .form-row { grid-template-columns: 1fr; }

    /* 2. Ocultar video pesado (también se elimina src via JS) */
    .video-bg-container video { display: none; }

    /* 3. Imagen estática de alta calidad en formato WebP */
    .video-bg-container {
        background-image: url('https://images.unsplash.com/photo-1504307651254-35680f356dfd?auto=format&fit=crop&w=1200&q=80&fm=webp');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }
    
    /* 4. Overlay oscuro */
    .video-overlay {
        background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.6) 100%);
    }
}