/* ══════════════════════════════════════
   MARTYRS REGISTRY — سجلّ الشهداء (سجل الأطفال)
   (Design ref: websiteExtracted/سجل الأطفال)
   ══════════════════════════════════════ */

.habbat-registry-page {
  direction: rtl;
  padding-block-end: 56px;
}

/* Layer 1: section header */
.habbat-registry-header {
  text-align: center;
  padding: 32px clamp(16px, 4vw, 40px) 40px;
  max-width: 1200px;
  margin-inline: auto;
}

.habbat-registry-header__title {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 900;
  line-height: 1.35;
  color: #f05a4f;
}

.habbat-registry-header__sub {
  margin: 0;
  font-size: clamp(15px, 2vw, 17px);
  font-weight: 500;
  line-height: 1.7;
  color: #475569;
  max-width: 520px;
  margin-inline: auto;
}

/* Layer 2: poetry block */
.habbat-registry-poetry {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 40px);
  padding-block-end: 8px;
}

.habbat-registry-poetry__title {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin: 0 0 18px;
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 800;
  line-height: 1.4;
  color: #0c5460;
  text-align: start;
}

.habbat-registry-poetry__accent {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.habbat-registry-poetry__accent::before,
.habbat-registry-poetry__accent::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: #f05a4f;
}

.habbat-registry-poetry__box {
  max-width: 900px;
  margin-inline: auto;
  background: #0c5460;
  border-radius: 16px;
  padding: 35px clamp(20px, 4vw, 40px);
}

.habbat-registry-poetry__text {
  text-align: start;
  direction: rtl;
  color: #ffffff;
  font-size: clamp(14px, 1.8vw, 16px);
  font-weight: 500;
  line-height: 1.85;
}

.habbat-registry-poetry__text p {
  margin: 0 0 10px;
}

.habbat-registry-poetry__text p:last-child {
  margin-block-end: 0;
}

/* Layer 3: card grid */
.habbat-registry-grid-section {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 40px);
}

.habbat-registry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-block: 40px;
}

.habbat-registry-grid__footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding-block-end: 24px;
}

.habbat-registry-status {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  text-align: center;
  line-height: 1.6;
}

.habbat-registry-grid__loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 16px;
  color: #64748b;
  font-size: 15px;
  line-height: 1.6;
}

.habbat-registry-grid__error {
  grid-column: 1 / -1;
  text-align: center;
  padding: 32px;
  color: #f05a4f;
  font-weight: 600;
}

/* ── Registry martyr card ── */
.habbat-registry-card {
  display: flex;
  flex-direction: column;
  min-height: 420px;
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  position: relative;
  color: inherit;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.habbat-registry-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
}

/* ── Sky band: default = no image (gradient + dove + arch frame) ── */
.habbat-registry-card__sky {
  position: relative;
  flex: 0 0 auto;
  display: block;
  height: 220px;
  min-height: 220px;
  overflow: hidden;
  background: linear-gradient(180deg, #a8d4ef 0%, #7eb8dc 55%, #5a9fc4 100%);
}

.habbat-registry-card__dove {
  display: block;
  position: absolute;
  inset-block-start: 10px;
  inset-inline: 0;
  margin-inline: auto;
  width: fit-content;
  z-index: 3;
  font-size: 1.25rem;
  line-height: 1;
  opacity: 0.92;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.12));
}

.habbat-registry-card__arch {
  position: absolute;
  inset-inline: 16%;
  inset-block-end: 0;
  width: auto;
  height: 82%;
  margin: 0;
  border-radius: 50% 50% 0 0 / 44% 44% 0 0;
  overflow: hidden;
  background: #5a9fc4;
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-block-end: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  pointer-events: none;
}

.habbat-registry-card__arch img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
}

/* With photo — override placeholder only; removing class restores default */
.habbat-registry-card__sky--has-photo {
  height: auto;
  min-height: 220px;
  padding: 0;
}

.habbat-registry-card__sky--has-photo .habbat-registry-card__dove {
  display: none;
}

.habbat-registry-card__sky--has-photo .habbat-registry-card__arch {
  position: static;
  inset: auto;
  width: 100%;
  height: auto;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  pointer-events: auto;
}

.habbat-registry-card__sky--has-photo .habbat-registry-card__arch img {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: center bottom;
}

.habbat-registry-card__body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  background: #f5f0e8;
  padding: 20px;
  text-align: start;
  direction: rtl;
  position: relative;
  z-index: 3;
  padding-block-end: 48px;
  min-height: 0;
}

.habbat-registry-card__name {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.45;
  color: #1a1208;
}

.habbat-registry-card__en {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  color: #94a3b8;
  font-style: italic;
  direction: ltr;
  text-align: start;
}

.habbat-registry-card__meta {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.habbat-registry-card__row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.55;
  color: #475569;
}

.habbat-registry-card__ico {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: #0c5460;
}

.habbat-registry-card__ico svg {
  display: block;
  width: 16px;
  height: 16px;
}

.habbat-registry-card__print {
  position: absolute;
  inset-block-end: 12px;
  inset-inline-start: 12px;
  inset-inline-end: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.95);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  color: #3b82f6;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  pointer-events: none;
}

.habbat-registry-card__print svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

@media (max-width: 960px) {
  .habbat-registry-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .habbat-registry-grid {
    grid-template-columns: 1fr;
    margin-block: 28px;
  }

  .habbat-registry-card {
    min-height: 0;
  }

  .habbat-registry-poetry__box {
    padding: 28px 20px;
  }
}
