/* Ma'rifat language pill (manaviyat-style flags) */

/* Hide classic Windows scrollbar arrow buttons; keep a thin modern bar */
html {
  scrollbar-width: thin;
  scrollbar-color: #94a3b8 transparent;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

html::-webkit-scrollbar-button,
body::-webkit-scrollbar-button,
*::-webkit-scrollbar-button {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 9999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
  background: transparent;
}

.site-topbar {
  border-bottom: 0 !important;
  box-shadow: none !important;
  outline: none;
  /* Slimmer than Tailwind py-2 so flags/socials do not fatten the bar */
  padding-top: 0.3rem !important;
  padding-bottom: 0.3rem !important;
}

.site-topbar > .container {
  min-height: 0;
  gap: 0.5rem;
}

.site-topbar .topbar-contact {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  opacity: 0.95;
}

.site-topbar .topbar-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  color: inherit;
  text-decoration: none;
  line-height: 1.2;
  font-size: inherit;
}

.site-topbar .topbar-phone-text {
  white-space: nowrap;
}

/* Contact glyphs: white on blue (not gold/orange) */
.site-topbar .fa-phone-alt,
.site-topbar .fa-envelope {
  color: #ffffff !important;
}

.topbar-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 0;
  flex-shrink: 0;
}

.topbar-socials {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: auto;
}

/* Compact white discs; still readable, not taller than lang pill */
.topbar-social {
  width: 28px;
  height: 28px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 9999px;
  background: #ffffff !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.topbar-social:hover {
  opacity: 1;
  transform: translateY(-1px);
  background: #ffffff !important;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.16);
}

.topbar-social img {
  width: 16px;
  height: 16px;
  display: block;
}

.lang-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 5px;
  border-radius: 9999px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.55);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  line-height: 0;
}

.lang-pill .lang-flag-btn {
  width: 24px;
  height: 24px;
  padding: 0 !important;
  margin: 0;
  border: 1.5px solid transparent !important;
  border-radius: 9999px;
  background: transparent !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.9 !important;
  transition: border-color 0.18s ease, opacity 0.18s ease, transform 0.18s ease;
  box-shadow: none;
  color: inherit !important;
  font-size: 0;
}

.lang-pill .lang-flag-btn img {
  width: 18px;
  height: 18px;
  border-radius: 9999px;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.lang-pill .lang-flag-btn:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.lang-pill .lang-flag-btn.is-active,
.lang-pill .lang-flag-btn[aria-pressed="true"] {
  border-color: #0b3d91 !important;
  opacity: 1 !important;
  box-shadow: none;
  color: inherit !important;
}

/* Do not inherit old gold/gray text styles on flag buttons */
.lang-pill .lang-flag-btn.text-national-gold,
.lang-pill .lang-flag-btn.text-gray-300 {
  color: inherit !important;
  opacity: inherit;
}

#mobile-menu .mnav-langs {
  justify-content: center;
  background: #f8fafc;
  padding: 14px 16px !important;
}

#mobile-menu .mnav-langs .lang-pill {
  margin: 0 auto;
  gap: 8px;
  padding: 6px 12px;
}

#mobile-menu .mnav-langs .lang-flag-btn {
  width: 40px !important;
  height: 40px !important;
  border-width: 2px !important;
}

#mobile-menu .mnav-langs .lang-flag-btn img {
  width: 32px !important;
  height: 32px !important;
}

#mobile-menu .mnav-langs .lang-flag-btn.is-active {
  background: transparent !important;
  color: inherit !important;
  box-shadow: 0 0 0 1px rgba(11, 61, 145, 0.15);
}

/* Kill hairline seams under blue top bar and under dark hero band */
.site-topbar + header {
  border-top: 0 !important;
  margin-top: 0 !important;
}

/* Hero stats overlay (home) */
.hero-static {
  position: relative;
  overflow: hidden;
  border-bottom: 0 !important;
  box-shadow: none !important;
  /* Same blue family as photo overlay so uncovered edges never look black */
  background-color: #0a2f4d;
  margin-bottom: 0;
}

