/* Reset y Variables */
:root {
    --bg-color: #050505;
    --bg-gradient: radial-gradient(circle at 50% 0%, #1a1a2e 0%, #050505 100%);
    --text-color: #ffffff;
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #1e293b;
    --accent-color: #3b82f6;
    --neon-blue: #00f3ff;
    --neon-purple: #bc13fe;
    --text-muted: #94a3b8;
    --card-bg: rgba(255, 255, 255, 0.03);
    --border-color: rgba(255, 255, 255, 0.1);
    --font-main: 'Inter', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(37, 99, 235, 0.08) 0%, transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(188, 19, 254, 0.08) 0%, transparent 25%);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

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

/* Botones */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-align: center;
}

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

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

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

.btn-block {
    display: block;
    width: 100%;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
}

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

.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.2rem;
}

.logo img {
    height: 70px; /* Aumentado significativamente para mayor impacto */
    width: auto;
    max-width: 300px; /* Permitir formato rectangular más ancho */
    object-fit: contain; /* Asegurar que la imagen se ajuste sin distorsión */
}

.nav-list {
    display: flex;
    flex-direction: row; /* Asegurar dirección horizontal explícita */
    align-items: center;
    gap: 30px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-link {
    font-size: 0.95rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: white;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-menu {
    display: none; /* Oculto por defecto */
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    padding: 20px;
}

.mobile-menu ul {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mobile-menu.active {
    display: block;
}

/* Hero Section */
.hero {
    padding: 180px 0 120px;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at center top, rgba(37, 99, 235, 0.15) 0%, transparent 70%);
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 243, 255, 0.1) 0%, transparent 60%);
    filter: blur(80px);
    z-index: -1;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 25px;
    text-shadow: 0 0 40px rgba(37, 99, 235, 0.3);
}

.text-gradient {
    background: linear-gradient(to right, var(--neon-blue), var(--neon-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 15px rgba(0, 243, 255, 0.5));
    position: relative;
    display: inline-block;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 40px;
}

.hero-visual {
    margin-top: 60px;
    display: flex;
    justify-content: center;
}

.hero-logo-container {
    position: relative;
    animation: float 6s ease-in-out infinite;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-logo-img {
    width: 80px; /* Reducido de 150px a 80px */
    height: auto;
    position: relative;
    z-index: 2;
    /* Eliminado el drop-shadow intenso que causaba bordes blancos */
    filter: drop-shadow(0 0 10px rgba(37, 99, 235, 0.3));
}

.pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px; /* Ajustado al nuevo tamaño del logo */
    height: 80px;
    border-radius: 50%;
    border: 1px solid var(--primary-color); /* Borde más fino */
    opacity: 0;
    animation: pulse 3s infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.5; }
    100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
}

/* Stats Section */
.stats {
    padding: 60px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 5px;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Section General */
section {
    padding: 100px 0;
}

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

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.section-subtitle {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

.title-underline {
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 20px auto 0;
    border-radius: 2px;
}

/* About Section */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.about-logo {
    margin-bottom: 30px;
}

.about-logo img {
    height: 80px;
    width: auto;
    filter: drop-shadow(0 0 15px rgba(37, 99, 235, 0.3));
}

.about-content p {
    margin-bottom: 20px;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.service-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 30px;
    border-radius: 16px;
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px -10px rgba(37, 99, 235, 0.2);
}

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

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.subsection-title {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 40px;
}

/* Process Section */
.process-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-top: 60px;
    gap: 30px;
}

/* Línea conectora central */
.process-steps::before {
    content: '';
    position: absolute;
    top: 40px; /* Alineado al centro de los círculos */
    left: 50px;
    right: 50px;
    height: 2px;
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.2), var(--primary-color), rgba(37, 99, 235, 0.2));
    z-index: 0;
}

.step {
    position: relative;
    padding: 20px;
    flex: 1;
    text-align: center;
    z-index: 1;
}

.step-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    background-color: var(--bg-color);
    border: 2px solid var(--primary-color);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    position: relative;
    z-index: 2;
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.3);
    transition: all 0.3s ease;
}

.step:hover .step-number {
    background-color: var(--primary-color);
    transform: scale(1.1);
}

.step h3 {
    font-size: 1.25rem;
    margin-bottom: 15px;
    color: white;
}

.step p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Ajuste Responsive para Timeline */
@media (max-width: 768px) {
    .process-steps {
        flex-direction: column;
        gap: 40px;
        padding-left: 20px;
    }
    
    .process-steps::before {
        width: 2px;
        height: calc(100% - 80px);
        left: 60px; /* Alineado con el centro de los círculos (20px padding + 40px mitad de 80) */
        top: 40px;
        right: auto;
        background: linear-gradient(180deg, rgba(37, 99, 235, 0.2), var(--primary-color), rgba(37, 99, 235, 0.2));
    }

    .step {
        display: flex;
        align-items: flex-start;
        text-align: left;
        padding: 0;
        gap: 20px;
    }

    .step-number {
        margin: 0;
        flex-shrink: 0; /* Evitar que el círculo se aplaste */
    }
    
    .step-content {
        padding-top: 10px;
    }
}

/* CTA Section */
.cta-section {
    background: linear-gradient(rgba(37, 99, 235, 0.1), rgba(5, 5, 5, 0));
    text-align: center;
}

.cta-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.cta-subtitle {
    color: var(--text-muted);
    margin-bottom: 40px;
}

/* Contact Section */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 50px;
    max-width: 600px;
    margin: 0 auto;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.full-width {
    grid-column: span 2;
}

