@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@400;500;700;800;900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Scheherazade+New:wght@400;700&display=swap");

:root {
  color-scheme: dark;
  --bg: #090a0f;
  --bg-soft: #12141c;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --card: rgba(18, 20, 28, 0.7);
  --card-strong: rgba(22, 25, 35, 0.85);
  --text: #f8f9fa;
  --muted: #a1a5b5;
  --line: rgba(255, 255, 255, 0.1);
  --brand: #10b981;
  --brand-glow: rgba(16, 185, 129, 0.4);
  --accent: #3b82f6;
  --accent-glow: rgba(59, 130, 246, 0.4);
  --gold: #f59e0b;
  --rose: #ec4899;
  --ink: #050505;
  --shadow: 0 24px 50px -12px rgba(0, 0, 0, 0.5);
  --ring: 0 0 0 2px var(--brand-glow);
  --font-heading: 'Outfit', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --surface: rgba(15, 23, 42, 0.035);
  --surface-strong: rgba(15, 23, 42, 0.07);
  --card: rgba(255, 255, 255, 0.92);
  --card-strong: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --line: rgba(15, 23, 42, 0.12);
  --ink: #ffffff;
  --shadow: 0 18px 42px -18px rgba(15, 23, 42, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.65;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

html[data-theme="light"] body {
  background-color: var(--bg);
}

h1, h2, h3, h4, h5, h6, .brand-title, .btn {
  font-family: var(--font-heading);
}

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

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.container {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  background: rgba(9, 10, 15, 0.7);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

html[data-theme="light"] .header {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.08);
}

.header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  background: rgba(9, 10, 15, 0.85);
}

html[data-theme="light"] .header.is-scrolled {
  background: rgba(255, 255, 255, 0.98);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-width: 0;
  padding: 0.75rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.brand img {
  width: 42px;
  height: 42px;
  filter: drop-shadow(0 8px 16px rgba(55, 214, 122, 0.2));
}

.brand-title {
  font-weight: 800;
  letter-spacing: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
  flex-wrap: nowrap;
}

.nav-links a,
.theme-toggle,
.burger {
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0.5rem 0.78rem;
  font-size: 0.9rem;
  line-height: 1;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.nav-links a:hover,
.theme-toggle:hover,
.burger:hover {
  color: var(--text);
  background: var(--surface);
  border-color: var(--line);
}

.nav-links a.active {
  color: var(--brand);
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  font-weight: 600;
}

html[data-theme="light"] .brand-title {
  color: #0f172a;
}

html[data-theme="light"] .nav-links a,
html[data-theme="light"] .theme-toggle,
html[data-theme="light"] .burger {
  color: #334155;
}

html[data-theme="light"] .nav-links a:hover,
html[data-theme="light"] .theme-toggle:hover,
html[data-theme="light"] .burger:hover {
  color: #0f172a;
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .nav-links a.active {
  color: #059669;
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
}

.nav-links a:focus-visible,
.theme-toggle:focus-visible,
.burger:focus-visible,
.btn:focus-visible,
.searchbar input:focus-visible,
.modal-head input:focus-visible,
.copy-verse:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.badge,
.nav-links a.badge {
  color: #07110c;
  background: linear-gradient(135deg, var(--gold), var(--brand));
  border-color: transparent;
  font-weight: 800;
}

.burger {
  display: none;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-color: var(--line);
  border-radius: 12px;
  padding: 0;
  background: var(--surface);
  color: var(--text);
  place-items: center;
}

.burger::before {
  content: "";
  width: 18px;
  height: 12px;
  background:
    linear-gradient(var(--text), var(--text)) top / 100% 2px no-repeat,
    linear-gradient(var(--text), var(--text)) center / 100% 2px no-repeat,
    linear-gradient(var(--text), var(--text)) bottom / 100% 2px no-repeat;
}

#progress {
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--accent), var(--gold));
  transform-origin: left;
  transform: scaleX(0);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  padding: 0.72rem 1.4rem;
  box-shadow: 0 4px 14px 0 var(--brand-glow);
  white-space: nowrap;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transform: skewX(-20deg);
  transition: none;
  z-index: 1;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 var(--brand-glow), 0 0 0 2px var(--surface-strong);
}

.btn:hover::before {
  left: 200%;
  transition: all 0.7s ease-in-out;
}

.hero,
.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-color: var(--bg);
}



.hero {
  min-height: min(690px, calc(100svh - 68px));
  display: flex;
  align-items: flex-start;
  padding: clamp(1.15rem, 2.7vw, 2.2rem) 0 clamp(2rem, 4vw, 3.2rem);
  border-bottom: 1px solid var(--line);
  background-image:
    linear-gradient(90deg, rgba(9, 10, 15, 0.94) 0%, rgba(9, 10, 15, 0.78) 58%, rgba(9, 10, 15, 0.92) 100%),
    url("https://images.unsplash.com/photo-1462331940025-496dfbfc7564?w=1800&q=85");
  background-position: center;
  background-size: cover;
}

html[data-theme="light"] .hero {
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 252, 0.91) 58%, rgba(255, 255, 255, 0.96) 100%),
    url("https://images.unsplash.com/photo-1462331940025-496dfbfc7564?w=1800&q=85");
}

@keyframes floatAmbient {
  0% { transform: scale(1) translate(0, 0); }
  33% { transform: scale(1.01) translate(1%, 1%); }
  66% { transform: scale(0.99) translate(-1%, 0.5%); }
  100% { transform: scale(1) translate(0, 0); }
}

.hero::before {
  content: "";
  position: absolute;
  inset: -10%;
  z-index: -2;
  background:
    radial-gradient(circle at 18% 24%, rgba(16, 185, 129, 0.2), transparent 24%),
    radial-gradient(circle at 76% 32%, rgba(59, 130, 246, 0.18), transparent 26%),
    linear-gradient(180deg, rgba(9, 10, 15, 0.12), var(--bg));
  animation: floatAmbient 15s ease-in-out infinite alternate;
}

html[data-theme="light"] .hero::before {
  background:
    radial-gradient(circle at 18% 24%, rgba(16, 185, 129, 0.18), transparent 24%),
    radial-gradient(circle at 76% 32%, rgba(59, 130, 246, 0.16), transparent 26%),
    linear-gradient(180deg, rgba(246, 248, 251, 0.1), var(--bg));
  animation: floatAmbient 15s ease-in-out infinite alternate;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: -1;
  height: 34%;
  background: linear-gradient(180deg, transparent, var(--bg));
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 4rem;
  align-items: center;
}

.hero h1,
.page-hero h1 {
  margin: 0 0 1rem;
  max-width: 900px;
  font-size: clamp(3.2rem, 7vw, 5.8rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  background: linear-gradient(to right, #ffffff, #e2e8f0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

html[data-theme="light"] .hero h1,
html[data-theme="light"] .page-hero:not(.has-topic-art) h1 {
  background: linear-gradient(to right, #101624, #475569);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p,
.page-hero p {
  max-width: 700px;
  margin: 0 0 1rem;
  color: color-mix(in srgb, var(--text), var(--muted) 10%);
  font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  line-height: 1.6;
}

html[data-theme="light"] .hero p,
html[data-theme="light"] .page-hero:not(.has-topic-art) p {
  color: #475569;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.4rem;
  justify-content: flex-start;
}

.hero-visual {
  width: 100%;
  min-height: 280px;
  display: grid;
  place-items: center;
}

.hero-art-composite {
  width: min(100%, 420px);
  max-width: 100%;
}

.hero-eyebrow {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.15);
  color: #fff;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero-panel {
  background: rgba(15, 20, 30, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 24px;
  padding: 2.5rem;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0px); }
}

.hero-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
}

.hero-panel img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.hero-panel-body {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
}

.stat {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 0.8rem;
}

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

.stat span {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.searchbar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  max-width: 760px;
  min-width: 0;
}

.searchbar input,
.modal-head input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-strong);
  color: var(--text);
  padding: 0.88rem 1rem;
}

.searchbar input::placeholder,
.modal-head input::placeholder {
  color: color-mix(in srgb, var(--muted), transparent 10%);
}

.section {
  padding: clamp(2.4rem, 5vw, 4.8rem) 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.section h2,
.section-head h2 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.55rem, 3vw, 2.4rem);
  line-height: 1.15;
}

.section-head p {
  margin: 0;
  max-width: 680px;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 1.25rem;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 2px;
  background: linear-gradient(135deg, var(--surface-strong), transparent, var(--surface-strong));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.5;
  transition: opacity 0.4s ease, background 0.4s ease;
}

@keyframes spinGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.card:hover {
  border-color: transparent;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px var(--brand-glow);
  transform: translateY(-8px) scale(1.01);
}

.card:hover::after {
  opacity: 1;
  background: linear-gradient(225deg, var(--brand), var(--accent), var(--gold));
  background-size: 200% 200%;
  animation: spinGradient 4s linear infinite;
}

.card-media {
  position: relative;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
  overflow: hidden;
}

.card-media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transform: scale(1.001);
  transition: transform 350ms ease;
}

.card:hover .card-media img {
  transform: scale(1.045);
}

.card h3,
.card p,
.card .btn {
  margin-left: 1rem;
  margin-right: 1rem;
}

