:root {
  color-scheme: light;
  --green-950: #082b22;
  --green-850: #103f32;
  --green-700: #17634e;
  --mint-100: #e7f3ec;
  --gold-500: #c9953b;
  --gold-200: #f6e1af;
  --brick-600: #9e4637;
  --ink: #17211e;
  --muted: #62706b;
  --line: #d9e1dd;
  --paper: #fbfaf6;
  --white: #ffffff;
  --shadow: 0 24px 70px rgba(8, 43, 34, 0.16);
  --radius: 8px;
  --header-height: 76px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
}

body.nav-open {
  overflow: hidden;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

.sr-only,
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  z-index: 20;
  top: 12px;
  left: 12px;
  width: auto;
  height: auto;
  padding: 10px 14px;
  clip: auto;
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--header-height);
  background: rgba(251, 250, 246, 0.88);
  border-bottom: 1px solid rgba(217, 225, 221, 0.9);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green-850);
  color: var(--gold-200);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: clamp(0.96rem, 2.4vw, 1.08rem);
  line-height: 1.2;
}

.brand small {
  color: var(--muted);
  font-size: 0.76rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  min-height: 42px;
  padding: 10px 13px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius);
  color: var(--green-950);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: var(--mint-100);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.nav-toggle span:not(.sr-only) {
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 99px;
}

.hero {
  position: relative;
  min-height: calc(92svh - var(--header-height));
  padding: clamp(72px, 10vh, 104px) max(20px, calc((100vw - 1180px) / 2)) 52px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: clamp(28px, 6vw, 72px);
  align-items: end;
  overflow: hidden;
  isolation: isolate;
  color: var(--white);
}

.hero-bg,
.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-bg {
  background:
    linear-gradient(90deg, rgba(8, 43, 34, 0.76), rgba(8, 43, 34, 0.2)),
    url("assets/community-hero.png") center / cover no-repeat;
  transform: scale(1.01);
}

.hero-shade {
  z-index: -1;
  background:
    radial-gradient(circle at 82% 30%, rgba(201, 149, 59, 0.32), transparent 28%),
    linear-gradient(180deg, rgba(8, 43, 34, 0.18), rgba(8, 43, 34, 0.72));
}

.hero-content {
  max-width: 720px;
  padding-bottom: clamp(8px, 3vh, 24px);
}

.eyebrow,
.mini-label,
.panel-kicker {
  margin: 0;
  color: var(--gold-500);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero .eyebrow,
.hero .panel-kicker {
  color: var(--gold-200);
}

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

h1 {
  max-width: 12ch;
  margin-bottom: 18px;
  font-size: clamp(3.1rem, 8vw, 6.8rem);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(2rem, 4.5vw, 3.7rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: clamp(1.18rem, 2.5vw, 1.48rem);
  line-height: 1.2;
}

h4 {
  margin: 0 0 12px;
  color: var(--green-950);
  font-size: 1.05rem;
  line-height: 1.2;
}

.hero-copy {
  max-width: 640px;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
}

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

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--gold-500);
  color: #20170a;
}

.button-secondary {
  background: var(--white);
  color: var(--green-950);
}

.button-ghost {
  border-color: var(--line);
  background: transparent;
  color: var(--green-950);
}

.hero-address {
  margin-top: 26px;
  color: rgba(255, 255, 255, 0.86);
  font-style: normal;
  font-weight: 700;
}

.today-panel,
.prayer-board,
.iqamah-panel,
.program-card,
.tab-panel,
.pta-form,
.pta-notes,
.portal-login,
.portal-empty,
.portal-panel,
.forum-panel,
.contact-panel {
  border: 1px solid rgba(217, 225, 221, 0.92);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.today-panel {
  align-self: center;
  padding: 22px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.26);
}

.today-panel h2 {
  margin-bottom: 4px;
  font-size: 1.45rem;
  line-height: 1.16;
}

.date-line {
  color: var(--muted);
  font-size: 0.95rem;
}

.compact-times {
  list-style: none;
  padding: 0;
  margin: 18px 0;
}

