:root {
  --ink: #17140f;
  --ink-light: #726b60;
  --ink-faint: #a39a8c;
  --accent: #a8501c;
  --accent-dark: #7e3b14;
  --line: #e4e0d6;
  --line-strong: #cfc9ba;
  --bg: #ffffff;
  --bg-alt: #f8f6f2;
  --white: #ffffff;
  --radius: 2px;
  --shadow: 0 1px 2px rgba(23, 20, 15, 0.05);
  --shadow-hover: 0 2px 6px rgba(23, 20, 15, 0.08);
  --max-width: 1240px;
  --serif: 'Frank Ruhl Libre', Georgia, serif;
  --sans: 'Rubik', 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 400;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  direction: rtl;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

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

/* Skip link */
.skip-link {
  position: absolute;
  right: -999px;
  top: 0;
  background: var(--ink);
  color: var(--white);
  padding: 10px 18px;
  z-index: 200;
}
.skip-link:focus {
  right: 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand img { height: 42px; width: auto; }
.brand-name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.3rem;
  color: var(--ink);
  letter-spacing: 0;
}
.main-nav ul {
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-nav a {
  color: var(--ink-light);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 10px 14px;
  transition: color 0.15s;
  position: relative;
}
.main-nav a::after {
  content: "";
  position: absolute;
  right: 14px;
  left: 14px;
  bottom: 6px;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transition: transform 0.2s;
}
.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--ink);
  text-decoration: none;
}
.main-nav a:hover::after,
.main-nav a:focus-visible::after {
  transform: scaleX(1);
}
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  box-shadow: none;
  border-radius: 0;
  padding: 8px 12px;
  font-size: 1.2rem;
  color: var(--ink);
  cursor: pointer;
}

/* Hero */
.hero {
  position: relative;
  min-height: 440px;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15,13,10,0.75) 0%, rgba(15,13,10,0.05) 60%);
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 36px 32px 40px;
  color: var(--white);
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}
.hero-content .eyebrow {
  display: inline-block;
  background: none;
  color: var(--white);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding-bottom: 14px;
  margin-bottom: 22px;
  border-bottom: 1px solid rgba(255,255,255,0.4);
  opacity: 0.92;
}
.hero-content h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  line-height: 1.02;
  margin: 0 0 20px;
  letter-spacing: -0.01em;
}
.hero-content p {
  font-size: 1.15rem;
  font-weight: 300;
  max-width: 620px;
  opacity: 0.88;
}

/* Sections */
.section {
  padding: 52px 0;
}
.section-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 2rem;
  color: var(--ink);
  margin: 0 0 28px;
  letter-spacing: 0;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.section-alt {
  background: var(--bg-alt);
}

.intro-text {
  max-width: 760px;
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--ink-light);
  line-height: 1.85;
}

/* Notice board (poster images) */
.notice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 220px));
  gap: 0;
  border-top: 1px solid var(--line);
  border-inline-start: 1px solid var(--line);
}
.notice-poster {
  background: var(--white);
  border: none;
  border-bottom: 1px solid var(--line);
  border-inline-end: 1px solid var(--line);
  box-shadow: none;
  border-radius: 0;
  overflow: hidden;
  transition: background 0.15s;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}
.notice-poster:hover {
  transform: none;
  box-shadow: none;
  background: var(--bg-alt);
}
.notice-poster img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  cursor: pointer;
  display: block;
  filter: grayscale(0.15);
}
.notice-poster--fill img {
  flex: 1;
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  object-fit: cover;
}
.notice-poster-placeholder {
  width: 100%;
  min-height: 130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  text-align: center;
  background: var(--ink);
  color: var(--white);
  cursor: pointer;
}
.notice-poster-placeholder .icon {
  font-size: 1.8rem;
}
.notice-poster-placeholder .text {
  font-weight: 500;
  font-size: 0.92rem;
  line-height: 1.4;
}

/* Notice detail modal — opened by clicking a (now compact) notice card;
   shows the full image plus the full, untruncated formatted text. */
.notice-modal {
  position: fixed;
  inset: 0;
  background: rgba(23, 20, 15, 0.9);
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.notice-modal[hidden] { display: none; }
.notice-modal-content {
  background: var(--white);
  border-radius: 0;
  max-width: 600px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 32px;
  position: relative;
}
.notice-modal-close {
  position: absolute;
  top: 12px;
  left: 12px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--ink);
}
.notice-modal-content img {
  width: 100%;
  border-radius: 0;
  margin-bottom: 22px;
}
.notice-modal-text {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--ink);
}
.notice-modal-text p { margin: 0 0 14px; }

/* Pinned notice — a fixed, always-visible item (e.g. this month's schedule)
   kept separate from the rotating notice board below it. */
