@import url("https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800;900&family=Noto+Kufi+Arabic:wght@500;700;800&display=swap");

:root {
  --paper: #f7f4ef;
  --paper-light: #fffdf8;
  --paper-dark: #e7f2f1;
  --brown: #8a5624;
  --brown-dark: #153445;
  --green: #2f7f78;
  --green-dark: #174d4c;
  --accent: #c8944d;
  --accent-soft: #f6ead9;
  --aqua-soft: #dcefed;
  --peach-soft: #f4e4dc;
  --text: #173444;
  --muted: #6f7b80;
  --border: rgba(21, 52, 69, 0.16);
  --shadow: 0 16px 34px rgba(21, 52, 69, 0.11);
  --body: "Cairo", "Segoe UI", Tahoma, Arial, sans-serif;
  --heading: "Noto Kufi Arabic", "Cairo", "Segoe UI", Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  direction: rtl;
  text-align: right;
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.9;
  background:
    radial-gradient(circle at 16% 8%, rgba(47,127,120,.14), transparent 30%),
    radial-gradient(circle at 84% 5%, rgba(200,148,77,.13), transparent 28%),
    linear-gradient(180deg, #fbfaf6 0%, #edf6f4 50%, #fff8f2 100%);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

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

.top-header {
  position: relative;
  overflow: hidden;
  padding: 56px 0 48px;
  text-align: center;
  background:
    radial-gradient(circle at 98% 72%, rgba(21,52,69,.08), transparent 22%),
    radial-gradient(circle at 12% 12%, rgba(23,77,76,.18), transparent 24%),
    radial-gradient(circle at 72% 42%, rgba(200,148,77,.14), transparent 28%),
    linear-gradient(90deg, #f7efe4 0%, #fffdf8 48%, #eef6f4 100%);
  border-bottom: 1px solid rgba(21,52,69,.12);
}

.top-header::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 260px;
  height: 260px;
  border-radius: 0 0 120px 0;
  background:
    linear-gradient(135deg, rgba(16,45,63,.96), rgba(23,77,76,.92));
  box-shadow: 16px 16px 0 rgba(200,148,77,.18);
  opacity: .92;
  pointer-events: none;
}

.top-header::after {
  content: "";
  position: absolute;
  inset: auto 0 -70px auto;
  width: 360px;
  height: 220px;
  border-radius: 55% 0 0 0;
  background: rgba(200,148,77,.08);
  pointer-events: none;
}

.top-header .container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(420px, 720px) minmax(360px, 540px);
  grid-template-areas:
    "logo quote"
    "date search";
  align-items: center;
  gap: 24px 56px;
  justify-items: center;
  justify-content: center;
}

.site-logo > a,
.site-title-fallback {
  grid-area: logo;
}

.header-quote {
  grid-area: quote;
  width: 100%;
  max-width: 520px;
  position: relative;
  border: 1px solid rgba(200,148,77,.42);
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(255,255,255,.8), rgba(255,253,248,.94)),
    linear-gradient(135deg, rgba(200,148,77,.07), transparent);
  color: var(--brown-dark);
  padding: 22px 30px;
  box-shadow: 0 22px 40px rgba(21,52,69,.1), inset 0 1px 0 rgba(255,255,255,.8);
  text-align: center;
  line-height: 1.75;
}

.header-quote::before {
  content: "”";
  position: absolute;
  top: -23px;
  left: 50%;
  transform: translateX(-50%);
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: linear-gradient(135deg, #d7b06f, #c8944d);
  color: #fff;
  font-family: Georgia, serif;
  font-size: 2.1rem;
  line-height: 46px;
  box-shadow: 0 10px 18px rgba(138,86,36,.18);
}

.header-quote span {
  display: block;
  color: var(--green-dark);
  font-size: 1rem;
  font-weight: 800;
}

.header-quote strong {
  display: block;
  margin-top: 8px;
  color: #102d3f;
  font-size: clamp(1rem, 1.25vw, 1.28rem);
  font-weight: 900;
}

.header-search {
  grid-area: search;
  width: min(100%, 520px);
  margin-top: 0;
}

.site-logo img {
  display: block;
  width: min(100%, 700px);
  max-height: 220px;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(21,52,69,.12));
}

.header-date {
  grid-area: date;
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: -18px;
  color: var(--brown-dark);
  font-weight: 800;
}

.header-date span,
.header-date time {
  border: 1px solid rgba(21,52,69,.08);
  border-radius: 999px;
  background: rgba(255,255,255,.9);
  padding: 9px 24px;
  box-shadow: 0 12px 26px rgba(21,52,69,.1);
  line-height: 1.45;
}

.site-title-fallback {
  font-family: var(--heading);
  font-size: clamp(2rem, 6vw, 4.5rem);
  color: var(--brown-dark);
  margin: 0;
}

.nav-strip {
  border: 0;
  background: transparent;
  box-shadow: none;
  transform: translateY(-36px);
  margin-bottom: -36px;
}

