/* ===========================================================================
   Akademik litsey — dizayn tizimi

   Uslub tashkenttech-edu.uz namunasiga qarab olingan: chuqur ko‘k asos,
   to‘q sariq urg‘u, Montserrat, yumshoq 14px burchaklar, ikki rangli
   sarlavhalar va pill shaklidagi tugmalar.

   Bootstrap 5.3 to‘r va komponent xulqini beradi; ko‘rinish shu yerda
   belgilanadi. Ranglar CSS o‘zgaruvchilarida — qorong‘i rejim faqat
   qiymatlarni almashtiradi.
   =========================================================================== */

:root {
  /* Asosiy ko‘k */
  --navy-900: #0a2a43;   /* eng quyuq: podval, qoplama */
  --navy-800: #0f3450;
  --navy-700: #143d5a;   /* firma rangi: sarlavha, tugma, matn */
  --navy-600: #1b4e71;
  --navy-500: #26638c;
  --navy-100: #e4edf4;
  --navy-50:  #f1f6fa;

  /* To‘q sariq urg‘u.
     --accent oq fonda 3.39 — bu faqat yirik matn va bezak uchun yetarli.
     Kichik matn va oq yozuvli tugmalar uchun --accent-ink (5.09) olinadi,
     shunda WCAG AA buzilmaydi, rang esa o‘sha oilada qoladi. */
  --accent:      #f05a28;
  --accent-ink:  #c63f14;
  --accent-soft: #fdede7;

  /* Quyuq fonda (qopqoq paneli, ko‘k bloklar) firma to‘q sarig‘i
     yetarlicha ajralmaydi: shaffof panel ortida yorug‘ kadr turganda
     kontrast 2,96 gacha tushadi. Shuning uchun ikkita yorug‘roq tus —
     talab matn o‘lchamiga qarab turlicha:
       --accent-on-dark     yirik sarlavha uchun  (4,30 — talab 3,0)
       --accent-on-dark-sm  kichik matn uchun     (5,65 — talab 4,5) */
  --accent-on-dark:    #fb8c60;
  --accent-on-dark-sm: #ffb08c;

  --ok-500:     #1f7a4d;
  --ok-bg:      #e8f6ee;
  --warn-500:   #a35c00;
  --warn-bg:    #fdf1e0;
  --danger-500: #b4291b;
  --danger-bg:  #fcecea;
  --info-500:   #10627f;
  --info-bg:    #e7f2f7;

  /* Yuzalar va matn */
  --bg:          #ffffff;
  --bg-alt:      #f5f5f5;   /* kulrang bo‘limlar */
  --surface:     #ffffff;
  --surface-alt: #f7f9fb;
  --border:      #e4e9ef;
  --border-firm: #cdd6e0;

  --text:       #143d5a;
  --text-muted: #5d7286;
  --text-faint: #93a3b3;
  --on-dark:    rgba(255, 255, 255, .82);

  --shadow-sm: 0 1px 2px rgba(10, 42, 67, .06);
  --shadow:    0 4px 16px rgba(10, 42, 67, .08);
  --shadow-lg: 0 18px 48px rgba(10, 42, 67, .16);

  /* Namunadagidek yumshoq burchaklar */
  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 22px;
  --radius-xl: 32px;

  --sidebar-w: 264px;
  --header-h:  92px;   /* gerb 66 px — atrofida havo qolsin */

  --font: "Montserrat", "Segoe UI", system-ui, -apple-system, sans-serif;
}

/* Qorong‘i rejim: o‘sha ko‘k oilaning quyuq uchi */
[data-bs-theme="dark"] {
  --navy-100: #1c3348;
  --navy-50:  #16283a;

  --accent-soft: #3a1d12;

  --ok-bg:     #12301f;
  --warn-bg:   #33260d;
  --danger-bg: #391714;
  --info-bg:   #0e2c39;

  --bg:          #0c1a26;
  --bg-alt:      #0f2130;
  --surface:     #132635;
  --surface-alt: #172d3f;
  --border:      #21394d;
  --border-firm: #2f4c64;

  --text:       #e6eef5;
  --text-muted: #9db0c1;
  --text-faint: #6f8598;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow:    0 4px 16px rgba(0, 0, 0, .4);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, .55);
}

