/* General Styles */
* {
  font-family: "Poppins", sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333;
}

/* Estilos generales */
header {
  background: #f8f8f8;
  padding: 30px;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav .logo img {
  height: 50px;
}

/* Menú para pantallas grandes */
nav ul {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav ul li {
  margin: 0 15px;
}

nav ul li a {
  text-decoration: none;
  color: #333;
  font-weight: bold;
}

/* Estilos para el botón hamburguesa */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 25px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background: #333;
  transition: 0.3s;
}

/* Estilos responsive */
@media (max-width: 768px) {
  /* Ocultar el menú completo y mostrar el botón hamburguesa */
  nav ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 80px;
    right: 0;
    background-color: #f8f8f8;
    width: 100%;
    text-align: center;
  }

  nav ul li {
    margin: 15px 0;
  }

  /* Mostrar el botón hamburguesa */
  .menu-toggle {
    display: flex;
  }

  /* Mostrar el menú cuando esté activo */
  nav ul.active {
    display: flex;
  }

  /* Animación del menú hamburguesa cuando esté abierto */
  .menu-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

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

  .menu-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }
}

#hero {
  display: flex;
  width: 100%;
  height: 900px;
  background-image: url("../images/DeliveryMAN.png");
  background-size: cover;
  background-position: center;
  /* Ocupa todo el ancho */
}

.heroIzq,
.heroDer {
  width: 50%;
  color: #fff;
  padding: 50px 0px 50px 50px;
  /* Cada parte ocupa el 50% del ancho */
}

.heroIzq {
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* Color de fondo para diferenciación */
}

.heroIzq h1 {
  font-size: 50px;
  font-weight: 900;
  line-height: 1.1;
  /* Interlineado pequeño */
  letter-spacing: 2px;
  /* Alto de letra grande */
  margin-bottom: 40px;
}

.heroIzq p {
  font-size: 25px;
  font-weight: lighter;
  line-height: normal;
  margin-bottom: 30px;
}

.heroIzq .btnContact {
  width: 40%;
  background-color: #ffffff;
  color: #000000;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  font-size: 1em;
  cursor: pointer;
  transition: background-color 0.3s, box-shadow 0.3s;
  border-radius: 20px;
  margin-bottom: 20px;
  text-align: center;
  text-decoration: none;
}

.heroIzq .btnContact:hover {
  background-color: #3c0f8b;
  color: #ffffff;
}

.heroDer {
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* Color de fondo para diferenciación */
}

.beneficios {
  width: 100%;
  display: flex;
  justify-content: start;
  align-items: start;
  flex-direction: column;
  margin-top: 20px;
}

.beneficio {
  display: flex;
  flex-direction: row;
}

.beneficio i {
  font-size: 20px;
  color: #ffffff;
  margin-right: 10px;
}

.beneficio p {
  font-size: 20px;
  color: #ffffff;
}

#connections {
  text-align: center;
  background-color: #fff;
}

#connections h2 {
  font-size: 2.5em;
  color: #673ab7;
  /* Color púrpura similar */
  margin-bottom: 30px;
  line-height: 1.1;
}

.icons-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

#services {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  padding: 40px 0;
}

/* Estilos de cada servicio */
.service {
  background-color: #e8d9ff;
  /* Color de fondo similar al de la imagen */
  border-radius: 15px;
  padding: 23px;
  display: flex;
  align-items: center;
  /* Alinear verticalmente la imagen y el texto */
  flex: 1 1 calc(50% - 40px);
  /* Para que ocupen siempre dos columnas */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  max-width: 900px;
  /* Ajuste opcional de ancho máximo */
  margin: 16px;
  height: 230px;
}

/* Imagen del icono a la izquierda */
.service-icon {
  margin-right: 20px;
  /* Espacio entre el icono y el texto */
}

/* Estilo para el texto */
.service div h2 {
  font-size: 1.8em;
  font-weight: bold;
  margin-bottom: 10px;
  color: #673ab7;
  /* Color del título */
}

.service div p {
  font-size: 1.4em;
  color: #000;
  margin: 0;
  /* Eliminar margen adicional en el párrafo */
  line-height: 1.4;
  /* Interlineado pequeño */
}

/* Responsive: En pantallas pequeñas (menor a 768px) */
@media (max-width: 768px) {
  #services {
    flex-direction: column;
  }

  .service {
    flex-direction: column;
    /* Poner icono y texto en columnas */
    text-align: left;
    /* Alinear a la izquierda */
  }

  .service-icon {
    margin-right: 0;
    margin-bottom: 15px;
    /* Espacio entre imagen y texto en pantallas pequeñas */
  }
}

#how {
  text-align: center;
  background-color: #fff;
  padding: 80px;
}

#how h2 {
  font-size: 4em;
  font-weight: 700;
  color: #673ab7;
  margin-bottom: 40px;
}

