/* Prevenir el scroll horizontal (Franja blanca) */
html, body {
    overflow-x: hidden;
    width: 100%;
}

/* Ocultar botón de menú en escritorio */
.menu-toggle {
    display: none;
    color: var(--white);
    font-size: 1.8rem;
    cursor: pointer;
}

:root {
    --primary-color: #f15f22; /* Color corporativo MundoIT */
    --primary-hover: #d14a15;
    --dark-bg: #111827;
    --light-bg: #f3f4f6;
    --text-color: #374151;
    --heading-color: #1f2937;
    --white: #ffffff;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--white);
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 80px 0;
}

.bg-light {
    background-color: var(--light-bg);
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    color: var(--heading-color);
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.section-title p {
    font-size: 1.1rem;
    color: var(--text-color);
}

/* Botones */
.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 12px 24px;
    border-radius: 5px;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.w-100 {
    width: 100%;
}

/* Navbar */
/* Navbar */
.navbar {
    background-color: var(--dark-bg); /* Cambiado a fondo oscuro */
    box-shadow: 0 2px 10px rgba(0,0,0,0.3); /* Sombra ajustada */
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo img {
    height: 50px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
    font-weight: 600;
    color: var(--white); /* Letras del menú en blanco para contrastar */
}

.nav-links a {
    transition: var(--transition);
}

.nav-links a:not(.btn-primary):hover {
    color: var(--primary-color);
}
/* Hero Section */
.hero {
    background: linear-gradient(rgba(17, 24, 39, 0.8), rgba(17, 24, 39, 0.9)), url('https://images.unsplash.com/photo-1550751827-4bd374c3f58b?auto=format&fit=crop&q=80') center/cover;
    height: 80vh;
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--white);
}

.hero-content {
    max-width: 800px;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #e5e7eb;
}

/* Servicios TI */
.grid-services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    transition: var(--transition);
    border-bottom: 4px solid transparent;
}

.service-card:hover {
    transform: translateY(-5px);
    border-bottom-color: var(--primary-color);
}

