/*
Theme Name: KZ Institute
Theme URI: https://kzinstitute.com
Author: Brand Aurum
Description: القالب الخاص بمعهد خميس الزيودي للتدريب — الدورات والتسجيل والتحقق من الشهادات، بالعربية والإنجليزية.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 7.4
Text Domain: kzinstitute
*/

:root {
  --navy: #1A2B4A;
  --navy2: #1E3A6E;
  --gold: #C9A84C;
  --gold2: #E8C96D;
  --gold-text: #8A6D22;
  --bg: #F5F7FA;
  --bg2: #EEF1F7;
  --line: #E2E7F0;
  --ink: #1A2B4A;
  --body: #2D3748;
  --muted: #4A5568;
  --soft: #D5DCE8;
  --green: #1A7A4A;
  --radius: 10px;
  --head: "Tajawal", "Rubik", sans-serif;
  --text: "Rubik", "Tajawal", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--text); color: var(--ink); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: var(--navy2); }
a:hover { color: var(--navy); }
h1, h2, h3, h4 { font-family: var(--head); font-weight: 800; color: inherit; line-height: 1.3; margin: 0; }
p { margin: 0; }
.wrap { max-width: 1240px; margin: 0 auto; padding-inline: 24px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; inset-inline-start: 8px; z-index: 999; width: auto; height: auto; clip: auto; background: #fff; padding: 10px 16px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-family: var(--head); font-weight: 800; font-size: 17px; line-height: 1.2; padding: 15px 28px; border-radius: 6px; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: transform .15s, background .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: var(--gold2); color: var(--navy); }
.btn-ghost { border-color: var(--gold); color: #fff; font-weight: 700; }
.btn-ghost:hover { color: #fff; background: rgba(201,168,76,.12); }
.btn-navy { background: var(--navy); color: #fff; font-weight: 700; }
.btn-navy:hover { color: #fff; background: var(--navy2); }
.btn-outline { border-color: var(--navy); color: var(--navy); font-weight: 700; background: transparent; }
.btn-wa { border-color: var(--green); color: var(--green); font-weight: 700; }
.btn-sm { font-size: 15px; padding: 11px 18px; }
.btn-block { width: 100%; }

/* Header */
.site-header { background: var(--navy); border-bottom: 1px solid rgba(201,168,76,.25); position: relative; z-index: 20; }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { height: 52px; width: auto; }
.brand-name { display: flex; flex-direction: column; gap: 2px; }
.brand-name b { font-family: var(--head); font-weight: 800; font-size: 18px; color: #fff; }
.brand-name small { font-size: 11px; color: var(--gold2); }
.main-nav { flex: 1 1 420px; display: flex; justify-content: center; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 22px; }
.main-nav a { color: #fff; text-decoration: none; font-size: 15px; display: block; padding: 10px 0; }
.main-nav a:hover, .main-nav .current a { color: var(--gold2); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.lang-switch { color: var(--gold2); text-decoration: none; font-size: 14px; font-weight: 500; padding: 10px 6px; }
.lang-switch:hover { color: #fff; }
.nav-toggle { display: none; background: none; border: 1px solid rgba(255,255,255,.3); color: #fff; border-radius: 6px; padding: 9px 11px; cursor: pointer; }
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; margin-inline-start: auto; }
  .brand-name small { display: none; }
  .main-nav { order: 5; flex-basis: 100%; display: none; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; padding-block: 6px 12px; }
  .main-nav a { padding: 12px 0; border-top: 1px solid rgba(255,255,255,.08); }
  .header-actions .btn { display: none; }
}

/* Hero */
.hero { background: var(--navy); color: #fff; overflow: hidden; }
.hero .wrap { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 40px; padding-top: 64px; }
.hero-copy { flex: 1 1 480px; min-width: 0; padding-bottom: 64px; }
.eyebrow { color: var(--gold2); font-size: 14px; margin-bottom: 18px; }
.hero h1 { font-size: clamp(34px, 4.6vw, 54px); line-height: 1.22; }
.hero-lead { margin-top: 22px; font-size: 18px; line-height: 1.85; color: var(--soft); max-width: 560px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-art { flex: 1 1 420px; min-width: 0; }
.hero-art svg, .hero-art img { display: block; width: 100%; height: auto; }

/* Trust strip */
.trust { background: #fff; border-bottom: 1px solid var(--line); }
.trust .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; padding-block: 28px; }
.trust-item { border-inline-start: 2px solid var(--gold); padding-inline-start: 14px; display: flex; flex-direction: column; gap: 4px; }
.trust-item b { font-family: var(--head); font-weight: 800; font-size: 22px; }
.trust-item span { font-size: 14px; color: var(--muted); }

/* Sections */
.section { padding-block: 80px; }
.section-white { background: #fff; border-block: 1px solid var(--line); }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 36px; }
.kicker { color: var(--gold-text); font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.section h2 { font-size: clamp(28px, 3vw, 38px); }
.link-more { font-weight: 600; font-size: 16px; padding: 10px 0; }

/* Course cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.card { display: flex; flex-direction: column; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; text-decoration: none; color: var(--ink); overflow: hidden; transition: box-shadow .2s, transform .2s; }
a.card:hover { color: var(--ink); box-shadow: 0 12px 32px rgba(26,43,74,.10); transform: translateY(-2px); }
.card-art { display: block; margin: -26px -26px 6px; background: var(--navy); padding: 22px 30px 0; }
.card-art img { display: block; width: 100%; height: auto; aspect-ratio: 56 / 34; }
.card-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.card-cat { color: var(--gold-text); font-weight: 600; }
.badge { border-radius: 4px; padding: 3px 9px; font-weight: 600; font-size: 13px; white-space: nowrap; }
.badge-open { background: #E6F2EC; color: var(--green); }
.badge-soon { background: #F6EFDC; color: var(--gold-text); }
.card h3 { font-size: 23px; line-height: 1.35; }
.card-en { font-size: 13px; color: var(--muted); }
.card-sub { font-size: 15px; color: var(--muted); line-height: 1.7; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--bg2); }
.pill { background: var(--bg2); border-radius: 4px; padding: 5px 10px; font-size: 13px; }
.card-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.price { display: flex; flex-direction: column; gap: 2px; }
.price b { font-family: var(--head); font-weight: 800; font-size: 20px; }
.price small { font-size: 12px; color: var(--muted); }
.card-link { font-family: var(--head); font-weight: 700; font-size: 16px; color: var(--navy2); }
.card-soon { background: #FBFCFD; border-style: dashed; border-color: #B8C2D3; }
.card-soon h3 { font-size: 21px; }

/* Filter chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip { font-family: var(--head); font-weight: 700; font-size: 15px; padding: 11px 18px; border-radius: 999px; cursor: pointer; background: #fff; color: var(--navy); border: 1px solid #C9D1DE; }
.chip[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.chip span { opacity: .75; font-size: 13px; }

/* Page hero */
.page-hero { background: var(--navy); color: #fff; border-top: 1px solid rgba(201,168,76,.25); }
.page-hero .wrap { padding-block: 48px 52px; }
.page-hero h1 { font-size: clamp(32px, 4vw, 46px); }
.page-hero p.lead { margin-top: 14px; font-size: 17px; line-height: 1.8; color: var(--soft); max-width: 680px; }
.crumbs { font-size: 14px; color: #B8C2D3; margin-bottom: 26px; display: flex; flex-wrap: wrap; gap: 8px; }
.crumbs a { color: var(--soft); }

/* Course single */
.course-hero .wrap { padding-block: 36px 56px; }
.course-hero-top { display: flex; flex-wrap: wrap; align-items: center; gap: 32px; }
.course-hero-copy { flex: 1 1 480px; min-width: 0; }
.course-hero h1 { font-size: clamp(34px, 4.4vw, 52px); }
.course-hero .subtitle { margin-top: 10px; font-size: 21px; }
.tagline { display: inline-block; margin-top: 18px; background: var(--gold); color: var(--navy); font-family: var(--head); font-weight: 800; font-size: 16px; padding: 7px 14px; border-radius: 4px; }
.course-hero-art { flex: 1 1 360px; min-width: 0; max-width: 520px; }
.course-hero-art img { display: block; width: 100%; height: auto; aspect-ratio: 56 / 34; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-top: 40px; border-top: 1px solid rgba(255,255,255,.18); }
.stats div { padding: 18px 18px 0 0; display: flex; flex-direction: column; gap: 4px; }
.stats b { font-family: var(--head); font-weight: 800; font-size: 28px; }
.stats span { font-size: 14px; color: var(--soft); }
.course-layout { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; padding-block: 48px 80px; }
.course-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 56px; }
.course-main h2 { font-size: 30px; margin-bottom: 18px; }
.prose p { font-size: 17px; line-height: 1.95; color: var(--body); margin-bottom: 14px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-top: 24px; }
.fact { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; }
.fact small { display: block; font-size: 13px; color: var(--muted); }
.fact b { display: block; margin-top: 4px; font-weight: 600; }
.outcomes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; counter-reset: o; }
.outcomes li { counter-increment: o; display: flex; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; font-size: 16px; line-height: 1.75; }
.outcomes li::before { content: counter(o); flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: var(--gold2); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; }
.timeline { border-inline-start: 2px solid var(--gold); margin-inline-start: 12px; }
.timeline-item { position: relative; padding: 0 24px 26px; }
.timeline-item::before { content: ""; position: absolute; inset-inline-start: -9px; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 2px solid var(--gold); }
.timeline-item small { font-size: 13px; color: var(--gold-text); font-weight: 600; }
.timeline-item h3 { font-size: 21px; margin-top: 4px; }
.timeline-item p { font-size: 15px; color: var(--muted); margin-top: 4px; }
.aud { display: flex; flex-wrap: wrap; gap: 10px; }
.aud span { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 10px 18px; font-size: 15px; }
.project { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 32px; }
.project h2 { font-size: 26px !important; margin-bottom: 14px !important; }
.project p { font-size: 16px; line-height: 1.85; color: var(--soft); }
.trainer-mini { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.trainer-mini img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; object-position: top; border: 2px solid var(--gold); flex: none; }
.trainer-mini b { font-family: var(--head); font-weight: 800; font-size: 21px; display: block; }
.trainer-mini em { font-style: normal; color: var(--gold-text); font-weight: 600; font-size: 14px; }
.trainer-mini p { margin-top: 8px; font-size: 15px; line-height: 1.8; color: var(--muted); }
.side-card { flex: 1 1 320px; min-width: 0; position: sticky; top: 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; gap: 16px; }
.side-card .fee b { display: block; font-family: var(--head); font-weight: 800; font-size: 32px; margin-top: 4px; }
.side-card small { font-size: 13px; color: var(--muted); }
.side-rows { border-top: 1px solid var(--bg2); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.side-rows div { display: flex; justify-content: space-between; gap: 10px; }
.side-rows span { color: var(--muted); }
.side-rows b { font-weight: 600; text-align: end; }
.side-rows .soon { color: var(--gold-text); }
@media (max-width: 960px) { .side-card { position: static; order: -1; } }

/* Forms */
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.panel h2 { margin-bottom: 6px; }
.panel .lead { font-size: 15px; color: var(--muted); margin-bottom: 24px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; }
.field label small { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea { font-family: var(--text); font-size: 16px; padding: 13px 14px; border: 1px solid #9AA6BA; border-radius: 6px; background: #fff; color: var(--ink); width: 100%; }
.field textarea { min-height: 120px; resize: vertical; }
.field-full { grid-column: 1 / -1; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.7; color: var(--body); }
.check input { width: 20px; height: 20px; margin-top: 3px; flex: none; }
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { border-radius: 8px; padding: 16px 18px; font-size: 16px; line-height: 1.7; margin-bottom: 20px; }
.notice-ok { background: #E6F2EC; color: #145C38; border: 1px solid #B9DCC9; }
.notice-err { background: #FBECEA; color: #8E2A1F; border: 1px solid #EDC2BC; }
.verify-form { display: flex; flex-wrap: wrap; gap: 10px; }
.verify-form input { flex: 1 1 200px; min-width: 0; font-family: var(--text); font-size: 16px; padding: 13px 14px; border: 1px solid #9AA6BA; border-radius: 6px; }
.cert-result { margin-top: 18px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.cert-result div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--bg2); }
.cert-result div:last-child { border: 0; }
.cert-result span { color: var(--muted); }

/* Method / trainer / band */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 36px; }
.step { display: flex; flex-direction: column; gap: 10px; }
.step-n { font-family: var(--head); font-weight: 800; font-size: 44px; color: var(--gold); line-height: 1; }
.step h3 { font-size: 21px; }
.step p { font-size: 15px; line-height: 1.8; color: var(--muted); }
.trainer { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.trainer-photo { flex: 1 1 300px; max-width: 420px; min-width: 0; aspect-ratio: 4 / 5; object-fit: cover; object-position: top; border-radius: var(--radius); border-bottom: 4px solid var(--gold); background: var(--bg2); }
.trainer-copy { flex: 1 1 480px; min-width: 0; }
.trainer-copy h2 { font-size: 36px; }
.trainer-role { margin: 8px 0 22px; color: var(--gold-text); font-weight: 600; font-size: 16px; }
.trainer-copy p { font-size: 17px; line-height: 1.9; color: var(--body); margin-bottom: 14px; }
.band { background: var(--navy); color: #fff; }
.band .wrap { padding-block: 56px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.band h2 { font-size: 30px; margin-bottom: 10px; }
.band p { font-size: 17px; line-height: 1.8; color: var(--soft); }
.duo { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 24px; }
.duo .panel { display: flex; flex-direction: column; gap: 14px; }
.duo .panel h2 { font-size: 28px; }
.duo .panel p { font-size: 16px; line-height: 1.8; color: var(--muted); }
.duo .panel .btn, .duo .panel form { margin-top: auto; }
.schedule-box { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.schedule-box h2 { font-size: 28px !important; margin-bottom: 8px; }
.schedule-box p { font-size: 16px; line-height: 1.8; color: var(--muted); }

/* FAQ */
.faq { max-width: 880px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 18px 22px; margin-bottom: 10px; }
.faq summary { font-weight: 600; font-size: 17px; cursor: pointer; }
.faq details p { margin-top: 12px; line-height: 1.8; color: var(--muted); }

/* Generic page content */
.entry { max-width: 860px; font-size: 17px; line-height: 1.95; color: var(--body); }
.entry h2 { font-size: 28px; margin: 36px 0 12px; color: var(--ink); }
.entry h3 { font-size: 21px; margin: 26px 0 10px; color: var(--ink); }
.entry p { margin-bottom: 16px; }
.entry ul, .entry ol { padding-inline-start: 22px; margin-bottom: 16px; }

/* Footer */
.site-footer { background: var(--navy); color: var(--soft); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 36px; padding-block: 56px 28px; }
.footer-grid h3 { color: var(--gold2); font-family: var(--text); font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.footer-col a { color: #fff; text-decoration: none; }
.footer-col a:hover { color: var(--gold2); }
.footer-brand img { height: 72px; width: auto; align-self: flex-start; }
.footer-brand b { font-family: var(--head); font-weight: 800; font-size: 18px; color: #fff; }
.footer-legal { border-top: 1px solid rgba(255,255,255,.12); padding-block: 18px 28px; font-size: 13px; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.wa-float { position: fixed; bottom: 24px; inset-inline-end: 24px; width: 56px; height: 56px; border-radius: 50%; background: var(--green); display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 20px rgba(0,0,0,.2); z-index: 30; }
.wa-float:hover { background: #156640; }

@media (max-width: 900px) {
  .hero-art { max-width: 420px; margin-inline: auto; }
}
@media (max-width: 640px) {
  .section { padding-block: 56px; }
  .hero .wrap { padding-top: 40px; }
  .hero-copy { padding-bottom: 32px; }
  .panel { padding: 22px; }
  .card { padding: 22px; }
  .card-art { margin: -22px -22px 6px; }
}
