/* --- VARIABLES Y CONFIGURACIÓN GLOBAL --- */
:root {
    /* Paleta de Colores */
    --color-primary: #0B2447;    /* Azul Marino Profundo */
    --color-secondary: #324f88;  /* Cian Eléctrico */
    --color-accent: #E31C25;     /* Rojo Ingeniero */
    --color-cyan: #4dcfff;       /* Cyan brillante para hover/detalles */
    --color-text-dark: #1e293b;  /* Gris muy oscuro */
    --color-text-light: #F3F4F6; 
    --color-text-soft: #475569;
    --color-gray-soft: #64748b;
    
    /* Fondos de Contraste */
    --bg-page: #f8fafc;          /* Fondo base */
    --bg-section-light: #eff6ff; /* Azul muy pálido para secciones */
    --bg-section-contrast: #e2e8f0; /* Gris técnico para máximo contraste */
    --bg-section-soft: #edf2fb;

    /* Tipografía */
    --font-heading: 'Rajdhani', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--color-text-dark);
    background-color: var(--bg-page);
    line-height: 1.7;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* --- CLASES DE UTILIDAD PARA ESPACIADO --- */
section {
    padding: 5rem 0; /* Espaciado estándar entre secciones */
}

@media (max-width: 768px) {
    section {
        padding: 3.5rem 0; /* Espaciado reducido en móvil */
    }
}

.container {
    max-width: 1400px; /* Aumentado para un diseño más amplio */
    margin: 0 auto;
    padding: 0 40px;
}

/* Tipografía Básica */
h1, h2, h3, h4 { 
    font-family: var(--font-heading); 
    font-weight: 700;
}

/* --- BOTONES COMUNES --- */
.btn {
    padding: 14px 32px;
    text-decoration: none;
    font-weight: 700;
    border-radius: 4px;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    display: inline-block;
    font-size: 1.05rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.btn-primary {
    background-color: var(--color-accent);
    color: white;
    border: 1px solid var(--color-accent);
    box-shadow: 0 4px 6px rgba(227, 28, 37, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
}

.btn-primary:hover {
    background-color: #c0151d;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(227, 28, 37, 0.4);
}

.btn-outline {
    background-color: transparent;
    color: white;
    border: 2px solid var(--color-secondary);
    font-weight: 700;
}

.btn-outline:hover {
    background-color: rgba(0, 168, 232, 0.1);
    box-shadow: 0 0 15px rgba(0, 168, 232, 0.5);
    border-color: #4dcfff;
}

/* --- CARRUSEL DE SOLUCIONES --- */
.solution-carousel,
.carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    max-height: 360px;
    border-radius: 8px;
    background: #0b2447;
    border: 1px solid rgba(11, 36, 71, 0.08);
    box-shadow: 0 24px 60px -32px rgba(11, 36, 71, 0.65);
}

.carousel-slides {
    display: flex;
    width: 100%;
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.carousel-slide {
    min-width: 100%;
    position: relative;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.carousel-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 58%, rgba(11, 36, 71, 0.38));
    pointer-events: none;
}

.carousel-dots {
    position: absolute;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 2;
}

.dot {
    appearance: none;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.78);
    cursor: pointer;
    display: block;
    padding: 0;
    transition: all 0.3s ease;
}

.dot.active,
.dot:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    transform: scale(1.25);
    box-shadow: 0 0 12px rgba(227, 28, 37, 0.42);
}

.text-content h2,
.intro-copy h2 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 3vw, 2.8rem);
    color: var(--color-primary);
    text-transform: uppercase;
    line-height: 1.05;
    margin: 0.8rem 0 1.2rem;
}

@media (max-width: 768px) {
    .solution-carousel,
    .carousel-container {
        aspect-ratio: 16 / 11;
        max-height: 240px;
    }
    .carousel-slide img {
        min-height: 0;
    }
}

/* --- NAVEGACIÓN --- */
.navbar {
    background-color: rgba(11, 36, 71, 0.98);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 168, 232, 0.3);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-img {
    height: 60px; 
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: rgba(255,255,255,0.9);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-links a:hover { 
    color: var(--color-cyan); 
    text-shadow: 0 0 10px rgba(0,168,232,0.6); 
}

.menu-toggle {
    display: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
}

/* --- LANGUAGE SWITCHER --- */
.lang-switch {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: 1.5rem;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 5px 10px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.lang-switch:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--color-cyan);
}

