/* =========================================================
   TriBee — засварын CSS  (style.css-ийн ХАМГИЙН СҮҮЛД нэмнэ)
   ========================================================= */

/* ---------- 1. Header: мөр таслагдахгүй, багтана ---------- */
.header.wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: nowrap;
  max-width: 100%;
}
.header nav {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}
.header nav a,
.tribee-account,
.tribee-study-shortcuts a {
  white-space: nowrap;           /* "10 асуулттай сорил" 1 мөрөнд */
}

/* ---------- 2. Давхардсан цэс арилгах ---------- */
/* Shortcuts-аас зөвхөн "Түрийвч" үлдээнэ (Хичээл, Лидерборд nav-д байгаа) */
.tribee-study-shortcuts {
  display: flex;
  gap: 16px;
  flex-shrink: 0;
}
.tribee-study-shortcuts a:nth-child(1),
.tribee-study-shortcuts a:nth-child(3) {
  display: none;
}
/* nav доторх хоёр дахь "Хэл сонгох" линк (select байгаа тул илүүц) */
.header nav > a:first-of-type {
  display: none;
}

/* Дунд дэлгэц: багтахгүй бол Community-г нууна */
@media (max-width: 1180px) {
  .header nav { gap: 14px; }
  .header nav a[href*="community" i] { display: none; }
}

/* Хуудас хажуу тийш гүйлгэгдэхгүй */
html, body { overflow-x: clip; }

/* ---------- 3. Утас: цэсийг гүйлгэдэг мөр болгох ---------- */
@media (max-width: 760px) {
  .header.wrap {
    display: flex !important;
    flex-wrap: wrap;
    row-gap: 10px;
    height: auto !important;
    min-height: 0 !important;
  }

  .header nav {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    order: 11;
    flex: 1 1 0;
    min-width: 0;
    height: auto !important;
    max-height: none !important;
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    overflow-x: auto;
    gap: 8px;
    padding: 0 0 4px !important;
    scrollbar-width: none;
  }
  .header nav::-webkit-scrollbar { display: none; }
  .header nav .language-picker { display: none; }

  .header nav a,
  .tribee-study-shortcuts a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    /* Сайтын .button.outline-тай ижил загвар; dark mode-д ч ажиллана */
    border: 1px solid color-mix(in srgb, currentColor 14%, transparent);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
  }
  .header nav a[href*="community" i] { display: inline-flex; }

  .tribee-study-shortcuts {
    order: 10;                    /* "Түрийвч" + гүйлгэдэг цэс нэг мөрөнд */
    width: auto;
    gap: 8px;                     /* "ХичээлТүрийвч..." наалдсаныг засна */
  }
}

