:root {
  --navy: #1A2E6E;
  --navy-text: #1A2E6E;
  --crimson: #CC1C1C;
  --paper: #F7F6F2;
  --surface: rgba(255, 255, 255, 0.92);
  --thumb-bg: linear-gradient(145deg, #F3F5FA 0%, #ECEEF6 100%);
  --ink: #141824;
  --ink-soft: #646B7A;
  --hairline: rgba(26, 46, 110, 0.1);
  --shadow: 0 2px 6px rgba(20, 24, 36, 0.04), 0 10px 26px rgba(26, 46, 110, 0.05);
}

body.dark {
  --navy: #3B63D6;
  --navy-text: #E9EEFC;
  --crimson: #FF5C5C;
  --paper: #0B101D;
  --surface: rgba(20, 27, 46, 0.9);
  --thumb-bg: linear-gradient(145deg, #1A233B 0%, #141B30 100%);
  --ink: #F1F4FB;
  --ink-soft: #96A0B8;
  --hairline: rgba(148, 173, 255, 0.14);
  --shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

/* ===== LOGO RANGIGA MOS FON ELEMENTLARI ===== */
.bg-decor {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
}

.bg-orb-navy {
  width: 340px;
  height: 340px;
  top: -110px;
  right: -90px;
  background: rgba(26, 46, 110, 0.12);
  animation: orbDriftA 18s ease-in-out infinite alternate;
}

.bg-orb-crimson {
  width: 280px;
  height: 280px;
  bottom: -80px;
  left: -90px;
  background: rgba(204, 28, 28, 0.09);
  animation: orbDriftB 22s ease-in-out infinite alternate;
}

.bg-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(26, 46, 110, 0.06);
}

.bg-ring-1 {
  width: 420px;
  height: 420px;
  top: -160px;
  left: -140px;
  animation: ringFloat 26s linear infinite;
}

.bg-ring-2 {
  width: 300px;
  height: 300px;
  bottom: 80px;
  right: -120px;
  border-color: rgba(204, 28, 28, 0.06);
  animation: ringFloat 32s linear infinite reverse;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(26, 46, 110, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0) 70%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0) 70%);
}

.page {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 18px 16px 40px;
  display: flex;
  flex-direction: column;
}

.hidden {
  display: none !important;
}

/* ===== TOPBAR ===== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 2px 16px;
  border-bottom: 1px solid var(--hairline);
  animation: topbarIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.brand-logo {
  height: 36px;
  width: auto;
  object-fit: contain;
}

.brand-meta {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--navy-text);
}

.brand-tag {
  font-size: 12px;
  color: var(--ink-soft);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--hairline);
  background: var(--surface);
  color: var(--navy-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.icon-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(26, 46, 110, 0.12);
}

.icon-btn:active {
  transform: scale(0.92);
}

.icon-btn.active {
  background: var(--navy);
  color: #FFFFFF;
  border-color: var(--navy);
}

/* ===== SEARCH ===== */
.search-wrap {
  position: relative;
  margin: 16px 0 4px;
  animation: searchReveal 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--ink-soft);
  pointer-events: none;
}

.search-wrap input {
  width: 100%;
  height: 44px;
  padding: 0 14px 0 42px;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: var(--surface);
  backdrop-filter: blur(8px);
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-wrap input:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(26, 46, 110, 0.08);
}

/* ===== BO'LIMLAR TEPADA (FAQAT NOMI) ===== */
.sections-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 14px 0 16px;
  scrollbar-width: none;
}

.sections-bar::-webkit-scrollbar {
  display: none;
}

.sec-pill {
  border: 1px solid var(--hairline);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 99px;
  white-space: nowrap;
  cursor: pointer;
  transform-origin: left center;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
}

.sec-pill.sec-enter {
  opacity: 0;
  animation: pillSpread 0.72s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.sec-pill.sec-enter:first-child {
  animation-name: pillSpreadFirst;
}

.sec-pill:hover {
  transform: translateY(-1px);
  border-color: var(--navy);
}

.sec-pill:active {
  transform: scale(0.95);
}

.sec-pill.active {
  background: var(--navy);
  color: #FFFFFF;
  border-color: var(--navy);
  box-shadow: 0 4px 12px rgba(26, 46, 110, 0.22);
}

/* ===== SECTION HEAD ===== */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-head h1 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--navy-text);
}

.muted-count {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
}

/* ===== XIZMATLAR TO'RTBURCHAK KARTOCHKALAR ===== */
.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.srv-tile {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  backdrop-filter: blur(8px);
  border: 1px solid var(--hairline);
  border-radius: 18px;
  padding: 12px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 182px;
  opacity: 0;
  animation: cardReveal 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.24s ease, border-color 0.24s ease;
}

.srv-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(26, 46, 110, 0.26);
  box-shadow: 0 12px 28px rgba(26, 46, 110, 0.12);
}

.srv-tile:active {
  transform: scale(0.975);
}

.srv-img-wrap {
  width: 100%;
  height: 92px;
  border-radius: 12px;
  background: var(--thumb-bg);
  border: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 10px;
}

.srv-img-wrap img {
  width: 78px;
  height: 78px;
  object-fit: contain;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.srv-tile:hover .srv-img-wrap img {
  transform: scale(1.1) rotate(-3deg);
}

.srv-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.32;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.srv-sec-sub {
  font-size: 11px;
  color: var(--ink-soft);
  margin-top: 2px;
}

.srv-price {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--crimson);
  font-variant-numeric: tabular-nums;
}

.srv-price small {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-soft);
}

.empty-box {
  grid-column: 1 / -1;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 28px 16px;
  text-align: center;
  font-size: 14px;
  color: var(--ink-soft);
}

/* ===== FOOTER ===== */
.footer {
  margin-top: auto;
  padding-top: 32px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-soft);
}

.footer .sep {
  margin: 0 6px;
}

/* ===== KEYFRAMES ===== */
@keyframes topbarIn {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes searchReveal {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes cardReveal {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes pillSpreadFirst {
  0%   { opacity: 0; transform: scale(0.22); }
  35%  { opacity: 1; }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes pillSpread {
  0%   { opacity: 0; transform: translateX(-38px) scale(0.28); }
  40%  { opacity: 1; }
  100% { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes orbDriftA {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-24px, 28px) scale(1.08); }
}

@keyframes orbDriftB {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(26px, -22px) scale(1.06); }
}

@keyframes ringFloat {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
