:root {
  --bg: #f2ece0;
  --bg-alt: #e8dfd0;
  --bg-dark: #1c1a17;
  --text: #1c1a17;
  --text-soft: #5a5248;
  --indigo: #2b3a67;
  --indigo-dark: #1e2a4f;
  --gold: #b89a6a;
  --border: rgba(28, 26, 23, 0.12);
  --shadow: 0 22px 60px rgba(43, 58, 103, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "DM Sans", sans-serif;
}

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

.page-shell {
  min-height: 100vh;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 92vh;
  padding: 32px clamp(24px, 4vw, 64px) 24px;
}

.hero-bg {
  position: absolute;
  border-radius: 999px;
  background: var(--indigo);
  opacity: 0.06;
  pointer-events: none;
}

.hero-bg-right {
  width: 640px;
  height: 640px;
  right: -160px;
  top: -80px;
}

.hero-bg-left {
  width: 420px;
  height: 420px;
  left: -120px;
  bottom: -160px;
}

.nav,
.hero-grid,
.hero-bottom,
.section,
.footer {
  position: relative;
  z-index: 1;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.brand {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.nav-link-button,
.nav-auth-button {
  min-height: 48px;
  padding: 13px 18px;
  border-radius: 999px;
  font-size: 0.72rem;
  white-space: nowrap;
}

.nav-logout-form {
  margin: 0;
}

.nav-toggle {
  display: none;
  border: 0;
  background: transparent;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 56px;
  align-items: end;
  padding: 72px 0 60px;
}

.hero-copy h1,
.section-head h1,
.section-head h2,
.mosque-card h3,
.step-card h3,
.footer-newsletter h2 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 400;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  margin-bottom: 20px;
}

.eyebrow::before {
  content: "";
  display: block;
  width: 24px;
  height: 1px;
  background: currentColor;
}

.hero-copy h1 {
  font-size: clamp(3.4rem, 6vw, 6.3rem);
  line-height: 0.94;
  margin: 0 0 24px;
  max-width: 640px;
}

.hero-hadith {
  max-width: 620px;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-soft);
  margin: 0 0 34px;
}

.hero-actions,
.tab-controls,
.mode-switch,
.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--indigo);
  padding: 16px 28px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
  font-weight: 700;
  transition: 180ms ease;
  cursor: pointer;
}

.button.primary {
  color: #fff;
  background: var(--indigo);
}

.button.primary:hover {
  background: var(--indigo-dark);
}

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

.button.secondary:hover,
.button.ghost:hover {
  background: rgba(43, 58, 103, 0.08);
}

.button.ghost {
  color: var(--text-soft);
  border-color: transparent;
}

.button.full-width {
  width: 100%;
}

.button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.hero-side {
  padding: 36px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.hero-counter-label,
.hero-counter-caption,
.progress-foot,
.mosque-address,
.section-head p,
.step-card p,
.leader-main span,
.stat-label,
.footer p,
.footer-links a,
.field-error {
  color: var(--text-soft);
}

.hero-counter-label,
.hero-counter-caption {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.78rem;
}

.hero-counter {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(3rem, 5vw, 4.8rem);
  line-height: 0.9;
  color: var(--indigo);
  margin: 16px 0;
}

.hero-bottom {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid rgba(28, 26, 23, 0.18);
  padding-top: 18px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  color: var(--text-soft);
}

.live-feed {
  background: var(--indigo);
  overflow: hidden;
  padding: 18px 0;
}

.ticker {
  display: flex;
  gap: 40px;
  min-width: max-content;
  animation: marquee 30s linear infinite;
}

.ticker-item {
  display: inline-flex;
  gap: 12px;
  white-space: nowrap;
  color: rgba(242, 236, 224, 0.8);
}

.ticker-item strong {
  color: #fff;
}

.section {
  padding: 96px clamp(24px, 4vw, 64px);
}

.section.muted,
.stats-section {
  background: var(--bg-alt);
}

.section-head {
  margin: 0 auto 48px;
  max-width: 760px;
}

.section-head.centered {
  text-align: center;
}

.section-head.centered .eyebrow {
  justify-content: center;
}

.section-head h1,
.section-head h2 {
  font-size: clamp(2.7rem, 4vw, 4.9rem);
  line-height: 0.98;
  margin: 0 0 16px;
}

.section-head p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.7;
}

.quick-donation-card,
.checkout-card {
  max-width: 900px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: clamp(24px, 3vw, 48px);
}

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

