:root {
  --ink: #17221e;
  --muted: #56635f;
  --paper: #f7f2e8;
  --ivory: #fffdf7;
  --green: #0f5f49;
  --green-dark: #073c31;
  --gold: #c59b4b;
  --teal: #174f5d;
  --rose: #9b4e4a;
  --line: rgba(23, 34, 30, 0.14);
  --shadow: 0 20px 60px rgba(17, 35, 29, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 5vw, 72px);
  color: var(--ivory);
  background: linear-gradient(180deg, rgba(5, 18, 15, 0.82), rgba(5, 18, 15, 0));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 253, 247, 0.45);
  border-radius: 50%;
  background: rgba(255, 253, 247, 0.16);
  font-size: 0.82rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 32px);
  font-size: 0.95rem;
  font-weight: 700;
}

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: 120px clamp(20px, 6vw, 88px) 72px;
  color: var(--ivory);
}

.hero-image,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  object-fit: cover;
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(5, 18, 15, 0.88), rgba(5, 18, 15, 0.58) 45%, rgba(5, 18, 15, 0.22)),
    linear-gradient(0deg, rgba(5, 18, 15, 0.44), rgba(5, 18, 15, 0));
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 840px;
  margin-bottom: 20px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.2rem, 8vw, 7.5rem);
  line-height: 0.94;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.04;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.18rem;
  line-height: 1.25;
}

.hero-copy {
  max-width: 660px;
  margin-bottom: 30px;
  color: rgba(255, 253, 247, 0.9);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
}

.hero-hadith {
  max-width: 720px;
  margin: 0 0 28px;
  padding: 18px 20px;
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.1);
  backdrop-filter: blur(8px);
}

.hero-hadith blockquote {
  margin: 0 0 10px;
  color: var(--ivory);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.65;
}

.hero-hadith figcaption {
  color: rgba(255, 253, 247, 0.88);
  font-size: 1rem;
}

.hero-hadith figcaption span {
  display: block;
  margin-top: 6px;
  color: rgba(255, 253, 247, 0.72);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 20px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 850;
  cursor: pointer;
}

.button.primary {
  color: var(--ivory);
  background: var(--green);
  box-shadow: 0 12px 28px rgba(15, 95, 73, 0.28);
}

.button.secondary {
  color: var(--ivory);
  border-color: rgba(255, 253, 247, 0.45);
  background: rgba(255, 253, 247, 0.12);
}

.section {
  padding: clamp(64px, 8vw, 112px) clamp(20px, 6vw, 88px);
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.85fr);
  gap: clamp(32px, 6vw, 86px);
  align-items: start;
  background: var(--ivory);
}

.intro p:last-child {
  margin: 38px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 34px;
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
}

.course-card {
  grid-column: span 2;
  overflow: hidden;
  min-height: 260px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ivory);
  box-shadow: 0 8px 24px rgba(17, 35, 29, 0.06);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.course-card p {
  margin-bottom: 24px;
}

.course-card:hover,
.course-card:focus-visible,
.course-card.is-selected {
  border-color: rgba(15, 95, 73, 0.42);
  box-shadow: 0 18px 42px rgba(17, 35, 29, 0.12);
  transform: translateY(-4px);
  outline: none;
}

.course-card.is-selected .course-number {
  color: var(--ivory);
  background: var(--green);
}

.course-action {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 6px;
  color: var(--green-dark);
  background: rgba(15, 95, 73, 0.08);
  font-size: 0.88rem;
  font-weight: 850;
}

.course-card p,
.approach-list p,
.footer p {
  color: var(--muted);
}

.course-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 42px;
  border-radius: 50%;
  color: var(--green-dark);
  background: #e5d4a4;
  font-weight: 900;
}

.featured-card {
  grid-column: span 3;
  color: var(--ivory);
  background: linear-gradient(135deg, var(--green-dark), var(--teal));
  box-shadow: var(--shadow);
}

.course-card:nth-child(4) {
  grid-column: span 3;
}

.featured-card p {
  color: rgba(255, 253, 247, 0.78);
}

.featured-card .course-number {
  color: var(--green-dark);
  background: var(--gold);
}

.approach {
  background: #ece1cf;
}

