/* Quran Path Academy - style.css */
@import url("https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&family=Nunito+Sans:wght@400;600;700&display=swap");

:root {
  --green-deep: #0e3b32;
  --green-mid: #1f6b57;
  --gold: #b8893b;
  --gold-soft: #e6cf9f;
  --paper: #f4f7f5;
  --white: #ffffff;
  --ink: #1a2b27;
  --muted: #55655f;
  --line: #d5e0db;
  --wa: #128c7e;
  --wa-dark: #0c6b60;
  --side: max(1.25rem, calc((100% - 1100px) / 2));
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  font-family: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1, h2, h3 {
  font-family: "Amiri", Georgia, "Times New Roman", serif;
  line-height: 1.2;
  margin: 0 0 0.6rem;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* ---------- Header ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem var(--side);
  background: var(--green-deep);
  border-bottom: 2px solid var(--gold);
}

.logo {
  font-family: "Amiri", Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
}

nav {
  display: flex;
  gap: 1.5rem;
}

nav a {
  color: var(--gold-soft);
  text-decoration: none;
  font-weight: 600;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

nav a:hover {
  color: var(--white);
  border-bottom-color: var(--gold);
}

/* ---------- Hero ---------- */
#hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 3rem;
  padding: 4.5rem var(--side);
  color: var(--white);
  background-color: var(--green-deep);
  /* subtle eight-point star lattice, a nod to Islamic geometric patterns */
  background-image:
    conic-gradient(from 45deg at 50% 50%, rgba(230, 207, 159, 0.07) 0 25%, transparent 0 50%, rgba(230, 207, 159, 0.07) 0 75%, transparent 0);
  background-size: 56px 56px;
}

.hero-content h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1rem;
}

.hero-content > p {
  font-size: 1.15rem;
  color: #d6e6df;
  max-width: 34rem;
  margin: 0 0 1.5rem;
}

.hero-content ul {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.hero-content li {
  position: relative;
  padding-left: 1.6rem;
  font-weight: 600;
}

.hero-content li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 0.7rem;
  height: 0.7rem;
  background: var(--gold);
  transform: rotate(45deg);
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.btn-trial,
.btn-whatsapp {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.btn-trial {
  background: var(--gold);
  color: #1b1405;
  border: 2px solid var(--gold);
}

.btn-trial:hover {
  background: var(--gold-soft);
  border-color: var(--gold-soft);
}

.btn-whatsapp {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--gold-soft);
}

.btn-whatsapp:hover {
  background: var(--white);
  color: var(--green-deep);
  border-color: var(--white);
}

.hero-image img {
  width: 100%;
  max-width: 460px;
  margin-inline: auto;
  border-radius: 12px;
  border: 3px solid var(--gold);
  box-shadow: 10px 10px 0 rgba(184, 137, 59, 0.35);
}

/* ---------- Shared section layout ---------- */
#why-us,
#courses,
#trial {
  padding: 4.5rem var(--side);
}

#why-us,
#courses {
  display: grid;
  gap: 1.25rem;
}

#why-us > h2,
#courses > h2,
#trial > h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  color: var(--green-deep);
}

#why-us > p,
#courses > p,
#trial > p {
  color: var(--muted);
  margin: 0 0 1rem;
}

#why-us > h2,
#why-us > p,
#courses > h2,
#courses > p {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

#why-us > p,
#courses > p {
  margin-bottom: 0.75rem;
}

/* ---------- Why Us ---------- */
#why-us {
  grid-template-columns: repeat(3, 1fr);
}

.feature-box {
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 4px solid var(--gold);
}

.feature-box h3 {
  font-size: 1.4rem;
  color: var(--green-mid);
}

.feature-box p {
  margin: 0;
  color: var(--muted);
}

/* ---------- Courses ---------- */
#courses {
  grid-template-columns: repeat(2, 1fr);
  background: var(--white);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.course-box {
  padding: 1.5rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.course-box h3 {
  font-size: 1.45rem;
  color: var(--green-deep);
}

.course-box p {
  margin: 0;
  color: var(--muted);
}

/* ---------- Trial form ---------- */
#trial {
  max-width: none;
}

#trial > h2,
#trial > p {
  max-width: 560px;
  margin-inline: auto;
}

#trial form {
  max-width: 560px;
  margin: 1.5rem auto 0;
  padding: 2rem;
  display: grid;
  gap: 1.1rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--gold);
  border-radius: 10px;
}

#trial label {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 700;
  color: var(--green-deep);
}

#trial input,
#trial select {
  width: 100%;
  padding: 0.75rem 0.9rem;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid #b9c9c2;
  border-radius: 6px;
}

#trial input:focus,
#trial select:focus {
  border-color: var(--green-mid);
}

#trial button {
  padding: 0.9rem 1.5rem;
  font: inherit;
  font-weight: 700;
  color: var(--white);
  background: var(--green-deep);
  border: 2px solid var(--green-deep);
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s;
}

#trial button:hover {
  background: var(--green-mid);
  border-color: var(--green-mid);
}

/* ---------- Floating WhatsApp ---------- */
.whatsapp-float-container {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 100;
}

.whatsapp-float {
  display: inline-block;
  padding: 0.8rem 1.2rem;
  color: var(--white);
  background: var(--wa);
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transition: background-color 0.2s;
}

.whatsapp-float:hover {
  background: var(--wa-dark);
}

/* ---------- Footer ---------- */
footer {
  padding: 1.75rem var(--side);
  text-align: center;
  color: #c3d6ce;
  background: var(--green-deep);
}

footer p {
  margin: 0;
}

/* ---------- Tablet ---------- */
@media (max-width: 900px) {
  #hero {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding-block: 3rem;
  }

  .hero-image {
    order: -1;
  }

  .hero-image img {
    max-width: 340px;
  }

  #why-us {
    grid-template-columns: 1fr;
  }

  #why-us,
  #courses,
  #trial {
    padding-block: 3rem;
  }
}

/* ---------- Mobile ---------- */
@media (max-width: 600px) {
  header {
    flex-direction: column;
    gap: 0.5rem;
    padding-block: 0.7rem;
  }

  .logo {
    font-size: 1.3rem;
  }

  nav {
    gap: 1.1rem;
    font-size: 0.95rem;
  }

  html {
    scroll-padding-top: 7rem;
  }

  #courses {
    grid-template-columns: 1fr;
  }

  .hero-buttons {
    flex-direction: column;
  }

  #trial form {
    padding: 1.4rem;
  }

  .whatsapp-float {
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
  }
}