:root {
  color-scheme: light;
  --ink: #17231f;
  --muted: #5d6b66;
  --line: #dce5e0;
  --paper: #f7faf7;
  --white: #ffffff;
  --green: #1c7655;
  --green-dark: #124b39;
  --blue: #245b7a;
  --amber: #d99638;
  --soft-green: #eaf3ee;
  --soft-blue: #eaf2f6;
  --soft-amber: #fbf2e1;
  --shadow: 0 24px 70px rgba(23, 35, 31, 0.12);
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-urdu: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", "Nafees Nastaleeq", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
}

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

a {
  color: inherit;
}

[lang="ur"],
[dir="rtl"] {
  font-family: var(--font-urdu);
  line-height: 2;
  font-feature-settings: "kern" 1, "calt" 1;
}

h1[lang="ur"],
h2 span[lang="ur"],
h3[lang="ur"] {
  line-height: 1.7;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 0 32px;
  border-bottom: 1px solid rgba(220, 229, 224, 0.84);
  background: rgba(247, 250, 247, 0.92);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--green-dark);
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 650;
}

.nav a,
.nav-action,
.shorts-meta a {
  text-decoration: none;
}

.nav a:hover,
.nav-action:hover,
.shorts-meta a:hover {
  color: var(--green);
}

.nav-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--green-dark);
  border-radius: 6px;
  color: var(--green-dark);
  font-size: 0.94rem;
  font-weight: 800;
}

/* Hero */
.hero {
  width: min(1220px, calc(100% - 48px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  align-items: stretch;
  gap: 48px;
  padding: 80px 0 56px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 760px;
}

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

.hero-eyebrow {
  margin-bottom: 12px;
  color: var(--amber);
  font-size: 1rem;
  font-weight: 700;
}

h1[lang="ur"] {
  margin-bottom: 22px;
  color: var(--green-dark);
  font-size: clamp(2.6rem, 5.8vw, 4.6rem);
  font-weight: 700;
}

.hero-sub {
  max-width: 640px;
  margin-bottom: 30px;
  color: #344540;
  font-size: clamp(1.05rem, 1.5vw, 1.22rem);
  line-height: 1.62;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--green-dark);
  border-radius: 6px;
  background: var(--green-dark);
  color: var(--white);
  font-weight: 800;
  text-decoration: none;
}

.button-secondary {
  background: transparent;
  color: var(--green-dark);
}

/* Hero card (right column) */
.hero-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(160deg, var(--soft-green), var(--white) 70%);
  box-shadow: var(--shadow);
}

