/* =========================================================
   Shofirkon IM — DIZAYN YANGILANISHI (2026)
   style.css ustidan yuklanadi: xalqaro maktab saytlari uslubi,
   WCAG 2.2 qulayligi, mobil xatoliklar tuzatilgan.
   ========================================================= */

:root {
  --navy:       #0B1A33;
  --blue:       #1D4ED8;
  --blue-light: #2563EB;
  --blue-pale:  #EEF3FF;
  --blue-mid:   #A9C1F5;
  --gold:       #E9A916;
  --gold-dark:  #9A6B00;
  --gold-pale:  #FDF5E1;
  --off-white:  #F5F7FB;
  --ink:        #0B1527;
  --text:       #27324A;
  --muted:      #5B6880;   /* oq fonda 5.6:1 kontrast */
  --line:       #E3E8F1;

  --r-sm: 10px;
  --r:    14px;
  --r-lg: 18px;
  --r-xl: 24px;

  --sh-1: 0 1px 2px rgba(11,26,51,.05), 0 2px 8px rgba(11,26,51,.04);
  --sh-2: 0 6px 20px rgba(11,26,51,.08), 0 2px 6px rgba(11,26,51,.04);
  --sh-3: 0 18px 44px rgba(11,26,51,.12), 0 4px 12px rgba(11,26,51,.05);
  --sh-glow: 0 6px 18px rgba(29,78,216,.22);

  --grad-blue: linear-gradient(135deg, #1D4ED8 0%, #2563EB 100%);
  --grad-navy: linear-gradient(150deg, #0B1A33 0%, #132B5C 60%, #1B3D82 100%);
  --grad-gold: linear-gradient(135deg, #E9A916 0%, #F7C948 100%);

  --maxw: 1240px;
  --header-h: 76px;
}

/* ---------- Asos ---------- */
html { scroll-padding-top: calc(var(--header-h) + 16px); }
body { font-size: 16px; line-height: 1.7; text-rendering: optimizeLegibility; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
img { height: auto; }

/* Klaviatura fokusi — barcha interaktiv elementlarda aniq ko'rinadi */
:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--blue-light);
  outline-offset: 3px;
  border-radius: 8px;
}
.hero :focus-visible, .footer :focus-visible, .page-head :focus-visible, .cta-band :focus-visible, .topbar :focus-visible {
  outline-color: var(--gold);
}
[tabindex="-1"]:focus-visible { outline: none; }

/* "Asosiy mazmunga o'tish" havolasi */
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 2000;
  background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 10px;
  font-weight: 700; font-size: 14px; transition: top .2s;
}
.skip-link:focus { top: 12px; color: #fff; }

/* Grid ichidagi bloklar sig'masa ham ekrandan chiqib ketmasin */
.grid > *, .two-col > *, .life-grid > *, .contact-grid > *, .f-grid > *, .steps > * { min-width: 0; }

/* ---------- Tugmalar ---------- */
.btn { font-size: 15px; padding: 12px 22px; border-radius: 12px; min-height: 46px; letter-spacing: -.005em; }
.btn-lg { padding: 15px 28px; font-size: 16px; min-height: 54px; border-radius: 14px; }
.btn-primary { box-shadow: var(--sh-glow); }
.btn-primary:hover { box-shadow: 0 10px 26px rgba(29,78,216,.32); }
.btn-gold { color: #1A1300; box-shadow: 0 6px 18px rgba(233,169,22,.28); }
.btn-gold:hover { color: #1A1300; }
.btn-outline { color: var(--blue); border-color: #CBD6EA; box-shadow: none; }
.btn:active { transform: translateY(0) scale(.98); }

/* ---------- Topbar ---------- */
.topbar { font-size: 13px; padding: 7px 0; }
.topbar a { color: rgba(255,255,255,.82); }

/* ---------- Header ---------- */
.header { background: rgba(255,255,255,.92); }
.header .container { min-height: var(--header-h); }
.logo img { height: 50px; width: 50px; border-radius: 12px; box-shadow: 0 0 0 1px var(--line); }
.nav { gap: 2px; }
.nav-item > a { white-space: nowrap; font-size: 14.5px; padding: 10px 14px; color: var(--ink); }
.nav-item > a.active::after { left: 14px; right: 14px; bottom: 2px; height: 2.5px; }
.dropdown { border-radius: 14px; padding: 8px; min-width: 230px; box-shadow: 0 20px 50px rgba(11,26,51,.16); }
.dropdown a { font-size: 14.5px; padding: 10px 14px; }
.dropdown a.active { color: var(--blue); background: var(--blue-pale); }
.nav-item:focus-within > .dropdown { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.header-cta .btn { padding: 11px 20px; min-height: 44px; font-size: 14.5px; }

/* Menyu sig'maganda — hamburger erta chiqadi (oldin 1024px da yozuvlar 2 qatorga tushardi) */
@media (max-width: 1140px) {
  .nav { display: none; }
  .hamburger { display: block; }
}
.mobile-nav .drawer { width: min(360px, 90vw); padding: 20px 18px; }
.drawer-item > a { min-height: 52px; font-size: 16px; }
.drawer-children a { font-size: 15px; padding: 12px 12px 12px 30px; }
.drawer-toggle { width: 36px; height: 36px; }

/* ---------- Hero ---------- */
.hero-slider { height: clamp(520px, 82vh, 700px); }
.h-slide-overlay {
  background:
    linear-gradient(180deg, rgba(11,26,51,.30) 0%, rgba(11,26,51,0) 30%),
    linear-gradient(100deg, rgba(11,26,51,.94) 0%, rgba(11,26,51,.78) 45%, rgba(11,26,51,.35) 100%);
}
.h-slide-inner { max-width: var(--maxw); padding-bottom: 40px; }
.h-slide-inner > h2, .h-slide-inner > p { max-width: 760px; }
.h-slide-inner h2 { font-size: clamp(2.1rem, 5vw, 3.9rem); line-height: 1.08; letter-spacing: -.03em; margin-bottom: 18px; }
.h-slide-inner p { font-size: clamp(1rem, 1.4vw, 1.2rem); color: rgba(255,255,255,.88); }
.s-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.h-slide[data-pos="o'rta"] .s-actions, .h-slide[data-pos=""] .s-actions { justify-content: center; }
.h-slide[data-pos="o'ng"] .s-actions { justify-content: flex-end; }
.h-slide.active .h-slide-inner > *:nth-child(4) { animation-delay: .42s; }
.hero-slider .slider-arrow { width: 46px; height: 46px; }
.hero-slider .slider-dots { bottom: 92px; }
.hero-slider .slider-dots button { width: 10px; height: 10px; position: relative; }
.hero-slider .slider-dots button::before { content: ""; position: absolute; inset: -8px; } /* katta bosish maydoni */

/* ---------- Statistika: hero ustiga chiqib turuvchi panel ---------- */
.stats-sec { position: relative; z-index: 5; margin-top: -64px; padding-bottom: 8px; }
.stats-sec .stats {
  gap: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--r-xl);
  box-shadow: var(--sh-3); overflow: hidden;
}
.stats-sec .stat {
  border: 0; border-radius: 0; box-shadow: none; padding: 30px 20px; background: transparent;
}
.stats-sec .stat + .stat { border-left: 1px solid var(--line); }
.stats-sec .stat:hover { transform: none; box-shadow: none; }
.stat .num { font-size: clamp(2rem, 3.4vw, 2.7rem); color: var(--navy); }
.stat .num em { color: var(--gold); }
.stat .lbl { font-size: 14px; color: var(--muted); }
.stats-sec .stat .bar { display: none; }

/* ---------- Bo'lim sarlavhalari ---------- */
.section { padding: clamp(64px, 8vw, 104px) 0; }
.sec-head { margin-bottom: clamp(32px, 4vw, 52px); }
.sec-head h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); letter-spacing: -.025em; }
.sec-head h2 .hl::after { height: 8px; bottom: 4px; }
.kicker { font-size: 12.5px; color: var(--blue); }
.sec-head--row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; max-width: none; }
.sec-head--row h2 { margin-bottom: 0; }

/* ---------- Tezkor havolalar ---------- */
.quick-sec { padding-top: clamp(56px, 7vw, 88px); }
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.quick {
  display: flex; align-items: center; gap: 16px; padding: 20px 22px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  color: var(--ink); transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
  position: relative;
}
.quick::after {
  content: ""; position: absolute; right: 20px; top: 50%; width: 9px; height: 9px;
  border-right: 2px solid currentColor; border-top: 2px solid currentColor;
  transform: translateY(-50%) rotate(45deg); opacity: .35; transition: .2s var(--ease);
}
.quick:hover { border-color: var(--blue-mid); box-shadow: var(--sh-2); transform: translateY(-2px); color: var(--ink); }
.quick:hover::after { opacity: 1; right: 16px; color: var(--blue); }
.q-ico {
  width: 52px; height: 52px; flex: none; border-radius: 14px; display: grid; place-items: center;
  background: var(--blue-pale); color: var(--blue); transition: .2s var(--ease);
}
.quick:nth-child(even) .q-ico { background: var(--gold-pale); color: var(--gold-dark); }
.quick:hover .q-ico { background: var(--blue); color: #fff; }
.q-ico svg { width: 26px; height: 26px; }
.q-txt { display: flex; flex-direction: column; line-height: 1.35; padding-right: 22px; }
.q-txt b { font-family: var(--font-head); font-size: 16.5px; font-weight: 700; }
.q-txt small { font-size: 14px; color: var(--muted); margin-top: 3px; }

/* ---------- Kartalar ---------- */
.card { border-radius: var(--r-lg); padding: 30px 26px; }
.card:hover { transform: translateY(-4px); box-shadow: var(--sh-3); }
.card h3 { font-size: 18.5px; }
.card p { font-size: 15px; line-height: 1.65; }

/* ---------- Bosh sahifa: "Biz haqimizda" ---------- */
.home-about .ha-card {
  max-width: none; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 28px 48px;
  background: var(--grad-navy); color: #fff; border-radius: var(--r-xl);
  padding: clamp(32px, 5vw, 56px); position: relative; overflow: hidden;
}
.home-about .ha-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(520px 300px at 100% 0%, rgba(233,169,22,.18), transparent 65%);
}
.home-about .ha-card > * { position: relative; grid-column: 1; }
.home-about .ha-card .btn { grid-column: 2; grid-row: 1 / span 3; }
.home-about .ha-card h2 { color: #fff; font-size: clamp(1.6rem, 2.6vw, 2.2rem); margin-bottom: 4px; }
.home-about .ha-card .kicker { color: var(--gold); }
.home-about .ha-text { color: rgba(255,255,255,.82); margin: 0; }
.home-about .btn-primary { background: #fff; color: var(--navy); box-shadow: none; }
.home-about .btn-primary:hover { background: var(--gold); color: #1A1300; }

/* ---------- So'nggi yangiliklar (bosh sahifa) ---------- */
.hn-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.hn-card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden; color: var(--text);
  transition: box-shadow .25s var(--ease), transform .25s var(--ease), border-color .25s var(--ease);
}
.hn-card:hover { box-shadow: var(--sh-3); transform: translateY(-4px); border-color: transparent; color: var(--text); }
.hn-thumb { position: relative; aspect-ratio: 16 / 10; background: var(--blue-pale); overflow: hidden; }
.hn-thumb img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.hn-thumb .tag { z-index: 2; }
.news-thumb.img-missing { min-height: 200px; background: var(--blue-pale) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A9C1F5' stroke-width='1.7'%3E%3Crect x='3' y='5' width='18' height='16' rx='3'/%3E%3Cpath d='M8 3v4M16 3v4M3 10h18M8.5 15h7'/%3E%3C/svg%3E") center / 56px no-repeat; }
.news-thumb.img-missing .zoom-hint { display: none; }
.hn-card:hover .hn-thumb img { transform: scale(1.05); }
.hn-thumb .ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--blue-mid); }
.hn-thumb .ph svg { width: 56px; height: 56px; }
.hn-thumb .tag {
  position: absolute; left: 14px; top: 14px; background: #fff; color: var(--navy);
  font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 999px; box-shadow: var(--sh-1);
}
.hn-body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.hn-body time { font-size: 13px; font-weight: 600; color: var(--muted); }
.hn-body h3 { font-size: 18px; line-height: 1.35; }
.hn-body p { font-size: 15px; color: var(--muted); line-height: 1.6; flex: 1; }
.hn-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14.5px; color: var(--blue); margin-top: 6px; }
.hn-more svg { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.hn-card:hover .hn-more svg { transform: translateX(4px); }

/* ---------- Ichki sahifa sarlavhasi ---------- */
.page-head { padding: clamp(48px, 6vw, 76px) 0 clamp(40px, 5vw, 60px); }
.page-head h1 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); letter-spacing: -.025em; }
.page-head > .container > p { font-size: 16.5px; color: rgba(255,255,255,.78); max-width: 640px; }
.ph-breadcrumb { font-size: 13.5px; color: rgba(255,255,255,.6); flex-wrap: wrap; }

/* ---------- Kontakt sahifasi (mobil xatolik tuzatildi) ---------- */
.contact-grid .field input, .contact-grid .field textarea { font-size: 16px; padding: 13px 15px; min-height: 48px; } /* iOS'da zoom bo'lmasligi uchun 16px */
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
  .map-wrap { height: 300px; }
}