/* Bootstrap komponentlari ham firma ranglarida chiqsin */
:root,
[data-bs-theme="dark"] {
  --bs-primary: var(--navy-700);
  --bs-body-bg: var(--bg);
  --bs-body-color: var(--text);
  --bs-border-color: var(--border);
  --bs-link-color: var(--accent-ink);
  --bs-link-hover-color: var(--navy-700);
  --bs-font-sans-serif: var(--font);
  --bs-border-radius: var(--radius);
}

/* --------------------------------------------------------------- Asos */
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.15;
  color: var(--text);
}
h1 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.15rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }

a { color: var(--accent-ink); text-decoration: none; }
a:hover { color: var(--navy-700); text-decoration: underline; }

.text-muted-2 { color: var(--text-muted) !important; }
.text-faint   { color: var(--text-faint) !important; }
.text-accent  { color: var(--accent-ink) !important; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 2000;
  background: var(--navy-700); color: #fff; padding: 10px 18px;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* -------------------------------------------------- Bo‘lim sarlavhasi */
/* Namunadagi naqsh: kichik razryadli yozuv, ostida ikki rangli sarlavha */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .74rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .16em;
  color: var(--accent-ink);
}
.eyebrow::before {
  content: ""; width: 26px; height: 2px;
  background: var(--accent); flex-shrink: 0;
}
.eyebrow--center::before { display: none; }
.eyebrow--on-dark { color: var(--accent-on-dark-sm); }
.eyebrow--on-dark::before { background: var(--accent-on-dark); }

/* Sarlavhaning bir qismi to‘q sariq: <h2>Bizning <em>fanlar</em></h2> */
h1 em, h2 em, h3 em,
.tinted { font-style: normal; color: var(--accent); }