.hero-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hero-card-tag {
  color: var(--amber);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.hero-card-count {
  color: var(--green-dark);
  font-size: 0.88rem;
  font-weight: 700;
}

.hero-card-title {
  margin: 0;
  color: var(--green-dark);
  font-size: clamp(1.6rem, 2.4vw, 2rem);
  font-weight: 700;
}

.hero-card-sub {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.hero-card-list {
  margin: 8px 0 0;
  padding-right: 18px;
  padding-left: 0;
  list-style: none;
  color: var(--ink);
  font-size: 1.05rem;
}

.hero-card-list li {
  position: relative;
  padding-right: 22px;
  padding-bottom: 6px;
}

.hero-card-list li::before {
  content: "";
  position: absolute;
  top: 0.95em;
  right: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

/* Section shell */
.shorts,
.topics,
.questions,
.about,
.newsletter,
.notice,
.site-footer {
  width: min(1220px, calc(100% - 48px));
  margin-right: auto;
  margin-left: auto;
}

.shorts,
.topics,
.questions,
.about {
  padding: 68px 0;
  border-top: 1px solid var(--line);
}

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

.section-heading > span,
.article-label,
.topic-number {
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.section-heading h2 {
  max-width: 820px;
  margin-bottom: 0;
  color: var(--green-dark);
  font-size: clamp(1.7rem, 2.8vw, 2.6rem);
  line-height: 1.15;
}

.section-heading h2 small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: clamp(0.95rem, 1.2vw, 1.05rem);
  font-weight: 500;
  line-height: 1.5;
}

/* Topics */
.topics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.topics-grid article {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 240px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
}

.topics-grid article:nth-child(2) {
  background: var(--soft-blue);
}

.topics-grid article:nth-child(3) {
  background: var(--soft-amber);
}

.topics-grid article:nth-child(4) {
  background: var(--soft-green);
}

.topic-number {
  margin-bottom: 12px;
}

.topics-grid h3 {
  margin: 0;
  color: var(--green-dark);
  font-size: 1.6rem;
  font-weight: 700;
}

.topic-en {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.topics-grid p:not(.topic-en) {
  flex: 1;
  margin: 0;
  color: var(--ink);
  font-size: 1.02rem;
}

/* Questions */
.questions-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.questions-grid article {
  min-height: 200px;
  padding: 22px;
  border-right: 3px solid var(--green);
  border-radius: 8px;
  background: var(--white);
}

.questions-grid h3 {
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 700;
}

.questions-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

/* Shorts */
.shorts-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
  color: var(--muted);
}

.shorts-meta p {
  margin: 0;
  line-height: 1.5;
}

.shorts-meta a {
  flex: 0 0 auto;
  color: var(--green-dark);
  font-weight: 850;
}

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

.short-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  box-shadow: 0 14px 34px rgba(23, 35, 31, 0.06);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.short-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(23, 35, 31, 0.12);
}

.short-card a {
  display: grid;
  color: inherit;
  text-decoration: none;
}

.short-card img {
  width: 100%;
  aspect-ratio: 9 / 16;
  background: var(--soft-green);
  object-fit: cover;
}

.short-card-missing-image a::before {
  content: "Mastering Essentials";
  display: grid;
  place-items: center;
  aspect-ratio: 9 / 16;
  background: linear-gradient(135deg, rgba(18, 75, 57, 0.94), rgba(36, 91, 122, 0.82)),
    var(--green-dark);
  color: var(--white);
  font-size: 1.05rem;
  font-weight: 850;
}

.short-card .watch-label {
  margin: 14px 16px 6px;
  color: var(--amber);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.short-card h3 {
  min-height: 88px;
  margin: 0;
  padding: 0 16px 18px;
  color: var(--ink);
  font-family: var(--font-urdu);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.85;
  direction: rtl;
  text-align: right;
}

/* Latin-leading titles look better in sans */
.short-card h3.lang-en {
  font-family: var(--font-sans);
  font-size: 1.02rem;
  line-height: 1.3;
  direction: ltr;
  text-align: left;
}

/* About */
.about {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1fr);
  gap: 48px;
}

.about h2 {
  margin: 10px 0 0;
  color: var(--green-dark);
}

.about-copy {
  display: grid;
  gap: 18px;
}

.about-copy p {
  margin: 0;
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* Newsletter */
.newsletter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.6fr);
  gap: 36px;
  align-items: center;
  margin-bottom: 34px;
  padding: 42px;
  border-radius: 12px;
  background: var(--green-dark);
  color: var(--white);
}

.newsletter h2 {
  max-width: 720px;
  margin-bottom: 14px;
  font-size: clamp(1.6rem, 2.4vw, 2.4rem);
  line-height: 1.25;
}

.newsletter h2 small {
  display: block;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.78);
  font-family: var(--font-sans);
  font-size: clamp(0.95rem, 1.2vw, 1.05rem);
  font-weight: 500;
  line-height: 1.5;
}

.newsletter p {
  max-width: 620px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.7;
}

.newsletter-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.newsletter-cta .button {
  border-color: var(--amber);
  background: var(--amber);
  color: #1f201a;
}

.newsletter .form-note {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.88rem;
}

/* Notice */
.notice {
  display: grid;
  gap: 8px;
  padding: 14px 0 34px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.notice p {
  margin: 0;
}

/* Footer */
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 0 42px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer > span:first-child {
  color: var(--green-dark);
  font-weight: 850;
}

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

.footer-links a {
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--green-dark);
}

/* Responsive */
@media (max-width: 1100px) {
  .topics-grid,
  .questions-grid,
  .shorts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px 24px;
  }

  .nav {
    width: 100%;
    flex-wrap: wrap;
    gap: 14px 20px;
  }

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

  .hero {
    padding-top: 46px;
  }
}

@media (max-width: 680px) {
  .site-header,
  .hero,
  .shorts,
  .topics,
  .questions,
  .about,
  .newsletter,
  .notice,
  .site-footer {
    width: min(100% - 28px, 1220px);
  }

  .site-header {
    width: 100%;
    padding: 16px;
  }

  .brand {
    font-size: 0.96rem;
  }

  .nav-action {
    display: none;
  }

  h1[lang="ur"] {
    font-size: clamp(2rem, 9vw, 2.6rem);
  }

  .topics-grid,
  .questions-grid,
  .shorts-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: block;
  }

  .section-heading > span {
    display: inline-block;
    margin-bottom: 10px;
  }

  .newsletter {
    padding: 24px;
  }

  .site-footer {
    flex-direction: column;
  }
}
