.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.home-navbar {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 50;
}

.home-nav-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.home-brand-wrap {
  display: flex;
  align-items: center;
  gap: 24px;
}

.home-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
}

.home-brand-badge {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 20px;
  flex-shrink: 0;
}

.home-hero {
  background: linear-gradient(180deg, #eef2ff 0%, #f8fafc 100%);
  padding: 48px 0 36px;
  text-align: center;
}

.home-hero-pill {
  display: inline-block;
  background: #fff;
  color: var(--primary);
  border: 1px solid #c7d2fe;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 16px;
}

.home-hero h1 {
  font-size: clamp(22px, 4vw, 35px);
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text-main);
}

.home-hero p {
  max-width: 660px;
  margin: 0 auto 26px;
  color: var(--text-muted);
}

.home-search-bar {
  max-width: 520px;
  margin: 0 auto;
}

.home-search-bar input {
  width: 100%;
  padding: 13px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: #fff;
  box-shadow: var(--shadow-sm);
  outline: none;
  transition: border-color 0.2s;
}

.home-search-bar input:focus {
  border-color: var(--primary);
}

.home-main {
  padding-bottom: 64px;
}

.home-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 22px 0 32px;
}

.home-filter-chip {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: #fff;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 13.5px;
}

.home-filter-chip.active,
.home-filter-chip:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.home-tests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 20px;
}

.home-test-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.home-test-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.home-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  font-size: 12.5px;
}

.home-cat-badge {
  background: var(--primary-soft);
  color: var(--primary);
  padding: 4px 12px;
  border-radius: 8px;
  font-weight: 500;
}

.home-meta-time {
  color: var(--text-muted);
  font-weight: 500;
}

.home-card-title {
  font-size: 17.5px;
  font-weight: 700;
  margin-bottom: 10px;
}

.home-card-desc {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 20px;
}

.home-card-footer {
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.home-price strong {
  font-size: 18px;
  color: var(--text-main);
}

.home-price span {
  font-size: 13px;
  color: var(--text-muted);
  margin-right: 4px;
}

/* مودال ثبت‌نام سریع، ورود و فراموشی رمز عبور */
@keyframes modalFadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes authPanelSlide {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.home-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
}

.home-modal-backdrop.open {
  display: flex;
}

.home-modal-box {
  background: #fff;
  width: 100%;
  max-width: 430px;
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
  max-height: 92vh;
  overflow-y: auto;
  animation: modalFadeSlideIn 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.home-modal-close {
  position: absolute;
  top: 14px;
  left: 16px;
  background: none;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
}

.auth-switcher {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 12px;
  margin-top: 14px;
  margin-bottom: 20px;
}

.auth-switcher.hidden {
  display: none;
}

.auth-switcher-pill {
  position: absolute;
  top: 4px;
  right: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  background: #fff;
  border-radius: 9px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-switcher[data-active="login"] .auth-switcher-pill {
  transform: translateX(-100%);
}

.auth-switch-tab {
  position: relative;
  z-index: 1;
  background: none;
  border: none;
  padding: 9px 12px;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s;
}

.auth-switch-tab.active {
  color: var(--primary);
}

.home-modal-header h3 {
  font-size: 19px;
  margin-bottom: 6px;
}

.home-modal-header p {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.auth-view-panel {
  display: none;
}

.auth-view-panel.active {
  display: block;
  animation: authPanelSlide 0.25s ease;
}

.home-form-group {
  margin-bottom: 14px;
}

.auth-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.auth-label-row label {
  margin-bottom: 0 !important;
}

.home-form-group label {
  display: block;
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 6px;
}

.home-form-group input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.home-form-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.home-form-error {
  color: var(--danger);
  font-size: 13px;
  margin-bottom: 12px;
  min-height: 20px;
}

.home-submit-btn {
  width: 100%;
  padding: 13px;
}

.auth-bottom-switch {
  text-align: center;
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-muted);
}

.auth-link-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
  padding: 0 4px;
  font-size: 13px;
}

.auth-link-btn:hover {
  text-decoration: underline;
}

.auth-link-btn:disabled {
  color: var(--text-muted);
  cursor: not-allowed;
  text-decoration: none;
}

.auth-forgot-trigger {
  font-weight: 500;
  font-size: 12.5px;
}

.auth-otp-sent-banner {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 14px;
  text-align: center;
}

@media (max-width: 768px) {
  .home-brand {
    font-size: 14px;
  }
  .home-brand-badge {
    width: 34px;
    height: 34px;
    font-size: 18px;
  }
  .home-hero {
    padding: 36px 0 28px;
  }
  .home-tests-grid {
    grid-template-columns: 1fr;
  }
}