/* Quyuq blok ichida — yorug‘roq tus va oq matn */
.on-dark { color: var(--on-dark); }
.on-dark h1, .on-dark h2, .on-dark h3 { color: #fff; }
.on-dark h1 em, .on-dark h2 em, .on-dark h3 em,
.on-dark .tinted { color: var(--accent-on-dark); }

.section { padding: 72px 0; }
.section--alt { background: var(--bg-alt); }
/* Oldingi bo‘lim ustiga chiqib turadigan yumaloq kartochka */
.section--raised {
  background: var(--surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  margin-top: -34px; position: relative; z-index: 2;
}

/* ---------------------------------------------------------------- Tugma */
.btn {
  border-radius: 999px;
  font-weight: 700;
  padding: 10px 22px;
  display: inline-flex; align-items: center; gap: 9px;
}
.btn-lg { padding: 13px 30px; font-size: 1rem; }
.btn-sm { padding: 7px 16px; font-size: .85rem; }

/* Oq yozuv --accent-ink ustida 5.09 — har qanday o‘lchamda AA */
.btn-accent {
  background: var(--accent-ink); border: 1px solid var(--accent-ink); color: #fff;
}
.btn-accent:hover { background: #a93410; border-color: #a93410; color: #fff; }

.btn-navy { background: var(--navy-700); border: 1px solid var(--navy-700); color: #fff; }
.btn-navy:hover { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }

.btn-outline-navy { background: none; border: 1.5px solid var(--navy-700); color: var(--navy-700); }
.btn-outline-navy:hover { background: var(--navy-700); color: #fff; }

.btn-soft { background: var(--accent-soft); border: 1px solid transparent; color: var(--accent-ink); }
.btn-soft:hover { background: var(--accent-ink); color: #fff; }

/* Qorong‘i fonda: shaffof, oq chegara */
.btn-on-dark { background: rgba(255, 255, 255, .1); border: 1.5px solid rgba(255, 255, 255, .6); color: #fff; }
.btn-on-dark:hover { background: #fff; color: var(--navy-700); border-color: #fff; }

/* Doira ichidagi strelka — namunadagi karusel tugmasi */
.btn-round {
  width: 46px; height: 46px; padding: 0;
  border-radius: 50%; justify-content: center;
  background: var(--navy-700); border: none; color: #fff;
}
.btn-round:hover { background: var(--accent-ink); color: #fff; }

/* Pill tanlagich: faol — to‘q ko‘k, nofaol — och sariq fon */
.pill-tabs { display: inline-flex; gap: 10px; flex-wrap: wrap; }
.pill-tab {
  padding: 10px 24px; border-radius: 999px;
  font-weight: 700; font-size: .92rem;
  background: var(--accent-soft); color: var(--accent-ink);
  border: none;
}
.pill-tab:hover { text-decoration: none; background: #fbdcd0; color: var(--accent-ink); }
.pill-tab.active { background: var(--navy-700); color: #fff; }

/* -------------------------------------------------------------- Kartalar */
.card-ui {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-ui + .card-ui { margin-top: 18px; }

.card-ui__header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.card-ui__title { margin: 0; font-size: 1rem; font-weight: 700; letter-spacing: 0; }
.card-ui__body { padding: 20px; }
.card-ui__footer {
  padding: 14px 20px; border-top: 1px solid var(--border);
  background: var(--surface-alt);
  border-radius: 0 0 var(--radius) var(--radius);
}

/* Havola-kartochka: rasm tepada, matn pastda */
.tile {
  display: block; height: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); text-decoration: none; }
.tile__media { aspect-ratio: 16 / 10; background: var(--navy-100); overflow: hidden; }
.tile__media img { width: 100%; height: 100%; object-fit: cover; }
.tile__body { padding: 18px 20px 22px; }
.tile__meta { font-size: .78rem; color: var(--text-muted); margin-bottom: 6px; }
.tile__title { font-size: 1.02rem; font-weight: 700; color: var(--text); margin: 0 0 6px; }
.tile:hover .tile__title { color: var(--accent-ink); }

/* --------------------------------------------------------- Statistik plita */
.stat {
  display: flex; align-items: center; gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  height: 100%;
}
.stat__icon {
  flex: 0 0 50px; height: 50px;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  background: var(--navy-50); color: var(--navy-700);
  font-size: 1.2rem;
}
.stat__value {
  display: block; font-size: 1.75rem; font-weight: 800;
  line-height: 1.1; letter-spacing: -.02em;
}
.stat__label { display: block; font-size: .82rem; color: var(--text-muted); }

.stat--accent .stat__icon { background: var(--accent-soft); color: var(--accent-ink); }
.stat--ok     .stat__icon { background: var(--ok-bg);     color: var(--ok-500); }
.stat--warn   .stat__icon { background: var(--warn-bg);   color: var(--warn-500); }
.stat--danger .stat__icon { background: var(--danger-bg); color: var(--danger-500); }
.stat--info   .stat__icon { background: var(--info-bg);   color: var(--info-500); }

/* -------------------------------------------------------------- Nishonlar */
.badge-ui {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 12px; border-radius: 999px;
  font-size: .74rem; font-weight: 700; white-space: nowrap;
  text-transform: uppercase; letter-spacing: .04em;
}
.badge-ui--ok      { background: var(--ok-bg);      color: var(--ok-500); }
.badge-ui--warn    { background: var(--warn-bg);    color: var(--warn-500); }
.badge-ui--danger  { background: var(--danger-bg);  color: var(--danger-500); }
.badge-ui--info    { background: var(--info-bg);    color: var(--info-500); }
.badge-ui--accent  { background: var(--accent-soft); color: var(--accent-ink); }
.badge-ui--muted   { background: var(--surface-alt); color: var(--text-muted); }

/* Litsey gerbi. Doira shaklidagi belgi — kesilmasligi uchun `contain`. */
.brand-mark-img {
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

/* Quyuq fonda gerbning tashqi halqasidagi ko‘k yozuv yo‘qoladi.
   Rasmiy gerblarni bunday joyda oq doira ustiga qo‘yish qabul qilingan —
   belgi o‘qiladi va medalyon ko‘rinishida tugallangan chiqadi. */
.brand-mark-img--on-dark {
  background: #fff;
  border-radius: 50%;
  padding: 3px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}

/* --------------------------------------------------------------- Avatar */
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  background: var(--navy-100); color: var(--navy-700);
  display: inline-grid; place-items: center;
  font-weight: 800; font-size: .78rem;
}
.avatar--sm { width: 30px; height: 30px; font-size: .68rem; }
.avatar--lg { width: 88px; height: 88px; font-size: 1.5rem; }

/* -------------------------------------------------------------- Jadvallar */
.table-ui { width: 100%; margin: 0; border-collapse: separate; border-spacing: 0; }
.table-ui th {
  text-align: start;
  font-size: .72rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .07em; color: var(--text-muted);
  background: var(--surface-alt);
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table-ui td {
  padding: 13px 16px; border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table-ui tbody tr:last-child td { border-bottom: none; }
.table-ui tbody tr:hover { background: var(--surface-alt); }

.table-wrap { overflow-x: auto; border-radius: 0 0 var(--radius) var(--radius); }

/* ------------------------------------------------------------ Bo‘sh holat */
.empty-state { padding: 56px 24px; text-align: center; color: var(--text-muted); }
.empty-state__icon { font-size: 2.5rem; color: var(--text-faint); margin-bottom: 14px; }
.empty-state__title { font-weight: 800; color: var(--text); margin-bottom: 6px; }

/* ------------------------------------------------------------------ Forma */
.form-label { font-weight: 700; font-size: .85rem; margin-bottom: 6px; color: var(--text); }
.form-label .req { color: var(--danger-500); margin-inline-start: 2px; }

.form-control, .form-select {
  background: var(--surface);
  border: 1.5px solid var(--border-firm);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 10px 13px;
}
.form-control:focus, .form-select:focus {
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  color: var(--text);
}
.form-control::placeholder { color: var(--text-faint); }
.form-text { font-size: .8rem; color: var(--text-muted); }
.invalid-feedback { font-size: .82rem; }

/* ---------------------------------------------------------- Sahifa boshi */
.page-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 24px;
}
.page-head__title { margin: 0 0 4px; font-size: 1.75rem; }
.page-head__sub { color: var(--text-muted); font-size: .92rem; margin: 0; }

.breadcrumb { font-size: .82rem; margin-bottom: 12px; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb .active { color: var(--text); font-weight: 600; }

/* --------------------------------------------------------- Dars jadvali */
/* Haftalik to‘r: chap ustunda dars vaqti, qolganida hafta kunlari.
   Katak balandligi tenglashtirilmaydi — kichik guruh darslari ikkita
   bo‘lib turadi va katak o‘zi cho‘ziladi. */
.timetable { table-layout: fixed; min-width: 900px; }
.timetable th, .timetable td { vertical-align: top; }
.timetable__time {
  width: 108px; white-space: nowrap;
  background: var(--surface-alt); border-inline-end: 1px solid var(--border);
}
.timetable__num   { display: block; font-weight: 800; color: var(--text); font-size: .8rem; }
.timetable__hours { display: block; font-size: .72rem; color: var(--text-muted); font-weight: 600; }
.timetable__cell { padding: 8px; }
.timetable__cell.is-clash {
  background: var(--danger-bg);
  box-shadow: inset 3px 0 0 var(--danger-500);
}

.lesson {
  border: 1px solid var(--border);
  border-inline-start: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 8px 10px;
}
.lesson + .lesson { margin-top: 6px; }
.lesson__subject { font-weight: 700; font-size: .85rem; line-height: 1.3; }
.lesson__meta {
  display: flex; flex-wrap: wrap; gap: 4px 10px;
  margin-top: 4px; font-size: .74rem; color: var(--text-muted);
}
.lesson__meta i { margin-inline-end: 3px; opacity: .7; }
.lesson__note { margin-top: 4px; font-size: .72rem; color: var(--text-faint); }

.text-warn { color: var(--warn-500) !important; font-weight: 600; }

/* ---------------------------------------------------------- Yangiliklar */
/* Kartochka `.tile` ustiga quriladi: bir qatordagi to‘rttasi bir xil
   balandlikda tursin — sarlavha ikki, matn uch qatorga cheklanadi va
   sana bilan ko‘rishlar har doim pastki chekkada qoladi. */
.tile--news { display: flex; flex-direction: column; height: 100%; }
.tile--news .tile__body { flex: 1; padding-bottom: 12px; }

.tile__placeholder {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  background: var(--navy-50); color: var(--navy-100); font-size: 2rem;
}

/* Qator soni cheklanadi: uzun sarlavha kartochkani cho‘zib yubormaydi.
   `-webkit-` prefiksi shart — line-clamp barcha brauzerlarda shu nom
   bilan ishlaydi. */
.tile__title--clamp,
.tile__text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tile__title--clamp { -webkit-line-clamp: 2; line-clamp: 2; }
.tile__text {
  -webkit-line-clamp: 3; line-clamp: 3;
  margin: 0; font-size: .85rem; color: var(--text-muted); line-height: 1.55;
}

.tile__footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--border);
  font-size: .78rem; font-weight: 600; color: var(--text-muted);
}
.tile__footer i { margin-inline-end: 6px; color: var(--accent-ink); }

/* Batafsil sahifadagi yon ustun: kichik rasm + sarlavha */
.news-mini {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 10px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--surface);
}
.news-mini:hover { border-color: var(--accent); text-decoration: none; }
.news-mini img {
  width: 78px; height: 56px; object-fit: cover;
  border-radius: 8px; flex-shrink: 0;
}
.news-mini__title {
  display: block; font-weight: 700; font-size: .86rem;
  color: var(--text); line-height: 1.35;
}
.news-mini:hover .news-mini__title { color: var(--accent-ink); }
.news-mini__date { display: block; font-size: .74rem; color: var(--text-muted); margin-top: 4px; }

.news-body { font-size: 1.02rem; line-height: 1.75; }

/* ------------------------------------------------- Xodim kartochkasi */
/* Rahbariyat va xodimlar sahifalarida ishlatiladi. Rasm yumaloq va
   qat'iy o'lchamda — turli nisbatdagi suratlar ro'yxatni buzmasin;
   rasm bo'lmasa bosh harflar chiqadi. */
.person {
  display: flex; gap: 20px; height: 100%;
  padding: 22px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
}
/* Rasm alohida kattalashtirilgan: rahbariyat sahifasida yuz ko'rinib
   turishi kerak, kartochkadagi qolgan hamma narsa esa bir xil nisbatda
   (matnlar ~20 % yirikroq). */
.person__photo { flex-shrink: 0; width: 120px; height: 120px; }
.person__photo img,
.person__initials {
  width: 120px; height: 120px; border-radius: 50%;
  object-fit: cover; object-position: top center;
}
.person__initials {
  display: flex; align-items: center; justify-content: center;
  background: var(--navy-100); color: var(--navy-700);
  font-weight: 800; font-size: 2rem;
}
.person__body { min-width: 0; }
.person__name { font-size: 1.2rem; font-weight: 800; margin: 0 0 3px; color: var(--text); }
.person__position { font-size: 1.02rem; font-weight: 600; color: var(--accent-ink); margin: 0 0 10px; }
.person__bio { font-size: 1rem; color: var(--text-muted); margin: 0 0 10px; line-height: 1.55; }
.person__meta { display: flex; flex-direction: column; gap: 5px; font-size: .96rem; color: var(--text-muted); }
.person__meta i { width: 17px; margin-inline-end: 7px; color: var(--accent-ink); }
.person__meta a { color: var(--text-muted); }
.person__meta a:hover { color: var(--accent-ink); }

/* Tor ekranda rasm biroz kichrayadi — aks holda matnga joy qolmaydi */
@media (max-width: 575.98px) {
  .person { gap: 14px; padding: 16px; }
  .person__photo { width: 88px; height: 88px; }
  .person__photo img,
  .person__initials { width: 88px; height: 88px; }
  .person__initials { font-size: 1.5rem; }
  .person__name { font-size: 1.08rem; }
  .person__position { font-size: .95rem; }
}

/* --------------------------------------------------------- Fan kartochkasi */
/* Fanlar sahifasidagi ro'yxat. Yo'nalish kartochkasidan farqli o'laroq
   rasm yo'q — fanlar ko'p va har biriga surat topib bo'lmaydi, shuning
   uchun belgi va matn. */
.subject {
  display: flex; gap: 14px; align-items: flex-start; height: 100%;
  padding: 18px 20px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color .18s ease, transform .18s ease;
}
.subject:hover {
  border-color: var(--accent); transform: translateY(-2px); text-decoration: none;
}
.subject__icon {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink);
}
.subject__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.subject__name { font-weight: 800; font-size: 1.02rem; color: var(--text); }
.subject:hover .subject__name { color: var(--accent-ink); }
.subject__hours { font-size: .84rem; color: var(--text-muted); }
.subject__tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }

/* ----------------------------------------------------------- Hamkorlar */
/* Ikki qatorli lenta. Har bir qatorning ichida ro'yxat ikki nusxada
   turadi, animatsiya esa aynan yarmiga (-50 %) siljiydi — shu payt
   ikkinchi nusxa birinchisining o'rnida bo'ladi va qaytish ko'rinmaydi. */
.marquee { display: flex; flex-direction: column; gap: 16px; }
/* Qator gorizontal bo'yicha qirqiladi — lenta chetdan chiqmasligi kerak.
   `overflow` esa ikkala o'q bo'yicha ishlaydi, shuning uchun ko'tarilgan
   kartochkaning yuqori chizig'i va soyasi ham qirqilardi. Ichkariga
   bo'sh joy qo'shiladi va u salbiy chekka bilan qaytariladi: qirqish
   ramkasi kengayadi, kartochkalar orasidagi masofa esa o'zgarmaydi. */
.marquee__row {
  overflow: hidden;
  padding-block: 12px;
  margin-block: -12px;
}
.marquee__track {
  display: flex; gap: 16px; width: max-content;
  animation: marquee-left 60s linear infinite;
}
.marquee__track--reverse { animation-name: marquee-right; }

@keyframes marquee-left {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes marquee-right {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}

/* Logotipni o'qish uchun to'xtatish */
.marquee:hover .marquee__track,
.marquee:focus-within .marquee__track { animation-play-state: paused; }

.partner {
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto; width: 210px; height: 108px; padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
/* Sichqoncha ustiga kelganda lenta to'xtaydi (`.marquee:hover`), kartochka
   esa biroz ko'tariladi — qaysi logotip ustida turgani ko'rinib tursin. */
.partner:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
/* Logotiplar biroz so'nik turadi — lenta bir butun ko'rinsin. To'liq
   kulrang qilinmaydi: och rangli emblemalar shunda umuman yo'qoladi. */
.partner img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  filter: grayscale(.55); opacity: .88;
  transition: filter .2s ease, opacity .2s ease;
}
.partner:hover img { filter: none; opacity: 1; }

/* Harakat cheklangan bo'lsa lenta oddiy to'rga aylanadi va
   nusxalangan yarmi umuman chizilmaydi. */
@media (prefers-reduced-motion: reduce) {
  .marquee { padding-inline: 16px; }
  .marquee__row { overflow: visible; }
  .marquee__track {
    animation: none; width: auto;
    flex-wrap: wrap; justify-content: center;
  }
  .partner--copy { display: none; }
}

@media (max-width: 575.98px) {
  .partner { width: 158px; height: 88px; padding: 12px 14px; }
}

/* ------------------------------------------------------------- Nashrlar */
/* Quyuq keng panel: chapda umumiy son, yonida turlar bo'yicha taqsimot.
   Raqamlar `data-count` bilan sanaladi — ko'rsatkichlar bloki bilan bir
   xil qoida. */
.figures {
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
  padding: 26px 32px;
  background: var(--navy-700); color: #fff;
  border-radius: var(--radius-lg);
}
.figures__lead {
  padding-inline-end: 28px;
  border-inline-end: 1px solid rgba(255, 255, 255, .18);
}
.figures__label {
  display: block; margin-bottom: 6px;
  font-size: .8rem; font-weight: 700; letter-spacing: .01em;
  color: var(--accent-on-dark-sm);
}
.figures__total { display: block; font-size: 2.9rem; font-weight: 800; line-height: 1; }
.figures__list { display: flex; flex: 1; gap: 36px; flex-wrap: wrap; }
.figures__value { display: block; font-size: 1.55rem; font-weight: 800; line-height: 1; }
.figures__icon {
  margin-inline-start: auto; font-size: 3.2rem;
  color: rgba(255, 255, 255, .16);
}

@media (max-width: 767.98px) {
  .figures { padding: 22px; gap: 20px; }
  .figures__lead {
    padding-inline-end: 0; padding-bottom: 18px;
    border-inline-end: none; border-bottom: 1px solid rgba(255, 255, 255, .18);
    width: 100%;
  }
  .figures__total { font-size: 2.4rem; }
  .figures__list { gap: 22px 28px; }
  .figures__icon { display: none; }
}

/* ------------------------------------------------- Suriganda paydo bo'lish */
/* Element ekranga kirganda pastdan yumshoq ko'tarilib chiqadi.
   Yashirish faqat `reveal-ready` sinfi bilan ishlaydi — uni JS qo'yadi.
   Shunda JS ishlamasa (yoki xato bersa) hamma narsa o'z joyida ko'rinib
   turaveradi va sayt bo'sh qolmaydi. */
.reveal-ready .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .55s cubic-bezier(.22, .61, .36, 1),
              transform .55s cubic-bezier(.22, .61, .36, 1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.reveal-ready .reveal.is-visible {
  opacity: 1;
  transform: none;
  /* Animatsiya tugagach `will-change` olib tashlanadi: brauzer
     qatlamni bekorga xotirada saqlab turmasin */
  will-change: auto;
}

/* Harakat cheklangan bo'lsa hech narsa yashirilmaydi */
@media (prefers-reduced-motion: reduce) {
  .reveal-ready .reveal { opacity: 1; transform: none; transition: none; }
}