.nav-inner {
  display: grid;
  grid-template-columns: 1fr;
  direction: ltr;
  gap: 12px;
  align-items: center;
  padding: 12px 18px;
  border-radius: 16px;
  background:
    linear-gradient(135deg, #102d3f 0%, #173444 48%, #174d4c 100%);
  border: 1px solid rgba(200,148,77,.75);
  box-shadow: 0 18px 38px rgba(21,52,69,.2), inset 0 1px 0 rgba(255,255,255,.16);
  min-width: 0;
  max-width: 1120px;
  margin-inline: auto;
}

.nav-inner > * {
  direction: rtl;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  min-width: 0;
}

.nav-list a {
  display: block;
  color: rgba(255,255,255,.88);
  font-weight: 800;
  font-size: 1rem;
  border-radius: 10px;
  padding: 10px 16px;
  white-space: nowrap;
  line-height: 1.35;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.nav-list a::after { content: none; }

.nav-list a:hover,
.nav-list a.active {
  color: #f8d99b;
  background: rgba(200,148,77,.14);
  transform: translateY(-1px);
}

.nav-list a.active {
  color: #f8d99b;
  background: rgba(47,127,120,.28);
  box-shadow: inset 0 0 0 1px rgba(200,148,77,.35);
}

.search-form {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  background: rgba(255,255,255,.98);
  border: 1px solid rgba(200,148,77,.5);
  border-radius: 18px;
  padding: 0;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 14px 28px rgba(21,52,69,.12);
}

.search-form input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: .9rem;
  padding: .9rem 1.2rem;
  direction: rtl;
  text-align: right;
}

.search-form input:focus { outline: none; }
.search-form button {
  flex: 0 0 auto;
  border: 0;
  background: linear-gradient(135deg, #102d3f, #173444);
  color: #fff;
  font: inherit;
  font-size: 1rem;
  font-weight: 800;
  align-self: stretch;
  padding: .7rem 1.7rem;
  cursor: pointer;
  border-radius: 0;
}

.search-form button:hover {
  background: linear-gradient(135deg, #174d4c, #102d3f);
}

.main { padding: 26px 0 54px; }

.news-ticker {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  background:
    linear-gradient(135deg, #102d3f 0%, #173444 58%, #174d4c 100%),
    repeating-linear-gradient(135deg, rgba(255,255,255,.055) 0 8px, transparent 8px 18px);
  border: 1px solid rgba(200,148,77,.58);
  border-radius: 12px;
  box-shadow: 0 14px 32px rgba(21,52,69,.16);
  padding: 10px 12px;
  margin-bottom: 26px;
  overflow: hidden;
}

.news-ticker::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(255,255,255,.12), transparent 24%, transparent 76%, rgba(255,255,255,.08));
}

.ticker-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, #fffdf8, #f6ead9);
  color: var(--brown-dark);
  border: 1px solid rgba(200,148,77,.35);
  border-radius: 10px;
  padding: 8px 13px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(0,0,0,.12);
  white-space: nowrap;
}

.ticker-badge-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(200,148,77,.18);
}

.ticker-marquee {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.ticker-track {
  display: flex;
  width: max-content;
  gap: 12px;
  min-width: 0;
  white-space: nowrap;
  color: #ffffff;
  animation: newsTickerScroll 42s linear infinite;
  direction: rtl;
}

.news-ticker:hover .ticker-track {
  animation-play-state: paused;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  width: min(520px, 62vw);
  min-width: 260px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 10px;
  background: rgba(255,255,255,.12);
  padding: 8px 12px;
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
  overflow: hidden;
}

.ticker-item:hover {
  background: rgba(255,255,255,.16);
}

.ticker-item-title {
  font-weight: 800;
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticker-item-summary {
  flex: 0 1 210px;
  min-width: 0;
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255,255,255,.78);
}

.ticker-item-date {
  color: #dcefed;
  font-size: .88rem;
  direction: ltr;
}

@keyframes newsTickerScroll {
  from { transform: translateX(0); }
  to { transform: translateX(50%); }
}

.cards-strip {
  display: grid;
  gap: 10px;
  margin: 0 auto 18px;
  padding: 18px;
  max-width: 900px;
  border: 1px solid rgba(0,109,119,.16);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(246,251,252,.9));
  box-shadow: 0 14px 30px rgba(24,42,58,.07);
}

.cards-strip-slider {
  position: relative;
  padding: 0 48px;
}

.cards-strip-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 0;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.cards-strip-track::-webkit-scrollbar {
  display: none;
}

.cards-strip-item {
  display: grid;
  gap: 10px;
  scroll-snap-align: start;
  min-width: 0;
  color: var(--ink);
}

.cards-strip-item img {
  width: 100%;
  max-height: min(430px, 54vh);
  object-fit: contain;
  border-radius: 14px;
  border: 1px solid rgba(53,82,103,.12);
  background: #fff;
  padding: 8px;
}

