/* Evaz Online Academy: inner pages, content, tables and forms (Phase 5).
   Extends evaz.css (the prototype). Logical properties only, so right-to-left works without extra rules. */

/* ---------- inner page header ---------- */
.page-hero { background: var(--evaz-emerald); color: var(--evaz-ivory); padding-block: 28px 36px; position: relative; overflow: hidden; }
.page-hero h1 { color: var(--evaz-ivory); font-size: clamp(1.8rem, 1.3rem + 2.2vw, 2.8rem); margin-block-end: .3em; }
:root:lang(ps) .page-hero h1, :root:lang(fa) .page-hero h1 { line-height: 1.6; }
.page-hero__lead { color: #E3EEE8; font-size: 1.08rem; max-width: 46em; margin: 0; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; font-size: .85rem; margin-block-end: 10px; color: var(--evaz-mint); }
.crumbs li + li::before { content: "/"; margin-inline: .5em; opacity: .6; }
.crumbs a { color: var(--evaz-gold-light); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.page-body { padding-block: 36px 56px; }

/* ---------- prose (page content from the editor) ---------- */
.prose { max-width: 820px; }
.prose > * + * { margin-block-start: 1em; }
.prose h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem); margin-block: 1.6em .5em; }
.prose h3 { margin-block: 1.4em .4em; }
.prose p { margin-block-end: 0; }
.prose ul, .prose ol { padding-inline-start: 0; display: grid; gap: .55em; }
.prose ul > li { position: relative; padding-inline-start: 1.4em; }
.prose ul > li::before { content: ""; position: absolute; inset-inline-start: .2em; top: .7em; width: .45em; height: .45em; border-radius: 50%; background: var(--evaz-gold); }
.prose ol { counter-reset: n; }
.prose ol > li { position: relative; padding-inline-start: 2.2em; counter-increment: n; }
.prose ol > li::before { content: counter(n); position: absolute; inset-inline-start: 0; top: .15em; width: 1.6em; height: 1.6em; border-radius: 50%; background: var(--evaz-emerald); color: var(--evaz-gold-light); font-size: .85em; font-weight: 700; display: grid; place-items: center; line-height: 1; }
.prose a { color: var(--evaz-emerald-700); font-weight: 500; }
.prose .course-grid, .prose .contact__list { list-style: none; }
.prose .course-grid > li, .prose .contact__list > li, .prose .teacher-cards > li, .prose .chips li, .prose .choices li { padding-inline-start: 0; }
.prose .course-grid > li::before, .prose .contact__list > li::before, .prose .teacher-cards > li::before, .prose .chips li::before { display: none; }
.evaz-note, .prose .evaz-note { background: var(--evaz-white); border-inline-start: 4px solid var(--evaz-gold); border-radius: 8px; padding: 14px 18px; box-shadow: var(--shadow); }
.evaz-note p { margin: 0; }
.evaz-empty { background: var(--evaz-mint); border-radius: 12px; padding: 16px 20px; color: var(--evaz-emerald); }
.draft-banner { display: flex; gap: 10px; align-items: flex-start; max-width: 820px; background: #FFF6DE; border: 1px solid var(--evaz-gold); color: #5A4410; border-radius: 10px; padding: 12px 16px; margin: 0 0 24px; font-weight: 500; }
.draft-banner .icon { color: var(--evaz-gold-deep); margin-block-start: .25em; }
.nowrap { white-space: nowrap; }

/* ---------- course facts ---------- */
.facts { background: var(--evaz-white); border: 1px solid var(--evaz-line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.facts__head { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; margin-block-end: 10px; }
.facts__title { font-family: var(--font-body); font-size: 1.05rem !important; margin: 0 !important; }
.facts__list { display: grid; gap: 10px; margin: 0; }
.facts__list div { display: grid; gap: 2px; border-top: 1px solid var(--evaz-line); padding-top: 8px; }
.facts__list dt { font-size: .82rem; color: var(--evaz-stone); font-weight: 600; }
.facts__list dd { margin: 0; font-weight: 500; }
.badge--pilot, .badge--waitlist { background: var(--evaz-gold-light); }
.badge--open { background: var(--evaz-mint); color: var(--evaz-emerald); }
.badge--later { background: #ECE8DC; color: var(--evaz-stone); }

/* ---------- call to action inside pages ---------- */
.cta-inline { display: grid; gap: 16px; align-items: center; background: var(--evaz-emerald-700); color: var(--evaz-ivory); border-radius: 20px; padding: 24px; margin-block-start: 2em !important; }
.cta-inline h2 { color: var(--evaz-white); margin: 0 0 .3em !important; font-size: 1.4rem; }
.cta-inline p { color: #E3EEE8; margin: 0; }

/* ---------- tables (fees, timetable) ---------- */
.table-wrap { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--evaz-line); border-radius: 12px; background: var(--evaz-white); }
.evaz-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.evaz-table th, .evaz-table td { padding: 12px 14px; text-align: start; vertical-align: top; border-bottom: 1px solid var(--evaz-line); }
.evaz-table thead th { background: var(--evaz-mint); color: var(--evaz-emerald); font-weight: 700; font-size: .85rem; white-space: nowrap; }
.evaz-table tbody tr:last-child > * { border-bottom: 0; }
.evaz-table a { text-decoration: none; }

/* ---------- FAQ page ---------- */
.chips ul { display: flex !important; flex-wrap: wrap; gap: 8px !important; }
.chips a { display: inline-flex; align-items: center; min-height: 40px; padding: 4px 14px; border-radius: 999px; background: var(--evaz-white); border: 1px solid var(--evaz-line); text-decoration: none; font-weight: 500; }
.chips a:hover { border-color: var(--evaz-gold); }
.faq--page h2 { scroll-margin-top: 100px; }
.faq--page .faq__list { display: grid; gap: 10px; }
.faq--page details { background: var(--evaz-white); border: 1px solid var(--evaz-line); border-radius: 12px; }
.faq--page summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 12px 18px; cursor: pointer; font-weight: 600; list-style: none; color: var(--evaz-emerald); }
.faq--page summary::-webkit-details-marker { display: none; }
.faq--page summary .chev { transition: transform .2s; color: var(--evaz-gold-deep); }
.faq--page details[open] summary .chev { transform: rotate(180deg); }
.faq--page details p { padding: 0 18px 16px; margin: 0; }

/* ---------- contact card, teachers ---------- */
.contact-card { background: var(--evaz-white); border: 1px solid var(--evaz-line); border-radius: var(--radius); padding: 20px; }
.contact-card .contact__list { grid-template-columns: 1fr; }
.contact__list a { text-decoration: none; color: inherit; border-bottom: 1px solid var(--evaz-line); }
.teacher-cards--real .teacher-card { border-style: solid; border-color: var(--evaz-line); }
.tile--photo { overflow: hidden; }
.tile--photo img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- forms ---------- */
.evaz-form { background: var(--evaz-white); border: 1px solid var(--evaz-line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); scroll-margin-top: 90px; }
.form-grid { display: grid; gap: 18px; }
.form-consents { display: grid; gap: 12px; margin-block-start: 22px; padding-block-start: 18px; border-top: 1px solid var(--evaz-line); }
.field { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field > label, .field > legend { font-weight: 600; color: var(--evaz-ink); padding: 0; }
.field > legend { margin-block-end: 6px; }
.field__opt { font-weight: 400; color: var(--evaz-stone); font-size: .9em; }
.field__help { margin: 0; font-size: .88rem; color: var(--evaz-stone); }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field input[type="number"], .field input[type="url"], .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 10px 14px; font: inherit; font-size: 1rem; color: var(--evaz-ink);
  background: var(--evaz-ivory); border: 1.5px solid #C9C2AE; border-radius: 10px;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--evaz-gold); outline-offset: 1px; border-color: var(--evaz-emerald-700); background: var(--evaz-white); }
.field input[dir="ltr"] { text-align: start; }
:root[dir="rtl"] .field input[dir="ltr"] { text-align: right; }
.choices { display: grid; gap: 8px; }
.choice { display: flex; gap: 10px; align-items: flex-start; min-height: 44px; padding: 10px 12px; border: 1.5px solid var(--evaz-line); border-radius: 10px; background: var(--evaz-ivory); cursor: pointer; font-weight: 400; }
.choice:hover { border-color: var(--evaz-gold); }
.choice input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--evaz-emerald-700); }
.choice:has(input:checked) { border-color: var(--evaz-emerald-700); background: var(--evaz-mint); }
.choice--consent { background: transparent; border: 0; padding: 4px 0; }
.has-error input, .has-error select, .has-error textarea { border-color: #B3261E; }
.has-error .choices .choice { border-color: #E3A39E; }
.field__error { margin: 0; color: #B3261E; font-weight: 600; font-size: .92rem; }
.form-summary { background: #FDECEA; border: 1px solid #E3A39E; color: #7A1A14; border-radius: 10px; padding: 12px 16px; margin-block-end: 18px; font-weight: 600; }
.form-summary ul { margin-block-start: 6px; padding-inline-start: 1.2em; list-style: disc; font-weight: 400; }
.form-summary a { color: #7A1A14; }
.form-draft { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: .85rem; color: var(--evaz-gold-deep); }
.form-draft .icon { margin-block-start: .2em; }
.form-privacy { font-size: .88rem; color: var(--evaz-stone); margin: 18px 0 0; }
.form-actions { margin: 16px 0 0; }
.form-actions .btn { width: 100%; }
.evaz-form[aria-busy="true"] .btn { opacity: .7; pointer-events: none; }
.hp { position: absolute !important; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
[data-show-if][hidden] { display: none !important; }
.form-success { display: flex; gap: 14px; align-items: flex-start; background: var(--evaz-mint); border: 1px solid #B9D5C8; border-radius: var(--radius); padding: 20px; }
.form-success > .icon { width: 32px; height: 32px; color: var(--evaz-emerald-700); flex: none; }
.form-success h3 { margin: 0 0 .3em; }
.form-success p { margin: 0 0 .4em; }
.cf-turnstile { margin-block-start: 16px; }

/* ---------- breakpoints ---------- */
@media (min-width: 600px) {
  .form-grid { grid-template-columns: 1fr 1fr; column-gap: 16px; }
  .form-grid > .field { grid-column: 1 / -1; }
  .form-grid > .field--half { grid-column: auto; }
  .field--radio .choices, .field--checkboxes .choices { grid-template-columns: 1fr 1fr; }
  .form-actions .btn { width: auto; }
  .evaz-form { padding: 28px; }
  .facts__list { grid-template-columns: 1fr 1fr; column-gap: 20px; }
  .cta-inline { grid-template-columns: 1fr auto; padding: 28px 32px; }
  .prose .course-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .page-hero { padding-block: 44px 52px; }
  .page-body { padding-block: 48px 80px; }
  .facts__list { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1100px) {
  .prose .course-grid { grid-template-columns: 1fr 1fr; }
}
@media print {
  .topbar, .site-header, .langbar, .mobile-cta, .contact, .site-footer nav, .evaz-form { display: none !important; }
  body { background: #fff; padding: 0; }
}
.safeguard a, .site-footer__base a { color: var(--evaz-gold-light); }

/* Long placeholders in page text (e.g. "[Legal name of the entity…]") wrap instead of widening the page. */
.prose .ph, .facts .ph, td .ph, .form .ph { white-space: normal; overflow-wrap: anywhere; }
