/* ============================================================
   MNG Global: inner-page layer
   Loaded last on every page except the homepage, so it wins over
   each page's own <style> block. Brings the homepage "sticker"
   language (tilted notes, tape, dashed chips, square corners)
   to shared components.
   ============================================================ */

:root {
  --note-yellow: #FFE58A;
  --note-blue: #DCE7FF;
  --sticker: #FFC845;
}

/* ── Page header ─────────────────────────────────────────── */
.page-hero {
  position: relative;
  overflow: hidden;
  padding: 8.5rem 0 3.75rem;
  background: linear-gradient(180deg, #EEF4FF 0%, #F8FAFF 100%);
  text-align: center;
}

/* Dotted board, fading out towards the edges */
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--gray-300) 1.2px, transparent 1.2px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 70% 90% at 50% 40%, #000 0%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 90% at 50% 40%, #000 0%, transparent 75%);
  opacity: 0.55;
}

.page-hero .container {
  position: relative;
}

.page-hero h1 {
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--navy);
  max-width: 900px;
  margin: 0 auto 0.9rem;
  text-wrap: balance;
}

/* Hand-drawn yellow underline, same as the homepage headline */
.page-hero h1::after {
  content: '';
  display: block;
  width: 150px;
  height: 14px;
  margin: 0.7rem auto 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20' preserveAspectRatio='none'%3E%3Cpath d='M2 14 C 50 4, 120 4, 198 12' stroke='%23F59E0B' stroke-width='6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}

.page-hero p {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--gray-600);
  max-width: 640px;
  margin: 0 auto;
}

.breadcrumb-nav {
  margin-top: 1.4rem;
  gap: 0.5rem;
  font-size: 0.82rem;
}

.breadcrumb-nav a {
  font-weight: 700;
}

.breadcrumb-nav span {
  color: var(--gray-500);
}

/* ── Buttons: square sticker depth instead of pills ─────── */
.btn-primary,
.btn.btn-primary {
  border-radius: 4px;
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  box-shadow: 0 6px 0 -2px var(--navy);
}

.btn-primary:hover,
.btn.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 9px 0 -2px var(--navy);
}

/* Contact button in the nav stays visible on the contact page (bug B4) */
.nav-links a.cta-btn.active,
.nav-bar.scrolled .nav-links a.cta-btn.active {
  background: var(--primary);
  color: var(--white) !important;
}

/* ── Section titles on inner pages ───────────────────────── */
.section-title,
.section-header h2 {
  letter-spacing: -0.03em;
}

/* ── "Холбоотой мэдээлэл" related links: tilted dashed stickers ── */
.related-links h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
}

.related-grid {
  gap: 1.5rem;
}

.related-card {
  border: 2px dashed var(--gray-300);
  border-radius: 6px;
  background: var(--white);
  box-shadow: none;
  padding: 1.4rem 1.5rem;
  rotate: -0.8deg;
  transition: rotate 0.25s var(--ease-spring), translate 0.25s var(--ease-spring), border-color 0.25s var(--ease);
}

.related-card:nth-child(2) {
  rotate: 0.8deg;
  border-color: #93B4FF;
}

.related-card:nth-child(3) {
  rotate: -0.4deg;
  border-color: #F6C453;
}

.related-card:hover {
  rotate: 0deg;
  translate: 0 -3px;
  transform: none;
  box-shadow: none;
  border-color: var(--primary);
}

.related-card h3 {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  color: var(--navy);
}

/* ── FAQ / accordions ────────────────────────────────────── */
.faq-item {
  border: 2px solid var(--gray-200);
  border-radius: 6px;
  box-shadow: none;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.faq-item:hover {
  border-color: var(--gray-300);
  box-shadow: none;
}

.faq-item.open {
  border-color: var(--primary);
  box-shadow: 6px 6px 0 var(--note-blue);
}

.faq-q {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
}

.faq-q .icon {
  color: var(--primary);
}

/* ── Benefits lists: CSS ticks instead of icon bullets; text no longer splits into columns (B10) ── */
.benefits-list li {
  display: block;
  position: relative;
  padding-left: 1.9rem;
}

.benefits-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.3rem;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 3px;
  background: var(--sticker);
  rotate: -6deg;
}

.benefits-list li::after {
  content: '';
  position: absolute;
  left: 0.33rem;
  top: 0.45rem;
  width: 0.35rem;
  height: 0.6rem;
  border: solid var(--navy);
  border-width: 0 2.5px 2.5px 0;
  rotate: 40deg;
}