.compact-times li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.compact-times li:last-child {
  border-bottom: 0;
}

.compact-times strong {
  font-size: 1.04rem;
  color: var(--green-850);
}

.panel-link {
  color: var(--green-700);
  font-weight: 800;
  text-decoration: none;
}

.notice-band {
  background: var(--green-950);
  color: var(--white);
}

.notice-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.notice-inner > div {
  min-width: 0;
  padding: 0 20px;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.notice-inner > div:first-child {
  border-left: 0;
  padding-left: 0;
}

.notice-inner strong {
  display: block;
  margin-top: 4px;
  line-height: 1.3;
}

.section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(64px, 9vw, 106px) 0;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 32px;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.06rem;
}

.prayer-layout,
.pta-layout,
.visit-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.85fr);
  gap: 24px;
  align-items: start;
}

.prayer-board,
.iqamah-panel,
.pta-notes,
.contact-panel {
  padding: clamp(20px, 3vw, 30px);
}

.board-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.method-pill {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--mint-100);
  color: var(--green-850);
  font-size: 0.84rem;
  font-weight: 800;
}

.times-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.time-tile {
  min-height: 112px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbf9;
}

.time-tile span {
  color: var(--muted);
  font-weight: 700;
}

.time-tile strong {
  color: var(--green-850);
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  line-height: 1;
}

.board-note,
.contact-note,
.form-status {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.93rem;
}

.schedule-list,
.feature-list {
  list-style: none;
  padding: 0;
  margin: 18px 0;
}

.schedule-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.schedule-list li:last-child {
  border-bottom: 0;
}

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

.schedule-list strong {
  text-align: right;
  color: var(--green-850);
}

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

.program-card {
  min-height: 260px;
  padding: 22px;
  display: flex;
  flex-direction: column;
}

.card-number {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  margin-bottom: auto;
  border-radius: 50%;
  background: var(--green-850);
  color: var(--gold-200);
  font-weight: 900;
}

.program-card h3 {
  margin-top: 26px;
}

.program-card p,
.tab-panel p,
.iqamah-panel p,
.pta-notes p,
.contact-panel p {
  color: var(--muted);
}

.courses-section {
  width: 100%;
  max-width: none;
  padding-inline: max(16px, calc((100vw - 1180px) / 2));
  background:
    linear-gradient(135deg, rgba(231, 243, 236, 0.9), rgba(255, 255, 255, 0.5)),
    var(--paper);
}

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

.tab-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tab-button {
  min-height: 54px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--green-950);
  text-align: left;
  font-weight: 800;
  cursor: pointer;
}

.tab-button.is-active {
  background: var(--green-850);
  border-color: var(--green-850);
  color: var(--white);
}

.tab-panel {
  min-height: 300px;
  padding: clamp(24px, 4vw, 38px);
}

.feature-list {
  display: grid;
  gap: 10px;
  margin-bottom: 0;
}

.feature-list li {
  position: relative;
  padding-left: 24px;
  color: var(--ink);
  font-weight: 700;
}

.feature-list li::before {
  content: "";
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brick-600);
}

.pta-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: clamp(20px, 3vw, 30px);
}

.portal-grid {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.portal-login,
.portal-empty,
.portal-panel,
.forum-panel {
  padding: clamp(20px, 3vw, 30px);
}

.portal-login {
  position: sticky;
  top: calc(var(--header-height) + 18px);
}

.portal-login p,
.portal-empty p,
.portal-view-header p,
.forum-post p {
  color: var(--muted);
}

.role-switch {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 20px 0;
}

.role-button,
.demo-access button {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--green-950);
  text-align: left;
  font-weight: 800;
  cursor: pointer;
}

.role-button.is-active {
  background: var(--green-850);
  border-color: var(--green-850);
  color: var(--white);
}

.portal-form {
  display: grid;
  gap: 14px;
}

