@media (max-width: 900px) {
  .footer-bottom {
    flex-direction: column;
    justify-content: center;
    padding: 14px 20px;
    gap: 16px;
  }

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

  .footer-links-right {
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .nav {
    padding: 6px 12px;
    min-height: 52px;
    justify-content: flex-end; /* Align to right since left is hidden */
  }

  .nav-left {
    display: none;
  }

  .nav-right {
    gap: 2px;
  }

  .nav-link {
    padding: 0 8px;
    font-size: 0.8125rem;
  }

  .nav-profile,
  .nav-apps {
    width: 36px;
    height: 36px;
  }

  #app {
    padding: 10vh 16px 32px;
  }

  .logo {
    margin-bottom: 24px;
    font-size: clamp(3.5rem, 15vw, 5rem);
    max-width: 100%;
    overflow-wrap: break-word;
    text-align: center;
  }

  .tagline {
    margin-bottom: 24px;
    font-size: 0.875rem;
    padding: 0 10px;
  }

  .search-box {
    min-height: 48px;
    padding: 0 12px;
    gap: 10px;
    border-radius: 24px;
  }

  .reason-text {
    font-size: 0.95rem;
  }

  .search-subtext {
    margin-top: 14px;
    font-size: 0.75rem;
  }

  .buttons {
    margin-top: 24px;
    gap: 12px;
    width: 100%;
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
    padding: 12px 20px;
    font-size: 0.9375rem;
  }

  .footer-top {
    padding: 14px 20px;
    text-align: center;
    justify-content: center;
  }

  .footer-bottom {
    padding: 20px 16px;
  }
}

/* Extra small devices (iPhone SE 2016, etc.) */
@media (max-width: 360px) {
  #app {
    padding: 8vh 12px 24px;
  }

  .logo {
    font-size: 3.2rem;
  }

  .tagline {
    font-size: 0.8125rem;
  }

  .search-box {
    padding: 0 10px;
  }

  .reason-text {
    font-size: 0.875rem;
  }

  .btn {
    max-width: 100%;
    font-size: 0.875rem;
  }
}

/* Landscape orientation on mobile */
@media (max-height: 500px) and (orientation: landscape) {
  #app {
    padding: 4vh 20px 20px;
  }

  .logo {
    font-size: 3rem;
    margin-bottom: 12px;
  }

  .buttons {
    flex-direction: row;
    margin-top: 16px;
  }

  .btn {
    width: auto;
  }
}
