/* Estilos para dispositivos móviles */
@media screen and (max-width: 768px) {
    
    /* Hero Section Mobile */
    #hero {
        height: calc(100vh - 64px);
        padding: 0;
        box-sizing: border-box;
        overflow: hidden;
    }
    
    #hero .container {
        height: 100%;
        display: flex;
        align-items: stretch;
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
    }
    
    #hero .row {
        height: 100%;
        margin: 0;
        display: flex;
        flex-direction: column;
        width: 100%;
    }
    
    /* Orden en móviles: imagen arriba */
    #hero .order-1 {
        order: 1;
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 10px;
        min-height: 0;
    }
    
    #hero .order-2 {
        order: 2;
        flex: 1;
        display: flex;
        align-items: center;
        padding: 10px;
        min-height: 0;
    }
    
    /* Animación del camión en la parte superior */
    .hero-animation {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .hero-animation img {
        max-width: 85%;
        max-height: 100%;
        object-fit: contain;
    }
    
    /* Contenido de texto en la parte inferior */
    .hero-content {
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: space-evenly;
        align-items: center;
        text-align: center;
        padding: 0 15px;
        width: 100%;
        min-height: 0;
    }
    
    /* Título del hero para móvil */
    #hero h1.header {
        font-size: 2.2rem;
        line-height: 0.9;
        margin: 0;
        letter-spacing: -1px;
        font-weight: 950;
        font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
        transform: none; /* Removemos el efecto 3D en móvil */
        width: 100%;
        flex-shrink: 0;
    }
    
    /* Gradientes para móvil */
    #hero h1.header .name1 {
        background: linear-gradient(135deg, #1976d2, #42a5f5);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        filter: drop-shadow(2px 2px 4px rgba(25,118,210,0.3));
    }
    
    #hero h1.header .name2 {
        background: linear-gradient(135deg, #333, #666);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
    }
    
    /* Párrafo descriptivo */
    #hero .flow-text {
        font-size: 1rem;
        line-height: 1.4;
        margin: 0;
        padding: 0;
        width: 100%;
        flex-shrink: 0;
        color: #555;
        font-weight: 400;
        opacity: 0.9;
    }
    
    /* Botón CTA */
    #hero .btn-large {
        font-size: 0.95rem;
        padding: 12px 24px;
        margin: 0;
        width: auto;
        min-width: 260px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        line-height: 1.2;
        flex-shrink: 0;
    }
    
    #hero .btn-large i {
        margin-right: 8px;
        display: inline-flex;
        align-items: center;
    }
    
    /* Animación del camión optimizada */
    .hero-animation {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 0;
    }
    
    .hero-animation img {
        max-width: 90%;
        max-height: 90%;
        object-fit: contain;
    }
    
    /* Servicios Section Mobile */
    #servicios {
        padding: 40px 0;
    }
    
    #servicios .container {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0 15px;
    }
    
    #servicios .row {
        margin: 0;
        display: flex;
        flex-direction: column;
        gap: 20px;
    }
    
    #servicios .col {
        width: 100%;
        margin: 0;
        padding: 0;
    }
    
    /* Service Cards Mobile */
    .service-card {
        background: #ffffff;
        border-radius: 15px;
        padding: 25px 20px;
        margin: 0 10px;
        box-shadow: 0 6px 25px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
        border: 2px solid transparent;
        min-height: 200px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
    
    .service-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 35px rgba(25, 118, 210, 0.15);
        border-color: #1976d2;
    }
    
    /* Service Icons Mobile */
    .service-icon {
        font-size: 3rem !important;
        color: #1976d2;
        margin-bottom: 15px;
        width: 80px;
        height: 80px;
        background: linear-gradient(135deg, #e3f2fd, #bbdefb);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
    }
    
    .service-card:hover .service-icon {
        transform: scale(1.1);
        background: linear-gradient(135deg, #1976d2, #42a5f5);
        color: #ffffff;
        box-shadow: 0 8px 25px rgba(25, 118, 210, 0.3);
    }
    
    /* Service Cards Text Mobile */
    .service-card h6 {
        font-size: 1.1rem;
        font-weight: 700;
        color: #28282b;
        margin: 0 0 10px 0;
        line-height: 1.3;
        font-family: 'Inter', sans-serif;
    }
    
    .service-card:hover h6 {
        color: #1976d2;
    }
    
    .service-card p {
        font-size: 0.9rem;
        color: #666;
        line-height: 1.4;
        margin: 0;
        font-family: 'Inter', sans-serif;
        text-align: center;
    }
    
    .service-card:hover p {
        color: #28282b;
    }
    
    /* Servicios Title Mobile */
    #servicios h2 {
        font-size: 2.2rem;
        font-weight: 700;
        color: #1e3c72;
        margin-bottom: 15px;
        text-align: center;
        padding: 0 10px;
    }
    
    #servicios .flow-text {
         font-size: 1rem;
         color: #666;
         line-height: 1.5;
         text-align: center;
         margin: 0 auto 30px auto;
         padding: 0 20px;
         max-width: 90%;
     }
     
     /* Cómo Funciona Section Mobile */
     #como-funciona {
         padding: 40px 0;
         background-color: #f3f1f1;
     }
     
     #como-funciona .container {
         width: 100%;
         max-width: 100%;
         margin: 0;
         padding: 0 15px;
     }
     
     #como-funciona h2 {
         font-size: 2.2rem;
         font-weight: 700;
         color: #1e3c72;
         margin-bottom: 15px;
         text-align: center;
         padding: 0 10px;
     }
     
     #como-funciona .flow-text {
         font-size: 1rem;
         color: #666;
         line-height: 1.5;
         text-align: center;
         margin: 0 auto 30px auto;
         padding: 0 20px;
         max-width: 90%;
     }
     
     /* Mindmapper Container Mobile */
     .mindmapper-container {
         padding: 40px 15px;
         min-height: auto;
         overflow: hidden;
         background-color: #f3f1f1;
     }
     
     .flow-path {
         display: flex;
         flex-direction: column;
         gap: 30px;
         align-items: center;
         padding: 20px 0;
         max-width: 100%;
         margin: 0 auto;
     }
     
     /* Step Nodes Mobile */
     .step-node {
         position: relative;
         display: flex;
         flex-direction: column;
         align-items: center;
         opacity: 0;
         transform: translateY(30px) scale(0.9);
         animation: fadeInUpScaleMobile 0.8s ease forwards;
         z-index: 2;
         max-width: 280px;
         width: 100%;
         margin-bottom: 0;
     }
     
     .step-node.step-1 { animation-delay: 0.2s; }
     .step-node.step-2 { animation-delay: 0.4s; }
     .step-node.step-3 { animation-delay: 0.6s; }
     .step-node.step-4 { animation-delay: 0.8s; }
     .step-node.step-5 { animation-delay: 1s; }
     
     /* Node Circles Mobile */
     .node-circle {
         position: relative;
         width: 80px;
         height: 80px;
         background: linear-gradient(135deg, #1976d2, #1565c0);
         border-radius: 50%;
         display: flex;
         align-items: center;
         justify-content: center;
         box-shadow: 0 8px 25px rgba(25, 118, 210, 0.4);
         transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
         margin-bottom: 20px;
         overflow: hidden;
         border: 3px solid white;
     }
     
     .node-circle.main-node {
         width: 95px;
         height: 95px;
         background: linear-gradient(135deg, #ffd700, #ffed4e);
         box-shadow: 0 12px 35px rgba(255, 215, 0, 0.5);
         border: 4px solid white;
     }
     
     .node-circle:hover {
         transform: scale(1.1) rotate(5deg);
         box-shadow: 0 10px 30px rgba(25, 118, 210, 0.5);
     }
     
     .node-circle.main-node:hover {
         box-shadow: 0 12px 35px rgba(255, 215, 0, 0.6);
     }
     
     .node-circle i {
         font-size: 1.8rem;
         color: white;
         z-index: 2;
     }
     
     .node-circle.main-node i {
         font-size: 2.2rem;
         color: #28282b;
     }
     
     /* Step Numbers Mobile */
     .step-number {
         position: absolute;
         top: -8px;
         right: -8px;
         width: 22px;
         height: 22px;
         background: #28282b;
         color: white;
         border-radius: 50%;
         display: flex;
         align-items: center;
         justify-content: center;
         font-size: 0.75rem;
         font-weight: bold;
         border: 2px solid white;
     }
     
     /* Node Content Mobile */
     .node-content {
         text-align: center;
         max-width: 250px;
         padding: 0 15px;
     }
     
     .node-content h6 {
         color: #28282b;
         font-weight: bold;
         margin-bottom: 10px;
         font-size: 1.05rem;
         line-height: 1.3;
         font-family: 'Inter', sans-serif;
     }
     
     .node-content p {
         color: #666;
         font-size: 0.85rem;
         line-height: 1.4;
         margin: 0;
         font-family: 'Inter', sans-serif;
     }
     
     /* Mobile Zigzag Connectors - Complete pattern */
      .step-node {
          position: relative;
      }
      
      /* Vertical connecting lines */
      .step-node::before {
          content: '';
          position: absolute;
          top: 100%;
          margin-top: 10px;
          left: 50%;
          transform: translateX(-50%);
          width: 3px;
          height: 60px;
          background: #1976d2;
          opacity: 0;
          animation: drawVerticalConnector 0.6s ease forwards;
          z-index: -10;
      }
      
      .step-node:last-child::before {
          display: none;
      }
      
      .step-node.step-1::before { animation-delay: 1.0s; }
      .step-node.step-2::before { animation-delay: 1.2s; }
      .step-node.step-3::before { animation-delay: 1.4s; }
      .step-node.step-4::before { animation-delay: 1.6s; }
      
      /* Horizontal zigzag lines */
     .step-node::after {
         content: '';
         position: absolute;
         top: 100%;
         margin-top: 70px;
         width: 120px;
         height: 3px;
         background: #1976d2;
         opacity: 0;
         animation: drawHorizontalConnector 0.8s ease-in-out forwards;
         z-index: -10;
     }
     
     .step-node:last-child::after {
         display: none;
     }
     
     /* Alternating left and right horizontal lines */
     .step-node.step-1::after {
         left: 50%;
         animation-delay: 1.2s;
     }
     
     .step-node.step-2::after {
         right: 50%;
         animation-delay: 1.4s;
     }
     
     .step-node.step-3::after {
         left: 50%;
         animation-delay: 1.6s;
     }
     
     .step-node.step-4::after {
         right: 50%;
         animation-delay: 1.8s;
     }
     
     /* Ocultar líneas del último paso */
     .step-node:last-child::before,
     .step-node:last-child::after {
         display: none;
     }
      
      /* Hide original connectors on mobile */
      .connector {
          display: none;
      }
      
      /* Connector animations */
      @keyframes drawVerticalConnector {
          0% {
              height: 0;
              opacity: 0;
          }
          100% {
              height: 60px;
              opacity: 1;
          }
      }
      
      @keyframes drawHorizontalConnector {
          0% {
              width: 0;
              opacity: 0;
          }
          100% {
              width: 120px;
              opacity: 1;
          }
      }
      
      @keyframes pulseConnectorDot {
          0% {
              opacity: 0;
              transform: translateX(-50%) scale(0);
          }
          50% {
              opacity: 1;
              transform: translateX(-50%) scale(1.3);
          }
          100% {
              opacity: 0.8;
              transform: translateX(-50%) scale(1);
          }
      }
     
     /* Mobile specific animations */
     @keyframes fadeInUpScaleMobile {
         0% {
             opacity: 0;
             transform: translateY(30px) scale(0.9);
         }
         60% {
             opacity: 0.8;
             transform: translateY(-5px) scale(1.02);
         }
         100% {
             opacity: 1;
             transform: translateY(0) scale(1);
         }
     }
 }