.pinned-notice {
  background: var(--white);
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding: 24px;
  align-items: flex-start;
  cursor: pointer;
}
.pinned-notice-img {
  max-width: 320px;
  width: 100%;
  border-radius: 0;
  cursor: pointer;
  flex-shrink: 0;
}
.pinned-notice-caption {
  flex: 1;
  min-width: 200px;
  font-size: 0.95rem;
  color: var(--ink);
  line-height: 1.7;
}
.notice-poster-body {
  padding: 16px 18px;
}
.notice-poster-body p {
  margin: 0 0 8px;
  font-size: 0.88rem;
  color: var(--ink-light);
}
.notice-poster-body a.notice-cta {
  font-weight: 600;
  font-size: 0.9rem;
}

/* Quick links */
.quicklinks {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-top: 1px solid var(--line);
  border-inline-start: 1px solid var(--line);
}
.quicklink {
  background: var(--white);
  border: none;
  border-bottom: 1px solid var(--line);
  border-inline-end: 1px solid var(--line);
  box-shadow: none;
  border-radius: 0;
  padding: 16px 22px;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--ink);
  transition: background 0.15s, color 0.15s;
  flex: 1 1 200px;
  text-align: center;
}
.quicklink:hover {
  background: var(--ink);
  color: var(--white);
  text-decoration: none;
}

/* Contact card */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 0;
  border-top: 1px solid var(--line);
  border-inline-start: 1px solid var(--line);
  align-items: stretch;
}
@media (max-width: 800px) {
  .contact-grid { grid-template-columns: 1fr; }
}
.contact-card {
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: none;
  padding: 32px;
}
.contact-grid .contact-card {
  border-top: none;
  border-inline-start: none;
}
.contact-card h3 {
  font-family: var(--serif);
  font-weight: 500;
  margin-top: 0;
  color: var(--ink);
  font-size: 1.35rem;
  letter-spacing: 0;
}
.contact-table {
  width: 100%;
  border-collapse: collapse;
}
.contact-table td {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.contact-table td:first-child {
  color: var(--ink-light);
  width: 40%;
}
.contact-table td:last-child {
  font-weight: 600;
}

/* Footer */
.site-footer {
  background: var(--bg);
  color: var(--ink-light);
  padding: 28px 0;
  margin-top: 24px;
  border-top: 1px solid var(--line);
}
.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
}
.site-footer a {
  color: var(--ink-light);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.site-footer small {
  color: var(--ink-faint);
}

/* Accessibility toggle button */
.a11y-toggle {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 300;
  background: var(--ink);
  color: var(--white);
  border: none;
  border-radius: 50%;
  width: 52px;
  height: 52px;
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}

/* Inner page header */
.page-banner {
  background: var(--bg);
  color: var(--ink);
  padding: 32px 0 24px;
  border-bottom: 1px solid var(--line);
}
.breadcrumb {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 16px;
}
.breadcrumb a { color: var(--ink-light); }
.page-banner h1 {
  font-family: var(--serif);
  font-weight: 500;
  margin: 0;
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  letter-spacing: -0.01em;
}
.page-lede {
  margin: 14px 0 0;
  color: var(--ink-light);
  max-width: 700px;
  font-weight: 300;
  font-size: 1.05rem;
}

/* Directory table */
.directory-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: none;
}
.directory-table th {
  background: var(--bg-alt);
  color: var(--ink);
  text-align: right;
  padding: 14px 16px;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-inline-start: 1px solid var(--line);
}
.directory-table th:first-child { border-inline-start: none; }
.directory-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  border-inline-start: 1px solid var(--line);
  font-size: 0.95rem;
}
.directory-table td:first-child {
  border-inline-start: none;
  background: var(--bg-alt);
  font-weight: 600;
}
.directory-table tr:last-child td { border-bottom: none; }
.directory-table tr:hover td { background: var(--bg-alt); }
.directory-table td:last-child a { font-weight: 600; white-space: nowrap; }

/* Sub navigation pills (used on heritage page) */
.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--line);
}
.subnav a {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--ink-light);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 10px 4px;
  margin-inline-end: 24px;
  border-radius: 0;
  margin-bottom: -1px;
}
.subnav a:hover,
.subnav a.active {
  background: none;
  color: var(--ink);
  border-bottom-color: var(--ink);
  text-decoration: none;
}

/* People grid (nezkor index) */
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 28px;
}
.person-card {
  background: var(--white);
  border: none;
  box-shadow: none;
  border-radius: 0;
  overflow: hidden;
  text-align: center;
  transition: opacity 0.15s;
  color: var(--ink);
}
.person-card:hover {
  transform: none;
  box-shadow: none;
  opacity: 0.75;
  text-decoration: none;
}
.person-card img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  background: var(--bg-alt);
  filter: grayscale(0.4);
}
.person-card .person-name {
  padding: 14px 6px 0;
  font-weight: 500;
  font-size: 0.92rem;
}
.poem {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1.1rem;
  color: var(--ink-light);
  padding: 4px 22px;
  margin: 0 auto 44px;
  max-width: 560px;
  text-align: right;
}
.poem cite {
  display: block;
  margin-top: 10px;
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.82rem;
  color: var(--ink-faint);
}

