/*
  Teaching World — home page (v2).
  Concept: a corrected worksheet. Cool graph paper, deep ink, a pencil-yellow call to action and ONE red-pen device:
  the teacher's ticks that draw themselves next to the hero checklist. Everything else stays quiet and flat.
  Every rule is prefixed with .hv2 so the theme's element selectors (h1..h6, ul, a ...) cannot leak in.
  Dark mode follows the theme switcher (.active-dark-mode). RTL first.
*/
@font-face {
    font-family: "EstedadV";
    src: url("/static/assets/aghdasi-typo/typography/woff2/estedad.woff2") format("woff2");
    font-weight: 100 900;
    font-display: swap;
}

.hv2 {
    --ink: #13233f;
    --paper: #eef3fa;
    --grid: #d9e3f2;
    --surface: #ffffff;
    --blue: #2f57ef;
    --pencil: #ffc83d;
    --pen: #e5484d;
    --body: #4b5870;
    --line: #dce4f0;
    --muted: #75819a;
    --display: "EstedadV", "vazirmatn", "IranSans", sans-serif;
    font-family: "vazirmatn", "IranSans", sans-serif;
    color: var(--body);
    background: var(--surface);
    line-height: 1.9;
    overflow-x: clip;
}
.active-dark-mode .hv2 {
    --ink: #eaf0ff;
    --paper: #0e1830;
    --grid: #1a2849;
    --surface: #111c38;
    --blue: #86a2ff;
    --body: #b6c2db;
    --line: #243459;
    --muted: #8a98b8;
}

.hv2 *, .hv2 *::before, .hv2 *::after { box-sizing: border-box; }
.hv2 img { max-width: 100%; height: auto; display: block; }
.hv2 h1, .hv2 h2, .hv2 h3, .hv2 p, .hv2 ul, .hv2 figure, .hv2 blockquote { margin: 0; padding: 0; }
.hv2 ul { list-style: none; }
.hv2 a { text-decoration: none; }
.hv2 a:focus-visible, .hv2 .hv2-voices:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

.hv2 .hv2-wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }
.hv2 .hv2-section { padding: clamp(56px, 8vw, 104px) 0; background: var(--surface); }
.hv2 .hv2-paper { background: var(--paper); }

/* type */
.hv2 .hv2-display { font-family: var(--display); font-weight: 800; color: var(--ink); font-size: clamp(34px, 5vw, 62px); line-height: 1.4; max-width: 17ch; }
.hv2 .hv2-h2 { font-family: var(--display); font-weight: 700; color: var(--ink); font-size: clamp(26px, 3.2vw, 38px); line-height: 1.5; }
.hv2 .hv2-h2-xl { font-size: clamp(28px, 4vw, 48px); font-weight: 800; line-height: 1.5; }
.hv2 .hv2-h3 { font-family: var(--display); font-weight: 700; color: var(--ink); font-size: 21px; line-height: 1.6; }
.hv2 .hv2-lead { font-size: 18px; line-height: 2.1; max-width: 62ch; }
.hv2 .hv2-kicker { color: var(--blue); font-weight: 700; font-size: 17px; margin-bottom: 8px; }
.hv2 .hv2-muted { color: var(--muted); }
.hv2 .hv2-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 40px; }
.hv2 .hv2-link { color: var(--blue); font-weight: 700; text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; text-decoration-color: color-mix(in srgb, var(--blue) 35%, transparent); white-space: nowrap; }
.hv2 .hv2-link:hover { text-decoration-color: var(--blue); }
.hv2 .hv2-cover { color: inherit; }
.hv2 .hv2-cover::after { content: ""; position: absolute; inset: 0; z-index: 1; }

