/* CSS Variables - Tema Azul y Gris */
:root {
    --primary-blue: #1E3A8A;
    --accent-blue: #2563EB;
    --accent-orange: #F97316; /* Naranja para detalles */
    --dark-gray: #334155;
    --medium-gray: #64748B;
    --light-gray: #F8FAFC;
    --white: #FFFFFF;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

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

body.menu-open {
    overflow: hidden; /* Evita scroll de fondo cuando el menú móvil está abierto */
}

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

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 2;
}

/* --- Estilos del Canvas de Fondo --- */
#space-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Cabecera / Header */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    letter-spacing: -0.5px;
    z-index: 1002;
}

.nav-container {
    display: block;
}

.nav-menu {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-menu a {
    font-weight: 500;
    color: var(--dark-gray);
    transition: var(--transition);
    font-size: 0.95rem;
}

.nav-menu a:hover {
    color: var(--accent-orange);
}

.btn-primary {
    background-color: var(--accent-blue);
    color: var(--white) !important;
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.2);
    display: inline-block;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 58, 138, 0.25);
}

/* Menú Toggle / Hamburger */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1002;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--primary-blue);
    border-radius: 2px;
    transition: var(--transition);
}

/* Animaciones del botón hamburguesa */
.menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
    background-color: var(--accent-orange);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
    background-color: var(--accent-orange);
}

/* Hero Section */
.hero {
    padding: 180px 0 120px;
    background: transparent; 
    position: relative;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-text h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    color: var(--primary-blue);
    margin-bottom: 24px;
    font-weight: 800;
    letter-spacing: -1px;
}

.hero-text p {
    font-size: 1.2rem;
    color: var(--medium-gray);
    margin-bottom: 32px;
    max-width: 90%;
}