.card h3 {
  margin-top: 1rem;
  margin-bottom: 0.35rem;
  font-size: 1.08rem;
  line-height: 1.28;
}

.card p {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--muted);
}

.card .btn {
  width: max-content;
  margin-top: auto;
  margin-bottom: 1.15rem;
}

.chips {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: color-mix(in srgb, var(--text), var(--muted) 28%);
  padding: 0.28rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.page-hero {
  min-height: 40vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(4rem, 8vw, 6rem) 1rem 3rem;
  text-align: center;
  border-bottom: 1px solid var(--line);
}

.page-hero.has-topic-art {
  background-image:
    linear-gradient(180deg, rgba(12, 13, 14, 0.58), rgba(12, 13, 14, 0.9)),
    var(--topic-art) !important;
  background-position: center;
  background-size: cover;
}

.content {
  width: min(800px, calc(100% - 2rem));
  margin: clamp(1.5rem, 4vw, 3rem) auto 0;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
  padding: clamp(2rem, 5vw, 4rem) clamp(1.5rem, 4vw, 3.5rem);
}

.content h1,
.content h2,
.content h3,
.content h4 {
  margin: 2rem 0 1rem;
  line-height: 1.3;
  color: var(--text);
}

.content h1 {
  font-size: clamp(2.2rem, 4vw, 3rem);
  letter-spacing: -0.02em;
}

.content h2 {
  font-size: clamp(1.6rem, 2.5vw, 2rem);
  letter-spacing: -0.01em;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.5rem;
}

.content h3 {
  color: color-mix(in srgb, var(--text), var(--muted) 10%);
  font-size: 1.25rem;
}

.content p {
  margin: 1.1rem 0;
  color: color-mix(in srgb, var(--text), var(--muted) 10%);
  font-size: 1.1rem;
  line-height: 1.8;
}

.content .lead {
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.6;
}

.content .source {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

.content a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(59, 130, 246, 0.4);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: all 0.2s ease;
}

.content a:hover {
  color: var(--brand);
  text-decoration-color: var(--brand);
}

.content ul,
.content ol {
  margin: 0.65rem 0 1rem 1.2rem;
  padding: 0;
}

.content li {
  margin: 0.4rem 0;
}

.quote,
.verse {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: var(--surface-strong);
  position: relative;
  overflow: hidden;
}

.quote::before, .verse::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, var(--brand), var(--accent));
}

.quote {
  padding: 1.5rem 2rem;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--text);
  margin: 2rem 0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.article-visual {
  margin: 2rem -1.5rem;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
@media (min-width: 640px) {
  .article-visual {
    margin: 2rem -3rem;
  }
}

.article-visual img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.article-visual:hover img {
  transform: scale(1.03);
}

.verse {
  margin: 2rem 0;
  padding: 1.5rem 2rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.verse p {
  margin: 0.6rem 0;
}

.verse .verse-ref {
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.verse .ar {
  color: var(--text);
  direction: rtl;
  font-family: "Scheherazade New", "Amiri", serif;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  line-height: 1.8;
  text-align: right;
  margin-bottom: 1.5rem;
}

.verse .sq {
  font-size: 1.1rem;
  line-height: 1.6;
  color: color-mix(in srgb, var(--text), var(--muted) 10%);
}

.copy-verse {
  margin-top: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-strong);
  color: var(--text);
  cursor: pointer;
  padding: 0.42rem 0.7rem;
}

.content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  background: var(--card-strong);
}

.content th,
.content td {
  border: 1px solid var(--line);
  padding: 0.72rem 0.8rem;
  text-align: left;
}

.content th {
  background: var(--surface);
}

.footer {
  margin-top: clamp(2rem, 5vw, 4rem);
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.14);
  color: var(--muted);
  padding: 2.2rem 0;
}

html[data-theme="light"] .footer {
  background: rgba(255, 255, 255, 0.42);
}

.footer .cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1.2rem;
}

.footer h4 {
  margin: 0 0 0.65rem;
  color: var(--text);
}

.footer p {
  margin: 0.35rem 0;
}

.footer .copy {
  margin-top: 1.4rem;
  text-align: center;
  font-size: 0.9rem;
}

.kicker {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.kicker a {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: color-mix(in srgb, var(--text), var(--muted) 30%);
  padding: 0.32rem 0.58rem;
  font-size: 0.87rem;
}

.top-btn {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 45;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card-strong);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.top-btn.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.hidden {
  display: none !important;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: flex-start;
  justify-content: center;
  background: rgba(0, 0, 0, 0.62);
  padding: 8vh 1rem 1rem;
}

.modal.open {
  display: flex;
}

.modal-card {
  width: min(840px, 100%);
  max-height: 82vh;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card-strong);
  box-shadow: var(--shadow);
  padding: 1rem;
}

.modal-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.modal-results {
  display: grid;
  gap: 0.55rem;
  max-height: 62vh;
  margin-top: 0.8rem;
  overflow: auto;
  padding-right: 0.2rem;
}

.modal-results a,
.modal-empty {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 0.75rem 0.85rem;
}