.lang-switch a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0 5px;
}

.lang-switch a.active {
    color: var(--color-cyan);
    text-shadow: 0 0 10px rgba(77, 207, 255, 0.6);
}

.lang-switch span {
    color: rgba(255,255,255,0.3);
}

@media (max-width: 768px) {
    .lang-switch {
        margin: 15px 25px;
        width: fit-content;
    }
}

/* --- DROPDOWN MENU --- */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: rgba(11, 36, 71, 0.98);
    min-width: 240px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    border-radius: 4px;
    padding: 0.5rem 0;
    z-index: 1001;
    flex-direction: column;
    gap: 0;
    border: 1px solid rgba(77, 207, 255, 0.1);
    backdrop-filter: blur(10px);
}

.dropdown:hover .dropdown-menu {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.dropdown-menu li {
    width: 100%;
    margin: 0;
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: rgba(255,255,255,0.85);
    text-transform: none; 
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.dropdown-menu a:hover {
    background-color: rgba(77, 207, 255, 0.1);
    color: #4dcfff;
    padding-left: 25px;
}

.dropdown-toggle i {
    font-size: 0.8em;
    margin-left: 5px;
    transition: transform 0.3s;
}

.dropdown:hover .dropdown-toggle i {
    transform: rotate(180deg);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- FOOTER --- */
footer {
    background-color: var(--color-primary);
    position: relative;
    color: #ffffff;
    padding: 4rem 0 2rem;
    font-size: 1.05rem;
    border-top: 4px solid var(--color-secondary);
    overflow: hidden;
}

footer .container {
    position: relative;
    z-index: 2;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    color: white;
    margin-bottom: 2rem;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--color-secondary);
    display: inline-block;
    padding-bottom: 5px;
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 1rem; }

.footer-col a { 
    color: rgba(255, 255, 255, 0.8); 
    text-decoration: none; 
    transition: all 0.3s ease; 
    display: inline-block;
}

.footer-col a:hover { 
    color: #4dcfff; 
    transform: translateX(8px);
    opacity: 1;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
}

.footer-logo-img {
    height: 50px;
    width: auto;
    display: block;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}


/* --- OPTIMIZACIÓN MOBILE / RESPONSIVE GLOBAL --- */
@media (max-width: 1024px) {
    .container {
        max-width: 95%;
        padding: 0 30px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr; 
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
        max-width: 100%;
    }

    /* Navbar Mobile */
    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: rgba(11, 36, 71, 0.98);
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        padding: 0;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-in-out;
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
        border-top: 1px solid rgba(255,255,255,0.05);
    }

    .nav-links.active {
        max-height: 100vh; /* Permitir que crezca lo suficiente */
        padding-bottom: 20px;
        overflow-y: auto; /* Scroll si es muy alto */
    }

    .nav-links li {
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }

    .nav-links a {
        display: block;
        padding: 15px 25px;
        width: 100%;
        color: rgba(255, 255, 255, 0.95) !important;
    }
    
    .nav-links .lang-switch a {
        display: inline;
        width: auto;
        padding: 0 5px;
    }
    
    .nav-links a:hover {
        color: var(--color-cyan) !important;
        background: rgba(255, 255, 255, 0.05);
    }
    
    .nav-links li a.btn {
        display: inline-block;
        width: auto;
        margin: 15px 25px;
    }

    /* Dropdown en Mobile */
    .dropdown-menu {
        position: static;
        box-shadow: none;
        background: rgba(0,0,0,0.2); /* Ligeramente más oscuro */
        padding-left: 0;
        display: none; 
        border: none;
        min-width: 100%;
    }
    
    .dropdown.active .dropdown-menu {
        display: flex;
    }
    
    .dropdown-toggle {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    /* Footer Mobile */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* --- WHATSAPP FLOATING BUTTON --- */
.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: 35px; box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2); z-index: 1000; display: flex; justify-content: center; align-items: center; transition: all 0.3s ease; text-decoration: none; } .whatsapp-float:hover { background-color: #128C7E; transform: scale(1.1); box-shadow: 2px 2px 15px rgba(0, 0, 0, 0.3); color: #FFF; }
