/* =========================================================
   SMC Mosque — Main Stylesheet
   ========================================================= */

:root {
  --primary:      #2b6e54;   /* deep Islamic garden green */
  --primary-dark: #1c4f3c;   /* richer, darker green */
  --accent:       #c8782a;   /* warm saffron-amber — lanterns, Islamic arts */
  --bg:           #faf5ec;   /* warm parchment */
  --white:        #ffffff;
  --text:         #1e1c18;   /* warm near-black */
  --text-light:   #6b6258;   /* warm taupe */
  --border:       #e3d8cb;   /* warm sandy border */
  --shadow:       0 2px 8px rgba(20, 10, 0, 0.10);
  --radius:       8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* ── Navigation ─────────────────────────────────────────── */

header {
  background: var(--primary);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-brand {
  color: white;
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-logo {
  height: 32px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s;
}

.nav-links a:hover,
.nav-links a.active {
  color: white;
}

/* hamburger — hidden on desktop */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: white;
  border-radius: 2px;
}

/* ── Hero ───────────────────────────────────────────────── */

.hero {
  background: linear-gradient(145deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: white;
  padding: 4.5rem 1.5rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  /* 8-pointed star (khatam) tessellation — Moroccan/Islamic geometric pattern.
     Each 100×100 tile: star outline + inner octagon + 8 arms that connect
     to adjacent tiles' star tips, creating a continuous interlocking grid. */
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cpolygon points='50,13 55.74,36.14 76.16,23.84 63.86,44.26 87,50 63.86,55.74 76.16,76.16 55.74,63.86 50,87 44.26,63.86 23.84,76.16 36.14,55.74 13,50 36.14,44.26 23.84,23.84 44.26,36.14' fill='none' stroke='rgba(255,255,255,0.07)' stroke-width='1.5'/%3E%3Cpolygon points='55.74,36.14 63.86,44.26 63.86,55.74 55.74,63.86 44.26,63.86 36.14,55.74 36.14,44.26 44.26,36.14' fill='none' stroke='rgba(255,255,255,0.05)' stroke-width='1'/%3E%3Cline x1='50' y1='13' x2='50' y2='0' stroke='rgba(255,255,255,0.05)' stroke-width='1.5'/%3E%3Cline x1='87' y1='50' x2='100' y2='50' stroke='rgba(255,255,255,0.05)' stroke-width='1.5'/%3E%3Cline x1='50' y1='87' x2='50' y2='100' stroke='rgba(255,255,255,0.05)' stroke-width='1.5'/%3E%3Cline x1='13' y1='50' x2='0' y2='50' stroke='rgba(255,255,255,0.05)' stroke-width='1.5'/%3E%3Cline x1='76.16' y1='23.84' x2='100' y2='0' stroke='rgba(255,255,255,0.04)' stroke-width='1'/%3E%3Cline x1='76.16' y1='76.16' x2='100' y2='100' stroke='rgba(255,255,255,0.04)' stroke-width='1'/%3E%3Cline x1='23.84' y1='76.16' x2='0' y2='100' stroke='rgba(255,255,255,0.04)' stroke-width='1'/%3E%3Cline x1='23.84' y1='23.84' x2='0' y2='0' stroke='rgba(255,255,255,0.04)' stroke-width='1'/%3E%3C/svg%3E") repeat;
  pointer-events: none;
}

.hero-inner {
  position: relative;
}

.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  margin-bottom: 0.4rem;
  letter-spacing: -0.02em;
}

.hero .subtitle {
  font-size: 1.05rem;
  opacity: 0.85;
  margin-bottom: 0.5rem;
}

.hero .address {
  font-size: 0.875rem;
  opacity: 0.65;
}

/* ── Layout ─────────────────────────────────────────────── */

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 3rem 0 0;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0.2rem;
}

.section-subtitle {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 1.75rem;
}

/* ── Prayer Times ───────────────────────────────────────── */

.today-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(46, 125, 94, 0.15);
  border: 2px solid var(--primary);
}

.today-card-header {
  background: var(--primary);
  color: white;
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  border-radius: calc(var(--radius) - 2px) calc(var(--radius) - 2px) 0 0;
}

.today-card-header .day-label {
  font-size: 1.1rem;
  font-weight: 700;
}

.today-card-header .hijri {
  font-size: 0.8rem;
  opacity: 0.8;
}

/* Weekly tabs */
.week-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.week-tab {
  padding: 0.35rem 0.9rem;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 500;
  background: white;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: all 0.15s;
}

.week-tab.active,
.week-tab:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.week-day-panel {
  display: none;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.week-day-panel.active {
  display: block;
}

.week-day-header {
  background: #f2f8f5;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.week-day-header .date {
  font-weight: 600;
  color: var(--primary-dark);
  font-size: 0.9rem;
}

/* Prayer table */
.prayer-table {
  width: 100%;
  border-collapse: collapse;
}

.prayer-table th {
  padding: 0.45rem 1rem;
  text-align: left;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-light);
  background: #faf7f2;
  border-bottom: 1px solid var(--border);
}