/* Memorial bio page */
.bio-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 700px) {
  .bio-layout { grid-template-columns: 1fr; }
}
.bio-photo img {
  width: 100%;
  border-radius: 0;
  border: 1px solid var(--line);
  box-shadow: none;
  filter: grayscale(0.35);
}
.bio-text h2 {
  font-family: var(--serif);
  font-weight: 500;
  margin-top: 0;
  color: var(--ink);
  letter-spacing: 0;
}
.bio-text p { white-space: pre-line; }
.bio-links {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.bio-links h3 {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 12px;
  font-weight: 600;
}
.bio-links ul { margin: 0; padding-inline-start: 20px; }
.bio-links li { margin-bottom: 6px; }
.back-link {
  display: inline-block;
  margin-bottom: 28px;
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--ink-light);
}

/* Heritage cards */
.heritage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  border-inline-start: 1px solid var(--line);
}
.heritage-card {
  background: var(--white);
  border: none;
  border-bottom: 1px solid var(--line);
  border-inline-end: 1px solid var(--line);
  box-shadow: none;
  border-radius: 0;
  padding: 30px 26px;
  color: var(--ink);
  transition: background 0.15s;
  display: block;
}
.heritage-card:hover {
  transform: none;
  box-shadow: none;
  background: var(--bg-alt);
  text-decoration: none;
}
.heritage-card .icon { font-size: 1.6rem; margin-bottom: 14px; display: block; }
.heritage-card h3 { font-family: var(--serif); font-weight: 500; margin: 0 0 8px; color: var(--ink); letter-spacing: 0; font-size: 1.15rem; }
.heritage-card p { margin: 0; color: var(--ink-light); font-size: 0.9rem; }

/* Gallery */
.gallery-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--line);
}
.gallery-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 10px 16px;
  font-weight: 500;
  color: var(--ink-light);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  margin-bottom: -1px;
}
.gallery-tab.active {
  background: none;
  border-color: var(--ink);
  color: var(--ink);
}
.gallery-thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 2px;
}
.gallery-thumb-grid img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-radius: 0;
  cursor: pointer;
  box-shadow: none;
  transition: opacity 0.15s;
}
.gallery-thumb-grid img:hover { transform: none; opacity: 0.75; }

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 13, 10, 0.96);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 0;
  box-shadow: none;
}
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  background: rgba(255,255,255,0.1);
  color: var(--white);
  border: none;
  font-size: 1.6rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
}
.lightbox-close { top: 20px; left: 20px; }
.lightbox-prev { right: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,0.22); }
.lightbox-counter {
  position: absolute;
  bottom: 20px;
  right: 50%;
  transform: translateX(50%);
  color: var(--white);
  font-size: 0.85rem;
  opacity: 0.75;
}

/* Timeline (heritage development history) */
.timeline {
  position: relative;
  padding-inline-start: 8px;
  margin: 0 0 40px;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  inset-inline-start: 15px;
  width: 1px;
  background: var(--line);
}
.timeline-item {
  position: relative;
  display: flex;
  gap: 18px;
  padding-inline-start: 40px;
  padding-bottom: 30px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  inset-inline-start: 12px;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.timeline-year {
  display: inline-block;
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink);
  font-size: 1.1rem;
  margin-bottom: 4px;
}
.timeline-content p {
  margin: 0;
  color: var(--ink-light);
}

/* Video grid (personal-story interviews) */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  border-inline-start: 1px solid var(--line);
}
.video-card {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  border-inline-end: 1px solid var(--line);
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
}
.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
}
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-card p {
  margin: 0;
  padding: 16px 18px;
  font-size: 0.9rem;
  color: var(--ink-light);
}

/* Story list (title + subtitle index; multiple columns on wider screens) */
.story-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--line);
  border-inline-start: 1px solid var(--line);
}
@media (min-width: 700px) {
  .story-list { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1100px) {
  .story-list { grid-template-columns: repeat(3, 1fr); }
}
.story-list li {
  border-bottom: 1px solid var(--line);
  border-inline-end: 1px solid var(--line);
}
.story-list li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 100%;
  background: var(--white);
  border: none;
  box-shadow: none;
  border-radius: 0;
  padding: 16px 18px;
  text-decoration: none;
  transition: padding-inline-start 0.15s, color 0.15s;
}
.story-list li a:hover {
  transform: none;
  box-shadow: none;
  padding-inline-start: 10px;
}
.story-list li a::after {
  content: "↗";
  color: var(--ink-faint);
  font-size: 1.1rem;
  flex-shrink: 0;
}
.story-list-text {
  flex: 1;
  min-width: 0;
}
.story-list li a strong {
  display: block;
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink);
  font-size: 1.1rem;
  margin-bottom: 4px;
}
.story-list li a span {
  display: block;
  color: var(--ink-light);
  font-size: 0.85rem;
}

/* Mobile nav */
@media (max-width: 860px) {
  .nav-toggle { display: inline-block; }
  .main-nav {
    position: absolute;
    top: 68px;
    right: 0;
    left: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 18px rgba(0,0,0,0.06);
    display: none;
  }
  .main-nav.open { display: block; }
  .main-nav ul {
    flex-direction: column;
    padding: 12px;
  }
  .brand-name { display: none; }
}