.eyebrow.inverse {
  color: var(--gold);
}

.mosque-search-card {
  position: relative;
  overflow: hidden;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(28px, 4vw, 46px);
  border-radius: 36px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.52));
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.mosque-search-backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 82% 20%, rgba(43, 58, 103, 0.11), transparent 16%),
    radial-gradient(circle at 88% 74%, rgba(184, 154, 106, 0.18), transparent 22%),
    linear-gradient(135deg, rgba(43, 58, 103, 0.03), transparent 45%);
  opacity: 1;
}

.mosque-search-card::before,
.mosque-search-card::after {
  content: "";
  position: absolute;
  right: clamp(16px, 6vw, 96px);
  bottom: -80px;
  width: clamp(220px, 28vw, 420px);
  height: clamp(220px, 28vw, 420px);
  border-radius: 48% 52% 0 0;
  background:
    linear-gradient(180deg, rgba(43, 58, 103, 0.08), rgba(43, 58, 103, 0.01));
  filter: blur(2px);
  opacity: 0.85;
}

.mosque-search-card::after {
  right: clamp(120px, 14vw, 220px);
  bottom: -150px;
  width: clamp(140px, 20vw, 250px);
  height: clamp(140px, 20vw, 250px);
  background:
    linear-gradient(180deg, rgba(184, 154, 106, 0.18), rgba(184, 154, 106, 0.02));
  opacity: 0.72;
}

.mosque-search-content {
  position: relative;
  z-index: 1;
}

.mosque-search-copy {
  max-width: 720px;
  margin-bottom: 28px;
}

.mosque-search-copy h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(3rem, 4.8vw, 4.4rem);
  font-weight: 400;
  line-height: 0.96;
  margin: 0 0 14px;
}

.mosque-search-copy p {
  max-width: 680px;
  margin: 0;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-soft);
}

.mosque-search-form {
  margin-bottom: 30px;
}

.mosque-search-controls,
.mosque-search-actions {
  display: grid;
  gap: 14px;
}

.mosque-search-controls {
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  margin-bottom: 14px;
}

.mosque-search-actions {
  grid-template-columns: minmax(0, 1fr) 240px;
}