.hero-image {
    width: 100%;
    height: 400px;
    background: url('https://images.unsplash.com/photo-1454165804606-c3d57bc86b40?auto=format&fit=crop&w=600&q=80') center/cover;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

/* Sections Global */
.section-padding {
    padding: 100px 0;
    position: relative;
    z-index: 2;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 16px;
}

.section-header p {
    color: var(--medium-gray);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Servicios Section */
.services {
    background-color: rgba(248, 250, 252, 0.85);
    backdrop-filter: blur(5px);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border-color: rgba(249, 115, 22, 0.3);
}

.service-icon {
    width: 50px;
    height: 50px;
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--accent-blue);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

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

.service-card p {
    color: var(--medium-gray);
    font-size: 0.95rem;
    margin-bottom: 24px;
    flex-grow: 1;
}

.service-link {
    color: var(--accent-blue);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.service-link:hover {
    color: var(--accent-orange);
}

/* Sobre Nosotros Section */
.about {
    background-color: var(--white);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-image {
    width: 100%;
    height: 500px;
    background: url('https://images.unsplash.com/photo-1522071820081-009f0129c71c?auto=format&fit=crop&w=600&q=80') center/cover;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.about-text h3 {
    font-size: 2rem;
    color: var(--primary-blue);
    margin-bottom: 20px;
}

.about-text p {
    color: var(--medium-gray);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

/* Testimonios Section */
.testimonials {
    background-color: rgba(248, 250, 252, 0.85);
    backdrop-filter: blur(5px);
}

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

.testimonial-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    position: relative;
}

.testimonial-text {
    font-size: 1.1rem;
    font-style: italic;
    color: var(--dark-gray);
    margin-bottom: 24px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #E2E8F0;
    background: url('https://images.unsplash.com/photo-1573496359142-b8d87734a5a2?auto=format&fit=crop&w=150&q=80') center/cover;
}

.testimonial-card:nth-child(2) .author-avatar {
    background: url('https://images.unsplash.com/photo-1519085360753-af0119f7cbe7?auto=format&fit=crop&w=150&q=80') center/cover;
}

.author-info h4 {
    color: var(--primary-blue);
    font-size: 1rem;
}

.author-info span {
    color: var(--medium-gray);
    font-size: 0.85rem;
}

/* Contacto Section */
.contact-section {
    background-color: var(--white);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-form {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0,0,0,0.05);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-gray);
    font-size: 0.95rem;
}

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #CBD5E1;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background-color: var(--light-gray);
}

.form-group input:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
    background-color: var(--white);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-response {
    margin-top: 15px;
    padding: 12px;
    border-radius: 6px;
    display: none;
    font-weight: 500;
}

.form-response.success {
    display: block;
    background-color: #D1FAE5;
    color: #065F46;
    border: 1px solid #34D399;
}

.form-response.error {
    display: block;
    background-color: #FEE2E2;
    color: #991B1B;
    border: 1px solid #F87171;
}

/* Footer */
.footer {
    background-color: rgba(51, 65, 85, 0.98);
    color: var(--light-gray);
    padding: 80px 0 30px;
    position: relative;
    z-index: 2;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin-bottom: 60px;
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 20px;
    display: block;
}

.footer-info h4 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-info p {
    color: #94A3B8;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #94A3B8;
    font-size: 0.9rem;
}

.footer-bottom a {
    color: var(--white);
    font-weight: 600;
    transition: var(--transition);
}

.footer-bottom a:hover {
    color: var(--accent-orange);
}

/* ==================================================
   💻 MEDIA QUERIES - DISEÑO MOVIL PREMIUM
   ================================================== */
@media (max-width: 900px) {
    /* Menú Hamburguesa Toggle */
    .menu-toggle {
        display: flex;
    }

    /* Contenedor de Navegación Lateral (Glassmorphic) */
    .nav-container {
        position: fixed;
        top: 0;
        right: -100%; /* Oculto por defecto */
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: rgba(255, 255, 255, 0.85);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.08);
        z-index: 1001;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: right 0.4s cubic-bezier(0.77, 0.2, 0.05, 1);
    }

    .nav-container.active {
        right: 0; /* Deslizar hacia adentro */
    }

    .nav-menu {
        flex-direction: column;
        gap: 35px;
        width: 100%;
        text-align: center;
        padding: 40px;
    }

    .nav-menu a {
        font-size: 1.25rem;
        font-weight: 600;
        display: block;
        width: 100%;
    }

    .nav-menu .btn-primary {
        width: auto;
        min-width: 200px;
        display: inline-block;
        margin: 0 auto;
        padding: 12px 24px;
    }

    /* Grillas y Secciones */
    .hero-grid, .services-grid, .about-grid, .testimonials-grid, .contact-grid, .footer-grid { 
        grid-template-columns: 1fr; 
        gap: 40px;
    }

    /* paddings de sección más limpios y compactos */
    .section-padding {
        padding: 60px 0;
    }

    /* Ajustes del Hero */
    .hero {
        padding: 140px 0 60px;
    }

    .hero-text {
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2.3rem;
        line-height: 1.2;
        margin-bottom: 16px;
    }

    .hero-text p {
        font-size: 1.05rem;
        margin: 0 auto 24px;
        max-width: 100%;
    }

    .hero-image {
        height: 280px;
        box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    }

    /* Ajustes Sobre Nosotros */
    .about-image {
        height: 280px;
        order: 2; /* Mueve la imagen debajo del texto en móviles */
    }

    .about-text {
        text-align: center;
        order: 1;
    }

    .about-text h3 {
        font-size: 1.8rem;
    }

    .about-text p {
        font-size: 1rem;
    }

    /* Ajustes Servicios y Testimonios */
    .section-header {
        margin-bottom: 40px;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .section-header p {
        font-size: 1rem;
    }

    .service-card {
        padding: 30px 24px;
    }

    .testimonial-card {
        padding: 30px;
    }

    /* Ajustes Contacto */
    .contact-info {
        text-align: center;
    }

    .contact-details {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .contact-form {
        padding: 30px 20px;
    }
}

/* ==================================================
   📄 LANDING PAGES ESTILOS
   ================================================== */
.landing-hero {
    padding: 160px 0 80px;
    text-align: center;
    position: relative;
    z-index: 2;
}
.landing-hero h1 {
    font-size: 3.5rem;
    color: var(--primary-blue);
    margin-bottom: 20px;
    letter-spacing: -1px;
    font-weight: 800;
}
.landing-hero p {
    font-size: 1.2rem;
    color: var(--medium-gray);
    max-width: 800px;
    margin: 0 auto 40px;
}
.landing-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 60px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    margin-bottom: 60px;
    position: relative;
    z-index: 2;
}
.landing-content h2 {
    color: var(--primary-blue);
    margin-bottom: 20px;
    font-size: 2.2rem;
}
.landing-content p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--dark-gray);
}
.landing-content ul {
    list-style: none;
    margin-bottom: 40px;
}
.landing-content ul li {
    padding-left: 30px;
    position: relative;
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: var(--dark-gray);
}
.landing-content ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent-orange);
    font-weight: bold;
}
.btn-whatsapp {
    background-color: #25D366;
    color: #fff !important;
    padding: 16px 40px;
    border-radius: 50px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 1.2rem;
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
    text-decoration: none;
    margin-top: 20px;
}
.btn-whatsapp:hover {
    background-color: #128C7E;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}
.btn-whatsapp svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

@media (max-width: 768px) {
    .landing-hero h1 {
        font-size: 2.5rem;
    }
    .landing-content {
        padding: 40px 20px;
    }
}