.modal-results a {
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.modal-results a:hover,
.modal-results a:focus-visible {
  border-color: color-mix(in srgb, var(--accent), var(--line) 40%);
  background: var(--surface-strong);
  transform: translateX(2px);
  outline: none;
}

.modal-results strong {
  display: block;
  line-height: 1.3;
}

.modal-results span {
  display: block;
  margin-top: 0.18rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 500ms ease, transform 500ms ease;
  transition-delay: var(--delay, 0ms);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .hero {
    min-height: auto;
    padding: 1rem 0 2.2rem;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .hero-copy {
    justify-items: center;
    text-align: center;
    padding-top: 0;
  }

  .hero p {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-trust {
    margin-top: 1.2rem;
    padding-top: 1rem;
  }

  .hero-panel {
    max-width: 520px;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-visual {
    margin-top: 1.5rem;
  }

  .hero-art-composite {
    justify-self: center;
  }

  .nav-links {
    display: none;
  }

  .burger {
    display: grid !important;
    margin-left: auto;
    position: fixed;
    top: 0.82rem;
    right: 0.75rem;
    z-index: 70;
  }

  .nav-open .nav-links {
    position: absolute;
    top: calc(100% + 8px);
    right: 1rem;
    display: grid;
    width: min(320px, calc(100vw - 2rem));
    justify-items: stretch;
    gap: 0.35rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--card-strong);
    box-shadow: var(--shadow);
    padding: 0.8rem;
  }

  .nav-open .nav-links a,
  .nav-open .theme-toggle {
    justify-content: flex-start;
    width: 100%;
    border-radius: 10px;
    text-align: left;
    min-height: 44px;
    padding: 0.9rem 1rem;
    }

    .nav-open .nav-links {
      max-height: calc(100vh - 5.5rem);
      overflow: auto;
  }
}

@media (max-width: 1180px) and (min-width: 901px) {
  .nav-links {
    gap: 0.05rem;
  }

  .nav-links a,
  .theme-toggle {
    padding: 0.44rem 0.52rem;
    font-size: 0.82rem;
  }

  .brand-title {
    max-width: 180px;
    font-size: 0.95rem;
  }
}

@media (max-width: 640px) {
  .container {
    width: calc(100% - 1rem);
    max-width: 1180px;
  }

  .hero-grid,
  .hero-copy,
  .hero-panel,
  .searchbar {
    width: 100%;
    max-width: calc(100vw - 1rem);
  }

  .hero-copy > * {
    max-width: calc(100vw - 1rem);
  }

  .hero p,
  .page-hero p,
  .hero h1,
  .page-hero h1 {
    max-width: calc(100vw - 1rem);
  }

  .hero {
    min-height: auto;
    padding: 3.2rem 0 3rem;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 2.7rem;
  }

  .hero-copy {
    justify-items: stretch;
    text-align: center;
  }

  .hero-copy h1,
  .hero-copy p {
    width: 100%;
  }

  .hero-eyebrow {
    justify-self: center;
    width: auto;
    max-width: 100%;
    white-space: normal;
    text-align: center;
  }

  .hero-actions {
    width: min(100%, 320px);
    justify-self: center;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-trust {
    gap: 0.9rem;
    margin-top: 1.8rem;
  }

  .trust-divider {
    display: none;
  }

  .brand-title {
    max-width: 230px;
  }

  .hero p,
  .page-hero p {
    overflow-wrap: break-word;
    word-break: normal;
  }

  .searchbar,
  .modal-head,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .searchbar .btn,
  .modal-head .theme-toggle {
    width: 100%;
  }

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

  .hero-actions .btn {
    width: 100%;
    min-width: auto;
  }

  .hero-visual {
    min-height: 220px;
    margin-top: 3rem;
  }

  .hero-art-composite {
    width: 100%;
    max-width: 100%;
  }

  .hero-grid {
    gap: 1.5rem;
  }

  .hero p,
  .page-hero p,
  .hero h1,
  .page-hero h1 {
    max-width: calc(100vw - 2rem);
  }

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

  .content {
    width: min(100% - 1rem, 920px);
    border-radius: 14px;
  }

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* --- NEW PREMIUM ENHANCEMENTS --- */

/* Hero Additions */
.hero-gradient-text {
  background: linear-gradient(135deg, var(--brand), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.eyebrow-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 10px var(--brand);
  animation: pulseDot 2s infinite;
}
@keyframes pulseDot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(55, 214, 122, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(55, 214, 122, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(55, 214, 122, 0); }
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), #2cb462);
  color: #000;
  font-weight: 800;
}
.btn-primary:hover {
  box-shadow: 0 18px 34px rgba(55, 214, 122, 0.3);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--text);
  box-shadow: none;
}
html[data-theme="light"] .btn-ghost {
  background: rgba(0, 0, 0, 0.03);
  color: var(--text);
}
.btn-ghost:hover {
  background: var(--surface-strong);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.hero-trust {
  display: inline-flex;
  align-items: center;
  gap: 2rem;
  margin-top: 3rem;
  padding: 1.2rem 2.2rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}
html[data-theme="light"] .hero-trust {
  background: rgba(15, 23, 42, 0.02);
  border-color: rgba(15, 23, 42, 0.05);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* Hero Visual Composite */
.hero-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -60px;
}

.hero-art-composite {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: floatAmbient 15s ease-in-out infinite alternate;
}

.art-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}

.art-ring-1 {
  width: 80%; height: 80%;
  animation: spinDash 30s linear infinite;
  border-color: rgba(59, 130, 246, 0.3);
}

.art-ring-2 {
  width: 100%; height: 100%;
  animation: spinDash 45s linear infinite reverse;
  border-color: rgba(16, 185, 129, 0.2);
}

.orbit {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
}

.orbit-1 { width: 75%; height: 75%; animation: spinOrbit 45s linear infinite; }
.orbit-2 { width: 90%; height: 90%; animation: spinOrbit 80s linear infinite reverse; }
.orbit-3 { width: 110%; height: 110%; animation: spinOrbit 120s linear infinite; }

@keyframes spinOrbit {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.mini-planet {
  position: absolute;
  border-radius: 50%;
}

.planet-1 {
  width: 20px; height: 20px;
  top: 0; left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 35% 35%, #cbd5e1, #475569);
  box-shadow: inset -4px -4px 6px rgba(0,0,0,0.6), 0 0 15px rgba(255,255,255,0.2);
}

.planet-2 {
  width: 14px; height: 14px;
  top: 50%; left: 100%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 35% 35%, #fde68a, #b45309);
  box-shadow: inset -3px -3px 5px rgba(0,0,0,0.6), 0 0 15px rgba(253, 230, 138, 0.2);
}

.planet-3 {
  width: 26px; height: 26px;
  top: 100%; left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 35% 35%, #6ee7b7, #047857);
  box-shadow: inset -5px -5px 8px rgba(0,0,0,0.6), 0 0 15px rgba(167, 243, 208, 0.2);
}

.art-globe {
  width: 60%;
  height: 60%;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 70px rgba(59, 130, 246, 0.4);
}

.art-globe::before {
  content: '';
  position: absolute;
  inset: -10%;
  background: url('../images/earth_rotation.png') center/cover;
  animation: spinDash 600s linear infinite;
}

.art-globe::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset -25px -25px 40px rgba(0, 0, 0, 0.75),
              inset 5px 5px 15px rgba(255, 255, 255, 0.15);
  pointer-events: none;
}

.floating-badge {
  position: absolute;
  background: rgba(18, 20, 28, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
}

.badge-1 {
  top: 15%; right: 5%;
  animation: floatAmbient 6s ease-in-out infinite alternate;
}

.badge-2 {
  bottom: 20%; left: 0%;
  animation: floatAmbient 7s ease-in-out infinite alternate-reverse;
}

html[data-theme="light"] .floating-badge {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(15, 23, 42, 0.1);
  color: #0f172a;
}
html[data-theme="light"] .art-globe {
  box-shadow: 0 0 60px rgba(59, 130, 246, 0.3);
}
html[data-theme="light"] .art-ring {
  border-color: rgba(15, 23, 42, 0.1);
}
.trust-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.trust-num {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}
.trust-item span:last-child {
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.trust-divider {
  width: 1px;
  height: 24px;
  background: var(--line);
}

/* Panel Enhancements */
.hero-panel {
  display: flex;
  flex-direction: column;
  padding: 2rem;
  background: linear-gradient(145deg, var(--card), var(--bg-soft));
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.hero-panel::before {
  content: '"';
  position: absolute;
  top: -20px;
  right: 20px;
  font-size: 120px;
  color: var(--line);
  font-family: Georgia, serif;
  line-height: 1;
  opacity: 0.5;
  z-index: 0;
}
.hero-panel-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 1.5rem;
  z-index: 1;
}
.hero-verse {
  margin: 0;
  z-index: 1;
  flex-grow: 1;
}
.hero-verse .ar {
  font-size: 1.8rem;
  color: var(--text);
  margin-bottom: 1rem;
  line-height: 1.8;
}
.hero-verse .sq {
  font-size: 1.1rem;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 1rem;
}
.verse-ref {
  font-size: 0.9rem;
  color: var(--brand);
  font-weight: 600;
}
.hero-panel-action {
  margin-top: 2rem;
  z-index: 1;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}
.inline-link {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 0.2s ease;
}
.inline-link:hover {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Section Additions */
.section-badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: rgba(63, 184, 255, 0.1);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1rem;
  border: 1px solid rgba(63, 184, 255, 0.2);
}
.alt-bg {
  background-color: var(--bg-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.hidden-mobile {
  display: inline-block;
}

/* Category Cards */
.category-card {
  padding: 2rem 1.5rem;
  text-align: center;
  align-items: center;
}
.category-card:hover {
  transform: translateY(-8px);
}
.card-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 70px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform 0.3s ease, background 0.3s ease;
}
.category-card:hover .card-icon {
  transform: scale(1.1) rotate(5deg);
  background: rgba(55, 214, 122, 0.1);
  border-color: rgba(55, 214, 122, 0.3);
}
.category-card h3 {
  margin: 0.5rem 0;
  font-size: 1.3rem;
}
.category-card p {
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}
.category-card .btn {
  margin: auto auto 0;
  width: 100%;
}

/* Feature Cards */
.feature-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.feature-card {
  flex-direction: column;
}
.media-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  color: #fff;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.feature-card .card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.feature-card h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.4rem;
}
.feature-card p {
  margin: 0 0 1.5rem 0;
}
.feature-card .btn {
  margin: auto 0 0 0;
}

/* CTA Box */
.cta-box {
  background: linear-gradient(135deg, rgba(24, 27, 31, 0.8), rgba(16, 36, 56, 0.8));
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 4rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
html[data-theme="light"] .cta-box {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(220, 240, 255, 0.8));
}
.cta-box::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: url('../images/stars.svg') center/cover;
  opacity: 0.3;
  z-index: 0;
}
.cta-content {
  position: relative;
  z-index: 1;
  max-width: 500px;
}
.cta-content h2 {
  font-size: 2.2rem;
  margin-top: 0;
  margin-bottom: 1rem;
}
.cta-content p {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 2rem;
}
.cta-art {
  position: relative;
  z-index: 1;
  width: 250px;
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.animated-globe {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--accent), #0f3c5c);
  box-shadow: inset -20px -20px 40px rgba(0, 0, 0, 0.5), 0 0 50px rgba(63, 184, 255, 0.4);
  animation: floatGlobe 6s ease-in-out infinite;
  position: relative;
}
.animated-globe::before {
  content: '';
  position: absolute;
  top: -10px; left: -10px; right: -10px; bottom: -10px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.3);
  animation: spinDash 20s linear infinite;
}
@keyframes floatGlobe {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}
@keyframes spinDash {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Footer Enhancements */
.footer-brand p {
  font-size: 0.95rem;
  margin-top: 1rem;
  max-width: 280px;
}
.footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer ul li {
  margin-bottom: 0.5rem;
}
.text-btn {
  background: none;
  border: none;
  color: var(--muted);
  padding: 0;
  cursor: pointer;
  font-size: 1rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.text-btn:hover {
  color: var(--brand);
}
.footer-actions {
  margin-top: 1.5rem;
}
.btn-sm {
  min-height: 36px;
  padding: 0.4rem 0.8rem;
  font-size: 0.9rem;
}
.footer-bottom {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  text-align: center;
}
.footer-bottom .copy {
  margin: 0;
  font-size: 0.95rem;
}
.license {
  opacity: 0.7;
}

/* Search Enhancements */
.search-input-wrapper {
  position: relative;
  flex-grow: 1;
}
.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 1.2rem;
}
.search-input-wrapper input {
  padding-left: 2.8rem;
  width: 100%;
}
.search-initial-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
}

/* Ayah Highlight Section */
.ayah-highlight {
  position: relative;
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(22, 25, 35, 0.9), rgba(9, 10, 15, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: clamp(3rem, 6vw, 5rem) clamp(2rem, 5vw, 4rem);
  text-align: center;
  overflow: hidden;
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.5);
}

.ayah-highlight::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%; right: -50%; bottom: -50%;
  background: radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.1), transparent 60%);
  animation: pulseRotate 20s linear infinite;
  z-index: 0;
  pointer-events: none;
}

@keyframes pulseRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.ayah-highlight-inner {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ayah-tag {
  display: inline-block;
  padding: 0.4rem 1.2rem;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--brand);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-bottom: 2rem;
}

.ayah-highlight .ar-big {
  font-family: "Scheherazade New", "Amiri", serif;
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 1.6;
  color: #fff;
  direction: rtl;
  margin-bottom: 1.5rem;
  text-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
}

.ayah-highlight .ayah-trans {
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  color: var(--text);
  font-style: italic;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.ayah-highlight .ayah-ref {
  font-size: 1rem;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 2.5rem;
}

/* Responsiveness adjustments */
@media (max-width: 900px) {
  .hero-trust {
    flex-wrap: wrap;
    justify-content: center;
  }
  .cta-box {
    flex-direction: column;
    text-align: center;
    padding: 3rem 1.5rem;
  }
  .hidden-mobile {
    display: none;
  }
}



.eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--brand);
  box-shadow: 0 0 10px var(--brand);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0% { transform: scale(0.85); opacity: 0.6; }
  50% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(0.85); opacity: 0.6; }
}