/* buttons */
.hv2 .hv2-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 12px 30px; border-radius: 10px; font-weight: 800; font-size: 16px; line-height: 1.4; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.hv2 .hv2-btn-pencil { background: var(--pencil); color: #13233f; box-shadow: 0 4px 0 #c8981b; }
.hv2 .hv2-btn-pencil:hover { transform: translateY(2px); box-shadow: 0 2px 0 #c8981b; color: #13233f; }
.hv2 .hv2-btn-ink { background: var(--ink); color: var(--surface); width: 100%; }
.hv2 .hv2-btn-ink:hover { background: var(--blue); color: #fff; }
.active-dark-mode .hv2 .hv2-btn-ink:hover { color: #0e1830; }

/* ───────── hero ───────── */
.hv2 .hv2-hero { position: relative; background: var(--paper); padding: clamp(40px, 6vw, 88px) 0 clamp(64px, 8vw, 112px); isolation: isolate; }
.hv2 .hv2-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 36px 36px; -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
.hv2 .hv2-hero-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.hv2 .hv2-hero-text { display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }
.hv2 .hv2-checks { width: 100%; max-width: 520px; border-top: 1px solid var(--line); }
.hv2 .hv2-checks li { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); color: var(--ink); font-weight: 600; font-size: 17px; }
.hv2 .hv2-tick { flex: 0 0 28px; width: 28px; height: 28px; fill: none; stroke: var(--pen); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 32; stroke-dashoffset: 32; animation: hv2-draw .55s cubic-bezier(.3, .7, .3, 1) forwards; animation-delay: calc(.5s + var(--i, 0) * .4s); }
@keyframes hv2-draw { to { stroke-dashoffset: 0; } }
.hv2 .hv2-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 8px; }

.hv2 .hv2-hero-photo { position: relative; justify-self: center; width: min(100%, 460px); }
.hv2 .hv2-frame { position: relative; background: #fff; padding: 12px 12px 12px; border-radius: 6px; box-shadow: 0 18px 40px -18px rgba(19, 35, 63, .45); transform: rotate(-2.2deg); }
.hv2 .hv2-frame::before { content: ""; position: absolute; top: -14px; left: 50%; width: 110px; height: 30px; margin-left: -55px; background: rgba(255, 200, 61, .78); transform: rotate(3deg); }
.hv2 .hv2-frame img { width: 100%; aspect-ratio: 8 / 9; object-fit: cover; border-radius: 2px; background: var(--grid); }
.hv2 .hv2-caption { position: absolute; bottom: -22px; inset-inline-end: -10px; display: flex; align-items: center; gap: 10px; padding: 8px 18px 8px 10px; border-radius: 999px; background: var(--ink); color: var(--surface); font-size: 15px; box-shadow: 0 10px 24px -10px rgba(19, 35, 63, .6); }
.hv2 .hv2-caption img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--pencil); }

/* ───────── weekly classes ───────── */
.hv2 .hv2-classes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.hv2 .hv2-classes:has(> :nth-child(3)) { grid-template-columns: 1.5fr 1fr 1fr; }
.hv2 .hv2-class { position: relative; display: flex; flex-direction: column; gap: 14px; }
.hv2 .hv2-class-img { overflow: hidden; border-radius: 12px; background: var(--paper); }
.hv2 .hv2-class-img img { width: 100%; height: clamp(200px, 22vw, 290px); object-fit: cover; }
.hv2 .hv2-more { color: var(--blue); font-weight: 700; text-decoration: underline; text-underline-offset: 6px; text-decoration-color: color-mix(in srgb, var(--blue) 35%, transparent); width: fit-content; }
.hv2 .hv2-class:hover .hv2-more { text-decoration-color: var(--blue); }

/* ───────── why us ───────── */
.hv2 .hv2-why { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.hv2 .hv2-why-text { display: flex; flex-direction: column; gap: 18px; }
.hv2 .hv2-rules { border-top: 1px solid var(--line); }
.hv2 .hv2-rules li { display: flex; align-items: center; gap: 18px; padding: 20px 0; border-bottom: 1px solid var(--line); color: var(--ink); font-weight: 700; font-size: 18px; }
.hv2 .hv2-ico { flex: 0 0 52px; width: 52px; height: 52px; display: grid; place-items: center; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--blue); font-size: 24px; }
.hv2 .hv2-ico img { max-width: 30px; max-height: 30px; }

/* ───────── blog index ───────── */
.hv2 .hv2-index { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: clamp(32px, 6vw, 80px); border-top: 1px solid var(--line); }
.hv2 .hv2-index-row { position: relative; display: grid; grid-template-columns: 88px 1fr auto; align-items: center; gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.hv2 .hv2-index-img { width: 88px; height: 88px; object-fit: cover; border-radius: 12px; background: var(--paper); }
.hv2 .hv2-index-body p { margin-top: 4px; font-size: 15px; line-height: 1.9; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hv2 .hv2-index-row:hover .hv2-h3 { color: var(--blue); }
.hv2 .hv2-index-arrow { color: var(--blue); font-size: 22px; transition: transform .2s ease; }
.hv2 .hv2-index-row:hover .hv2-index-arrow { transform: translateX(-6px); }
.hv2 .hv2-index-row:not(:has(img)) { grid-template-columns: 1fr auto; }

/* ───────── cooperation band (markup lives in collaborations/_home_section.html) ───────── */
.hv2 .hv2-coop { background: #13233f; color: #c9d4ea; padding: clamp(56px, 8vw, 104px) 0; }
.active-dark-mode .hv2 .hv2-coop { background: #0a1224; }
.hv2 .hv2-coop-intro { display: flex; flex-direction: column; gap: 14px; max-width: 760px; margin-bottom: 48px; }
.hv2 .hv2-coop .hv2-h2 { color: #fff; }
.hv2 .hv2-coop .hv2-lead { color: #c9d4ea; }
.hv2 .hv2-coop .hv2-kicker { color: var(--pencil); }
.hv2 .hv2-coop-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(255, 255, 255, .16); }
.hv2 .hv2-coop-stage { display: flex; flex-direction: column; gap: 10px; padding: 28px 0 28px 28px; }
.hv2 .hv2-coop-stage + .hv2-coop-stage { padding-inline-start: 28px; border-inline-start: 1px solid rgba(255, 255, 255, .16); }
.hv2 .hv2-coop-stage i { font-size: 28px; color: var(--pencil); }
.hv2 .hv2-coop-stage h3 { font-family: var(--display); font-weight: 700; font-size: 22px; color: #fff; }
.hv2 .hv2-coop-stage p { font-size: 15px; line-height: 2; color: #c9d4ea; }
.hv2 .hv2-coop .hv2-btn { margin-top: 32px; }

/* ───────── plans: one joined table ───────── */
.hv2 .hv2-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.hv2 .hv2-plan { display: flex; flex-direction: column; gap: 12px; padding: 34px 30px; background: var(--surface); }
.hv2 .hv2-plan-top { display: flex; align-items: center; gap: 14px; }
.hv2 .hv2-plan-top img { width: 48px; height: 48px; object-fit: contain; }
.hv2 .hv2-price { color: var(--muted); font-size: 15px; }
.hv2 .hv2-price strong { font-family: var(--display); font-weight: 800; font-size: 36px; color: var(--ink); margin-inline-end: 4px; }
.hv2 .hv2-plan-term { color: var(--blue); font-weight: 700; font-size: 15px; }
.hv2 .hv2-plan-list { flex: 1; display: flex; flex-direction: column; gap: 10px; margin: 8px 0 18px; }
.hv2 .hv2-plan-list li { position: relative; padding-inline-start: 26px; font-size: 15.5px; line-height: 1.9; }
.hv2 .hv2-plan-list li::before { content: ""; position: absolute; inset-inline-start: 4px; top: 7px; width: 6px; height: 11px; border: solid var(--blue); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }

/* ───────── teachers ───────── */
.hv2 .hv2-teachers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.hv2 .hv2-teacher img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 14px; background: var(--paper); }
.hv2 .hv2-teacher figcaption { text-align: start; display: flex; flex-direction: column; gap: 2px; padding-top: 16px; }
.hv2 .hv2-teacher strong { font-family: var(--display); font-weight: 700; font-size: 21px; color: var(--ink); }

/* ───────── student voices ───────── */
.hv2 .hv2-voices { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 16px; scrollbar-width: thin; }
.hv2 .hv2-voice::before, .hv2 .hv2-voice::after { content: none; }
.hv2 .hv2-voice { margin: 0; font-style: normal; text-align: start; flex: 0 0 min(430px, 86%); scroll-snap-align: start; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; padding: 30px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.hv2 .hv2-voice p { font-style: normal; color: var(--ink); font-size: 17px; line-height: 2.1; }
.hv2 .hv2-voice * { font-style: normal; }
.hv2 .hv2-voice footer { font-size: 15px; display: flex; align-items: center; gap: 14px; }
.hv2 .hv2-voice footer img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.hv2 .hv2-voice footer span { display: flex; flex-direction: column; line-height: 1.6; }
.hv2 .hv2-voice strong { color: var(--ink); font-size: 16px; }

/* ───────── in-person class photos ───────── */
.hv2 .hv2-mosaic { column-count: 3; column-gap: 18px; }
.hv2 .hv2-shot { position: relative; break-inside: avoid; margin-bottom: 18px; border-radius: 12px; overflow: hidden; background: var(--paper); }
.hv2 .hv2-shot img { width: 100%; }
.hv2 .hv2-shot figcaption { text-align: start; position: absolute; inset: auto 0 0 0; display: flex; flex-direction: column; gap: 2px; padding: 44px 18px 16px; color: #fff; background: linear-gradient(transparent, rgba(10, 18, 36, .86)); font-size: 14px; line-height: 1.8; }
.hv2 .hv2-shot strong { font-size: 17px; }

/* ───────── closing call ───────── */
.hv2 .hv2-final { background: #2f57ef; padding: clamp(48px, 7vw, 80px) 0; }
.hv2 .hv2-final-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 40px; }
.hv2 .hv2-final .hv2-h2 { color: #fff; }

/* ───────── responsive ───────── */
@media (max-width: 991px) {
    .hv2 .hv2-hero-grid, .hv2 .hv2-why { grid-template-columns: 1fr; }
    .hv2 .hv2-hero-photo { order: 2; width: min(100%, 380px); margin-top: 8px; }
    .hv2 .hv2-display { max-width: none; }
    .hv2 .hv2-index { grid-template-columns: 1fr; }
    .hv2 .hv2-coop-grid { grid-template-columns: 1fr; }
    .hv2 .hv2-coop-stage, .hv2 .hv2-coop-stage + .hv2-coop-stage { padding: 24px 0; border-inline-start: 0; }
    .hv2 .hv2-coop-stage + .hv2-coop-stage { border-top: 1px solid rgba(255, 255, 255, .16); }
    .hv2 .hv2-teachers { grid-template-columns: repeat(2, 1fr); }
    .hv2 .hv2-mosaic { column-count: 2; }
}
@media (max-width: 767px) {
    .hv2 .hv2-head { flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 28px; }
    .hv2 .hv2-classes, .hv2 .hv2-classes:has(> :nth-child(3)) { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 16px; padding-bottom: 12px; }
    .hv2 .hv2-class { flex: 0 0 78%; scroll-snap-align: start; }
    .hv2 .hv2-lead { font-size: 16.5px; }
    .hv2 .hv2-index-row { grid-template-columns: 72px 1fr auto; gap: 14px; }
    .hv2 .hv2-index-img { width: 72px; height: 72px; }
    .hv2 .hv2-teachers { grid-template-columns: 1fr; max-width: 360px; }
    .hv2 .hv2-btn { width: 100%; }
    .hv2 .hv2-final-in .hv2-btn { width: auto; }
}
@media (max-width: 520px) {
    .hv2 .hv2-mosaic { column-count: 1; }
    .hv2 .hv2-frame { transform: rotate(-1.4deg); }
}

@media (prefers-reduced-motion: reduce) {
    .hv2 .hv2-tick { animation: none; stroke-dashoffset: 0; }
    .hv2 .hv2-btn, .hv2 .hv2-index-arrow { transition: none; }
}
