/**
 * فایل: assets/css/sections/mobile.css
 * کاربرد: موبایل — منوی ثابت پایین (شیشه‌ای تیره)، فرم بدون زوم iOS
 */

:root {
  --mobile-bottom-nav-h: 56px;
}

html {
  overflow-x: clip;
}

body {
  overflow-x: clip;
}

/* منوی پایین — فقط موبایل */
.mobile-bottom-nav {
  display: none;
}

@media (max-width: 900px) {
  .site-header__inner {
    grid-template-columns: 1fr auto;
    align-items: center;
    column-gap: 12px;
    padding: 8px 0 10px;
  }

  .site-header__brand {
    min-width: 0;
  }

  .site-header__nav.site-nav {
    display: none;
  }

  .site-header__langs {
    flex-shrink: 0;
  }

  .lang-flag {
    width: 44px;
    height: 32px;
  }

  .site-logo__img {
    max-height: 44px;
    width: auto;
  }

  .mobile-bottom-nav {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 85;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: linear-gradient(
      180deg,
      rgba(10, 21, 36, 0.72) 0%,
      rgba(8, 16, 28, 0.94) 100%
    );
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
      0 -8px 32px rgba(0, 0, 0, 0.35),
      inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px) saturate(1.35);
    -webkit-backdrop-filter: blur(20px) saturate(1.35);
  }

  .mobile-bottom-nav__scroll {
    display: flex;
    align-items: stretch;
    gap: 4px;
    min-height: var(--mobile-bottom-nav-h);
    padding: 6px 10px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .mobile-bottom-nav__scroll::-webkit-scrollbar {
    display: none;
  }

  .mobile-bottom-nav__link {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 8px 14px;
    border-radius: 12px;
    color: rgba(226, 232, 240, 0.92);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    border: 1px solid transparent;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  }

  .mobile-bottom-nav__link:hover,
  .mobile-bottom-nav__link:focus-visible {
    color: #fff;
    background: rgba(59, 130, 246, 0.16);
    border-color: rgba(59, 130, 246, 0.28);
    outline: none;
  }

  body.has-mobile-bottom-nav {
    padding-bottom: calc(
      var(--mobile-bottom-nav-h) + 12px + env(safe-area-inset-bottom, 0px)
    );
  }

  .form-group input,
  .form-group textarea,
  .form-group select,
  .contact-form__submit,
  .btn {
    font-size: 16px;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__actions .btn {
    width: 100%;
    min-height: 48px;
    justify-content: center;
  }
}

@media (min-width: 901px) {
  .mobile-bottom-nav {
    display: none !important;
  }

  body.has-mobile-bottom-nav {
    padding-bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-bottom-nav__link {
    transition: none;
  }
}