.cards-strip-item span {
  display: none;
  text-align: center;
  font-weight: 800;
  font-size: 1rem;
}

.cards-strip .slider-arrow {
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 46px;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
}

.cards-strip .slider-dots {
  margin-top: 0;
}

.hero,
.section-shell,
.single-shell {
  border: 1px solid var(--border);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(245,249,252,.96)),
    radial-gradient(circle at top, rgba(0,140,137,.07), transparent 58%);
  box-shadow: var(--shadow);
  padding: clamp(18px, 3vw, 30px);
  margin-bottom: 32px;
}

.section-title {
  margin: 0;
  text-align: center;
  color: var(--brown-dark);
  font-family: var(--heading);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.35;
}

.latest-console {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(244,250,250,.95)),
    radial-gradient(circle at 18% 12%, rgba(47,127,120,.14), transparent 30%),
    radial-gradient(circle at 82% 18%, rgba(200,148,77,.16), transparent 34%);
}

.latest-console::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255,255,255,.92), transparent 12%, transparent 88%, rgba(255,255,255,.92));
  z-index: 1;
}

.latest-console > * {
  position: relative;
  z-index: 2;
}

.latest-console .section-title {
  display: grid;
  place-items: center;
  grid-template-columns: auto auto auto;
  justify-content: center;
  column-gap: 14px;
  width: fit-content;
  min-width: min(320px, 100%);
  margin: 0 auto;
  padding: 6px 24px 8px;
  border: 1px solid rgba(200,148,77,.35);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255,253,248,.98), rgba(246,234,217,.74));
  color: #102d3f;
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  box-shadow: 0 14px 28px rgba(21,52,69,.1);
  direction: rtl;
  text-align: center;
}

.latest-console .section-title::before,
.latest-console .section-title::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(200,148,77,.14);
}

.latest-console .section-title::before,
.latest-console .section-title::after {
  margin: 0;
}

.divider {
  width: min(260px, 70%);
  height: 12px;
  margin: 10px auto 24px;
  position: relative;
}

.divider::before,
.divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 42%;
  height: 1px;
  background: rgba(54,82,103,.22);
}

.divider::before { right: 0; }
.divider::after { left: 0; }
.divider span {
  display: block;
  width: 36px;
  height: 8px;
  margin: 2px auto 0;
  border-radius: 999px;
  background: var(--green);
}

.latest-grid,
.cards-grid,
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

.fresh-columns {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 34px;
  margin: 0 auto;
  max-width: 1080px;
  padding: 8px 0;
}

.fresh-frame {
  margin-top: 30px;
}

.fresh-columns::before {
  content: "";
  position: absolute;
  inset-block: 10px;
  left: 50%;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, transparent, rgba(200,148,77,.85), rgba(47,127,120,.7), transparent);
  transform: translateX(-50%);
}

.fresh-column {
  min-width: 0;
  border: 1px solid rgba(200,148,77,.34);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255,255,255,.9), rgba(246,234,217,.42));
  box-shadow: 0 14px 30px rgba(21,52,69,.08);
  padding: 16px;
}

.fresh-column h2 {
  margin: 0 0 12px;
  color: var(--brown-dark);
  font-family: var(--heading);
  font-size: 1.08rem;
  font-weight: 900;
}

.fresh-list {
  display: grid;
  gap: 9px;
}

.fresh-item {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,.74);
  border: 1px solid rgba(21,52,69,.08);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.fresh-item:hover {
  transform: translateY(-2px);
  border-color: rgba(200,148,77,.42);
  box-shadow: 0 10px 18px rgba(21,52,69,.08);
}

.fresh-item span {
  overflow: hidden;
  color: var(--text);
  font-weight: 850;
  line-height: 1.55;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fresh-item small {
  overflow: hidden;
  color: var(--muted);
  font-size: .82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-gateways {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
}

.library-gateway {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "head action"
    "links action";
  gap: 10px 16px;
  align-content: space-between;
  min-height: 0;
  padding: 16px 18px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(241,249,250,.96));
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 8px 18px rgba(24,42,58,.045);
}

.library-gateway::before {
  content: "";
  position: absolute;
  inset-block: 14px;
  right: 0;
  width: 4px;
  border-radius: 999px 0 0 999px;
  background: var(--green-dark);
}

.library-gateway-head {
  grid-area: head;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 12px;
}

.library-gateway-head h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--heading);
  font-size: 1.18rem;
  line-height: 1.4;
}

.library-gateway-head span {
  margin-top: 2px;
  color: var(--muted);
  font-size: .9rem;
  white-space: nowrap;
}