.prayer-table td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.prayer-table tr:last-child td {
  border-bottom: none;
}

.prayer-table .prayer-name {
  font-weight: 600;
  color: var(--primary-dark);
  width: 38%;
}

/* Jumu'ah badge strip */
.jummuah-strip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.65rem 1rem;
  background: #eef7f3;
  border-top: 1px solid #c5e3d5;
}

.jummuah-strip .label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary-dark);
}

.jummuah-badge {
  background: var(--primary);
  color: white;
  padding: 0.15rem 0.6rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
}


/* No-data placeholder */
.no-data {
  padding: 2rem;
  text-align: center;
  color: var(--text-light);
  background: white;
  border-radius: var(--radius);
  border: 1px dashed var(--border);
}

/* ── Cards ──────────────────────────────────────────────── */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.card .card-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.card h3 {
  font-size: 1.05rem;
  color: var(--primary-dark);
  margin-bottom: 0.4rem;
}

.card .meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.card .meta-tag {
  background: #eef7f3;
  color: var(--primary-dark);
  padding: 0.15rem 0.6rem;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
}

.card p {
  font-size: 0.875rem;
  color: var(--text-light);
  line-height: 1.65;
}

/* ── Buttons ────────────────────────────────────────────── */

.btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

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

.btn-accent {
  background: var(--accent);
  color: #1a1614;
  border-color: var(--accent);
}

.btn-accent:hover {
  background: #b36720;
  color: white;
  border-color: #b36720;
}

.btn-outline {
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

/* ── Donate Banner ──────────────────────────────────────── */

.donate-banner {
  background: linear-gradient(135deg, #1a2e22 0%, #2b6e54 100%);
  color: white;
  padding: 4rem 1.5rem;
  text-align: center;
  margin-left: -1.5rem;
  margin-right: -1.5rem;
}

.donate-banner h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.donate-banner p {
  opacity: 0.85;
  max-width: 580px;
  margin: 0 auto 1.75rem;
  font-size: 0.95rem;
}

/* ── Page Header (inner pages) ──────────────────────────── */

.page-header {
  background: var(--primary-dark);
  color: white;
  padding: 3rem 1.5rem 2.5rem;
}

.page-header h1 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.page-header p {
  opacity: 0.8;
  font-size: 0.95rem;
}

/* ── Info Sections ──────────────────────────────────────── */

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.info-block {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem;
}

.info-block h3 {
  color: var(--primary-dark);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #eef7f3;
}

.info-block p,
.info-block address {
  font-size: 0.875rem;
  line-height: 1.8;
  color: var(--text-light);
  font-style: normal;
}

.info-block a {
  color: var(--primary);
  text-decoration: none;
}

.info-block a:hover {
  text-decoration: underline;
}

.program-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem;
  border-left: 4px solid var(--primary);
  margin-bottom: 1.25rem;
}

.program-card h3 {
  font-size: 1.1rem;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
}

.program-card .meta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.program-card .meta-tag {
  background: #eef7f3;
  color: var(--primary-dark);
  padding: 0.2rem 0.65rem;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
}

.program-card p {
  font-size: 0.875rem;
  color: var(--text-light);
  line-height: 1.7;
}

/* ── Leader Cards ───────────────────────────────────────── */

.leader-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

.leader-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem 1.5rem;
  text-align: center;
}

.leader-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: #eef7f3;
  border: 2px solid var(--border);
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.leader-role {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.3rem;
}

.leader-card h3 {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 0.6rem;
}

.leader-contact {
  font-size: 0.875rem;
  color: var(--primary);
  text-decoration: none;
}

.leader-contact:hover {
  text-decoration: underline;
}

/* ── Footer ─────────────────────────────────────────────── */

footer {
  margin-top: 3rem;
  background: #1a2820;
  color: rgba(255, 255, 255, 0.65);
  padding: 3rem 1.5rem 1.5rem;
}

footer.has-banner {
  padding-top: 0;
}

footer.has-banner .footer-grid {
  padding-top: 3rem;
}

.footer-grid {
  max-width: 1100px;
  margin: 0 auto 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 2rem;
}

footer h4 {
  color: white;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.85rem;
}

footer p,
footer address {
  font-size: 0.825rem;
  font-style: normal;
  line-height: 1.9;
}

footer a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
}

footer a:hover {
  color: white;
}

.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
  text-align: center;
}

/* ── Responsive ─────────────────────────────────────────── */

@media (max-width: 700px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--primary-dark);
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
  }

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

  .nav-links li a {
    display: block;
    padding: 0.75rem 1.5rem;
  }

  .nav-toggle {
    display: flex;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }
}