/* Estilos generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    scroll-behavior: smooth;
}
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #10b981;
    --dark: #1e293b;
    --light: #f8fafc;
    --accent: #8b5cf6;
}

body {
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Header y navegación */
header {
    background-color: rgba(255, 255, 255, 0.95);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    transition: all 0.3s ease;
}

header.scrolled {
    padding: 10px 0;
    background-color: rgba(255, 255, 255, 0.98);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    margin-left: 10px;
}

.logo-text span {
    color: var(--secondary);
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
}

nav ul li a:hover {
    color: var(--primary);
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

nav ul li a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(16, 185, 129, 0.1));
    overflow: hidden;
    width: 100%;
}

.hero::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.2), rgba(37, 99, 235, 0.2));
    z-index: -1;
}

.hero-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none; /* Permite que los clicks pasen a través */
}

.hero .container {
    position: relative;
    z-index: 2; /* Asegura que el contenido esté por encima del canvas */
}

.hero-content {
    position: relative;
    z-index: 5;
    max-width: 600px;
    padding: 4rem 0;
    pointer-events: auto; /* Restaura la interactividad */
}

#heroCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-content {
    width: 60%;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
    color: var(--dark);
}

.hero h1 span {
    color: var(--primary);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #4b5563;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary);
    color: white;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.3);
}

.btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(37, 99, 235, 0.4);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    margin-left: 15px;
    box-shadow: none;
}

.btn-outline:hover {
    background-color: var(--primary);
    color: white;
}

.hero-image {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 45%;
    z-index: 0;
}

/* Servicios */
.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--dark);
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--secondary);
}

.section-header p {
    color: #6b7280;
    font-size: 1.1rem;
    max-width: 700px;
    margin: 20px auto 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.service-card:hover::before {
    opacity: 0.05;
}

.service-icon {
    width: 70px;
    height: 70px;
    background-color: rgba(37, 99, 235, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--primary);
    font-size: 1.8rem;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    background-color: var(--primary);
    color: white;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--dark);
}

.service-card p {
    color: #6b7280;
}

/* Acerca de nosotros */
.about {
    background-color: #f1f5f9;
    position: relative;
    overflow: hidden;
}

.about::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: -50px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.1), rgba(16, 185, 129, 0.1));
    z-index: 0;
}

.about-content {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1;
}

.about-image {
    flex: 1;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.1);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
}

.about-text {
    flex: 1;
    padding-left: 60px;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 25px;
    color: var(--dark);
}

.about-text p {
    margin-bottom: 20px;
    color: #4b5563;
    line-height: 1.8;
}

.stats {
    display: flex;
    margin-top: 40px;
}

.stat-item {
    margin-right: 40px;
}

.stat-item h3 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 5px;
}

.stat-item p {
    font-size: 1rem;
    color: #6b7280;
    margin: 0;
}

/* Proyectos */
.projects {
    background-color: white;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.project-card {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.05);
    position: relative;
    cursor: pointer;
}

.project-image {
    height: 250px;
    background-color: #e5e7eb;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-overlay h3 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.project-overlay p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.project-category {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: var(--secondary);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 1;
}

/* Testimonios */
.testimonials {
    background-color: #f1f5f9;
    position: relative;
    overflow: hidden;
}

.testimonials::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.1), rgba(37, 99, 235, 0.1));
    z-index: 0;
}

.testimonial-slider {
    position: relative;
    z-index: 1;
    padding: 20px 0;
}

.testimonial-track {
    display: flex;
    transition: transform 0.5s ease;
}

.testimonial-card {
    min-width: 100%;
    background-color: white;
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.testimonial-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #4b5563;
    margin-bottom: 30px;
    position: relative;
}

.testimonial-text::before {
    content: "";
    font-size: 5rem;
    font-family: Georgia, serif;
    color: var(--primary);
    opacity: 0.2;
    position: absolute;
    top: -40px;
    left: -20px;
}

