:root {
    --bg: #050505;
    --card-bg: rgba(22, 22, 26, 0.7);
    --primary: #0052cc; 
    --accent: #39ff14;  
    --text: #ffffff;
    --text-dim: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);
}

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

body { 
    background-color: var(--bg);
    /* Se agrega ../ para salir de la carpeta css y entrar a imagenes */
    background-image: linear-gradient(rgba(5, 5, 5, 0.8), rgba(5, 5, 5, 0.9)), url('../imagenes/logo_hero.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text); 
    font-family: 'Outfit', sans-serif;
}

/* --- Animaciones --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}
.reveal { opacity: 0; }
.reveal.active { animation: fadeInUp 0.8s ease-out forwards; }
.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

/* --- Layout --- */
header {
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border);
    background: rgba(5, 5, 5, 0.8);
}

.logo-svg {
    height: 38px;
    width: auto;
    display: block;
    transition: transform 0.3s ease;
}

.logo-svg:hover { transform: scale(1.05); }

nav a {
    color: var(--text);
    text-decoration: none;
    margin-left: 2rem;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
    padding-bottom: 5px;
}
nav a:hover { color: var(--accent); }
nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent);
    transition: width 0.3s;
}
nav a:hover::after { width: 100%; }

section { padding: 7rem 5%; max-width: 1200px; margin: 0 auto; }

/* --- Hero --- */
.hero {
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero h1 { 
    font-size: clamp(3rem, 8vw, 5.5rem); 
    line-height: 1.1;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 30px rgba(0, 82, 204, 0.4);
    font-weight: 800;
}

.hero h1 span {
    background: linear-gradient(90deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p { 
    color: var(--text-dim); 
    max-width: 750px; 
    font-size: clamp(1.1rem, 4vw, 1.4rem); 
    margin-bottom: 3rem;
}

.btn-main {
    background: var(--primary);
    color: white;
    padding: 1.2rem 3.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 82, 204, 0.4);
    display: inline-block;
    border: 2px solid transparent;
}

.btn-main:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 15px 40px rgba(0, 82, 204, 0.6);
    background: #0062ff;
    border-color: var(--accent);
}

/* --- Servicios --- */
.section-title { text-align: center; margin-bottom: 5rem; }
.section-title h2 { font-size: 3rem; margin-bottom: 20px; font-weight: 800; }
.section-title div { width: 70px; height: 4px; background: var(--accent); margin: 0 auto; border-radius: 2px; }

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.service-card {
    background: var(--card-bg);
    padding: 3.5rem 3rem;
    border-radius: 24px;
    border: 1px solid var(--border);
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
}

.service-card:hover {
    border-color: var(--accent);
    transform: translateY(-10px);
    background: rgba(22, 22, 26, 0.9);
}
.service-card h3 { font-size: 1.6rem; margin-bottom: 1rem; color: var(--accent); }
        .service-card p { font-size: 1.05rem; color: var(--text-dim); }

/* --- Formulario --- */
.contact-container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 5rem;
    border-radius: 30px;
    border: 1px solid var(--border);
}

/* Estilo unificado para campos */
form input, form textarea, form select {
    width: 100%;
    padding: 1.2rem;
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 12px;
    font-family: inherit;
    transition: all 0.3s ease;
}

/* Ajustes específicos para el Select */
form select {
    appearance: none;
    cursor: pointer;
    /* Agregamos la flecha verde neón */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2300ff88' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.2rem center;
    background-size: 1.1em;
    padding-right: 3rem; /* Espacio para que el texto no pise la flecha */
}

/* Estilo de las opciones al desplegar */
form select option { 
    background-color: #16161a; 
    color: #ffffff; 
    padding: 10px;
}

/* Estado Focus (Cuando el usuario hace clic) */
form input:focus, form textarea:focus, form select:focus { 
    border-color: var(--accent); 
    outline: none; 
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.05); /* Brillo sutil verde */
}

/* Resalte al pasar el mouse */
form input:hover, form textarea:hover, form select:hover {
    border-color: var(--accent);
}

.btn-submit {
    background: var(--accent);
    color: #000;
    width: 100%;
    padding: 1.2rem;
    border: none;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.3s;
}