.library-gateway-links {
  grid-area: links;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.library-gateway-links a {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(0,140,137,.09);
  color: var(--green-dark);
  font-size: .84rem;
  font-weight: 800;
}

.library-gateway .btn {
  grid-area: action;
  align-self: center;
  justify-self: end;
  padding: 8px 13px;
  white-space: nowrap;
}

.popular-frame {
  border: 1px solid rgba(0,109,119,.16);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(237,248,248,.96)),
    radial-gradient(circle at top left, rgba(0,140,137,.11), transparent 42%);
  box-shadow: 0 12px 28px rgba(24,42,58,.065);
  padding: clamp(16px, 2.4vw, 24px);
  margin-bottom: 32px;
}

.popular-frame-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.popular-frame-head h2 {
  margin: 0;
  color: var(--brown-dark);
  font-family: var(--heading);
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
}

.popular-frame-head span {
  color: var(--muted);
  font-weight: 800;
  font-size: .92rem;
}

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

.popular-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 72px;
  border: 1px solid rgba(53,82,103,.12);
  border-radius: 16px;
  background: rgba(255,255,255,.82);
  padding: 10px 12px;
}

.popular-item:hover {
  border-color: rgba(0,140,137,.3);
  transform: translateY(-1px);
}

.popular-rank {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(0,140,137,.11);
  color: var(--green-dark);
  font-weight: 900;
}

.popular-body {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.popular-body strong {
  overflow: hidden;
  color: var(--ink);
  font-family: var(--heading);
  font-size: 1rem;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.popular-body small {
  overflow: hidden;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.latest-slider {
  position: relative;
  padding: 0 46px;
}

.latest-console .latest-slider {
  padding-inline: 36px;
}

.latest-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(190px, 230px);
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 4px 2px 16px;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}

.latest-track::-webkit-scrollbar {
  display: none;
}

.latest-slide {
  scroll-snap-align: start;
  min-width: 0;
}

.latest-slide .material-card {
  height: 100%;
  min-height: 0;
  border-radius: 16px;
  padding: 10px;
}

.latest-slide .material-thumb {
  border-radius: 12px;
  margin-bottom: 8px;
}

.latest-slide .meta-row {
  gap: 5px;
  margin-bottom: 6px;
  font-size: .82rem;
}

.latest-slide .pill,
.latest-slide .hijri-meta {
  padding: 4px 9px;
  font-size: .78rem;
}

.latest-slide .muted {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.45;
}

.latest-slide .card-title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 4.2em;
  margin-bottom: 8px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  font-size: 1.05rem;
  line-height: 1.4;
}

.latest-slide .excerpt {
  display: none;
}

.latest-slide .button-row {
  justify-content: center;
  gap: 6px;
  margin-top: 6px;
}

.latest-slide .icon-btn {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
}

.latest-slide .material-icon {
  width: 18px;
  height: 18px;
}

.slider-arrow {
  position: absolute;
  top: 42%;
  z-index: 2;
  width: 38px;
  height: 58px;
  border: 1px solid rgba(53,82,103,.18);
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, #e8f1f5);
  color: var(--brown-dark);
  box-shadow: 0 10px 22px rgba(24,42,58,.12);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.slider-arrow:hover {
  background: var(--green-dark);
  color: #fff8e8;
}

.slider-next { right: 0; }
.slider-prev { left: 0; }

.slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}

.slider-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(53,82,103,.24);
}

.slider-dots button.active {
  width: 26px;
  background: var(--green-dark);
}

.material-card,
.category-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 14px;
  box-shadow: 0 8px 18px rgba(24,42,58,.06);
}

.category-tree {
  display: grid;
  gap: 16px;
}

.category-tree-roots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 16px;
}

.category-tree-card {
  position: relative;
  min-width: 0;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 16px;
  box-shadow: 0 8px 18px rgba(24,42,58,.06);
}

.category-tree-card .card-title {
  margin-bottom: 6px;
}

.category-tree-card-head {
  display: grid;
  gap: 4px;
}

.category-tree-children {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding-right: 18px;
  border-right: 2px solid rgba(0,140,137,.16);
}

.category-tree-children .category-tree-card {
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(247,251,252,.98));
  box-shadow: none;
}

.category-tree-children .category-tree-card::before {
  content: "";
  position: absolute;
  top: 28px;
  right: -20px;
  width: 18px;
  height: 2px;
  background: rgba(0,140,137,.22);
}

.category-tree-children .category-tree-children {
  margin-top: 10px;
  padding-right: 14px;
}

.category-directory {
  display: grid;
  gap: 24px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: .95rem;
}

.breadcrumb a,
.breadcrumb span {
  line-height: 1.8;
}

.breadcrumb a {
  color: var(--green-dark);
  font-weight: 700;
}

.breadcrumb a:hover {
  color: var(--brown-dark);
}

.category-directory-section {
  display: grid;
  gap: 12px;
}

.category-directory-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px 10px;
  border-bottom: 1px solid rgba(53,82,103,.14);
}

.category-directory-head h2 {
  margin: 0;
  font-size: 1.35rem;
  color: var(--ink);
}

.category-directory-head span {
  color: var(--muted);
  font-size: .92rem;
  white-space: nowrap;
}

.category-content-head {
  margin: 22px 0 12px;
  padding-inline: 0;
}

