.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 999;
  /* para estar encima del menú */
}

.menu-toggle .bar {
  height: 3px;
  width: 100%;
  background-color: var(--color-primario);
  border-radius: 10px;
  transition: 0.3s;
}

/* Mostrar botón en móviles */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
  }

  .nav-links {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    height: 100vh;
    background-color: var(--color-blanco);
    flex-direction: column;
    padding: 4rem 2rem;
    gap: 2rem;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  }


  .nav-links.show {
    left: 0;
  }

  .navbar {
    justify-content: space-between;
    align-items: center;
  }

  @media (max-width: 768px) {
    .express-content h2 {
      font-size: 1.4rem;
      /* un poco más pequeño */
    }
  }

  /* === ANIMACIÓN A "X" === */
  .menu-toggle.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

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

  .menu-toggle.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .btn-primary {
    width: 100%;
    text-align: center;
  }

  .formulario {
    padding: 0 1rem;
  }
}

@media (max-width: 768px) {
  .user-links .info-item {
    display: none;
  }

  .user-links {
    justify-content: flex-end;
    gap: 1rem;
  }
}

/* ========== TABLET (max 1024px) ========== */
@media (max-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .navbar {
    padding: 1rem;
  }

  section {
    padding: 3rem 1.5rem;
  }
}

/* ====== RESPONSIVE HERO ====== */

/* Tablets (iPad, etc.) */
@media (max-width: 1024px) {
  .hero-inner {
    gap: 15px;
  }

  .tracking-box {
    max-width: 450px;
    padding: 20px;
  }

  .side-box {
    max-width: 200px;
    padding: 12px;
  }

  .hero-legend {
    right: 30px;
    font-size: 1.3rem;
    max-width: 160px;
  }
}

/* Móviles grandes (480px – 767px) */
@media (max-width: 767px) {

  /* Cambiar banner */
  .hero-desktop {
    display: none;
  }

  .hero-mobile {
    display: block;
  }

  .hero-image img {
    width: 100%;
    height: 200px;
    /* máximo 200px */
    object-fit: cover;
  }

  /* Reordenar contenido en columna */
  .hero-inner {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .hero-content {
    position: relative;
    bottom: auto;
    left: auto;
    width: 100%;
    background-color: #f7f7f7;
    padding: 20px 0;

  }

  .tracking-box {
    margin-top: 10px;
    order: 2;
    width: 90%;
    max-width: 100%;
    position: relative;
    z-index: 1;
  }


  /* Side-boxes apilados */
  .side-box {
    order: 3;
    width: 90%;
    max-width: 100%;
    text-align: center;
    justify-content: center;
  }

  .online-shipping-box {
    order: 3;
  }

  .moving-service-box {
    order: 4;
  }

  .side-box img {
    width: 48px;
    height: 48px;
  }

  /* Leyenda encima del banner */
  .hero-legend {
    position: absolute;
    top: 15%;
    /* se coloca arriba dentro del banner */
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    max-width: 90%;
    text-shadow: 1.5px 1.5px 3.5px rgba(0, 0, 0, 0.6);
    order: unset;
    /* quitamos el order para que no se mezcle con side-boxes */
    z-index: 2;
    /* asegura que quede por encima */
  }
}

/* Móviles pequeños (<480px) */
@media (max-width: 480px) {
  .tracking-box h2 {
    font-size: 1.2rem;
    gap: 6px;
  }

  .tracking-form input {
    font-size: 0.9rem;
    padding: 8px;
  }

  .tracking-form .btn-icon img {
    width: 28px;
    height: 28px;
  }

  .side-box {
    padding: 10px;
    font-size: 0.9rem;
  }

  .icon-img {
    width: 36px;
    height: 36px;
  }
}


/* Responsive complementos */
@media (max-width: 992px) {
  .servicios-complementos {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .servicios-complementos {
    grid-template-columns: 1fr;
  }
}

/* Responsividad */

@media (max-width: 768px) {
  .footer-top {
    flex-direction: column;
    text-align: center;
  }

  .footer-contacto,
  .footer-direccion {
    flex: none;
  }
}

/* Responsividad sobre */

@media (max-width: 768px) {
  .sobre-container {
    flex-direction: column;
    text-align: center;
  }

  .sobre-texto,
  .sobre-imagen {
    flex: none;
    width: 100%;
  }

  .sobre-imagen img {
    max-width: 80%;
    margin: 1rem auto 0 auto;
  }
}

/* Responsividad verde */

@media (max-width: 768px) {
  .politica-content {
    flex-direction: column;
    text-align: center;
  }

  .icono-verde {
    margin-bottom: 1rem;
  }
}

@media (max-width: 768px) {

  /* Estilo del selector dentro del menú móvil */
  #lang-selector-container {
    padding: 0.5rem 0;
    border-top: 1px solid #ddd;
    margin-top: 1rem;
  }

  .custom-lang-selector {
    width: 100%;
  }

  .custom-lang-selector .selected-lang {
    padding: 0.6rem 1rem;
    justify-content: flex-start;
    background-color: #f9f9f9;
  }

  .lang-options {
    position: static;
    box-shadow: none;
    border: none;
    border-top: 1px solid #eee;
  }

  .lang-options li {
    padding: 0.6rem 1rem;
  }

  .language-selector.inside-navlinks .lang-options {
    position: static !important;
    box-shadow: none !important;
    border: none !important;
    border-top: 1px solid #eee !important;
    max-width: 100% !important;
    width: 100% !important;
  }

}