/* --- WhatsApp & ScrollTop --- */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 1000;
    transition: 0.3s;
    animation: pulse-wa 2s infinite;
}
.whatsapp-btn svg {
    width: 35px;
    height: 35px;
}

.whatsapp-btn:hover {
    transform: scale(1.1) translateY(-5px);
    background-color: #20ba5a;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.5);
}

@keyframes pulse-wa {
    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); }
}

#scrollTopBtn {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99;
    background-color: var(--primary);
    color: white;
    padding: 15px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
}

/* --- Brands Bar (Tecnología de Clase Mundial) --- */
.brands-bar {
    background: rgba(0, 0, 0, 0.4);
    padding: 5rem 0;
    text-align: center;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

/* El título de la sección siempre en Verde Neón */
.brands-bar p {
    margin-bottom: 3rem; 
    font-size: 0.9rem; 
    text-transform: uppercase; 
    letter-spacing: 4px; 
    color: var(--accent); /* Verde Neón */
    font-weight: 700;
}

.brands-flex {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4rem;
    opacity: 0.5; /* Estado inicial atenuado */
    transition: 0.4s ease;
    max-width: 1000px;
    margin: 0 auto;
}

/* Las marcas en gris claro por defecto */
.brands-flex span { 
    color: var(--text-dim); 
    font-size: 1.4rem; 
    font-weight: 800; 
    letter-spacing: 2px;
    transition: color 0.3s ease;
}

/* Al pasar el mouse por la barra, las marcas cobran vida */
.brands-bar:hover .brands-flex { 
    opacity: 1; 
}

.brands-flex span:hover {
    color: var(--text); /* Blanco puro al hover individual */
}

/* Portfolio y Footer se mantienen igual */
/* --- Portfolio (Casos de Éxito y Soluciones) --- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.port-item {
    background: rgba(255, 255, 255, 0.02);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    border-left: 5px solid var(--primary); /* El toque azul MBIT que lo distingue */
    transition: 0.3s ease;
}

.port-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-left-color: var(--accent); /* Cambia a verde al pasar el mouse */
    transform: translateX(5px);
}

/* Títulos en Verde Neón */
.port-item h4 { 
    margin-bottom: 1rem; 
    font-size: 1.3rem; 
    font-weight: 700; 
    color: var(--accent); 
}

/* Texto descriptivo en Gris Pequeño y Legible */
.port-item p { 
    font-size: 0.95rem; 
    color: var(--text-dim); 
    line-height: 1.5;
    font-weight: 300;
}
footer {
    text-align: center;
    padding: 3rem 2rem; /* Reducido de 6rem a 3rem */
    background: #020202;
    border-top: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 0.85rem; /* Ligeramente más pequeño para mayor finura */
}

footer .logo {
    margin-bottom: 1.5rem !important; /* Espacio más ajustado bajo el logo */
}

footer p {
    line-height: 1.4;
    opacity: 0.8;
}

.footer-socials {
    margin-top: 1.5rem; /* Reducido de 2.5rem a 1.5rem */
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.footer-socials svg {
    width: 20px; /* Iconos un poco más pequeños y discretos */
    height: 20px;
}
.footer-socials a {
    color: var(--text-dim);
    transition: all 0.3s ease;
    display: inline-flex;
}
.footer-socials a:hover {
    color: var(--accent); /* El Verde Neón */
    transform: translateY(-3px);
}
/* Efecto de transición entre secciones */
/* Línea divisoria con efecto rayo */
.rayo-divider {
    width: 100%;
    height: 1px;
    background: rgba(0, 255, 136, 0.1);
    position: relative;
    overflow: hidden;
}

/* El haz de luz (el rayo) */
.rayo-divider::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 30%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        var(--accent), 
        #ffffff, 
        var(--accent), 
        transparent
    );
    box-shadow: 0 0 15px var(--accent);
    transition: none;
}

/* Animación cuando se activa */
.rayo-divider.active::after {
    animation: rayo-paso 1.5s ease-out forwards;
}

@keyframes rayo-paso {
    0% { left: -100%; opacity: 0; }
    30% { opacity: 1; }
    100% { left: 100%; opacity: 0; }
}