.demo-access {
  display: grid;
  gap: 8px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.demo-access span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.demo-access button {
  min-height: 38px;
  background: var(--mint-100);
}

.portal-dashboard {
  min-width: 0;
}

.portal-view,
.portal-content,
.portal-panel,
.forum-panel {
  min-width: 0;
}

.portal-empty {
  min-height: 360px;
  display: grid;
  align-content: center;
}

.portal-view-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.portal-view-header > div {
  max-width: 680px;
}

.portal-view-header .button {
  flex: 0 0 auto;
  width: auto;
}

.portal-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.stat-tile {
  min-height: 104px;
  padding: 16px;
  display: grid;
  align-content: space-between;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--green-950);
  color: var(--white);
}

.stat-tile span {
  color: var(--gold-200);
  font-size: 0.82rem;
  font-weight: 800;
}

.stat-tile strong {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1;
}

.portal-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.portal-panel.wide-panel {
  grid-column: 1 / -1;
}

.progress-list {
  display: grid;
  gap: 16px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.progress-row {
  display: grid;
  gap: 10px;
}

.progress-row strong,
.progress-row span {
  display: block;
}

.progress-row span {
  color: var(--muted);
  font-size: 0.92rem;
}

.progress-meter {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--mint-100);
}

.progress-meter span {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brick-600), var(--gold-500));
}

.compact-list {
  margin-bottom: 0;
}

.record-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

.record-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.record-table th,
.record-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.record-table th {
  color: var(--green-950);
  font-size: 0.84rem;
  text-transform: uppercase;
}

.record-table td {
  color: var(--muted);
}

.status-pill {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--mint-100);
  color: var(--green-850);
  font-size: 0.82rem;
  font-weight: 900;
}

.forum-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.forum-list {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.forum-post {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbf9;
}

.forum-post div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
}

.forum-post span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  text-align: right;
}

.forum-post p {
  margin: 0;
}

.forum-form {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--green-950);
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffefb;
  color: var(--ink);
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(201, 149, 59, 0.45);
  outline-offset: 2px;
}

.full-field {
  grid-column: 1 / -1;
}

.draft-output {
  min-height: 170px;
  color: var(--ink);
}

.map-wrap {
  position: relative;
  display: block;
  min-height: 420px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--mint-100);
  box-shadow: var(--shadow);
}

.map-wrap img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  display: block;
  object-fit: cover;
}

.map-badge {
  position: absolute;
  top: 18px;
  left: 18px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--green-950);
  color: var(--white);
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(8, 43, 34, 0.22);
}

.contact-panel {
  position: sticky;
  top: calc(var(--header-height) + 18px);
}

.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer strong {
  color: var(--green-950);
}

.site-footer p {
  margin: 4px 0 0;
}

.site-footer a {
  color: var(--green-700);
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: fixed;
    top: var(--header-height);
    right: 16px;
    left: 16px;
    display: none;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: grid;
  }

  .site-nav a {
    min-height: 48px;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 58px;
  }

  .today-panel {
    display: none;
  }

  .notice-inner,
  .prayer-layout,
  .pta-layout,
  .visit-layout,
  .tabs,
  .portal-grid {
    grid-template-columns: 1fr;
  }

  .notice-inner > div {
    padding: 0;
    border-left: 0;
  }

  .program-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tab-list {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .tab-button {
    min-width: 150px;
    text-align: center;
  }

  .contact-panel {
    position: static;
  }

  .portal-login {
    position: static;
  }

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

@media (max-width: 620px) {
  :root {
    --header-height: 70px;
  }

  .header-inner {
    width: min(100% - 24px, 1180px);
  }

  .brand {
    gap: 10px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .hero {
    padding-inline: 16px;
    gap: 24px;
  }

  .hero-actions,
  .contact-actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .section,
  .notice-inner,
  .site-footer {
    width: min(100% - 24px, 1180px);
  }

  .times-grid,
  .program-grid,
  .pta-form,
  .portal-stats {
    grid-template-columns: 1fr;
  }

  .board-header,
  .site-footer,
  .portal-view-header,
  .forum-heading,
  .forum-post div {
    flex-direction: column;
  }

  .portal-view-header .button {
    width: 100%;
  }

  .forum-post span {
    text-align: left;
  }

  .method-pill {
    white-space: normal;
  }

  .program-card {
    min-height: 220px;
  }
}
