/* Gollen Soyah website.
   Red and green are measured from the logo (the colors of the flag of Guinea) and used sparingly.
   The header follows the layout of the haalipularnj.org header, with nothing from the masjid. */

:root {
  --green: #086e1b;
  --green-dark: #065816;
  --red: #cb0b12;
  --text: #202837;
  --muted: #5a6272;
  --border: #dddddd;
  --hairline: rgba(32, 40, 55, 0.12);
  --light: #f3f3f3;
  --sans: "Work Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --wordmark: "Instrument Serif", Georgia, serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

/* English or French: the EN | FR switch sets <html lang>, and the other language is hidden. */
html[lang="en"] [lang="fr"],
html[lang="fr"] [lang="en"] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }

body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font: 18px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  /* keeps the footer at the bottom of the screen on short pages */
  display: flex; flex-direction: column; min-height: 100vh;
}
.page { flex: 1 0 auto; width: 100%; }

img { display: block; max-width: 100%; height: auto; }

a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: var(--red); }

h1, h2 { line-height: 1.2; }

p { margin: 0 0 0.75em; }

.wrap { max-width: 1060px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }

.skip-link {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  padding: 8px 12px; background: #fff; color: var(--green);
}
.skip-link:focus { left: 8px; }

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

/* ---------- Header ---------- */

.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--hairline); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 72px; }

.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-logo { flex: none; }
.brand-logo img { height: 44px; width: auto; border-radius: 4px; transition: opacity 0.15s; }
.brand-logo:hover img { opacity: 0.8; }
.brand-name { font: 24px/1 var(--wordmark); color: var(--text); text-decoration: none; white-space: nowrap; transition: color 0.15s; }
.brand-name:hover { color: var(--red); }

.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav a {
  position: relative; padding: 4px 0;
  font-size: 14px; font-weight: 500; color: var(--muted); text-decoration: none; white-space: nowrap;
  transition: color 0.15s;
}
.site-nav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 100%; height: 1px;
  background: var(--text); transform: scaleX(0); transform-origin: left; transition: transform 0.2s;
}
.site-nav a:hover, .site-nav a:focus-visible, .site-nav a[aria-current="page"] { color: var(--text); }
.site-nav a:hover::after, .site-nav a:focus-visible::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 10px; }

.lang-switch { display: flex; align-items: center; font-size: 14px; color: var(--muted); }
.lang-switch button { padding: 8px 6px; background: none; border: 0; font: 600 14px/1 var(--sans); color: var(--muted); cursor: pointer; }
.lang-switch button:hover { color: var(--text); }
.lang-switch button[aria-pressed="true"] { color: var(--text); text-decoration: underline; text-underline-offset: 4px; }
html:not(.js) .lang-switch { display: none; }