.benefits-card {
  border: 2px dashed var(--gray-300);
  border-radius: 6px;
}

/* ── Schools filter bar: sticker tabs ────────────────────── */
.country-tab-btn,
.tag-pill-btn {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
}

.country-tab-btn.active,
.country-tab-btn:hover {
  background: var(--sticker);
  color: var(--navy);
  border-color: var(--sticker);
  rotate: -2deg;
  box-shadow: 0 5px 0 -1px var(--navy);
}

.tag-pill-btn.active,
.tag-pill-btn:hover {
  background: var(--white);
  color: var(--navy);
  border: 2px dashed var(--primary);
}

.school-chip {
  background: var(--white);
  border: 1.5px dashed #93B4FF;
  color: var(--navy);
  font-weight: 700;
}

.school-card-stats b {
  font-weight: 800;
  color: var(--navy);
}

.school-card-badge {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  rotate: -2deg;
}

/* ── Notes: info / warning / leader boxes become taped notes ── */
.leader-box,
.warn-box,
.info-highlight {
  position: relative;
  border: 0;
  border-radius: 3px;
  padding: 1.4rem 1.5rem 1.2rem;
  margin-top: 1.75rem;
  box-shadow: 0 12px 20px -14px rgba(27, 42, 74, 0.4);
  rotate: -0.6deg;
}

.leader-box::before,
.warn-box::before,
.info-highlight::before {
  content: '';
  position: absolute;
  top: -11px;
  left: 50%;
  width: 90px;
  height: 22px;
  margin-left: -45px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(27, 42, 74, 0.08);
  rotate: -3deg;
}

.leader-box,
.warn-box {
  background: var(--note-yellow);
}

.info-highlight {
  background: var(--note-blue);
}

.leader-box p,
.warn-box p,
.info-highlight p {
  color: var(--navy);
}

/* ── Navy highlight banners (Work / Skills) ─────────────── */
.highlight-box {
  background: var(--navy);
  border-radius: 18px;
}

/* ── Detail cards and requirement tiles ─────────────────── */
.detail-card {
  border-radius: 14px;
}

.req-item {
  background: var(--white);
  border: 2px dashed var(--gray-300);
  border-radius: 6px;
}

.req-item:nth-child(2n) {
  border-color: #93B4FF;
}

/* Numbered steps: square yellow stickers instead of pale circles */
.step-list li::before {
  border-radius: 4px;
  background: var(--sticker);
  color: var(--navy);
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  rotate: -4deg;
  box-shadow: 0 4px 0 -1px var(--navy);
}

.step-list li:nth-child(2n)::before {
  background: var(--note-blue);
  rotate: 3deg;
}

/* Skills page */
.type-card {
  background: var(--white);
  border: 2px dashed var(--gray-300);
  border-radius: 6px;
}

.type-card:nth-child(2) {
  border-color: #93B4FF;
}

.type-card .badge {
  border-radius: 3px;
  background: var(--sticker);
  color: var(--navy);
  rotate: -2deg;
}

.sector-item {
  border-radius: 8px;
}

/* ── About page ─────────────────────────────────────────── */
.story-card {
  border-radius: 14px;
}

.timeline-year {
  border-radius: 3px;
  background: var(--sticker);
  color: var(--navy);
  rotate: -3deg;
  box-shadow: 0 4px 0 -1px var(--navy);
}

.about-stat {
  border: 0;
  border-radius: 3px;
  background: var(--note-yellow);
  rotate: -1.5deg;
  box-shadow: 0 14px 24px -14px rgba(27, 42, 74, 0.35);
}

.about-stat:nth-child(2) {
  background: var(--note-blue);
  rotate: 1.2deg;
}

.about-stat:nth-child(3) {
  background: var(--white);
  border: 1px solid var(--gray-200);
  rotate: -0.6deg;
}

.about-stat:nth-child(4) {
  background: var(--note-yellow);
  rotate: 1deg;
}

.about-stat h3 {
  font-family: 'Manrope', sans-serif;
  color: var(--primary);
}

.about-stat:nth-child(2) h3,
.about-stat:nth-child(4) h3 {
  color: var(--navy);
}

.country-card {
  border: 2px dashed var(--gray-300);
  border-radius: 6px;
  rotate: -0.8deg;
}

