:root {
  --bg: #0d1a12;
  --bg-soft: #13251a;
  --panel: rgba(255, 250, 241, 0.92);
  --panel-strong: #fffaf1;
  --panel-dark: rgba(14, 28, 20, 0.75);
  --line: rgba(181, 148, 86, 0.28);
  --line-strong: rgba(181, 148, 86, 0.55);
  --gold: #b59456;
  --gold-soft: #dbc9a1;
  --emerald: #1f5a43;
  --emerald-strong: #123c2d;
  --ink: #1c1a15;
  --muted: #6f6657;
  --sand: #f4ecdd;
  --sand-2: #efe6d4;
  --white: #ffffff;
  --danger: #9c3e30;
  --shadow: 0 24px 60px rgba(6, 15, 11, 0.24);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --container: 1360px;
}

/* Recorded lessons / courses */
.recorded-home-metrics {
  margin-bottom: 18px;
}
.recorded-home-column,
.recorded-page-group {
  display: grid;
  gap: 16px;
}
.recorded-mini-list,
.recorded-list-grid {
  display: grid;
  gap: 18px;
}
.recorded-card {
  display: grid;
  gap: 14px;
}
.unified-card,
.lesson-card,
.recorded-card {
  position: relative;
  overflow: hidden;
}
.recorded-card.compact {
  padding: 18px;
}
.recorded-cover {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 20px;
  border: 1px solid rgba(217, 180, 111, .18);
}
.recorded-card-body {
  display: grid;
  gap: 12px;
}
.recorded-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.recorded-card-head h3 {
  margin: 4px 0 0;
}
.recorded-meta-lines,
.recorded-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.recorded-meta-lines span,
.recorded-tags span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(31, 90, 67, .08);
  color: #1f5a43;
  font-weight: 700;
}
.recorded-summary {
  margin: 0;
  line-height: 1.9;
}
.recorded-media-stack {
  display: grid;
  gap: 12px;
}
.recorded-media-block {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(217, 180, 111, .18);
}
.recorded-media-block audio,
.recorded-media-block video,
.recorded-media-block iframe {
  width: 100%;
  border: 0;
  border-radius: 16px;
  background: #0b1714;
}
.recorded-media-block video {
  max-height: 420px;
}
.recorded-pdf-block iframe {
  min-height: 460px;
  background: #fff;
}
.recorded-video-frame {
  position: relative;
  padding-top: 56.25%;
}
.recorded-video-frame iframe {
  position: absolute;
  inset: 0;
  height: 100%;
}
.recorded-page-shell {
  padding-top: 0;
}
.recorded-filters-card,
.recorded-detail-section {
  display: grid;
  gap: 18px;
}
.recorded-filters-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.recorded-filter-actions {
  justify-content: space-between;
  align-items: center;
}
.recorded-count-pills,
.recorded-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.recorded-count-pills span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(181, 148, 86, .12);
  color: var(--emerald-strong);
  font-weight: 700;
}
.recorded-detail-hero-grid {
  align-items: start;
}
.recorded-linked-lesson-card {
  display: grid;
  grid-template-columns: minmax(0, 240px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.recorded-linked-image,
.recorded-detail-image {
  width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(217, 180, 111, .18);
  object-fit: cover;
}
.recorded-detail-image {
  max-height: 520px;
}
.recorded-linked-copy {
  display: grid;
  gap: 12px;
}
.recorded-image-block img {
  background: #fff;
}
.card-overlay-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}
.card-click-surface {
  position: relative;
  z-index: 0;
}
.lesson-card .actions,
.lesson-card .clear-link,
.lesson-card .inline-action-link,
.lesson-card .attachment-link,
.recorded-card .actions,
.recorded-card .recorded-tags,
.recorded-card .recorded-count-pills {
  position: relative;
  z-index: 2;
}
.recorded-entry-source {
  color: var(--muted);
  font-weight: 700;
}
.detail-copy-grid strong {
  font-size: 1.24rem;
  color: var(--emerald-strong);
  line-height: 1.8;
}
.detail-overview-card.no-image {
  grid-template-columns: minmax(0, 1fr);
}
.detail-actions-row {
  margin-top: 6px;
}
.related-reason-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: -6px;
}
.related-reason-row span {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(181, 148, 86, .12);
  color: var(--emerald-strong);
  font-weight: 800;
  font-size: .84rem;
}

@media (max-width: 680px) {
  .recorded-filters-grid,
  .recorded-linked-lesson-card,
  .recorded-card-head,
  .recorded-meta-lines,
  .recorded-tags {
    display: grid;
  }
  .recorded-filter-actions {
    align-items: stretch;
  }
  .recorded-pdf-block iframe {
    min-height: 320px;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: 'Tajawal', sans-serif;
  background: linear-gradient(180deg, #0f2017 0%, #0a1812 100%);
  min-height: 100vh;
}

body.menu-open {
  overflow: hidden;
}

a { color: inherit; }
img { max-width: 100%; }
button, input, textarea {
  font: inherit;
}
button { cursor: pointer; }

.site-backdrop,
.pattern-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
}

.site-backdrop {
  background:
    radial-gradient(circle at top right, rgba(181, 148, 86, 0.2), transparent 28%),
    radial-gradient(circle at left 20%, rgba(31, 90, 67, 0.28), transparent 30%),
    linear-gradient(135deg, #102117 0%, #0b1811 42%, #0e1712 100%);
}

.pattern-overlay {
  z-index: -1;
  opacity: 0.14;
  background-image:
    linear-gradient(45deg, rgba(255,255,255,0.04) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,0.04) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.04) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.04) 75%);
  background-size: 46px 46px;
  background-position: 0 0, 0 23px, 23px -23px, -23px 0;
}

.container {
  width: min(var(--container), calc(100% - 28px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(18px);
  background: rgba(10, 20, 15, 0.78);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.topbar-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--sand);
  text-decoration: none;
  min-width: 0;
}

.brand-mark-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(181, 148, 86, 0.18), rgba(255,255,255,0.04));
  border: 1px solid rgba(181, 148, 86, 0.32);
  color: var(--gold-soft);
  font-size: 1.3rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.brand-mark strong {
  display: block;
  font: 700 1.05rem/1.4 'Amiri', serif;
}

.brand-mark small {
  display: block;
  color: rgba(244, 236, 221, 0.72);
  font-size: 0.84rem;
}

.topbar-menu {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(181, 148, 86, 0.24);
  background: rgba(255,255,255,0.05);
  color: var(--sand);
  padding: 12px 16px;
  border-radius: 999px;
}

.menu-toggle:hover {
  background: rgba(255,255,255,0.1);
}

.main-nav[hidden] {
  display: none !important;
}

.main-nav {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  left: auto;
  width: min(260px, calc(100vw - 40px));
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(10, 20, 15, 0.96);
  border: 1px solid rgba(181, 148, 86, 0.2);
  box-shadow: 0 18px 40px rgba(0,0,0,0.28);
  z-index: 35;
}

.main-nav a {
  text-decoration: none;
  color: rgba(255, 250, 241, 0.9);
  padding: 12px 14px;
  border-radius: 14px;
  transition: 0.25s ease;
  text-align: right;
}

.main-nav a:hover {
  background: rgba(255,255,255,0.06);
  color: var(--white);
}

.hero-shell {
  padding: 34px 0 22px;
}

.lessons-entry {
  padding-top: 34px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.9fr);
  gap: 22px;
  align-items: stretch;
}

.hero-copy,
.hero-panel,
.request-card,
.content-card,
.calendar-card,
.subscribe-card,
.about-grid {
  position: relative;
}

