:root {
  --ink: #171816;
  --muted: #5f625b;
  --line: #d9d7d0;
  --paper: #fbfaf7;
  --wash: #f1eee8;
  --deep: #12372d;
  --deep-2: #0e2922;
  --gold: #b68a47;
  --burgundy: #8d3636;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(23, 24, 22, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
}

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

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(217, 215, 208, 0.8);
  background: rgba(251, 250, 247, 0.94);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: min(580px, 48vw);
  text-align: left;
  text-decoration: none;
}

.brand img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.brand strong,
.brand small {
  display: block;
}

.brand-copy,
.brand-main,
.brand-leadership span {
  display: block;
}

.brand-copy {
  min-width: 0;
  text-align: left;
}

.brand strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.1;
}

.brand .hebrew-name {
  font-family: "adobe-hebrew", "Adobe Hebrew", "Noto Serif Hebrew", "Times New Roman", serif;
  font-size: 24px;
  letter-spacing: 0;
  text-align: left;
  unicode-bidi: isolate;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.brand .english-name {
  margin-top: 1px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.15;
}

.brand-leadership {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.brand-leadership b {
  color: var(--deep);
  font-weight: 800;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  font-size: 14px;
}

.nav-links a,
.button,
.form-row button,
.contact-form button {
  min-height: 42px;
  border-radius: 6px;
}

.nav-links a {
  padding: 10px 12px;
  text-decoration: none;
  color: var(--muted);
}

.nav-links a:hover {
  color: var(--ink);
  background: var(--wash);
}

.nav-links .nav-donate {
  color: var(--white);
  background: var(--deep);
}

.nav-links .nav-donate:hover {
  color: var(--white);
  background: var(--deep-2);
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  min-height: calc(100vh - 84px);
  padding: clamp(38px, 7vw, 82px) clamp(18px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  background: var(--wash);
}

.hero-copy {
  max-width: 650px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--burgundy);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 18px;
  font-size: clamp(46px, 7vw, 88px);
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(30px, 4vw, 48px);
}

h3 {
  margin-bottom: 16px;
  font-size: 24px;
}

.lede {
  max-width: 560px;
  color: var(--muted);
  font-size: clamp(18px, 2.2vw, 24px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid transparent;
  font-weight: 700;
  text-decoration: none;
}

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

.button.primary:hover {
  background: var(--deep-2);
}

.button.secondary {
  border-color: var(--line);
  color: var(--ink);
  background: var(--white);
}

.button.secondary:hover {
  border-color: var(--gold);
}

.week-summary {
  align-self: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 420px;
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.summary-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 14px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--white);
  background: var(--deep);
  font-size: 12px;
  font-weight: 700;
}

.status-pill.expired {
  background: var(--burgundy);
}

.week-name {
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 18px;
}

.quick-times,
.schedule-grid,
.donation-options {
  display: grid;
  gap: 14px;
}

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

.quick-time,
.time-item,
.announcement-item,
.donation-option {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.quick-time,
.time-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
}

.quick-time span,
.time-item span {
  color: var(--muted);
  font-size: 14px;
}

.quick-time strong,
.time-item strong {
  font-size: 24px;
  line-height: 1;
}

.content-band,
.split-section {
  padding: clamp(42px, 6vw, 76px) clamp(18px, 5vw, 72px);
}

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

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.section-heading.compact {
  margin-bottom: 20px;
}

.section-heading p:last-child {
  color: var(--muted);
  font-size: 17px;
}

.inline-link {
  display: inline-flex;
  margin-left: 8px;
  color: var(--deep);
  font-weight: 700;
}

.inline-link.no-margin {
  margin-left: 0;
}

.expired-notice {
  margin-bottom: 22px;
  padding: 14px 16px;
  border-left: 4px solid var(--burgundy);
  background: #fbf0ec;
  color: #602323;
  font-weight: 650;
}

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

.schedule-group {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.schedule-group h3 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.schedule-group h3::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.time-list {
  display: grid;
  gap: 10px;
}

.time-item {
  background: var(--white);
}

.split-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 52px);
  border-top: 1px solid var(--line);
}

.content-column {
  min-width: 0;
}

.announcement-list {
  display: grid;
  gap: 12px;
}

.announcement-item {
  padding: 18px;
}

.announcement-item strong {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
}

.announcement-item p {
  margin-bottom: 0;
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

table {
  width: 100%;
  min-width: 580px;
  border-collapse: collapse;
  font-size: 15px;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  vertical-align: top;
}

.shiur-button {
  border: 0;
  border-bottom: 1px solid var(--gold);
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.shiur-button:hover {
  color: var(--deep);
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

.hebrew-text {
  font-family: "adobe-hebrew", "Adobe Hebrew", "Noto Serif Hebrew", "Times New Roman", serif;
  direction: rtl;
  text-align: center;
  unicode-bidi: isolate;
}

.calendar-band {
  border-top: 1px solid var(--line);
  background: var(--white);
}

.calendar-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 14px;
}

.calendar-title-row h2,
.calendar-title-row p {
  margin-bottom: 0;
}

.calendar-title-row p {
  color: var(--muted);
  font-size: 22px;
  font-weight: 700;
}

.calendar-actions {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

.calendar-actions button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.calendar-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.34fr);
  gap: 24px;
  align-items: start;
}

.calendar-main,
.calendar-side {
  min-width: 0;
}

.calendar-wrap {
  overflow-x: auto;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(104px, 1fr));
  gap: 1px;
  min-width: 728px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.calendar-heading,
.calendar-day {
  background: var(--white);
}

.calendar-heading {
  padding: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.calendar-day {
  height: 150px;
  padding: 10px;
  overflow: hidden;
}

button.calendar-day {
  display: flex;
  flex-direction: column;
  width: 100%;
  border: 0;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

button.calendar-day:hover,
button.calendar-day.is-selected {
  outline: 2px solid var(--gold);
  outline-offset: -2px;
}

.calendar-day.is-empty {
  height: 150px;
  background: var(--paper);
}

.calendar-date {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.calendar-date strong {
  color: var(--ink);
  font-size: 20px;
}

.calendar-date span {
  font-size: 12px;
}

.calendar-event {
  flex: 0 0 auto;
  display: grid;
  gap: 2px;
  margin-top: 6px;
  padding: 7px;
  border-left: 3px solid var(--gold);
  border-radius: 5px;
  background: var(--wash);
  font-size: 12px;
  line-height: 1.25;
}

.calendar-event.jewish {
  border-left-color: var(--burgundy);
}

.calendar-event.shul {
  border-left-color: var(--deep);
}

.calendar-event strong {
  font-size: 12px;
}

.calendar-event span {
  color: var(--muted);
}

.more-events {
  display: block;
  margin-top: 8px;
  color: var(--deep);
  font-size: 12px;
  font-weight: 800;
}

.calendar-detail,
.upcoming-list-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 16px;
}

.upcoming-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.calendar-detail h3,
.upcoming-list-wrap h3 {
  margin-bottom: 12px;
  font-size: 24px;
}

.calendar-detail-date {
  display: block;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 14px;
}

.calendar-detail-list,
.upcoming-list {
  display: grid;
  gap: 10px;
}

.calendar-side {
  display: grid;
  gap: 16px;
}

.detail-event,
.upcoming-item {
  display: grid;
  gap: 3px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.detail-event:last-child,
.upcoming-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.detail-event span,
.upcoming-item span {
  color: var(--muted);
  font-size: 13px;
}

.donate-band {
  border-top: 1px solid var(--line);
  background: var(--deep);
  color: var(--white);
}

.donate-band .eyebrow,
.donate-band .section-heading p:last-child {
  color: #ead9bd;
}

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

.donation-option {
  display: grid;
  gap: 18px;
  min-height: 150px;
  padding: 22px;
  color: var(--ink);
  text-decoration: none;
}

.donation-option span {
  color: var(--muted);
}

.donation-option strong {
  justify-self: start;
  align-self: end;
  padding-bottom: 3px;
  border-bottom: 2px solid var(--gold);
  font-size: 22px;
}

.contact-split {
  background: var(--wash);
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
}

input {
  min-height: 46px;
  padding: 0 12px;
}

textarea {
  resize: vertical;
  padding: 12px;
}

.form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 8px;
}

.form-status {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.form-row button,
.contact-form button {
  border: 0;
  padding: 0 18px;
  color: var(--white);
  background: var(--deep);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.form-row button:hover,
.contact-form button:hover {
  background: var(--deep-2);
}

.whatsapp-link {
  display: inline-flex;
  margin-top: 18px;
  color: var(--deep);
  font-weight: 700;
}

address {
  margin-bottom: 18px;
  color: var(--muted);
  font-style: normal;
}

.map-embed {
  display: block;
  width: 100%;
  min-height: 210px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.shiur-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(620px, calc(100vw - 32px));
  max-height: min(82vh, 640px);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0;
  padding: 0;
  background: var(--white);
  color: var(--ink);
  overflow: auto;
  box-shadow: var(--shadow);
  transform: translate(-50%, -50%);
}

.shiur-dialog::backdrop {
  background: rgba(23, 24, 22, 0.42);
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}

.dialog-content {
  padding: 28px;
}

.dialog-content h2 {
  padding-right: 70px;
}

.dialog-meta {
  color: var(--muted);
  font-weight: 700;
}

.contact-band {
  border-top: 1px solid var(--line);
  background: var(--white);
}

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 820px;
}

.contact-form .full-width,
.contact-form button {
  grid-column: 1 / -1;
}

.contact-form button {
  justify-self: start;
  min-width: 160px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 24px clamp(18px, 5vw, 72px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.site-footer a {
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 900px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .brand {
    width: 100%;
    min-width: 0;
  }

  .brand-copy {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 14px;
    width: 100%;
  }

  .brand-main {
    min-width: 0;
  }

  .brand-leadership {
    align-self: center;
    margin-top: 0;
    text-align: right;
    white-space: nowrap;
  }

  .nav-links {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero-section,
  .split-section,
  .calendar-layout,
  .schedule-grid,
  .donation-options {
    grid-template-columns: 1fr;
  }

  .hero-section {
    min-height: 0;
  }
}

@media (max-width: 560px) {
  .brand {
    min-width: 0;
  }

  .brand img {
    width: 46px;
    height: 46px;
  }

  .brand strong {
    font-size: 16px;
  }

  .brand small {
    font-size: 11px;
  }

  .brand-copy {
    gap: 4px 10px;
  }

  .brand-leadership {
    font-size: 10px;
  }

  .nav-links a {
    padding: 9px 10px;
    white-space: nowrap;
  }

  h1 {
    font-size: 42px;
  }

  .quick-times {
    grid-template-columns: 1fr;
  }

  .calendar-day,
  .calendar-day.is-empty {
    height: 138px;
  }

  .quick-time,
  .time-item {
    grid-template-columns: 1fr;
  }

  .form-row,
  .contact-form {
    grid-template-columns: 1fr;
  }

  .form-row button,
  .contact-form button {
    width: 100%;
  }

  .site-footer {
    flex-direction: column;
  }
}
