/* ─────────────────────────────────────────────────────────────
   KTSEvent theme – colours taken from the Kuwait Teachers Society logo
   ───────────────────────────────────────────────────────────── */
:root {
  --kts-blue: #1d63a6;
  --kts-blue-dark: #133f73;
  --kts-blue-light: #e4eef8;
  --kts-orange: #f29b3b;
  --kts-orange-dark: #d97f1e;
  --kts-orange-light: #fbe1c4;
  --kts-orange-pale: #fff5e9;
  --kts-red: #e14a2b;
  --kts-gold: #f8c64a;
  --kts-navy: #17365e;
  --kts-cream: #fffaf3;
  --kts-ink: #1f2937;
  --kts-muted: #6b7280;
  --kts-border: #e6e2da;
  --kts-radius: 14px;
  --kts-shadow: 0 6px 24px rgba(23, 54, 94, 0.08);

  --bs-primary: var(--kts-blue);
  --bs-primary-rgb: 29, 99, 166;
  --bs-body-font-family: "Cairo", "Segoe UI", system-ui, sans-serif;
  --bs-body-color: var(--kts-ink);
  --bs-link-color: var(--kts-blue);
  --bs-link-hover-color: var(--kts-blue-dark);
  --bs-border-radius: 10px;
}

html { scroll-behavior: smooth; }
body { background: var(--kts-cream); min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
[dir="auto"] { unicode-bidi: plaintext; }

/* Buttons */
.btn-primary { --bs-btn-bg: var(--kts-blue); --bs-btn-border-color: var(--kts-blue); --bs-btn-hover-bg: var(--kts-blue-dark); --bs-btn-hover-border-color: var(--kts-blue-dark); --bs-btn-active-bg: var(--kts-blue-dark); --bs-btn-active-border-color: var(--kts-blue-dark); font-weight: 600; }
.btn-outline-primary { --bs-btn-color: var(--kts-blue); --bs-btn-border-color: var(--kts-blue); --bs-btn-hover-bg: var(--kts-blue); --bs-btn-hover-border-color: var(--kts-blue); --bs-btn-active-bg: var(--kts-blue); font-weight: 600; }
.btn-accent { --bs-btn-bg: var(--kts-orange); --bs-btn-border-color: var(--kts-orange); --bs-btn-color: #fff; --bs-btn-hover-bg: var(--kts-orange-dark); --bs-btn-hover-border-color: var(--kts-orange-dark); --bs-btn-hover-color: #fff; --bs-btn-active-bg: var(--kts-orange-dark); --bs-btn-active-color: #fff; font-weight: 700; }
.btn { border-radius: 10px; }
.btn-lg { padding: .75rem 1.6rem; }

.form-control, .form-select { border-radius: 10px; border-color: var(--kts-border); padding: .6rem .85rem; }
.form-control:focus, .form-select:focus { border-color: var(--kts-blue); box-shadow: 0 0 0 .25rem rgba(29, 99, 166, .15); }
.form-check-input:checked { background-color: var(--kts-blue); border-color: var(--kts-blue); }
.form-check-input:focus { box-shadow: 0 0 0 .25rem rgba(29, 99, 166, .15); border-color: var(--kts-blue); }
.form-label { font-weight: 600; color: var(--kts-navy); }
.text-primary { color: var(--kts-blue) !important; }
.text-navy { color: var(--kts-navy) !important; }
.text-accent { color: var(--kts-orange-dark) !important; }
.bg-navy { background: var(--kts-navy) !important; }
.bg-accent { background: var(--kts-orange) !important; }
.bg-blue-light { background: var(--kts-blue-light) !important; }

/* Cards */
.card { border: 1px solid var(--kts-border); border-radius: var(--kts-radius); box-shadow: var(--kts-shadow); }
.card-header { background: #fff; border-bottom: 1px solid var(--kts-border); border-radius: var(--kts-radius) var(--kts-radius) 0 0 !important; font-weight: 700; color: var(--kts-navy); }

/* Session type badges */
.badge-type { font-weight: 700; letter-spacing: .02em; padding: .35em .7em; border-radius: 999px; font-size: .75rem; }
.badge-lecture { background: var(--kts-blue-light); color: var(--kts-blue-dark); }
.badge-workshop { background: var(--kts-orange-light); color: #8a4b05; }
.badge-panel { background: #e8f5ea; color: #1e6b32; }
.badge-ceremony { background: #fdecc8; color: #7a4d00; }
.badge-break { background: #eef0f3; color: #4b5563; }

/* ── Public navbar ── */
.kts-navbar { background: #fff; border-bottom: 3px solid var(--kts-orange); box-shadow: 0 2px 12px rgba(0,0,0,.05); }
.kts-navbar .navbar-brand { display: flex; align-items: center; gap: .75rem; font-weight: 800; color: var(--kts-navy); }
.kts-navbar .navbar-brand img { height: 52px; width: auto; }
.kts-navbar .brand-text { line-height: 1.15; }
.kts-navbar .brand-text small { display: block; font-size: .72rem; font-weight: 600; color: var(--kts-muted); letter-spacing: .04em; }
.kts-navbar .nav-link { font-weight: 600; color: var(--kts-navy); padding: .55rem .9rem !important; border-radius: 8px; }
.kts-navbar .nav-link:hover, .kts-navbar .nav-link.active { background: var(--kts-orange-pale); color: var(--kts-orange-dark); }

/* ── Hero ── */
.hero { position: relative; overflow: hidden; color: #fff; background: linear-gradient(135deg, var(--kts-navy) 0%, var(--kts-blue) 60%, #2f7fc4 100%); padding: 4.5rem 0 5.5rem; }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 85% 20%, rgba(242,155,59,.45), transparent 45%), radial-gradient(circle at 10% 90%, rgba(248,198,74,.25), transparent 40%); }
.hero .container { position: relative; }
.hero h1 { font-weight: 800; font-size: clamp(1.9rem, 4vw, 3rem); }
.hero .lead { opacity: .92; max-width: 640px; }
.hero .hero-logo { width: min(100%, 300px); filter: drop-shadow(0 20px 40px rgba(0,0,0,.35)); }
.hero .eyebrow { display: inline-block; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3); padding: .35rem 1rem; border-radius: 999px; font-weight: 700; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; }
.hero-ar { font-size: 1.35rem; font-weight: 700; color: var(--kts-gold); }

.stat-strip { margin-top: -3rem; position: relative; z-index: 2; }
.stat-card { background: #fff; border-radius: var(--kts-radius); box-shadow: var(--kts-shadow); padding: 1.25rem 1.5rem; display: flex; align-items: center; gap: 1rem; height: 100%; border-top: 4px solid var(--kts-orange); }
.stat-card .icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 1.4rem; background: var(--kts-blue-light); color: var(--kts-blue); flex-shrink: 0; }
.stat-card .value { font-size: 1.7rem; font-weight: 800; color: var(--kts-navy); line-height: 1; }
.stat-card .label { color: var(--kts-muted); font-weight: 600; font-size: .85rem; }

.section-title { font-weight: 800; color: var(--kts-navy); position: relative; display: inline-block; padding-bottom: .5rem; }
.section-title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 56px; height: 4px; border-radius: 4px; background: var(--kts-orange); }

/* ── Day cards ── */
.day-card { border-radius: var(--kts-radius); background: #fff; border: 1px solid var(--kts-border); box-shadow: var(--kts-shadow); overflow: hidden; height: 100%; transition: transform .2s, box-shadow .2s; }
.day-card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(23,54,94,.14); }
.day-card .day-head { background: linear-gradient(135deg, var(--kts-blue), var(--kts-blue-dark)); color: #fff; padding: 1.25rem 1.5rem; }
.day-card .day-num { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; opacity: .8; font-weight: 700; }
.day-card .day-date { font-size: 1.35rem; font-weight: 800; }
.day-card .day-ar { color: var(--kts-gold); font-weight: 700; }
.day-card.day-hidden .day-head { background: linear-gradient(135deg, #6b7280, #4b5563); }
.day-card.day-hidden { border-style: dashed; }
.day-card .public-switch .form-check-input:checked { background-color: #1e6b32; border-color: #1e6b32; }

/* ── Programme / schedule ── */
.day-tabs .nav-link { font-weight: 700; color: var(--kts-navy); border-radius: 10px; padding: .7rem 1.2rem; }
.day-tabs .nav-link.active { background: var(--kts-blue); color: #fff; }
.day-tabs .nav-link small { display: block; font-weight: 500; font-size: .75rem; opacity: .8; }

.slot { display: grid; grid-template-columns: 110px 1fr; gap: 1.25rem; padding: 1.25rem 0; border-bottom: 1px dashed var(--kts-border); }
.slot:last-child { border-bottom: 0; }
.slot .time { font-weight: 800; color: var(--kts-blue); font-size: 1.05rem; line-height: 1.2; }
.slot .time small { display: block; font-weight: 600; color: var(--kts-muted); font-size: .75rem; }
.slot.break-slot { background: var(--kts-orange-pale); border-radius: 10px; padding: .8rem 1rem; margin: .5rem 0; border-bottom: 0; grid-template-columns: 94px 1fr; }
.slot.break-slot .time { color: var(--kts-orange-dark); font-size: .95rem; }

.session-card { border: 1px solid var(--kts-border); border-radius: 12px; background: #fff; padding: 1rem 1.1rem; height: 100%; position: relative; transition: border-color .15s, box-shadow .15s; }
.session-card:hover { border-color: var(--kts-blue); box-shadow: 0 6px 18px rgba(29,99,166,.12); }
.session-card .title { font-weight: 700; color: var(--kts-navy); margin: .4rem 0 .35rem; line-height: 1.45; }
.session-card .meta { color: var(--kts-muted); font-size: .88rem; }
.session-card .meta i { color: var(--kts-orange-dark); }
.session-card.is-full { opacity: .75; }
.session-card.is-full::after { position: absolute; top: 12px; right: 12px; background: var(--kts-red); color: #fff; font-size: .68rem; font-weight: 800; padding: .2rem .55rem; border-radius: 999px; letter-spacing: .08em; }
.session-card.selected { border-color: var(--kts-blue); background: var(--kts-blue-light); box-shadow: 0 0 0 3px rgba(29,99,166,.18); }
.session-card.disabled { opacity: .55; background: #f7f7f7; }
.session-card.registered { border-color: #1e6b32; background: #e8f5ea; }
.session-card .seats { font-size: .78rem; font-weight: 700; }
.seat-bar { height: 6px; border-radius: 6px; background: #eee; overflow: hidden; margin-top: .4rem; }
.seat-bar > span { display: block; height: 100%; background: var(--kts-blue); border-radius: 6px; }
.seat-bar.warn > span { background: var(--kts-orange); }
.seat-bar.full > span { background: var(--kts-red); }
.select-check { position: absolute; top: 12px; right: 12px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--kts-border); display: grid; place-items: center; background: #fff; color: #fff; font-size: .9rem; }
.session-card.selected .select-check { background: var(--kts-blue); border-color: var(--kts-blue); }
.session-card.registered .select-check { background: #1e6b32; border-color: #1e6b32; }
.session-card[role="button"] { cursor: pointer; }

/* ── Registration steps ── */
.step-badge { width: 34px; height: 34px; border-radius: 50%; background: var(--kts-orange); color: #fff; font-weight: 800; display: inline-grid; place-items: center; margin-right: .6rem; }
.sticky-summary { position: sticky; top: 90px; }
.summary-item { display: flex; gap: .6rem; padding: .5rem 0; border-bottom: 1px dashed var(--kts-border); font-size: .9rem; }
.summary-item:last-child { border-bottom: 0; }
.summary-item .t { font-weight: 700; color: var(--kts-blue); white-space: nowrap; }

/* ── Ticket ── */
.ticket { max-width: 720px; margin: 0 auto; background: #fff; border-radius: 22px; overflow: hidden; box-shadow: 0 20px 60px rgba(23,54,94,.15); border: 1px solid var(--kts-border); }
.ticket-head { background: linear-gradient(135deg, var(--kts-navy), var(--kts-blue)); color: #fff; padding: 1.5rem 2rem; display: flex; align-items: center; gap: 1rem; }
.ticket-head img { height: 68px; }
.ticket-body { padding: 2rem; display: grid; grid-template-columns: 1fr 240px; gap: 2rem; }
.ticket-qr { text-align: center; border-left: 2px dashed var(--kts-border); padding-left: 2rem; }
.ticket-qr img { width: 200px; height: 200px; image-rendering: pixelated; border: 6px solid var(--kts-orange-pale); border-radius: 12px; }
.ticket-code { font-family: "Consolas", monospace; font-size: 1.5rem; font-weight: 800; letter-spacing: .2em; color: var(--kts-navy); }
.ticket-field { margin-bottom: .9rem; }
.ticket-field .k { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--kts-muted); font-weight: 700; }
.ticket-field .v { font-weight: 700; color: var(--kts-navy); font-size: 1.05rem; }
.ticket-sessions { background: var(--kts-cream); border-top: 1px solid var(--kts-border); padding: 1.5rem 2rem; }
.ticket-session { display: grid; grid-template-columns: 120px 1fr auto; gap: 1rem; padding: .7rem 0; border-bottom: 1px dashed var(--kts-border); align-items: center; }
.ticket-session:last-child { border-bottom: 0; }
.ticket-session .d { font-weight: 800; color: var(--kts-blue); font-size: .85rem; }
.ticket-session .d small { display: block; color: var(--kts-muted); font-weight: 600; }
@media (max-width: 640px) { .ticket-body { grid-template-columns: 1fr; } .ticket-qr { border-left: 0; padding-left: 0; border-top: 2px dashed var(--kts-border); padding-top: 1.5rem; } .ticket-session { grid-template-columns: 1fr; gap: .25rem; } }

/* ── Certificate preview ── */
.certificate-preview { max-width: 1000px; margin: 0 auto; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 20px 60px rgba(23,54,94,.18); border: 1px solid var(--kts-border); }
.certificate-preview img { display: block; width: 100%; height: auto; }

/* ── Footer ── */
.kts-footer { background: var(--kts-navy); color: rgba(255,255,255,.8); padding: 2.5rem 0 1.5rem; margin-top: 4rem; border-top: 4px solid var(--kts-orange); }
.kts-footer a { color: #fff; text-decoration: none; }
.kts-footer img { height: 64px; }

/* ── Admin ── */
.admin-body { background: #f3f5f9; }
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar { width: 260px; flex-shrink: 0; background: linear-gradient(180deg, var(--kts-navy) 0%, var(--kts-blue-dark) 100%); color: #fff; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.admin-sidebar .brand { display: flex; align-items: center; gap: .75rem; padding: 1.1rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.admin-sidebar .brand img { height: 48px; }
.admin-sidebar .brand strong { display: block; font-size: .95rem; line-height: 1.2; }
.admin-sidebar .brand small { opacity: .7; font-size: .72rem; }
.admin-sidebar .nav { padding: .75rem; gap: 2px; }
.admin-sidebar .nav-link { color: rgba(255,255,255,.78); border-radius: 10px; padding: .65rem .9rem; display: flex; align-items: center; gap: .7rem; font-weight: 600; }
.admin-sidebar .nav-link i { width: 20px; text-align: center; font-size: 1.05rem; }
.admin-sidebar .nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.admin-sidebar .nav-link.active { background: var(--kts-orange); color: #fff; }
.admin-sidebar .nav-section { font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; opacity: .55; padding: .9rem .9rem .3rem; font-weight: 700; }
.admin-sidebar .sidebar-foot { margin-top: auto; padding: 1rem 1.25rem; border-top: 1px solid rgba(255,255,255,.1); font-size: .85rem; }
.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-topbar { background: #fff; border-bottom: 1px solid var(--kts-border); padding: .8rem 1.75rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.admin-topbar h1 { font-size: 1.25rem; font-weight: 800; color: var(--kts-navy); margin: 0; }
.admin-content { padding: 1.75rem; }
@media (max-width: 992px) { .admin-sidebar { position: fixed; left: -260px; z-index: 1050; transition: left .2s; } .admin-sidebar.show { left: 0; } .admin-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 1040; display: none; } .admin-backdrop.show { display: block; } }

.kpi { background: #fff; border-radius: var(--kts-radius); border: 1px solid var(--kts-border); padding: 1.15rem 1.35rem; display: flex; align-items: center; gap: 1rem; height: 100%; }
.kpi .icon { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; font-size: 1.35rem; flex-shrink: 0; }
.kpi .value { font-size: 1.6rem; font-weight: 800; color: var(--kts-navy); line-height: 1.1; }
.kpi .label { color: var(--kts-muted); font-weight: 600; font-size: .82rem; }
.kpi-blue .icon { background: var(--kts-blue-light); color: var(--kts-blue); }
.kpi-orange .icon { background: var(--kts-orange-light); color: var(--kts-orange-dark); }
.kpi-green .icon { background: #e8f5ea; color: #1e6b32; }
.kpi-red .icon { background: #fde8e4; color: var(--kts-red); }

.table { --bs-table-bg: #fff; }
.table thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--kts-muted); font-weight: 700; background: #fafafa; border-bottom: 1px solid var(--kts-border) !important; }
.table td { vertical-align: middle; }
.table-card { border-radius: var(--kts-radius); overflow: hidden; border: 1px solid var(--kts-border); background: #fff; }
.progress { height: 8px; border-radius: 8px; background: #eef0f3; }
.progress-bar { background: var(--kts-blue); }
.progress-bar.warn { background: var(--kts-orange); }
.progress-bar.full { background: var(--kts-red); }
.seat-input { width: 84px; text-align: center; font-weight: 700; }

/* Scanner */
.scan-frame { border-radius: var(--kts-radius); overflow: hidden; background: #000; min-height: 320px; position: relative; }
.scan-result { border-radius: var(--kts-radius); padding: 1.5rem; text-align: center; min-height: 200px; display: flex; flex-direction: column; justify-content: center; border: 2px dashed var(--kts-border); background: #fff; transition: background .2s; }
.scan-result.ok { background: #e8f5ea; border-color: #1e6b32; border-style: solid; }
.scan-result.duplicate { background: #fff5d6; border-color: #b7791f; border-style: solid; }
.scan-result.notregistered, .scan-result.invalid { background: #fde8e4; border-color: var(--kts-red); border-style: solid; }
.scan-result .big-icon { font-size: 3.2rem; line-height: 1; }
.scan-result.ok .big-icon { color: #1e6b32; } .scan-result.duplicate .big-icon { color: #b7791f; } .scan-result.notregistered .big-icon, .scan-result.invalid .big-icon { color: var(--kts-red); }
.scan-result.none { background: #fff5d6; border-color: #b7791f; border-style: solid; } .scan-result.none .big-icon { color: #b7791f; }
.scan-result.choose { border-style: solid; border-color: var(--bs-primary); justify-content: flex-start; }
.scan-choice { display: block; width: 100%; text-align: start; background: #fff; border: 2px solid var(--kts-border); border-radius: .75rem; padding: .75rem 1rem; transition: border-color .15s, background .15s; }
.scan-choice:hover, .scan-choice:focus-visible { border-color: var(--bs-primary); background: #f3f7fc; }
.scan-choice.now { border-color: var(--kts-red); }
.scan-choice.done { opacity: .65; }
.scan-log li { font-size: .85rem; padding: .35rem 0; border-bottom: 1px dashed var(--kts-border); display: flex; gap: .5rem; align-items: center; }

/* Login */
.login-page { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, var(--kts-navy), var(--kts-blue) 70%, #2f7fc4); padding: 1rem; }
.login-card { width: 100%; max-width: 420px; background: #fff; border-radius: 22px; padding: 2.25rem; box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.login-card img { height: 88px; }

/* Poster */
.poster { max-width: 720px; margin: 0 auto; background: #fff; border: 6px solid var(--kts-orange); border-radius: 26px; padding: 2.5rem; text-align: center; }
.poster img.qr { width: 320px; height: 320px; image-rendering: pixelated; }
.poster h2 { font-weight: 800; color: var(--kts-navy); }

@media print {
  .no-print, .kts-navbar, .kts-footer, .admin-sidebar, .admin-topbar { display: none !important; }
  body { background: #fff; }
  .admin-content { padding: 0; }
  .ticket, .poster { box-shadow: none; }
}

/* ── RTL (Arabic) overrides – Bootstrap's RTL build handles the utilities; these fix custom rules ── */
.session-card.is-full::after { content: attr(data-full-label); }
[dir="rtl"] .section-title::after { left: auto; right: 0; }
[dir="rtl"] .step-badge { margin-right: 0; margin-left: .6rem; }
[dir="rtl"] .select-check, [dir="rtl"] .session-card.is-full::after { right: auto; left: 12px; }
[dir="rtl"] .ticket-qr { border-left: 0; padding-left: 0; border-right: 2px dashed var(--kts-border); padding-right: 2rem; }
[dir="rtl"] .kts-navbar .brand-text small { letter-spacing: 0; }
[dir="rtl"] .hero .eyebrow, [dir="rtl"] .day-card .day-num, [dir="rtl"] .ticket-field .k, [dir="rtl"] .table thead th, [dir="rtl"] .admin-sidebar .nav-section { letter-spacing: 0; }
[dir="rtl"] .ticket-code { letter-spacing: .2em; direction: ltr; }
[dir="rtl"] .hero::before { background: radial-gradient(circle at 15% 20%, rgba(242,155,59,.45), transparent 45%), radial-gradient(circle at 90% 90%, rgba(248,198,74,.25), transparent 40%); }
@media (max-width: 640px) { [dir="rtl"] .ticket-qr { border-right: 0; padding-right: 0; } }
@media (max-width: 992px) {
  [dir="rtl"] .admin-sidebar { left: auto; right: -260px; transition: right .2s; }
  [dir="rtl"] .admin-sidebar.show { right: 0; }
}
.lang-switch { font-weight: 700; }
/* Browsers force email/url/tel inputs to LTR; in Arabic mode keep every textbox RTL like the rest of the form. */
[dir="rtl"] input[type="email"], [dir="rtl"] input[type="url"], [dir="rtl"] input[type="tel"], [dir="rtl"] input[type="search"] { direction: rtl; text-align: right; }

/* ─────────────────────────────────────────────────────────────
   Royal hero (home page) – navy & gold, patronage banner
   ───────────────────────────────────────────────────────────── */
:root {
  --royal-navy: #2f4a6a;
  --royal-navy-dark: #22384f;
  --royal-gold: #c9a233;
  --royal-gold-dark: #ad8a22;
  --royal-gold-light: #f3cf6b;
}
.hero-royal {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(ellipse 60% 70% at 18% 100%, rgba(255,255,255,.14), transparent 70%),
    linear-gradient(180deg, var(--royal-navy) 0%, var(--royal-navy-dark) 100%);
  padding: 2.75rem 0 7rem; min-height: 600px;
}
.hero-royal .hero-inner { position: relative; z-index: 2; }

/* Portrait on the end side, fading into the navy */
.hero-royal .hero-portrait {
  position: absolute; bottom: 0; inset-inline-end: max(0px, calc(50% - 760px));
  height: 96%; max-height: 640px; width: auto; z-index: 1; pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
}
[dir="rtl"] .hero-royal .hero-portrait { transform: none; }

/* Towers + open book on the start side */
.hero-royal .hero-deco { position: absolute; bottom: 0; inset-inline-start: max(0px, calc(50% - 780px)); width: 380px; z-index: 1; pointer-events: none; line-height: 0; }
.hero-royal .hero-deco img { width: 100%; height: auto; display: block; }

/* Side column: date pill + venue logo */
.hero-royal .hero-side { display: flex; flex-direction: column; align-items: center; gap: 1.1rem; padding-top: 5.5rem; }
.hero-royal .date-pill { background: #fff; color: var(--royal-navy); border-radius: 999px; padding: .55rem 1.3rem; font-weight: 600; white-space: nowrap; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.hero-royal .venue-logo { width: 150px; height: auto; }

/* Main column */
.hero-royal .hero-main { text-align: center; }
.hero-royal .patronage { width: min(100%, 470px); height: auto; display: block; margin: 0 auto .4rem; filter: drop-shadow(0 4px 14px rgba(0,0,0,.25)); }
.hero-royal .patronage-en { color: var(--royal-gold-light); font-size: .85rem; font-weight: 600; opacity: .9; margin-bottom: .6rem; }
.hero-royal .hero-edition { margin-top: 2.2rem; font-size: 1.35rem; font-weight: 500; color: rgba(255,255,255,.9); }
.hero-royal .hero-title { font-weight: 800; font-size: clamp(1.8rem, 3.4vw, 2.75rem); line-height: 1.35; margin: .35rem 0 1.6rem; text-shadow: 0 3px 16px rgba(0,0,0,.25); }
.hero-royal .hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; }
.hero-royal .hero-actions .btn { min-width: 170px; border-radius: 10px; }
.hero-royal .btn-outline-light { border-width: 2px; }

.btn-gold { --bs-btn-bg: var(--royal-gold); --bs-btn-border-color: var(--royal-gold); --bs-btn-color: #fff; --bs-btn-hover-bg: var(--royal-gold-dark); --bs-btn-hover-border-color: var(--royal-gold-dark); --bs-btn-hover-color: #fff; --bs-btn-active-bg: var(--royal-gold-dark); --bs-btn-active-border-color: var(--royal-gold-dark); --bs-btn-active-color: #fff; font-weight: 700; }

/* Stat cards under the royal hero: white with gold outline, as in the design */
.stat-card-royal { border: 2px solid var(--royal-gold); border-top-width: 2px; box-shadow: 0 10px 28px rgba(34,56,79,.10); }
.stat-card-royal .icon { background: #fbf4e0; color: var(--royal-gold-dark); }
.stat-card-royal .value { color: var(--royal-navy); }

@media (max-width: 1199.98px) {
  .hero-royal .hero-portrait { height: 80%; opacity: .9; }
  .hero-royal .hero-deco { width: 290px; }
}
@media (max-width: 991.98px) {
  .hero-royal { padding: 1.75rem 0 5.5rem; min-height: 0; }
  .hero-royal .hero-portrait { position: relative; display: block; inset: auto; height: 250px; max-height: none; margin: 0 auto -1rem; }
  .hero-royal .hero-deco { display: none; }
  .hero-royal .hero-side { padding-top: 0; flex-direction: row; justify-content: center; order: 2; }
  .hero-royal .venue-logo { width: 80px; }
  .hero-royal .hero-main { order: 1; }
  .hero-royal .hero-edition { margin-top: 1.2rem; }
}

/* ── Disabled register buttons (registration closed) ── */
.btn.disabled[aria-disabled="true"] { opacity: .55; cursor: not-allowed; pointer-events: auto; filter: grayscale(.35); }
.hero-royal .hero-closed-note { margin-top: .9rem; font-size: .9rem; color: var(--royal-gold-light); }

/* ── About section ── */
.about-section { padding-top: 3.5rem; padding-bottom: 3rem; }
.about-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.1rem 0 1.3rem; }
.about-chip { display: inline-flex; align-items: center; gap: .4rem; background: #fbf4e0; color: var(--royal-navy); border: 1px solid #ecd9a3; border-radius: 999px; padding: .35rem .95rem; font-weight: 700; font-size: .9rem; }
.about-chip i { color: var(--royal-gold-dark); }
.about-tagline { font-weight: 700; color: var(--kts-navy); margin: 1rem 0; }
.about-body { color: #4b5563; font-size: 1.02rem; line-height: 2; position: relative; transition: max-height .35s ease; }
.about-body p { margin-bottom: 1rem; text-align: justify; text-justify: inter-word; }
.about-body .about-lead { font-size: 1.12rem; color: var(--kts-navy); font-weight: 600; line-height: 2; border-inline-start: 4px solid var(--royal-gold); padding-inline-start: 1rem; }
.about-body .about-subhead { font-weight: 800; color: var(--royal-navy); margin: 1.4rem 0 .9rem; font-size: 1.05rem; }
.about-topics { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem .9rem; }
.about-topics li { display: flex; gap: .6rem; align-items: flex-start; background: #fff; border: 1px solid var(--kts-border); border-radius: 12px; padding: .7rem .85rem; line-height: 1.7; font-size: .95rem; color: var(--kts-ink); box-shadow: 0 2px 8px rgba(23,54,94,.04); }
.about-topics li i { color: var(--royal-gold); font-size: 1.05rem; margin-top: .2rem; flex-shrink: 0; }
.about-body.collapsed { max-height: 440px; overflow: hidden; }
.about-body.collapsed::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 110px; background: linear-gradient(to bottom, rgba(255,250,243,0), var(--kts-cream)); pointer-events: none; }
.about-toggle { font-weight: 700; color: var(--royal-gold-dark); text-decoration: none; }
.about-toggle:hover { color: var(--royal-navy); }
@media (max-width: 767.98px) { .about-topics { grid-template-columns: 1fr; } .about-body p { text-align: start; } }

.facts-card { background: linear-gradient(160deg, var(--royal-navy), var(--royal-navy-dark)); color: #fff; border-radius: 18px; padding: 1.5rem; box-shadow: 0 16px 40px rgba(34,56,79,.18); position: sticky; top: 100px; }
.facts-title { font-weight: 800; color: var(--royal-gold-light); margin-bottom: 1rem; }
.facts-list { list-style: none; padding: 0; margin: 0; }
.facts-list li { display: flex; gap: .85rem; padding: .85rem 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.facts-list li:last-child { border-bottom: 0; }
.facts-list li > i { width: 38px; height: 38px; border-radius: 10px; background: rgba(201,162,51,.18); color: var(--royal-gold-light); display: grid; place-items: center; flex-shrink: 0; font-size: 1.05rem; }
.facts-list small { display: block; opacity: .7; font-size: .78rem; }
.facts-list strong { font-weight: 700; line-height: 1.6; }
.facts-link { display: inline-block; margin-top: .25rem; color: var(--royal-gold-light); font-size: .85rem; text-decoration: none; }

/* ── Steps ── */
.steps-section { background: #fff; border-top: 1px solid var(--kts-border); border-bottom: 1px solid var(--kts-border); padding: 3rem 0; }
.step-card { position: relative; height: 100%; background: var(--kts-cream); border: 1px solid var(--kts-border); border-radius: 16px; padding: 1.6rem 1.25rem 1.2rem; text-align: center; transition: transform .2s, box-shadow .2s; }
.step-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(23,54,94,.10); }
.step-num { position: absolute; top: -14px; inset-inline-start: 1.1rem; width: 32px; height: 32px; border-radius: 50%; background: var(--royal-gold); color: #fff; font-weight: 800; display: grid; place-items: center; box-shadow: 0 4px 10px rgba(201,162,51,.4); }
.step-icon { font-size: 2rem; color: var(--royal-navy); display: block; margin-bottom: .6rem; }
.step-card p { margin: 0; color: #4b5563; line-height: 1.8; font-size: .95rem; }

/* ── CTA band ── */
.cta-royal { background: radial-gradient(ellipse 60% 120% at 50% 0%, rgba(255,255,255,.08), transparent 70%), linear-gradient(135deg, var(--royal-navy), var(--royal-navy-dark)); color: #fff; padding: 3.5rem 0; border-top: 4px solid var(--royal-gold); }
/* Registration status card on the admin dashboard */
.reg-status.is-open { border-inline-start: 5px solid #1e6b32; }
.reg-status.is-closed { border-inline-start: 5px solid var(--kts-red); }
.reg-status-icon { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; }
.reg-status.is-open .reg-status-icon { background: #e8f5ea; color: #1e6b32; }
.reg-status.is-closed .reg-status-icon { background: #fde8e4; color: var(--kts-red); }
/* Keep brand colour on disabled register buttons (just faded) */
.btn-gold { --bs-btn-disabled-bg: var(--royal-gold); --bs-btn-disabled-border-color: var(--royal-gold); --bs-btn-disabled-color: #fff; }
.btn-accent { --bs-btn-disabled-bg: var(--kts-orange); --bs-btn-disabled-border-color: var(--kts-orange); --bs-btn-disabled-color: #fff; }
/* Navbar brand: English name with the Arabic name beneath, same in both languages */
.kts-navbar .brand-text { font-size: 1.15rem; }
.kts-navbar .brand-text small { font-size: .9rem; letter-spacing: 0; color: var(--kts-muted); font-weight: 600; margin-top: .1rem; }
@media (max-width: 575.98px) { .kts-navbar .brand-text { font-size: 1rem; } .kts-navbar .brand-text small { font-size: .8rem; } }

/* ── Civil ID gate dialog (registration page) ── */
.civil-modal .modal-dialog { max-width: 580px; }
.civil-modal .modal-content { border: 0; border-radius: 22px; overflow: hidden; box-shadow: 0 30px 80px rgba(23, 54, 94, .35); }
.civil-modal .modal-content::before { content: ""; display: block; height: 6px; background: linear-gradient(90deg, var(--kts-blue), var(--kts-orange)); }
.civil-icon { width: 86px; height: 86px; margin: 0 auto 1rem; border-radius: 50%; display: grid; place-items: center; font-size: 2.5rem; color: var(--kts-blue); background: var(--kts-blue-light); box-shadow: 0 0 0 10px rgba(29, 99, 166, .08); }
.civil-icon.success { color: #1e6b32; background: #e8f5ea; box-shadow: 0 0 0 10px rgba(30, 107, 50, .08); }
.civil-title { text-align: center; font-weight: 800; color: var(--kts-navy); font-size: 1.35rem; margin-bottom: .4rem; }
.civil-sub { text-align: center; color: var(--kts-muted); margin-bottom: 1.4rem; }
.civil-input-wrap { position: relative; direction: ltr; }
.civil-input-wrap > i { position: absolute; top: 50%; left: 1rem; transform: translateY(-50%); color: var(--kts-muted); font-size: 1.25rem; pointer-events: none; }
.civil-input-wrap input { padding-left: 3rem; font-size: 1.35rem; font-weight: 700; letter-spacing: .14em; text-align: center; }
.civil-error { display: flex; gap: .6rem; align-items: flex-start; margin-top: .9rem; padding: .85rem 1rem; border-radius: 12px; background: #fdecea; color: #9f1d0d; border: 1px solid #f5c2bb; line-height: 1.6; }
.civil-error > i { font-size: 1.3rem; flex-shrink: 0; }
.civil-person { display: flex; align-items: center; gap: .8rem; background: var(--kts-cream); border: 1px solid var(--kts-border); border-radius: 12px; padding: .8rem 1rem; margin: 1rem 0; }
.civil-person > i { font-size: 2.1rem; color: var(--kts-orange-dark); }
.civil-person strong { display: block; color: var(--kts-navy); }
.civil-person small { display: block; color: var(--kts-muted); }
.civil-notes { font-size: .95rem; line-height: 1.8; color: var(--kts-ink); }
.civil-notes p { margin-bottom: .45rem; }
.civil-notes p > i { color: var(--kts-blue); }
.civil-locked-wrap { position: relative; direction: ltr; }
.civil-locked-wrap > i { position: absolute; top: 50%; left: 1rem; transform: translateY(-50%); color: var(--kts-blue); pointer-events: none; }
.civil-locked[readonly] { background: var(--kts-blue-light); color: var(--kts-navy); font-weight: 700; letter-spacing: .1em; padding-left: 2.6rem; cursor: not-allowed; }
