/*
Theme Name: Modulbox Landing Page
Theme URI: #
Author: Modulbox
Version: 6.1 (Bilingüe - Corrección Menú Móvil)
*/

/* ========================================================
   1. VARIABLES Y RESETEO GLOBAL
   ======================================================== */
:root {
    --primary-dark: #12141d;
    --secondary-dark: #1a1c24;
    --accent-yellow: #f4d03f;
    --text-light: #ffffff;
    --text-dark: #333333;
    --bg-light: #f4f5f7;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
body { background-color: var(--primary-dark); color: var(--text-light); overflow-x: hidden; }
a { text-decoration: none; color: inherit; }

/* ========================================================
   2. ENCABEZADO Y NAVEGACIÓN
   ======================================================== */
header {
    position: fixed; width: 100%; top: 0; z-index: 1000;
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 5%; transition: 0.4s ease; background: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.site-logo { max-height: 75px; width: auto; background: transparent; display: block; transition: 0.4s ease; }

#site-navigation { display: block; }

#nav-menu { 
    list-style: none; display: flex; flex-direction: row; 
    gap: 35px; align-items: center; margin: 0; padding: 0;
}

#nav-menu a { font-size: 13px; text-transform: uppercase; font-weight: 700; color: var(--primary-dark); transition: color 0.3s; letter-spacing: 0.5px; }
#nav-menu a:hover { color: var(--accent-yellow); }

.btn-contact {
    background: #1a1c24; color: #fff; padding: 12px 25px; 
    font-weight: 800; border-radius: 4px; text-transform: uppercase; 
    transition: 0.3s; font-size: 13px; letter-spacing: 0.5px;
}
.btn-contact:hover { background: var(--accent-yellow); color: #000; }
.menu-toggle { display: none; }

/* ========================================================
   3. PÁGINA DE INICIO
   ======================================================== */
.hero-home { height: 90vh; display: flex; align-items: flex-start; justify-content: flex-start; padding: 200px 5% 0; }
.hero-content h1 { font-size: 55px; line-height: 1.1; font-weight: 800; color: #fff; text-shadow: 2px 2px 10px rgba(0,0,0,0.5); }
.hero-content p { font-size: 16px; color: #fff; margin-top: 15px; font-weight: 400; line-height: 1.6; }

.about-home { background: #fff; color: var(--text-dark); padding: 80px 5% 40px; }
.about-container { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto 60px; gap: 40px; }
.about-text { flex: 1; }
.badge-title { display: inline-block; font-size: 13px; font-weight: bold; letter-spacing: 1px; color: #555; margin-bottom: 20px; }
.badge-title i { color: var(--accent-yellow); margin-right: 5px; }
.about-text h2 { font-size: 40px; line-height: 1.1; font-weight: 300; color: #aaa; margin-bottom: 15px; }
.about-text h2 strong { font-weight: 800; color: var(--text-dark); }
.about-quote { font-style: italic; font-weight: 600; color: var(--text-dark); margin-top: 25px; font-size: 15px; }
.about-image { flex: 1; text-align: right; }
.about-image img { max-width: 100%; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }

.stats-home { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; max-width: 1100px; margin: 0 auto; padding-top: 40px; border-top: 1px solid #eaeaea; }
.stat-box { display: flex; flex-direction: column; text-align: left; height: 100%; }
.stat-box i { background: var(--accent-yellow); color: var(--primary-dark); width: 40px; height: 40px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 20px; margin-bottom: 20px; flex-shrink: 0; }
.stat-desc { font-size: 12px; color: #666; line-height: 1.5; margin-bottom: 25px; flex-grow: 1; }
.stat-box h3 { font-size: 38px; font-weight: 800; margin-bottom: 5px; flex-shrink: 0; }
.stat-label { font-size: 11px; font-weight: 800; letter-spacing: 0.5px; color: var(--text-dark); flex-shrink: 0; }

.sectores-home { background: var(--primary-dark); padding: 100px 5%; }
.sectores-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(260px, auto); gap: 20px; max-width: 1200px; margin: 0 auto; }
.sectores-title { display: flex; flex-direction: column; justify-content: center; padding-right: 15px; }
.badge-title-yellow { font-size: 11px; font-weight: bold; color: var(--accent-yellow); margin-bottom: 15px; letter-spacing: 1px; display: block; }
.sectores-title h2 { font-size: 30px; line-height: 1.2; color: #fff; font-weight: 300; }
.sectores-title p { font-size: 13px; color: #aaa; margin-top: 15px; line-height: 1.6; }
.sector-card { position: relative; border-radius: 10px; overflow: hidden; background: #222; }
.sector-card img { width: 100%; height: 100%; object-fit: cover; opacity: 0.6; transition: 0.4s; }
.sector-card:hover img { opacity: 1; transform: scale(1.05); }
.sector-label { position: absolute; bottom: 15px; left: 15px; background: rgba(0,0,0,0.6); backdrop-filter: blur(5px); color: #fff; padding: 8px 15px; border-radius: 6px; font-size: 13px; font-weight: bold; display: flex; align-items: center; gap: 8px; }
.sector-label i { color: var(--accent-yellow); font-size: 16px; }

.features-home { background: var(--bg-light); padding: 80px 5%; color: var(--text-dark) !important; }
.features-header { text-align: center; margin-bottom: 60px; }
.features-header h2 { font-size: 32px; color: var(--primary-dark); font-weight: 300; margin-bottom: 15px; }
.features-header p { font-size: 15px; color: #666; line-height: 1.6; }
.grid-8 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; max-width: 1100px; margin: 0 auto; }
.feature-card { background: #fff; padding: 30px; border-radius: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); text-align: center; color: var(--text-dark) !important; transition: 0.3s; }
.feature-card:hover { transform: translateY(-5px); }
.feature-card i { font-size: 35px; color: var(--primary-dark) !important; margin-bottom: 15px; }
.feature-card h3 { font-size: 14px; color: var(--primary-dark) !important; font-weight: 800; margin-bottom: 10px; }
.feature-card p { font-size: 12px; color: #555 !important; line-height: 1.5; }

.gallery-home { position: relative; height: 60vh; min-height: 450px; background: #000; display: flex; align-items: flex-start; padding-top: 40px; flex-direction: column; }
.gallery-title { position: absolute; top: 30px; left: 5%; z-index: 20; color: #fff; font-size: 14px; font-weight: 800; letter-spacing: 2px; }
.gallery-slider { margin-top: 50px; display: flex; height: 100%; width: 100%; overflow-x: auto; scroll-behavior: smooth; scroll-snap-type: x mandatory; -ms-overflow-style: none; scrollbar-width: none; }
.gallery-slider::-webkit-scrollbar { display: none; }
.gallery-slider img { flex: 0 0 50%; height: 100%; object-fit: cover; filter: brightness(0.7); border-right: 2px solid #000; transition: filter 0.3s; scroll-snap-align: start; }
.gallery-slider img:hover { filter: brightness(1.1); cursor: pointer; }
.arrow { position: absolute; top: 50%; transform: translateY(-50%); font-size: 30px; color: #fff; background: rgba(0,0,0,0.6); padding: 15px; cursor: pointer; z-index: 10; border-radius: 5px; transition: 0.3s; backdrop-filter: blur(5px); }
.arrow:hover { background: var(--accent-yellow); color: var(--primary-dark); }
.arrow.left { left: 30px; }
.arrow.right { right: 30px; }

.cta-home { height: 40vh; min-height: 300px; display: flex; justify-content: flex-start; align-items: center; padding: 0 10%; }
.cta-content { text-align: left; }
.cta-content h2 { font-size: 45px; color: #fff; line-height: 1.1; margin-bottom: 10px; font-weight: 800; }
.cta-content p { font-size: 18px; color: #ddd; margin-bottom: 30px; font-weight: 500;}

/* ========================================================
   4. PÁGINA DE SERVICIOS 
   ======================================================== */
.hero-servicios { height: 55vh; min-height: 400px; background: linear-gradient(rgba(18,20,29,0.6), rgba(18,20,29,0.7)), url('https://images.unsplash.com/photo-1497366216548-37526070297c?auto=format&fit=crop&q=80') center/cover fixed; display: flex; align-items: center; justify-content: center; text-align: center; }
.hero-servicios h1 { font-size: 50px; color: #fff; font-weight: 800; margin-bottom: 20px; }
.hero-servicios p { font-size: 18px; color: #eaeaea; line-height: 1.5; font-weight: 500; }

.services-dark-section { background-color: #1a1c24; padding: 80px 5%; }
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; max-width: 1100px; margin: 0 auto; }
.service-box { background: transparent; border: 1px solid #444; padding: 40px 20px; text-align: center; transition: 0.3s; }
.service-box:hover { border-color: var(--accent-yellow); transform: translateY(-3px); background: rgba(255,255,255,0.02); }
.service-box i { font-size: 40px; color: var(--accent-yellow); margin-bottom: 20px; display: block; }
.service-box h3 { font-size: 16px; color: #fff; font-weight: 700; margin-bottom: 12px; }
.service-box p { font-size: 12px; color: #aaa; line-height: 1.5; }

.process-white-section { background: #fff; padding: 100px 5%; color: #000; }
.process-container { display: flex; max-width: 1100px; margin: 0 auto; gap: 60px; }
.process-left { flex: 1; position: sticky; top: 120px; height: fit-content; }
.process-left h5 { font-size: 16px; font-weight: 800; color: #000; margin-bottom: 15px; }
.process-left h2 { font-size: 45px; font-weight: 800; color: #000; line-height: 1.1; margin-bottom: 40px; }

.process-right { flex: 1.5; display: flex; flex-direction: column; }
.step-row { display: flex; align-items: center; gap: 25px; padding: 25px 0; border-bottom: 1px solid #ddd; }
.step-row:last-child { border-bottom: none; }
.step-row img { width: 160px; height: 100px; object-fit: cover; border-radius: 4px; }
.step-num { background: #000; color: #fff; width: 35px; height: 35px; display: flex; justify-content: center; align-items: center; font-size: 14px; font-weight: bold; flex-shrink: 0; }
.step-text { flex: 1; }
.step-text h4 { font-size: 18px; color: #000; font-weight: 700; margin-bottom: 5px; }
.step-text p { font-size: 13px; color: #555; line-height: 1.5; margin: 0; }

.btn-yellow-pill { background: var(--accent-yellow); color: #000; padding: 12px 30px; border-radius: 30px; font-weight: 800; font-size: 14px; display: inline-block; transition: 0.3s; }
.btn-yellow-pill:hover { background: #000; color: var(--accent-yellow); }

/* ========================================================
   5. PÁGINA DE CONTACTO
   ======================================================== */
.contact-page { background: #f9f9f9; padding: 120px 5% 60px; color: #333; }
.contact-grid { display: flex; max-width: 1200px; margin: 0 auto; gap: 50px; align-items: center; }
.contact-text-col { flex: 1; }
.contact-text-col h2 { font-size: 50px; font-weight: 400; color: #111; line-height: 1.1; margin-bottom: 25px; }
.contact-text-col p { font-size: 16px; color: #444; line-height: 1.6; font-weight: 500; }
.contact-form-col { flex: 1.2; }
.form-box { background: #fff; padding: 40px; border: 1px solid #ccc; border-radius: 4px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.form-box h3 { font-size: 24px; color: #333; font-weight: 600; margin-bottom: 5px; }
.form-box .subtitle { font-size: 12px; color: #777; margin-bottom: 25px; }
.input-row { display: flex; gap: 20px; margin-bottom: 20px; }
.input-row input { flex: 1; padding: 15px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; background: #fff; outline: none; }
.input-row input:focus, .form-box textarea:focus { border-color: var(--accent-yellow); }
.form-box textarea { width: 100%; padding: 15px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; resize: vertical; margin-bottom: 15px; font-family: inherit; }
.form-alert { padding: 15px; border-radius: 4px; margin-bottom: 20px; font-size: 14px; font-weight: bold; }
.form-alert.success { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.form-alert.error { background: #ffebee; color: #c62828; border: 1px solid #ffcdd2; }
.security-badge { display: flex; align-items: center; gap: 10px; margin-bottom: 25px; }
.security-badge i { color: var(--accent-yellow); font-size: 20px; }
.security-badge span { font-size: 11px; color: #888; }
.btn-submit { width: 100%; background: var(--accent-yellow); color: #111; padding: 18px; border: none; border-radius: 4px; font-size: 18px; font-weight: 800; cursor: pointer; transition: 0.3s; }
.btn-submit:hover { background: #e6a800; }

.contact-banner { padding: 0 5% 60px; background: #f9f9f9; }
.banner-wrapper { max-width: 1200px; margin: 0 auto; background: linear-gradient(rgba(44, 75, 107, 0.85), rgba(44, 75, 107, 0.85)), url('https://images.unsplash.com/photo-1541888052163-71846b40bd49?auto=format&fit=crop&q=80') center/cover; border-radius: 20px; padding: 50px; display: flex; align-items: center; justify-content: space-between; color: #fff; gap: 30px; }
.banner-col-1 h3 { font-size: 24px; font-weight: 700; line-height: 1.2; }
.banner-divider { width: 1px; height: 60px; background: rgba(255,255,255,0.4); }
.banner-col-2 p { font-size: 14px; line-height: 1.5; color: #e0e0e0; max-width: 400px; }
.banner-col-3 a { color: var(--accent-yellow); font-weight: 800; font-size: 16px; display: flex; align-items: center; gap: 8px; transition: 0.3s; }
.banner-col-3 a:hover { transform: translateX(5px); }

/* ========================================================
   6. PIE DE PÁGINA (FOOTER)
   ======================================================== */
.site-footer { background: #000; color: #fff; padding: 60px 5% 20px; font-size: 13px; }
.footer-container { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 50px; max-width: 1200px; margin: 0 auto; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.site-footer h4 { font-size: 14px; margin-bottom: 15px; color: #fff; font-weight: 700; }
.site-footer ul { list-style: none; padding: 0; }
.site-footer ul li { margin-bottom: 12px; color: #aaa; }
.site-footer ul li a { color: #aaa; transition: 0.3s; }
.site-footer ul li a:hover { color: var(--accent-yellow); }
.footer-info p { color: #aaa; line-height: 1.6; max-width: 350px; }
.footer-info i { background: var(--accent-yellow); color: #000; width: 25px; height: 25px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; margin-right: 10px; }
.social-icons { display: flex; align-items: center; gap: 10px; }
.social-icons a { background: var(--accent-yellow); color: #000; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: 4px; font-size: 16px; transition: 0.3s; }
.social-icons a:hover { transform: translateY(-3px); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 20px auto 0; color: #888; font-size: 11px; flex-wrap: wrap; gap: 15px; }
.footer-address i { color: var(--accent-yellow); margin-right: 5px; }

/* ========================================================
   7. MEDIA QUERIES (ADAPTACIÓN MÓVIL Y TABLET)
   ======================================================== */
@media (max-width: 1024px) {
    .sectores-title { grid-row: 1 / 2; grid-column: 1 / 3; text-align: center; justify-content: center; margin-bottom: 30px; padding-right: 0; }
    .stats-home { grid-template-columns: repeat(2, 1fr); gap: 40px; }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .process-container { flex-direction: column; gap: 40px; }
    .process-left { position: relative; top: 0; text-align: center; }
    .contact-grid { flex-direction: column; text-align: center; gap: 40px; }
    .form-box { width: 100%; max-width: 700px; margin: 0 auto; }
    .banner-wrapper { flex-direction: column; text-align: center; padding: 40px 20px; gap: 20px; }
    .banner-divider { width: 80%; height: 1px; margin: 10px auto; }
    .footer-container { grid-template-columns: 1fr 1fr; gap: 40px; }
}

@media (max-width: 768px) {
    header { padding: 15px 5%; }
    .site-logo { max-height: 55px; } 
    .menu-toggle { display: block; font-size: 28px; color: var(--primary-dark); cursor: pointer; } 
    .btn-contact { display: none !important; } 
    
    #site-navigation {
        position: absolute; top: 100%; left: 0; width: 100%;
        background: #ffffff; box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    }
    
    #nav-menu { display: none; flex-direction: column; text-align: center; padding: 20px 0; gap: 20px; }
    #nav-menu.active { display: flex; }
    #nav-menu a { font-size: 16px; padding: 10px; display: block; }

    .hero-content h1 { font-size: 40px; }
    .about-container { flex-direction: column; text-align: center; }
    .about-text, .about-image { width: 100%; text-align: center; }
    .sectores-grid { grid-template-columns: 1fr; grid-auto-rows: 200px; }
    .sectores-title { grid-column: 1 / 2; }
    .grid-8 { grid-template-columns: 1fr; }
    .gallery-slider img { flex: 0 0 100%; border-right: none; }
    .gallery-home { height: 40vh; }
    
    .services-grid { grid-template-columns: 1fr; }
    .step-row { flex-direction: column; align-items: flex-start; text-align: left; }
    .step-row img { width: 100%; height: auto; }
    
    .input-row { flex-direction: column; gap: 15px; margin-bottom: 15px; }
    .contact-page { padding: 120px 5% 60px; }
    .contact-text-col h2 { font-size: 32px; }
    .form-box { padding: 25px 15px; }
    
    .footer-container { grid-template-columns: 1fr; text-align: center; }
    .footer-info p { margin: 0 auto; }
    .footer-info ul li { display: flex; align-items: center; justify-content: center; }
    .social-icons { display: flex; justify-content: center; }
    .footer-bottom { flex-direction: column; text-align: center; gap: 15px; }
}

@media (max-width: 576px) {
    .stats-home { grid-template-columns: 1fr; }
}

/* ========================================================
   8. SISTEMA BILINGÜE (INTERRUPTOR CSS - VERSIÓN LIMPIA Y SEGURA)
   ======================================================== */
/* 1. Por defecto, si el inglés NO está activo, oculta todo el inglés a la fuerza */
body:not(.lang-active-en) .lang-en { 
    display: none !important; 
}

/* 2. Si el inglés SÍ está activo, oculta todo el español a la fuerza */
body.lang-active-en .lang-es { 
    display: none !important; 
}

/* Estilo visual del selector ES | EN del encabezado */
.language-switch {
    display: flex; align-items: center; gap: 8px;
    font-weight: 800; font-size: 13px; color: #aaa;
}
.lang-btn { cursor: pointer; transition: 0.3s; color: #aaa; }
.lang-btn.active { color: var(--primary-dark); }
.lang-btn:hover { color: var(--accent-yellow); }