.mosque-search-control {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mosque-search-label {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.mosque-search-control select,
.mosque-search-control input {
  width: 100%;
  min-height: 58px;
  border: 1px solid rgba(28, 26, 23, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  padding: 16px 18px;
  font: inherit;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.mosque-search-control select:disabled,
.mosque-search-control input:disabled,
.mosque-search-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.mosque-search-control select option {
  color: var(--text);
}

.mosque-search-control input::placeholder {
  color: var(--text-soft);
}

.mosque-search-submit {
  min-height: 58px;
  border-radius: 18px;
  border-color: transparent;
  background: var(--indigo);
  color: #fff;
  box-shadow: 0 18px 34px rgba(43, 58, 103, 0.16);
}

.mosque-search-submit:hover {
  background: var(--indigo-dark);
}

.mosque-search-submit:disabled:hover {
  background: var(--indigo);
}

.city-mosques-block {
  margin-top: 30px;
  padding: 20px;
  border-radius: 26px;
  background: rgba(43, 58, 103, 0.04);
  border: 1px solid rgba(43, 58, 103, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

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

.city-mosques-kicker {
  margin-bottom: 6px;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.city-mosques-head h3 {
  margin: 0;
  color: var(--text);
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.2;
}

.city-mosques-badge {
  flex-shrink: 0;
  align-self: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(184, 154, 106, 0.16);
  color: var(--indigo);
  font-size: 0.85rem;
  font-weight: 700;
  border: 1px solid rgba(184, 154, 106, 0.26);
}

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

.city-mosques-hint {
  grid-column: 1 / -1;
  padding: 20px 22px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(28, 26, 23, 0.08);
  color: var(--text-soft);
  text-align: center;
}

.city-mosque-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 104px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  border: 1px solid rgba(28, 26, 23, 0.08);
  box-shadow: 0 18px 34px rgba(43, 58, 103, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.city-mosque-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 42px rgba(43, 58, 103, 0.12);
}

.city-mosque-thumb {
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background:
    linear-gradient(135deg, rgba(43, 58, 103, 0.22), rgba(184, 154, 106, 0.22));
  background-size: cover;
  background-position: center;
}

.city-mosque-body {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.city-mosque-meta {
  display: block;
  color: var(--text-soft);
  font-size: 0.78rem;
  line-height: 1.35;
}

.city-mosque-body strong {
  font-size: 1rem;
  line-height: 1.35;
}

.city-mosque-body p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.82rem;
  line-height: 1.4;
}

.city-mosque-value {
  display: block;
  color: var(--indigo);
  font-size: 0.86rem;
  font-weight: 700;
}

.city-mosque-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--indigo), var(--indigo-dark));
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  flex-shrink: 0;
}

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

.popular-mosque-card,
.popular-empty-state {
  min-height: 108px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 34px rgba(16, 48, 38, 0.12);
}

.popular-mosque-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  color: var(--text);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.popular-mosque-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 42px rgba(16, 48, 38, 0.16);
}

.popular-mosque-thumb {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background:
    linear-gradient(135deg, rgba(43, 58, 103, 0.22), rgba(12, 199, 164, 0.22));
  background-size: cover;
  background-position: center;
}

.popular-mosque-body {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.popular-mosque-body strong {
  font-size: 1rem;
  line-height: 1.35;
}

.popular-mosque-meta,
.popular-mosque-value {
  display: block;
  color: var(--text-soft);
  font-size: 0.78rem;
  line-height: 1.4;
}

.popular-mosque-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0cc7a4, #0fd07a);
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  flex-shrink: 0;
}

.popular-empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  grid-column: 1 / -1;
  padding: 24px;
  color: var(--text-soft);
  text-align: center;
}

.mode-button,
.amount-chip,
.tab-button {
  border: 1px solid rgba(43, 58, 103, 0.24);
  background: transparent;
  color: var(--text-soft);
  padding: 14px 18px;
  font: inherit;
  cursor: pointer;
  transition: 180ms ease;
}

.mode-button.active,
.amount-chip.active,
.tab-button.active {
  background: var(--indigo);
  color: #fff;
  border-color: var(--indigo);
}

.field {
  margin-bottom: 20px;
}

.field-help {
  margin-top: 10px;
  color: var(--text-soft);
  font-size: 0.94rem;
  line-height: 1.6;
}

.field label {
  display: block;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: var(--text-soft);
}

.field select,
.field input {
  width: 100%;
  border: 1px solid rgba(28, 26, 23, 0.18);
  border-radius: 18px;
  background: #fff;
  padding: 16px 18px;
  font: inherit;
  color: var(--text);
}

.field-invalid select,
.field-invalid input {
  border-color: rgba(162, 56, 56, 0.55);
  box-shadow: 0 0 0 3px rgba(162, 56, 56, 0.08);
}

.field-invalid .otp-slot {
  border-color: rgba(162, 56, 56, 0.55);
  box-shadow: 0 0 0 3px rgba(162, 56, 56, 0.08);
}

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

.steps-grid,
.mosque-grid,
.stats-grid,
.footer {
  display: grid;
  gap: 24px;
}

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

.step-card,
.mosque-card,
.leader-row,
.stat-card,
.message {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--border);
}

.step-card {
  padding: 28px;
}

.step-number {
  color: var(--indigo);
  font-weight: 700;
  margin-bottom: 20px;
}

.step-card h3,
.mosque-card h3 {
  font-size: 2rem;
  margin: 0 0 14px;
}

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

.mosque-card {
  overflow: hidden;
}

.mosque-media {
  min-height: 220px;
  background: linear-gradient(135deg, rgba(43, 58, 103, 0.18), rgba(43, 58, 103, 0.04));
}

.mosque-content {
  padding: 24px;
}

.mosque-city {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  margin-bottom: 12px;
}

.mosque-description {
  min-height: 84px;
  line-height: 1.7;
}

.progress-meta,
.leader-row,
.footer-links > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.progress-meta {
  margin-top: 20px;
  margin-bottom: 10px;
}

.progress-bar {
  width: 100%;
  height: 10px;
  background: rgba(43, 58, 103, 0.12);
}

.progress-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--indigo), var(--indigo-dark));
}

.tabs {
  max-width: 760px;
  margin: 0 auto;
}

.tab-panel {
  display: none;
  margin-top: 20px;
}

.tab-panel.active {
  display: block;
}

.leader-row {
  align-items: center;
  padding: 18px 20px;
  margin-bottom: 12px;
}

.leader-rank,
.leader-value {
  font-weight: 700;
  color: var(--indigo);
}

