:root {
  --green: #239f40;
  --red: #da0000;
  --gold: #ffbb26;
  --gold-deep: #c98b0a;
  --ink: #1a1a1a;
  --paper: #fbfaf6;
  --muted: #5a5a5a;
  --line: #e6e2d6;
  --maxw: 1080px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }

/* Tricolour bar */
.flag-bar {
  height: 6px;
  background: linear-gradient(
    to bottom,
    var(--green) 0 33.33%,
    var(--gold) 33.33% 66.66%,
    var(--red) 66.66% 100%
  );
}

/* Header */
header.site {
  background: #fff;
  border-bottom: 1px solid var(--line);
}
header.site .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand .mark {
  width: 52px; height: 52px;
  display: block;
  flex-shrink: 0;
}
.brand .mark img,
.brand .mark svg { width: 100%; height: 100%; display: block; }

.hero-emblem {
  width: clamp(120px, 18vw, 180px);
  height: auto;
  display: block;
  margin: 0 0 1.25rem;
}

/* Form / lookup widget */
.lookup {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 6px solid var(--green);
  border-radius: 6px;
  padding: 1.5rem;
  margin: 1.5rem 0 2rem;
}
.lookup h3 { margin-top: 0; }
.lookup .field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.9rem;
}
.lookup label {
  font-weight: 600;
  font-size: 0.92rem;
}
.lookup input[type="text"],
.lookup textarea {
  font: inherit;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  resize: vertical;
}
.lookup input[type="text"]:focus,
.lookup textarea:focus {
  outline: 2px solid var(--green);
  outline-offset: 1px;
}
.lookup .row-inline {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
  flex-wrap: wrap;
}
.lookup .row-inline input { flex: 1 1 200px; }
.lookup .status {
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0.5rem 0;
  min-height: 1.2em;
}
.lookup .status.error { color: var(--red); }
.lookup .mp-card {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 0.9rem 1rem;
  border-radius: 4px;
  margin: 0.5rem 0 1rem;
}
.lookup .mp-card strong { font-size: 1.05rem; }
.lookup .mp-card .meta { color: var(--muted); font-size: 0.9rem; }
.lookup button[type="button"] {
  font: inherit;
}
.brand .name { font-weight: 700; font-size: 1.05rem; line-height: 1.1; }
.brand .sub { font-size: 0.78rem; color: var(--muted); }

nav.primary ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: 1.25rem; flex-wrap: wrap;
}
nav.primary a {
  color: var(--ink);
  font-weight: 500;
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
}
nav.primary a:hover { color: var(--red); text-decoration: none; }
nav.primary a.active { border-bottom-color: var(--red); }

.lang-toggle {
  font: inherit;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
  margin-left: 0.5rem;
}
.lang-toggle:hover {
  border-color: var(--ink);
  background: var(--paper);
}

/* RTL adjustments for Persian */
[dir="rtl"] body {
  font-family: "Vazirmatn", "Iranian Sans", "Tahoma", "Inter", sans-serif;
}
[dir="rtl"] .lang-toggle { margin-left: 0; margin-right: 0.5rem; }
[dir="rtl"] .brand { flex-direction: row-reverse; }
[dir="rtl"] .meet-card { padding: 1.5rem 1.75rem 1.5rem 1.5rem; }
[dir="rtl"] .meet-card::before { left: auto; right: 0; }
[dir="rtl"] .meet-card .when {
  padding-right: 0;
  padding-left: 1.25rem;
  border-right: 0;
  border-left: 1px solid var(--line);
}
[dir="rtl"] .news-item .date,
[dir="rtl"] .lookup .mp-card .meta { direction: rtl; }
[dir="rtl"] pre.letter {
  /* Letters stay in English left-to-right even when UI is RTL */
  direction: ltr;
  text-align: left;
}

/* Hero */
.hero {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.72), rgba(255,255,255,0.92)),
    radial-gradient(circle at 12% 18%, rgba(35,159,64,0.40), transparent 50%),
    radial-gradient(circle at 88% 28%, rgba(255,187,38,0.45), transparent 55%),
    radial-gradient(circle at 50% 95%, rgba(218,0,0,0.32), transparent 55%);
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 6px;
  background: linear-gradient(
    to right,
    var(--green) 0 33.33%,
    var(--gold) 33.33% 66.66%,
    var(--red) 66.66% 100%
  );
}
.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  line-height: 1.1;
  margin: 0 0 1rem;
}
.hero .lede {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 38rem;
  margin: 0 0 1.75rem;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn {
  display: inline-block;
  padding: 0.85rem 1.25rem;
  border-radius: 4px;
  font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: #b00000; text-decoration: none; color: #fff; }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: #fff; text-decoration: none; }
.btn[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
  cursor: not-allowed;
}

/* Meet card */
.meet-card {
  margin-top: 2.5rem;
  background: #fff;
  border: 1px solid var(--line);
  padding: 1.5rem 1.5rem 1.5rem 1.75rem;
  border-radius: 6px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  align-items: center;
  box-shadow: 0 8px 24px -14px rgba(0,0,0,0.25);
  position: relative;
  overflow: hidden;
}
.meet-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 8px;
  background: linear-gradient(
    to bottom,
    var(--green) 0 33.33%,
    var(--gold) 33.33% 66.66%,
    var(--red) 66.66% 100%
  );
}
.meet-card .when {
  text-align: center;
  padding-right: 1.25rem;
  border-right: 1px solid var(--line);
}
.meet-card .when .day {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--red);
  font-weight: 700;
}
.meet-card .when .time { font-size: 1.4rem; font-weight: 700; }
.meet-card .where strong { font-size: 1.1rem; }
.meet-card .where { color: var(--muted); }

