:root {
    --black: #000000;
    --dark-gray: #0a0a0a;
    --card-bg: #111111;
    --accent: #ffffff;
    --gray: #888888;
    --white: #ffffff;
    --transition: 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

body {
    background-color: var(--black);
    color: var(--white);
    font-family: 'Rubik', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ==========================================================================
   NAVBAR
   ========================================================================== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 8%;
    background-color: #000000;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #1a1a1a;
}

.logo-container {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--white);
    gap: 15px;
}

.nav-isotipo {
    height: 45px;
    width: auto;
    display: block;
}

.logo-text {
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: 1px;
    line-height: 1;
    text-transform: uppercase;
}

.logo-text span {
    font-weight: 300;
    color: var(--gray);
    text-transform: none;
}

.nav-links {
    display: flex;
    align-items: center;
    list-style: none;
}

.nav-links a {
    color: #ffffff;
    text-decoration: none;
    margin-left: 30px;
    font-size: 0.85rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #888888;
}

.btn-nav {
    border: 1px solid #ffffff;
    padding: 8px 20px;
    border-radius: 4px;
}

.btn-nav:hover {
    background-color: #ffffff;
    color: #000000 !important;
}

.hamburger {
    display: none;
    color: #ffffff;
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- LANG SWITCH PREMIUM --- */
.lang-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 25px;
    padding: 5px 15px;
    border-left: 1px solid rgba(255, 255, 255, 0.1); /* Línea divisoria sutil */
    font-family: 'Rubik', sans-serif;
}

.lang-switch a, 
.lang-switch span {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-decoration: none;
    text-transform: uppercase;
    transition: all 0.4s var(--transition);
    cursor: pointer;
}

/* Estado Inactivo */
.lang-switch a {
    color: rgba(255, 255, 255, 0.3); /* Gris muy suave */
}

/* Estado Activo (La página donde estás) */
.lang-switch span.active,
.lang-switch a.active {
    color: var(--white);
    position: relative;
}

/* Puntito indicador debajo del idioma activo */
.lang-switch span.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background-color: var(--white);
    border-radius: 50%;
}

/* Hover Effect */
.lang-switch a:hover {
    color: var(--white);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Responsive: En móvil lo integramos mejor */
@media (max-width: 768px) {
    .lang-switch {
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        margin: 20px 0 0 0;
        padding: 15px 0;
        justify-content: center;
        width: 100%;
    }
    .lang-switch a, .lang-switch span {
        font-size: 0.9rem;
    }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
    height: 90vh; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    text-align: center; 
    position: relative;
    background: url('https://images.unsplash.com/photo-1497215728101-856f4ea42174?auto=format&fit=crop&w=1920&q=80') center/cover;
}

.hero-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.8); }
.hero-content { position: relative; z-index: 10; max-width: 800px; padding: 0 20px; }
.hero-subtitle { color: var(--gray); text-transform: uppercase; letter-spacing: 4px; font-size: 0.9rem; }
.hero h1 { font-size: clamp(2.5rem, 8vw, 4rem); margin: 20px 0; font-weight: 700; line-height: 1.1; }
.highlight { font-weight: 300; color: var(--gray); }

.btn-primary { 
    padding: 15px 35px; 
    background: var(--white); 
    color: var(--black); 
    text-decoration: none; 
    font-weight: 600; 
    border-radius: 4px; 
    display: inline-block;
    transition: var(--transition);
}

.btn-primary:hover {
    background: var(--gray);
    transform: translateY(-2px);
}

/* ==========================================================================
   SECCIONES GENERALES Y QUIÉNES SOMOS
   ========================================================================== */
.section-padding { padding: 100px 10%; }
.bg-alt { background: var(--dark-gray); }
.section-title { 
    text-align: center; 
    font-size: 2.2rem; 
    margin-top: 20px;
    margin-bottom: 50px; 
    text-transform: uppercase; 
    letter-spacing: 3px; 
}

.about-us-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 50px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.about-us-content .subtitle {
  font-size: 0.8rem;
  letter-spacing: 3px;
  color: var(--gray);
  font-weight: 500;
  margin-bottom: 10px;
  display: block;
}

.about-us-content h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  margin-bottom: 30px;
}

.about-us-content h2 span { font-weight: 300; color: var(--gray); }

.about-us-content p {
  margin-bottom: 18px;
  font-size: 1rem;
  color: #ccc;
  line-height: 1.7;
}

