 :root {
            --primary: #0d1b2a; /* Azul marino profundo (Petróleo) */
            --secondary: #1b263b;
            --accent: #ff6b00; /* Naranja industrial / Seguridad */
            --light: #f4f4f4;
            --text: #e0e1dd;
        }
        * { box-sizing: border-box; margin: 0; padding: 0; }
        body {
            font-family: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            line-height: 1.6;
            color: #333;
            background-color: #fff;
        }
        
        /* Header */
        header {
            background: var(--primary);
            color: var(--text);
            padding: 1rem 5%;
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: sticky;
            top: 0;
            z-index: 100;
            box-shadow: 0 2px 10px rgba(0,0,0,0.3);
        }
        .logo { font-size: 1.5rem; font-weight: 900; letter-spacing: 1px; }
        .logo span { color: var(--accent); }
        nav a {
            color: var(--text);
            text-decoration: none;
            margin-left: 20px;
            font-weight: 500;
            transition: color 0.3s;
        }
        nav a:hover { color: var(--accent); }
        .btn-portal {
            background: var(--accent);
            color: #fff;
            padding: 10px 20px;
            border-radius: 4px;
            border: none;
            cursor: pointer;
            font-weight: bold;
            text-decoration: none;
            white-space: nowrap; /* <--- EVITA QUE EL BOTÓN SE PARTE A LA MITAD */
        }
        .btn-portal:hover { background: #cc5500; }

        /* Botón Hamburguesa - Oculto en PC */
        .menu-toggle {
            display: none;
            background: none;
            border: none;
            color: white;
            font-size: 2rem;
            cursor: pointer;
        }

        /* Diseño Responsivo para Tablets y Móviles */
        @media (max-width: 920px) { /* <--- CAMBIADO A 920px PARA QUE NO SE DESORDENE */
            header {
                flex-wrap: wrap;
                padding: 1rem;
            }
            .menu-toggle {
                display: block; /* Mostramos el botón ☰ */
            }
            nav {
                display: none; /* Oculto por defecto */
                flex-direction: column;
                width: 100%;
                margin-top: 1rem;
            }
            nav.active {
                display: flex; /* Mostrar al hacer clic */
            }
            nav a {
                margin: 0;
                padding: 15px 0;
                border-bottom: 1px solid #2a3b52;
                width: 100%;
                text-align: left;
            }
            .btn-portal {
                margin-top: 10px;
                text-align: center;
            }
        }

        /* Hero */
        .hero {
            background: linear-gradient(rgba(13, 27, 42, 0.85), rgba(13, 27, 42, 0.85)), url('https://images.unsplash.com/photo-1581094794329-c8112a89af12?q=80&w=2070') center/cover;
            color: #fff;
            text-align: center;
            padding: 6rem 5%;
        }
        .hero h1 { font-size: 2.0rem; margin-bottom: 1rem; text-transform: uppercase; }
        .hero p { font-size: 1.2rem; max-width: 800px; margin: 0 auto 2rem auto; color: #ccc; }
        .hero-cta { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; }
        .btn {
            padding: 12px 25px;
            font-size: 1rem;
            border: 2px solid #fff;
            color: #fff;
            text-decoration: none;
            font-weight: bold;
            border-radius: 4px;
            transition: all 0.3s;
        }
        .btn-primary { background: var(--accent); border-color: var(--accent); }
        .btn:hover { background: #fff; color: var(--primary); }
        .btn-primary:hover { background: #cc5500; color: #fff; border-color: #cc5500; }

        .portal-highlight {
            background: var(--accent);
            color: #fff;
            padding: 1rem 5%;
            text-align: center;
            font-weight: 500;
        }

        /* Sections */
        .section { padding: 2rem 1%; }
        .section h2 { font-size: 2rem; margin-bottom: 2rem; text-align: center; color: var(--primary); border-bottom: 3px solid var(--accent); display: inline-block; }
        .center-title { text-align: center; margin-bottom: 3rem; }

        /* Services */
        .services-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 2rem;
        }
        .service-card {
            background: var(--light);
            border-top: 4px solid var(--primary);
            padding: 2rem;
            border-radius: 4px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.05);
            transition: transform 0.3s;
        }
        .service-card:hover { transform: translateY(-5px); border-top-color: var(--accent); }
        .service-card h3 { color: var(--primary); margin-bottom: 1rem; }
        .service-card p { font-size: 0.95rem; color: #555; }

        /* Quality & Portal */
        .quality-portal {
            background: var(--secondary);
            color: var(--text);
            display: flex;
            flex-wrap: wrap;
            gap: 2rem;
        }
        .quality-portal > div { flex: 1; min-width: 300px; padding: 2rem; }
        .quality-portal h2 { color: #fff; border-bottom-color: var(--accent); }
        .mockup-portal {
            background: #fff;
            color: #333;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 10px 20px rgba(0,0,0,0.3);
        }
        .mockup-header { background: var(--primary); color:#fff; padding: 1rem; font-weight: bold; display:flex; justify-content: space-between;}
        .mockup-body { padding: 1.5rem; }
        .mockup-item { border-bottom: 1px solid #eee; padding: 1rem 0; display: flex; justify-content: space-between; align-items: center; }
        .mockup-item:last-child { border: none; }
        .mockup-btn { background: #28a745; color: #fff; padding: 5px 10px; border-radius: 4px; font-size: 0.8rem; text-decoration: none; }

        /* Contact */
        .contact-area { display: flex; flex-wrap: wrap; gap: 2rem; }
        .contact-info, .contact-form { flex: 1; min-width: 300px; }
        .contact-form input, .contact-form textarea {
            width: 100%;
            padding: 1rem;
            margin-bottom: 1rem;
            border: 1px solid #ccc;
            border-radius: 4px;
        }
        .contact-form button { width: 100%; }

        footer {
            background: var(--primary);
            color: var(--text);
            text-align: center;
            padding: 2rem;
        }




/* Modal Portal de Clientes */
.modal-overlay {
    display: none; /* Oculto por defecto */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* Fondo oscuro */
    backdrop-filter: blur(5px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}
.modal-overlay.active {
    display: flex; /* Mostrar cuando se activa */
}
.modal-content {
    background: #fff;
    padding: 2.5rem;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    text-align: center;
    animation: slideDown 0.3s ease-out;
}
@keyframes slideDown {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.modal-content h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}
.modal-content p {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}
.modal-content input {
    width: 100%;
    padding: 12px;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}
.modal-content .btn-primary {
    width: 100%;
    border: none;
    cursor: pointer;
    margin-bottom: 1rem;
}
.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
}
.modal-close:hover { color: #333; }
.modal-help {
    font-size: 0.8rem;
    color: var(--accent);
    text-decoration: none;
}
/* Quality & Portal */
.quality-portal {
    background: var(--secondary);
    color: var(--text);
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}
.quality-portal > div { flex: 1; min-width: 300px; padding: 2rem; }
.quality-portal h2 { color: #fff; border-bottom-color: var(--accent); }

.mockup-portal {
    background: #fff;
    color: #333;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    /* Transición para el efecto Hover */
    transition: all 0.3s ease;
    transform: scale(0.98);
}

/* EFECTO HOVER: Resalta todo el panel cuando el mouse pasa por encima */
.mockup-portal:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 40px rgba(255, 107, 0, 0.4); /* Sombra naranja brillante */
    border: 2px solid var(--accent);
}

.mockup-header { background: var(--primary); color:#fff; padding: 1rem; font-weight: bold; display:flex; justify-content: space-between;}
.mockup-body { padding: 1.5rem; }
.mockup-item { 
    border-bottom: 1px solid #eee; 
    padding: 1rem 0; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    transition: background 0.2s;
}
.mockup-item:last-child { border: none; }

/* Efecto hover en las filas individuales */
.mockup-portal:hover .mockup-item {
    background: #f9f9f9;
    padding-left: 10px;
}

/* Botones y Animación de Descarga (Agrandados) */
.mockup-btn { 
    background: #28a745; 
    color: #fff; 
    padding: 8px 15px; /* Botón más grande */
    border-radius: 4px; 
    font-size: 0.9rem; 
    text-decoration: none;
    position: relative;
    transition: all 0.3s;
    min-width: 130px;
    text-align: center;
}

/* Flecha de mouse gigante */
.mockup-cursor {
    position: absolute;
    font-size: 2.5rem; /* Tamaño muy grande */
    right: 140px; /* Posición inicial fuera del botón */
    opacity: 0;
    pointer-events: none;
    z-index: 10;
    filter: drop-shadow(2px 2px 2px rgba(0,0,0,0.5));
}

/* Clases de animación automática */
.mockup-item.downloading .mockup-btn {
    background: #ffc107;
    color: #333;
    transform: scale(1.1); /* El botón crece durante la descarga */
}
.mockup-item.downloading .mockup-cursor {
    opacity: 1;
    animation: moveCursor 1s forwards;
}
.mockup-item.completed .mockup-btn {
    background: #007bff;
}
.mockup-item.completed .mockup-btn::after {
    content: ' ✓';
}

@keyframes moveCursor {
    0% { right: 140px; opacity: 0; transform: rotate(-10deg); }
    70% { right: 10px; opacity: 1; transform: rotate(0deg); }
    100% { right: 10px; opacity: 1; transform: rotate(0deg); } /* Se queda sobre el botón */
}

/* Botón gigante dentro del portal para hacer clic real */
.btn-portal-gigante {
    display: block;
    width: 100%;
    text-align: center;
    background: var(--accent);
    color: #fff;
    font-weight: bold;
    padding: 15px;
    margin-top: 20px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 1.1rem;
    transition: background 0.3s;
}
.btn-portal-gigante:hover {
    background: #cc5500;
}
/* Estilos para nuevos Servicios */
.icon-circle {
    width: 60px;
    height: 60px;
    background: var(--light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    border: 2px solid var(--primary);
}
.capacity-bar {
    margin-top: 1.5rem;
}
.capacity-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 5px;
    font-weight: bold;
    color: var(--primary);
}
.bar-bg {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
}
.bar-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 4px;
    transition: width 1s ease-in-out;
}

/* Estilos para Sobre Nosotros */
.about-us {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    max-width: 1000px;
    margin: 0 auto;
}
.about-text {
    flex: 1;
    min-width: 300px;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}
.stat-item {
    text-align: center;
    background: #fff;
    padding: 1.5rem 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border-bottom: 3px solid var(--accent);
}
.stat-item h4 {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}
.stat-item p {
    font-size: 0.9rem;
    color: #333; /* Gris muy oscuro para contraste alto en tarjeta blanca */
}

/* Tarjeta de contacto para separar del fondo */
.contact-card {
    flex: 1;
    min-width: 300px;
    background: #fff;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-top: 4px solid var(--accent);
}

.map-container {
    flex: 1;
    min-width: 300px;
    background: #eee;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    min-height: 500px; /* Mismo alto mínimo que la tarjeta de al lado */
    display: flex;
}
.map-container iframe {
    flex: 1;
}
/* Estilos mejorados para las cajas del formulario */
.contact-card input,
.contact-card textarea {
    width: 100%;
    padding: 15px; /* Más espacio interno para escribir cómodo */
    margin-bottom: 1.2rem;
    font-family: inherit;
    font-size: 1rem;
    color: #333;
    background: #fdfdfd; /* Fondo casi blanco, pero no puro */
    border: 2px solid #d1d5db; /* Borde gris definido */
    border-radius: 6px; /* Bordes redondeados suaves */
    transition: all 0.3s ease; /* Transición suave al hacer clic */
    box-sizing: border-box;
}

/* Efecto cuando el usuario hace clic en la caja */
.contact-card input:focus,
.contact-card textarea:focus {
    outline: none; /* Saca el borde azul default del navegador */
    border-color: var(--accent); /* Lo pinta de naranja */
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.2); /* Halo naranja sutil */
}

/* Placeholder (el texto gris de adentro) más sutil */
.contact-card input::placeholder,
.contact-card textarea::placeholder {
    color: #9ca3af;
    font-weight: normal;
}

/* Botón de enviar más grande e impactante */
.contact-card button {
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    margin-top: 0.5rem;
}

.contact-card button:hover {
    background: #cc5500;
    transform: translateY(-2px); /* El botón "salta" un poquito al pasar el mouse */
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
/* =========================================
   Correcciones Móviles: Descuadre y Tamaños
   ========================================= */

/* 1. Prevenir el descuadre del fondo azul (Overflow horizontal) */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Romper palabras extremadamente largas si superan la pantalla */
h1, h2, h3, a {
    word-wrap: break-word;
    overflow-wrap: break-word;
}
@media (max-width: 768px) {
    
    /* Centrado del título */
    .center-title {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .section h2 {
        font-size: 1.4rem !important;
        max-width: 100%;
        white-space: normal;
        text-align: center;
        padding-bottom: 8px;
    }

    /* ============================================
       CONTACTO - CORREGIDO
       ============================================ */
    .contact-area {
        flex-direction: column;
        gap: 1.5rem;
    }

    .contact-card {
        min-width: unset !important; /* Elimina el ancho mínimo */
        width: 100%;
        box-sizing: border-box;
        padding: 1.2rem !important; /* Padding más compacto */
        margin: 0;
    }

    /* Info de contacto (dirección, teléfono, email) */
    .contact-card .contact-info-item,
    .contact-card > div:first-child {
        display: flex;
        flex-direction: column;
        gap: 0.6rem; /* Espacio entre cada dato */
        margin-bottom: 1.2rem !important;
        padding-bottom: 1.2rem;
        border-bottom: 1px solid #e5e5e5;
    }

    /* Cada línea individual de info */
    .contact-card .contact-info-item p,
    .contact-card .contact-info-item div,
    .contact-card > div:first-child p {
        font-size: 0.85rem !important;
        line-height: 1.4 !important;
        margin-bottom: 0 !important;
        word-break: break-word;
    }

    /* Iconos más pequeños en móvil */
    .contact-card .icon-circle {
        width: 40px !important;
        height: 40px !important;
        font-size: 1.2rem !important;
        margin-bottom: 0 !important;
        flex-shrink: 0;
    }

    /* Si usas iconos inline (no en círculo) */
    .contact-card .contact-icon {
        font-size: 1rem !important;
        margin-right: 8px;
    }

    /* Formulario */
    .contact-card form {
        margin-top: 0.5rem;
    }

    .contact-card input,
    .contact-card textarea {
        width: 100%;
        padding: 10px 12px !important; /* Más compacto */
        margin-bottom: 0.8rem !important;
        font-size: 0.9rem !important;
        box-sizing: border-box;
        min-width: 0; /* Permite encogimiento */
    }

    .contact-card button {
        width: 100%;
        padding: 12px;
        font-size: 0.95rem;
        display: block;
        margin-top: 0.3rem;
    }

    /* Mapa */
    .map-container {
        min-width: unset !important;
        width: 100%;
        flex-basis: 100%;
        min-height: 200px;
        height: 200px;
    }

    .map-container iframe {
        width: 100%;
        height: 100%;
    }
}

/* ============================================
   EXTRA: Para pantallas muy pequeñas (< 400px)
   ============================================ */
@media (max-width: 400px) {
    .contact-card {
        padding: 1rem !important;
        border-radius: 6px;
    }

    .contact-card input,
    .contact-card textarea {
        padding: 8px 10px !important;
        font-size: 0.85rem !important;
    }

    .contact-card button {
        padding: 10px;
        font-size: 0.9rem;
    }

    .map-container {
        min-height: 160px;
        height: 160px;
    }
}

/* Para estructurar mejor la info de contacto */
.contact-details {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.contact-detail-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.contact-detail-row .detail-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.contact-detail-row .detail-text {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
}

/* En móvil */
@media (max-width: 768px) {
    .contact-details {
        gap: 0.6rem;
        margin-bottom: 1rem;
        padding-bottom: 1rem;
    }
    
    .contact-detail-row {
        gap: 4px;
    }
    
    .contact-detail-row .detail-icon {
        font-size: 0.95rem;
    }
    
    .contact-detail-row .detail-text {
        font-size: 0.82rem;
    }
}