@media (max-width: 640px) {
  .hero-grid,
  .hero-copy {
    width: 100%;
    max-width: 100%;
  }

  .hero {
    padding: 0.85rem 0 1.9rem;
  }

  .hero-grid {
    gap: 0;
  }

  .hero-copy {
    justify-items: center;
  }

  .hero-copy h1,
  .hero-copy p {
    width: min(100%, 342px);
    max-width: calc(100vw - 2rem);
  }

  .hero h1 {
    font-size: 2.35rem;
  }

  .hero-actions {
    display: grid;
    width: min(100%, 320px);
    max-width: calc(100vw - 2rem);
    justify-self: center;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .hero-stats .stat:last-child {
    grid-column: span 2;
  }
}


/* BREADCRUMB NAVIGATION */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: var(--surface);
  font-size: 0.9rem;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  color: var(--brand);
  text-decoration: underline;
}

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

.breadcrumb-divider {
  color: var(--muted);
  margin: 0 0.3rem;
}

/* READING TIME & METADATA */
.article-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
  color: var(--muted);
  flex-wrap: wrap;
}

.reading-time {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.reading-time::before {
  content: '📖';
  font-size: 1.1rem;
}

.article-category {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: var(--brand);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* RELATED ARTICLES WIDGET */
.related-articles {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 2px solid var(--line);
}

.related-articles h3 {
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.related-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
  transition: all 0.3s ease;
}

.related-card:hover {
  border-color: var(--accent);
  background: var(--surface-strong);
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.15);
}

.related-card-img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}

.related-card-body {
  padding: 1rem;
}

.related-card h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  line-height: 1.3;
}

.related-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.4;
}

.related-card a {
  display: inline-block;
  margin-top: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.related-card a:hover {
  color: var(--brand);
  text-decoration: underline;
}

/* TABLE OF CONTENTS */
.toc {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 1.5rem;
  margin: 2rem 0;
  position: sticky;
  top: 100px;
  max-width: 100%;
}

.toc h4 {
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
  color: var(--text);
}

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

.toc li {
  margin: 0.4rem 0;
}

.toc a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s ease;
  display: block;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
}

.toc a:hover {
  color: var(--brand);
  background: var(--surface-strong);
  text-decoration: underline;
}

/* SOCIAL SHARE BUTTONS */
.share-buttons {
  display: flex;
  gap: 0.8rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.share-btn:hover {
  border-color: var(--accent);
  background: var(--surface-strong);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.15);
}

.share-btn-twitter {
  color: #1da1f2;
}

.share-btn-email {
  color: var(--gold);
}

.share-btn-copy {
  color: var(--brand);
}

/* CALLOUT BOXES */
.callout {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.05);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
}