.testimonial-author {
    display: flex;
    align-items: center;
}

.testimonial-author-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 20px;
    background-color: #e5e7eb;
}

.testimonial-author-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.testimonial-author-info h4 {
    font-size: 1.2rem;
    color: var(--dark);
    margin-bottom: 5px;
}

.testimonial-author-info p {
    font-size: 0.9rem;
    color: #6b7280;
}

.testimonial-buttons {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.testimonial-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: white;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin: 0 10px;
    transition: all 0.3s ease;
}

.testimonial-button:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* CTA Section */
.cta {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    text-align: center;
    padding: 80px 0;
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.cta p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.9;
}

.cta .btn {
    background-color: white;
    color: var(--primary);
}

.cta .btn:hover {
    background-color: rgba(255, 255, 255, 0.9);
}

.cta .btn-outline {
    background-color: transparent;
    color: white;
    border-color: white;
}

.cta .btn-outline:hover {
    background-color: white;
    color: var(--primary);
}

/* Contacto */
.contact {
    background-color: white;
}

.contact-content {
    display: flex;
    gap: 40px;
}

.contact-info {
    flex: 1;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: var(--dark);
}

.contact-info p {
    margin-bottom: 30px;
    color: #6b7280;
    line-height: 1.7;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.contact-info-icon {
    margin-right: 15px;
    width: 40px;
    height: 40px;
    background-color: rgba(37, 99, 235, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.contact-info-text h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--dark);
}

.contact-info-text p {
    margin: 0;
    color: #6b7280;
}

.contact-form {
    flex: 1;
    background-color: white;
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark);
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e5e7eb;
    border-radius: 5px;
    background-color: #f9fafb;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-textarea {
    height: 150px;
    resize: vertical;
}

/* Footer */
footer {
    background-color: var(--dark);
    color: white;
    padding: 80px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr ;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.footer-logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    margin-left: 10px;
}

.footer-logo-text span {
    color: var(--secondary);
}

.footer-about p {
    color: #d1d5db;
    line-height: 1.7;
    margin-bottom: 25px;
}

.social-links {
    display: flex;
}

.social-link {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: var(--primary);
    transform: translateY(-3px);
}

.footer-heading {
    font-size: 1.3rem;
    margin-bottom: 25px;
    color: white;
    position: relative;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--secondary);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #d1d5db;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.footer-links a:hover {
    color: white;
    transform: translateX(5px);
}

.footer-links a i {
    margin-right: 8px;
    font-size: 0.8rem;
}

.newsletter p {
    color: #d1d5db;
    margin-bottom: 20px;
}

.newsletter-form {
    display: flex;
}

.newsletter-input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    border-radius: 5px 0 0 5px;
    font-size: 0.9rem;
}

.newsletter-btn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 0 15px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.newsletter-btn:hover {
    background-color: var(--primary-dark);
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: #d1d5db;
    font-size: 0.9rem;
}

.footer-bottom a {
    color: var(--secondary);
    text-decoration: none;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-content {
        width: 60%;
    }

    .hero-image {
        width: 40%;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .project-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .hero {
        height: auto;
        padding: 150px 0 100px;
    }
    .hero-animation {
        width: 100%;
        opacity: 0.2; /* Reducido de 0.3 a 0.2 para mejor legibilidad */
    }

    .hero-content {
        width: 100%;
        text-align: center;
    }

    .hero h1 {
        font-size: 2.8rem;
    }

    .hero-image {
        display: none;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .about-content {
        flex-direction: column;
    }

    .about-image {
        margin-bottom: 40px;
    }

    .about-text {
        padding-left: 0;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }

    .contact-content {
        flex-direction: column;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hamburger {
        display: block;
    }

    nav ul {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: white;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: all 0.4s ease;
    }

    nav ul.active {
        left: 0;
    }

    nav ul li {
        margin: 15px 0;
    }
}