.about-us-content strong { color: var(--white); font-weight: 500; }

.about-us-footer {
  margin-top: 30px;
  padding-left: 20px;
  border-left: 2px solid var(--gray);
}

.about-us-footer p { font-style: italic; font-size: 0.95rem; color: var(--gray); }

.about-us-animation {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: center;
}

/* ==========================================================================
   SERVICIOS (CORREGIDO PARA VERTICALIDAD)
   ========================================================================== */
.services-hero {
    text-align: center;
    max-width: 900px;
    margin: 0 auto 80px auto;
    padding-bottom: 40px;
    border-bottom: 1px solid #1a1a1a;
}

.hero-service-icon {
    height: 180px; 
    width: auto;
    opacity: 0.9;
    transition: var(--transition);
}

.services-hero-content .subtitle {
    font-size: 0.85rem;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: var(--gray);
    display: block;
    margin-bottom: 20px;
}

.services-hero h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.2;
    margin-bottom: 25px;
    font-weight: 700;
}

.services-hero h2 span { font-weight: 300; color: var(--gray); }

.services-hero p {
    font-size: 1.1rem;
    color: var(--gray);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
}

.services-grid { 
    display: grid; 
    /* Ajustado min-width a 250px para forzar verticalidad en desktop */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 30px; 
    margin-top: 20px;
}

.service-card { 
    background: var(--card-bg); 
    /* Aumentado padding vertical (80px) para que sean más altas */
    padding: 80px 30px; 
    border: 1px solid #1a1a1a; 
    text-align: center; 
    transition: var(--transition); 
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 480px; /* Asegura la altura vertical mínima */
}

.service-card:hover { 
    border-color: var(--white); 
    transform: translateY(-15px); /* Salto más elegante */
}

.icon-box { 
    font-size: 3rem; 
    margin-bottom: 30px; 
    color: var(--gray); 
}

.service-card h3 {
    margin-bottom: 20px;
    font-size: 1.4rem;
}

/* ==========================================================================
   SOFTWARE SECTION (CARRUSEL)
   ========================================================================== */
.software-section {
    margin: 60px 0 80px 0; 
    overflow: hidden; 
}

.software-section p { 
    text-align: center; 
    font-size: 0.7rem; 
    color: var(--gray); 
    letter-spacing: 3px; 
    margin-bottom: 30px; 
}

.carousel-track { 
    display: flex; 
    width: calc(200px * 12); 
    animation: scroll 25s linear infinite; 
}

.carousel-track i { 
    font-size: 2.5rem; 
    width: 200px; 
    color: #222; 
    text-align: center; 
    transition: 0.3s; 
}

.carousel-track i:hover { color: var(--white); }

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-200px * 6)); }
}

/* Ajuste del contenedor de cada item en el carrusel */
.software-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 250px; /* Un poco más ancho para que quepa el texto */
    flex-shrink: 0;
    gap: 10px;
    transition: 0.3s;
}

.software-item i {
    font-size: 2.2rem;
    color: #222; /* Color Noir base */
    transition: 0.3s;
}

.software-item span {
    font-size: 0.65rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #222;
    font-weight: 500;
}

/* Efecto al pasar el mouse */
.software-item:hover i, 
.software-item:hover span {
    color: var(--white);
}

/* Ajuste del ancho de la pista (track) */
.carousel-track {
    display: flex;
    width: calc(250px * 14); /* 250px x 14 items (7 originales + 7 duplicados) */
    animation: scroll 30s linear infinite; /* Un poco más lento para que sea legible */
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-250px * 7)); } /* Se detiene a la mitad para reiniciar el ciclo */
}

/* ==========================================================================
   EQUIPO
   ========================================================================== */
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 40px; }

.team-image-container { 
    width: 100%; 
    aspect-ratio: 4/5; 
    overflow: hidden; 
    border-radius: 20px; 
    margin-bottom: 20px; 
    background: #1a1a1a;
}

.team-image-container img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: var(--transition); 
}

.team-info { text-align: center; }
.team-info h3 { letter-spacing: 2px; text-transform: uppercase; font-size: 1.1rem; }
.team-info span { color: var(--gray); font-size: 0.85rem; font-weight: 300; }
.team-social { margin-top: 10px; }
.team-social a { color: var(--white); opacity: 0.4; transition: 0.3s; margin: 0 5px; }