/* ---------- 4. Дарах талбай ≥ 44px (утас) ---------- */
@media (max-width: 760px) {
  .language-card a,
  .tribee-account,
  #theme {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

/* ---------- 5. Reveal анимаци хурдан, хоосон харагдахгүй ---------- */
.motion-scroll-reveal {
  transition-duration: .35s !important;
  transition-delay: 0s !important;
}
.motion-scroll-reveal:not(.motion-visible) {
  opacity: .001;
  transform: translateY(12px);
  filter: none !important;        /* blur-ыг арилгана */
}
@media (prefers-reduced-motion: reduce) {
  .motion-scroll-reveal { opacity: 1 !important; transform: none !important; }
}

/* ---------- 6. Урамшууллын хэсгийн илүү зай ---------- */
section.quote.motion-quotes {
  min-height: 0 !important;
  padding-block: 56px !important;
}

/* Home: four languages are always visible, including on narrow screens. */
.header.wrap>nav>.home-language-links{display:flex;align-items:center;gap:8px;flex:none}
.header.wrap>nav>.home-language-links>a{display:inline-flex!important;align-items:center;justify-content:center;min-height:44px;padding:0 12px;border:1px solid color-mix(in srgb,currentColor 16%,transparent);border-radius:999px;text-decoration:none;white-space:nowrap;font-size:13px;font-weight:700}
.header.wrap>nav>.home-language-links>a:hover{background:color-mix(in srgb,currentColor 8%,transparent)}
.header.wrap>nav:has(.home-language-links)>a:first-of-type{display:inline-flex}
@media(max-width:760px){
 .header.wrap>nav:has(.home-language-links){flex:1 0 100%;flex-wrap:wrap!important;overflow:visible;gap:10px}
 .header.wrap>nav>.home-language-links{width:100%;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
 .header.wrap>nav>.home-language-links>a{padding:0 6px;font-size:12px}
}


.price-stack a { position: relative; }
.price-stack span em {
  display: block;
  font-style: normal;
  font-size: 11px;
  opacity: .6;
  margin-top: 2px;
}
.price-stack .save {
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  color: #4f8a3c;
  margin-left: 6px;
  vertical-align: middle;
}
.price-stack .best-tag {
  position: absolute;
  top: -10px;
  right: 40px;
  background: #1c1b22;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 3px 10px;
  border-radius: 999px;
}
[data-theme="dark"] .price-stack .best-tag { background: #fff; color: #1c1b22; }

.tribee-premium #languages .language-portrait.language-flag{height:170px!important;aspect-ratio:auto!important;margin:18px 0 20px!important;background:#fff!important;border:1px solid #dedbe6;border-radius:12px;display:flex;align-items:center;justify-content:center;padding:12px}
.tribee-premium #languages .language-flag img{width:100%;height:100%;object-fit:contain;object-position:center;filter:none!important;transform:none!important}
.tribee-premium #languages .language-flag:after{display:none}

/* ---------- 8. Hero тэмдэглэл, Footer ---------- */
.hero-note {
  margin-top: 14px;
  font-size: 12px;
  opacity: .55;
  text-align: center;
}

.footer.wrap {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding-block: 48px 28px;
  border-top: 1px solid color-mix(in srgb, currentColor 12%, transparent);
}
.footer-brand p { margin-top: 12px; font-size: 13px; line-height: 1.6; }
.footer-brand small { opacity: .6; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h4 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .55;
  margin: 0 0 4px;
}
.footer-col a { font-size: 14px; text-decoration: none; color: inherit; }
.footer-col a[href^="http"], .footer-col a[target] { white-space: nowrap; }
.footer-col a:hover { opacity: .65; }
.footer-bottom {
  grid-column: 1 / -1;
  padding-top: 20px;
  font-size: 12px;
  opacity: .5;
  border-top: 1px solid color-mix(in srgb, currentColor 8%, transparent);
}

@media (max-width: 760px) {
  .footer.wrap { grid-template-columns: 1fr 1fr; gap: 28px 16px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-col a { min-height: 40px; display: flex; align-items: center; }
}

/* Free placement tests and member lesson access */
.access-section{margin:36px auto;padding:32px!important;border:1px solid #cadbd4;border-radius:22px;background:#f2f8f3;color:#173a38;scroll-margin-top:110px}.access-section h2{margin:12px 0;font-size:clamp(24px,3vw,36px)}.access-section p{max-width:780px;line-height:1.7}.access-badge{font-size:12px;font-weight:800;letter-spacing:.08em}.access-links{display:flex;flex-wrap:wrap;gap:12px;margin-top:22px}.member-access{background:#f5f2fc;border-color:#dbd3ec}.membership-detail{display:inline-block;margin-top:20px;color:inherit}.access-links .button{white-space:normal}@media(max-width:600px){.access-section{padding:22px!important}.access-links{display:grid;grid-template-columns:1fr}.access-links .button{justify-content:space-between}}

/* Keep access categories visible independently of scroll animations. */
#free-tests,#free-tests h2,#free-tests .access-links,#member-lessons{opacity:1!important;visibility:visible!important;transform:none!important;clip-path:none!important}#free-tests{border:2px solid #698d77}.header.wrap>nav>a[href="#free-tests"]{display:inline-flex!important;font-weight:800;color:#245f42}.header.wrap>nav:has(.home-language-links){flex-wrap:wrap!important}html[data-theme="dark"] .header.wrap>nav>a[href="#free-tests"]{color:#a7dcb6}
