/* Homepage only. The existing header, hero and footer are intentionally untouched. */
.home-discover {
  --home-ink: #202c3d;
  --home-muted: #687587;
  --home-line: #e6e9ed;
  --home-accent: #ffc000;
  background: #fff;
  color: var(--home-ink);
  direction: rtl;
  font-size: 14px;
  line-height: 1.8;
}
.home-discover *, .home-discover *::before, .home-discover *::after { box-sizing: border-box; }
.home-discover img { max-width: 100%; }
.home-discover a { text-decoration: none; }
.home-discover a:focus-visible, .home-discover button:focus-visible, .home-discover [role="button"]:focus-visible {
  outline: 3px solid #d79e00; outline-offset: 4px;
}
.home-discover .section-inner, .home-discover .home-courses-inner, .home-discover .home-video-shell {
  width: min(100%, 1180px); max-width: 1180px; margin: 0 auto;
}
.home-discover .home-section-heading, .home-discover .home-courses-head {
  display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 28px;
}
.home-discover .home-eyebrow, .home-discover .home-courses-head > div > span {
  display: block; color: #86630d; font-size: 11px; font-weight: 600; margin-bottom: 6px;
}
.home-discover .section-title, .home-discover .home-courses-head h2 {
  color: var(--home-ink); font-size: clamp(20px, 2vw, 26px); font-weight: 800; line-height: 1.7; text-align: right; margin: 0 0 6px;
}
.home-discover .section-subtitle, .home-discover .home-courses-head p {
  color: var(--home-muted); font-size: 12px; line-height: 1.9; text-align: right; margin: 0; max-width: 650px;
}
.home-discover .home-text-link, .home-discover .home-courses-head > a {
  display: inline-flex; align-items: center; gap: 18px; flex-shrink: 0; padding: 9px 0;
  border: 0; border-bottom: 1px solid #cfd5dd; border-radius: 0; color: var(--home-ink); font-size: 12px; font-weight: 600;
}
.home-discover .home-text-link:hover, .home-discover .home-courses-head > a:hover { border-color: #bb8a00; color: #886400; }
.home-discover .suggested-teachers-section { padding: 54px 28px 60px; background: #fff; }
.home-discover .teacher-cards-container {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px 14px; margin: 0; max-width: none; justify-items: stretch;
}
.home-discover .teacher-card {
  width: auto; min-width: 0; display: flex; flex-direction: column; align-items: stretch; padding: 7px;
  background: #fff; border: 1px solid var(--home-line); border-radius: 17px; overflow: hidden;
  box-shadow: none; text-align: right; transition: transform .2s, box-shadow .2s;
}
.home-discover .teacher-card:hover { transform: translateY(-4px); box-shadow: 0 10px 26px #202c3d0d; }
.home-discover .teacher-portrait { display: block; position: relative; border-radius: 11px; overflow: hidden; background: #f0f2f4; }
.home-discover .teacher-photo {
  display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; object-position: center 25%;
  border: 0; border-radius: 0; margin: 0; box-shadow: none;
}
.home-discover .teacher-portrait-arrow {
  display: grid; place-items: center; position: absolute; left: 9px; bottom: 9px;
  width: 28px; height: 28px; border-radius: 50%; background: #fffffff0; color: #263445; font-size: 17px;
}
.home-discover .teacher-info { display: flex; flex-direction: column; flex: 1; padding: 9px 5px 3px; }
.home-discover .teacher-name { margin: 0 0 3px; color: var(--home-ink); font-size: 13px; font-weight: 700; }
.home-discover .teacher-city { margin: 0; color: var(--home-muted); font-size: 10px; }
.home-discover .teacher-rating { margin: 6px 0 3px; font-size: 10px; letter-spacing: 1px; }
.home-discover .teacher-subject { margin: 0 0 9px; color: #46586a; font-size: 11px; font-weight: 500; }
.home-discover .teacher-card .view-profile-btn {
  display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%;
  padding: 8px 0 2px; margin: auto 0 0; border: 0; border-top: 1px solid var(--home-line); border-radius: 0;
  background: transparent; color: #263445; font-size: 10px; font-weight: 600; box-shadow: none;
}
.home-discover .teacher-card .view-profile-btn:hover { color: #977000; }
/* A contained screening room, not another full-width strip of cards. */
.home-discover .teachers-videos-dark { display: block; min-height: 0; padding: 0 28px 56px; background: #fff; }
.home-discover .home-video-shell {
  padding: 30px; border-radius: 24px; background: radial-gradient(ellipse at top left, #30414f, transparent 70%), #17252f; color: #fff;
}
.home-discover .teachers-videos-dark .section-title { color: #fff; font-size: 23px; }
.home-discover .teachers-videos-dark .section-subtitle { color: #b8c7d0; }
.home-discover .teachers-videos-dark .home-eyebrow { color: #f0cf76; }
.home-discover .home-video-label { display: inline-flex; align-items: center; gap: 9px; flex-shrink: 0; color: #edda9e; font-size: 11px; }
.home-discover .home-video-label > span { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid #66716f; border-radius: 50%; font-size: 10px; }
.home-discover .videos-inner { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 24px; max-width: none; align-items: start; }
.home-discover .main-video { min-width: 0; width: 100%; }
.home-discover .main-video iframe { display: block; width: 100%; aspect-ratio: 16/9; border-radius: 12px; background: #101b22; box-shadow: none; }
.home-discover .main-video h3 { color: #f0f4f6; font-size: 12px; font-weight: 500; line-height: 1.9; margin: 13px 0 0; }
.home-discover .auto-toggle { position: static; display: block; margin: 10px 0 0 auto; padding: 4px 10px; border-color: #4b5c66; background: #263944; color: #e0e8ed; font-size: 10px; }
.home-discover .auto-toggle[aria-pressed="true"] { background: #344852; }
.home-discover .video-thumbs {
  display: flex; flex-direction: column; gap: 8px; min-width: 0; width: 100%; max-height: 380px;
  overflow-y: auto; overflow-x: hidden; padding: 0 0 0 8px; scrollbar-width: thin; scrollbar-color: #566773 transparent;
}
.home-discover .thumb { flex-direction: row; flex-shrink: 0; min-width: 0; width: auto; padding: 8px; gap: 11px; border: 1px solid #ffffff12; border-radius: 10px; background: #ffffff05; text-align: right; }
.home-discover .thumb:hover { transform: none; background: #ffffff0e; }
.home-discover .thumb.active { border: 1px solid #c2aa63; background: #ffffff0a; box-shadow: none; }
.home-discover .thumb img { width: 100px; height: 62px; flex-shrink: 0; object-fit: cover; border-radius: 6px; }
.home-discover .thumb p { color: #e0e7ec; font-size: 11px; line-height: 1.9; margin: 0; }
/* Compact four-across course cards on desktop. */
.home-discover .home-courses { padding: 48px 28px 52px; background: #f5f6f4; color: var(--home-ink); }
.home-discover .home-courses-glow { display: none; }
.home-discover .home-course-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.home-discover .public-course-card { min-width: 0; border: 1px solid #e1e5df; border-radius: 14px; box-shadow: none; }
.home-discover .public-course-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px #2634450b; }
.home-discover .course-card-media { height: auto; aspect-ratio: 16/9; }
.home-discover .course-card-media span { right: 9px; top: 9px; padding: 3px 8px; font-size: 9px; border-radius: 6px; }
.home-discover .course-card-media i { width: 27px; height: 27px; left: 10px; bottom: 10px; font-size: 10px; }
.home-discover .course-card-body { padding: 13px; }
.home-discover .course-card-body > small { font-size: 10px; color: #657382; }
.home-discover .course-card-body h3 { min-height: 44px; margin: 5px 0 7px; font-size: 13px; line-height: 1.7; }
.home-discover .course-card-body h3 a { color: var(--home-ink); }
.home-discover .course-card-body h3, .home-discover .course-card-body p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.home-discover .course-card-body p { height: 38px; font-size: 10px; line-height: 1.9; }
.home-discover .course-card-meta { gap: 5px; margin-top: 10px; padding-top: 10px; font-size: 9px; }
.home-discover .course-card-meta strong { font-size: 11px; }
.home-discover .home-course-discount {
  position: absolute; left: 9px; top: 9px; padding: 5px 10px; border: 1px solid #ffffff66;
  border-radius: 8px; background: #b92d45; color: #fff; font-size: 14px; font-weight: 800;
  line-height: 1.6; box-shadow: 0 3px 10px #46142126;
}
.home-discover .home-course-format { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 8px; margin: 0 0 10px; color: #536578; font-size: 10px; }
.home-discover .home-course-format > span { display: inline-flex; align-items: center; gap: 5px; }
.home-discover .home-course-format svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.home-discover .home-course-format > span:first-child { color: #344e66; font-weight: 600; }
.home-discover .home-course-pricing { align-items: center; min-height: 70px; margin-top: 12px; padding-top: 12px; border-top-color: #e6e9e0; }
.home-discover .home-price-caption { font-size: 10px; color: #647182; }
.home-discover .home-price-values { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; margin-inline-start: auto; }
.home-discover .home-price-values del { color: #7d8490; font-size: 11px; text-decoration-color: #b26464; }
.home-discover .course-card-meta .home-course-price { display: inline-flex; align-items: baseline; gap: 5px; color: #183d36; font-size: 21px; font-weight: 800; line-height: 1.6; white-space: nowrap; }
.home-discover .home-course-price small { font-size: 10px; font-weight: 500; }
.home-discover .home-course-empty { border-color: #c3cdc4; padding: 30px; }
/* A side introduction and a numbered learning path. */
.home-discover .how-to-use-section { padding: 60px 28px; background: #fff; text-align: right; }
.home-discover .how-to-use-section .section-inner { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 2fr); gap: 50px; align-items: center; }
.home-discover .how-to-use-section .section-title { font-size: 25px; line-height: 1.8; }
.home-discover .section-description { max-width: none; margin: 14px 0 20px; font-size: 12px; line-height: 2.1; color: var(--home-muted); }
.home-discover .curved-steps-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 20px; counter-reset: journey; }
.home-discover .step-box {
  position: relative; width: auto; min-width: 0; padding: 0 0 15px; text-align: right; transform: none;
  border-bottom: 1px solid var(--home-line); cursor: default; counter-increment: journey;
}
.home-discover .step-box::before { content: counter(journey, persian); position: absolute; left: 0; top: 0; font-size: 24px; font-weight: 300; color: #9ba8b3; }
.home-discover .step-box:hover { transform: none; box-shadow: none; }
.home-discover .step-box img { display: block; width: 112px; height: 112px; object-fit: contain; margin: 0 0 12px; }
.home-discover .step-box:hover img { transform: none; }
.home-discover .step-box h3 { color: var(--home-ink); font-size: 13px; margin: 0 0 6px; }
.home-discover .step-box p { font-size: 11px; color: var(--home-muted); line-height: 1.9; margin: 0; }
/* A four-card RTL event rail; overflow stays inside this section. */
.home-discover .home-events { padding: 42px 28px 32px; background: linear-gradient(120deg, #263944, #18262f 70%); color: #eef3f6; }
.home-discover .home-events .section-title { color: #fff; }
.home-discover .home-events .section-subtitle { color: #bdcad3; }
.home-discover .home-events .home-eyebrow { color: #f0cd72; }
.home-discover .home-events .home-text-link { color: #f3db96; border-color: #657063; }
.home-discover .home-events-rail { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 42px) / 4); gap: 14px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: #63767f #ffffff08; padding: 0 0 14px; }
.home-discover .home-events-rail:focus-visible { outline: 2px solid #e3c16b; outline-offset: 5px; }
.home-discover .home-event-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; scroll-snap-align: start; background: #263842; color: #fff; border: 1px solid #ffffff20; border-radius: 14px; transition: border-color .2s, background .2s; }
.home-discover .home-event-card:hover { border-color: #b1aa82; background: #2d424e; }
.home-discover .home-event-media { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 3/4; overflow: hidden; background: #111f28; }
.home-discover .home-event-media img { display: block; width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; object-position: center; }
.home-discover .home-event-placeholder { font-size: 54px; color: #e6c678; }
.home-discover .home-event-state { position: absolute; right: 9px; bottom: 9px; padding: 3px 9px; border: 1px solid #ffffff35; border-radius: 6px; background: #17252fee; color: #f1ddb0; font-size: 9px; }
.home-discover .home-event-copy { display: flex; flex-direction: column; flex: 1; min-width: 0; padding: 13px; }
.home-discover .home-event-kind { font-size: 9px; color: #e2c580; margin-bottom: 5px; }
.home-discover .home-event-copy h3 { margin: 0 0 12px; color: #f2f6f8; font-size: 13px; line-height: 1.8; min-height: 47px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.home-discover .home-event-meta { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; color: #c0cdd5; font-size: 10px; }
.home-discover .home-event-meta svg { flex: 0 0 15px; width: 15px; height: 15px; fill: none; stroke: #9eb3c0; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.home-discover .home-event-meta > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-discover .home-event-action { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 10px; border-top: 1px solid #ffffff1a; color: #eed597; font-size: 10px; }
.home-discover .home-events-navigation { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; color: #acbdc8; font-size: 10px; }
.home-discover .home-events-navigation[hidden] { display: none; }
.home-discover .home-events-navigation > div { display: flex; gap: 8px; }
.home-discover .home-events-navigation button { width: 36px; height: 32px; padding: 0; border: 1px solid #60737d; border-radius: 8px; background: #ffffff08; color: #fff; cursor: pointer; font-size: 17px; }
.home-discover .home-events-navigation button:hover:not(:disabled) { background: #e9cd84; color: #1d303d; border-color: #e9cd84; }
.home-discover .home-events-navigation button:disabled { opacity: .35; cursor: default; }
/* An editorial grid: one feature, four shorter reads. */
.home-discover .latest-articles-section { margin: 0; padding: 44px 28px 52px; background: #f7f8fa; text-align: right; }
.home-discover .latest-articles-section .section-title { font-size: 24px !important; }
.home-discover .latest-articles-section .section-subtitle { font-size: 12px !important; color: var(--home-muted) !important; margin: 0 !important; }
.home-discover .articles-row { display: grid; grid-template-columns: 1.15fr 1fr 1fr; grid-template-rows: repeat(2, auto); gap: 20px; }
.home-discover .article-card { width: auto; min-width: 0; display: grid; grid-template-columns: 100px minmax(0, 1fr); align-content: start; gap: 5px 14px; padding: 0 0 15px; border-radius: 0; border: 0; border-bottom: 1px solid #dfe4e9; background: transparent; box-shadow: none; text-align: right; }
.home-discover .article-card:hover { transform: none; }
.home-discover .article-card:hover h3, .home-discover .article-card:focus-visible h3 { color: #8a6308; }
.home-discover .article-card img { width: 100px; height: 95px; grid-row: 1 / 4; object-fit: cover; border-radius: 10px; margin: 0; }
.home-discover .article-card h3 { height: auto; margin: 0; font-size: 12px; line-height: 1.9; color: var(--home-ink); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.home-discover .article-card p { margin: 0; color: var(--home-muted); font-size: 10px; line-height: 1.9; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.home-discover .article-read-more { margin: 3px 0 0; font-size: 10px; color: #6d550e; }
.home-discover .article-card:first-child { grid-row: span 2; display: flex; flex-direction: column; border-bottom: 0; padding: 0; }
.home-discover .article-card:first-child img { width: 100%; height: auto; aspect-ratio: 16/9; margin: 0 0 10px; }
.home-discover .article-card:first-child h3 { font-size: 16px; }
.home-discover .article-card:first-child p { font-size: 11px; }
.home-discover .consultation-section { padding: 48px 28px; background: #fff; }
.home-discover .consultation-inner { display: grid; grid-template-columns: 1fr 300px; max-width: 1180px; padding: 30px 40px; margin: 0 auto; gap: 40px; border: 1px solid #ece5d2; border-radius: 22px; background: #fcf8ed; }
.home-discover .consultation-content { min-width: 0; }
.home-discover .consultation-content h2 { max-width: 580px; margin: 6px 0 14px; font-size: 24px; line-height: 1.8; color: var(--home-ink); }
.home-discover .consultation-content ul { display: flex; flex-wrap: wrap; gap: 6px 22px; padding-right: 16px; margin: 0 0 20px; font-size: 11px; color: #657080; }
.home-discover .consultation-content li { margin: 0; }
.home-discover .consultation-image img { display: block; max-width: 100%; max-height: 210px; object-fit: contain; }
.home-discover .cta-button { display: inline-flex; align-items: center; gap: 28px; padding: 10px 18px; font-size: 12px; box-shadow: none; color: #2f301f; }
@media (max-width: 1100px) {
  /* Override the shared responsive auto-fit rule only on this homepage. */
  body.hmz-website .home-discover .teacher-cards-container { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; padding-inline: 0 !important; }
  .home-discover .home-course-grid { gap: 12px; }
  .home-discover .articles-row { grid-template-columns: 1fr 1fr; }
  .home-discover .article-card:first-child { grid-row: span 4; }
  .home-discover .how-to-use-section .section-inner { gap: 28px; }
  .home-discover .video-thumbs { max-height: 320px; }
}
@media (max-width: 800px) {
  .home-discover .home-events-rail { grid-auto-columns: calc((100% - 14px) / 2); }
  body.hmz-website .home-discover .teacher-cards-container { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 15px !important; }
  .home-discover .home-course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .home-discover .home-section-heading, .home-discover .home-courses-head { align-items: flex-start; gap: 14px; flex-wrap: wrap; }
  .home-discover .videos-inner { grid-template-columns: 1fr; gap: 20px; }
  .home-discover .video-thumbs { flex-direction: row; max-height: none; overflow-x: auto; padding: 0 0 12px; scroll-snap-type: x mandatory; }
  .home-discover .thumb { width: 240px; min-width: 240px; scroll-snap-align: start; }
  .home-discover .how-to-use-section .section-inner { grid-template-columns: 1fr; }
  .home-discover .consultation-inner { grid-template-columns: 1fr 180px; padding: 24px; gap: 22px; }
  .home-discover .consultation-content h2 { font-size: 21px; }
}
@media (max-width: 540px) {
  .home-discover .home-events { padding: 32px 16px 24px; }
  .home-discover .home-events-rail { grid-auto-columns: 82%; }
  .home-discover .suggested-teachers-section, .home-discover .home-courses, .home-discover .how-to-use-section,
  .home-discover .latest-articles-section, .home-discover .consultation-section { padding: 32px 16px; }
  body.hmz-website .home-discover .teacher-cards-container { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px !important; }
  .home-discover .teacher-card { padding: 5px; border-radius: 13px; }
  .home-discover .teacher-info { padding: 9px 4px 3px; }
  .home-discover .teacher-name { font-size: 12px; }
  .home-discover .teachers-videos-dark { padding: 0 12px 32px; }
  .home-discover .home-video-shell { padding: 20px 16px; border-radius: 18px; }
  .home-discover .teachers-videos-dark .section-title { font-size: 20px; }
  .home-discover .home-video-label { display: none; }
  .home-discover .home-courses-head { flex-direction: column; }
  .home-discover .home-course-grid { gap: 10px; }
  .home-discover .course-card-body { padding: 10px; }
  .home-discover .course-card-body h3 { font-size: 12px; min-height: 41px; }
  .home-discover .course-card-body p { display: none; }
  .home-discover .course-card-meta { flex-wrap: wrap; }
  .home-discover .course-card-meta strong { font-size: 10px; }
  .home-discover .course-card-meta .home-course-price { font-size: 17px; gap: 3px; }
  .home-discover .home-course-price small { font-size: 9px; }
  .home-discover .home-course-pricing { align-items: flex-start; flex-direction: column; gap: 4px; min-height: 76px; }
  .home-discover .home-course-format { font-size: 9px; }
  .home-discover .home-course-discount { top: auto; bottom: 8px; left: auto; right: 8px; padding: 4px 7px; font-size: 12px; }
  .home-discover .step-box img { width: 96px; height: 96px; }
  .home-discover .curved-steps-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-discover .articles-row { grid-template-columns: 1fr; }
  .home-discover .article-card:first-child { grid-row: auto; }
  .home-discover .consultation-inner { grid-template-columns: 1fr; padding: 22px; gap: 18px; }
  .home-discover .consultation-image { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .home-discover *, .home-discover *::before, .home-discover *::after { transition: none !important; scroll-behavior: auto !important; }
}