.team-card:hover img { transform: scale(1.05); }
.team-card:hover .team-social a { opacity: 1; }

/* ==========================================================================
   CLIENTES Y FORMULARIO
   ========================================================================== */
.clients-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 50px; align-items: center; }
.client-logo-wrapper { max-width: 160px; filter: grayscale(1) brightness(2); opacity: 0.5; transition: 0.3s; }
.client-logo-wrapper:hover { filter: none; opacity: 1; }
.client-logo-wrapper img { width: 100%; height: auto; }

.dark-form { max-width: 700px; margin: 0 auto; display: flex; flex-direction: column; gap: 15px; }
.input-group { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.dark-form input, .dark-form textarea { 
    background: #111; 
    border: 1px solid #222; 
    padding: 15px; 
    color: white; 
    font-family: 'Rubik'; 
}

.btn-submit { 
    background: white; 
    border: none; 
    padding: 15px; 
    font-weight: 700; 
    cursor: pointer; 
    transition: 0.3s; 
}
.btn-submit:hover { background: var(--gray); }

/* --- INDEPENDENT CONTACT SECTION --- */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
    align-items: start;
}

/* Lado Visual */
.contact-image-container {
    position: relative;
    height: 350px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 30px;
}

.contact-featured-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1) brightness(0.6);
}

.contact-img-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 30px;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    width: 100%;
}

.contact-img-overlay h3 span {
    font-weight: 300;
    color: var(--gray);
}

.direct-contact-methods {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.method-item {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--gray);
    font-size: 0.9rem;
}

.method-item i { color: var(--white); }

/* Formulario con Etiquetas Flotantes */
.section-title-left {
    font-size: 2.5rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 10px;
}

.form-description {
    color: var(--gray);
    margin-bottom: 40px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    position: relative;
    margin-bottom: 30px;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid #222;
    color: var(--white);
    font-family: 'Rubik', sans-serif;
    transition: 0.3s;
}

.form-group label {
    position: absolute;
    top: 12px;
    left: 0;
    color: #444;
    transition: 0.3s;
    pointer-events: none;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
}

/* Animación de etiqueta flotante */
.form-group input:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label,
.form-group textarea:focus ~ label,
.form-group textarea:not(:placeholder-shown) ~ label {
    top: -15px;
    color: var(--white);
    font-size: 0.65rem;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-bottom-color: var(--white);
}

.btn-submit-contact {
    width: 100%;
    padding: 18px;
    background: var(--white);
    color: var(--black);
    border: none;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    transition: 0.3s;
}

.btn-submit-contact:hover {
    background: var(--gray);
    transform: translateY(-3px);
}

/* RESPONSIVE */
@media (max-width: 992px) {
    .contact-wrapper { grid-template-columns: 1fr; gap: 50px; }
    .form-row { grid-template-columns: 1fr; }
    .contact-image-container { height: 250px; }
}

/* ==========================================================================
   FOOTER PREMIUM NOIR
   ========================================================================== */
.footer {
    background-color: var(--black);
    padding: 80px 8% 40px;
    border-top: 1px solid #111;
    color: var(--white);
}

.footer-container {
    display: grid;
    grid-template-columns: 1.5fr 0.8fr 1fr 1.2fr;
    gap: 60px;
    margin-bottom: 60px;
}

/* Títulos de las columnas */
.footer-col h4 {
    color: var(--white);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 2px;
    margin-bottom: 25px;
    font-weight: 700;
}

/* Columna Branding (Logo y descripción) */
.branding .logo-text {
    margin-bottom: 20px;
}

.branding p {
    color: var(--gray);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 25px;
    max-width: 300px;
}

/* Redes Sociales en Footer */
.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    color: var(--gray);
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--white);
    transform: translateY(-3px);
}

/* Listas de Navegación y Contacto */
.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-col ul li a {
    color: var(--gray);
    text-decoration: none;
    font-size: 0.9rem;
    transition: 0.3s;
}

.footer-col ul li a:hover {
    color: var(--white);
    padding-left: 5px;
}