.callout-title {
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.callout p {
  margin: 0;
  font-size: 0.95rem;
}

@media (max-width: 768px) {
  .article-meta {
    gap: 1rem;
  }

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

  .toc {
    position: static;
    margin: 1.5rem 0;
  }

  .breadcrumb {
    font-size: 0.85rem;
    padding: 0.6rem 0.8rem;
  }
}

/* =========================================================
   RESPONSIVE POLISH — keep desktop look & functionality
   consistent on tablets and phones.
   ========================================================= */

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

img, video, iframe {
  max-width: 100%;
  height: auto;
}

@media (max-width: 900px) {
  .container {
    width: min(1180px, calc(100% - 1.5rem));
  }

  .burger {
    position: static;
    margin-left: auto;
    top: auto;
    right: auto;
  }

  .navbar {
    padding: 0.6rem 0;
    gap: 0.5rem;
  }

  .brand img {
    width: 36px;
    height: 36px;
  }

  .brand-title {
    font-size: 1rem;
    max-width: calc(100vw - 7.5rem);
  }

  .nav-open .nav-links {
    top: calc(100% + 6px);
    right: 0.75rem;
    width: min(340px, calc(100vw - 1.5rem));
  }

  .hero-visual {
    aspect-ratio: auto;
    width: min(100%, 360px);
    height: 320px;
    margin: 1.25rem auto 0;
    justify-self: center;
  }

  .hero-art-composite {
    width: 100%;
    height: 100%;
    max-width: 320px;
    max-height: 320px;
    margin: 0 auto;
  }

  .floating-badge {
    font-size: 0.78rem;
    padding: 0.55rem 0.95rem;
  }

  .badge-1 { top: 6%; right: 2%; }
  .badge-2 { bottom: 6%; left: 2%; }

  .hero-trust {
    flex-wrap: wrap;
    gap: 1.2rem;
    margin-top: 1.8rem;
    padding: 1rem 1.4rem;
    justify-content: center;
  }

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

  .cta-box {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    padding: 2.4rem 1.4rem;
    gap: 1.8rem;
  }

  .cta-content {
    max-width: 100%;
    margin: 0 auto;
  }

  .cta-art {
    order: -1;
    width: 100%;
    height: auto;
    margin-bottom: 0.5rem;
  }

  .animated-globe {
    width: 150px;
    height: 150px;
  }

  .footer {
    padding: 2rem 0 1.5rem;
  }

  .footer .cols {
    grid-template-columns: 1fr 1fr;
    gap: 1.6rem 1.2rem;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    margin-top: 2rem;
  }

  .article-visual {
    margin: 1.5rem 0 !important;
    border-radius: 14px;
  }

  .ayah-highlight {
    padding: 2.4rem 1.4rem;
    border-radius: 22px;
  }

  .modal {
    padding: 4vh 0.6rem 0.6rem;
  }

  .modal-card {
    padding: 0.85rem;
    max-height: 88vh;
  }

  .modal-results {
    max-height: 70vh;
  }
}

@media (max-width: 640px) {
  .container {
    width: calc(100% - 1.5rem);
  }

  .section {
    padding: 2.2rem 0;
  }

  .navbar {
    padding: 0.55rem 0;
  }

  .brand-title {
    max-width: calc(100vw - 8rem);
    font-size: 0.95rem;
  }

  .burger {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
  }

  .nav-open .nav-links {
    right: 0.75rem;
    width: min(320px, calc(100vw - 1.5rem));
    max-height: calc(100vh - 4.5rem);
  }

  .nav-open .nav-links a,
  .nav-open .theme-toggle {
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
  }

  /* Hero spacing & art */
  .hero {
    padding: 1.4rem 0 2rem;
  }

  .hero h1,
  .page-hero h1 {
    font-size: clamp(2rem, 8vw, 2.6rem);
    line-height: 1.05;
  }

  .hero p,
  .page-hero p {
    font-size: 1rem;
  }

  .hero-eyebrow {
    font-size: 0.72rem;
    padding: 0.32rem 0.8rem;
    margin-bottom: 1rem;
  }

  .hero-visual {
    width: min(100%, 320px);
    height: 280px;
    margin-top: 0.4rem;
  }

  .hero-art-composite {
    max-width: 260px;
    max-height: 260px;
  }

  .floating-badge {
    font-size: 0.72rem;
    padding: 0.45rem 0.8rem;
    gap: 0.4rem;
  }

  .floating-badge .icon {
    font-size: 0.85rem;
  }

  .hero-trust {
    gap: 0.6rem 1.4rem;
    padding: 0.9rem 1rem;
    border-radius: 16px;
  }

  .trust-num {
    font-size: 1.25rem;
  }

  .trust-item span:last-child {
    font-size: 0.75rem;
  }

  /* Section heads */
  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  .section h2,
  .section-head h2 {
    font-size: 1.6rem;
  }

  /* Cards */
  .grid {
    gap: 1rem;
  }

  .card h3 {
    font-size: 1.05rem;
  }

  .card p {
    font-size: 0.95rem;
  }

  .category-card {
    padding: 1.6rem 1.2rem;
  }

  .card .btn,
  .category-card .btn {
    width: calc(100% - 2rem);
    margin-left: 1rem;
    margin-right: 1rem;
  }

  .category-card .btn {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  /* Article content */
  .content {
    width: calc(100% - 1.5rem);
    padding: 1.6rem 1.1rem;
    border-radius: 14px;
  }

  .content h1 { font-size: 1.8rem; }
  .content h2 { font-size: 1.35rem; }
  .content h3 { font-size: 1.15rem; }

  .content p,
  .content li {
    font-size: 1rem;
    line-height: 1.7;
  }

  .content .lead {
    font-size: 1.08rem;
  }

  .quote,
  .verse {
    padding: 1.1rem 1.1rem 1.1rem 1.3rem;
    border-radius: 12px;
  }

  .quote {
    font-size: 1rem;
  }

  .verse .ar {
    font-size: 1.7rem;
    line-height: 1.7;
  }

  .verse .sq {
    font-size: 1rem;
  }

  /* Page hero */
  .page-hero {
    padding: 2.4rem 1rem 2rem;
    min-height: auto;
  }

  .chips {
    gap: 0.4rem;
  }

  .chip {
    font-size: 0.72rem;
    padding: 0.3rem 0.6rem;
  }

  /* Ayah highlight */
  .ayah-highlight {
    padding: 2rem 1rem;
    border-radius: 18px;
  }

  .ayah-highlight .ar-big {
    font-size: clamp(1.8rem, 9vw, 2.6rem);
    line-height: 1.55;
  }

  .ayah-highlight .ayah-trans {
    font-size: 1rem;
  }

  .ayah-highlight .ayah-ref {
    font-size: 0.85rem;
  }

  /* CTA */
  .cta-box {
    padding: 2rem 1.1rem;
    border-radius: 18px;
  }

  .cta-content h2 {
    font-size: 1.5rem;
  }

  .cta-content p {
    font-size: 1rem;
  }

  .cta-art {
    width: 100%;
    height: 160px;
  }

  .animated-globe {
    width: 130px;
    height: 130px;
  }

  /* Footer */
  .footer {
    padding: 1.6rem 0 1.2rem;
  }

  .footer .cols {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }

  .footer-brand p {
    max-width: 100%;
  }

  .kicker a {
    font-size: 0.82rem;
    padding: 0.36rem 0.7rem;
  }

  .footer-bottom {
    margin-top: 1.5rem;
    padding-top: 1.1rem;
  }

  .footer-bottom .copy {
    font-size: 0.82rem;
    line-height: 1.5;
  }

  /* Buttons */
  .btn {
    padding: 0.7rem 1.2rem;
    font-size: 0.95rem;
  }

  /* Top-to-button */
  .top-btn {
    right: 12px;
    bottom: 12px;
    width: 42px;
    height: 42px;
  }

  /* Modal */
  .modal {
    padding: 3vh 0.5rem 0.5rem;
  }

  .modal-card {
    padding: 0.75rem;
    border-radius: 14px;
  }

  .modal-head {
    gap: 0.5rem;
  }

  .modal-head .theme-toggle {
    width: 100%;
    padding: 0.7rem 0.9rem;
  }

  .search-input-wrapper input {
    padding: 0.8rem 0.9rem 0.8rem 2.6rem;
  }

  .modal-results a {
    padding: 0.8rem 0.9rem;
  }

  .modal-results strong {
    font-size: 1rem;
  }

  .modal-results span {
    font-size: 0.85rem;
  }
}

/* Very small phones */
@media (max-width: 380px) {
  .brand-title {
    font-size: 0.85rem;
    max-width: calc(100vw - 7rem);
  }

  .hero h1,
  .page-hero h1 {
    font-size: 1.85rem;
  }

  .hero-visual {
    height: 240px;
  }

  .hero-art-composite {
    max-width: 220px;
    max-height: 220px;
  }

  .floating-badge {
    font-size: 0.68rem;
    padding: 0.4rem 0.7rem;
  }

  .ayah-highlight .ar-big {
    font-size: 1.6rem;
  }

  .verse .ar {
    font-size: 1.5rem;
  }
}

/* Make the mobile nav-toggle dropdown easier to dismiss
   and the burger always reachable above content */
@media (max-width: 900px) {
  .header {
    position: sticky;
    top: 0;
    z-index: 60;
  }

  .nav-open .nav-links {
    z-index: 65;
  }
}

/* Tap targets: ensure all interactive elements meet 44px on touch */
@media (hover: none) and (pointer: coarse) {
  .nav-links a,
  .theme-toggle,
  .text-btn,
  .kicker a,
  .chip,
  .copy-verse,
  .share-btn,
  .breadcrumb a {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
  }

  .card:hover {
    transform: none;
  }

  .card:hover .card-media img {
    transform: none;
  }
}

/* =========================================================
   MOBILE POLISH v2 — performance, native feel, iOS quirks
   ========================================================= */

/* Remove the default iOS tap highlight; we use our own feedback */
html {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

/* Respect notches and rounded corners on iOS / Android */
@supports (padding: env(safe-area-inset-top)) {
  .header {
    padding-top: env(safe-area-inset-top);
  }
  .footer {
    padding-bottom: max(2.2rem, env(safe-area-inset-bottom));
  }
  .top-btn {
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
  }
  .modal {
    padding-top: max(8vh, env(safe-area-inset-top));
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }
}

/* Prevent iOS auto-zoom by ensuring inputs are at least 16px */
@media (max-width: 900px) {
  .searchbar input,
  .modal-head input,
  .search-input-wrapper input {
    font-size: 16px;
  }
}

/* Smooth scroll respects sticky header */
html {
  scroll-padding-top: 72px;
}

@media (max-width: 640px) {
  html {
    scroll-padding-top: 64px;
  }
}

/* Active/tap feedback for buttons on touch devices */
@media (hover: none) and (pointer: coarse) {
  .btn:active,
  .theme-toggle:active,
  .nav-links a:active,
  .kicker a:active,
  .chip:active,
  .copy-verse:active,
  .share-btn:active,
  .text-btn:active {
    transform: scale(0.97);
    transition: transform 100ms ease;
  }

  /* Disable parallax/floating animations that cost battery */
  .floating-badge,
  .hero-art-composite,
  .hero::before,
  .hero-panel,
  .animated-globe,
  .ayah-highlight::before,
  .art-globe::before {
    animation: none !important;
  }

  /* Lighter blur on phones — backdrop-filter is expensive */
  .header,
  .card,
  .modal-card,
  .floating-badge,
  .hero-trust,
  .hero-eyebrow,
  .hero-panel,
  .content {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
}

/* Touch devices on tight screens: shrink heavy decorative bits */
@media (max-width: 640px) {
  /* Category cards in a tidy 2-column grid (still tap-friendly) */
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
  }

  .category-card {
    padding: 1.2rem 0.9rem;
  }

  .category-card h3 {
    font-size: 1rem;
    line-height: 1.25;
  }

  .category-card p {
    font-size: 0.85rem;
    line-height: 1.45;
    margin-bottom: 1rem;
  }

  .category-card .btn {
    font-size: 0.82rem;
    min-height: 38px;
    padding: 0.5rem 0.7rem;
  }

  /* Feature cards stay one-column for readability */
  .feature-grid {
    grid-template-columns: 1fr !important;
  }

  /* Cards with media: image first, content tidy */
  .card .card-media img {
    aspect-ratio: 16 / 10;
  }

  /* Active link on mobile gets a clearer pill */
  .nav-open .nav-links a.active {
    background: rgba(16, 185, 129, 0.18);
    border-color: rgba(16, 185, 129, 0.5);
  }

  /* Trust strip becomes a clean two-column stat block */
  .hero-trust {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem 1.2rem;
    width: 100%;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    justify-content: stretch;
  }

  .hero-trust .trust-divider {
    display: none;
  }

  .trust-item {
    align-items: center;
  }

  /* Make the search modal feel native — full-bleed sheet */
  .modal {
    align-items: stretch;
    padding: 0;
  }

  .modal-card {
    width: 100%;
    max-width: 100%;
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
    padding: max(1rem, env(safe-area-inset-top)) 0.9rem 0.9rem;
  }

  .modal-results {
    max-height: calc(100vh - 7rem);
  }

  /* Bigger close target inside the modal */
  .modal-head [data-close-search] {
    min-height: 44px;
    font-weight: 700;
  }

  /* Hide the orbit composite on the smallest screens — it's pure
     decoration and the hero already communicates the message */
  .hero-art-composite .orbit,
  .hero-art-composite .art-ring {
    opacity: 0.55;
  }

  /* Article visual takes the full container width comfortably */
  .article-visual {
    margin-left: 0;
    margin-right: 0;
  }

  .article-visual img {
    max-height: 260px;
  }

  /* Long Arabic text wraps cleanly */
  .verse .ar,
  .ayah-highlight .ar-big {
    overflow-wrap: break-word;
    word-break: normal;
  }
}

@media (max-width: 380px) {
  /* On very small phones a single column reads better */
  .grid {
    grid-template-columns: 1fr;
  }

  /* Drop the decorative hero composite altogether on tiny screens */
  .hero-visual {
    display: none;
  }
}

/* Limit how tall the hero can grow on landscape phones so the
   hero content is reachable without scrolling forever */
@media (max-height: 560px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: 1rem 0 1.4rem;
  }

  .hero h1,
  .page-hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.4rem);
  }

  .hero-visual {
    display: none;
  }

  .page-hero {
    min-height: auto;
    padding: 1.6rem 1rem 1.2rem;
  }
}

/* Avoid double scrollbars when the search modal is open on mobile */
body:has(.modal.open) {
  overflow: hidden;
}

/* Sticky bottom “Kthehu lart” button stays clear of iOS gesture bar */
.top-btn {
  bottom: max(16px, env(safe-area-inset-bottom, 16px));
}

/* Smoother momentum scrolling inside scrollable areas on iOS */
.modal-results,
.nav-open .nav-links {
  -webkit-overflow-scrolling: touch;
}