#yangiliklar {
  border-top: 0 !important;
  box-shadow: none !important;
  position: relative;
  z-index: 1;
}

.news-section-head {
  margin-bottom: 2.5rem;
}

.news-section-head h2 {
  margin: 0;
  line-height: 1.15;
}

.hero-static::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  /* Softer, shorter fade so the photo stays visible on large screens */
  height: min(42%, 260px);
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(
    to top,
    rgba(6, 36, 62, 0.82) 0%,
    rgba(6, 36, 62, 0.45) 45%,
    rgba(6, 36, 62, 0.12) 75%,
    rgba(6, 36, 62, 0) 100%
  );
}

.hero-static > .container {
  position: relative;
  z-index: 2;
}

.hero-stats-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(28px, calc(env(safe-area-inset-bottom, 0px) + 20px));
  z-index: 3;
  padding: 0.35rem 1rem 0;
  padding-right: max(1rem, calc(3.5rem + 28px));
  box-sizing: border-box;
  pointer-events: none;
}

.hero-stats-grid {
  max-width: 72rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1rem;
  text-align: center;
  align-items: end;
}

@media (min-width: 768px) {
  .hero-stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
  }
  .hero-stats-overlay {
    padding-right: 1rem;
  }
}

.hero-stat-num {
  font-size: clamp(1.55rem, 3.2vw, 2.15rem);
  font-weight: 800;
  line-height: 1.05;
  color: #f4c542;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
  min-height: 1.15em;
}

.hero-stat-label {
  margin-top: 0.3rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
}

@media (max-width: 640px) {
  .hero-stats-overlay {
    padding-left: 0.6rem;
    padding-right: 0.6rem;
    bottom: max(16px, calc(env(safe-area-inset-bottom, 0px) + 12px));
  }
  .hero-stats-grid {
    gap: 0.55rem 0.45rem;
  }
  .hero-stat-num {
    font-size: 1.25rem;
  }
  .hero-stat-label {
    font-size: 0.52rem;
    letter-spacing: 0.02em;
    margin-top: 0.15rem;
  }

  /* Compact top bar on phones */
  .site-topbar {
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
    font-size: 0.7rem !important;
  }
  .site-topbar > .container {
    padding-left: 0.65rem;
    padding-right: 0.65rem;
  }
  .site-topbar .topbar-phone-text {
    /* Keep one line; hide digits on very narrow via max-width clip if needed */
    max-width: 7.2rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .topbar-right {
    gap: 6px;
  }
  .topbar-social {
    width: 26px;
    height: 26px;
  }
  .topbar-social img {
    width: 14px;
    height: 14px;
  }
  .lang-pill {
    padding: 1px 4px;
    gap: 2px;
  }
  .lang-pill .lang-flag-btn {
    width: 22px;
    height: 22px;
  }
  .lang-pill .lang-flag-btn img {
    width: 16px;
    height: 16px;
  }

  /* Hero title must fit the phone screen */
  .hero-static {
    min-height: auto !important;
    padding-top: 1.75rem !important;
    padding-bottom: 8.5rem !important;
  }
  .hero-static h1,
  .hero-static .hero-title {
    font-size: clamp(1.05rem, 4.6vw, 1.35rem) !important;
    line-height: 1.28 !important;
    margin-bottom: 0.75rem !important;
  }
  .hero-static .hero-badge,
  .hero-static [data-key="hero_badge"] {
    margin-bottom: 0.75rem !important;
    font-size: 0.65rem !important;
    padding: 0.2rem 0.7rem !important;
  }
}

@media (max-width: 380px) {
  .site-topbar .topbar-phone-text {
    display: none;
  }
}

/* kill-hero-white-seam */
.hero-static {
  border-bottom: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  margin-bottom: 0 !important;
}
.hero-static::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 3px;
  background: #0a2f4d;
  z-index: 8;
  pointer-events: none;
}
.hero-static + #yangiliklar,
.hero-static + section {
  border-top: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  margin-top: -2px !important;
}