/* Columna de Contacto Específica */
.contact-list li i {
    color: var(--white);
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

/* Columna de Newsletter */
.footer-col p.newsletter-text {
    color: var(--gray);
    font-size: 0.85rem;
    margin-bottom: 20px;
}

.footer-form {
    display: flex;
    border-bottom: 1px solid #222;
    padding-bottom: 5px;
}

.footer-form input {
    background: transparent;
    border: none;
    padding: 10px 0;
    color: var(--white);
    width: 100%;
    outline: none;
    font-family: 'Rubik', sans-serif;
}

.footer-form button {
    background: transparent;
    border: none;
    color: var(--gray);
    cursor: pointer;
    padding: 0 10px;
    transition: 0.3s;
}

.footer-form button:hover {
    color: var(--white);
}

/* Área Inferior (Copyright y Legal) */
.footer-bottom {
    border-top: 1px solid #111;
    padding-top: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copyright {
    color: var(--gray);
    font-size: 0.85rem;
    font-weight: 300;
}

.footer-legal a {
    color: var(--gray);
    text-decoration: none;
    font-size: 0.8rem;
    margin-left: 20px;
    transition: 0.3s;
}

.footer-legal a:hover {
    color: var(--white);
}

/* ==========================================================================
   RESPONSIVE FOOTER
   ========================================================================== */
@media (max-width: 1024px) {
    .footer-container {
        grid-template-columns: 1fr 1fr;
        gap: 50px;
    }
}

@media (max-width: 768px) {
    .footer {
        padding: 60px 5% 30px;
    }
}

@media (max-width: 600px) {
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .branding p {
        margin: 0 auto 25px auto;
    }

    .social-links {
        justify-content: center;
    }

    .footer-col ul li {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
    }

    .footer-legal a {
        margin: 0 10px;
    }
    
    .footer-form {
        max-width: 300px;
        margin: 20px auto 0;
    }
}
/* ==========================================================================
   REVEAL ANIMATION
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(30px); transition: 1s ease; }
.reveal.active { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   MEDIA QUERIES
   ========================================================================== */
@media (max-width: 768px) {
    .navbar { padding: 1.2rem 5%; }
    .logo-text { font-size: 1.1rem; }
    .nav-isotipo { height: 35px; }
    .hamburger { display: block; }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #000000;
        padding: 2rem 0;
        border-bottom: 1px solid #1a1a1a;
    }

    .nav-links.active { display: flex; }
    .nav-links a { margin: 15px 0; margin-left: 0; font-size: 1rem; }
    .input-group { grid-template-columns: 1fr; }
    .services-hero { margin-bottom: 50px; }
    .services-hero h2 { font-size: 2rem; }
    .hero-service-icon { height: 60px; }
    .service-card { min-height: auto; padding: 50px 30px; } /* Ajuste móvil */
    .footer-lower { flex-direction: column; gap: 20px; text-align: center; }
    .social-links a { margin: 0 10px; }
}

@media (min-width: 992px) {
  .about-us-layout {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

/* --- ESTILO MODAL PRIVACIDAD --- */
.modal {
    display: none; /* Oculto por defecto */
    position: fixed;
    z-index: 2000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.9); /* Fondo oscuro */
    backdrop-filter: blur(8px);
}

.modal-content {
    background-color: #0a0a0a;
    margin: 5% auto;
    padding: 40px;
    border: 1px solid #1a1a1a;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    border-radius: 8px;
    color: #ccc;
}

.modal-body h2 { color: var(--white); margin-bottom: 5px; text-transform: uppercase; letter-spacing: 2px; }
.last-updated { font-size: 0.8rem; color: var(--gray); margin-bottom: 30px; }
.modal-body h3 { color: var(--white); margin: 25px 0 10px; font-size: 1.1rem; }
.modal-body ul { padding-left: 20px; margin-bottom: 15px; }
.modal-body li { margin-bottom: 8px; font-size: 0.95rem; }
.modal-body p { font-size: 0.95rem; line-height: 1.7; }

.contact-policy {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #1a1a1a;
    font-size: 0.9rem;
    color: var(--gray);
}

.close-modal {
    position: absolute;
    right: 25px; top: 20px;
    color: var(--white);
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.close-modal:hover { color: var(--gray); }

/* Personalización barra de scroll del modal */
.modal-content::-webkit-scrollbar { width: 6px; }
.modal-content::-webkit-scrollbar-track { background: #050505; }
.modal-content::-webkit-scrollbar-thumb { background: #222; border-radius: 10px; }
/* Esto asegura que el botón de cerrar de términos funcione igual */
.close-terms {
    position: absolute;
    right: 25px; top: 20px;
    color: var(--white);
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}
.close-terms:hover { color: var(--gray); }