/*
 * Global typography controlled by admin settings.
 * Values are emitted safely by includes/header.php from a fixed allow-list.
 */
:root {
  --site-font-family: "Vazirmatn", Tahoma, Arial, sans-serif;
  --site-font-size: 14px;
  --site-brand-green: #0F5C44;
  --site-brand-green-deep: #0A1F18;
  --site-brand-gold: #C9A227;
  --site-brand-gold-soft: #E8D48B;
  --site-surface: #F7F5F1;
  --site-text: #29251F;
}

html, body {
  font-family: var(--site-font-family) !important;
  font-size: var(--site-font-size) !important;
}

/* Override Bootstrap rules and page-level inline font sizes for textual elements. */
body :is(
  p, span, a, li, td, th, label, small, strong, em, b, div, button,
  input, select, textarea, blockquote, figcaption, summary, dd, dt, legend,
  .btn, .badge, .form-control, .form-select, .form-text, .nav-link,
  .dropdown-item, .course-title, .course-category, .course-meta,
  .meta-chip, .pdf-toolbar
) {
  font-family: var(--site-font-family) !important;
  font-size: var(--site-font-size) !important;
}

/* Keep a readable heading hierarchy relative to the selected base size. */
body :is(h1, .h1) { font-family: var(--site-font-family) !important; font-size: calc(var(--site-font-size) * 1.8) !important; }
body :is(h2, .h2) { font-family: var(--site-font-family) !important; font-size: calc(var(--site-font-size) * 1.55) !important; }
body :is(h3, .h3) { font-family: var(--site-font-family) !important; font-size: calc(var(--site-font-size) * 1.35) !important; }
body :is(h4, .h4) { font-family: var(--site-font-family) !important; font-size: calc(var(--site-font-size) * 1.2) !important; }
body :is(h5, .h5) { font-family: var(--site-font-family) !important; font-size: calc(var(--site-font-size) * 1.1) !important; }
body :is(h6, .h6) { font-family: var(--site-font-family) !important; font-size: var(--site-font-size) !important; }
body :is(h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6) * {
  font-family: inherit !important;
  font-size: inherit !important;
}

/* Keep Bootstrap Icons and KaTeX glyphs using their own font files. */
body .bi,
body [class^="bi-"],
body [class*=" bi-"] {
  font-family: "bootstrap-icons" !important;
  font-size: inherit !important;
}
body .katex,
body .katex * {
  font-family: KaTeX_Main, KaTeX_Math, serif !important;
}

/* Form controls should follow the selected font as well. */
body input, body select, body textarea, body button {
  line-height: 1.5;
}


/* Hero typography: dark, legible gold across course, article, news, product and other detail pages. */
body :is(.course-hero,.article-hero,.news-hero,.product-hero,.page-hero,.hero,.detail-hero) :is(h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6) {
  color: #C9A227 !important;
}
body :is(.course-hero,.article-hero,.news-hero,.product-hero,.page-hero,.hero,.detail-hero) :is(p,.subtitle,.hero-subtitle,.lead) {
  color: #E8D48B !important;
}
body :is(.course-hero,.article-hero,.news-hero,.product-hero,.page-hero,.hero,.detail-hero) a:not(.btn) {
  color: #E8D48B !important;
}
body :is(.course-hero,.article-hero,.news-hero,.product-hero,.page-hero,.hero,.detail-hero) img,
body img:not(.el-logo-img):not(.avatar):not(.user-avatar):not(.icon-img) {
  border-radius: 16px !important;
}
body :is(.course-card,.article-card,.news-card,.product-card,.course-hero,.article-hero,.news-hero,.product-hero) {
  overflow: hidden;
}
body :is(.course-card,.article-card,.news-card,.product-card) img {
  display: block;
  max-width: 100%;
  object-fit: cover;
}


