/* ====================================================================
   HERO V3 — Bosh sahifa 5-ustun collage hero (qulaymakon.uz)
   Light theme, brand: #082C66 + accent #2563EB.

   Final layout:
     - Title: 2 qator, 2 ranglarda (markazga)
     - Collage: 5 ustun (1-1-1.4-1-1) — 7 karta
     - Badge: collage chap-yuqori burchagida vertikal dekoratsiya
     - Mobile (≤850px): faqat center_main karta ko'rinadi

   Eski .hero-v2-* sinflar olib tashlandi (template'da ham yo'q).
==================================================================== */

.hero-v3 {
  background: #fafbfc;
  padding: 16px 0 32px;
  overflow: hidden;
}

.hero-v3-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Title (2 qator, bitta qora rang — v4) ---------- */
.hero-v3-title {
  text-align: center;
  font-size: clamp(28px, 3.6vw, 52px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.8px;
  margin: 0 0 28px;
  display: block;
  color: #0a0a0a;
}

.hero-v3-title .title-line-1,
.hero-v3-title .title-line-2 {
  display: block;
  width: 100%;
  color: inherit;
}

.hero-v3-title .title-line-1 {
  margin-bottom: 6px;
}

.hero-v3-title .title-line-2 {
  font-weight: 700;
}

/* Legacy v3 class'lar — agar template biroz keyinroq tozalansa ham qora ko'rinadi */
.hero-v3-title .title-main,
.hero-v3-title .title-accent {
  display: block;
  width: 100%;
  color: #0a0a0a !important;
}

/* ---------- Collage wrapper (TO'LIQ EKRAN — chetlarga yopishadi) ---------- */
.hero-v3-collage-wrapper {
  width: 100%;
  padding: 0;
}

/* v4 badge — faqat matn, hech qanday dekoratsiya.
   Col 1 ichida ABSOLUTE — kartani siljitmaydi, faqat ustida turadi */
.hero-v4-badge {
  position: absolute;
  bottom: calc(100% + 12px);  /* karta ustida, 12px bo'shliq */
  left: -20px;
  right: -20px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #0a0a0a;
  line-height: 1.35;
  text-align: center;
  padding: 0 4px;
  margin: 0;
  word-wrap: break-word;
  hyphens: auto;
}

/* Mobile-only duplicate — desktop'da yashirin */
.hero-v4-badge--mobile {
  display: none;
}

/* Collage 5 ustun — Deep^style asimmetrik joylashuv (hero-collage_4.html) */
/* max-width 1200px (1100 + 50 chap + 50 o'ng) */
.hero-v3-collage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px 16px;
  margin: 0 auto;
  max-width: 1200px;
  width: 100%;
  box-sizing: border-box;
}

.collage-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
  position: relative;  /* badge absolute positioning uchun */
}

/* Ustunlar orasidagi masofa bir xil — chekka qo'shimcha margin'lar olib tashlandi */

/* Karta o'lchamlari (hero-collage_4.html ga mos)
   Chekkadagi col-1 va col-5 — tepaga 10px + pastga 10px (+20px height) */
/* Karta o'lchamlari — recommended upload sizes bilan AYNI mos:
   - chekka (col-1, col-5): 800×1200 → 180×270 (2:3 portret)
   - inner (col-2, col-4): 600×500 → 240×200 (6:5 gorizontal)
   - markaziy (col-3): 800×1200 → 270×405 (2:3 portret) ★ */
.col-left-outer  .card { width: 180px; height: 270px; }
.col-left-double .card:first-child { width: 240px; height: 200px; } /* left_top */
.col-left-double .card:last-child  { width: 240px; height: 200px; } /* left_bottom */
.col-main        .card { width: 270px; height: 405px; }
.col-right-double .card:first-child { width: 240px; height: 200px; } /* right_top */
.col-right-double .card:last-child  { width: 240px; height: 200px; } /* right_bottom */
.col-right-outer .card { width: 180px; height: 270px; }

/* Safeguard — rasm yuklanmagan bo'lsa ham ustunlar to'g'ri kenglik saqlasin
   (admin'da hali rasm yuklamagan bo'lsa, badge nozik ustunda vertikal yozilmasin) */
.col-left-outer,
.col-right-outer { min-width: 180px; }
.col-left-double { min-width: 220px; }
.col-right-double { min-width: 200px; }
.col-main { min-width: 270px; }