.category-directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
}

.category-directory-card {
  display: grid;
  gap: 6px;
  min-height: 82px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 14px rgba(24,42,58,.05);
}

.category-directory-card:hover {
  border-color: rgba(0,140,137,.38);
  transform: translateY(-1px);
}

.category-directory-card strong {
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.5;
}

.category-directory-card span {
  color: var(--muted);
  font-size: .92rem;
}

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

.material-list .material-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) auto;
  grid-template-areas:
    "thumb meta actions"
    "thumb title actions"
    "thumb excerpt actions";
  align-items: center;
  gap: 8px 16px;
  min-height: 122px;
  border-radius: 16px;
}

.material-list .material-thumb {
  grid-area: thumb;
  width: 132px;
  aspect-ratio: 4 / 3;
  margin: 0;
  border-radius: 12px;
}

.material-list .meta-row {
  grid-area: meta;
  margin: 0;
}

.material-list .card-title {
  grid-area: title;
  margin: 0;
  font-size: 1.18rem;
}

.material-list .excerpt {
  grid-area: excerpt;
  margin: 0;
}

.material-list .button-row {
  grid-area: actions;
  align-self: center;
  justify-content: flex-end;
  margin: 0;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
}

.pager-count {
  min-width: 64px;
  text-align: center;
  color: var(--muted);
  font-weight: 800;
}

.btn.disabled,
.btn[aria-disabled="true"] {
  opacity: .48;
  pointer-events: none;
}

.material-thumb {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(135deg, #e7f3f4, #ffffff);
  border: 1px solid rgba(53,82,103,.16);
  margin-bottom: 12px;
}

.material-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-placeholder {
  font-family: var(--heading);
  color: var(--brown);
  font-size: 2.4rem;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  font-size: 1rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 14px;
  background: rgba(0,140,137,.11);
  color: var(--green-dark);
  font-weight: 800;
  font-size: .96rem;
}

.hijri-meta {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 14px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: .96rem;
  font-weight: 800;
}

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

.card-title {
  margin: 0 0 10px;
  color: var(--brown-dark);
  font-family: var(--heading);
  font-size: 1.35rem;
  line-height: 1.45;
}

.card-title a:hover { color: var(--green-dark); }

.excerpt {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: .94rem;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.latest-slide .button-row,
.material-card .button-row {
  flex-wrap: nowrap;
  align-items: center;
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 9px 15px;
  background: var(--green-dark);
  color: #f7ffff;
  font-weight: 800;
  border: 1px solid rgba(0,109,119,.18);
}

button.btn {
  font: inherit;
  cursor: pointer;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 999px;
  border: 1px solid rgba(0,109,119,.18);
  background: var(--green-dark);
  color: #f7ffff;
  font: 800 1rem/1 var(--body);
  cursor: pointer;
}

.material-icon {
  width: 22px;
  height: 22px;
  display: block;
  fill: currentColor;
}

.icon-pause {
  display: none;
}

.play-btn.is-playing .icon-play {
  display: none;
}

.play-btn.is-playing .icon-pause {
  display: inline-flex;
}

.icon-btn.secondary {
  background: #ffffff;
  color: var(--brown-dark);
  border-color: var(--border);
}

.play-btn {
  background: var(--accent);
}

.btn.secondary {
  background: #ffffff;
  color: var(--brown-dark);
  border-color: var(--border);
}

.type-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.type-tabs a {
  border: 1px solid var(--border);
  background: rgba(255,255,255,.9);
  color: var(--brown);
  border-radius: 999px;
  padding: 9px 16px;
  font-weight: 800;
}

.type-tabs a.active,
.type-tabs a:hover {
  background: var(--green-dark);
  color: #fff8e8;
}

.books-slider-shell {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(229,244,244,.98), rgba(205,232,235,.96)),
    radial-gradient(circle at top left, rgba(0,140,137,.18), transparent 46%);
  box-shadow: var(--shadow);
  padding: clamp(16px, 2.4vw, 24px);
  margin-bottom: 32px;
  color: var(--brown-dark);
}

.books-side-title {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.books-side-title span {
  writing-mode: horizontal-tb;
  font-family: var(--heading);
  font-size: clamp(1.55rem, 2.8vw, 2.2rem);
  font-weight: 800;
  line-height: 1.2;
}

.books-side-title a {
  display: none;
}

.books-slider {
  position: relative;
  min-width: 0;
  padding: 0 42px;
}

.books-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(230px, 282px);
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  align-items: center;
  min-height: 322px;
  padding: 0 2px 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,109,119,.28) transparent;
}

.books-track::-webkit-scrollbar {
  height: 8px;
}

.books-track::-webkit-scrollbar-thumb {
  background: rgba(0,109,119,.28);
  border-radius: 999px;
}

