* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    line-height: 1.6;
    color: #333;
    margin: 0;
    overflow-x: hidden;
    background-color: transparent; /* Fondo transparente para que las partículas se vean */
}

#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-color: #F5F7FA;
}

header {
    background-color: rgba(30, 58, 138, 0.9);
    padding: 1rem 0;
    position: fixed;
    width: 100%; /* Ancho inicial completo */
    top: 0; /* Posición inicial pegada arriba */
    left: 0; /* Aseguramos que comience desde el borde izquierdo */
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
    transition: background-color 0.6s ease-in-out, top 0.6s ease-in-out, width 0.6s ease-in-out, left 0.6s ease-in-out, padding 0.6s ease-in-out; /* Transiciones más lentas y suaves */
}

header.scrolled {
    background-color: #ffffff; /* Cambio a amarillo al hacer scroll */
    width: 80%; /* Reducción del ancho al 80% */
    left: 10%; /* Centrado simétrico */
    padding: 0.5rem 0; /* Reducción de padding vertical */
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2); /* Sombra más pronunciada */
    border-radius: 15px;
}

.navbar {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    transition: padding 0.6s ease-in-out; /* Transición más lenta */
}

header.scrolled .navbar {
    padding: 0 1rem; /* Reducción de padding lateral */
}

.logo {
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.6s ease-in-out, font-size 0.6s ease-in-out; /* Transición más lenta */
}

header.scrolled .logo {
    color: #1E3A8A; /* Cambio a azul oscuro al hacer scroll */
    font-size: 1.5rem; /* Reducción de tamaño de fuente */
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2.5rem;
    transition: transform 0.6s ease-in-out, opacity 0.6s ease-in-out;
}

.nav-links li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem; /* Tamaño inicial */
    transition: color 0.6s ease-in-out, transform 0.6s ease-in-out, font-size 0.6s ease-in-out; /* Transición más lenta */
    position: relative;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #1E3A8A; /* Subrayado azul oscuro al hacer scroll */
    transition: width 0.3s ease;
}

.nav-links li a:hover::after,
.nav-links li a.active::after {
    width: 100%; /* Subrayado completo al hover o cuando está activo */
}

.nav-links li a:hover,
.nav-links li a.active {
    transform: scale(1.05);
}

header.scrolled .nav-links li a {
    color: #1E3A8A; /* Cambio a azul oscuro al hacer scroll */
    font-size: 0.9rem; /* Reducción de tamaño de fuente */
}


.menu-toggle {
    display: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    transition: color 0.6s ease-in-out, font-size 0.6s ease-in-out; /* Transición más lenta */
}

header.scrolled .menu-toggle {
    color: #1E3A8A; /* Cambio a azul oscuro al hacer scroll */
    font-size: 1.5rem; /* Reducción de tamaño de fuente */
}

.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5%;
    background: linear-gradient(rgba(30, 58, 138, 0.8), rgba(30, 58, 138, 0.8)), url('https://via.placeholder.com/1920x1080');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    position: relative;
    z-index: 1;
}

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

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease-out;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    animation: fadeInUp 1.2s ease-out;
}

.cta-button {
    padding: 1.2rem 2.5rem;
    background-color: #FACC15;
    border: none;
    border-radius: 10px;
    color: #1E3A8A;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 15px rgba(250, 204, 21, 0.4);
}

.cta-button:hover {
    transform: scale(1.1);
    background-color: #EAB308;
    box-shadow: 0 8px 25px rgba(250, 204, 21, 0.6);
}