.approach-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(23, 34, 30, 0.18);
  border-radius: 8px;
  background: rgba(23, 34, 30, 0.18);
}

.approach-list > div {
  min-height: 210px;
  padding: 26px;
  background: var(--paper);
}

.teacher {
  display: grid;
  grid-template-columns: minmax(280px, 0.74fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 82px);
  align-items: center;
  background: var(--green-dark);
  color: var(--ivory);
}

.teacher-photo-wrap {
  position: relative;
  justify-self: center;
  width: min(100%, 430px);
  overflow: hidden;
  border-radius: 8px;
  padding: 10px;
  border: 1px solid rgba(197, 155, 75, 0.72);
  background: var(--ivory);
  box-shadow: 18px 18px 0 rgba(197, 155, 75, 0.2), var(--shadow);
}

.teacher-photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 58%;
  filter: saturate(0.88) contrast(1.04);
}

.teacher-photo-wrap::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--gold);
}

.teacher-content {
  max-width: 720px;
}

.teacher-content p {
  color: rgba(255, 253, 247, 0.82);
  font-size: 1.06rem;
}

.teacher-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 28px;
}

.teacher-highlights span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 253, 247, 0.2);
  border-radius: 6px;
  color: var(--ivory);
  background: rgba(255, 253, 247, 0.08);
  font-size: 0.9rem;
  font-weight: 800;
}

.faq {
  background: var(--paper);
}

.faq-list {
  display: grid;
  gap: 12px;
  max-width: 880px;
}

.faq-list details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ivory);
  box-shadow: 0 8px 24px rgba(17, 35, 29, 0.05);
}

.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
}

.faq-list summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--ivory);
  background: var(--green);
  flex: 0 0 auto;
}

.faq-list details[open] summary::after {
  content: "-";
}

.faq-list details p {
  margin: 0;
  padding: 0 20px 20px;
  color: var(--muted);
}

.contact {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 0.9fr);
  gap: clamp(30px, 6vw, 80px);
  background: var(--ivory);
}

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

.whatsapp-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  margin-top: 14px;
  padding: 13px 18px;
  border-radius: 6px;
  color: var(--ivory);
  background: #25d366;
  font-weight: 850;
  box-shadow: 0 14px 30px rgba(37, 211, 102, 0.25);
}

.whatsapp-link svg,
.floating-whatsapp svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  flex: 0 0 auto;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 14px;
  color: var(--ink);
  background: #fbf8f0;
  font: inherit;
}

textarea {
  resize: vertical;
}

.form-status {
  min-height: 24px;
  margin: 0;
  color: var(--green);
  font-weight: 850;
}

.character-count {
  margin: -8px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 750;
  text-align: right;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 28px clamp(20px, 6vw, 88px);
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.footer p {
  margin: 0;
}

.floating-whatsapp {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  color: var(--ivory);
  background: #25d366;
  box-shadow: 0 16px 34px rgba(13, 55, 36, 0.3);
}

.floating-whatsapp:hover,
.whatsapp-link:hover {
  background: #1ebe5d;
}

@media (max-width: 860px) {
  .site-header {
    align-items: flex-start;
    padding-top: 14px;
  }

  .nav {
    gap: 12px;
    font-size: 0.86rem;
  }

  .brand span:last-child {
    display: none;
  }

  .hero {
    min-height: 88vh;
    padding-top: 110px;
  }

  .hero-shade {
    background: linear-gradient(90deg, rgba(5, 18, 15, 0.9), rgba(5, 18, 15, 0.44));
  }

  .intro,
  .teacher,
  .contact {
    grid-template-columns: 1fr;
  }

  .intro p:last-child {
    margin-top: 0;
  }

  .course-grid,
  .approach-list {
    grid-template-columns: 1fr;
  }

  .course-card,
  .course-card:nth-child(4),
  .featured-card {
    grid-column: auto;
  }

  .course-card,
  .approach-list > div {
    min-height: auto;
  }

  .footer {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .hero {
    min-height: 90vh;
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .whatsapp-link {
    width: 100%;
    justify-content: center;
  }

  .floating-whatsapp {
    right: 16px;
    bottom: 16px;
    width: 54px;
    height: 54px;
  }

  h1 {
    font-size: clamp(2.8rem, 18vw, 4.2rem);
  }
}