.book-slide {
  position: relative;
  scroll-snap-align: start;
  display: grid;
  grid-template-rows: auto;
  gap: 0;
  min-width: 0;
  border: 1px solid rgba(0,109,119,.18);
  border-radius: 18px;
  padding: 9px;
  background: rgba(255,255,255,.76);
  box-shadow: 0 10px 22px rgba(24,42,58,.08);
}

.book-cover {
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255,255,255,.16), rgba(255,255,255,.05));
  border: 1px solid rgba(0,109,119,.14);
}

.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-cover span {
  font-size: 1.5rem;
  font-weight: 800;
  color: rgba(255,255,255,.76);
}

.book-slide h3 {
  display: none;
}

.book-slide .button-row {
  position: absolute;
  right: 12px;
  bottom: 12px;
  gap: 6px;
  margin: 0;
}

.book-slide .icon-btn {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
  padding: 0;
  background: rgba(0,109,119,.92);
  border-color: rgba(255,255,255,.36);
}

.book-slide .btn::before {
  content: "â†—";
  color: #ffffff;
  font-size: 15px;
  line-height: 1;
}

.book-slide .btn.secondary {
  background: rgba(255,255,255,.92);
}

.book-slide .btn.secondary::before {
  content: "â†“";
  color: var(--brown-dark);
}

.book-slide .icon-btn.secondary {
  background: rgba(255,255,255,.94);
  color: var(--brown-dark);
}

.book-slide .material-icon {
  width: 17px;
  height: 17px;
}

.single-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 22px;
}

.single-title {
  margin: 0 0 12px;
  color: var(--brown-dark);
  font-family: var(--heading);
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  line-height: 1.35;
}

.player-card,
.side-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 16px;
}

.share-box {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(53,82,103,.12);
}

.share-box h2 {
  margin: 0 0 12px;
  color: var(--brown-dark);
  font-family: var(--heading);
  font-size: 1.05rem;
  line-height: 1.5;
}

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

.share-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 900;
  font-size: .9rem;
  line-height: 1;
  min-width: 0;
  max-width: 100%;
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 10px 20px rgba(53,82,103,.08);
}

.share-link span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-link .material-icon {
  width: 18px;
  height: 18px;
}

.share-link.whatsapp { background: #168a45; }
.share-link.telegram { background: #2477ad; }
.share-link.facebook { background: #2856a3; }
.share-link.x { background: #1d2d3a; }

.share-link:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.image-viewer-card {
  display: grid;
  place-items: center;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 16px;
}

.image-viewer-card img {
  max-width: 100%;
  max-height: 72vh;
  object-fit: contain;
  border-radius: 16px;
}

.file-actions {
  margin-top: 0;
}

.single-neighbor-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.single-neighbor-link {
  display: grid;
  gap: 5px;
  min-height: 82px;
  padding: 14px 16px;
  border: 1px solid rgba(0,140,137,.2);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 12px 24px rgba(24,42,58,.07);
}

.single-neighbor-link span {
  color: var(--teal);
  font-weight: 900;
  font-size: .9rem;
}

.single-neighbor-link strong {
  color: var(--ink);
  font-family: var(--heading);
  font-size: 1rem;
  line-height: 1.45;
}

.single-neighbor-link.next {
  text-align: left;
}

.single-neighbor-link.disabled {
  opacity: .55;
  box-shadow: none;
}

audio { width: 100%; margin-top: 12px; }

.custom-audio-player {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  border: 1px solid rgba(0,140,137,.18);
  border-radius: 24px;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(0,140,137,.12), rgba(255,255,255,.94) 52%, rgba(216,95,79,.09)),
    #ffffff;
  box-shadow: 0 16px 32px rgba(24,42,58,.09);
}

.custom-audio-play {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border: 0;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  color: #ffffff;
  box-shadow: 0 14px 24px rgba(0,109,119,.28);
  cursor: pointer;
}

.custom-audio-play:hover {
  background: linear-gradient(135deg, var(--brown-dark), var(--green-dark));
}

.custom-audio-play .material-icon {
  width: 34px;
  height: 34px;
  fill: currentColor;
}

.custom-audio-play .icon-pause,
.custom-audio-player.is-playing .custom-audio-play .icon-play {
  display: none;
}

.custom-audio-player.is-playing .custom-audio-play .icon-pause {
  display: inline-flex;
}

.custom-audio-body {
  min-width: 0;
}

.custom-audio-label {
  margin-bottom: 10px;
  color: var(--brown-dark);
  font-weight: 900;
}

.custom-audio-progress {
  position: relative;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(53,82,103,.13);
  cursor: pointer;
}

.custom-audio-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--green));
}

.custom-audio-times {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  color: var(--muted);
  direction: ltr;
  font-weight: 800;
  font-size: .88rem;
}

.content-box {
  background: rgba(255,255,255,.74);
  border: 1px solid rgba(53,82,103,.14);
  border-radius: 18px;
  padding: 16px;
  margin-top: 16px;
}