/* Reduce contrast/visual noise of the animated rings for users who
   prefer less motion — covered by prefers-reduced-motion above, but
   make doubly sure orbits stop spinning */
@media (prefers-reduced-motion: reduce) {
  .orbit,
  .art-ring,
  .art-globe::before,
  .animated-globe,
  .floating-badge,
  .hero-art-composite {
    animation: none !important;
  }
}

/* =========================================================
   GLOBAL POLISH v3 — desktop refinement + cross-platform feel
   ========================================================= */

/* Smoother theme switching: animate the background / text colour
   when the user toggles dark/light instead of a hard flash */
body,
.header,
.footer,
.card,
.content,
.modal-card,
.hero-trust,
.btn-ghost,
.kicker a,
.chip {
  transition:
    background-color 240ms ease,
    color 240ms ease,
    border-color 240ms ease,
    box-shadow 240ms ease;
}

/* Honour reduced motion for the new theme transitions too */
@media (prefers-reduced-motion: reduce) {
  body,
  .header,
  .footer,
  .card,
  .content,
  .modal-card {
    transition: none;
  }
}

/* ---------- Typography rhythm ---------- */

body {
  font-feature-settings: "kern" 1, "liga" 1;
  letter-spacing: -0.005em;
}

.content p,
.content li {
  /* Slightly tighter line-height than the global 1.8 reads better */
  line-height: 1.72;
}

.content h2,
.content h3,
.content h4 {
  letter-spacing: -0.015em;
}

/* Keep long-form articles within a comfortable reading measure even
   when the container itself is wider */
.content {
  max-width: 760px;
}

/* ---------- Focus rings (keyboard accessibility) ---------- */

:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--brand-glow), 0 0 0 4px rgba(255, 255, 255, 0.1);
  border-radius: inherit;
}

html[data-theme="light"] :focus-visible {
  box-shadow: 0 0 0 3px var(--brand-glow), 0 0 0 4px rgba(15, 23, 42, 0.08);
}

/* Skip-link helper (works if you ever add <a class="skip-link" href="#main">) */
.skip-link {
  position: absolute;
  top: -40px;
  left: 1rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  background: var(--brand);
  color: #04130c;
  font-weight: 700;
  transition: top 200ms ease;
}

.skip-link:focus-visible {
  top: 0.6rem;
}

/* ---------- Custom scrollbar (desktop only) ---------- */

@media (hover: hover) and (pointer: fine) {
  * {
    scrollbar-width: thin;
    scrollbar-color: rgba(160, 165, 181, 0.45) transparent;
  }

  *::-webkit-scrollbar {
    width: 10px;
    height: 10px;
  }

  *::-webkit-scrollbar-track {
    background: transparent;
  }

  *::-webkit-scrollbar-thumb {
    background-color: rgba(160, 165, 181, 0.35);
    border: 2px solid transparent;
    background-clip: padding-box;
    border-radius: 999px;
  }

  *::-webkit-scrollbar-thumb:hover {
    background-color: rgba(16, 185, 129, 0.55);
    background-clip: padding-box;
  }
}

/* ---------- Desktop hover refinement ---------- */

@media (hover: hover) and (pointer: fine) {
  /* Cards: tighter, more elegant lift than the old translateY(-8px) */
  .card {
    transition:
      transform 280ms cubic-bezier(0.2, 0.6, 0.2, 1),
      box-shadow 280ms ease,
      border-color 280ms ease;
  }

  .card:hover {
    transform: translateY(-4px);
  }

  /* Nav links: subtle underline grow */
  .nav-links a {
    position: relative;
  }

  .nav-links a::after {
    content: "";
    position: absolute;
    left: 50%;
    right: 50%;
    bottom: 4px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--brand), var(--accent));
    transition: left 220ms ease, right 220ms ease, opacity 220ms ease;
    opacity: 0;
  }

  .nav-links a:hover::after,
  .nav-links a.active::after {
    left: 18%;
    right: 18%;
    opacity: 1;
  }

  /* Buttons: subtle inner glow on hover for both gradients */
  .btn:hover {
    filter: brightness(1.05);
  }
}

/* ---------- Tablet breakpoint (between phone and desktop) ---------- */

@media (min-width: 641px) and (max-width: 1024px) {
  .container {
    width: min(1180px, calc(100% - 2rem));
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
    text-align: center;
  }

  .hero-copy {
    align-items: center;
  }

  .hero h1 {
    font-size: clamp(2.6rem, 6vw, 4.2rem);
  }

  .hero-visual {
    aspect-ratio: auto;
    width: min(100%, 460px);
    height: 380px;
    margin: 0 auto;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
    gap: 1.1rem;
  }

  .feature-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  .cta-box {
    padding: 3rem 2rem;
    gap: 2rem;
  }

  .footer .cols {
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 1.4rem;
  }
}

/* ---------- Big desktop: prevent overly-wide reading lines ---------- */

@media (min-width: 1400px) {
  .container {
    width: min(1240px, calc(100% - 2rem));
  }

  .hero h1 {
    font-size: clamp(3.6rem, 6vw, 5.6rem);
  }

  .section h2,
  .section-head h2 {
    font-size: clamp(1.9rem, 2.4vw, 2.6rem);
  }
}

/* ---------- Selection colour matches the brand ---------- */

::selection {
  background: rgba(16, 185, 129, 0.35);
  color: var(--text);
}

html[data-theme="light"] ::selection {
  background: rgba(16, 185, 129, 0.25);
  color: #0f172a;
}

/* ---------- Image loading shimmer (subtle) ---------- */

.card-media,
.article-visual {
  background:
    linear-gradient(
      90deg,
      var(--surface) 0%,
      var(--surface-strong) 50%,
      var(--surface) 100%
    );
  background-size: 200% 100%;
}

@media (prefers-reduced-motion: no-preference) {
  .card-media,
  .article-visual {
    animation: shimmer 2.4s ease-in-out infinite;
  }

  .card-media img,
  .article-visual img {
    animation: fadeIn 400ms ease both;
  }

  @keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
  }

  @keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
  }
}

/* When the image is fully loaded the shimmer should not be visible
   behind it — once the <img> covers the slot, the background is hidden */
.card-media img,
.article-visual img {
  position: relative;
  z-index: 1;
}

/* ---------- Light theme refinement ---------- */

html[data-theme="light"] .card {
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 12px 30px -16px rgba(15, 23, 42, 0.15);
}

html[data-theme="light"] .card:hover {
  box-shadow:
    0 4px 10px rgba(15, 23, 42, 0.06),
    0 20px 40px -18px rgba(16, 185, 129, 0.35);
}

html[data-theme="light"] .footer {
  color: #475569;
}