/* ====================================================================
   ENTRY ANIMATION — sahifaga endi kirganda kartalar pastdan ko'tarilib
   fade-in qiladi (har ustun navbat bilan, stagger)
==================================================================== */
@keyframes cardEnter {
  0% {
    opacity: 0;
    transform: translateY(40px) scale(0.96);
    filter: blur(6px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes badgeEnter {
  0%   { opacity: 0; transform: translateY(-12px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Default: animatsiya yoqilgan — jami tugash vaqti 1.00s */
.hero-v3-collage .card {
  animation: cardEnter 0.52s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hero-v3-collage .hero-v4-badge {
  animation: badgeEnter 0.4s ease-out 0.6s both;
}

/* Stagger — har ustun 0.08s farq bilan, oxirgisi 0.48s + 0.52s = 1.00s da tugaydi */
.col-left-outer  .card { animation-delay: 0s; }
.col-left-double .card:first-child { animation-delay: 0.08s; }
.col-left-double .card:last-child  { animation-delay: 0.16s; }
.col-main        .card { animation-delay: 0.24s; }
.col-right-double .card:first-child { animation-delay: 0.32s; }
.col-right-double .card:last-child  { animation-delay: 0.40s; }
.col-right-outer .card { animation-delay: 0.48s; }

/* Reduce motion — animatsiyani o'chirish */
@media (prefers-reduced-motion: reduce) {
  .hero-v3-collage .card,
  .hero-v3-collage .hero-v4-badge {
    animation: none !important;
  }
}

/* Karta umumiy stillar */
.card {
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  display: block;             /* block layout — img height: 100% to'g'ri ishlaydi */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(8, 44, 102, 0.12);
}

.card a {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;          /* karta to'liq to'ldiriladi, bo'sh joy yo'q */
  object-position: center;
  display: block;
}

.card-label {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255, 255, 255, 0.95);
  color: #082C66;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.collage-empty {
  border: 2px dashed #d1d5db;
  background: transparent !important;
  color: #6b7280;
  font-size: 14px;
  text-align: center;
  padding: 16px;
}

/* ====================================================================
   HERO V3 — CTA tugmalar (collage tagida, markazga)
==================================================================== */
.hero-v3-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 36px 24px 8px;
}

.btn-v3-primary,
.btn-v3-secondary {
  padding: 14px 32px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: transform .2s, background .2s, color .2s, box-shadow .2s;
  border: 1.5px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  min-width: 180px;
}

.btn-v3-primary {
  background: #023E8A;
  color: #fff;
}
.btn-v3-primary:hover {
  background: #03306E;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(2, 62, 138, 0.25);
}

.btn-v3-secondary {
  background: #fff;
  color: #023E8A;
  border-color: #023E8A;
}
.btn-v3-secondary:hover {
  background: #f3f4f6;
  transform: translateY(-1px);
}

/* ====================================================================
   RAQAMLARDA — stats bo'limi (hero va hamkorlar orasida) — IXCHAM
==================================================================== */
.stats-section {
  padding: 36px 0 40px;
  background: #fafbfc;
}

.stats-section__title {
  font-size: clamp(18px, 1.8vw, 24px);
  font-weight: 800;
  color: #082C66;
  text-align: center;
  margin: 0 0 22px;
  letter-spacing: -0.4px;
}

.stats-section__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.stats-section__card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 12px 14px;
  text-align: center;
}

.stats-section__value {
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 900;
  color: #082C66;
  line-height: 1;
  letter-spacing: -1px;
  margin-bottom: 6px;
}

.stats-section__label {
  font-size: clamp(12px, 0.9vw, 13px);
  color: #4b5563;
  font-weight: 500;
  line-height: 1.35;
}

@media (max-width: 640px) {
  .stats-section {
    padding: 24px 0 32px;
  }
  .stats-section__title {
    margin-bottom: 14px;
  }
  .stats-section__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 0 12px;
  }
  .stats-section__card {
    padding: 8px 4px;
  }
  .stats-section__value {
    font-size: 18px;
    margin-bottom: 4px;
  }
  .stats-section__label {
    font-size: 11px;
  }
}

/* ====================================================================
   B2B PARTNERS — borderless variant (eski .partner-card override)
==================================================================== */
.partners {
  background: #fff;
}

.partners .partner-card,
.partners .partner-card:hover {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

.partners .partner-card--image img {
  filter: grayscale(20%);
  opacity: 0.85;
  transition: filter 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}

.partners .partner-card--image:hover img {
  filter: grayscale(0%);
  opacity: 1;
  transform: translateY(-2px);
}

/* ====================================================================
   RESPONSIVE
==================================================================== */

/* Tablet (1101-1280px) — biroz qisqartirish */
@media (max-width: 1280px) and (min-width: 1101px) {
  .hero-v3-collage { gap: 14px; }
}

/* Mobile + Tablet (≤1100px) — SLIDESHOW (kartalar avtomatik almashinadi) */
@media (max-width: 1100px) {
  .hero-v3 {
    padding: 12px 0 32px;
    text-align: center;
  }
  .hero-v3 > * {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-v3-container {
    width: 100%;
    margin: 0 auto;
  }

  .hero-v3-title {
    font-size: clamp(24px, 5.5vw, 38px);
    letter-spacing: -0.5px;
    margin-bottom: 20px;
  }

  /* Col 1/5 ichidagi badge yashirin (chunki col-single yashirin bo'ladi) */
  .col-single .hero-v4-badge {
    display: none;
  }

  /* Mobile-only badge — markaziy karta ustida ko'rinadi */
  .hero-v4-badge--mobile {
    display: block;
    text-align: center;
    max-width: 320px;
    margin: 0 auto 16px;
  }

  /* Wrapper — flex centering bilan markazga to'g'rilangan */
  .hero-v3-collage-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 0 16px;
    box-sizing: border-box;
  }

  /* Collage — flex item, max-width bilan ortiqcha cho'zilmaydi */
  .hero-v3-collage {
    flex: 0 1 360px;
    width: 100%;
    max-width: 360px;
    padding: 0;
    margin: 0;
    gap: 0;
    transform: none;
    position: relative;
    aspect-ratio: 3/4;
    height: auto;
    display: block;
  }

  /* Barcha ustunlar bir joyda stack */
  .hero-v3-collage .collage-col {
    position: absolute;
    inset: 0;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0;
    gap: 0;
  }

  /* Mobile'da cardEnter animatsiyasini o'chirish — slideshow uchun */
  .hero-v3-collage .card,
  .hero-v3-collage .hero-v4-badge {
    animation: none !important;
  }

  /* Slideshow kartalar — chiroyli animatsiya (cardEnter ga o'xshash) */
  .hero-v3-collage .card {
    width: 100% !important;
    height: 100% !important;
    max-width: 360px;
    position: absolute !important;
    inset: 0 !important;
    margin: 0;
    border-radius: 16px;
    opacity: 0 !important;
    transform: translateY(40px) scale(0.96) !important;
    filter: blur(6px);
    transition:
      opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
      transform 0.9s cubic-bezier(0.22, 1, 0.36, 1),
      filter 0.9s cubic-bezier(0.22, 1, 0.36, 1) !important;
    pointer-events: none;
    will-change: transform, opacity, filter;
  }

  .hero-v3-collage .card.is-active {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
    filter: blur(0);
    pointer-events: auto;
    z-index: 2;
    box-shadow: 0 18px 40px rgba(8, 44, 102, 0.16), 0 6px 12px rgba(0, 0, 0, 0.06);
  }

  /* Double col'da 2 ta karta — birgaligini buzish, har biri alohida slide */
  .hero-v3-collage .col-double .card:first-child,
  .hero-v3-collage .col-double .card:last-child {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
  }

  /* CTA — mobile'da vertikal va to'la kenglik */
  .hero-v3-cta {
    flex-direction: column;
    max-width: 320px;
    margin: 0 auto;
    padding: 24px 16px 4px;
  }

  .btn-v3-primary,
  .btn-v3-secondary {
    width: 100%;
  }
}

/* Kichik mobile (≤480px) */
@media (max-width: 480px) {
  .hero-v3-title {
    font-size: clamp(22px, 6.5vw, 32px);
  }

  .hero-v3-collage {
    max-width: 100%;
  }

  .col-main .card {
    aspect-ratio: 1 / 1;
    border-radius: 14px;
  }

  .hero-v4-badge--mobile {
    font-size: 10px;
    letter-spacing: 1.1px;
  }
}