.leader-main {
  flex: 1;
}

.leader-main strong {
  display: block;
  margin-bottom: 4px;
}

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

.stat-card {
  padding: 32px 24px;
  text-align: center;
}

.stat-value {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.6rem, 4vw, 4rem);
  color: var(--indigo);
  margin-bottom: 8px;
}

.footer {
  grid-template-columns: 1.3fr 1fr;
  padding: 72px clamp(24px, 4vw, 64px);
  background: var(--bg-dark);
  color: #fff;
}

.footer-newsletter h2 {
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  margin: 0 0 12px;
}

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

.footer-links h3 {
  margin: 0 0 16px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
}

.footer-links a {
  display: block;
  margin-bottom: 12px;
}

.checkout-shell {
  background: linear-gradient(180deg, var(--bg), var(--bg-alt));
}

.checkout-section {
  min-height: 100vh;
}

.auth-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-page-head {
  max-width: 780px;
}

.auth-single-card {
  max-width: 620px;
  border-radius: 34px;
  padding: clamp(28px, 4vw, 44px);
}

.auth-card-head {
  margin-bottom: 28px;
}

.auth-card-head h2 {
  margin: 0 0 12px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  font-weight: 400;
  line-height: 0.98;
}

.auth-card-head p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.6;
  font-size: 1rem;
}

.auth-form {
  display: grid;
  gap: 0;
}

.auth-submit-button {
  min-height: 58px;
  border-radius: 18px;
}

.auth-submit-button.is-loading,
.auth-resend-button.is-loading {
  opacity: 0.75;
  pointer-events: none;
}

.auth-meta-copy,
.auth-timer {
  margin-top: 14px;
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.6;
}

.auth-resend-block {
  margin-top: 6px;
  margin-bottom: 20px;
}

.auth-resend-form {
  display: none;
}

.auth-resend-button {
  margin-top: 12px;
  min-height: 44px;
  width: auto;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid rgba(43, 58, 103, 0.3);
  border-radius: 0;
  background: transparent;
  color: var(--indigo);
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: 0.95rem;
  justify-content: flex-start;
}

.auth-resend-button:hover {
  background: transparent;
  color: var(--indigo-dark);
}

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

.otp-slot {
  min-height: 68px;
  border: 1px solid rgba(28, 26, 23, 0.18);
  border-radius: 18px;
  background: #fff;
  text-align: center;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0;
  padding: 0;
}

.otp-slot:focus,
.field input:focus,
.field select:focus {
  outline: none;
  border-color: rgba(43, 58, 103, 0.48);
  box-shadow: 0 0 0 3px rgba(43, 58, 103, 0.1);
}

.auth-debug {
  margin: 0 0 22px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(43, 58, 103, 0.06);
  border: 1px dashed rgba(43, 58, 103, 0.22);
  color: var(--indigo);
  font-size: 0.92rem;
}

.message-stack {
  max-width: 900px;
  margin: 0 auto 20px;
}

.message,
.empty-card {
  padding: 18px 20px;
}

.message.success {
  color: #114d2b;
  background: rgba(17, 77, 43, 0.08);
  border-color: rgba(17, 77, 43, 0.22);
}

.message.error,
.field-error {
  color: #a23838;
}

.centered-button {
  margin: 16px auto 0;
}

.auth-back-button {
  margin-top: 18px;
}

.profile-section {
  padding-top: 0;
}

.profile-card {
  max-width: 1100px;
  margin: 0 auto;
}

.profile-tab-controls {
  flex-wrap: wrap;
  gap: 12px;
}

.profile-form-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

.profile-photo-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.profile-photo-preview {
  min-height: 280px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(43, 58, 103, 0.12), rgba(186, 154, 104, 0.18));
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  font-size: 1.1rem;
}

.profile-photo-button {
  cursor: pointer;
}

.profile-photo-card input[type="file"] {
  display: none;
}

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

.profile-list {
  display: grid;
  gap: 16px;
}

.profile-list-card {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(28, 26, 23, 0.08);
}

.profile-list-card strong,
.profile-list-card span {
  display: block;
}

.profile-list-card span {
  margin-top: 6px;
  color: var(--text-soft);
}

.invite-card {
  max-width: 720px;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-33%); }
}