html[data-theme="light"] .ayah-highlight {
  background: linear-gradient(135deg, #f8fafc, #eef2f7);
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 30px 60px -20px rgba(15, 23, 42, 0.18);
}

html[data-theme="light"] .ayah-highlight .ar-big {
  color: #0f172a;
  text-shadow: none;
}

html[data-theme="light"] .ayah-highlight .ayah-trans {
  color: #334155;
}

/* ---------- Print: simple, readable, no decoration ---------- */

@media print {
  .header,
  .footer,
  .top-btn,
  .modal,
  #progress,
  .hero-visual,
  .cta-box,
  .ayah-highlight::before,
  .chips,
  .share-buttons,
  .related-articles {
    display: none !important;
  }

  body {
    background: #fff !important;
    color: #000 !important;
  }

  .content,
  .page-hero,
  .hero {
    background: #fff !important;
    color: #000 !important;
    border: none !important;
    box-shadow: none !important;
  }

  .content a {
    color: #000 !important;
    text-decoration: underline;
  }

  .verse,
  .quote {
    border: 1px solid #ccc !important;
    background: #fafafa !important;
    page-break-inside: avoid;
  }

  h1, h2, h3 {
    page-break-after: avoid;
  }
}

/* =========================================================
   EDITORIAL TYPOGRAPHY v4 — fix word-breaking, premium reading
   This block is intentionally the LAST typography declaration
   so it overrides anything earlier in the file.
   ========================================================= */

/* 1. Global defaults: never split words mid-word for Albanian/Latin text.
      `overflow-wrap: break-word` only breaks tokens that genuinely don't
      fit (long URLs, code), never normal words. Hyphenation is OFF. */
html,
body,
p,
li,
h1, h2, h3, h4, h5, h6,
blockquote,
figcaption,
.content,
.content p,
.content li,
.content h1,
.content h2,
.content h3,
.content h4,
.hero p,
.hero h1,
.page-hero p,
.page-hero h1,
.card p,
.card h3,
.feature-card p,
.feature-card h3,
.section-head p,
.section h2,
.cta-content p,
.cta-content h2,
.ayah-highlight .ayah-trans,
.ayah-highlight .ayah-ref,
.quote,
.verse .sq,
.footer p,
.footer h4 {
  word-break: normal;
  overflow-wrap: break-word;
  -webkit-hyphens: manual;
  hyphens: manual;
}

/* 2. Set the document language hint for shaping where the browser uses it.
      Albanian articles already have <html lang="sq">. Tell the renderer. */
:root {
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

/* 3. Article container — premium editorial measure (~65-72 characters
      per line is the proven sweet spot). Keep generous side gutters so
      text never kisses the screen edge on mobile. */
.content {
  max-width: 72ch;
  width: min(72ch, calc(100% - 2rem));
  padding-left: clamp(1.25rem, 4vw, 3rem);
  padding-right: clamp(1.25rem, 4vw, 3rem);
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
}

/* 4. Paragraph rhythm — calm, generous, consistent. */
.content > p,
.content .lead {
  margin: 0 0 1.15em;
  line-height: 1.7;
  color: color-mix(in srgb, var(--text), var(--muted) 8%);
  font-size: 1.075rem;
}

.content .lead {
  font-size: 1.22rem;
  line-height: 1.55;
  color: var(--text);
  font-weight: 500;
  margin-bottom: 1.6rem;
}

/* 5. Headings inside articles — balanced wrap so titles break into
      visually even lines (supported in Chrome/Safari 17+/FF 121+).
      Falls back gracefully where unsupported. */
.content h1,
.content h2,
.content h3,
.content h4,
.section h2,
.section-head h2,
.hero h1,
.page-hero h1,
.cta-content h2,
.ayah-highlight .ayah-trans {
  text-wrap: balance;
  letter-spacing: -0.012em;
}

/* 6. Body paragraphs — `text-wrap: pretty` avoids orphans/widows by
      reflowing the last few lines for a polished look. */
.content > p,
.content > .lead,
.card p,
.feature-card p,
.section-head p,
.cta-content p {
  text-wrap: pretty;
}

/* 7. Heading spacing — clear hierarchy, no cramped collisions. */
.content h2 {
  margin: 2.4rem 0 0.9rem;
  font-size: clamp(1.55rem, 2.2vw, 1.9rem);
  line-height: 1.25;
}

.content h3 {
  margin: 1.9rem 0 0.7rem;
  font-size: clamp(1.2rem, 1.6vw, 1.35rem);
  line-height: 1.3;
}

.content h4 {
  margin: 1.5rem 0 0.6rem;
  font-size: 1.08rem;
}

/* 8. Lists — same comfortable rhythm as paragraphs. */
.content ul,
.content ol {
  margin: 0.4rem 0 1.4rem 1.35rem;
  padding: 0;
}

.content li {
  margin: 0.55rem 0;
  line-height: 1.7;
  text-wrap: pretty;
}

.content li::marker {
  color: var(--brand);
}

/* 9. Quote / verse — premium pull-quote feel, no cramped padding. */
.content .quote,
.content .verse {
  margin: 2rem 0;
  padding: 1.4rem 1.6rem 1.4rem 1.9rem;
  border-radius: 14px;
  line-height: 1.6;
}

.content .quote p,
.content .verse p {
  margin: 0.45rem 0;
}

/* 10. Links — clear, never the cause of layout breaks. */
.content a {
  word-break: normal;
  overflow-wrap: anywhere; /* only matters for very long URLs */
}

/* 11. Tables — never overflow the column on small screens. */
.content table {
  display: block;
  overflow-x: auto;
  max-width: 100%;
}

/* 12. Mobile reading: keep side gutters generous, never let text kiss
       the screen edge. Slightly tighter heading scale. */
@media (max-width: 640px) {
  .content {
    width: min(100%, 100vw);
    padding-left: clamp(1.1rem, 5vw, 1.4rem);
    padding-right: clamp(1.1rem, 5vw, 1.4rem);
    border-radius: 14px;
  }

  .content > p,
  .content .lead,
  .content li {
    font-size: 1.02rem;
    line-height: 1.68;
  }

  .content .lead {
    font-size: 1.12rem;
    line-height: 1.55;
  }

  .content h2 {
    font-size: 1.35rem;
    margin-top: 2rem;
  }

  .content h3 {
    font-size: 1.12rem;
    margin-top: 1.6rem;
  }

  .content .quote,
  .content .verse {
    margin: 1.4rem 0;
    padding: 1.1rem 1.1rem 1.1rem 1.4rem;
  }
}

/* 13. Hero / section headings — balanced wrap, never break mid-word. */
.hero h1,
.page-hero h1,
.section h2,
.section-head h2,
.cta-content h2 {
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* 14. Final guard: anything that previously asked the browser to
       break-anywhere (a side effect of older overflow rules) is
       neutralised inside readable copy. */
.content,
.content *:not(pre):not(code):not(a),
.card p,
.feature-card p,
.section-head p {
  word-break: normal !important;
  overflow-wrap: break-word !important;
}

/* =========================================================
   CARD OVERFLOW GUARD — buttons + media must respect the card.
   ========================================================= */

/* Cards are flex containers; their children must be allowed to
   shrink, otherwise long words or wide buttons push the layout. */
.card,
.feature-card,
.category-card {
  min-width: 0;
  overflow: hidden;
}

.card > *,
.feature-card > *,
.feature-card .card-body > * {
  min-width: 0;
  max-width: 100%;
}

/* The button is the most common offender — make it impossible
   for it to extend past the card's inner box, on every screen. */
.card .btn,
.feature-card .btn,
.category-card .btn {
  box-sizing: border-box;
  max-width: 100%;
  width: auto;          /* shrink to label by default */
  align-self: flex-start;
}

/* Where we want a full-width call-to-action inside a card, account
   for the 1rem horizontal margins so the button fits perfectly. */
.card .btn.btn-block,
.feature-card .btn.btn-block {
  width: calc(100% - 2rem);
  margin-left: 1rem;
  margin-right: 1rem;
  align-self: stretch;
}

/* Mobile: cards with side gutters of 1rem — button width respects them.
   Category cards stretch fully (no inner margins). */
@media (max-width: 640px) {
  .card .btn {
    width: calc(100% - 2rem);
    margin-left: 1rem;
    margin-right: 1rem;
    align-self: stretch;
  }

  .category-card .btn {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    align-self: stretch;
  }

  /* Long topic titles must wrap inside the card on tight screens */
  .card h3,
  .feature-card h3,
  .category-card h3 {
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: manual;
  }
}

/* Images inside cards never exceed the card width */
.card img,
.feature-card img,
.card-media img {
  max-width: 100%;
  height: auto;
}

/* =========================================================
   LIGHTBOX (article image zoom) + clearer active-nav indicator
   ========================================================= */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(4, 6, 10, 0.88);
  padding: clamp(1rem, 4vw, 3rem);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 200ms ease;
}

.lightbox.open {
  display: flex;
  opacity: 1;
}

.lightbox img {
  max-width: min(1200px, 96vw);
  max-height: 88vh;
  width: auto;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
  animation: lightboxIn 240ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

@keyframes lightboxIn {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

.lightbox-close {
  position: absolute;
  top: max(0.9rem, env(safe-area-inset-top));
  right: max(0.9rem, env(safe-area-inset-right));
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  background: rgba(15, 18, 24, 0.7);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: background 160ms ease, transform 160ms ease;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
  background: rgba(15, 18, 24, 0.9);
  transform: scale(1.05);
  outline: none;
}

html[data-theme="light"] .lightbox {
  background: rgba(15, 23, 42, 0.78);
}

@media (prefers-reduced-motion: reduce) {
  .lightbox,
  .lightbox img {
    animation: none;
    transition: none;
  }
}

/* Hint for clickable article images */
.article-visual {
  cursor: zoom-in;
}

/* Clearer active-nav pill (desktop) — uses a soft brand background plus the
   animated underline added in v3. Better visibility against busy backgrounds. */
@media (hover: hover) and (pointer: fine) {
  .nav-links a.active {
    color: var(--brand);
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.35);
    font-weight: 700;
  }

  .nav-links a.active::after {
    left: 22%;
    right: 22%;
    opacity: 1;
  }
}

/* Mobile: the inline dropdown gets a softer fill for the active item */
@media (max-width: 900px) {
  .nav-open .nav-links a.active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(59, 130, 246, 0.12));
    border-color: rgba(16, 185, 129, 0.45);
    color: var(--brand);
    font-weight: 700;
  }
}

/* =========================================================
   MOBILE HOMEPAGE REDESIGN v5
   - Keep ALL hero animations alive on phones (globe spins,
     orbits revolve, badges float). Earlier disables removed.
   - Tighter editorial spacing, better hierarchy
   - GPU-friendly: composited transforms, will-change hints
   ========================================================= */

/* 1. Re-enable the animations on touch devices.
      This overrides the blanket "animation: none" from v2. */
@media (hover: none) and (pointer: coarse) {
  .hero-art-composite,
  .floating-badge,
  .art-globe::before,
  .animated-globe,
  .ayah-highlight::before,
  .orbit,
  .art-ring {
    animation-duration: inherit !important;
    animation-play-state: running !important;
  }

  .hero-art-composite { animation: floatAmbient 15s ease-in-out infinite alternate !important; }
  .badge-1 { animation: floatAmbient 6s ease-in-out infinite alternate !important; }
  .badge-2 { animation: floatAmbient 7s ease-in-out infinite alternate-reverse !important; }
  .art-ring-1 { animation: spinDash 30s linear infinite !important; }
  .art-ring-2 { animation: spinDash 45s linear infinite reverse !important; }
  .orbit-1 { animation: spinOrbit 45s linear infinite !important; }
  .orbit-2 { animation: spinOrbit 80s linear infinite reverse !important; }
  .orbit-3 { animation: spinOrbit 120s linear infinite !important; }
  .art-globe::before { animation: spinDash 600s linear infinite !important; }
  .animated-globe { animation: floatGlobe 6s ease-in-out infinite !important; }
  .animated-globe::before { animation: spinDash 20s linear infinite !important; }
}

/* 2. GPU-friendly: promote animated layers so the phone composites
      them rather than repainting every frame. */
.hero-art-composite,
.orbit,
.art-ring,
.art-globe,
.animated-globe,
.floating-badge {
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* 3. Make sure the hero composite is NEVER hidden on tiny screens. */
@media (max-width: 380px) {
  .hero-visual {
    display: grid !important;
  }
}

/* Landscape phones: keep the globe visible but smaller. */
@media (max-height: 560px) and (orientation: landscape) {
  .hero-visual {
    display: grid !important;
    width: min(40vw, 240px);
    height: min(40vh, 220px);
    margin: 0 auto;
  }
  .hero-art-composite {
    max-width: 220px;
    max-height: 220px;
  }
}

/* 4. Hero — premium mobile layout.
      - Tighter, magazine-style hierarchy: eyebrow → headline → lede → CTAs → trust → art
      - Bigger but balanced headline using clamp(min, fluid, max)
      - Generous side gutters; nothing kisses the edge */
@media (max-width: 900px) {
  .hero {
    min-height: auto;
    padding: 1.8rem 0 2.6rem;
    background-position: center top;
  }

  .hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.8rem;
    align-items: start;
    text-align: center;
  }

  .hero-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .hero-eyebrow {
    width: max-content;
    max-width: 100%;
    margin-bottom: 0;
    font-size: 0.74rem;
    padding: 0.4rem 0.95rem;
    letter-spacing: 0.08em;
  }

  .hero h1 {
    font-size: clamp(2.4rem, 9.5vw, 3.6rem);
    line-height: 1.02;
    margin: 0;
    letter-spacing: -0.02em;
  }

  .hero p {
    margin: 0 auto;
    max-width: 38ch;
    font-size: 1.04rem;
    line-height: 1.55;
    color: color-mix(in srgb, var(--text), var(--muted) 12%);
  }

  .hero-actions {
    margin-top: 0.4rem;
    width: 100%;
    max-width: 360px;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
  }

  .hero-actions .btn {
    width: 100%;
    min-height: 50px;
    font-size: 1rem;
    padding: 0.85rem 1.1rem;
  }

  .hero-trust {
    margin: 1.4rem auto 0;
    width: 100%;
    max-width: 360px;
    padding: 0.95rem 1.2rem;
    display: grid;
    grid-template-columns: 1fr 1px 1fr;
    align-items: center;
    gap: 0 0.8rem;
    border-radius: 18px;
  }

  .hero-trust .trust-divider {
    display: block;
    height: 30px;
    width: 1px;
    background: var(--line);
  }

  .hero-trust .trust-item {
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
  }

  .trust-num {
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .trust-item span:last-child {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
  }

  /* Hero visual — stays visible & animated. The composite sits below
     the copy and gets its own breathing room. */
  .hero-visual {
    display: grid;
    place-items: center;
    width: min(86vw, 360px);
    height: min(86vw, 360px);
    margin: 0.4rem auto 0;
    aspect-ratio: 1 / 1;
    position: relative;
  }

  .hero-art-composite {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    margin: 0;
  }

  /* Globe slightly larger on phones so the spinning Earth reads */
  .art-globe {
    width: 62%;
    height: 62%;
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.35);
  }

  /* Floating badges: reposition inside the composite frame */
  .floating-badge {
    padding: 0.45rem 0.85rem;
    font-size: 0.74rem;
    border-radius: 999px;
  }
  .badge-1 { top: 4%; right: 0%; }
  .badge-2 { bottom: 4%; left: 0%; }
}

/* 5. Common mobile widths (360 / 390 / 414 / 430px) — fine-tune
      the hero so it never looks cramped or sparse. */
@media (max-width: 430px) {
  .hero h1 {
    font-size: clamp(2.2rem, 10vw, 3rem);
  }
  .hero p {
    font-size: 1rem;
  }
  .hero-visual {
    width: min(82vw, 320px);
    height: min(82vw, 320px);
  }
  .hero-trust {
    padding: 0.85rem 1rem;
  }
  .trust-num {
    font-size: 1.45rem;
  }
}

@media (max-width: 380px) {
  .hero {
    padding: 1.4rem 0 2.2rem;
  }
  .hero h1 {
    font-size: 2rem;
  }
  .hero-eyebrow {
    font-size: 0.68rem;
  }
  .hero-visual {
    width: min(80vw, 280px);
    height: min(80vw, 280px);
  }
  .floating-badge { font-size: 0.68rem; padding: 0.4rem 0.7rem; }
}

/* 6. Section rhythm on mobile — distinct, calm, never cramped. */
@media (max-width: 640px) {
  .section {
    padding: 2.6rem 0;
  }

  .section-head {
    margin-bottom: 1.4rem;
    align-items: flex-start;
  }

  .section-badge {
    font-size: 0.72rem;
    padding: 0.28rem 0.7rem;
    margin-bottom: 0.55rem;
  }

  .section h2,
  .section-head h2 {
    font-size: clamp(1.55rem, 6vw, 1.9rem);
    line-height: 1.18;
    margin-bottom: 0.4rem;
    letter-spacing: -0.015em;
  }

  .section-head p {
    font-size: 0.98rem;
    line-height: 1.55;
    color: var(--muted);
  }

  /* Category cards: refined two-column grid */
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
  }

  .category-card {
    padding: 1.3rem 0.9rem 1.1rem;
    border-radius: 16px;
    text-align: center;
  }

  .category-card h3 {
    font-size: 1rem;
    line-height: 1.25;
    margin: 0.25rem 0 0.45rem;
  }

  .category-card p {
    font-size: 0.82rem;
    line-height: 1.45;
    color: color-mix(in srgb, var(--text), var(--muted) 22%);
    margin: 0 0 1rem;
  }

  .category-card .btn {
    font-size: 0.82rem;
    min-height: 40px;
    padding: 0.55rem 0.7rem;
    font-weight: 700;
  }

  /* Feature cards (single column, magazine-style) */
  .feature-grid {
    grid-template-columns: 1fr !important;
    gap: 1.1rem;
  }

  .feature-card .card-body {
    padding: 1.2rem 1.15rem 1.3rem;
  }

  .feature-card h3 {
    font-size: 1.18rem;
    line-height: 1.25;
    margin-bottom: 0.5rem;
  }

  .feature-card p {
    font-size: 0.95rem;
    line-height: 1.55;
    margin-bottom: 1.1rem;
    color: color-mix(in srgb, var(--text), var(--muted) 18%);
  }

  .feature-card .card-media img {
    aspect-ratio: 16 / 10;
  }

  .media-badge {
    top: 0.7rem;
    right: 0.7rem;
    font-size: 0.7rem;
    padding: 0.24rem 0.65rem;
  }

  /* Ayah highlight — calm, centered, glassy */
  .ayah-highlight {
    margin: 0 0.1rem;
    padding: 2.2rem 1.2rem;
    border-radius: 22px;
  }

  .ayah-tag {
    font-size: 0.7rem;
    padding: 0.3rem 0.85rem;
    margin-bottom: 1.2rem;
    letter-spacing: 0.12em;
  }

  .ayah-highlight .ar-big {
    font-size: clamp(1.9rem, 8.5vw, 2.5rem);
    line-height: 1.6;
    margin-bottom: 1.1rem;
  }

  .ayah-highlight .ayah-trans {
    font-size: 1.02rem;
    line-height: 1.55;
    max-width: 32ch;
    margin: 0 auto 0.9rem;
  }

  .ayah-highlight .ayah-ref {
    font-size: 0.82rem;
    margin-bottom: 1.6rem;
  }

  .ayah-highlight .btn {
    width: 100%;
    max-width: 280px;
  }

  /* CTA box — stacked, globe stays animated */
  .cta-box {
    padding: 2rem 1.2rem 2.2rem;
    border-radius: 22px;
    gap: 1.4rem;
  }

  .cta-content h2 {
    font-size: 1.45rem;
    line-height: 1.22;
    margin-bottom: 0.7rem;
  }

  .cta-content p {
    font-size: 0.96rem;
    line-height: 1.55;
    margin-bottom: 1.4rem;
  }

  .cta-content .btn {
    width: 100%;
    max-width: 280px;
  }

  .cta-art {
    width: 100%;
    height: 150px;
    margin-bottom: 0.4rem;
  }

  .animated-globe {
    width: 130px;
    height: 130px;
  }
}

/* 7. Tablet (641-900px) tweaks: hero composite alongside text again */
@media (min-width: 641px) and (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
    text-align: left;
    gap: 2.2rem;
  }
  .hero-copy {
    align-items: flex-start;
  }
  .hero h1 {
    font-size: clamp(2.8rem, 6vw, 4rem);
  }
  .hero p {
    max-width: 38ch;
    margin: 0;
  }
  .hero-actions {
    width: auto;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .hero-actions .btn {
    width: auto;
    min-width: 180px;
  }
  .hero-trust {
    margin-left: 0;
    margin-right: 0;
  }
  .hero-visual {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    max-width: 380px;
  }
}