.form-group label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-group input,
.form-group textarea {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 12px;
    border-radius: 8px;
    color: white;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

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

.form-submit {
    grid-column: span 2;
}

.social-links-container {
    text-align: center;
    margin-top: 40px;
}

.social-links-container h3 {
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.social-icon:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 60px 0 30px;
    background-color: #020202;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.2rem;
}

.footer-links {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

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

.footer-social {
    display: flex;
    gap: 20px;
}

.footer-social a {
    color: var(--text-muted);
    font-size: 1.2rem;
}

.footer-social a:hover {
    color: white;
}

.footer-copyright {
    margin-top: 30px;
    color: #4b5563;
    font-size: 0.8rem;
}

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .desktop-nav, .header-cta {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .contact-form {
        grid-template-columns: 1fr;
    }

    .full-width, .form-submit {
        grid-column: span 1;
    }
}



/* Neon Button Effect */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
    box-shadow: 0 0 25px rgba(0, 243, 255, 0.6);
    transform: translateY(-2px) scale(1.02);
    border-color: var(--neon-blue);
}

/* Card Glow Effect */
.service-card:hover {
    box-shadow: 0 0 20px rgba(188, 19, 254, 0.15);
    border-color: var(--neon-purple);
}

/* Animated Background Orbs */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.4;
    animation: floatOrb 10s infinite alternate;
}

.orb-1 {
    width: 300px;
    height: 300px;
    background: var(--primary-color);
    top: 10%;
    left: -100px;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--neon-purple);
    bottom: 10%;
    right: -150px;
    animation-delay: -5s;
}

@keyframes floatOrb {
    0% { transform: translate(0, 0); }
    100% { transform: translate(30px, 50px); }
}

/* Timeline Connector Fix */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 0;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, transparent, var(--primary-color), transparent);
    transform: translateX(-50%);
    z-index: 0;
}

.process-step {
    position: relative;
    z-index: 1;
    margin-bottom: 60px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--bg-color);
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
    z-index: 2;
    margin: 0 20px;
    flex-shrink: 0;
}

.step-content {
    background: rgba(255, 255, 255, 0.03);
    padding: 25px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    width: 45%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.process-step:nth-child(odd) {
    flex-direction: row-reverse;
}

.process-step:nth-child(odd) .step-content {
    text-align: right;
}

.process-step:nth-child(even) .step-content {
    text-align: left;
}

@media (max-width: 768px) {
    .timeline-line {
        left: 25px;
    }
    
    .process-step {
        flex-direction: row !important;
        justify-content: flex-start;
    }
    
    .step-number {
        margin: 0 20px 0 0;
    }
    
    .step-content {
        width: calc(100% - 70px);
        text-align: left !important;
    }
}

/* Service Benefit Highlight */
.service-benefit {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: var(--neon-blue);
    font-weight: 500;
}

/* Adjust Services Grid for 6 items */
.services-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

@media (min-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* =========================================
   RESPONSIVE OPTIMIZATIONS
   ========================================= */

/* Mobile Devices (Phones, less than 768px) */
@media (max-width: 767px) {
    /* Header & Nav */
    .header {
        padding: 15px 0;
    }
    
    .nav-list {
        display: none; /* Hidden by default, toggled via JS */
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: rgba(5, 5, 5, 0.95);
        padding: 20px;
        border-bottom: 1px solid var(--border-color);
        gap: 20px;
    }

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

    .mobile-menu-btn {
        display: block;
    }

    /* Hero Section */
    .hero {
        padding: 120px 0 60px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        padding: 0 15px;
    }

    .stats-grid {
        grid-template-columns: 1fr; /* Stack stats vertically */
        gap: 20px;
    }

    /* Services Section */
    .services-grid {
        grid-template-columns: 1fr; /* Single column for services */
        padding: 0 10px;
    }

    .service-card {
        padding: 20px;
    }

    /* Process Section */
    .timeline-line {
        left: 20px; /* Align line to the left */
    }

    .process-step {
        flex-direction: row !important; /* Force row direction */
        justify-content: flex-start;
        margin-bottom: 40px;
    }

    .process-step:nth-child(odd) {
        flex-direction: row !important; /* Override alternating direction */
    }

    .step-number {
        margin: 0 15px 0 0;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .step-content {
        width: calc(100% - 60px); /* Full width minus number width */
        text-align: left !important; /* Force left alignment */
        padding: 15px;
    }

    /* Contact Section */
    .contact-wrapper {
        padding: 0 10px;
    }

    .contact-form {
        grid-template-columns: 1fr; /* Stack form fields */
    }

    .full-width {
        grid-column: span 1;
    }

    .form-submit {
        grid-column: span 1;
    }
}

/* Tablet Devices (768px to 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .hero-title {
        font-size: 3.5rem;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns for services */
    }

    .stats-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 columns for stats */
    }
}

/* Desktop Devices (1024px and up) */
@media (min-width: 1024px) {
    .container {
        padding: 0 40px; /* More breathing room */
    }

    .hero-title {
        font-size: 4.5rem;
    }

    .services-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 columns for services */
        gap: 40px;
    }
}

/* Fix for Hero Image Alignment */
.hero-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px auto; /* Center horizontally with margin auto */
    width: 100%;
    max-width: 200px; /* Limit max width to prevent it from being too large */
    position: relative;
}

.hero-image {
    width: 100%;
    height: auto;
    max-width: 150px; /* Ensure image itself isn't too big */
    display: block;
    margin: 0 auto; /* Double check centering */
    animation: float 6s ease-in-out infinite;
}

/* Ensure floating-logo class also has animation if used */
.floating-logo {
    animation: float 6s ease-in-out infinite;
}