.button {
  display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 20px;
  font: 500 14px/1 var(--sans); color: #fff; background: var(--green); text-decoration: none;
  transition: background-color 0.15s;
}
.button:hover, .button:focus-visible { color: #fff; background: var(--green-dark); }

.menu-toggle { display: none; margin-right: -8px; padding: 8px; background: none; border: 0; color: var(--text); cursor: pointer; }
.menu-toggle svg { display: block; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

.mobile-nav { border-top: 1px solid var(--hairline); background: #fff; }
.mobile-nav ul { list-style: none; margin: 0; padding: 8px 0 0; }
.mobile-nav li + li { border-top: 1px solid rgba(32, 40, 55, 0.1); }
.mobile-nav li a { display: flex; align-items: center; min-height: 56px; font-size: 18px; color: var(--text); text-decoration: none; }
.mobile-nav li a[aria-current="page"] { font-weight: 600; color: var(--red); }
.mobile-nav-email { margin: 0; padding: 12px 0 18px; font-size: 15px; }
.mobile-nav-email a { color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  .site-nav a, .site-nav a::after, .button, .brand-name, .brand-logo img { transition: none; }
}

/* ---------- Pages ---------- */

.page { padding-top: 28px; padding-bottom: 40px; }
.page:focus { outline: none; }

/* Home: text on the left, the three boxes on the right.
   (Without JavaScript every block shows, in this same layout.) */
.page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  grid-template-rows: auto auto auto 1fr;
  grid-template-areas:
    "content next"
    "content dues"
    "content contact"
    "content .";
  column-gap: 40px;
}
.content { grid-area: content; }
.box-next { grid-area: next; }
.box-dues { grid-area: dues; }
.box-contact { grid-area: contact; }

/* The other pages use the same layout: the text on the left, the page's box (if it has one) on the right. */

.content section { margin-bottom: 28px; }
.content h2 { margin: 0 0 10px; font-size: 1.5rem; font-weight: 600; letter-spacing: -0.01em; color: var(--text); }

.projects { width: 100%; margin: 0 0 10px; border-collapse: collapse; border: 1px solid var(--border); }
.projects th { padding: 8px 12px; text-align: left; font-size: 14px; font-weight: 600; color: var(--text); background: var(--light); border-bottom: 1px solid var(--border); }
.projects td { padding: 10px 12px; vertical-align: top; border-top: 1px solid var(--border); }
.projects td:first-child { font-weight: 600; color: var(--red); white-space: nowrap; }

/* Leadership: one card per person (empty for now) */
.team { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.team li { padding: 12px 14px; border: 1px solid var(--border); }
.team-name { display: block; font-weight: 600; }
.team-role { display: block; font-size: 0.9em; color: var(--muted); }

.steps { margin: 0 0 0.75em; padding-left: 1.4em; }
.steps li { margin: 0 0 6px; padding-left: 4px; }
.steps li::marker { font-weight: 600; color: var(--red); }

/* ---------- Boxes: white, with a light grey heading (red for the next meeting) ---------- */

.box { margin-bottom: 18px; background: #fff; border: 1px solid var(--border); }
.box h2 { margin: 0; padding: 8px 14px; font-size: 1rem; font-weight: 600; color: var(--text); background: var(--light); border-bottom: 1px solid var(--border); }
.box-next h2 { color: #fff; background: var(--red); border-bottom-color: var(--red); }
.box-body { padding: 12px 14px 2px; font-size: 1rem; }
.next-date { margin-bottom: 4px; font-size: 1.3rem; font-weight: 600; line-height: 1.25; color: var(--text); }
.next-time { font-size: 1.1rem; font-weight: 600; }
.box-note { font-style: italic; color: var(--muted); }
.dues-amount { margin-bottom: 0; font-size: 2rem; font-weight: 600; line-height: 1.15; color: var(--red); }
.dues-amount small { font-size: 1rem; font-weight: 400; color: var(--text); }
.dues-year { color: var(--muted); }

/* ---------- Footer ---------- */

.footer { background: var(--light); color: var(--muted); border-top: 1px solid var(--border); font-size: 15px; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; padding-top: 14px; padding-bottom: 14px; }
.footer p { margin: 0; }
.footer a { color: var(--text); }
.footer a:hover { color: var(--red); }

/* ---------- Wide screens: the phone menu never shows ---------- */

@media (min-width: 1024px) {
  .mobile-nav { display: none !important; }
}

/* ---------- Below 1024px: menu button instead of the links ---------- */

@media (max-width: 1023px) {
  .js .site-nav { display: none; }
  .js .menu-toggle { display: block; }
  /* Without JavaScript the links wrap under the name instead. */
  html:not(.js) .header-row { flex-wrap: wrap; height: auto; padding-top: 12px; padding-bottom: 12px; row-gap: 8px; }
  html:not(.js) .site-nav { order: 3; width: 100%; flex-wrap: wrap; gap: 6px 20px; }
}

/* ---------- Tablets: on Home, the three boxes in a row above the text ---------- */

@media (max-width: 899px) {
  .page {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: auto auto;
    grid-template-areas:
      "next dues contact"
      "content content content";
    column-gap: 14px;
    padding-top: 20px;
  }
  .box { margin-bottom: 24px; }
  /* Other pages: one column, with the box under the text */
  body.inner .page { display: block; }
  body.inner .content { max-width: 720px; }
  body.inner .box { max-width: 460px; }
}

/* ---------- Phones: one column ---------- */

@media (max-width: 699px) {
  .page {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    grid-template-areas: "next" "content" "dues" "contact";
  }
  .box { margin-bottom: 18px; }
  .box-next { margin-bottom: 22px; }
}

@media (max-width: 640px) {
  html { scroll-padding-top: 76px; }
  .js .header-row { height: 64px; }
  .brand-logo img { height: 40px; }
  .brand-name { font-size: 21px; }
  .button { height: 38px; padding: 0 14px; }
}

@media (max-width: 479px) {
  /* "Join us" is in the menu on small phones */
  .js .header-actions .button { display: none; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .content h2 { font-size: 1.35rem; }
  .projects th, .projects td { padding-left: 8px; padding-right: 8px; }
}