/* Jewelry-academy brand polish across homepage and detail pages. */
body :is(.el-hero,.hero,.course-hero,.article-hero,.news-hero,.news-detail-hero,.product-hero,.detail-hero,.page-hero) :is(h1,h2,h3,h4,h5,h6,p,span,li,strong,small,.lead,.subtitle,.hero-kicker,.eyebrow,.el-eyebrow,.el-checks,.hero-badge,.el-hero-subtitle) {
  color: #C9A227 !important;
  -webkit-text-fill-color: #C9A227 !important;
  opacity: 1 !important;
  text-shadow: none !important;
}
body :is(.el-hero,.hero,.course-hero,.article-hero,.news-hero,.news-detail-hero,.product-hero,.detail-hero,.page-hero) :is(h1,h2,h3,h4,h5,h6) {
  background: none !important;
  background-image: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  filter: none !important;
}
body :is(.el-hero,.hero,.course-hero,.article-hero,.news-hero,.news-detail-hero,.product-hero,.detail-hero,.page-hero) :is(a:not(.btn), .link) {
  color: #C9A227 !important;
  -webkit-text-fill-color: #C9A227 !important;
}
body img:not(.no-rounded):not(.avatar):not(.user-avatar):not(.icon-img) {
  border-radius: 16px !important;
}
body :is(.course-card,.article-card,.news-card,.product-card,.el-course,.pdp-shell,.pdp-gallery,.pdp-main-image,.pdp-related) {
  overflow: hidden;
  border-radius: 16px;
}
body :is(.course-card,.article-card,.news-card,.product-card,.el-course,.pdp-shell,.pdp-gallery,.pdp-main-image,.pdp-related) img {
  display: block;
  max-width: 100%;
  object-fit: cover;
}

/* Detail-page title areas not using a shared hero wrapper. */
body .news-detail-title,
body .pdp-info h1,
body .pdp-info .product-title {
  color: #C9A227 !important;
  -webkit-text-fill-color: #C9A227 !important;
}
body .pdp-main-image,
body .pdp-gallery,
body .pdp-lightbox img,
body .pdp-related img {
  border-radius: 18px !important;
  overflow: hidden;
}


/* Global image rounding: clip the bitmap itself and its common crop containers. */
body img:not(.no-rounded):not(.el-logo-img):not(.avatar):not(.user-avatar):not(.icon-img):not(.bi) {
  border-radius: 18px !important;
  clip-path: inset(0 round 18px);
}
body :is(.course-thumb,.course-image,.course-card,.course-cover,.course-thumbnail,
  .lesson-thumbnail,.article-card,.news-card,.product-card,.preview,.thumb,
  .productimage,.pdp-main-image,.pdp-gallery,.pdp-related,.el-course,.course-item,
  .lesson-card,.article-thumb,.news-thumb) {
  overflow: hidden !important;
  border-radius: 18px !important;
}
body :is(.course-thumb,.course-image,.course-card,.course-cover,.course-thumbnail,
  .lesson-thumbnail,.article-card,.news-card,.product-card,.preview,.thumb,
  .productimage,.pdp-main-image,.pdp-gallery,.pdp-related,.el-course,.course-item,
  .lesson-card,.article-thumb,.news-thumb) img {
  border-radius: 18px !important;
  clip-path: inset(0 round 18px);
}

/* Shared emerald-and-gold module controls and headings. */
body :is(.top,.pdp-topbar) { background: var(--site-brand-green-deep,#0A1F18) !important; border-bottom-color: var(--site-brand-gold,#C9A227) !important; }
body :is(.hero) { border-color: #C9A22755; }
body :is(.filters button,.pdp-buy-button,.details,.tabs a,.button,.btn) { border-color: var(--site-brand-gold,#C9A227) !important; }
body :is(.filters button,.pdp-buy-button,.button) { background: var(--site-brand-green,#0F5C44) !important; color: #fff !important; }
body :is(.pdp-info h1,.pdp-info .product-title) { color: var(--site-brand-gold,#C9A227) !important; -webkit-text-fill-color: var(--site-brand-gold,#C9A227) !important; }
body :is(.pdp-related-head h2,.cardbody h2 a,.pdp-price,.pdp-category) { color: var(--site-brand-green,#0F5C44) !important; -webkit-text-fill-color: var(--site-brand-green,#0F5C44) !important; }
body .wrap .hero { background: radial-gradient(circle at 80% 15%,#315D49 0,var(--site-brand-green-deep,#0A1F18) 58%,#171D18 100%) !important; border: 1px solid #C9A22755; }