.country-card:nth-child(2) {
  border-color: #93B4FF;
  rotate: 0.8deg;
}

.country-card:nth-child(3) {
  border-color: #F6C453;
  rotate: -0.4deg;
}

.country-card:hover {
  rotate: 0deg;
}

/* ── Team page: sticky notes with initials ───────────────── */
.team-card {
  position: relative;
  border: 0;
  border-radius: 3px;
  background: var(--note-yellow);
  rotate: -1.5deg;
  box-shadow: 0 14px 24px -14px rgba(27, 42, 74, 0.35);
}

.team-card:nth-child(2) {
  background: var(--note-blue);
  rotate: 1.2deg;
}

.team-card:nth-child(3) {
  background: var(--white);
  border: 1px solid var(--gray-200);
  rotate: -0.6deg;
}

.team-card::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 50%;
  width: 100px;
  height: 24px;
  margin-left: -50px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(27, 42, 74, 0.08);
  rotate: -3deg;
}

.team-card:hover {
  transform: none;
  rotate: 0deg;
}

.team-avatar {
  border-radius: 6px;
  background: var(--navy);
  color: var(--white);
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 1.6rem;
  rotate: -4deg;
}

.team-card .role {
  display: inline-block;
  background: var(--white);
  border: 1.5px dashed var(--primary);
  border-radius: 3px;
  padding: 0.2rem 0.6rem;
}

/* ── Courses page: flag becomes a small stamp on a note-colored header ── */
.course-card {
  border: 1px solid var(--gray-200);
  border-radius: 12px;
}

.course-card:hover {
  transform: translateY(-3px);
}

.course-head {
  min-height: auto;
  text-align: left;
  padding: 1.6rem 5rem 1.6rem 1.6rem;
  background-color: var(--note-yellow);
  background-size: 46px 31px;
  background-position: right 1.4rem center;
  background-repeat: no-repeat;
  color: var(--navy);
}

.course-card:nth-child(2) .course-head {
  background-color: var(--note-blue);
}

.course-card:nth-child(3) .course-head {
  background-color: var(--white);
  border-bottom: 1px dashed var(--gray-300);
}

.course-head::after {
  display: none;
}

.course-head h3 {
  color: var(--navy);
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
}

/* ── Contact page ────────────────────────────────────────── */
.contact-info-card {
  border: 2px dashed var(--gray-300);
  border-radius: 6px;
  box-shadow: none;
  padding: 1.1rem 1.3rem;
}

.contact-info-card:nth-child(2n) {
  border-color: #93B4FF;
}

.contact-info-card:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--primary);
}

.contact-info-card h3 {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-bottom: 0.3rem;
}

.contact-info-card p,
.contact-info-card a {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  color: var(--navy);
  font-size: 1rem;
}

.contact-form {
  border-radius: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
  border-radius: 4px;
  border-width: 2px;
}

.form-success.form-error {
  background: #FEF2F2;
  color: #991B1B;
  border-color: #FCA5A5;
}

.form-success.form-error a {
  color: inherit;
  font-weight: 800;
}

.contact-map {
  border-radius: 14px;
}

/* ── News list ───────────────────────────────────────────── */
.filter-btn {
  border-radius: 4px;
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  border: 2px dashed var(--gray-300);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--sticker);
  color: var(--navy);
  border: 2px solid var(--sticker);
  rotate: -2deg;
  box-shadow: 0 5px 0 -1px var(--navy);
}

.badge {
  border-radius: 3px;
}

.featured-card {
  box-shadow: 10px 10px 0 var(--note-blue);
  border: 1px solid var(--gray-200);
}

.featured-card:hover {
  transform: translateY(-3px);
  box-shadow: 13px 13px 0 var(--note-blue);
}

.read-more-btn {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  border-bottom: 2px solid currentColor;
}

/* ── Article page: the dark contact box heading was invisible (bug B2) ── */
.contact-card h3 {
  color: var(--white);
}

.back-link {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
}

/* ── 404 ─────────────────────────────────────────────────── */
.error-code {
  font-family: 'Manrope', sans-serif;
}

@media (max-width: 768px) {
  .page-hero {
    padding: 7rem 0 2.75rem;
  }

  .page-hero h1 {
    font-size: 1.9rem;
  }

  .course-head {
    padding-right: 4.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .related-card,
  .faq-item {
    transition: none;
  }
}