@media (max-width: 1024px) {
  .hero-grid,
  .steps-grid,
  .mosque-grid,
  .stats-grid,
  .footer {
    grid-template-columns: 1fr;
  }

  .hero-side {
    max-width: 320px;
  }

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

  .mosque-search-controls,
  .mosque-search-actions,
  .city-mosques-grid,
  .popular-mosques-grid {
    grid-template-columns: 1fr;
  }

  .city-mosques-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .city-mosques-badge {
    align-self: flex-start;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    left: 24px;
    right: 24px;
    top: calc(100% + 16px);
    display: none;
    flex-direction: column;
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.96);
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 22px;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-link-button,
  .nav-auth-button {
    width: 100%;
    justify-content: center;
  }

  .nav-actions {
    gap: 8px;
  }

  .hero-bottom {
    flex-direction: column;
  }

  .mosque-search-card {
    border-radius: 28px;
    padding: 24px;
  }

  .mosque-search-copy h2 {
    font-size: 2rem;
  }

  .mosque-search-form {
    margin-bottom: 22px;
  }

  .mosque-search-label {
    font-size: 0.68rem;
  }

  .auth-single-card {
    border-radius: 26px;
    padding: 24px;
  }

  .otp-inputs {
    gap: 8px;
  }

  .otp-slot {
    min-height: 58px;
    font-size: 1.35rem;
  }

  .city-mosques-block {
    padding: 16px;
    border-radius: 22px;
  }

  .city-mosque-card {
    min-height: auto;
  }

  .popular-mosque-card {
    min-height: auto;
  }

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

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

.detail-header {
  padding: 28px clamp(24px, 4vw, 64px) 0;
}

.mosque-detail-shell {
  background:
    radial-gradient(circle at top right, rgba(43, 58, 103, 0.08), transparent 28%),
    linear-gradient(180deg, #f8f3ea 0%, #f2ece0 36%, #f8f5ef 100%);
}

.mosque-detail-section {
  padding-top: 28px;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--text-soft);
  font-size: 0.82rem;
  margin-bottom: 24px;
}

.mosque-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 420px);
  gap: 28px;
  align-items: start;
}

.mosque-detail-main {
  min-width: 0;
}

.detail-content-grid {
  display: block;
}

.mosque-hero-card {
  min-height: 420px;
  border-radius: 30px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(11, 17, 33, 0.22), rgba(11, 17, 33, 0.82)),
    linear-gradient(135deg, rgba(43, 58, 103, 0.3), rgba(184, 154, 106, 0.22));
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}

.mosque-hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 420px;
  padding: 34px 32px;
  color: #fff;
}

.detail-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.78);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
}

.detail-eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: currentColor;
}

.mosque-hero-copy h1 {
  font-family: "DM Sans", sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.08;
  margin: 0 0 12px;
}

.mosque-location,
.mosque-hero-description,
.hero-progress-foot {
  color: rgba(255, 255, 255, 0.84);
}

.mosque-location {
  margin-bottom: 18px;
}

.mosque-hero-description {
  max-width: 620px;
  line-height: 1.7;
  margin: 0 0 24px;
}

.hero-progress-summary,
.mosque-stats-row,
.legal-row,
.supporter-row,
.expense-row,
.section-split {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.hero-progress-summary {
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.hero-progress-summary span,
.mini-stat-label,
.support-card-head p,
.supporter-row span,
.legal-row span,
.document-row span:last-child {
  color: var(--text-soft);
}

.hero-progress-summary span {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.82rem;
  margin-bottom: 6px;
}

.hero-progress-summary strong {
  font-size: 1.55rem;
  color: #fff;
}

.hero-progress-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  overflow: hidden;
}

.hero-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #5167b6, #2b3a67);
}

.hero-progress-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 0.82rem;
}

.support-card,
.detail-card,
.mini-stat-card {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(28, 26, 23, 0.08);
  box-shadow: 0 24px 60px rgba(43, 58, 103, 0.08);
}

.support-card {
  border-radius: 26px;
  padding: 28px;
  position: sticky;
  top: 28px;
}

.support-card-head h2,
.detail-card h2 {
  margin: 0 0 8px;
  font-size: 2rem;
}

.support-card-head p {
  margin: 0 0 20px;
}

.mode-switch.large {
  margin-bottom: 18px;
}

.mode-switch.large .mode-button {
  border-radius: 999px;
  padding-inline: 20px;
}

.amount-grid.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.payment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 20px;
}