/* ---------- Karusel nuqtalari: ko'p ustoz bo'lsa ham sig'adi ---------- */
.carousel-nav { max-width: 100%; }
.carousel-dots { flex-wrap: wrap; justify-content: center; max-width: min(560px, calc(100vw - 160px)); row-gap: 8px; }
.c-arrow { flex: none; }

/* ---------- CTA ---------- */
.cta-band { border-radius: var(--r-xl); }

/* ---------- Footer ---------- */
.footer { font-size: 15px; }
.footer a { min-height: 32px; display: inline-flex; align-items: center; }
.f-bottom { padding-bottom: 76px; gap: 10px 24px; flex-wrap: wrap; } /* AI tugmasi matnni yopmasin */
.f-contact li { overflow-wrap: anywhere; }

/* ---------- Jadval / kontent o'qilishi ---------- */
.prose p { font-size: 16px; line-height: 1.75; }

/* =========================================================
   MOSLASHUVCHAN (responsive)
   ========================================================= */
@media (max-width: 1024px) {
  .quick-grid, .hn-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-sec .stat:nth-child(3) { border-left: 0; }
  .stats-sec .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 760px) {
  .home-about .ha-card { grid-template-columns: 1fr; }
  .home-about .ha-card .btn { grid-column: 1; grid-row: auto; justify-self: start; }
}
@media (max-width: 640px) {
  :root { --header-h: 66px; }
  .container { padding: 0 16px; }
  .hero-slider { height: auto; min-height: 560px; }
  .h-slide-inner { padding-top: 56px; padding-bottom: 120px; justify-content: center; }
  .s-actions { width: 100%; }
  .s-actions .btn { flex: 1 1 100%; }
  .hero-slider .slider-arrow { display: none; }  /* telefonda nuqtalar + avtomatik almashish yetarli */
  .hero-slider .slider-dots { bottom: 84px; }
  .stats-sec { margin-top: -56px; }
  .stats-sec .stats { grid-template-columns: repeat(2, 1fr); }
  .stats-sec .stat { padding: 22px 12px; }
  .stats-sec .stat:nth-child(odd) { border-left: 0; }
  .quick-grid, .hn-grid { grid-template-columns: 1fr; }
  .quick { padding: 16px 18px; }
  .sec-head--row .btn { width: 100%; }
  .logo img { height: 44px; width: 44px; }
  .topbar #tb-email, .topbar .tb-right { display: none; }
  .carousel-dots { display: none; } /* telefonda strelkalar yetarli */
}

/* Harakatni kamaytirish sozlamasi yoqilgan foydalanuvchilar uchun */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .h-slide.active .h-slide-bg { transform: none; }
}

/* Chop etish */
@media print {
  .topbar, .header, .mobile-nav, .footer, .sc-root, .hero-slider .slider-arrow, .slider-dots, .cta-band { display: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