.article-content {
  max-width: 860px;
  margin-top: 22px;
  padding: clamp(22px, 4vw, 38px);
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(250,252,253,.96));
  border-color: rgba(53,82,103,.12);
  border-radius: 20px;
  color: #1d2d3a;
  font-size: 1.08rem;
  line-height: 2.25;
  text-align: justify;
  overflow-wrap: anywhere;
}

.article-content br {
  content: "";
  display: block;
  margin-bottom: .7em;
}

.article-content p {
  margin: 0 0 1.05em;
}

.article-content h2,
.article-content h3,
.article-content h4 {
  margin: 1.4em 0 .55em;
  color: var(--brown-dark);
  font-family: var(--heading);
  line-height: 1.5;
}

.article-content a {
  color: var(--green-dark);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer {
  background: #102531;
  color: #eef8fb;
  padding: 28px 0;
}

.footer-simple {
  display: grid;
  gap: 14px;
  justify-items: center;
  text-align: center;
}

.admin-contact-card {
  width: min(860px, 100%);
  border: 1px solid rgba(126,224,220,.2);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.08), rgba(126,224,220,.08));
  padding: 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.admin-contact-card h2 {
  margin: 0 0 12px;
  color: #7ee0dc;
  font-family: var(--heading);
  font-size: 1.05rem;
  font-weight: 900;
}

.admin-contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.admin-contact-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  padding: 8px 16px;
  background: rgba(255,255,255,.08);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(0,0,0,.12);
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.admin-contact-link:hover {
  transform: translateY(-2px);
  border-color: rgba(126,224,220,.45);
  background: rgba(126,224,220,.13);
  color: #fff;
}

.admin-contact-link .material-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.admin-contact-link.whatsapp { background: linear-gradient(135deg, rgba(35,138,88,.92), rgba(23,77,76,.82)); }
.admin-contact-link.telegram { background: linear-gradient(135deg, rgba(47,127,120,.92), rgba(16,45,63,.86)); }
.admin-contact-link.email { background: linear-gradient(135deg, rgba(200,148,77,.9), rgba(138,86,36,.82)); }

.admin-contact-mail {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255,255,255,.16);
  font-weight: 900;
}

.footer-quote {
  width: min(920px, 100%);
  border: 1px solid rgba(126,224,220,.18);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.08), rgba(126,224,220,.08));
  padding: 12px 16px;
  color: rgba(238,248,251,.92);
  line-height: 1.9;
}

.footer-quote span {
  display: block;
  margin-bottom: 2px;
  color: #7ee0dc;
  font-weight: 900;
  font-size: .92rem;
}

.footer-quote strong {
  display: block;
  font-family: var(--heading);
  font-size: clamp(.98rem, 1.7vw, 1.18rem);
  font-weight: 800;
}

.footer a {
  color: rgba(238,248,251,.84);
}

.footer a:hover { color: #7ee0dc; }

.footer-social-card {
  width: min(860px, 100%);
  border: 1px solid rgba(200,148,77,.32);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255,253,248,.08), rgba(200,148,77,.08)),
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.015));
  padding: 14px 16px 16px;
}

.footer-social-card h2 {
  margin: 0 0 12px;
  color: #f6ead9;
  font-family: var(--heading);
  font-size: 1.02rem;
  font-weight: 900;
}

.footer-social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  align-items: center;
}

.footer-social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  min-width: 84px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  padding: 7px 15px;
  background: rgba(255,255,255,.08);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 10px 18px rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.1);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.footer-social-links a:hover {
  transform: translateY(-2px);
  background: rgba(126,224,220,.13);
  border-color: rgba(126,224,220,.38);
  color: #fff;
}

.footer-social-links a.whatsapp { background: linear-gradient(135deg, rgba(35,138,88,.86), rgba(23,77,76,.78)); }
.footer-social-links a.telegram { background: linear-gradient(135deg, rgba(47,127,120,.88), rgba(16,45,63,.82)); }
.footer-social-links a.facebook { background: linear-gradient(135deg, rgba(40,91,160,.86), rgba(16,45,63,.8)); }
.footer-social-links a.twitter { background: linear-gradient(135deg, rgba(21,52,69,.9), rgba(66,91,106,.78)); }
.footer-social-links a.youtube { background: linear-gradient(135deg, rgba(171,43,43,.9), rgba(138,86,36,.75)); }

.footer-designer {
  color: rgba(238,248,251,.76);
  font-size: .95rem;
}

.footer-designer a {
  color: #ffffff;
  font-weight: 800;
}

.empty {
  text-align: center;
  padding: 28px;
  color: var(--muted);
}