.payment-button {
  border: 1px solid rgba(43, 58, 103, 0.2);
  background: rgba(43, 58, 103, 0.04);
  color: var(--indigo);
  padding: 14px 16px;
  font: inherit;
  cursor: pointer;
  transition: 180ms ease;
}

.payment-button.active {
  color: #fff;
  border-color: var(--indigo);
  background: var(--indigo);
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 16px 0 0;
  color: var(--text-soft);
  line-height: 1.5;
}

.checkbox-row input {
  width: auto;
  margin-top: 2px;
}

.consent-row {
  margin-bottom: 22px;
}

.support-submit {
  border-radius: 999px;
  background: linear-gradient(90deg, #32457c, #425998);
  border-color: transparent;
}

.support-submit:hover {
  background: linear-gradient(90deg, #24335f, #32457c);
}

.mosque-stats-row {
  margin: 24px 0 28px;
  flex-wrap: wrap;
}

.mini-stat-card {
  flex: 1 1 180px;
  padding: 22px 24px;
  border-radius: 22px;
}

.mini-stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.65rem;
}

.mini-stat-card.wide {
  flex-basis: 280px;
}

.detail-main-column {
  min-width: 0;
}

.detail-card {
  border-radius: 28px;
  padding: 28px;
  margin-bottom: 24px;
}

.story-copy p {
  line-height: 1.8;
  margin: 0 0 16px;
}

.expense-list,
.document-list,
.supporter-list {
  display: grid;
  gap: 12px;
}

.expense-row,
.supporter-row,
.document-row {
  padding: 16px 18px;
  border-radius: 18px;
  background: #f7f7f4;
  border: 1px solid rgba(28, 26, 23, 0.06);
}

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

.supporter-row {
  align-items: center;
}

.supporter-row strong,
.legal-row strong {
  display: block;
  margin-bottom: 4px;
}

.supporter-row mark {
  background: rgba(43, 58, 103, 0.12);
  color: var(--indigo);
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
}

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

.gallery-card,
.partner-card {
  margin: 0;
  border-radius: 20px;
  overflow: hidden;
  background: #f7f7f4;
  border: 1px solid rgba(28, 26, 23, 0.06);
}

.gallery-card-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.gallery-card img,
.partner-card img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.gallery-card figcaption,
.partner-card span {
  display: block;
  padding: 12px 14px;
}

.gallery-lightbox[hidden] {
  display: none;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(11, 17, 33, 0.88);
}

.gallery-lightbox-dialog {
  width: min(100%, 1240px);
  max-height: 100%;
  display: grid;
  gap: 14px;
}

.gallery-lightbox-dialog img {
  width: 100%;
  max-height: calc(100vh - 140px);
  border-radius: 24px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.04);
}

.gallery-lightbox-caption {
  margin: 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.82);
}

.gallery-lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 12px 18px;
  font: inherit;
  cursor: pointer;
}

body.is-locked {
  overflow: hidden;
}

.support-tabs {
  max-width: none;
  margin: 0;
}

.legal-grid {
  display: grid;
  gap: 12px;
}

.legal-row {
  align-items: flex-start;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(28, 26, 23, 0.08);
}

.legal-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.document-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.document-row span:last-child {
  color: var(--indigo);
  font-weight: 700;
}

.partner-card {
  display: block;
  text-align: center;
  padding-bottom: 8px;
}

.partner-card strong {
  display: block;
  padding: 36px 14px 18px;
  font-size: 1.1rem;
}

.subscribe-button {
  padding: 12px 20px;
  border-radius: 999px;
}

@media (max-width: 1200px) {
  .mosque-detail-grid {
    grid-template-columns: 1fr;
  }

  .support-card {
    position: static;
  }
}

@media (max-width: 768px) {
  .supporter-list.two-columns,
  .gallery-grid,
  .partners-grid,
  .payment-grid,
  .amount-grid.compact {
    grid-template-columns: 1fr;
  }

  .hero-progress-summary,
  .mosque-stats-row,
  .profile-list-card,
  .section-split,
  .supporter-row,
  .expense-row,
  .legal-row {
    flex-direction: column;
  }

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

  .detail-card,
  .support-card {
    padding: 22px;
    border-radius: 22px;
  }

  .gallery-lightbox {
    padding: 20px;
  }

  .gallery-lightbox-dialog img {
    max-height: calc(100vh - 120px);
  }

  .gallery-lightbox-close {
    top: 16px;
    right: 16px;
    padding: 10px 14px;
  }
}