/* Page content */
main.page { padding: 3rem 0; }
main.page h1 { margin-top: 0; font-size: clamp(1.8rem, 3.5vw, 2.4rem); }
main.page h2 { margin-top: 2rem; }

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 6px solid var(--gold);
  padding: 1.5rem;
  border-radius: 6px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.02), 0 6px 18px -12px rgba(0,0,0,0.15);
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.02), 0 12px 22px -12px rgba(0,0,0,0.22);
}
.card h3 { margin-top: 0; }
.card h3::after {
  content: "";
  display: block;
  width: 36px; height: 3px;
  margin-top: 0.4rem;
  background: currentColor;
  opacity: 0.35;
}
.card--green { border-top-color: var(--green); }
.card--green h3 { color: var(--green); }
.card--gold  { border-top-color: var(--gold);  }
.card--gold  h3 { color: var(--gold-deep); }
.card--red   { border-top-color: var(--red);   }
.card--red   h3 { color: var(--red); }

a.section-card {
  display: block;
  color: var(--ink);
  text-decoration: none;
}
a.section-card:hover {
  text-decoration: none;
  transform: translateY(-3px);
}
a.section-card h3 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}
a.section-card p { color: var(--ink); }

/* Share row */
.share {
  margin: 1.5rem 0;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}
.share .share-label {
  font-size: 0.9rem;
  color: var(--muted);
  margin-right: 0.25rem;
}
.share a, .share button {
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.share a:hover, .share button:hover {
  border-color: var(--ink);
  background: var(--paper);
  text-decoration: none;
}
.share .share-wa  { color: #1f8a3e; }
.share .share-tg  { color: #2391d6; }
.share .share-x   { color: #1a1a1a; }
.share .share-fb  { color: #166fe5; }
.share .share-em  { color: #c9810a; }

/* Coloured callout banners */
.banner {
  border-radius: 6px;
  padding: 1.5rem 1.75rem;
  color: #fff;
  margin: 1.5rem 0;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 6px 18px -12px rgba(0,0,0,0.25);
}
.banner h2 { color: #fff; }
.banner--green { background: linear-gradient(135deg, #2bb04b, #1e7f33); }
.banner--gold  { background: linear-gradient(135deg, #ffc94a, #d99700); color: #2a1a00; }
.banner--gold h2 { color: #2a1a00; }
.banner--red   { background: linear-gradient(135deg, #ec1f1f, #a40000); }

/* FAQ accordion */
.faq {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 6px;
  padding: 0.85rem 1.1rem;
  margin: 0.5rem 0;
}
.faq summary {
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  color: var(--gold-deep);
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
}
.faq[open] summary::after { content: "−"; }
.faq[open] { border-left-color: var(--green); }
.faq p {
  margin: 0.6rem 0 0;
  color: var(--ink);
}

/* Tricolour divider */
.tri-divider {
  height: 4px;
  border: 0;
  border-radius: 2px;
  background: linear-gradient(
    to right,
    var(--green) 0 33.33%,
    var(--gold) 33.33% 66.66%,
    var(--red) 66.66% 100%
  );
  margin: 2.5rem 0;
}

/* News list */
.news-item {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}
.news-item:last-child { border-bottom: 0; }
.news-item .date {
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--muted);
}
.news-item h3 { margin: 0.25rem 0 0.5rem; }

/* Template letter block */
pre.letter {
  white-space: pre-wrap;
  background: #fff;
  border: 1px dashed var(--line);
  padding: 1.25rem;
  border-radius: 6px;
  font-family: "Georgia", serif;
  font-size: 0.98rem;
  line-height: 1.6;
}

/* Footer */
footer.site {
  margin-top: 4rem;
  background: var(--ink);
  color: #ddd;
  padding: 2.5rem 0 1.5rem;
  border-top: 6px solid transparent;
  border-image: linear-gradient(
    to right,
    var(--green) 0 33.33%,
    var(--gold) 33.33% 66.66%,
    var(--red) 66.66% 100%
  ) 1;
}
footer.site a { color: #fff; }
footer.site .cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}
footer.site h4 { color: #fff; margin: 0 0 0.5rem; }
footer.site .fine {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #333;
  font-size: 0.85rem;
  color: #999;
}

/* Utilities */
.placeholder {
  background: #fff7d6;
  border: 1px dashed var(--gold);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  font-size: 0.95em;
}