@media (max-width: 900px) {
  .top-header {
    padding: 28px 0 42px;
  }
  .top-header::before {
    width: 170px;
    height: 170px;
    opacity: .55;
  }
  .top-header .container {
    grid-template-columns: 1fr;
    grid-template-areas:
      "logo"
      "date"
      "quote"
      "search";
    gap: 16px;
  }
  .header-quote {
    max-width: 560px;
    padding: 18px 20px;
  }
  .header-search {
    width: min(100%, 560px);
  }
  .nav-inner,
  .single-layout,
  .books-slider-shell {
    grid-template-columns: 1fr;
  }
  .nav-inner { direction: rtl; }
  .nav-list { gap: 12px 14px; }
  .nav-strip {
    transform: translateY(-24px);
    margin-bottom: -24px;
  }
  .nav-inner {
    max-width: 720px;
    padding: 10px;
    gap: 10px;
  }
  .nav-list {
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
  }
  .nav-list a {
    min-height: 0;
    width: auto;
  }
  .search-form {
    max-width: 520px;
    margin-inline: auto;
  }
  .books-side-title {
    min-height: auto;
    align-items: center;
  }
  .books-side-title span {
    writing-mode: horizontal-tb;
  }
  .books-slider {
    padding: 0 36px;
  }
  .books-track {
    min-height: 210px;
  }
  .popular-frame-head {
    align-items: start;
    flex-direction: column;
  }
  .popular-list {
    grid-template-columns: 1fr;
  }
  .fresh-columns {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .fresh-columns::before {
    display: none;
  }
  .library-gateway {
    grid-template-columns: 1fr;
    grid-template-areas:
      "head"
      "links"
      "action";
  }
  .library-gateway .btn {
    justify-self: stretch;
    text-align: center;
  }
}

@media (max-width: 560px) {
  .top-header {
    padding: 20px 0 36px;
  }
  .site-logo img {
    max-height: 150px;
  }
  .header-date {
    gap: 8px;
    font-size: .86rem;
    margin-top: -6px;
  }
  .header-quote {
    padding: 18px 14px 14px;
    border-radius: 14px;
  }
  .header-quote span {
    font-size: .88rem;
  }
  .header-quote strong {
    font-size: .92rem;
  }
  .header-date span,
  .header-date time {
    padding: 5px 12px;
  }
  .container {
    width: min(100% - 20px, 1180px);
  }
  .nav-inner {
    gap: 10px;
    padding: 10px;
    border-radius: 12px;
  }
  .nav-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
  }
  .nav-list li {
    min-width: 0;
  }
  .nav-list a {
    display: block;
    width: 100%;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 7px;
    background: rgba(255,255,255,.1);
    color: rgba(255,255,255,.9);
    padding: 6px 8px;
    font-size: .92rem;
    min-height: 44px;
    min-width: 0;
  }
  .search-form {
    max-width: none;
    border-radius: 8px;
    padding: 2px 6px;
  }
  .search-form input {
    padding: .52rem .35rem;
    font-size: .92rem;
  }
  .search-form button {
    padding: .48rem .55rem;
  }
  .library-gateways {
    grid-template-columns: 1fr;
  }
  .library-gateway-head {
    flex-direction: column;
    gap: 4px;
  }
  .library-gateway-links a {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .main { padding-top: 22px; }
  .news-ticker {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    border-radius: 12px;
    padding: 12px;
  }
  .ticker-badge {
    width: fit-content;
  }
  .ticker-marquee {
    -webkit-mask-image: none;
    mask-image: none;
  }
  .ticker-item {
    max-width: 82vw;
  }
  .ticker-item-summary,
  .ticker-item-date {
    display: none;
  }
  .hero,
  .section-shell,
  .single-shell { border-radius: 20px; }
  .latest-slider { padding: 0 0 4px; }
  .latest-track { grid-auto-columns: minmax(180px, 72%); }
  .cards-strip-slider { padding: 0 0 4px; }
  .books-slider { padding: 0 0 4px; }
  .books-track { grid-auto-columns: minmax(196px, 78%); }
  .slider-arrow { display: none; }
  .latest-grid,
  .cards-grid,
  .category-grid { grid-template-columns: 1fr; }
  .material-list .material-card {
    grid-template-columns: 86px minmax(0, 1fr);
    grid-template-areas:
      "thumb meta"
      "thumb title"
      "thumb excerpt"
      "actions actions";
    align-items: start;
    gap: 8px 12px;
    min-height: 0;
  }
  .material-list .material-thumb {
    width: 86px;
  }
  .material-list .button-row {
    justify-content: flex-start;
  }
  .single-neighbor-nav {
    grid-template-columns: 1fr;
  }
  .single-neighbor-link.next {
    text-align: right;
  }
  .category-tree-roots {
    grid-template-columns: 1fr;
  }
  .category-tree-card {
    border-radius: 18px;
    padding: 13px;
  }
  .category-tree-children {
    padding-right: 12px;
  }
  .category-tree-children .category-tree-card::before {
    right: -14px;
    width: 12px;
  }
  .custom-audio-player {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
    border-radius: 18px;
    padding: 12px;
  }
  .custom-audio-play {
    width: 58px;
    height: 58px;
    border-radius: 18px;
  }
  .custom-audio-play .material-icon {
    width: 28px;
    height: 28px;
  }
}