.hero-copy {
  background: linear-gradient(180deg, rgba(255, 250, 241, 0.96), rgba(248, 240, 226, 0.96));
  border: 1px solid var(--line);
  border-radius: 34px;
  padding: 38px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-copy::after,
.hero-panel::after,
.request-card::after,
.content-card::after,
.calendar-card::after,
.subscribe-card::after,
.about-grid::after {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: inherit;
  border: 1px solid rgba(181, 148, 86, 0.12);
  pointer-events: none;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(31, 90, 67, 0.08);
  color: var(--emerald);
  border: 1px solid rgba(31, 90, 67, 0.12);
  font-size: 0.84rem;
  font-weight: 700;
}

.hero-copy h1,
.hero-copy h2 {
  font-family: 'Amiri', serif;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.32;
  margin: 18px 0 12px;
}

.hero-copy h1 span,
.hero-copy h2 span {
  color: var(--emerald);
}

.hero-lead {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 2;
  max-width: 64ch;
}

.hero-actions,
.form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.btn {
  border: 0;
  border-radius: 999px;
  padding: 14px 22px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-gold {
  background: linear-gradient(135deg, #ceb374, var(--gold));
  color: #241d11;
  box-shadow: 0 14px 28px rgba(181, 148, 86, 0.22);
}

.btn-outline {
  background: transparent;
  color: var(--emerald);
  border: 1px solid rgba(31, 90, 67, 0.2);
}

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

.btn-secondary {
  background: rgba(31, 90, 67, 0.08);
  color: var(--emerald);
}

.btn-danger {
  background: rgba(156, 62, 48, 0.12);
  color: var(--danger);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.metric-card {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255,255,255,0.66);
  border: 1px solid rgba(181, 148, 86, 0.2);
}

.metric-card strong {
  display: block;
  font-size: 1.9rem;
  color: var(--emerald-strong);
}

.metric-card span {
  display: block;
  color: var(--muted);
  margin-top: 6px;
}

.hero-panel {
  background: linear-gradient(180deg, rgba(20, 39, 29, 0.88), rgba(10, 18, 14, 0.92));
  color: var(--sand);
  border: 1px solid rgba(181, 148, 86, 0.18);
  border-radius: 34px;
  padding: 30px;
  box-shadow: var(--shadow);
}

.quote-card {
  padding: 20px 22px;
  border-radius: 22px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

.quote-text {
  font-family: 'Amiri', serif;
  font-size: 1.6rem;
  line-height: 1.9;
  margin: 0 0 8px;
}

.quote-source {
  color: rgba(244, 236, 221, 0.74);
}

.panel-stack {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.mini-panel {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 14px;
  align-items: start;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
}

.mini-panel i {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(181, 148, 86, 0.14);
  color: var(--gold-soft);
}

.mini-panel strong {
  display: block;
  margin-bottom: 6px;
}

.mini-panel p {
  margin: 0;
  color: rgba(244, 236, 221, 0.76);
  line-height: 1.8;
}

.section {
  padding: 24px 0 32px;
}

.section-heading {
  margin-bottom: 22px;
}

.section-heading h1,
.section-heading h2 {
  font-family: 'Amiri', serif;
  font-size: clamp(1.8rem, 3.2vw, 2.8rem);
  margin: 16px 0 8px;
  color: var(--sand);
}

.section-heading p {
  color: rgba(244, 236, 221, 0.74);
  max-width: 60ch;
  margin: 0;
  line-height: 1.9;
}

.section-heading.centered {
  text-align: center;
}

.section-heading.centered p {
  margin-inline: auto;
}

.section-heading.compact h2 {
  color: var(--ink);
  margin-bottom: 2px;
}

.section-heading.compact { margin-bottom: 16px; }

.request-card,
.content-card,
.calendar-card,
.subscribe-card,
.about-grid {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.request-card,
.calendar-card,
.subscribe-card {
  padding: 28px;
}

.request-switcher {
  display: inline-flex;
  gap: 10px;
  padding: 8px;
  border-radius: 999px;
  background: #f1e6d2;
  border: 1px solid rgba(181, 148, 86, 0.16);
}

.switch-btn {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.switch-btn.active {
  background: var(--emerald);
  color: var(--white);
  box-shadow: 0 10px 22px rgba(31, 90, 67, 0.18);
}

.request-mode { display: none; }
.request-mode.active { display: block; }

.request-form { margin-top: 22px; }

.form-intro {
  margin-bottom: 18px;
  padding: 16px 18px;
  border-radius: 18px;
  background: #f6efe1;
  color: var(--muted);
  border: 1px solid rgba(181, 148, 86, 0.12);
}

.form-intro strong {
  display: block;
  color: var(--ink);
  margin-bottom: 4px;
}

.form-grid {
  display: grid;
  gap: 16px;
}

.form-grid.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-weight: 700;
  color: var(--ink);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid rgba(31, 90, 67, 0.12);
  border-radius: 16px;
  background: rgba(255,255,255,0.9);
  padding: 14px 16px;
  color: var(--ink);
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: rgba(31, 90, 67, 0.34);
  box-shadow: 0 0 0 4px rgba(31, 90, 67, 0.08);
}

.field small {
  color: var(--muted);
}

.span-2 { grid-column: span 2; }

.request-feedback {
  margin-top: 18px;
  border-radius: 20px;
  padding: 18px;
  background: #f6efe1;
  border: 1px solid rgba(181, 148, 86, 0.16);
}

.feedback-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.feedback-badge {
  background: rgba(31, 90, 67, 0.08);
  color: var(--emerald);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.preview-lessons {
  display: grid;
  gap: 10px;
}

.preview-card {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(181, 148, 86, 0.16);
}

.preview-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--emerald-strong);
}

.preview-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
  color: var(--muted);
}

.section-grid.three-up {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.content-card {
  padding: 24px;
}

.lessons-list {
  display: grid;
  gap: 14px;
}

.lesson-card {
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(181, 148, 86, 0.14);
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 10px 24px rgba(10, 20, 15, 0.08);
}

.lesson-card.featured {
  border-color: rgba(181, 148, 86, 0.38);
  box-shadow: 0 18px 34px rgba(181, 148, 86, 0.12);
}

.card-header {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: start;
}

.sheikh {
  font-family: 'Amiri', serif;
  font-size: 1.45rem;
  color: var(--emerald-strong);
}

.time {
  flex-shrink: 0;
  background: #f5eddd;
  color: var(--emerald);
  border-radius: 999px;
  padding: 10px 12px;
  font-size: 0.88rem;
  font-weight: 700;
}

.subject {
  margin: 14px 0 10px;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.8;
}

.meta-line,
.location {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  margin-top: 10px;
}

.meta-line i,
.location i {
  color: var(--gold);
}

.description {
  color: var(--muted);
  line-height: 1.9;
  margin-top: 12px;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.disabled-btn {
  opacity: 0.78;
}

.no-lessons {
  padding: 18px;
  border-radius: 18px;
  background: #f7f1e6;
  color: var(--muted);
  border: 1px dashed rgba(181, 148, 86, 0.22);
  line-height: 1.9;
}

.calendar-card {
  overflow: hidden;
}

.calendar-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.calendar-nav h3 {
  margin: 0;
  font-family: 'Amiri', serif;
  font-size: 1.85rem;
}

.nav-btn {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(181, 148, 86, 0.18);
  background: #f8f1e3;
  color: var(--emerald);
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.calendar-weekdays {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 12px;
}

.calendar-day {
  min-height: 86px;
  border-radius: 18px;
  border: 1px solid rgba(181, 148, 86, 0.14);
  background: rgba(255,255,255,0.86);
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.calendar-day.empty {
  opacity: 0.28;
}

.calendar-day.has-lessons {
  background: linear-gradient(180deg, #f8f1e2, #f0e5cf);
  border-color: rgba(181, 148, 86, 0.32);
}

.calendar-day .date {
  font-weight: 700;
  color: var(--emerald-strong);
}

.lesson-count {
  font-size: 0.82rem;
  color: var(--muted);
}

.subscribe-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 18px;
  align-items: center;
}

.subscribe-form {
  display: grid;
  gap: 14px;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: 24px;
  padding: 28px;
  color: var(--sand);
  background: linear-gradient(180deg, rgba(19, 37, 26, 0.92), rgba(10, 18, 14, 0.96));
}

.about-grid h2,
.about-grid .section-kicker,
.about-grid strong {
  color: var(--white);
}

.principles-list {
  display: grid;
  gap: 14px;
}

.principles-list article {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 14px;
  align-items: start;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
}

.principles-list i {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(181, 148, 86, 0.14);
  color: var(--gold-soft);
}

.principles-list p,
.about-grid p {
  color: rgba(244, 236, 221, 0.74);
  line-height: 1.9;
}

.footer {
  padding: 24px 0 36px;
  color: rgba(244, 236, 221, 0.78);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 18px;
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links a {
  text-decoration: none;
  color: var(--gold-soft);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 60;
  padding: 14px 18px;
  border-radius: 999px;
  color: var(--white);
  box-shadow: 0 16px 32px rgba(0,0,0,0.24);
}

.toast-success { background: rgba(31, 90, 67, 0.96); }
.toast-error { background: rgba(156, 62, 48, 0.96); }
.toast-info { background: rgba(18, 60, 45, 0.96); }

/* Homepage polish */
.home-hero-shell {
  padding-top: 46px;
}

.home-hero-grid {
  align-items: stretch;
}

.home-side-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.upcoming-focus-shell {
  padding-top: 12px;
}

.upcoming-focus-card {
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(181,148,86,0.16), transparent 34%),
    linear-gradient(180deg, rgba(255,250,241,0.97), rgba(246,238,224,0.95));
}

.upcoming-focus-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.upcoming-focus-heading h1,
.green-heading {
  color: var(--emerald-strong) !important;
}

.filters-card {
  display: grid;
  grid-template-columns: minmax(260px, 1.35fr) repeat(3, minmax(160px, 0.7fr));
  gap: 14px;
  align-items: end;
  margin-bottom: 18px;
  background:
    linear-gradient(180deg, rgba(255,250,241,0.98), rgba(244,236,221,0.96));
}

.search-results-card {
  margin: 18px 0 24px;
}

.filter-summary {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(31,90,67,0.1);
  color: var(--emerald-strong);
  font-weight: 800;
  border: 1px solid rgba(31,90,67,0.12);
}

.filtered-lessons {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.filtered-lessons .filter-summary,
.filtered-lessons .no-lessons {
  grid-column: 1 / -1;
}

.lesson-card {
  position: relative;
  overflow: hidden;
}

.lesson-card::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 18px;
  bottom: 18px;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--gold), var(--emerald));
  opacity: 0.62;
}

.lesson-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.lesson-icon,
.live-badge,
.countdown-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
}

.lesson-icon {
  width: 36px;
  height: 36px;
  background: rgba(31,90,67,0.1);
  color: var(--emerald);
}

.live-badge {
  padding: 7px 10px;
  background: rgba(156,62,48,0.12);
  color: var(--danger);
  font-size: 0.78rem;
}

.women-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(111, 76, 175, 0.12);
  color: #6f4caf;
  font-size: 0.78rem;
  font-weight: 900;
}

.women-badge.small {
  font-size: 0.74rem;
  padding: 6px 9px;
}

.countdown-badge {
  padding: 7px 10px;
  background: rgba(181,148,86,0.14);
  color: #7a5d27;
  font-size: 0.78rem;
}

.lesson-card .actions .btn {
  padding: 11px 15px;
  font-size: 0.92rem;
}

.section-grid.three-up .content-card {
  background: rgba(255,250,241,0.96);
}

.subscribe-card.simple-card {
  background:
    radial-gradient(circle at 12% 0%, rgba(31,90,67,0.12), transparent 30%),
    linear-gradient(180deg, rgba(255,250,241,0.97), rgba(246,238,224,0.96));
}

.dual-callout {
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
}

.cta-panel {
  min-height: 100%;
}

.calendar-toolbar {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

.calendar-stage {
  display: grid;
  gap: 14px;
}

.calendar-details {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(181, 148, 86, 0.16);
}

.details-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--emerald-strong);
  font-weight: 700;
}

.details-list {
  display: grid;
  gap: 12px;
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.week-day-card {
  text-align: right;
  border: 1px solid rgba(181, 148, 86, 0.14);
  background: rgba(255,255,255,0.86);
  border-radius: 20px;
  padding: 14px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.week-day-card.has-lessons {
  background: linear-gradient(180deg, #f8f1e2, #f0e5cf);
  border-color: rgba(181, 148, 86, 0.32);
}

.day-title {
  font-weight: 800;
  color: var(--emerald-strong);
}

.day-date {
  color: var(--muted);
  font-size: 0.9rem;
}

.day-lessons {
  display: grid;
  gap: 8px;
}

.mini-lesson {
  display: block;
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,0.8);
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.7;
}

.mini-lesson.muted {
  color: var(--muted);
}

.request-manual-optional {
  margin-top: 18px;
}

.reveal-up {
  animation: revealUp 0.6s ease both;
}

.delay-2 { animation-delay: 0.08s; }
.delay-3 { animation-delay: 0.16s; }

@keyframes revealUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1080px) {
  .hero-grid,
  .subscribe-card,
  .about-grid,
  .section-grid.three-up {
    grid-template-columns: 1fr;
  }

  .hero-panel,
  .hero-copy,
  .request-card,
  .calendar-card,
  .subscribe-card,
  .about-grid {
    border-radius: 26px;
  }

  .filters-card,
  .filtered-lessons {
    grid-template-columns: 1fr;
  }

  .upcoming-focus-heading {
    flex-direction: column;
  }
}

@media (max-width: 780px) {
  .topbar-inner {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  .topbar-menu {
    align-self: flex-start;
    position: static;
  }

  .main-nav {
    right: 0;
    left: 0;
    width: auto;
    max-height: calc(100dvh - 110px);
    overflow: auto;
  }

  .hero-copy,
  .hero-panel,
  .request-card,
  .content-card,
  .calendar-card,
  .subscribe-card,
  .about-grid {
    padding: 20px;
  }

  .hero-metrics,
  .form-grid.two-col,
  .calendar-weekdays,
  .calendar-grid,
  .week-grid {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: auto;
  }

  .calendar-weekdays {
    display: none;
  }

  .calendar-day {
    min-height: 72px;
  }

  .footer-inner,
  .card-header {
    flex-direction: column;
    align-items: stretch;
  }

  .time {
    align-self: start;
  }

  .home-hero-shell {
    padding-top: 24px;
  }

  .brand-mark-icon {
    width: 44px;
    height: 44px;
  }

  .brand-mark small {
    display: none;
  }

  .btn {
    width: 100%;
  }
}

.details-actions {
    margin-top: 14px;
    display: flex;
    justify-content: flex-start;
}

.calendar-add-btn {
    gap: 8px;
}

/* Admin dashboard — same visual language as the public homepage */
.admin-page .admin-hero { padding-bottom: 10px; }
.admin-hero-grid { grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr); }
.admin-note-card .quote-text { font-size: 1.35rem; }
.admin-metrics { grid-template-columns: 1fr; }
.admin-metrics .metric-card {
  background: rgba(255,255,255,0.06);
  border-color: rgba(181,148,86,0.18);
  color: var(--sand);
}
.admin-metrics .metric-card strong { color: var(--gold-soft); }
.admin-metrics .metric-card span { color: rgba(244,236,221,0.74); }
.admin-card { padding: 24px; overflow: hidden; }
.admin-hidden-stat { display: none; }

.upload-area {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(0, 1.18fr);
  gap: 18px;
  align-items: start;
}

.drop-zone {
  min-height: 210px;
  display: grid;
  place-items: center;
  gap: 8px;
  text-align: center;
  padding: 24px;
  border: 1px dashed rgba(181,148,86,0.45);
  border-radius: 24px;
  background: linear-gradient(180deg,#fffaf1,#f3ead9);
  color: var(--muted);
}
.drop-zone i { font-size: 2.3rem; color: var(--gold); }
.drop-zone strong { display: block; color: var(--emerald-strong); font-size: 1.08rem; }
.drop-zone input { max-width: 100%; margin-top: 10px; }
.preview-container { display: grid; gap: 12px; }
.image-preview {
  padding: 16px;
  border-radius: 22px;
  background: #f6efe1;
  border: 1px solid rgba(181,148,86,0.16);
  color: var(--muted);
}
.image-preview img {
  width: 100%;
  max-height: 340px;
  object-fit: contain;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(181,148,86,0.12);
}

.table-container { width: 100%; overflow-x: auto; }
.lessons-table,
.users-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
  min-width: 760px;
}
.lessons-table th,
.users-table th {
  padding: 0 14px 8px;
  text-align: right;
  color: var(--emerald-strong);
  font-weight: 800;
  white-space: nowrap;
}
.lessons-table td,
.users-table td {
  padding: 14px;
  background: rgba(255,255,255,0.86);
  border-block: 1px solid rgba(181,148,86,0.13);
  color: var(--ink);
  vertical-align: top;
}
.lessons-table td:first-child,
.users-table td:first-child {
  border-inline-start: 1px solid rgba(181,148,86,0.13);
  border-radius: 18px 0 0 18px;
}
.lessons-table td:last-child,
.users-table td:last-child {
  border-inline-end: 1px solid rgba(181,148,86,0.13);
  border-radius: 0 18px 18px 0;
}
.lessons-table td small,
.users-table td small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: .82rem;
}
.lessons-table .btn,
.users-table .btn {
  padding: 9px 12px;
  font-size: .86rem;
  margin: 2px;
}
.status {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(181,148,86,0.14);
  color: #73552a;
  font-weight: 800;
  white-space: nowrap;
}
.status.active { background: rgba(31,90,67,0.12); color: var(--emerald); }
.status.inactive { background: rgba(156,62,48,0.12); color: var(--danger); }
.request-lesson-line {
  display: grid;
  gap: 4px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(181,148,86,0.12);
}
.request-lesson-line:last-child { border-bottom: 0; }
.request-lesson-line strong { color: var(--emerald-strong); }
.request-lesson-line span,
.muted-inline { color: var(--muted); line-height: 1.7; }
.request-image-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  color: var(--emerald);
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 1080px) {
  .admin-hero-grid,
  .upload-area { grid-template-columns: 1fr; }
}

@media (max-width: 780px) {
  .admin-card { padding: 16px; }
  .lessons-table,
  .users-table { min-width: 680px; }
}

.upcoming-focus-shell {
  padding-top: 26px;
  padding-bottom: 8px;
}

.upcoming-focus-card {
  padding: 28px;
}

.upcoming-focus-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.upcoming-focus-heading p {
  color: var(--muted);
  margin: 0;
  line-height: 1.9;
  max-width: 58ch;
}

.upcoming-focus-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .upcoming-focus-list {
    grid-template-columns: 1fr;
  }

  .upcoming-focus-heading {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Admin tabs + visitor/AI additions */
.admin-tabs-shell { position: sticky; top: 0; z-index: 30; padding: 14px 0; backdrop-filter: blur(18px); background: rgba(14, 40, 35, .78); border-bottom: 1px solid rgba(217, 180, 111, .22); }
.admin-tabs { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 2px; }
.admin-tab { white-space: nowrap; border: 1px solid rgba(217, 180, 111, .28); background: rgba(255,255,255,.06); color: #fff7e8; border-radius: 999px; padding: 10px 16px; font-family: inherit; cursor: pointer; transition: .2s ease; }
.admin-tab:hover, .admin-tab.active { background: linear-gradient(135deg, #d9b46f, #f3d68f); color: #17382f; box-shadow: 0 12px 30px rgba(0,0,0,.16); }
.admin-tab-panel[hidden] { display: none !important; }
.visitor-metrics { margin-bottom: 24px; }
.visitor-chart { display: flex; gap: 12px; align-items: end; min-height: 170px; padding: 18px; border-radius: 24px; background: rgba(12, 54, 45, .06); margin-bottom: 22px; overflow-x: auto; }
.visitor-bar { display: grid; justify-items: center; gap: 8px; min-width: 58px; color: var(--muted, #667); }
.visitor-bar strong { display: block; width: 28px; border-radius: 999px 999px 8px 8px; background: linear-gradient(180deg, #d9b46f, #1e6f5c); }
.visitor-bar em { font-style: normal; font-weight: 800; color: #1e3d35; }
.ai-result { direction: rtl; white-space: pre-wrap; background: #102f28; color: #fff7e8; padding: 16px; border-radius: 16px; overflow:auto; }

/* Lesson source image */
.lesson-thumb-btn { width: 100%; border: 0; cursor: zoom-in; display: grid; grid-template-columns: 92px 1fr; gap: 12px; align-items: center; text-align: right; padding: 10px; margin-bottom: 14px; border-radius: 20px; background: rgba(217,180,111,.12); color: #1c3a32; font-family: inherit; }
.lesson-thumb-btn img { width: 92px; height: 72px; object-fit: cover; border-radius: 16px; box-shadow: 0 8px 18px rgba(0,0,0,.16); }
.lesson-thumb-btn span { font-weight: 800; color: #8a6628; }
.lesson-image-modal { position: fixed; inset: 0; z-index: 2000; display: none; place-items: center; padding: 24px; }
.lesson-image-modal.is-open { display: grid; }
.lesson-image-modal-backdrop { position: absolute; inset: 0; background: rgba(4, 20, 17, .82); backdrop-filter: blur(10px); }
.lesson-image-modal-card { position: relative; max-width: min(92vw, 980px); max-height: 88vh; background: #fff8eb; padding: 16px; border-radius: 28px; box-shadow: 0 30px 80px rgba(0,0,0,.38); }
.lesson-image-modal-card img { display: block; max-width: 100%; max-height: 75vh; object-fit: contain; border-radius: 20px; }
.lesson-image-close { position: absolute; top: -18px; inset-inline-start: 18px; border: 0; border-radius: 999px; padding: 10px 16px; font-family: inherit; font-weight: 800; cursor: pointer; background: linear-gradient(135deg, #d9b46f, #f3d68f); color: #17382f; box-shadow: 0 10px 24px rgba(0,0,0,.22); }

@media (max-width: 680px) { .lesson-thumb-btn { grid-template-columns: 76px 1fr; } .lesson-thumb-btn img { width: 76px; height: 62px; } }

.hero-actions button.btn { font-family: inherit; cursor: pointer; }

/* Softer beige lesson cards per site palette */
.lesson-card {
  background: linear-gradient(180deg, #fff8eb 0%, #f4ead6 100%);
  border-color: rgba(181, 148, 86, 0.26);
  box-shadow: 0 14px 30px rgba(99, 73, 32, 0.10);
}
.lesson-card.featured,
.lesson-card.is-live {
  background: linear-gradient(180deg, #fff4dc 0%, #efe0c3 100%);
  border-color: rgba(181, 148, 86, 0.42);
}

/* Compact search + collapsible filters */
.search-toolbar {
  width: min(100%, 720px);
  margin: 0 auto 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 14px;
  background: linear-gradient(180deg, rgba(255,248,235,0.98), rgba(244,234,214,0.96));
}
.search-field-compact input { min-height: 46px; }
.filters-toggle {
  height: 46px;
  min-width: 116px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  cursor: pointer;
}
.filters-toggle.active {
  background: rgba(31, 90, 67, 0.10);
  border-color: rgba(31, 90, 67, 0.24);
}
.filters-panel[hidden] { display: none !important; }
.filters-panel {
  width: min(100%, 720px);
  margin: 0 auto 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 14px;
  animation: filtersIn .18s ease-out;
}
@keyframes filtersIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 680px) {
  .search-toolbar { grid-template-columns: 1fr; }
  .filters-toggle { width: 100%; }
  .filters-panel { grid-template-columns: 1fr; }
}

/* Public AI review/edit before submit */
.public-review-box { margin-top: 18px; display: grid; gap: 14px; }
.review-hint { color: var(--muted); margin: 0 0 8px; }
.editable-preview-lessons { display: grid; gap: 14px; }
.editable-preview-card { background: linear-gradient(180deg, #fff8eb, #f4ead6); }
.compact-feedback-header { margin-bottom: 10px; }
.btn-small { padding: 8px 12px; font-size: .86rem; }
.submitted-image-preview { margin: 14px 0; }
.submitted-image-preview a { display: inline-grid; grid-template-columns: 90px 1fr; gap: 12px; align-items: center; text-decoration: none; color: var(--emerald-strong); font-weight: 800; }
.submitted-image-preview img { width: 90px; height: 70px; border-radius: 16px; object-fit: cover; box-shadow: 0 8px 20px rgba(0,0,0,.14); }
.admin-thumb-link img, .request-thumb-link img { width: 68px; height: 52px; object-fit: cover; border-radius: 12px; box-shadow: 0 6px 14px rgba(0,0,0,.12); }
.request-thumb-link { display: inline-flex; gap: 8px; align-items: center; }
@media (max-width: 680px) { .submitted-image-preview a { grid-template-columns: 72px 1fr; } .submitted-image-preview img { width:72px;height:58px; } }

/* Beta badge + support block */
.beta-badge {
  display: inline-flex;
  vertical-align: middle;
  margin-inline-start: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(217, 180, 111, .18);
  border: 1px solid rgba(217, 180, 111, .35);
  color: #d9b46f;
  font-family: 'Tajawal', sans-serif;
  font-size: .68rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}
.brand-mark strong { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.support-section { padding-top: 0; }
.support-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: linear-gradient(180deg, #fff8eb, #f4ead6);
  border: 1px solid rgba(181, 148, 86, .22);
}
.support-actions { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 760px) {
  .support-card { display: grid; }
  .support-actions .btn { width: 100%; }
}

.khair-note {
  display: inline-flex;
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(31, 90, 67, .08);
  color: var(--emerald-strong);
  border: 1px solid rgba(31, 90, 67, .12);
  font-weight: 800;
}

/* Preview-only UX clarity additions for older/non-technical users. Main site.css is untouched. */
.clear-link {
  display: inline-grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(31,90,67,.08);
  border: 1px solid rgba(31,90,67,.16);
  color: var(--emerald-strong);
  text-decoration: none;
  line-height: 1.45;
}
.clear-link strong {
  font-family: 'Amiri', serif;
  font-size: 1.45rem;
  text-decoration: none;
}
.link-label,
.field-label,
.field-label-inline {
  color: #846126;
  font-family: 'Tajawal', sans-serif;
  font-weight: 900;
}
.link-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .86rem;
}
.link-action,
.inline-action-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  margin-top: 4px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff8eb;
  color: var(--emerald);
  border: 1px solid rgba(181,148,86,.28);
  font-family: 'Tajawal', sans-serif;
  font-size: .86rem;
  font-weight: 900;
  text-decoration: none;
}
.location-copy {
  display: grid;
  gap: 5px;
}
.location-name {
  color: var(--text);
  font-weight: 800;
  line-height: 1.8;
}
.lesson-card .actions .btn {
  font-size: 1rem;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
@media (max-width: 680px) {
  .clear-link { width: 100%; box-sizing: border-box; }
  .lesson-card .actions .btn { width: 100%; }
}

/* Preview-only wording/interaction polish from elder UX notes */
.action-with-helper {
  display: inline-grid;
  gap: 6px;
  align-items: center;
}
.action-with-helper small,
.field-help {
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.6;
  font-weight: 700;
}
.toolbar-help {
  align-self: center;
}
.lesson-card a,
.lesson-card button,
.support-actions a,
.hero-actions a,
.hero-actions button,
.filters-toggle {
  -webkit-tap-highlight-color: rgba(181,148,86,.28);
}
.lesson-card a:focus-visible,
.lesson-card button:focus-visible,
.support-actions a:focus-visible,
.hero-actions a:focus-visible,
.hero-actions button:focus-visible,
.filters-toggle:focus-visible,
.clear-link:focus-visible,
.inline-action-link:focus-visible {
  outline: 3px solid #d9b46f;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(217,180,111,.20);
}
.clear-link:hover,
.clear-link:focus-visible,
.inline-action-link:hover,
.inline-action-link:focus-visible {
  background: #fff2d8;
  border-color: rgba(181,148,86,.55);
  transform: translateY(-1px);
}
.clear-link:active,
.inline-action-link:active,
.lesson-card .actions .btn:active {
  transform: translateY(1px) scale(.99);
}
.clear-link-static {
  background: transparent;
  border-color: rgba(31,90,67,.08);
}
.subject {
  display: grid;
  gap: 5px;
}
.subject strong {
  font-size: 1.12rem;
  line-height: 1.9;
  color: var(--text);
}
.description {
  display: grid;
  gap: 5px;
}
.description span:last-child {
  line-height: 1.95;
}
.location {
  align-items: flex-start;
}
.lesson-card .actions {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(181,148,86,.26);
  background: rgba(255,255,255,.35);
  border-radius: 18px;
  padding-inline: 10px;
  padding-bottom: 10px;
}
.lesson-card .actions .btn:hover,
.hero-actions .btn:hover,
.support-actions .btn:hover,
.filters-toggle:hover {
  filter: brightness(1.03);
  box-shadow: 0 12px 26px rgba(22, 58, 49, .14);
}
@media (max-width: 680px) {
  .search-toolbar {
    grid-template-columns: 1fr;
  }
  .toolbar-help,
  .action-with-helper,
  .action-with-helper .btn,
  .hero-actions .btn,
  .support-actions .btn,
  .filters-toggle {
    width: 100%;
  }
  .lesson-card {
    padding: 18px 16px;
  }
  .subject strong {
    font-size: 1.08rem;
  }
  .meta-line,
  .location,
  .description {
    line-height: 1.95;
  }
}

/* V2 Experimental: shorter mobile-first social feed. Only pages with body.v2-preview use this. */
.v2-preview .section-grid.three-up {
  display: none;
}
.v2-preview .home-hero-shell {
  padding-bottom: 34px;
}
.v2-preview .hero-lead,
.v2-preview .section-heading p,
.v2-preview .field-help,
.v2-preview .lesson-card,
.v2-preview .no-lessons,
.v2-preview .filter-summary,
.v2-preview .feed-end-note {
  font-size: 1.02rem;
  color: #25362f;
}
.v2-preview .filter-summary,
.v2-preview .feed-end-note {
  grid-column: 1 / -1;
  padding: 12px 14px;
  border-radius: 16px;
  background: #fff8eb;
  border: 1px solid rgba(181,148,86,.25);
  font-weight: 900;
}
.v2-preview .load-more-wrap {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  padding: 8px 0 18px;
}
.v2-preview .load-more-lessons {
  min-width: min(100%, 320px);
  min-height: 52px;
  font-size: 1.03rem;
}
.v2-preview .lessons-showcase {
  padding-top: 32px;
}
.v2-preview .filtered-lessons {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 1360px;
  margin-inline: auto;
}
@media (min-width: 1520px) {
  .v2-preview .filtered-lessons {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.v2-preview .lesson-card {
  border-width: 1.5px;
}
.v2-preview .clear-link strong,
.v2-preview .subject strong {
  color: #153b31;
}
.v2-preview .meta-line,
.v2-preview .location,
.v2-preview .description {
  color: #364840;
  font-weight: 700;
}
.v2-preview .field-label,
.v2-preview .field-label-inline,
.v2-preview .link-label {
  color: #6e4d13;
}
.v2-preview .lesson-card .actions .btn {
  min-height: 50px;
  font-size: 1.01rem;
}
@media (max-width: 760px) {
  .v2-preview .topbar-inner,
  .v2-preview .hero-grid,
  .v2-preview .dual-callout {
    gap: 16px;
  }
  .v2-preview .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .v2-preview .hero-actions .btn,
  .v2-preview .action-with-helper,
  .v2-preview .action-with-helper .btn {
    width: 100%;
  }
  .v2-preview .card-header {
    display: grid;
  }
  .v2-preview .filtered-lessons {
    grid-template-columns: 1fr;
  }
  .v2-preview .lesson-card .actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .v2-preview .lesson-card .actions .btn {
    width: 100%;
    justify-content: center;
  }
  .v2-preview .hero-metrics {
    grid-template-columns: 1fr;
  }
  .v2-preview .section {
    padding-top: 36px;
    padding-bottom: 36px;
  }
}

/* Live V2 compact hero + resources */
.lesson-attachments {
  margin-top: 14px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(31, 90, 67, 0.07);
  border: 1px solid rgba(31, 90, 67, 0.12);
}
.lesson-attachments > strong {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--emerald-strong, #1f5a43);
  font-weight: 900;
  margin-bottom: 9px;
}
.lesson-attachments > div {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.attachment-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  border-radius: 999px;
  background: #fff8eb;
  color: var(--emerald-strong, #1f5a43);
  border: 1px solid rgba(181, 148, 86, .26);
  text-decoration: none;
  font-weight: 800;
}
.attachment-link small { color: #7a5d27; font-weight: 900; }
.attachment-link:hover,
.attachment-link:focus-visible {
  background: #fff2d8;
  border-color: rgba(181, 148, 86, .55);
  outline: none;
  box-shadow: 0 0 0 4px rgba(217, 180, 111, .18);
}

.direct-link-btn {
  border-color: rgba(31,90,67,.24);
  color: #1f5a43;
}

.footer-disclaimer {
  margin: 10px 0 0;
  color: rgba(255, 247, 232, 0.78);
  line-height: 1.9;
  font-size: .94rem;
}

/* Lesson gallery + list/map tabs */
.lesson-gallery-shell,
.lessons-view-switch,
.lesson-map-shell {
  width: min(100%, 1100px);
  margin-inline: auto;
}

.lesson-gallery-shell {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

.lesson-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}

.gallery-tile {
  border: 0;
  display: grid;
  gap: 10px;
  padding: 10px;
  text-align: right;
  cursor: pointer;
  border-radius: 22px;
  background: linear-gradient(180deg, #fff8eb, #f4ead6);
  box-shadow: 0 12px 26px rgba(99, 73, 32, 0.08);
}

.gallery-tile img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(181,148,86,.16);
}

.gallery-tile-copy {
  display: grid;
  gap: 4px;
}

.gallery-tile-copy strong {
  color: #17382f;
  line-height: 1.7;
}

.gallery-tile-copy span {
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.6;
}

.gallery-meta-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
}

.lessons-view-switch {
  display: inline-flex;
  gap: 10px;
  padding: 12px;
  margin: 0 auto 16px;
}

.lessons-view-tab {
  border: 1px solid rgba(181,148,86,.24);
  background: rgba(255,255,255,.8);
  color: #17382f;
  border-radius: 999px;
  padding: 12px 18px;
  font-family: inherit;
  font-weight: 900;
  cursor: pointer;
  transition: .2s ease;
}

.lessons-view-tab.active {
  background: linear-gradient(135deg, #1f5a43, #2b7b61);
  color: #fff8eb;
  border-color: rgba(31,90,67,.25);
  box-shadow: 0 12px 28px rgba(31,90,67,.22);
}

.lessons-view-panel[hidden] {
  display: none !important;
}

/* Larger lesson image on top-right without cropping */
.lesson-card-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.lesson-card-shell.no-image {
  grid-template-columns: minmax(0, 1fr);
}

.lesson-card-body {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.lesson-card.is-live {
  border-color: rgba(199, 41, 41, .44);
  box-shadow: 0 0 0 1px rgba(199, 41, 41, .18), 0 20px 36px rgba(199, 41, 41, .12);
}

.lesson-card.is-live::before {
  background: linear-gradient(180deg, #ff7a7a, #c62828);
  opacity: 1;
}

.lesson-card-media {
  align-self: start;
}

.lesson-card-cover {
  width: 100%;
  min-height: 220px;
  max-height: 320px;
  object-fit: contain;
  background: #fff;
  border-radius: 20px;
  border: 1px solid rgba(181,148,86,.16);
  box-shadow: 0 10px 24px rgba(0,0,0,.10);
}

.recorded-card .lesson-card-cover {
  object-fit: cover;
  min-height: 210px;
}

.lesson-thumb-btn {
  width: 100%;
  border: 0;
  cursor: zoom-in;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: start;
  text-align: right;
  padding: 12px;
  margin-bottom: 0;
  border-radius: 22px;
  background: rgba(217,180,111,.12);
  color: #1c3a32;
  font-family: inherit;
}

.lesson-thumb-btn img {
  width: 100%;
  height: 190px;
  object-fit: contain;
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(181,148,86,.14);
  box-shadow: 0 8px 18px rgba(0,0,0,.12);
}

.lesson-thumb-btn span {
  font-weight: 900;
  color: #8a6628;
  line-height: 1.6;
}

/* Jeddah map tab */
.lesson-map-shell {
  display: grid;
  gap: 16px;
}

.lesson-map-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.map-status-row {
  display: grid;
  gap: 10px;
}

.map-status {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(31,90,67,.08);
  color: #17382f;
  font-weight: 800;
  line-height: 1.8;
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  color: var(--muted);
  font-size: .92rem;
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
}

.legend-dot.teal { background: #50C8C6; }
.legend-dot.purple { background: #6019B4; }
.legend-dot.navy { background: #001834; }
.legend-dot.gold { background: #D9B46F; }
.legend-dot.default { background: linear-gradient(180deg, #50C8C6 0%, #6019B4 55%, #001834 100%); }
.legend-dot.secondary { background: #1f5a43; }

.lesson-map-canvas {
  width: 100%;
  height: 480px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(181,148,86,.2);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.24), 0 18px 34px rgba(10,20,15,.08);
}

.map-nearby-lessons {
  display: grid;
  gap: 14px;
}

.map-results-header {
  font-weight: 900;
  color: #17382f;
}

.map-lessons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.map-lesson-item {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 20px;
  background: linear-gradient(180deg, #fff8eb, #f4ead6);
  border: 1px solid rgba(181,148,86,.18);
}

.map-lesson-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.map-lesson-head strong {
  display: block;
  color: #17382f;
  margin-bottom: 4px;
}

.map-lesson-head span,
.map-lesson-meta,
.map-lesson-distance {
  color: var(--muted);
  line-height: 1.7;
}

.map-lesson-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.countdown-badge.strong {
  background: rgba(31,90,67,.12);
  color: #1f5a43;
}

.map-lesson-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.custom-lesson-marker {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: radial-gradient(circle at 35% 28%, rgba(255,255,255,.55), transparent 32%), var(--marker-color, #50C8C6);
  border: 2px solid rgba(255,255,255,.95);
  box-shadow: 0 10px 22px rgba(0,24,52,.22), 0 0 0 4px color-mix(in srgb, var(--marker-color, #50C8C6) 24%, transparent);
  font-size: .92rem;
}

.map-popup {
  direction: rtl;
  text-align: right;
  line-height: 1.7;
}

.lesson-map-tooltip {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.lesson-map-tooltip:before {
  display: none;
}

.lesson-map-tooltip .leaflet-tooltip-content {
  margin: 0;
}

.lesson-marker-tooltip {
  min-width: 140px;
  max-width: 190px;
  padding: 9px 11px;
  border-radius: 14px;
  background: rgba(255, 250, 241, .96);
  border: 1px solid rgba(181,148,86,.28);
  color: var(--emerald-strong);
  box-shadow: 0 12px 24px rgba(10,20,15,.12);
  text-align: right;
  line-height: 1.5;
}

.lesson-marker-tooltip strong,
.lesson-marker-tooltip span {
  display: block;
}

.lesson-marker-tooltip strong {
  font-size: .88rem;
  margin-bottom: 2px;
}

.lesson-marker-tooltip span {
  color: var(--muted);
  font-size: .76rem;
}

@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(217,48,37,.40); }
  70% { box-shadow: 0 0 0 12px rgba(217,48,37,0); }
  100% { box-shadow: 0 0 0 0 rgba(217,48,37,0); }
}

@media (max-width: 760px) {
  .v2-preview .home-hero-shell {
    min-height: 30svh;
    padding: 10px 0 8px;
  }
  .v2-preview .home-hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  .v2-preview .hero-copy h1 {
    font-size: clamp(1.38rem, 7vw, 1.85rem);
    line-height: 1.12;
    margin: 5px 0 6px;
  }
  .v2-preview .hero-copy .eyebrow {
    font-size: .74rem;
    padding: 5px 9px;
  }
  .v2-preview .hero-lead {
    font-size: .92rem;
    line-height: 1.45;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .v2-preview .hero-actions {
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    margin-top: 9px;
  }
  .v2-preview .hero-actions .btn,
  .v2-preview .action-with-helper .btn {
    min-height: 38px;
    padding: 7px 9px;
    font-size: .86rem;
    border-radius: 14px;
  }
  .v2-preview .hero-actions > a.btn-outline,
  .v2-preview .action-with-helper small,
  .v2-preview .hero-metrics,
  .v2-preview .home-side-panel .panel-stack {
    display: none;
  }
  .v2-preview .home-side-panel {
    padding: 8px;
    border-radius: 16px;
  }
  .v2-preview .home-side-panel .quote-card {
    padding: 8px 10px;
  }
  .v2-preview .home-side-panel .quote-text {
    font-size: .88rem;
    line-height: 1.45;
    margin: 0 0 3px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .v2-preview .home-side-panel .quote-source {
    font-size: .72rem;
  }
  .attachment-link {
    width: 100%;
    justify-content: center;
  }
  .map-lesson-actions .btn,
  .map-lesson-actions a {
    width: 100%;
  }
  .lesson-card-shell {
    grid-template-columns: 1fr;
  }
  .lesson-card-cover,
  .recorded-card .lesson-card-cover {
    min-height: 180px;
    max-height: 260px;
  }
  .lesson-thumb-btn {
    text-align: center;
  }
  .lesson-thumb-btn img {
    height: auto;
    aspect-ratio: 4 / 3;
  }
  .lesson-map-heading,
  .map-lesson-head,
  .map-status-row {
    display: grid;
  }
  .lesson-map-canvas {
    height: 380px;
  }
}


.droos-preview-banner {
  position: sticky;
  top: 0;
  z-index: 9999;
  background: linear-gradient(90deg, #6019B4, #50C8C6);
  color: #fff;
  text-align: center;
  font-family: Cairo, Tajawal, Arial, sans-serif;
  font-weight: 800;
  padding: 10px 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

/* User-requested preview fixes: pause alert, brand map colors, denser mobile lesson cards */
.site-pause-alert {
  width: min(100% - 24px, 1120px);
  margin: 14px auto 0;
  position: relative;
  z-index: 12;
}
.site-pause-alert .pause-alert-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(0,24,52,.96), rgba(96,25,180,.90) 55%, rgba(80,200,198,.88));
  color: #fff;
  box-shadow: 0 18px 36px rgba(0,24,52,.20);
  border: 1px solid rgba(255,255,255,.18);
}
.pause-alert-icon {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.14);
  color: #D9B46F;
  font-size: 1.25rem;
}
.pause-alert-copy { display: grid; gap: 3px; line-height: 1.65; }
.pause-alert-copy strong { font-size: 1.02rem; font-weight: 900; }
.pause-alert-copy span { font-weight: 800; }
.pause-alert-copy small { color: rgba(255,255,255,.82); font-weight: 700; }

@media (max-width: 760px) {
  .site-pause-alert { width: calc(100% - 18px); margin-top: 9px; }
  .site-pause-alert .pause-alert-inner { padding: 10px 12px; border-radius: 18px; gap: 9px; }
  .pause-alert-icon { width: 34px; height: 34px; border-radius: 13px; font-size: 1rem; }
  .pause-alert-copy { line-height: 1.45; }
  .pause-alert-copy strong { font-size: .9rem; }
  .pause-alert-copy span { font-size: .82rem; }
  .pause-alert-copy small { display: none; }

  .v2-preview .filtered-lessons,
  .v2-preview .upcoming-focus-list,
  .v2-preview #today-lessons,
  .v2-preview #upcoming-lessons,
  .v2-preview #ongoing-lessons {
    gap: 8px;
  }
  .v2-preview .lesson-card {
    min-height: 0;
    max-height: calc((100svh - 34px) / 3);
    padding: 9px 10px;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 18px rgba(99, 73, 32, .08);
  }
  .v2-preview .lesson-card-shell,
  .v2-preview .lesson-card-body {
    gap: 5px;
  }
  .v2-preview .lesson-card-media,
  .v2-preview .lesson-attachments,
  .v2-preview .description,
  .v2-preview .link-action,
  .v2-preview .field-label,
  .v2-preview .field-label-inline,
  .v2-preview .lesson-card .calendar-btn,
  .v2-preview .lesson-card .whatsapp-share {
    display: none !important;
  }
  .v2-preview .lesson-badges { gap: 4px; }
  .v2-preview .lesson-icon,
  .v2-preview .countdown-badge,
  .v2-preview .live-badge,
  .v2-preview .women-badge {
    transform: scale(.86);
    transform-origin: right center;
    font-size: .72rem;
    padding: 3px 7px;
  }
  .v2-preview .clear-link,
  .v2-preview .clear-link-static {
    padding: 0;
    min-height: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  .v2-preview .clear-link strong,
  .v2-preview .subject strong,
  .v2-preview .location-name {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .v2-preview .clear-link strong {
    -webkit-line-clamp: 1;
    font-size: .86rem;
  }
  .v2-preview .subject {
    line-height: 1.32;
  }
  .v2-preview .subject strong {
    -webkit-line-clamp: 2;
    font-size: .98rem;
    line-height: 1.35;
  }
  .v2-preview .meta-line,
  .v2-preview .location {
    font-size: .76rem;
    line-height: 1.35;
    gap: 5px;
    font-weight: 750;
  }
  .v2-preview .location-name {
    -webkit-line-clamp: 1;
  }
  .v2-preview .inline-action-link { display: none; }
  .v2-preview .lesson-card .actions {
    margin-top: 4px;
    padding-top: 5px;
    gap: 5px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .v2-preview .lesson-card .actions .btn {
    min-height: 30px;
    padding: 5px 7px;
    border-radius: 11px;
    font-size: .72rem;
    line-height: 1.2;
  }
  .v2-preview .lesson-card .actions .btn i { font-size: .75rem; }
  .v2-preview .lesson-map-canvas { height: 330px; }
}

/* Preview UI correction 2026-05-23: site identity only, hide map, no clipped lesson info */
body.v2-preview {
  overflow-x: hidden;
}

.droos-preview-banner {
  background: linear-gradient(90deg, #123c2d, #1f5a43 58%, #b59456);
  color: #fffaf1;
  text-shadow: 0 1px 1px rgba(0,0,0,.24);
}

#today-map-section,
.lesson-map-shell {
  display: none !important;
}

.site-pause-alert .pause-alert-inner {
  background: linear-gradient(180deg, #fffaf1 0%, #f4ecdd 100%);
  color: var(--ink);
  border: 1px solid rgba(181,148,86,.45);
  box-shadow: 0 14px 28px rgba(6,15,11,.14);
}
.pause-alert-icon {
  background: rgba(181,148,86,.18);
  color: var(--emerald-strong);
}
.pause-alert-copy strong {
  color: var(--emerald-strong);
}
.pause-alert-copy span,
.pause-alert-copy small {
  color: #2f2a20;
}

.section-heading.centered p,
.section-heading p,
.hero-lead,
.muted-inline {
  color: #4f493f;
}
body.v2-preview .section-heading.centered p,
body.v2-preview .lessons-showcase .section-heading p {
  color: rgba(255,250,241,.84);
}

.v2-preview .recorded-page-group {
  margin-bottom: 20px;
}
.v2-preview .recorded-page-group .section-heading.compact {
  margin-bottom: 10px;
}
.v2-preview .recorded-page-group .section-kicker {
  color: var(--emerald-strong);
  background: rgba(181,148,86,.14);
  border-color: rgba(181,148,86,.28);
}
.v2-preview .recorded-list-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
}
.v2-preview .recorded-card {
  border-color: rgba(181,148,86,.30);
}
.v2-preview .recorded-summary,
.v2-preview .recorded-card .meta-line,
.v2-preview .recorded-card .location {
  color: #433d34;
}

@media (max-width: 760px) {
  .container {
    width: min(100% - 18px, var(--container));
  }
  .topbar-inner {
    padding-inline: 0;
  }
  .v2-preview .home-hero-shell,
  .v2-preview .section,
  .v2-preview .lessons-entry,
  .v2-preview .recorded-page-shell,
  .v2-preview .recorded-detail-shell {
    padding-left: 0;
    padding-right: 0;
  }
  .site-pause-alert {
    width: calc(100% - 18px);
    margin: 10px auto 0;
  }
  .site-pause-alert .pause-alert-inner {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 12px 14px;
  }
  .pause-alert-icon {
    display: none;
  }
  .pause-alert-copy strong {
    font-size: .92rem;
  }
  .pause-alert-copy span {
    font-size: .84rem;
    line-height: 1.7;
  }

  .v2-preview .lesson-card {
    max-height: none !important;
    padding: 10px 11px;
    overflow: visible;
  }
  .v2-preview .lesson-card-shell,
  .v2-preview .lesson-card-body {
    gap: 7px;
  }
  .v2-preview .lesson-card-media {
    display: none !important;
  }
  .v2-preview .field-label,
  .v2-preview .field-label-inline {
    display: inline !important;
    font-size: .66rem;
    color: #6f6657;
    font-weight: 800;
  }
  .v2-preview .clear-link strong,
  .v2-preview .subject strong,
  .v2-preview .location-name {
    display: inline !important;
    -webkit-line-clamp: unset !important;
    overflow: visible !important;
  }
  .v2-preview .clear-link strong {
    font-size: .84rem;
    line-height: 1.55;
  }
  .v2-preview .subject strong {
    font-size: .96rem;
    line-height: 1.5;
  }
  .v2-preview .meta-line,
  .v2-preview .location {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    font-size: .70rem;
    line-height: 1.55;
    gap: 4px 6px;
    white-space: normal;
    overflow: visible;
    color: #433d34;
  }
  .v2-preview .location-copy {
    min-width: 0;
    flex: 1 1 0;
  }
  .v2-preview .location-name {
    font-size: .70rem;
    line-height: 1.55;
  }
  .v2-preview .lesson-badges {
    gap: 4px;
  }
  .v2-preview .lesson-icon,
  .v2-preview .countdown-badge,
  .v2-preview .live-badge,
  .v2-preview .women-badge {
    transform: none;
    font-size: .68rem;
    padding: 3px 7px;
  }
  .v2-preview .lesson-card .actions {
    grid-template-columns: 1fr 1fr;
  }

  .v2-preview .recorded-page-shell .section-heading.centered h2,
  .v2-preview .recorded-detail-shell .section-heading h2,
  .v2-preview .recorded-detail-hero-grid h1,
  .v2-preview .recorded-page-shell h1 {
    font-size: clamp(1.45rem, 7vw, 2rem);
    line-height: 1.45;
  }
  .v2-preview .recorded-filters-card,
  .v2-preview .recorded-detail-section,
  .v2-preview .recorded-card {
    border-radius: 22px;
    padding: 14px;
  }
  .v2-preview .recorded-filters-grid {
    gap: 10px;
  }
  .v2-preview .recorded-card-head,
  .v2-preview .recorded-meta-lines,
  .v2-preview .recorded-tags,
  .v2-preview .recorded-count-pills {
    display: flex;
    flex-wrap: wrap;
  }
  .v2-preview .recorded-card .subject strong {
    color: var(--emerald-strong);
  }
  .v2-preview .recorded-summary {
    font-size: .82rem;
    line-height: 1.75;
  }
  .v2-preview .recorded-card-actions .btn {
    width: 100%;
  }
  .v2-preview #recorded-page-categories .no-lessons {
    display: none;
  }
}

/* Detail page mobile overflow fix 2026-05-23 */
.v2-preview .recorded-detail-hero-grid,
.v2-preview .recorded-linked-lesson-card,
.v2-preview .detail-overview-card,
.v2-preview .related-recorded-grid,
.v2-preview .recorded-media-stack,
.v2-preview .recorded-media-block,
.v2-preview .recorded-linked-copy,
.v2-preview .detail-copy-grid {
  min-width: 0;
}

.v2-preview .recorded-linked-image,
.v2-preview .recorded-detail-image,
.v2-preview .detail-cover-image,
.v2-preview .recorded-media-block img,
.v2-preview .recorded-cover {
  max-width: 100%;
  height: auto;
}

@media (max-width: 1080px) {
  .v2-preview .recorded-detail-hero-grid,
  .v2-preview .detail-overview-card,
  .v2-preview .recorded-linked-lesson-card {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .v2-preview .recorded-detail-hero-grid > *,
  .v2-preview .recorded-detail-section,
  .v2-preview .recorded-linked-lesson-card > *,
  .v2-preview .detail-overview-card > *,
  .v2-preview .recorded-media-block,
  .v2-preview .recorded-card,
  .v2-preview .lesson-card {
    max-width: 100%;
    min-width: 0;
  }

  .v2-preview .recorded-detail-section {
    overflow: hidden;
  }

  .v2-preview .detail-cover-image,
  .v2-preview .recorded-linked-image {
    width: 100%;
    max-height: 68vh;
    object-fit: contain;
    background: #fffaf1;
  }

  .v2-preview .recorded-media-block img.recorded-detail-image,
  .v2-preview .recorded-detail-image {
    width: 100%;
    max-height: 72vh;
    object-fit: contain;
    background: #fffaf1;
  }

  .v2-preview .recorded-meta-lines,
  .v2-preview .recorded-count-pills,
  .v2-preview .lesson-badges,
  .v2-preview .detail-actions-row,
  .v2-preview .recorded-card-actions {
    display: flex;
    flex-wrap: wrap;
    min-width: 0;
  }

  .v2-preview .recorded-meta-lines span,
  .v2-preview .recorded-count-pills span,
  .v2-preview .lesson-badges span {
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .v2-preview .recorded-detail-hero-grid h1,
  .v2-preview .detail-copy-grid strong,
  .v2-preview .recorded-summary,
  .v2-preview .quote-source,
  .v2-preview .quote-text {
    overflow-wrap: anywhere;
    word-break: normal;
  }
}

@media (max-width: 760px) {
  .v2-preview .recorded-detail-hero-grid {
    gap: 10px;
  }

  .v2-preview .recorded-detail-hero-grid .hero-copy,
  .v2-preview .recorded-detail-hero-grid .hero-panel,
  .v2-preview .recorded-detail-section,
  .v2-preview .recorded-media-block {
    padding: 14px;
    border-radius: 22px;
  }

  .v2-preview .recorded-detail-hero-grid h1 {
    font-size: clamp(1.45rem, 8vw, 2rem);
    line-height: 1.45;
  }

  .v2-preview .recorded-detail-hero-grid .hero-lead,
  .v2-preview .recorded-summary,
  .v2-preview .quote-text,
  .v2-preview .quote-source {
    font-size: .84rem;
    line-height: 1.85;
  }

  .v2-preview .detail-copy-grid strong {
    font-size: 1.05rem;
    line-height: 1.75;
  }

  .v2-preview .recorded-meta-lines span,
  .v2-preview .recorded-count-pills span {
    font-size: .72rem;
    line-height: 1.5;
    padding: 5px 8px;
  }

  .v2-preview .detail-actions-row .btn,
  .v2-preview .recorded-media-block .btn {
    width: 100%;
  }
}

/* ===== FIX: Recorded cards readable on dark background (2026-05-28) =====
   The recorded cards sit on the dark page background (#0a1812). Their dark
   text colors (--emerald-strong #123c2d, --ink #1c1a15, --muted #6f6657)
   need a light card panel behind them to be readable.
   These rules only affect the v2-preview mode. */
.v2-preview .recorded-card {
  background: linear-gradient(180deg, rgba(255,250,241,.96), rgba(244,236,221,.94));
  border-color: rgba(181,148,86,.30);
  box-shadow: 0 14px 30px rgba(99,73,32,.08);
}
.v2-preview .recorded-card-body {
  background: rgba(255,250,241,.82);
  border-radius: 18px;
  padding: 16px;
  border: 1px solid rgba(181,148,86,.12);
}
.v2-preview .recorded-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.v2-preview .recorded-card-head .card-header,
.v2-preview .recorded-card-head h3 {
  color: var(--emerald-strong, #123c2d);
}
.v2-preview .recorded-card .sheikh .clear-link strong,
.v2-preview .recorded-card .sheikh strong,
.v2-preview .recorded-card-head strong {
  color: var(--emerald-strong, #123c2d);
}
.v2-preview .recorded-card .subject strong,
.v2-preview .recorded-card .field-label,
.v2-preview .recorded-card .field-label-inline {
  color: var(--ink, #1c1a15);
}
.v2-preview .recorded-card .meta-line,
.v2-preview .recorded-card .location {
  color: #433d34;
}
.v2-preview .recorded-card .location-name {
  color: var(--ink, #1c1a15);
  font-weight: 800;
}
.v2-preview .recorded-card .summary,
.v2-preview .recorded-card .recorded-summary {
  color: #433d34;
  line-height: 1.9;
}
.v2-preview .recorded-card .recorded-count-pills span {
  background: rgba(181,148,86,.14);
  color: var(--emerald-strong, #123c2d);
}
.v2-preview .recorded-card .recorded-tags span {
  background: rgba(31,90,67,.10);
  color: var(--emerald, #1f5a43);
}

/* Recorded card compact/dense state */
.v2-preview .recorded-card.compact {
  padding: 12px;
}
.v2-preview .recorded-card.compact .recorded-card-body {
  padding: 12px;
}

/* Override any inherited dark panel backgrounds that may seep through */
.v2-preview .recorded-card .card-overlay-link {
  border-radius: inherit;
}
/* Ensure cover image still looks clean */
.v2-preview .recorded-cover {
  border-radius: 18px;
  border: 1px solid rgba(217,180,111,.18);
}

/* Detail page: recorded detail sections also need readable panels */
.v2-preview .recorded-detail-section {
  background: rgba(255,250,241,.94);
  border-radius: 22px;
  padding: 20px;
  border: 1px solid rgba(181,148,86,.16);
}
.v2-preview .detail-copy-grid strong {
  color: var(--emerald-strong, #123c2d);
}

/* Linked lesson card in recorded detail */
.v2-preview .recorded-linked-copy {
  background: rgba(255,250,241,.88);
  border-radius: 18px;
  padding: 16px;
  border: 1px solid rgba(181,148,86,.12);
}
