﻿:root {
  --green-900: #103d2a;
  --green-800: #165037;
  --green-700: #1c6848;
  --green-100: #e8f3ed;
  --gold-600: #b58a35;
  --gold-100: #f7efd8;
  --ink: #17251f;
  --muted: #63736d;
  --line: #dce7e1;
  --surface: #ffffff;
  --soft: #f7faf8;
  --radius: 8px;
  --shadow: 0 18px 50px rgba(16, 61, 42, 0.12);
}


/* Mobile-only Program Details refinement. Desktop rules remain unchanged. */
@media (max-width: 640px) {
  .program-detail-hero {
    padding: 22px 0 18px;
  }

  .program-detail-hero .container,
  [data-program-details-content] > .section .container {
    width: calc(100% - 32px);
  }

  .program-detail-grid {
    gap: 18px;
  }

  .program-detail-copy {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .program-detail-copy .back-link {
    order: 0;
    align-self: flex-start;
    margin-bottom: 10px;
    font-size: 0.88rem;
  }

  .program-detail-copy h1 {
    order: 1;
    margin-bottom: 8px;
    font-size: clamp(1.75rem, 8vw, 2.15rem);
    line-height: 1.25;
  }

  .program-detail-copy .status {
    order: 2;
    align-self: flex-start;
    margin-bottom: 12px;
  }

  .program-detail-copy .hero-actions {
    order: 3;
    margin-top: 0;
  }

  .program-detail-copy .hero-actions [href="./programs.html"] {
    display: none;
  }

  .program-detail-copy .hero-actions .btn {
    min-height: 46px;
  }

  .program-detail-hero .detail-image {
    width: 100%;
    height: clamp(180px, 52vw, 220px);
    min-height: 180px;
    max-height: 220px;
    padding: 14px;
    border-radius: 14px;
  }

  .program-detail-hero .detail-image:has(.detail-hero-image) {
    padding: 0;
  }

  .program-detail-hero .detail-image img,
  .program-detail-hero .detail-image .detail-hero-image {
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: 100%;
    object-fit: cover;
    border-radius: 10px;
  }

  .program-detail-hero .detail-image img.ruwat-program-logo,
  .program-detail-hero .detail-image img.sinaat-program-logo,
  .program-detail-hero .detail-image .detail-hero-image {
    width: auto;
    height: 100%;
    max-width: 88%;
    max-height: 100%;
    justify-self: center;
    padding: 8px;
    object-fit: contain;
  }

  [data-program-details-content] > .section {
    padding: 18px 0 32px;
  }

  [data-program-details-content] .details-layout {
    gap: 16px;
  }

  [data-program-details-content] .details-sidebar {
    order: 1;
    padding: 18px;
    border-radius: 14px;
  }

  [data-program-details-content] .details-main {
    order: 2;
    padding: 18px;
    border-radius: 14px;
  }

  [data-program-details-content] .details-sidebar h2,
  [data-program-details-content] .details-main .section-heading h2 {
    margin-bottom: 10px;
    font-size: 1.3rem;
    line-height: 1.35;
  }

  [data-program-details-content] .details-main .section-heading {
    margin-bottom: 12px;
  }

  [data-program-details-content] .details-main .section-heading .eyebrow {
    margin-bottom: 4px;
    font-size: 0.78rem;
  }

  [data-program-details-content] .details-main > p,
  [data-program-details-content] .details-main .check-list,
  [data-program-details-content] .detail-summary dd[data-detail-target-audience] {
    font-size: 0.94rem;
    line-height: 1.75;
  }

  [data-program-details-content] .detail-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 14px;
    margin: 8px 0 0;
  }

  [data-program-details-content] .detail-summary > div {
    min-width: 0;
    padding: 9px 0;
  }

  [data-program-details-content] .detail-summary > div:has([data-detail-target-audience]) {
    grid-column: 1 / -1;
  }

  [data-program-details-content] .detail-summary dt {
    font-size: 0.78rem;
  }

  [data-program-details-content] .detail-summary dd {
    overflow-wrap: anywhere;
    font-size: 0.9rem;
    line-height: 1.55;
  }

  [data-program-details-content] .detail-summary .status {
    margin-bottom: 0;
  }

  [data-program-details-content] .detail-block {
    margin-top: 18px;
    padding-top: 16px;
  }

  [data-program-details-content] .detail-block h3 {
    margin-bottom: 9px;
    font-size: 1.12rem;
    line-height: 1.4;
  }

  [data-program-details-content] .check-list,
  [data-program-details-content] .check-list ul,
  [data-program-details-content] .check-list ol {
    gap: 7px;
  }

  [data-program-details-content] .check-list ul,
  [data-program-details-content] .check-list ol {
    padding-inline-start: 20px;
  }

  [data-program-details-content] .check-list li {
    margin: 0;
    line-height: 1.7;
  }

  [data-detail-sidebar-action] {
    display: none;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid rgba(181, 138, 53, 0.55);
  outline-offset: 3px;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.header-grid {
  min-height: 78px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  min-width: max-content;
}

.brand-logo {
  width: 48px;
  height: 48px;
  display: block;
  object-fit: cover;
  background: white;
  border: 2px solid rgba(181, 138, 53, 0.42);
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(16, 61, 42, 0.12);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1.08rem;
}

.brand-name {
  color: var(--green-800);
  font-family: inherit;
  font-weight: 800;
  letter-spacing: 0;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
}

.primary-nav {
  display: flex;
  justify-content: center;
  gap: 26px;
  color: var(--muted);
  font-weight: 700;
}

.primary-nav a:hover {
  color: var(--green-800);
}

.primary-nav a[aria-current="page"],
.site-footer a[aria-current="page"] {
  color: var(--green-800);
}

.header-actions,
.hero-actions,
.card-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  cursor: not-allowed;
  transform: none;
  opacity: 0.78;
}

.btn-primary {
  color: white;
  background: var(--green-800);
}

.btn-secondary {
  color: var(--green-900);
  background: var(--gold-100);
  border-color: rgba(181, 138, 53, 0.35);
}

.btn-ghost,
.btn-outline {
  color: var(--green-800);
  background: white;
  border-color: var(--line);
}

.btn-muted {
  color: var(--muted);
  background: #eef3f0;
}

.btn-light {
  color: var(--green-900);
  background: white;
}

.btn-large {
  min-height: 50px;
  padding-inline: 22px;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.menu-icon,
.menu-icon::before,
.menu-icon::after {
  display: block;
  width: 18px;
  height: 2px;
  margin: auto;
  background: var(--green-900);
  content: "";
}

.menu-icon::before {
  transform: translateY(-6px);
}

.menu-icon::after {
  transform: translateY(4px);
}

.section,
.hero {
  padding: 84px 0;
}

.page-hero {
  padding: 78px 0;
  background:
    linear-gradient(135deg, rgba(232, 243, 237, 0.96), rgba(255, 255, 255, 0.86)),
    linear-gradient(90deg, rgba(181, 138, 53, 0.12), transparent 42%);
}

.page-hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.section-band {
  background:
    linear-gradient(135deg, rgba(232, 243, 237, 0.95), rgba(255, 255, 255, 0.8)),
    radial-gradient(circle at 20% 30%, rgba(181, 138, 53, 0.12), transparent 28%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 52px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold-600);
  font-size: 0.9rem;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  color: var(--green-900);
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  line-height: 1.08;
}

h2 {
  margin-bottom: 14px;
  color: var(--green-900);
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  line-height: 1.18;
}

h3 {
  color: var(--green-900);
  font-size: 1.25rem;
  line-height: 1.3;
}

.hero-lead {
  max-width: 620px;
  color: #384941;
  font-size: 1.2rem;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.trust-row span {
  padding: 8px 12px;
  color: var(--green-900);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
}

.hero-visual {
  min-height: 430px;
  display: grid;
  place-items: center;
}

.quran-panel {
  width: min(420px, 100%);
  padding: 34px;
  color: white;
  background: linear-gradient(145deg, var(--green-900), var(--green-700));
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.panel-topline {
  width: 72px;
  height: 5px;
  margin-bottom: 34px;
  background: var(--gold-600);
  border-radius: 999px;
}

.book-shape {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 28px;
}

.book-shape span {
  height: 128px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(181, 138, 53, 0.55);
}

.book-shape span:first-child {
  border-radius: 8px 24px 24px 8px;
}

.book-shape span:last-child {
  border-radius: 24px 8px 8px 24px;
}

.quran-panel h2 {
  color: white;
  font-size: 1.75rem;
}

.quran-panel p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.84);
}

.identity-panel {
  padding: 32px;
  color: white;
  background: var(--green-900);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.brand-logo.large {
  width: 72px;
  height: 72px;
  margin-bottom: 22px;
}

.identity-panel h2 {
  color: white;
  font-size: 1.7rem;
}

.identity-panel .brand-name {
  color: white;
}

.identity-panel p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.78);
}

.section-heading {
  max-width: 680px;
  margin-bottom: 34px;
}

.section-heading p:not(.eyebrow),
.two-column p,
.contact-section p,
.cta-band p,
.why-grid p,
.program-card p {
  color: var(--muted);
}

.compact {
  margin-bottom: 22px;
}

.program-grid,
.why-grid,
.stats-grid {
  display: grid;
  gap: 20px;
}

.program-grid {
  grid-template-columns: repeat(3, 1fr);
}

.program-card,
.why-grid article,
.stat {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.program-card {
  box-shadow: 0 14px 35px rgba(16, 61, 42, 0.08);
}

.program-image {
  min-height: 150px;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 18px;
  color: rgba(255, 255, 255, 0.72);
  background: var(--program-panel-bg, linear-gradient(135deg, var(--green-900), var(--green-700)));
  font-size: 2.6rem;
  font-weight: 800;
}

.program-image img {
  width: 100%;
  height: 100%;
  min-height: 150px;
  display: block;
  object-fit: contain;
  background: white;
}

.program-visual {
  width: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.program-logo-area {
  flex: 1 1 64%;
  width: 100%;
  min-height: 0;
  display: grid;
  place-items: center;
}

.home-image-placeholder.logo-v-top,
.logo-v-top.appearance-preview-panel {
  justify-content: start;
}

.program-image.logo-v-top .program-visual {
  justify-content: start;
}

.home-image-placeholder.logo-v-center,
.logo-v-center.appearance-preview-panel {
  justify-content: center;
}

.program-image.logo-v-center .program-visual {
  justify-content: center;
}

.home-image-placeholder.logo-v-bottom,
.logo-v-bottom.appearance-preview-panel {
  justify-content: end;
}

.program-image.logo-v-bottom .program-visual {
  justify-content: end;
}

.home-image-placeholder.logo-h-left,
.logo-h-left.appearance-preview-panel {
  justify-items: start;
}

.program-image.logo-h-left .program-logo-area {
  justify-items: start;
}

.home-image-placeholder.logo-h-center,
.logo-h-center.appearance-preview-panel {
  justify-items: center;
}

.program-image.logo-h-center .program-logo-area {
  justify-items: center;
}

.home-image-placeholder.logo-h-right,
.logo-h-right.appearance-preview-panel {
  justify-items: end;
}

.program-image.logo-h-right .program-logo-area {
  justify-items: end;
}

.program-logo-area img {
  max-width: var(--program-logo-size, 100%);
  max-height: var(--program-logo-size, 100%);
  min-height: 0;
  object-fit: contain;
}

.program-fallback-mark {
  color: rgba(255, 255, 255, 0.72);
  font-size: 2.6rem;
  line-height: 1;
}

.program-number-area {
  width: 100%;
  display: grid;
  gap: 5px;
  justify-items: center;
  color: var(--program-accent-color, var(--gold-600));
  text-align: center;
  line-height: 1.2;
}

.program-number-area span {
  font-size: 0.78rem;
  font-weight: 900;
}

.program-number-area strong {
  font-size: 1.35rem;
  letter-spacing: 0.06em;
}

.program-number-divider {
  width: min(110px, 72%);
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.72;
}

.program-number-divider::before,
.program-number-divider::after {
  flex: 1;
  height: 1px;
  content: "";
  background: currentColor;
}

.program-number-divider span {
  width: 6px;
  height: 6px;
  background: currentColor;
  transform: rotate(45deg);
}

.program-image-emerald {
  background: var(--program-panel-bg, linear-gradient(135deg, #145236, #2d8060));
}

.program-image-gold {
  background: var(--program-panel-bg, linear-gradient(135deg, #7a652d, var(--gold-600)));
}

.detail-image-gold {
  background: linear-gradient(135deg, #7a652d, var(--gold-600));
}

.program-image-ruwat {
  background: var(--program-panel-bg, linear-gradient(135deg, var(--green-900), var(--green-700)));
}


.program-image-neutral {
  background: var(--program-panel-bg, linear-gradient(135deg, #44524d, #7e8b86));
}

.program-image-sage {
  background: var(--program-panel-bg, linear-gradient(135deg, #48685b, #91a99d));
}

.card-body {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  align-content: start;
  padding: 22px;
}

.status {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 5px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.82rem;
}

.status.open {
  color: #0f6846;
  background: #e4f6ee;
}

.status.soon {
  color: #8a651d;
  background: var(--gold-100);
}

.status.closed {
  color: #7a3434;
  background: #f6e7e5;
}

.program-meta {
  display: grid;
  gap: 0;
  margin: 20px 0 0;
}

.program-meta div {
  display: grid;
  grid-template-columns: minmax(108px, 38%) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  min-height: 42px;
  padding: 9px 0;
  border-bottom: 1px solid #edf2ef;
}

.program-meta dt {
  color: var(--muted);
  font-weight: 800;
}

.program-meta dd {
  margin: 0;
  color: var(--green-900);
  font-weight: 800;
  text-align: end;
  overflow-wrap: anywhere;
}

.program-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.program-toolbar > strong {
  color: var(--muted);
  font-size: 0.9rem;
}

.program-toolbar .status {
  margin-bottom: 0;
  cursor: default;
}

.program-image-fallback {
  max-width: 90%;
  color: white;
  font-weight: 900;
  line-height: 1.5;
  text-align: center;
}

.program-loading-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.program-meta dd,
.detail-summary dd {
  unicode-bidi: plaintext;
}

.program-list-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.program-card-wide {
  display: grid;
  grid-template-columns: minmax(0, 0.62fr) minmax(0, 1fr);
  height: 100%;
}

.program-card-wide .program-image {
  width: 100%;
  min-height: 0;
  aspect-ratio: 4 / 5;
  align-self: start;
}

.program-card-wide .program-logo-area {
  overflow: hidden;
}

.program-card-wide .program-logo-area img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.program-card-wide .program-logo-area img.ruwat-program-logo,
.program-card-wide .program-logo-area img.sinaat-program-logo {
  width: var(--program-logo-size, 82%);
  height: var(--program-logo-size, 82%);
  max-width: 92%;
  max-height: 92%;
  padding: 8px;
  object-fit: contain;
}

.program-card-wide .card-actions {
  align-self: end;
  margin-top: 22px;
}

.program-summary-panel {
  display: grid;
  gap: 14px;
  padding: 28px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.program-summary-panel div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.program-summary-panel div:last-child {
  border-bottom: 0;
}

.program-summary-panel strong {
  color: var(--green-800);
  font-size: 2.1rem;
  line-height: 1;
}

.program-summary-panel span {
  color: var(--muted);
  font-weight: 800;
}

.program-detail-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.program-detail-copy .status {
  margin-bottom: 16px;
}

.back-link {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--green-800);
  font-weight: 800;
}

.detail-image {
  min-height: 360px;
  display: grid;
  align-content: end;
  gap: 10px;
  padding: 34px;
  color: white;
  background: var(--program-panel-bg, linear-gradient(135deg, var(--green-900), var(--green-700)));
  border: 1px solid rgba(181, 138, 53, 0.36);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.detail-image.logo-v-top { align-content: start; }
.detail-image.logo-v-center { align-content: center; }
.detail-image.logo-v-bottom { align-content: end; }
.detail-image.logo-h-left { justify-items: start; }
.detail-image.logo-h-center { justify-items: center; }
.detail-image.logo-h-right { justify-items: end; }

.detail-image .ruwat-program-logo,
.detail-image .sinaat-program-logo {
  width: var(--program-logo-size, 75%);
  height: auto;
  padding: 14px;
}

.detail-image:has(.detail-hero-image) {
  padding: 0;
  background: transparent;
}

.detail-image img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  min-height: 292px;
  display: block;
  object-fit: contain;
  background: white;
  border-radius: 12px;
}

.detail-image .detail-hero-image {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: contain;
  object-position: center;
  background: transparent;
  border-radius: inherit;
}

.detail-image .ruwat-program-logo,
.detail-image .sinaat-program-logo {
  min-height: 0;
  background: transparent !important;
}

.detail-image span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 4rem;
  font-weight: 800;
  line-height: 1;
}

.detail-image strong {
  font-size: 1.8rem;
}

.program-details-loading {
  min-height: 420px;
  display: grid;
  align-items: center;
}

.program-loading-card {
  min-height: 220px;
  display: grid;
  place-items: center;
  padding: 28px;
  color: var(--green-900);
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-weight: 900;
  text-align: center;
}

[data-program-details-content][hidden],
[data-program-details-loading][hidden] {
  display: none;
}

.details-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 34px;
  align-items: start;
}

.details-main,
.details-sidebar {
  padding: 28px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.details-main p {
  color: var(--muted);
}

.detail-block {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.check-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
}

.check-list ul,
.check-list ol {
  display: grid;
  gap: 12px;
  margin: 0;
}

.check-list ul {
  padding: 0;
  list-style: none;
}

.check-list ol {
  padding-inline-start: 24px;
  color: var(--muted);
}

.check-list ul li {
  position: relative;
  padding-inline-start: 28px;
  color: var(--muted);
}

.check-list ul li::before {
  position: absolute;
  inset-inline-start: 0;
  top: 0.45em;
  width: 10px;
  height: 10px;
  background: var(--gold-600);
  border-radius: 50%;
  content: "";
}

.details-sidebar {
  position: sticky;
  top: 104px;
}

.details-sidebar h2 {
  font-size: 1.45rem;
}

.detail-summary {
  display: grid;
  gap: 0;
  margin: 18px 0 22px;
}

.detail-summary div {
  display: grid;
  gap: 4px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.detail-summary dt {
  color: var(--muted);
}

.detail-summary dd {
  margin: 0;
  color: var(--green-900);
  font-weight: 800;
}

.step-card,
.registration-form,
.registration-summary {
  padding: 28px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 35px rgba(16, 61, 42, 0.08);
}

.step-indicator {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: steps;
}

.step-indicator li {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-weight: 800;
}

.step-indicator li::before {
  width: 36px;
  height: 36px;
  display: grid;
  flex: 0 0 36px;
  place-items: center;
  color: var(--green-900);
  background: var(--green-100);
  border: 1px solid var(--line);
  border-radius: 50%;
  content: attr(data-step-label);
}

.step-indicator li.active {
  color: var(--green-900);
}

.step-indicator li.active::before {
  color: white;
  background: var(--green-800);
  border-color: var(--green-800);
}

.registration-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}

.form-step {
  display: none;
}

.form-step.active {
  display: block;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
  color: var(--green-900);
  font-weight: 800;
}

.field[hidden] {
  display: none;
}

.field b {
  color: #a73d36;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
}

.field textarea {
  resize: vertical;
}

.field .ltr-input {
  direction: ltr;
  text-align: left;
  unicode-bidi: plaintext;
}

.currency-input {
  position: relative;
  display: block;
  direction: ltr;
}

.currency-input .currency-prefix {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 13px;
  color: var(--muted);
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
  transform: translateY(-50%);
}

.currency-input .ltr-input {
  padding-left: 32px;
}

.ltr-value {
  direction: ltr;
  text-align: left;
  unicode-bidi: plaintext;
  overflow-wrap: anywhere;
}

.payment-method-selector {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.admin-action-note {
  display: block;
  max-width: 12rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.field-wide {
  grid-column: 1 / -1;
}

.checkbox-field {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.checkbox-field input {
  width: auto;
  min-height: auto;
}

.rich-editor {
  min-height: 132px;
  padding: 11px 13px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 500;
}

.rich-editor:focus {
  border-color: var(--green-700);
  outline: 3px solid rgba(28, 104, 72, 0.14);
}

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.editor-toolbar button {
  min-height: 34px;
  padding: 6px 10px;
  color: var(--green-800);
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 999px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--green-700);
  outline: 3px solid rgba(28, 104, 72, 0.14);
}

.field.invalid input,
.field.invalid select,
.field.invalid textarea {
  border-color: #b5453e;
}

.field-error {
  min-height: 20px;
  color: #9f342e;
  font-weight: 700;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
}

.payment-panel {
  padding: 24px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.payment-panel p,
.registration-summary p {
  color: var(--muted);
}

.payment-methods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.payment-method {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 16px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}

.payment-method.active {
  border-color: var(--green-700);
  box-shadow: inset 0 0 0 1px rgba(28, 104, 72, 0.12);
}

.payment-method input {
  margin-top: 6px;
  accent-color: var(--green-800);
}

.payment-method strong,
.payment-method small {
  display: block;
}

.payment-method small,
.field-help,
.copy-message {
  color: var(--muted);
  font-weight: 700;
}

.receipt-file-name {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 6px 10px;
  color: var(--green-800);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.receipt-preview {
  width: 100%;
  max-width: 220px;
  max-height: 160px;
  object-fit: contain;
  object-position: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.payment-account {
  margin: 18px 0;
  padding: 20px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.copy-message {
  min-height: 22px;
  margin: 10px 0 0;
}

.confirmation-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}

.confirmation-card,
.confirmation-side {
  padding: 30px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 35px rgba(16, 61, 42, 0.08);
}

.confirmation-summary {
  display: grid;
  gap: 0;
  margin: 26px 0;
}

.confirmation-summary div {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.confirmation-summary dt {
  color: var(--muted);
  font-weight: 800;
}

.confirmation-summary dd {
  margin: 0;
  color: var(--green-900);
  font-weight: 800;
}

.status-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 28px;
  align-items: start;
}

.status-lookup,
.status-card {
  padding: 28px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 35px rgba(16, 61, 42, 0.08);
}

.status-card[hidden] {
  display: none;
}

.my-applications {
  grid-column: 1 / -1;
  padding: 28px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 35px rgba(16, 61, 42, 0.08);
}

.my-applications[hidden] {
  display: none;
}

.my-applications-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.application-status-card {
  min-width: 0;
  padding: 18px;
  background: var(--soft);
  border: 1px solid rgba(220, 231, 225, 0.9);
  border-radius: 14px;
}

.application-status-card h3 {
  margin-bottom: 5px;
  color: var(--green-900);
  font-size: 1.15rem;
}

.application-registration-number {
  margin: 0 0 14px;
  color: var(--muted);
  font-weight: 800;
}

.application-status-card dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.application-status-card dl > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.application-status-card dt {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.application-status-card dd {
  min-width: 0;
  margin: 0;
  color: var(--green-900);
  font-weight: 800;
}

.application-status-card .status {
  margin: 0;
}

.application-join-links {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.application-join-links[hidden] {
  display: none;
}

.application-join-links h3,
.application-join-links h4 {
  margin: 0;
  color: var(--green-900);
  font-size: 1rem;
}

.application-join-links > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.application-join-links .btn {
  min-height: 42px;
}

.cancel-registration-box {
  display: grid;
  gap: 14px;
  margin-top: 22px;
  padding: 18px;
  background: #fff7f5;
  border: 1px solid #f1cbc5;
  border-radius: var(--radius);
}

.cancel-registration-box p {
  margin: 0;
  color: #7a3434;
  font-weight: 700;
}

.btn-danger {
  color: white;
  background: #9f342e;
}

.admin-login-layout {
  width: min(620px, 100%);
  margin-inline: auto;
}

.admin-dashboard {
  display: grid;
  gap: 28px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.admin-stats article,
.admin-panel {
  padding: 24px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 35px rgba(16, 61, 42, 0.08);
}

.admin-stats strong {
  display: block;
  color: var(--green-800);
  font-size: 2rem;
  line-height: 1;
}

.admin-stats span {
  color: var(--muted);
  font-weight: 800;
}

.admin-panels {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 20px;
  align-items: start;
}

.admin-management-grid {
  display: grid;
  gap: 22px;
}

.admin-panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

.admin-mini-form {
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.appearance-settings {
  display: grid;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.appearance-settings legend {
  padding-inline: 8px;
  color: var(--green-900);
  font-weight: 900;
}

.program-image-settings {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.program-image-settings legend {
  padding-inline: 8px;
  color: var(--green-900);
  font-weight: 900;
}

.program-image-admin-preview {
  display: grid;
  grid-template-columns: minmax(160px, 240px) 1fr;
  gap: 16px;
  align-items: center;
}

.program-image-admin-panel {
  min-height: 150px;
  display: grid;
  place-items: center;
  padding: 18px;
  color: rgba(255, 255, 255, 0.78);
  background: linear-gradient(135deg, var(--green-900), var(--green-700));
  border-radius: 16px;
}

.program-image-admin-panel img {
  width: 100%;
  height: 130px;
  display: block;
  object-fit: contain;
  object-position: center;
  background: transparent;
}

.program-image-admin-preview p,
.form-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.program-image-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.appearance-preview {
  display: grid;
  place-items: center;
}

.appearance-preview-panel {
  width: min(260px, 100%);
  height: 240px;
  min-height: 240px;
  display: grid;
  place-items: center;
  padding: 18px;
  color: var(--program-accent-color, var(--gold-600));
  background: var(--program-panel-bg, var(--green-900));
  border-radius: 18px;
}

.appearance-preview-panel img {
  max-width: var(--program-logo-size, 75%);
  max-height: var(--program-logo-size, 75%);
  object-fit: contain;
  object-position: center;
  background: transparent !important;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.compact-table {
  min-width: 620px;
}

.admin-table th,
.admin-table td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  text-align: right;
}

.admin-table th {
  color: var(--green-900);
  background: var(--soft);
}

.admin-table td {
  color: var(--muted);
  font-weight: 700;
}

.admin-actions-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-inline-select {
  min-height: 36px;
  padding: 7px 10px;
  color: var(--green-900);
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  font-weight: 800;
}

.btn-small {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 0.86rem;
}

.form-message {
  margin-top: 18px;
  padding: 14px 16px;
  color: var(--green-900);
  background: var(--green-100);
  border: 1px solid rgba(28, 104, 72, 0.2);
  border-radius: var(--radius);
  font-weight: 800;
}

.form-message:empty {
  display: none;
}

.soft-band {
  background: var(--soft);
}

.two-column,
.contact-grid,
.cta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 42px;
  align-items: center;
}

.align-start {
  align-items: start;
}

.rich-copy {
  color: var(--muted);
  font-size: 1.05rem;
}

.rich-copy p:last-child {
  margin-bottom: 0;
}

.mission-grid,
.values-grid {
  display: grid;
  gap: 20px;
}

.mission-grid {
  grid-template-columns: repeat(2, 1fr);
}

.values-grid {
  grid-template-columns: repeat(4, 1fr);
}

.statement-card,
.values-grid article {
  padding: 26px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.statement-number {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--gold-600);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.statement-card p,
.values-grid p,
.about-showcase p {
  color: var(--muted);
}

.about-showcase {
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: 44px;
  align-items: center;
}

.showcase-visual {
  min-height: 300px;
  padding: 30px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 14px 35px rgba(16, 61, 42, 0.08);
}

.showcase-line {
  width: 84px;
  height: 6px;
  margin-bottom: 42px;
  background: var(--gold-600);
  border-radius: 999px;
}

.showcase-book {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.showcase-book span {
  height: 160px;
  background: linear-gradient(145deg, var(--green-800), var(--green-700));
  border: 1px solid rgba(181, 138, 53, 0.45);
}

.showcase-book span:first-child {
  border-radius: 8px 28px 28px 8px;
}

.showcase-book span:last-child {
  border-radius: 28px 8px 8px 28px;
}

.about-points {
  display: grid;
  gap: 14px;
}

.about-points div,
.contact-list span,
.contact-list a {
  display: grid;
  gap: 3px;
  padding: 18px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow-wrap: anywhere;
  transition: color var(--transition), border-color var(--transition);
}

.contact-list a:hover {
  color: var(--green-800);
  border-color: rgba(28, 104, 72, 0.28);
}

.about-points strong {
  color: var(--green-900);
}

.about-points span {
  color: var(--muted);
}

.stats-grid {
  grid-template-columns: repeat(4, 1fr);
}

.stat {
  padding: 24px;
}

.stat strong {
  display: block;
  color: var(--green-800);
  font-size: 2rem;
  line-height: 1;
}

.stat span {
  color: var(--muted);
  font-weight: 700;
}

.why-grid {
  grid-template-columns: repeat(3, 1fr);
}

.why-grid article {
  padding: 26px;
}

.icon-dot {
  width: 38px;
  height: 38px;
  display: inline-block;
  margin-bottom: 18px;
  background: linear-gradient(135deg, var(--green-800), var(--gold-600));
  border-radius: 50%;
}

.cta-band {
  padding: 58px 0;
  color: white;
  background: var(--green-900);
}

.cta-band h2,
.cta-band .eyebrow {
  color: white;
}

.cta-band p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.78);
}

.contact-list {
  display: grid;
  gap: 12px;
  color: var(--muted);
  font-weight: 700;
}

.placeholder-note {
  padding: 14px 0;
  color: var(--muted);
  background: var(--gold-100);
  text-align: center;
}

.placeholder-note p {
  margin: 0;
}

.site-footer {
  padding: 34px 0;
  color: rgba(255, 255, 255, 0.76);
  background: #0c2d20;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}

.footer-brand strong,
.footer-brand small {
  color: white;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-weight: 700;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.home-page .site-header {
  transition: background 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.home-page .site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(220, 231, 225, 0.72);
  box-shadow: 0 10px 32px rgba(16, 61, 42, 0.08);
}

.home-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(72px, 9vw, 118px) 0 82px;
  background:
    radial-gradient(circle at 14% 18%, rgba(181, 138, 53, 0.16), transparent 28%),
    linear-gradient(135deg, #f8fbf9 0%, #edf6f1 48%, #ffffff 100%);
}

.home-hero::before,
.home-hero::after {
  position: absolute;
  content: "";
  pointer-events: none;
  border-radius: 999px;
}

.home-hero::before {
  width: 280px;
  height: 280px;
  inset-block-start: -120px;
  inset-inline-end: 8%;
  background: rgba(22, 80, 55, 0.08);
}

.home-hero::after {
  width: 170px;
  height: 170px;
  inset-block-end: 36px;
  inset-inline-start: 7%;
  border: 1px solid rgba(181, 138, 53, 0.28);
}

.home-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}

.home-hero-copy {
  max-width: 590px;
}

.home-hero h1 {
  max-width: 9ch;
  margin-bottom: 18px;
  font-size: clamp(3rem, 8vw, 6.4rem);
  letter-spacing: -0.04em;
}

.home-hero-lead {
  max-width: 500px;
  margin-bottom: 28px;
  color: #42564d;
  font-size: clamp(1.08rem, 2vw, 1.32rem);
}

.home-hero-visual {
  position: relative;
  min-height: clamp(420px, 52vw, 590px);
}

.home-image-placeholder {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.78);
  background:
    linear-gradient(135deg, rgba(16, 61, 42, 0.92), rgba(28, 104, 72, 0.72)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 16px);
  border: 1px solid rgba(181, 138, 53, 0.32);
  box-shadow: 0 28px 70px rgba(16, 61, 42, 0.2);
}

.home-image-placeholder.program-placeholder {
  background: var(--program-panel-bg, linear-gradient(135deg, var(--green-900), var(--green-700)));
}

.home-image-placeholder.program-image-ruwat {
  background: var(--program-panel-bg, linear-gradient(135deg, var(--green-900), var(--green-700)));
}

.home-image-placeholder.program-image-gold {
  background: var(--program-panel-bg, linear-gradient(135deg, #7a652d, var(--gold-600)));
}


.home-image-placeholder::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 40%, rgba(16, 61, 42, 0.38));
  pointer-events: none;
}

.home-image-placeholder.program-image-ruwat::after,
.home-image-placeholder.program-image-gold::after {
  background: transparent;
}

.home-image-placeholder span {
  position: relative;
  z-index: 1;
  padding: 10px 14px;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-weight: 800;
}

.home-image-placeholder img {
  width: var(--program-logo-size, 100%);
  height: var(--program-logo-size, 100%);
  max-width: var(--program-logo-size, 100%);
  max-height: var(--program-logo-size, 100%);
  display: block;
  object-fit: contain;
  object-position: center;
}

.program-placeholder img {
  object-fit: contain;
  background: white;
}

.ruwat-program-logo,
.sinaat-program-logo {
  box-sizing: border-box;
  padding: 18px;
  object-fit: contain;
  object-position: center;
  background: transparent !important;
}

.logo-padding-small img {
  padding: 6px;
}

.logo-padding-medium img {
  padding: 14px;
}

.logo-padding-large img {
  padding: 24px;
}

.home-image-placeholder.logo-v-top {
  align-content: start;
}

.home-image-placeholder.logo-v-center {
  align-content: center;
}

.home-image-placeholder.logo-v-bottom {
  align-content: end;
}

.home-image-placeholder.logo-h-left {
  justify-items: start;
}

.home-image-placeholder.logo-h-center {
  justify-items: center;
}

.home-image-placeholder.logo-h-right {
  justify-items: end;
}

.home-image-placeholder.hero-image-placeholder img {
  object-fit: contain;
  object-position: center;
  background: var(--green-900);
}

.hero-image-placeholder {
  width: 100%;
  height: 100%;
  min-height: inherit;
  border-radius: 28px;
}

.home-floating-registration {
  position: absolute;
  inset-block-end: 34px;
  inset-inline-start: 34px;
  width: min(330px, calc(100% - 68px));
  padding: 22px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(220, 231, 225, 0.92);
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(16, 61, 42, 0.22);
  backdrop-filter: blur(16px);
  animation: homeFloatingCard 7.2s ease-in-out infinite;
}

.home-floating-registration:hover,
.home-floating-registration:focus-within {
  animation-play-state: paused;
}

.home-floating-registration strong,
.floating-label {
  display: block;
}

.floating-label {
  margin-bottom: 6px;
  color: var(--gold-600);
  font-weight: 900;
}

.home-floating-registration strong {
  margin-bottom: 16px;
  color: var(--green-900);
  font-size: 1.15rem;
  line-height: 1.45;
}

.floating-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.floating-actions .btn,
.home-page .hero-actions .btn,
.home-program-card .card-actions .btn {
  min-height: 50px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.95rem;
}

.home-page .hero-actions .btn {
  min-width: 170px;
}

.mobile-hero-actions {
  display: none;
}

@keyframes homeFloatingCard {
  0%, 12% {
    opacity: 0;
    transform: translateY(16px);
  }
  24%, 70% {
    opacity: 1;
    transform: translateY(0);
  }
  84%, 100% {
    opacity: 0;
    transform: translateY(-10px);
  }
}

.home-section-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 30px;
}

.home-section-head h2 {
  margin-bottom: 0;
}

.text-link {
  color: var(--green-800);
  font-weight: 900;
}

.text-link::after {
  content: " \2190";
  transition: margin 160ms ease;
}

.text-link:hover::after {
  margin-inline-start: 4px;
}

.home-program-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.home-program-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-self: stretch;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.home-program-card .card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 22px;
}

.home-program-card .status {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 6px 12px;
  border-radius: 999px;
}

.home-program-card h3 {
  min-height: 2.6em;
  margin-bottom: 10px;
}

.home-program-card p {
  display: -webkit-box;
  min-height: 4.35em;
  margin-bottom: 16px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.home-program-meta {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
  padding: 12px 0 0;
  border-top: 1px solid var(--line);
}

.home-program-meta div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.home-program-meta dt,
.home-program-meta dd {
  margin: 0;
  font-weight: 800;
}

.home-program-meta dt {
  color: var(--muted);
}

.home-program-meta dd {
  color: var(--green-900);
  text-align: end;
}

.home-program-card .card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: auto;
}

.home-program-card:hover,
.home-program-card:focus-within {
  border-color: rgba(181, 138, 53, 0.42);
  box-shadow: 0 22px 48px rgba(16, 61, 42, 0.13);
  transform: translateY(-4px);
}

.home-card-media {
  padding: 14px 14px 0;
}

.program-placeholder {
  height: 240px;
  min-height: 240px;
  max-height: 240px;
  border-radius: 18px;
  box-shadow: none;
}

.home-program-card .program-placeholder {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-content: center;
  justify-items: center;
  gap: 10px;
  padding: 18px;
}

.home-program-card .program-placeholder img {
  align-self: center;
  width: var(--program-logo-size, 75%);
  height: var(--program-logo-size, 75%);
  max-width: min(var(--program-logo-size, 75%), 82%);
  max-height: min(var(--program-logo-size, 75%), 82%);
  object-fit: contain;
  object-position: center;
}

.home-program-card .program-placeholder > span {
  max-width: 80%;
  display: inline-grid;
  min-height: 56px;
  place-items: center;
  padding: 12px 16px;
  text-align: center;
}

.home-program-card .program-number-area {
  max-width: 150px;
  align-self: end;
  font-size: 0.9rem;
}

.home-about {
  background:
    linear-gradient(135deg, rgba(232, 243, 237, 0.78), rgba(255, 255, 255, 0.94)),
    radial-gradient(circle at 82% 20%, rgba(181, 138, 53, 0.14), transparent 24%);
}

.home-about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 34px;
  align-items: center;
}

.home-about p {
  max-width: 560px;
  color: var(--muted);
}

.home-focus-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.home-focus-grid span {
  min-height: 132px;
  display: grid;
  place-items: center;
  color: var(--green-900);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 14px 35px rgba(16, 61, 42, 0.06);
  font-size: 1.25rem;
  font-weight: 900;
}

.home-step-list {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-step-list::before {
  position: absolute;
  inset-block-start: 32px;
  inset-inline: 9%;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(181, 138, 53, 0.42), transparent);
}

.home-step-list li {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  justify-items: center;
  padding: 22px 14px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  text-align: center;
}

.home-step-list span {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--green-800);
  border: 4px solid var(--gold-100);
  border-radius: 50%;
  font-weight: 900;
}

.home-step-list strong {
  color: var(--green-900);
}

.home-final-cta {
  padding: 42px 0;
}

.home-final-cta-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: clamp(30px, 5vw, 52px);
  color: white;
  background:
    radial-gradient(circle at 16% 20%, rgba(181, 138, 53, 0.3), transparent 26%),
    linear-gradient(135deg, var(--green-900), var(--green-700));
  border-radius: 28px;
  box-shadow: 0 28px 70px rgba(16, 61, 42, 0.2);
}

.home-final-cta h2 {
  color: white;
}

.home-final-cta p:not(.eyebrow) {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.78);
}

.home-page [data-home-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.home-page [data-home-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .home-floating-registration {
    animation: none;
  }

  .home-page [data-home-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .home-program-card,
  .text-link::after,
  .home-page .site-header {
    transition: none;
  }
}

@media (max-width: 920px) {
  .header-grid {
    grid-template-columns: auto auto;
    justify-content: space-between;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .primary-nav,
  .header-actions {
    grid-column: 1 / -1;
    display: none;
    width: 100%;
  }

  .site-header.nav-open .primary-nav,
  .site-header.nav-open .header-actions {
    display: flex;
  }

  .primary-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-top: 10px;
    border-top: 1px solid var(--line);
  }

  .primary-nav a {
    padding: 12px 0;
  }

  .header-actions {
    padding-bottom: 14px;
  }

  .hero-grid,
  .page-hero-grid,
  .program-detail-grid,
  .two-column,
  .contact-grid,
  .cta-grid,
  .about-showcase {
    grid-template-columns: 1fr;
  }

  .program-grid,
  .program-list-grid,
  .why-grid,
  .values-grid {
    grid-template-columns: 1fr 1fr;
  }

  .program-card-wide {
    grid-template-columns: 1fr;
  }

  .program-card-wide .program-image {
    height: 220px;
    min-height: 150px;
    aspect-ratio: auto;
  }

  .mission-grid {
    grid-template-columns: 1fr;
  }

  .details-layout {
    grid-template-columns: 1fr;
  }

  .registration-layout {
    grid-template-columns: 1fr;
  }

  .confirmation-layout {
    grid-template-columns: 1fr;
  }

  .status-layout {
    grid-template-columns: 1fr;
  }

  .my-applications-grid {
    grid-template-columns: 1fr;
  }

  .application-join-links > div {
    display: grid;
    grid-template-columns: 1fr;
  }

  .admin-stats,
  .admin-panels {
    grid-template-columns: 1fr;
  }

  .details-sidebar {
    position: static;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .home-hero-grid,
  .home-about-grid {
    grid-template-columns: 1fr;
  }

  .home-hero-copy {
    max-width: none;
  }

  .home-hero h1 {
    max-width: 12ch;
  }

  .home-hero-visual {
    min-height: 460px;
  }

  .home-program-grid {
    grid-template-columns: 1fr 1fr;
  }

  .home-program-card .program-placeholder {
    height: 230px;
    min-height: 230px;
    max-height: 230px;
  }

  .home-step-list {
    grid-template-columns: 1fr 1fr;
  }

  .home-step-list::before {
    display: none;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 24px, 1120px);
  }

  .header-grid {
    min-height: 66px;
    gap: 12px;
  }

  .brand {
    min-width: 0;
    gap: 9px;
  }

  .brand-logo {
    width: 42px;
    height: 42px;
  }

  .brand strong {
    font-size: 0.98rem;
  }

  .menu-toggle {
    width: 42px;
    height: 42px;
  }

  .site-header.nav-open {
    max-height: calc(100vh - 8px);
    overflow-y: auto;
  }

  .primary-nav {
    padding-top: 6px;
  }

  .primary-nav a {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 10px;
  }

  .primary-nav a[aria-current="page"] {
    background: var(--soft);
  }

  .site-header .header-actions {
    gap: 8px;
    padding-bottom: 12px;
  }

  .site-header .header-actions .btn {
    min-height: 44px;
    padding-block: 9px;
  }

  .section,
  .hero,
  .page-hero {
    padding: 42px 0;
  }

  .brand small {
    display: none;
  }

  .hero-actions,
  .card-actions,
  .header-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .hero-visual {
    min-height: auto;
  }

  .quran-panel {
    padding: 24px;
  }

  .detail-image {
    min-height: 220px;
    height: 240px;
    max-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    text-align: center;
  }

  .detail-image img,
  .detail-image .ruwat-program-logo,
  .detail-image .sinaat-program-logo {
    max-width: 80%;
    max-height: 180px;
    min-height: 0;
    object-fit: contain;
    object-position: center;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .payment-methods {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .form-actions {
    flex-direction: column-reverse;
  }

  .confirmation-summary div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .program-grid,
  .program-list-grid,
  .why-grid,
  .values-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .program-image-admin-preview {
    grid-template-columns: 1fr;
  }

  .program-card-wide .program-image,
  .home-program-card .program-placeholder {
    min-height: 180px;
    height: 180px;
    max-height: 180px;
  }

  .home-program-card .program-placeholder {
    min-height: 180px;
    height: 180px;
    max-height: 180px;
    padding: 14px;
  }

  .program-card-wide .program-visual,
  .home-program-card .program-placeholder {
    justify-content: center;
  }

  .program-card-wide .program-logo-area {
    flex: 0 1 auto;
    max-height: 145px;
  }

  .program-card-wide .program-logo-area img,
  .program-card-wide .ruwat-program-logo,
  .program-card-wide .sinaat-program-logo {
    max-width: 80%;
    max-height: 145px;
  }

  .program-image img,
  .home-image-placeholder img {
    width: var(--program-mobile-logo-size, var(--program-logo-size, 72%));
    height: var(--program-mobile-logo-size, var(--program-logo-size, 72%));
    max-width: var(--program-mobile-logo-size, var(--program-logo-size, 72%));
    max-height: var(--program-mobile-logo-size, var(--program-logo-size, 72%));
  }

  .home-program-card h3,
  .home-program-card p {
    min-height: auto;
  }

  .home-featured-programs .home-section-head {
    gap: 6px;
    margin-bottom: 18px;
  }

  .home-featured-programs .home-section-head h2 {
    font-size: clamp(1.65rem, 8vw, 2rem);
  }

  .home-featured-programs .text-link {
    align-self: flex-start;
    font-size: 0.9rem;
  }

  .home-card-media {
    padding: 10px 10px 0;
  }

  .home-program-card .card-body,
  .program-card-wide .card-body {
    padding: 16px;
  }

  .home-program-card .status,
  .program-card-wide .status {
    min-height: 28px;
    margin-bottom: 9px;
    padding: 4px 10px;
  }

  .home-program-card h3,
  .program-card-wide h3 {
    margin-bottom: 7px;
    font-size: 1.2rem;
    line-height: 1.4;
  }

  .home-program-card p {
    min-height: auto;
    margin-bottom: 12px;
    -webkit-line-clamp: 2;
  }

  .home-program-meta {
    gap: 5px;
    margin-bottom: 13px;
    padding-top: 9px;
  }

  .program-meta {
    margin-top: 8px;
  }

  .program-meta div {
    min-height: 34px;
    padding: 6px 0;
    gap: 10px;
  }

  .home-program-card .card-actions,
  .program-card-wide .card-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 13px;
  }

  .home-program-card .card-actions .btn,
  .program-card-wide .card-actions .btn {
    min-width: 0;
    min-height: 44px;
    padding: 9px 8px;
    font-size: 0.88rem;
    white-space: normal;
  }

  .program-card-wide .program-number-area {
    flex: 0 0 auto;
  }

  .footer-grid {
    align-items: flex-start;
    flex-direction: column;
  }

  .home-hero {
    padding: 42px 0 46px;
  }

  .home-hero h1 {
    max-width: 100%;
    font-size: clamp(2.55rem, 14vw, 3.8rem);
  }

  .home-hero-visual {
    min-height: auto;
  }

  .hero-image-placeholder {
    min-height: 270px;
    border-radius: 22px;
  }

  .home-floating-registration {
    position: static;
    width: 100%;
    margin-top: 14px;
    animation: none;
  }

  .floating-actions,
  .home-section-head,
  .home-final-cta-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .floating-actions,
  .home-program-grid,
  .home-focus-grid,
  .home-step-list {
    grid-template-columns: 1fr;
  }

  .home-focus-grid span {
    min-height: 92px;
  }

  .page-hero h1,
  .confirmation-card h1 {
    font-size: clamp(1.85rem, 9vw, 2.35rem);
  }

  .step-card,
  .registration-form,
  .registration-summary,
  .confirmation-card,
  .confirmation-side,
  .status-lookup,
  .status-card,
  .my-applications {
    padding: 18px;
  }

  .payment-panel {
    padding: 16px;
  }

  .form-actions {
    gap: 9px;
    margin-top: 18px;
  }

  .confirmation-summary {
    margin: 18px 0;
  }

  .confirmation-summary div {
    padding: 10px 0;
  }
}

@media (max-width: 350px) {
  .home-program-card .card-actions,
  .program-card-wide .card-actions {
    grid-template-columns: 1fr;
  }
}

/* Programs listing cards: scoped to the approved programs.html reference. */
[data-public-programs-list] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 24px;
}

[data-public-programs-list] .program-card-wide {
  grid-template-columns: minmax(0, 40%) minmax(0, 60%);
  height: auto;
  align-self: start;
  direction: rtl;
  background: white;
  border: 1px solid #e1e7e4;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

[data-public-programs-list] .program-card-wide .program-image {
  width: 100%;
  height: 100%;
  min-height: 100%;
  max-height: none;
  aspect-ratio: auto;
  align-self: stretch;
  padding: 16px;
  border-start-end-radius: 12px;
  border-end-end-radius: 12px;
}

[data-public-programs-list] .program-card-wide .program-visual {
  min-height: 100%;
  justify-content: center;
}

[data-public-programs-list] .program-card-wide .program-logo-area {
  flex: 1 1 auto;
}

[data-public-programs-list] .program-card-wide .program-logo-area img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  padding: 0;
  object-fit: cover;
  border-radius: 8px;
}

[data-public-programs-list] .program-card-wide .program-logo-area img.ruwat-program-logo,
[data-public-programs-list] .program-card-wide .program-logo-area img.sinaat-program-logo {
  width: 80%;
  height: 80%;
  max-width: 85%;
  max-height: 85%;
  object-fit: contain;
}

[data-public-programs-list] .program-card-wide .card-body {
  min-width: 0;
  padding: 20px;
}

[data-public-programs-list] .program-card-wide .status {
  align-self: stretch;
  justify-content: center;
  margin-bottom: 14px;
}

[data-public-programs-list] .program-card-wide h3 {
  margin-bottom: 10px;
  color: #0f3a2e;
  font-size: 1.25rem;
  font-weight: 700;
}

[data-public-programs-list] .program-card-wide .program-meta {
  margin-top: 4px;
}

[data-public-programs-list] .program-card-wide .program-meta div {
  grid-template-columns: minmax(92px, auto) minmax(0, 1fr);
  min-height: 0;
  gap: 12px;
  padding: 10px 0;
  padding-inline-start: 0;
  border-bottom: 1px solid #f1f5f3;
}

[data-public-programs-list] .program-card-wide .program-meta dt {
  color: #6b7280;
  font-size: 0.875rem;
}

[data-public-programs-list] .program-card-wide .program-meta dd {
  color: #0f2a1f;
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.7;
}

[data-public-programs-list] .program-card-wide .card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

[data-public-programs-list] .program-card-wide .card-actions .btn {
  min-width: 0;
  min-height: 42px;
  padding: 10px 8px;
  border-radius: 8px;
  font-size: 0.94rem;
  font-weight: 600;
  white-space: normal;
}

@media (min-width: 768px) and (max-width: 991px) {
  [data-public-programs-list] {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  [data-public-programs-list] {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  [data-public-programs-list] .program-card-wide {
    grid-template-columns: 1fr;
  }

  [data-public-programs-list] .program-card-wide .program-image {
    grid-row: 1;
    height: clamp(180px, 52vw, 220px);
    min-height: 180px;
    max-height: 220px;
    border-radius: 12px 12px 0 0;
  }

  [data-public-programs-list] .program-card-wide .program-logo-area img,
  [data-public-programs-list] .program-card-wide .program-logo-area img.ruwat-program-logo,
  [data-public-programs-list] .program-card-wide .program-logo-area img.sinaat-program-logo {
    width: auto;
    height: 100%;
    max-width: 85%;
    max-height: 100%;
    object-fit: contain;
  }

  [data-public-programs-list] .program-card-wide .card-body {
    grid-row: 2;
    padding: 16px;
  }

  [data-public-programs-list] .program-card-wide .program-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
  }

  [data-public-programs-list] .program-card-wide .program-meta div {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    gap: 3px;
    min-width: 0;
    min-height: 64px;
    padding: 9px 10px;
    background: var(--soft);
    border: 1px solid rgba(220, 231, 225, 0.8);
    border-radius: 10px;
  }

  [data-public-programs-list] .program-card-wide .program-meta div:nth-child(3) {
    order: 4;
  }

  [data-public-programs-list] .program-card-wide .program-meta div:nth-child(4) {
    order: 3;
  }

  [data-public-programs-list] .program-card-wide .program-meta dt {
    margin: 0;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.4;
  }

  [data-public-programs-list] .program-card-wide .program-meta dd {
    min-width: 0;
    margin: 0;
    color: var(--ink);
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.5;
    text-align: start;
    overflow-wrap: normal;
    word-break: normal;
    white-space: normal;
    unicode-bidi: isolate;
  }

  [data-public-programs-list] .program-card-wide .program-meta div:nth-child(2) dd,
  [data-public-programs-list] .program-card-wide .program-meta div:nth-child(3) dd {
    white-space: nowrap;
  }

  [data-public-programs-list] .program-card-wide .card-actions {
    display: flex;
    flex-direction: column-reverse;
  }

  [data-public-programs-list] .program-card-wide .card-actions .btn {
    width: 100%;
  }
}

@media (max-width: 350px) {
  [data-public-programs-list] .program-card-wide .program-meta div:nth-child(2) dd,
  [data-public-programs-list] .program-card-wide .program-meta div:nth-child(3) dd {
    white-space: normal;
  }
}

/* Mobile homepage composition follows the integrated hero/card pattern. */
@media (max-width: 640px) {
  .program-card-wide {
    grid-template-columns: minmax(112px, 1fr) minmax(0, 1.8fr);
  }

  .program-card-wide .program-image {
    min-height: 180px;
    height: clamp(180px, 45vw, 220px);
    max-height: 220px;
    aspect-ratio: auto;
    align-self: start;
  }

  .program-card-wide .program-visual {
    min-height: 100%;
    padding: 10px;
  }

  .program-card-wide .program-logo-area,
  .program-card-wide .program-logo-area img,
  .program-card-wide .ruwat-program-logo,
  .program-card-wide .sinaat-program-logo {
    max-width: 100%;
    max-height: 150px;
  }

  .program-card-wide .program-logo-area img,
  .program-card-wide .program-logo-area img.ruwat-program-logo,
  .program-card-wide .program-logo-area img.sinaat-program-logo {
    width: var(--program-mobile-logo-size, var(--program-logo-size, 72%));
    height: var(--program-mobile-logo-size, var(--program-logo-size, 72%));
    max-width: var(--program-mobile-logo-size, var(--program-logo-size, 72%));
    max-height: min(150px, var(--program-mobile-logo-size, var(--program-logo-size, 72%)));
    padding: 0;
    object-fit: contain;
  }

  .program-card-wide .card-body {
    padding: 14px;
  }

  .program-card-wide .program-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 12px;
  }

  .program-card-wide .program-meta div {
    grid-template-columns: 1fr;
    gap: 1px;
    min-height: 0;
    padding: 5px 0;
    padding-inline-start: 0;
  }

  .program-card-wide .program-meta dd {
    text-align: start;
  }

  .program-detail-hero .hero-actions [href="./programs.html"] {
    width: auto;
  }

  [data-detail-sidebar-action] {
    display: none;
  }

  .details-main,
  .details-sidebar {
    padding: 20px;
  }

  .detail-summary div {
    padding: 10px 0;
  }

  .program-loading-actions .btn {
    width: auto;
  }

  .home-page .home-hero {
    min-height: clamp(440px, 125vw, 510px);
    display: flex;
    align-items: center;
    padding: 42px 0;
    background:
      linear-gradient(to left, rgba(250, 252, 249, 0.9) 0%, rgba(247, 250, 246, 0.72) 58%, rgba(237, 244, 238, 0.34) 100%),
      url("./assets/home-hero-nukhba.jpg") 0% center / cover no-repeat;
    border-bottom: 1px solid rgba(16, 61, 42, 0.12);
  }

  .home-page .home-hero::before {
    width: 100%;
    height: 100%;
    inset: 0;
    border-radius: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(232, 243, 237, 0.08));
  }

  .home-page .home-hero::after {
    display: none;
  }

  .home-page .home-hero-grid {
    display: block;
  }

  .home-page .home-hero-copy {
    max-width: 31rem;
  }

  .home-page .home-hero h1 {
    max-width: 10ch;
    margin-bottom: 14px;
    font-size: clamp(2.35rem, 12vw, 3.3rem);
    line-height: 1.2;
    text-shadow: 0 1px 0 white, 0 0 14px rgba(250, 252, 249, 0.95);
  }

  .home-page .home-hero-lead {
    max-width: 27rem;
    margin-bottom: 22px;
    color: #31483d;
    font-size: 1.03rem;
    line-height: 1.8;
    text-shadow: 0 1px 0 white, 0 0 10px rgba(250, 252, 249, 0.9);
  }

  .home-page .home-hero-visual {
    display: none;
  }

  .home-page .hero-actions {
    max-width: 28rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .home-page .desktop-hero-actions {
    display: none;
  }

  .home-page .mobile-hero-actions {
    display: grid;
  }

  .home-page .hero-actions .btn {
    min-width: 0;
    min-height: 48px;
    width: 100%;
    padding: 10px 12px;
    white-space: normal;
  }

  .home-page .home-featured-programs {
    padding-top: 38px;
  }

  .home-page .home-featured-programs .home-section-head {
    align-items: center;
    text-align: center;
  }

  .home-page .home-featured-programs .text-link {
    align-self: center;
  }

  .home-page .home-program-grid {
    gap: 16px;
  }

  .home-page .home-program-card {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 0.66fr) minmax(108px, 0.34fr);
    grid-template-rows: auto auto auto auto auto;
    column-gap: 12px;
    row-gap: 0;
    overflow: hidden;
    border-radius: 22px;
    box-shadow: 0 12px 30px rgba(16, 61, 42, 0.1);
  }

  .home-page .home-program-card .home-card-media {
    grid-column: 2;
    grid-row: 1 / 5;
    align-self: stretch;
    padding: 12px 0 0 12px;
  }

  .home-page .home-program-card .program-placeholder {
    min-height: 218px;
    height: 100%;
    max-height: none;
    padding: 8px;
    border-radius: 15px;
  }

  .home-page .home-program-card .program-placeholder img:not(.ruwat-program-logo):not(.sinaat-program-logo) {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    padding: 0;
    object-fit: cover;
  }

  .home-page .home-program-card .ruwat-program-logo,
  .home-page .home-program-card .sinaat-program-logo {
    object-fit: contain;
  }

  .home-page .home-program-card .card-body {
    display: contents;
  }

  .home-page .home-program-card .status,
  .home-page .home-program-card h3,
  .home-page .home-program-card .card-body > p,
  .home-page .home-program-card .home-program-meta {
    grid-column: 1;
    margin-inline-end: 0;
    margin-inline-start: 14px;
  }

  .home-page .home-program-card .status {
    grid-row: 1;
    align-self: start;
    justify-self: start;
    margin-top: 14px;
    margin-bottom: 8px;
  }

  .home-page .home-program-card h3 {
    grid-row: 2;
    margin-bottom: 7px;
    font-size: 1.16rem;
  }

  .home-page .home-program-card .card-body > p {
    grid-row: 3;
    margin-bottom: 9px;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.65;
    -webkit-line-clamp: 3;
  }

  .home-page .home-program-card .home-program-meta {
    grid-row: 4;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
    padding-top: 8px;
  }

  .home-page .home-program-card .home-program-meta div {
    display: grid;
    gap: 2px;
  }

  .home-page .home-program-card .home-program-meta dd {
    text-align: start;
  }

  .home-page .home-program-card .card-actions {
    grid-column: 1 / -1;
    grid-row: 5;
    margin: 0;
    padding: 12px;
    border-top: 1px solid var(--line);
  }

  .home-page .home-program-card .card-actions [data-registration-cta] {
    color: white;
    background: var(--green-800);
    border-color: var(--green-800);
  }
}

@media (max-width: 350px) {
  .program-card-wide {
    grid-template-columns: 1fr;
  }

  .program-card-wide .program-image {
    min-height: 130px;
    height: 130px;
    max-height: 130px;
  }

  .program-card-wide .program-meta {
    grid-template-columns: 1fr;
  }

  .home-page .home-hero {
    min-height: 470px;
    background-position: 0% center;
  }

  .home-page .hero-actions {
    grid-template-columns: 1fr;
  }

  .home-page .home-program-card {
    display: flex;
    flex-direction: column;
  }

  .home-page .home-program-card .home-card-media {
    padding: 10px 10px 0;
  }

  .home-page .home-program-card .program-placeholder {
    min-height: 175px;
    height: 175px;
  }

  .home-page .home-program-card .card-body {
    display: flex;
    padding: 16px;
  }

  .home-page .home-program-card .status,
  .home-page .home-program-card h3,
  .home-page .home-program-card .card-body > p,
  .home-page .home-program-card .home-program-meta {
    margin-inline: 0;
  }

  .home-page .home-program-card .status {
    margin-top: 0;
  }

  .home-page .home-program-card .card-actions {
    width: 100%;
    padding: 12px 0 0;
    border-top: 1px solid var(--line);
  }
}

/* Mobile Program Details information architecture: image, action, facts, then content. */
@media (max-width: 640px) {
  [data-program-details-page] .program-detail-grid {
    position: relative;
    gap: 14px;
  }

  [data-program-details-page] .detail-image {
    order: 1;
  }

  [data-program-details-page] .program-detail-copy {
    order: 2;
  }

  [data-program-details-page] .program-detail-copy .back-link {
    position: absolute;
    z-index: 2;
    inset-block-start: 10px;
    inset-inline-start: 10px;
    margin: 0;
    padding: 7px 10px;
    color: var(--green-900);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(16, 61, 42, 0.14);
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(16, 61, 42, 0.08);
    font-size: 0.78rem;
  }

  [data-program-details-content] > .section {
    padding-top: 10px;
  }

  [data-program-details-content] .details-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
    padding: 16px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 14px;
  }

  [data-program-details-content] .details-main,
  [data-program-details-content] .details-sidebar,
  [data-program-details-content] .detail-summary {
    display: contents;
  }

  [data-program-details-content] .details-sidebar > h2 {
    grid-column: 1 / -1;
    order: 1;
    margin: 0 0 2px;
    font-size: 1.15rem;
  }

  [data-program-details-content] .detail-summary > div:not(:has([data-detail-target-audience])) {
    order: 2;
    min-width: 0;
    padding: 9px 10px;
    background: var(--soft);
    border: 1px solid rgba(220, 231, 225, 0.8);
    border-radius: 10px;
  }

  [data-program-details-content] .detail-summary > div:has([data-detail-summary-status]) {
    grid-column: 1 / -1;
  }

  [data-program-details-content] .detail-summary dt {
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 700;
  }

  [data-program-details-content] .detail-summary dd {
    color: var(--ink);
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.5;
  }

  [data-program-details-content] .details-main > .section-heading {
    grid-column: 1 / -1;
    order: 3;
    margin: 14px 0 0;
    padding-top: 16px;
    border-top: 1px solid var(--line);
  }

  [data-program-details-content] .details-main > p {
    grid-column: 1 / -1;
    order: 4;
    max-width: 68ch;
    margin: 0;
    color: var(--muted);
    font-size: 0.94rem;
    font-weight: 400;
    line-height: 1.85;
  }

  [data-program-details-content] .detail-summary > div:has([data-detail-target-audience]) {
    grid-column: 1 / -1;
    order: 5;
    display: block;
    margin-top: 12px;
    padding: 16px 0 0;
    background: transparent;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
  }

  [data-program-details-content] .detail-summary > div:has([data-detail-target-audience]) dt {
    margin-bottom: 8px;
    color: var(--green-900);
    font-size: 1.08rem;
    font-weight: 700;
  }

  [data-program-details-content] .detail-summary dd[data-detail-target-audience] {
    max-width: 68ch;
    color: var(--muted);
    font-size: 0.96rem;
    font-weight: 400;
    line-height: 1.9;
  }

  [data-program-details-content] [data-detail-target-audience] p {
    margin: 0 0 10px;
  }

  [data-program-details-content] [data-detail-target-audience] p:last-child {
    margin-bottom: 0;
  }

  [data-program-details-content] .detail-block:has([data-detail-objectives]) {
    grid-column: 1 / -1;
    order: 6;
  }

  [data-program-details-content] .detail-block:has([data-detail-requirements]) {
    grid-column: 1 / -1;
    order: 7;
  }

  [data-program-details-content] .detail-block {
    margin-top: 10px;
    padding-top: 16px;
  }

  [data-program-details-content] .detail-block h3 {
    margin-bottom: 8px;
    font-size: 1.08rem;
    font-weight: 700;
  }

  [data-program-details-content] .check-list,
  [data-program-details-content] .check-list ul,
  [data-program-details-content] .check-list ol {
    gap: 6px;
  }

  [data-program-details-content] .check-list {
    color: var(--muted);
    font-size: 0.94rem;
    font-weight: 400;
    line-height: 1.75;
  }
}