#how p {
  width: 70%;
  margin: 0 auto;
  font-size: 1.3em;
  margin-bottom: 10px;
}

#stats {
  height: 450px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 50px;
  background: #892cff;
}

.stat {
  text-align: center;
  color: #fff;
}

.stat h2 {
  font-size: 70px;
}

.stat p {
  font-size: 30px;
}

#pc {
  display: flex;
  justify-content: center;
  align-items: center;
}

#pc img {
  width: 100%;
  max-width: 800px;
  margin-bottom: -70px;
}

#services2 {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  /* Espacio entre los cuadros */
  justify-content: center;
  padding: 40px 0;
}

.service2 {
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  flex: 1 1 calc(50% - 40px);
  /* Para que cada cuadro ocupe el 50% del contenedor */
  max-width: 400px;
  /* Tamaño máximo del cuadro */
}

.service2-icon {
  margin-bottom: 15px;
}

.service2 h2 {
  font-size: 1.8em;
  font-weight: bold;
  margin-bottom: 10px;
  color: #673ab7;
  /* Color del título */
}

.service2 p {
  font-size: 1.4em;
  color: #000;
  margin: 0;
  /* Eliminar margen adicional en el párrafo */
  line-height: 1.4;
}

#contactForm {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  padding: 20px;
  max-width: 500px;
  margin: auto;
}

#contactForm input,
#contactForm textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1em;
  color: #333;
  background-color: #f9f9f9;
  transition: border-color 0.3s, box-shadow 0.3s;
}

#contactForm input:focus,
#contactForm textarea:focus {
  border-color: #673ab7;
  box-shadow: 0 0 5px rgba(103, 58, 183, 0.5);
  outline: none;
}

#contactForm button {
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  font-size: 1em;
  color: #fff;
  background-color: #673ab7;
  cursor: pointer;
  transition: background-color 0.3s, box-shadow 0.3s;
}

#contactForm button:hover {
  background-color: #5a2ea6;
  box-shadow: 0 0 5px rgba(90, 46, 166, 0.5);
}

/* Spinner CSS */
.spinner {
  border: 4px solid #f3f3f3; /* Color de fondo del spinner */
  border-top: 4px solid #673ab7; /* Color morado */
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin-top: 20px;
}

/* Animación del spinner */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

footer {
  text-align: center;
  padding: 20px 0;
}

footer h2 {
  font-size: 2.5em;
  line-height: 1.1;
  color: #673ab7;
  /* Color púrpura similar */
  margin-bottom: 30px;
}

.footer1 {
  background-color: #673ab7;
  text-align: center;
}

.footer1 p {
  color: #fff;
  margin-bottom: 10px;
}

/* Responsive Styles */
@media (max-width: 1200px) {
  #hero {
    height: 500px;
  }

  .heroIzq h1 {
    font-size: 50px;
  }

  .heroIzq p {
    font-size: 25px;
  }
}

@media (max-width: 992px) {
  .heroIzq h1 {
    font-size: 40px;
  }

  .heroIzq p {
    font-size: 20px;
  }

  .service {
    flex: 1 1 100%;
  }

  .service2 {
    flex: 1 1 100%;
  }
}

@media (max-width: 768px) {
  header {
    padding: 20px;
  }

  nav ul li {
    margin: 0 10px;
  }

    #hero {
        flex-direction: column;
        height: auto;
        background-image: none;
        background: #892cff;
    }

  .heroIzq,
  .heroDer {
    width: 100%;
    padding: 20px;
  }

  .heroIzq h1 {
    font-size: 30px;
  }

  .heroIzq p {
    font-size: 18px;
  }

  #how {
    padding: 40px;
  }

  #how h2 {
    font-size: 2.5em;
  }

  #how p {
    width: 90%;
    font-size: 1.2em;
  }

  #stats {
    flex-direction: column;
    height: auto;
    padding: 20px;
    padding-top: 50px;
  }

  .stat h2 {
    font-size: 50px;
  }

  .stat p {
    font-size: 20px;
  }

  #pc img {
    max-width: 100%;
    margin-bottom: -50px;
  }

  .icons-container img {
    width: 70%;
    margin: 0 20px;
  }

  /* Estilo para el texto */
  .service div h2 {
    font-size: 1.8em;
  }

  .service div p {
    font-size: 1.4em;
  }
}

@media (max-width: 576px) {
  nav ul {
    flex-direction: column;
  }

  nav ul li {
    margin: 10px 0;
  }

  .heroIzq h1 {
    font-size: 25px;
  }

  .heroIzq p {
    font-size: 16px;
  }

  #how h2 {
    font-size: 2em;
  }

  #how p {
    font-size: 1em;
  }

  .stat h2 {
    font-size: 40px;
  }

  .stat p {
    font-size: 18px;
  }
}