.service-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.service-card h3 {
    color: var(--heading-color);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

/* Software Ecosistema */
.grid-software {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.software-card {
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    text-align: center;
    transition: var(--transition);
}

.software-card.featured {
    border-color: var(--primary-color);
    background-color: #fff9f6;
}

.soft-icon {
    width: 70px;
    height: 70px;
    background: var(--light-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.software-card.featured .soft-icon {
    background: var(--primary-color);
    color: var(--white);
}

.soft-icon i {
    font-size: 1.8rem;
    color: var(--primary-color);
}

.software-card.featured .soft-icon i {
    color: var(--white);
}

.software-card h4 {
    margin-bottom: 15px;
    color: var(--heading-color);
}

/* Contacto */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.contact-info h2 {
    font-size: 2.5rem;
    color: var(--heading-color);
    margin-bottom: 20px;
}

.contact-form-box {
    background: var(--white);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.form-group {
    margin-bottom: 20px;
}

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

input, textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-family: inherit;
    transition: var(--transition);
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Footer */
.footer {
    background-color: var(--dark-bg);
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand {
    max-width: 400px;
}

.footer-logo {
    height: 60px;
    margin-bottom: 20px;
    /* Aplicar un filtro si el logo original no resalta en fondo oscuro */
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.footer-links a {
    color: #9ca3af;
    transition: var(--transition);
}

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

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #374151;
    color: #9ca3af;
    font-size: 0.9rem;
}

/* Testimonios */
.testimonials {
    background-color: var(--white);
}

.subtitle {
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: block;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

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

.testimonial-card {
    background: var(--light-bg);
    padding: 40px 30px;
    border-radius: 10px;
    position: relative;
    transition: var(--transition);
    border: 1px solid #e5e7eb;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    border-color: var(--primary-color);
}

.quote-icon {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 20px;
    opacity: 0.8;
}

.testimonial-card p {
    font-style: italic;
    margin-bottom: 25px;
    color: var(--text-color);
    font-size: 1.05rem;
}

.client-info {
    border-top: 1px solid #d1d5db;
    padding-top: 20px;
}

.client-details strong {
    display: block;
    color: var(--heading-color);
    font-weight: 600;
    font-size: 1.1rem;
}

.client-details span {
    font-size: 0.85rem;
    color: #6b7280;
}

/* Scroll Up / Back to Top */
html {
    scroll-behavior: smooth; /* Hace que el deslizamiento hacia arriba sea suave */
}

#back-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    display: none; /* Lo ocultamos por defecto hasta que el usuario baje */
}

#back-top a {
    background-color: var(--primary-color);
    color: var(--white);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(241, 95, 34, 0.4);
    transition: var(--transition);
}

#back-top a:hover {
    background-color: var(--primary-hover);
    transform: translateY(-5px);
    color: var(--white);
}

/* Sección Inteligencia Artificial */
.ai-highlight {
    background: linear-gradient(135deg, var(--dark-bg) 0%, #1f2937 100%);
    color: var(--white);
    border-top: 4px solid var(--primary-color);
    border-bottom: 4px solid var(--primary-color);
}

.ai-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.ai-content {
    flex: 1;
    max-width: 700px;
}

.ai-badge {
    display: inline-block;
    background-color: rgba(241, 95, 34, 0.15);
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 20px;
    border: 1px solid var(--primary-color);
}

.ai-badge i {
    margin-right: 8px;
}

.ai-highlight h2 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    color: var(--white);
    line-height: 1.3;
}

.ai-highlight p {
    font-size: 1.1rem;
    color: #e5e7eb;
    margin-bottom: 0;
}

.ai-highlight strong {
    color: var(--primary-color);
}

.ai-icon-wrapper {
    flex-shrink: 0;
    width: 150px;
    height: 150px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 40px rgba(241, 95, 34, 0.2);
}

.ai-icon-wrapper i {
    font-size: 4rem;
    color: var(--primary-color);
}

/* Ajuste responsive para la sección de IA */
@media (max-width: 768px) {
    .ai-container {
        flex-direction: column;
        text-align: center;
    }
    
    .ai-icon-wrapper {
        margin-top: 30px;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        position: fixed; /* Cambiado a fixed para que acompañe el scroll si es necesario */
        top: 80px; 
        left: -100%; 
        width: 100%;
        height: calc(100vh - 80px); /* Ocupa todo el alto de la pantalla restante */
        background-color: var(--dark-bg); /* Mantiene tu color oscuro corporativo */
        padding: 50px 20px;
        text-align: center;
        transition: var(--transition);
        z-index: 1000; /* Asegura que se superponga a todos los textos y capas inferiores */
    }

    .nav-links.active {
        left: 0; 
    }

    .nav-links a {
        margin: 20px 0; /* Mayor margen para no tocar enlaces por error */
        font-size: 1.2rem; /* Aumenta el tamaño para mejor legibilidad táctil */
        display: block;
    }

    .nav-links .btn-primary {
        display: inline-block;
        margin: 25px auto;
        width: 80%;
        font-size: 1.2rem;
        padding: 15px;
    }

    .hero {
        height: 60vh;
    }


    .hero h1 {
        font-size: 2.2rem;
        font-weight: 600;
    }

    .hero p {
        font-size: 1rem;
    }


    /* Ajustes para evitar el desbordamiento del texto de contacto */
    .contact-info {
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
        padding: 0 10px;
    }

    .contact-info p {
        width: 100%;
        word-wrap: break-word;      /* Fuerza el salto de línea para evitar desbordamiento */
        overflow-wrap: break-word;
        margin: 0 auto;
        font-size: 1rem;            /* Ajusta ligeramente el tamaño para mejor lectura en móviles */
    }

    .contact-wrapper {
        width: 100%;
                  /* Corta cualquier elemento hijo que intente rebasar */
    }

    .contact-wrapper, .grid-2, .ai-container {
        grid-template-columns: 1fr;
        flex-direction: column;
        text-align: center;
        gap: 20px; /* Reducimos la separación entre textos y formulario */
    }

    /* Ajustes del formulario para móviles */
    .contact-form-box {
        padding: 20px;
        width: 100%;
        box-sizing: border-box;
    }

    .section-padding {
        padding: 20px 0;
    }

    input, textarea {
        width: 100%;
        max-width: 100%;
    }

    /* Solución para que reCAPTCHA no rompa el ancho en pantallas muy pequeñas */
    .g-recaptcha {
        transform: scale(0.85);
        transform-origin: 0 0;
    }    
    /* Para centrar el reCAPTCHA dentro de su contenedor */
    .form-group:has(.g-recaptcha) {
        display: flex;
        justify-content: center;
    }    
}