/* The Shluchim Office — shared stylesheet
   Base, header and footer. Page-specific styles live in assets/pages/<page>.css
   Palette and spacing are all in the :root block below, change them once here. */

:root {
  --accent: #a3455d;
  --accent-dk: #7e3246;
  --tint: #f6e9ed;
  --pink: #e7a9b8;
  --bg: #f6f4f1;
  --line: #ebe8e2;
  --ink: #1b1f24;
  --text: #4a5058;
  --muted: #767b83;
  --dark: #1e1a1c;
  --dark-text: #d9d4d6;
  --dark-muted: #b9b2b5;
  --wrap: 1200px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  font-family: Heebo, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dk); }
img { max-width: 100%; height: auto; display: block; border: 0; }
input, select, textarea, button { font-family: inherit; }
h1, h2, h3, p, ul { margin: 0; padding: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* ---------------------------------------------------------------- header */

.sh {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.sh-in {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: env(safe-area-inset-top) 20px 0;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.sh-logo { display: flex; align-items: center; }
.sh-logo img { height: 40px; width: auto; }

.sh-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.sh-nav > a,
.sh-dept {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink);
  cursor: pointer;
}
.sh-nav > a:hover,
.sh-dept:hover { background: #f3f1ed; color: var(--ink); }
.sh-dept[aria-expanded="true"] { background: #f7eaee; color: var(--accent); }

.sh-caret {
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform .2s, margin-top .2s;
}
.sh-dept[aria-expanded="true"] .sh-caret { transform: rotate(225deg); margin-top: 3px; }

.sh-login {
  height: 40px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}
.sh-login:hover { background: var(--accent); color: #fff; }

/* burger, shown under 820px */
.sh-burger {
  display: none;
  margin-left: auto;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.sh-burger span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform .2s, opacity .2s;
}
.sh-burger[aria-expanded="true"] { background: #f3f1ed; }
.sh-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.sh-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.sh-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* departments mega panel */
.sh-mega { position: absolute; left: 0; right: 0; top: 100%; padding: 10px 20px 0; }
.sh-mega[hidden] { display: none; }
.sh-mega-in {
  max-width: 1160px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(27, 31, 36, .12);
  padding: 12px;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 12px;
}
.sh-groups {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  background: #f8f7f4;
  border-radius: 16px;
}
.sh-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background .12s, color .12s;
}
.sh-group i { font-style: normal; font-size: 14px; opacity: 0; transition: opacity .12s; }
.sh-group:hover { background: #efeae9; color: var(--accent-dk); }
.sh-group.is-on {
  background: #fff;
  color: var(--accent);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(27, 31, 36, .08);
}
.sh-group.is-on i { opacity: 1; }

.sh-panels { padding: 14px 10px; }
.sh-panel { flex-direction: column; gap: 10px; display: flex; }
.sh-panel[hidden] { display: none; }
.sh-panel-title {
  padding: 0 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.sh-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
.sh-links a {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px;
  border-radius: 12px;
  color: var(--ink);
}
.sh-links a:hover { background: #faf3f5; color: var(--ink); }
.sh-links b { font-size: 15px; font-weight: 600; }
.sh-links span { font-size: 13px; line-height: 1.45; color: #6b7078; }

/* mobile menu */
.sh-mnav {
  border-top: 1px solid var(--line);
  background: #fff;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  padding: 8px 20px 24px;
  flex-direction: column;
  display: flex;
}
.sh-mnav[hidden] { display: none; }
.sh-m-link {
  padding: 16px 0;
  border-bottom: 1px solid #f1eee9;
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
}
.sh-m-dept {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 16px 0;
  border: 0;
  border-bottom: 1px solid #f1eee9;
  background: none;
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.sh-m-fold { flex-direction: column; gap: 4px; padding: 10px 0; border-bottom: 1px solid #f1eee9; display: flex; }
.sh-m-fold[hidden] { display: none; }
.sh-m-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.sh-m-group[aria-expanded="true"] { background: #faf3f5; color: var(--accent); }
.sh-m-sign { font-size: 18px; font-weight: 400; }
.sh-m-group[aria-expanded="true"] .sh-m-sign::before { content: "\2212"; }
.sh-m-group[aria-expanded="false"] .sh-m-sign::before { content: "+"; }
.sh-m-links { flex-direction: column; padding: 4px 0 8px 14px; display: flex; }
.sh-m-links[hidden] { display: none; }
.sh-m-links a { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; color: var(--ink); }
.sh-m-links b { font-size: 15px; font-weight: 500; }
.sh-m-links span { font-size: 13px; color: #6b7078; }
.sh-m-login {
  margin-top: 20px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}

@media (max-width: 819px) {
  .sh-in { height: 80px; }
  .sh-logo img { height: 46px; }
  .sh-nav, .sh-login, .sh-mega { display: none !important; }
  .sh-burger { display: flex; }
}
@media (min-width: 820px) {
  .sh-mnav { display: none !important; }
}
@media (max-width: 900px) {
  .sh-mega-in { grid-template-columns: minmax(0, 1fr); }
  .sh-links { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------------------------------------------------------- footer */

.sf { background: var(--dark); color: var(--dark-text); }
.sf a { color: var(--dark-text); }
.sf a:hover { color: #fff; }

.sf-main {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(36px, 8vw, 56px) 20px clamp(28px, 6vw, 40px);
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
}
.sf-about { display: flex; flex-direction: column; gap: 18px; flex: 2 1 320px; min-width: 0; max-width: 460px; }
.sf-about img { height: clamp(42px, 10vw, 52px); width: auto; }
.sf-about p { font-size: 15px; line-height: 1.6; color: var(--dark-muted); text-wrap: pretty; }
.sf-contact { display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.sf-contact a:first-child { color: #fff; font-weight: 600; }
.sf-contact a:hover { color: var(--pink); }
.sf-social { display: flex; gap: 10px; flex-wrap: wrap; }
.sf-social a {
  height: 38px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #3d3538;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
}
.sf-social a:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.sf-col { display: flex; flex-direction: column; gap: 11px; flex: 1 1 140px; font-size: 15px; }
.sf-col b {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--pink);
}
.sf-col span { line-height: 1.6; }
.sf-col .sf-inquiry { color: #fff; font-weight: 600; }
.sf-col .sf-inquiry:hover { color: var(--pink); }
.sf-bar { border-top: 1px solid #332c2f; }
.sf-bar div {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  gap: 6px 24px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #8f878a;
}
.sf-bar a { color: #8f878a; }
.sf-bar a:hover { color: #fff; }

@media (max-width: 640px) {
  .sf-main { flex-direction: column; align-items: center; text-align: center; gap: 22px; }
  .sf-about { align-items: center; }
  .sf-contact, .sf-col { align-items: center; }
  .sf-bar div { justify-content: center; text-align: center; }
}