.about, .benefits, .projects, .testimonials, .faq, .contact, .terms, .privacy {
    padding: 5rem 5%;
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    margin: 2rem auto;
    max-width: 1200px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

h2 {
    font-size: 3rem;
    margin-bottom: 2.5rem;
    color: #1E3A8A;
    position: relative;
}

h2::after {
    content: '';
    display: block;
    width: 70px;
    height: 4px;
    background-color: #FACC15;
    margin: 1rem auto;
    border-radius: 2px;
}

.about-content, .benefits-grid, .projects-grid, .testimonials-grid, .faq-grid, .contact-form, .terms-content, .privacy-content {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.about-content.visible, .benefits-grid.visible, .projects-grid.visible, .testimonials-grid.visible, .faq-grid.visible, .contact-form.visible, .terms-content.visible, .privacy-content.visible {
    opacity: 1;
    transform: translateY(0);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.stat-card {
    background: #1E3A8A;
    color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-10px);
}

.stat-card h3 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.stat-card p {
    font-size: 1rem;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    margin-top: 2.5rem;
}

.benefit-card {
    background-color: white;
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    overflow: hidden;
}

.benefit-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

.benefit-card i {
    font-size: 2.5rem;
    color: #1E3A8A;
    margin-bottom: 1.5rem;
    transition: color 0.3s ease;
}

.benefit-card:hover i {
    color: #FACC15;
}

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

.project-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 5px solid #FACC15;
}

.project-card h3 {
    font-size: 1.5rem;
    color: #1E3A8A;
    margin: 1rem 0 0.5rem;
}

.project-card p {
    font-size: 1rem;
    color: #666;
    padding: 0 1rem 1rem;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-top: 2.5rem;
}

.testimonial-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-10px);
}

.testimonial-card p {
    font-style: italic;
    color: #444;
    margin-bottom: 1rem;
}

.testimonial-card h4 {
    color: #1E3A8A;
    font-weight: 600;
}

.faq-grid {
    max-width: 800px;
    margin: 2.5rem auto 0;
    display: grid;
    gap: 1.5rem;
}

.faq-item {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.faq-item:hover {
    transform: translateY(-8px);
}

.faq-item h3 {
    color: #1E3A8A;
    margin-bottom: 0.5rem;
    cursor: pointer;
}

.faq-item p {
    color: #666;
    display: none;
}

.faq-item.active p {
    display: block;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-form input, .contact-form textarea {
    padding: 1rem;
    border: 2px solid #D1D5DB;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form input:focus, .contact-form textarea:focus {
    outline: none;
    border-color: #FACC15;
    box-shadow: 0 0 10px rgba(250, 204, 21, 0.3);
}

.contact-form textarea {
    height: 150px;
}

.contact-info {
    margin-top: 2rem;
    color: #666;
}

.contact-info a {
    color: #1E3A8A;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    color: #FACC15;
}

.terms, .privacy {
    padding: 5rem 5%;
    text-align: left;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    margin: 2rem auto;
    max-width: 1200px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.terms-content, .privacy-content {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.terms-content.visible, .privacy-content.visible {
    opacity: 1;
    transform: translateY(0);
}

.terms h1, .privacy h1 {
    font-size: 3rem;
    color: #1E3A8A;
    margin-bottom: 1.5rem;
}

.terms h2, .privacy h2 {
    font-size: 2rem;
    color: #1E3A8A;
    margin: 2rem 0 1rem;
}

.terms p, .privacy p {
    font-size: 1.1rem;
    color: #444;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.terms a, .privacy a {
    color: #FACC15;
    text-decoration: none;
    transition: color 0.3s ease;
}

.terms a:hover, .privacy a:hover {
    color: #EAB308;
}

footer {
    background-color: rgba(30, 58, 138, 0.9);
    color: white;
    padding: 2.5rem;
    text-align: center;
    font-size: 1rem;
    position: relative;
    z-index: 1;
}

.footer-links {
    margin-top: 1.5rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    margin: 0 1.5rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #FACC15;
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #1E3A8A; /* Fondo azul para el menú móvil */
        padding: 1.5rem;
        flex-direction: column;
        gap: 1.5rem;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    }

    header.scrolled .nav-links {
        background-color: #FACC15; /* Fondo amarillo al hacer scroll */
        width: 100%; /* En móvil, el menú desplegable sigue ocupando todo el ancho */
    }

    .nav-links.active {
        display: flex;
    }

    header.scrolled {
        width: 90%; /* En móvil, reducimos un poco menos para mantener usabilidad */
        left: 5%; /* Centrado en móvil */
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .cta-button {
        padding: 1rem 2rem;
        font-size: 1rem;
    }

    h2 {
        font-size: 2.5rem;
    }

    .benefits-grid, .projects-grid, .testimonials-grid, .faq-grid {
        grid-template-columns: 1fr;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .terms, .privacy {
        padding: 3rem 3%;
    }

    .terms h1, .privacy h1 {
        font-size: 2.5rem;
    }

    .terms h2, .privacy h2 {
        font-size: 1.8rem;
    }

    .terms p, .privacy p {
        font-size: 1rem;
    }
}