/* Scoped styles: no changes to the surrounding WordPress or Elementor theme. */
.ka-academy {
  --ka-gold: #bf9852;
  --ka-gold-2: #e1bc73;
  --ka-bg: #151515;
  --ka-card: #1c1c1d;
  --ka-card-2: #222224;
  --ka-stroke: #35302a;
  --ka-white: #f8f5ef;
  --ka-muted: #b1acaa;
  width: 100%; max-width: 1210px; margin: 0 auto; padding: 56px 22px 70px;
  color: var(--ka-white); font-family: inherit; font-size: 15px; line-height: 1.75;
  box-sizing: border-box; isolation: isolate;
}
.ka-academy *, .ka-academy *::before, .ka-academy *::after { box-sizing: border-box; }
.ka-academy a { text-decoration: none; color: inherit; }
.ka-academy button, .ka-academy input { font: inherit; }
.ka-academy [hidden] { display: none !important; }
.ka-sr-only { border:0; clip:rect(0,0,0,0); height:1px; margin:-1px; overflow:hidden; padding:0; position:absolute; white-space:nowrap; width:1px; }
.ka-section-head { display:flex; align-items:end; justify-content:space-between; gap:24px; margin-bottom:25px; }
.ka-eyebrow { color:var(--ka-gold-2); font-size:12px; font-weight:700; letter-spacing:.01em; display:inline-flex; align-items:center; gap:8px; }
.ka-eyebrow-dot { width:7px; height:7px; border-radius:100%; background:var(--ka-gold); box-shadow:0 0 0 4px rgba(191,152,82,.13); }
.ka-section-title { color:var(--ka-white) !important; font-size:clamp(23px,2.75vw,33px) !important; line-height:1.45 !important; font-weight:800 !important; margin:11px 0 7px !important; }
.ka-section-desc { color:var(--ka-muted) !important; font-size:14px !important; margin:0 !important; }
.ka-count { padding:9px 15px; background:rgba(191,152,82,.08); border:1px solid rgba(191,152,82,.27); color:#d8c09b; border-radius:100px; flex:0 0 auto; font-size:12px; white-space:nowrap; }
.ka-count strong { font-weight:800; color:var(--ka-gold-2); margin-inline-end:5px; }
.ka-filters { display:flex; align-items:center; flex-wrap:wrap; gap:9px; margin:0 0 22px; }
.ka-filter { padding:7px 17px !important; border:1px solid #383431 !important; border-radius:30px !important; background:#202021 !important; color:#bcb7b3 !important; font-size:12px !important; font-weight:600 !important; line-height:1.8 !important; cursor:pointer; transition:background .2s,border-color .2s,color .2s; }
.ka-filter:hover, .ka-filter:focus-visible { border-color:var(--ka-gold) !important; color:var(--ka-gold-2) !important; }
.ka-filter.is-active { background:var(--ka-gold) !important; border-color:var(--ka-gold) !important; color:#18140e !important; }
.ka-search { display:block; max-width:500px; margin-bottom:20px; }
.ka-search-input { width:100%; color:var(--ka-white) !important; background:#1b1b1c !important; border:1px solid #62502f !important; border-radius:50px !important; padding:12px 20px !important; outline:none; }
.ka-search-input:focus { border-color:var(--ka-gold-2) !important; box-shadow:0 0 0 3px rgba(191,152,82,.12); }
.ka-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:22px; align-items:stretch; }
.ka-grid--1 { grid-template-columns:1fr; }
.ka-grid--2 { grid-template-columns:repeat(2,minmax(0,1fr)); }
.ka-grid--4 { grid-template-columns:repeat(4,minmax(0,1fr)); }
.ka-grid--3:not(.is-filtered) > .ka-course-card:last-child:nth-child(3n + 1) { grid-column:2; }
.ka-course-card { min-width:0; background:linear-gradient(160deg,var(--ka-card),#191919); border:1px solid #36302a; border-radius:20px; overflow:hidden; box-shadow:0 14px 30px rgba(0,0,0,.10); transition:transform .24s ease,border-color .24s ease,box-shadow .24s ease; }
.ka-course-card:hover { transform:translateY(-5px); border-color:rgba(191,152,82,.72); box-shadow:0 20px 42px rgba(0,0,0,.26); }
.ka-course-card:focus-within { outline:2px solid var(--ka-gold-2); outline-offset:2px; }
.ka-course-link { display:flex; flex-direction:column; height:100%; min-width:0; outline:none; }
.ka-cover { position:relative; width:100%; aspect-ratio:1.69; overflow:hidden; background:#222; }
.ka-cover::after { position:absolute; inset:0; content:""; pointer-events:none; background:linear-gradient(180deg,rgba(0,0,0,.08) 33%,rgba(0,0,0,.51) 100%); }
.ka-cover img { display:block; width:100%; height:100%; object-fit:cover; transition:transform .6s cubic-bezier(.2,.7,.2,1); }
.ka-course-card:hover .ka-cover img { transform:scale(1.06); }
.ka-cover-index { position:absolute; top:16px; right:16px; z-index:1; border:1px solid rgba(225,188,115,.28); background:rgba(22,21,18,.74); backdrop-filter:blur(6px); border-radius:50px; min-width:39px; padding:4px 10px; text-align:center; color:var(--ka-gold-2); font-size:12px; font-weight:700; font-variant-numeric:tabular-nums; }
.ka-cover-icon { position:absolute; bottom:14px; left:15px; z-index:1; display:grid; place-items:center; width:37px; height:37px; color:#1a1511; font-size:23px; line-height:1; border-radius:50%; background:var(--ka-gold); transform:rotate(-90deg); transition:transform .25s ease; }
.ka-course-card:hover .ka-cover-icon { transform:rotate(-45deg); }
.ka-course-content { padding:20px 21px 20px; display:flex; flex-direction:column; flex:1; }
.ka-meta { display:flex; gap:10px; align-items:center; flex-wrap:wrap; font-size:11px; color:#aaa5a1; }
.ka-category { color:var(--ka-gold-2); font-weight:600; }
.ka-divider { width:3px; height:3px; border-radius:50%; background:#817b75; }
.ka-course-content h3 { font-size:18px !important; color:#f6f3ed !important; font-weight:760 !important; line-height:1.6 !important; margin:11px 0 8px !important; min-height:56px; }
.ka-course-content p { color:#b6b3b0 !important; line-height:1.95 !important; font-size:12px !important; margin:0 0 22px !important; min-height:46px; }
.ka-course-cta { display:flex; align-items:center; justify-content:space-between; padding-top:15px; border-top:1px solid rgba(255,255,255,.085); font-size:12px; font-weight:750; color:var(--ka-gold-2); margin-top:auto; }
.ka-course-cta span { font-size:21px; line-height:1; transition:transform .2s; }
.ka-course-card:hover .ka-course-cta span { transform:translateX(-4px); }
.ka-no-match, .ka-empty { text-align:center; padding:35px 12px; color:var(--ka-muted); }

/* Single course */
.ka-course-page { background:#151515; }
.ka-detail { max-width:none; padding:40px 24px 82px; background:radial-gradient(ellipse 40% 22% at 82% 14%,rgba(145,99,43,.08),transparent 80%),#151515; min-height:75vh; }
.ka-detail-container { max-width:1180px; margin:0 auto; }
.ka-breadcrumb { display:flex; align-items:center; gap:12px; color:#9a9590; font-size:12px; margin-bottom:21px; }
.ka-breadcrumb a { color:#d2b278; }
.ka-breadcrumb span[aria-current] { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ka-detail-hero { display:grid; grid-template-columns:1.06fr .94fr; min-height:330px; border:1px solid #4b3d28; border-radius:22px; background:linear-gradient(110deg,#22201e,#181819 78%); overflow:hidden; }
.ka-detail-hero-text { display:flex; flex-direction:column; justify-content:center; gap:17px; padding:36px 42px; min-width:0; }
.ka-detail-hero-text h1 { color:#f8f5ef !important; font-size:clamp(25px,3vw,38px) !important; line-height:1.55 !important; font-weight:800 !important; margin:0 !important; }
.ka-detail-hero-text p { color:#c0bdb8 !important; font-size:14px !important; line-height:2 !important; margin:0 !important; }
.ka-hero-stats { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.ka-hero-stats span { border:1px solid rgba(191,152,82,.30); border-radius:30px; padding:4px 12px; font-size:11px; color:#dfc99f; background:rgba(191,152,82,.065); }
.ka-back-link { display:inline-flex; align-self:flex-start; font-size:12px; color:var(--ka-gold-2) !important; font-weight:650; margin-top:5px; }
.ka-back-link:hover { text-decoration:underline; }
.ka-detail-hero-media { min-width:0; position:relative; overflow:hidden; }
.ka-detail-hero-media::before { content:""; position:absolute; inset:0; background:linear-gradient(270deg,transparent 35%,#201e1b); z-index:1; pointer-events:none; }
.ka-detail-hero-media img { position:absolute; inset:0; height:100%; width:100%; object-fit:cover; }
.ka-course-intro { padding:25px 28px; margin-top:22px; border-radius:15px; color:#ccc6bf; background:#1d1d1e; border:1px solid #33302c; font-size:13px; }
.ka-course-intro :first-child { margin-top:0; }
.ka-course-intro :last-child { margin-bottom:0; }
.ka-detail-section-heading { margin:50px 0 20px; display:flex; justify-content:space-between; align-items:end; gap:20px; }
.ka-detail-section-heading h2 { font-weight:800 !important; font-size:clamp(23px,2.5vw,30px) !important; color:#f8f5ef !important; margin:9px 0 6px !important; }
.ka-detail-section-heading p { font-size:13px !important; color:var(--ka-muted) !important; margin:0 !important; }
.ka-detail-layout { display:grid; grid-template-columns:minmax(0,1fr) 285px; align-items:start; gap:22px; }
.ka-lessons { display:flex; flex-direction:column; gap:24px; min-width:0; }
.ka-lesson { padding:21px; background:#1e1e1f; border:1px solid #3d352c; border-radius:19px; scroll-margin-top:32px; }
.ka-lesson-heading { display:flex; align-items:center; gap:15px; margin:1px 0 17px; }
.ka-lesson-number { display:grid; place-items:center; flex:0 0 52px; height:52px; border:1px solid #6e542c; background:linear-gradient(145deg,#51402a,#2a2622); border-radius:13px; font-size:18px; color:var(--ka-gold-2); font-weight:800; }
.ka-lesson-heading-copy { min-width:0; }
.ka-lesson-tag { color:#cdb484; font-size:11px; font-weight:650; }
.ka-lesson h3 { color:#f8f5ef !important; font-size:19px !important; line-height:1.65 !important; font-weight:760 !important; margin:2px 0 0 !important; }
.ka-player { position:relative; aspect-ratio:16/9; border-radius:13px; overflow:hidden; background:radial-gradient(circle at center,#4d3922,#1a1a1b); border:1px solid rgba(225,188,115,.20); }
.ka-player::after { content:""; pointer-events:none; background:linear-gradient(180deg,transparent 50%,rgba(0,0,0,.42)); position:absolute; inset:0; }
.ka-player-poster, .ka-player > img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.ka-play-btn { position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); width:76px; height:76px; display:grid; place-items:center; z-index:2; cursor:pointer; border-radius:50% !important; border:1px solid #eecf91 !important; color:#181714 !important; background:rgba(208,170,105,.97) !important; box-shadow:0 0 0 11px rgba(191,152,82,.13),0 14px 35px rgba(0,0,0,.45); transition:scale .2s, box-shadow .2s; }
.ka-play-btn span { font-size:23px; line-height:1; margin-left:3px; }
.ka-play-btn:hover, .ka-play-btn:focus-visible { scale:1.08; box-shadow:0 0 0 14px rgba(191,152,82,.19),0 14px 35px rgba(0,0,0,.45); }
.ka-player-hint { position:absolute; bottom:18px; right:22px; color:#fff; font-size:12px; font-weight:600; z-index:2; }
.ka-player.is-playing::after { display:none; }
.ka-player video, .ka-player iframe { width:100%; height:100%; position:absolute; inset:0; border:0; background:#0b0b0b; }
.ka-player--empty { display:grid; place-items:center; }
.ka-player--empty::after { background:rgba(0,0,0,.50); }
.ka-player--empty span { position:relative; z-index:1; background:rgba(20,20,20,.85); color:#f4e4c8; padding:8px 17px; border-radius:8px; font-size:12px; }
.ka-lesson-description { color:#c1bdb8; font-size:13px; line-height:2.05; margin:18px 1px 1px; }
.ka-lesson-description :first-child { margin-top:0; }
.ka-lesson-description :last-child { margin-bottom:0; }
.ka-lesson-sidebar { position:sticky; top:26px; }
.ka-lesson-index { background:#202021; border:1px solid #3c342b; border-radius:17px; padding:24px 21px; }
.ka-lesson-index h3 { color:#f9f6f1 !important; font-size:20px !important; margin:8px 0 21px !important; }
.ka-lesson-index ol { margin:0; padding:0; list-style:none; display:flex; flex-direction:column; gap:4px; max-height:60vh; overflow-y:auto; }
.ka-lesson-index li { margin:0; }
.ka-lesson-index li a { display:flex; align-items:center; gap:10px; padding:10px 7px; border-radius:9px; color:#cbc6c1; font-size:12px; line-height:1.6; transition:background .15s,color .15s; }
.ka-lesson-index li a:hover, .ka-lesson-index li a:focus-visible { background:#2c2824; color:var(--ka-gold-2); }
.ka-lesson-index li span { color:var(--ka-gold-2); font-size:11px; font-weight:800; }
.ka-index-all { display:block; color:var(--ka-gold-2) !important; border-top:1px solid #41382d; margin-top:18px; padding-top:15px; font-size:12px; font-weight:650; }
.ka-empty-lessons { text-align:center; border:1px dashed #6b532e; border-radius:18px; background:linear-gradient(130deg,#1e1c19,#1b1b1b); padding:56px 22px; }
.ka-empty-symbol { width:72px; height:72px; margin:0 auto 14px; display:grid; place-items:center; border-radius:50%; font-size:37px; color:var(--ka-gold-2); background:#392e20; }
.ka-empty-lessons h3 { color:var(--ka-white) !important; font-size:21px !important; }
.ka-empty-lessons p { color:var(--ka-muted) !important; font-size:13px !important; }
.ka-empty-lessons a { color:var(--ka-gold-2) !important; font-size:13px; font-weight:700; }
.ka-pagination { display:flex; flex-wrap:wrap; gap:8px; justify-content:center; }
.ka-pagination .page-numbers { min-width:35px; text-align:center; padding:4px 10px; border:1px solid #67502b; border-radius:8px; }
.ka-pagination .page-numbers.current { background:var(--ka-gold); color:#1a1713; }
.ka-end-note { margin-top:44px; display:flex; justify-content:space-between; align-items:center; gap:20px; padding:23px 26px; border:1px solid #55402b; border-radius:16px; background:linear-gradient(90deg,#26201b,#1e1d1b); }
.ka-end-note strong { color:var(--ka-white); font-size:17px; }
.ka-end-note p { margin:5px 0 0 !important; color:var(--ka-muted) !important; font-size:12px !important; }
.ka-end-note a { border:1px solid var(--ka-gold); color:var(--ka-gold-2) !important; padding:11px 17px; border-radius:9px; flex:0 0 auto; font-size:12px; font-weight:750; }
.ka-end-note a:hover { background:var(--ka-gold); color:#1c1711 !important; }
@media (max-width:1180px) {
  .ka-grid--4 { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .ka-grid--4 > .ka-course-card:last-child:nth-child(3n + 1) { grid-column:2; }
}
@media (max-width:930px) {
  .ka-grid, .ka-grid--3, .ka-grid--4 { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .ka-grid--3:not(.is-filtered) > .ka-course-card:last-child:nth-child(3n + 1) { grid-column:auto; }
  .ka-grid--4 > .ka-course-card:last-child:nth-child(3n + 1) { grid-column:auto; }
  .ka-detail-layout { grid-template-columns:1fr; }
  .ka-lesson-sidebar { position:static; grid-row:1; }
  .ka-lesson-index ol { max-height:205px; }
}
@media (max-width:680px) {
  .ka-academy { padding:32px 14px 44px; }
  .ka-section-head { flex-direction:column; align-items:flex-start; gap:13px; }
  .ka-grid, .ka-grid--2, .ka-grid--3, .ka-grid--4 { grid-template-columns:1fr; gap:15px; }
  .ka-course-content h3, .ka-course-content p { min-height:0; }
  .ka-cover { aspect-ratio:1.8; }
  .ka-course-content { padding:17px 19px; }
  .ka-filter { padding:6px 13px !important; }
  .ka-detail { padding:23px 13px 52px; }
  .ka-detail-hero { display:flex; flex-direction:column-reverse; }
  .ka-detail-hero-media { height:190px; flex:0 0 190px; }
  .ka-detail-hero-media img { position:relative; }
  .ka-detail-hero-media::before { background:linear-gradient(0deg,#201e1b,transparent 45%); }
  .ka-detail-hero-text { padding:25px 22px 30px; gap:13px; }
  .ka-detail-section-heading { margin-top:30px; align-items:flex-start; }
  .ka-detail-section-heading .ka-count { display:none; }
  .ka-lesson { padding:13px; }
  .ka-lesson-heading { gap:11px; }
  .ka-lesson-number { flex-basis:42px; height:42px; font-size:14px; }
  .ka-lesson h3 { font-size:16px !important; }
  .ka-play-btn { width:58px; height:58px; }
  .ka-play-btn span { font-size:17px; }
  .ka-end-note { flex-direction:column; align-items:flex-start; padding:22px; }
}
@media (prefers-reduced-motion: reduce) {
  .ka-academy *, .ka-academy *::before, .ka-academy *::after { animation:none !important; transition:none !important; scroll-behavior:auto !important; }
}

/* v1.1: feature-page presentation, site typography, and SVG-only actions. */
.ka-academy {
  font-family: var(--e-global-typography-text-font-family, "Yekan"), "Yekan", "IRANYekan", "Yekan Bakh", sans-serif;
  --ka-gold: #bf9852;
  --ka-gold-2: #e1bc73;
}
.ka-academy :is(button,input,textarea,select) { font-family: inherit; }
.ka-academy .ka-icon { display:inline-block; width:20px; height:20px; flex:none; vertical-align:middle; }
.ka-eyebrow .ka-icon { width:19px; height:19px; }
.ka-section-head { margin-bottom:32px; }
.ka-layout--features .ka-grid,
.ka-layout--features .ka-grid--1,
.ka-layout--features .ka-grid--2,
.ka-layout--features .ka-grid--3,
.ka-layout--features .ka-grid--4 {
  grid-template-columns:minmax(0,1fr);
  gap:30px;
}
.ka-layout--features .ka-grid > .ka-course-card { grid-column:auto !important; }
.ka-layout--features .ka-course-card {
  background:#1b1b1b;
  border:1px solid #40352a;
  border-radius:18px;
  box-shadow:none;
}
.ka-layout--features .ka-course-card:hover { transform:translateY(-2px); box-shadow:0 18px 42px rgba(0,0,0,.22); }
.ka-layout--features .ka-course-link { flex-direction:row; min-height:285px; }
.ka-layout--features .ka-course-card:nth-child(even) .ka-course-link { flex-direction:row-reverse; }
.ka-layout--features .ka-cover {
  flex:0 0 48%; width:48%; align-self:stretch; min-height:285px; aspect-ratio:auto;
  overflow:hidden; background:#100f0e;
}
.ka-layout--features .ka-cover::after { background:linear-gradient(0deg,rgba(12,11,10,.47),transparent 55%); }
.ka-layout--features[dir="rtl"] .ka-cover-index { top:20px; right:21px; left:auto; }
.ka-layout--features[dir="ltr"] .ka-cover-index { top:20px; left:21px; right:auto; }
.ka-layout--features .ka-cover-icon,
.ka-cover-icon { transform:none; border:1px solid rgba(255,255,255,.12); }
.ka-layout--features .ka-course-card:hover .ka-cover-icon, .ka-course-card:hover .ka-cover-icon { transform:none; }
.ka-layout--features .ka-course-content {
  justify-content:center; min-width:0; padding:34px clamp(28px,4vw,65px); gap:0;
}
.ka-layout--features .ka-course-content h3 {
  font-size:clamp(21px,2.25vw,29px) !important;
  font-weight:800 !important; min-height:0; line-height:1.55 !important; margin:13px 0 !important;
}
.ka-layout--features .ka-course-content p {
  font-size:clamp(13px,1.25vw,15px) !important;
  line-height:2.0 !important; min-height:0; margin:0 0 22px !important;
  max-width:56ch;
}
.ka-layout--features .ka-meta { font-size:12px; letter-spacing:0; }
.ka-layout--features .ka-course-cta {
  display:inline-flex; align-items:center; justify-content:flex-start; gap:12px;
  border:0; padding:0; margin-top:4px; color:var(--ka-gold-2);
  font-size:13px; font-weight:750;
}
.ka-course-cta-icon {
  width:44px; height:44px; flex:none; display:inline-grid; place-items:center;
  border:1px solid #bf9852; border-radius:50%; background:#28221a;
  transition:background .2s,color .2s,transform .2s;
}
.ka-course-cta-icon .ka-icon { width:19px; height:19px; }
.ka-course-card:hover .ka-course-cta-icon { background:#bf9852; color:#1b1611; transform:translateY(-2px); }
.ka-layout--grid .ka-course-cta { justify-content:flex-end; gap:12px; flex-direction:row-reverse; }
.ka-layout--grid .ka-course-content h3 { min-height:auto; }
.ka-cover-icon .ka-icon { width:20px; height:20px; }
.ka-back-link, .ka-empty-lessons a, .ka-aparat-link, .ka-end-note a {
  display:inline-flex; align-items:center; gap:9px;
}
.ka-back-link .ka-icon, .ka-empty-lessons a .ka-icon, .ka-end-note a .ka-icon { width:17px; height:17px; }
.ka-detail .ka-eyebrow .ka-icon { margin-inline-end:5px; }
.ka-player .ka-play-btn { padding:0 !important; }
.ka-player .ka-play-btn .ka-icon { width:32px; height:32px; margin:0; }
.ka-player .ka-player-hint { inset-inline-start:20px; inset-inline-end:auto; right:auto; bottom:17px; }
.ka-player--empty span { max-width:88%; text-align:center; line-height:1.9; }
.ka-aparat-link {
  color:var(--ka-gold-2) !important; font-size:12px; font-weight:700;
  margin-top:12px; width:max-content; text-decoration:none !important;
}
.ka-aparat-link:hover { text-decoration:underline !important; }
.ka-aparat-link .ka-icon { width:15px; height:15px; }
.ka-empty-symbol .ka-icon { width:34px; height:34px; }
.ka-course-page .ka-detail { font-family:var(--e-global-typography-text-font-family, "Yekan"), "Yekan", "IRANYekan", "Yekan Bakh", sans-serif; }
.ka-academy[dir="ltr"] { text-align:left; }
.ka-academy[dir="ltr"] .ka-section-head { flex-direction:row; }
.ka-academy[dir="ltr"] .ka-detail-layout { grid-template-columns:minmax(0,1fr) 285px; }
.ka-academy[dir="ltr"] .ka-lesson-index { text-align:left; }
.ka-academy[dir="ltr"] .ka-course-content { text-align:left; }
.ka-academy[dir="ltr"] .ka-course-cta { align-self:flex-start; }
.ka-layout--grid[dir="ltr"] .ka-cover-index { right:20px; left:auto; }
.ka-academy[dir="ltr"] .ka-detail-hero-media::before { background:linear-gradient(90deg,transparent 35%,#201e1b); }
.ka-academy[dir="ltr"] .ka-play-btn { right:auto; }
.ka-academy[dir="ltr"] .ka-back-link .ka-icon { transform:rotate(180deg); }
.ka-academy[dir="rtl"] .ka-course-cta-icon .ka-icon { transform:scaleX(-1); }
.ka-academy[dir="rtl"] .ka-aparat-link .ka-icon { transform:scaleX(-1); }
.ka-academy[dir="rtl"] .ka-empty-lessons a .ka-icon { transform:scaleX(-1); }
.ka-academy[dir="rtl"] .ka-end-note a .ka-icon { transform:scaleX(-1); }
@media(max-width:930px) {
  .ka-layout--features .ka-grid { grid-template-columns:1fr; }
  .ka-academy[dir="ltr"] .ka-detail-layout { grid-template-columns:1fr; }
  .ka-layout--features .ka-course-link { min-height:245px; }
  .ka-layout--features .ka-cover { min-height:245px; flex-basis:44%; width:44%; }
  .ka-layout--features .ka-course-content { padding:25px 27px; }
}
@media(max-width:680px) {
  .ka-layout--features .ka-grid { gap:17px; }
  .ka-layout--features .ka-course-link,
  .ka-layout--features .ka-course-card:nth-child(even) .ka-course-link { flex-direction:column; min-height:0; }
  .ka-layout--features .ka-cover { width:100%; height:auto; min-height:0; flex:auto; aspect-ratio:16/9; }
  .ka-layout--features .ka-course-content { padding:19px 21px 23px; }
  .ka-layout--features .ka-course-content h3 { font-size:21px !important; }
  .ka-layout--features .ka-course-content p { font-size:13px !important; }
  .ka-layout--features .ka-cover-index { inset-inline-start:14px; inset-block-start:14px; }
  .ka-detail .ka-lesson-sidebar { position:static; grid-row:1; }
  .ka-academy[dir="ltr"] .ka-section-head { flex-direction:column; }
  .ka-academy[dir="ltr"] .ka-detail-layout { grid-template-columns:1fr; }
}

/* v1.1.2: compact horizontal lesson rows and on-demand centered video dialog. */
.ka-academy.ka-detail,
.ka-academy.ka-detail :is(h1,h2,h3,p,a,span,strong,button,summary) {
  font-family:"Yekan","IRANYekan","Yekan Bakh",var(--e-global-typography-text-font-family,inherit),sans-serif !important;
  letter-spacing:normal !important;
  word-spacing:normal !important;
}
.ka-academy.ka-detail .ka-lesson,
.ka-academy.ka-detail .ka-lesson :is(p,h3,div,summary) {
  text-align:start !important;
  text-align-last:auto !important;
}
.ka-detail .ka-lessons { gap:13px; }
.ka-detail .ka-lesson {
  display:grid; grid-template-columns:clamp(165px,22vw,225px) minmax(0,1fr);
  align-items:center; gap:20px; padding:15px;
  border:1px solid #37312b; border-radius:15px; background:#1d1d1e;
  transition:border-color .2s ease,background-color .2s ease;
}
.ka-detail .ka-lesson:hover { border-color:#625033; background:#202020; }
.ka-lesson-media { min-width:0; }
.ka-lesson-poster {
  display:block; position:relative; width:100%; aspect-ratio:16/9;
  border:1px solid rgba(225,188,115,.13); border-radius:11px; padding:0;
  overflow:hidden; color:#1b1510; background:#121212; line-height:0;
}
button.ka-lesson-poster { cursor:pointer; }
.ka-lesson-poster::after {
  content:""; position:absolute; inset:0; background:linear-gradient(180deg,transparent 30%,rgba(0,0,0,.4));
  pointer-events:none;
}
.ka-lesson-poster img { width:100%; height:100%; display:block; object-fit:cover; transition:transform .25s ease; }
button.ka-lesson-poster:hover img { transform:scale(1.03); }
.ka-lesson-poster-play {
  position:absolute; z-index:1; top:50%; left:50%; transform:translate(-50%,-50%);
  width:42px; height:42px; display:grid; place-items:center; border-radius:50%;
  color:#1a1510; background:#c6a15c; box-shadow:0 0 0 7px rgba(191,152,82,.12);
}
.ka-lesson-poster-play .ka-icon { width:21px; height:21px; }
.ka-lesson-poster-pending {
  position:absolute; z-index:1; bottom:10px; inset-inline-start:12px;
  background:rgba(22,20,17,.85); border:1px solid rgba(225,188,115,.25);
  color:#e5c994; padding:5px 10px; border-radius:6px; font-size:11px; line-height:1.5;
}
.ka-lesson-content { display:flex; flex-direction:column; gap:6px; min-width:0; }
.ka-detail .ka-lesson-heading { margin:0 0 2px; gap:11px; align-items:center; }
.ka-detail .ka-lesson-number { height:38px; flex:0 0 38px; border-radius:9px; font-size:12px; }
.ka-detail .ka-lesson-tag { font-size:11px; line-height:1.5; }
.ka-detail .ka-lesson h3 { font-size:clamp(15px,1.35vw,18px) !important; margin:2px 0 0 !important; line-height:1.55 !important; font-weight:750 !important; }
.ka-detail .ka-lesson-summary { color:#dcc6a6 !important; font-size:12.5px !important; line-height:1.8 !important; margin:0 !important; }
.ka-detail .ka-lesson-description { color:#bab6b1 !important; font-size:12.5px !important; line-height:1.85 !important; margin:0 !important; }
.ka-detail .ka-lesson-description p { margin:0 0 6px !important; font-size:inherit !important; line-height:inherit !important; color:inherit !important; }
.ka-detail .ka-lesson-description :last-child { margin-bottom:0 !important; }
.ka-detail .ka-lesson-more { margin:1px 0 0; }
.ka-detail .ka-lesson-more > summary { width:max-content; max-width:100%; cursor:pointer; color:#ddbd81; font-size:12px; line-height:1.7; }
.ka-detail .ka-lesson-more[open] > summary { margin-bottom:7px; }
.ka-detail .ka-lesson-more .ka-lesson-description { margin-top:0; }
.ka-detail .ka-lesson-actions { display:flex; gap:15px; flex-wrap:wrap; align-items:center; margin-top:5px; }
.ka-detail button.ka-lesson-watch {
  display:inline-flex; align-items:center; justify-content:center; gap:7px;
  border:1px solid #a98242 !important; border-radius:8px !important;
  background:#3d3122 !important; color:#f0d5a3 !important; padding:7px 13px !important;
  font-size:12px !important; line-height:1.65 !important; font-weight:700 !important;
  cursor:pointer; transition:background .2s ease,color .2s ease;
}
.ka-detail button.ka-lesson-watch:hover { background:#b99451 !important; color:#1a1611 !important; }
.ka-detail .ka-lesson-watch .ka-icon { width:15px; height:15px; }
.ka-detail .ka-aparat-link { margin:0 !important; color:#aaa49d !important; font-size:11.5px !important; }
.ka-detail .ka-aparat-link:hover { color:#e5bd77 !important; }
.ka-detail .ka-lesson-not-ready { color:#9f9690; font-size:11.5px; }
.ka-detail button:focus-visible, .ka-detail summary:focus-visible, .ka-detail a:focus-visible {
  outline:2px solid #e1bc73 !important; outline-offset:3px;
}
/* Native modal: fit the full 16:9 player plus controls inside the visible viewport. */
html.ka-modal-open { overflow:hidden; }
.ka-academy.ka-detail dialog.ka-video-dialog {
  position:fixed !important; inset:0 !important; margin:auto !important;
  padding:0 !important;
  width:min(920px, calc(100vw - 28px), max(0px, calc(177.7778dvh - 391.111px))) !important;
  max-width:calc(100vw - 28px) !important;
  max-height:calc(100dvh - 24px) !important;
  min-width:0 !important;
  overflow:hidden !important;
  border:1px solid #57452b !important; border-radius:17px !important;
  background:#1b1b1b !important; color:#f8f5ef !important;
  box-shadow:0 24px 90px rgba(0,0,0,.7); z-index:2147483000;
}
.ka-academy.ka-detail dialog.ka-video-dialog:not([open]) { display:none !important; }
.ka-academy.ka-detail dialog.ka-video-dialog::backdrop {
  background:rgba(5,5,5,.82); backdrop-filter:blur(5px);
}
.ka-dialog-shell { display:flex; flex-direction:column; min-width:0; max-height:calc(100dvh - 24px); overflow:hidden; }
.ka-dialog-header { display:flex; flex:none; justify-content:space-between; align-items:center; gap:20px; padding:17px 20px; }
.ka-dialog-title-wrap { min-width:0; }
.ka-dialog-title-wrap h3 { font-size:17px !important; color:#faf5ed !important; line-height:1.5 !important; margin:4px 0 0 !important; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; overflow-wrap:anywhere; }
.ka-detail button.ka-dialog-close {
  display:grid; place-items:center; padding:0 !important; width:36px; height:36px;
  flex:0 0 36px; border:1px solid #594632 !important; border-radius:9px !important;
  color:#f0d4a1 !important; background:#2b2520 !important; cursor:pointer;
}
.ka-detail button.ka-dialog-close:hover { background:#493827 !important; }
.ka-dialog-player { position:relative; flex:none; min-height:0; background:#080808; aspect-ratio:16/9; width:100%; }
.ka-dialog-player iframe { display:block; width:100%; height:100%; border:0; position:absolute; inset:0; }
.ka-dialog-footer { flex:none; padding:12px 20px 15px; display:flex; justify-content:space-between; gap:16px; align-items:center; font-size:12px; color:#aaa29a; }
.ka-dialog-footer a { display:inline-flex; align-items:center; gap:7px; color:#e1bc73 !important; font-size:12px; }
.ka-dialog-footer .ka-icon { width:15px; height:15px; }
@media(max-width:800px) {
  .ka-detail .ka-lesson { grid-template-columns:178px minmax(0,1fr); gap:15px; }
}
@media(max-width:560px) {
  .ka-detail .ka-lesson { grid-template-columns:108px minmax(0,1fr); gap:12px; padding:11px; align-items:start; }
  .ka-detail .ka-lesson-number { flex:0 0 30px; height:30px; font-size:11px; }
  .ka-detail .ka-lesson-heading { gap:7px; }
  .ka-detail .ka-lesson h3 { font-size:14px !important; }
  .ka-detail .ka-lesson-summary { font-size:12px !important; }
  .ka-detail .ka-lesson-description { font-size:11.5px !important; }
  .ka-lesson-poster-play { width:32px; height:32px; box-shadow:0 0 0 4px rgba(191,152,82,.12); }
  .ka-lesson-poster-play .ka-icon { width:16px; height:16px; }
  .ka-dialog-header { padding:12px 14px; }
  .ka-dialog-title-wrap h3 { font-size:15px !important; }
  .ka-dialog-footer { padding:10px 14px 13px; gap:8px; flex-wrap:wrap; }
}
@media(max-height:540px) {
  .ka-academy.ka-detail dialog.ka-video-dialog {
    width:min(920px, calc(100vw - 28px), max(0px, calc(177.7778dvh - 293.333px))) !important;
  }
  .ka-dialog-header { padding:8px 12px; gap:9px; }
  .ka-dialog-title-wrap h3 {
    font-size:14px !important; line-height:1.35 !important;
    display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2;
    overflow:hidden; margin:1px 0 0 !important;
  }
  .ka-dialog-footer { padding:7px 12px 9px; gap:8px; font-size:11px; }
  .ka-dialog-title-wrap .ka-lesson-tag { font-size:10px; }
}
@media(max-height:420px) and (orientation:landscape) {
  .ka-dialog-footer > span { display:none; }
  .ka-dialog-footer { justify-content:flex-end; }
}

/* v1.1.3: match the site's Yekan typography and align lesson thumbnails with text. */
.ka-academy {
  --ka-site-font: "Yekan", "IRANYekan", "Yekan Bakh", "YekanBakh", "yekan", var(--e-global-typography-text-font-family, sans-serif), sans-serif;
  font-family:var(--ka-site-font) !important;
}
.ka-academy :is(*):not(svg):not(path) {
  font-family:var(--ka-site-font) !important;
  letter-spacing:normal !important;
  word-spacing:normal !important;
}
.ka-academy[dir="rtl"] .ka-lesson :is(.ka-lesson-summary,.ka-lesson-description,.ka-lesson-description p) {
  text-align:right !important;
  text-align-last:right !important;
  text-justify:none !important;
  white-space:normal !important;
}
.ka-academy[dir="ltr"] .ka-lesson :is(.ka-lesson-summary,.ka-lesson-description,.ka-lesson-description p) {
  text-align:left !important;
  text-align-last:left !important;
  text-justify:none !important;
  white-space:normal !important;
}
.ka-detail .ka-lesson { align-items:stretch; }
.ka-detail .ka-lesson-media {
  position:relative;
  align-self:stretch;
  min-height:0;
}
.ka-detail .ka-lesson-poster {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  min-height:100%;
  aspect-ratio:auto;
}
.ka-academy .ka-course-cta {
  display:inline-flex;
  flex-direction:row !important;
  justify-content:flex-start !important;
  align-items:center;
  align-self:flex-start;
  width:max-content;
  max-width:100%;
  gap:11px !important;
  white-space:nowrap;
}
.ka-academy .ka-course-cta-icon {
  order:0;
  transform:none !important;
  flex:0 0 44px;
}
.ka-academy .ka-course-cta-label {
  order:1;
  font-size:13px !important;
  line-height:1.6 !important;
  transform:none !important;
}
.ka-academy .ka-icon-open,
.ka-academy .ka-icon-chevron { transform:none !important; rotate:0deg !important; }
.ka-academy[dir="rtl"] .ka-icon-open,
.ka-academy[dir="rtl"] .ka-icon-chevron { transform:scaleX(-1) !important; }
@media(max-width:560px) {
  .ka-detail .ka-lesson-poster img { object-fit:contain; }
  .ka-academy .ka-course-cta-label { font-size:12px !important; }
}


/* v1.1.4: keep the episode index beneath sticky site navigation. */
.ka-academy.ka-detail .ka-lesson-sidebar {
  top:var(--ka-sidebar-sticky-top, 164px);
}
.ka-academy.ka-detail .ka-lesson {
  scroll-margin-top:calc(var(--ka-sidebar-sticky-top, 164px) + 12px);
}
.ka-academy.ka-detail .ka-lesson-index ol {
  max-height:clamp(150px, calc(100dvh - var(--ka-sidebar-sticky-top, 164px) - 200px), 60vh);
  padding-inline-end:8px;
  scrollbar-width:thin;
  scrollbar-color:#917446 #292522;
  scrollbar-gutter:stable;
}
.ka-academy.ka-detail .ka-lesson-index ol::-webkit-scrollbar { width:7px; }
.ka-academy.ka-detail .ka-lesson-index ol::-webkit-scrollbar-track {
  background:#292522;
  border-radius:20px;
}
.ka-academy.ka-detail .ka-lesson-index ol::-webkit-scrollbar-thumb {
  background:#917446;
  border:1px solid #292522;
  border-radius:20px;
}
.ka-academy.ka-detail .ka-lesson-index ol::-webkit-scrollbar-thumb:hover { background:#c3a066; }

/* The action follows its label in both RTL and LTR layouts. */
.ka-academy .ka-course-cta { flex-direction:row !important; }
.ka-academy .ka-course-cta-label { order:0; }
.ka-academy .ka-course-cta-icon { order:1; }
@media(max-width:930px) {
  .ka-academy.ka-detail .ka-lesson-sidebar { position:static; top:auto; }
  .ka-academy.ka-detail .ka-lesson-index ol { max-height:205px; }
}

/* v1.1.5: isolate the video poster button from theme button borders and padding. */
.ka-academy.ka-detail .ka-lesson .ka-lesson-media > button.ka-lesson-poster {
  -webkit-appearance:none !important;
  appearance:none !important;
  display:block !important;
  box-sizing:border-box !important;
  width:100% !important;
  height:100% !important;
  min-height:0 !important;
  margin:0 !important;
  padding:0 !important;
  border:1px solid rgba(225,188,115,.13) !important;
  border-radius:11px !important;
  outline:none !important;
  box-shadow:none !important;
  background:#121212 !important;
  overflow:hidden;
}
.ka-academy.ka-detail .ka-lesson .ka-lesson-media > button.ka-lesson-poster:is(:hover,:active,:focus) {
  border-color:rgba(225,188,115,.35) !important;
  outline:none !important;
  box-shadow:none !important;
  background:#121212 !important;
}
.ka-academy.ka-detail .ka-lesson .ka-lesson-media > button.ka-lesson-poster:focus-visible {
  outline:2px solid var(--ka-gold-2) !important;
  outline-offset:2px !important;
}
