﻿*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f5f5;
  color: #222;
  line-height: 1.6;
}

/* â”€â”€ Header â”€â”€ */
header {
  background: #002b5c;
  color: white;
  padding: 0.6rem 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: center;
}

.site-title {
  color: white;
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

/* Hamburger button â€” hidden on desktop */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.3rem;
  color: white;
  font-size: 1.5rem;
  line-height: 1;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  align-items: center;
}

nav a {
  color: white;
  padding: 0.3rem 0.55rem;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  border-radius: 3px;
  transition: background 0.15s;
  white-space: nowrap;
}

nav a:hover { background: rgba(255,255,255,0.15); }

/* â”€â”€ Main â”€â”€ */
main {
  max-width: 960px;
  margin: 1.5rem auto;
  padding: 1.5rem;
  background: white;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  min-height: 60vh;
}

h1 { color: #002b5c; margin-top: 0; }
h2 { color: #003d80; }
h3 { color: #003d80; }

a { color: #003d80; }
a:hover { color: #c8a227; }

/* â”€â”€ Affiliate bar â”€â”€ */
.affiliate-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  background: #002b5c url('/assets/shul-front.jpg') center/cover no-repeat;
  border-bottom: 1px solid #dde3ed;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  position: sticky;
  top: 0;
  z-index: 200;
}
.affiliate-bar a { color: white; text-decoration: none; font-weight: 500; }
.affiliate-bar a:hover { opacity: 0.8; }
.affiliate-bar img { height: var(--affiliate-logo-height, 47px); width: auto; vertical-align: middle; }
.affiliate-bar img:hover { opacity: 0.85; }
/* Hide text-only links in affiliate bar on small screens */
.affiliate-bar .affiliate-text-link { display: inline; }

/* â”€â”€ Hero â”€â”€ */
.hero {
  background: #002b5c url('/assets/shul-front.jpg') center/cover no-repeat;
  color: white;
  padding: 4rem 2rem;
  text-align: center;
  border-radius: 4px 4px 0 0;
  margin: -1.5rem -1.5rem 2rem;
  position: relative;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 30, 70, 0.62);
  border-radius: 4px 4px 0 0;
}
.hero > * { position: relative; }
.hero h1 { color: white; font-size: 2.25rem; margin-bottom: 0.5rem; }
.hero p { font-size: 1.1rem; opacity: 0.9; max-width: 600px; margin: 0 auto 1.5rem; }

.btn {
  display: inline-block;
  background: #c8a227;
  color: white;
  padding: 0.6rem 1.4rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  margin: 0.25rem;
  transition: background 0.15s;
}
.btn:hover { background: #a88320; color: white; }
.btn-outline {
  background: transparent;
  border: 2px solid white;
  color: white;
}
.btn-outline:hover { background: rgba(255,255,255,0.1); color: white; }

/* â”€â”€ Cards / Grid â”€â”€ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.card {
  background: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 1.25rem;
}

.card h3 { margin-top: 0; font-size: 1rem; }
.card .meta { font-size: 0.85rem; color: #666; margin-bottom: 0.5rem; }

/* â”€â”€ View toggle â”€â”€ */
.view-toggle {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.toggle-btn {
  background: #e8edf5;
  color: #002b5c;
  border: 1px solid #c0cce0;
  border-radius: 6px;
  padding: 0.4rem 1rem;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
}
.toggle-btn.active {
  background: #002b5c;
  color: white;
  border-color: #002b5c;
}
.toggle-btn:hover:not(.active) { background: #d0daea; }

/* â”€â”€ Staff table â”€â”€ */
.staff-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.staff-table th {
  background: #002b5c;
  color: white;
  padding: 0.6rem 1rem;
  text-align: left;
}
.staff-table td {
  padding: 0.55rem 1rem;
  border-bottom: 1px solid #e0e6f0;
}
.staff-table tr:hover td { background: #f0f4fb; }

/* â”€â”€ BRS Weekly cover cards â”€â”€ */
.brs-weekly-covers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 0.75rem;
}
.weekly-cover-card {
  display: block;
  text-decoration: none;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  transition: transform 0.2s, box-shadow 0.2s;
}
.weekly-cover-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,43,92,0.2); }
.weekly-cover-card img { width: 100%; height: 130px; object-fit: cover; object-position: top; display: block; }
.weekly-cover-label { padding: 0.5rem 0.75rem; background: #002b5c; color: #fff; font-size: 0.85rem; font-weight: 600; white-space: normal; word-break: break-word; line-height: 1.3; }

/* â”€â”€ Photo card grid (Classes & Events) â”€â”€ */
.photo-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}
.photo-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}
.photo-card-link:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,43,92,0.2); }
.photo-card-link img { width: 100%; height: 160px; object-fit: cover; display: block; }
.photo-card-label {
  padding: 0.75rem 1rem;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.photo-card-label strong { color: #002b5c; font-size: 1rem; }
.photo-card-label span { font-size: 0.8rem; color: #555; }
.photo-card-label em { font-size: 0.8rem; color: #c8a227; font-style: normal; margin-top: 0.25rem; }

/* â”€â”€ Satellite section â”€â”€ */
.satellite-section {
  background: url('/assets/brs-west-bg.jpg') center/cover no-repeat;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
}
.satellite-section::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(0,20,60,0.65);
}
.satellite-inner {
  position: relative;
  padding: 1.25rem 2rem;
  text-align: center;
}

/* â”€â”€ Event photo grid â”€â”€ */
.events-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}
.event-photo-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: box-shadow 0.2s, transform 0.2s;
}
.event-photo-card:hover { box-shadow: 0 4px 16px rgba(0,43,92,0.2); transform: translateY(-2px); }
.event-photo-card img { width: 100%; height: 180px; object-fit: cover; display: block; }
.event-photo-placeholder {
  width: 100%; height: 180px;
  background: #d0d8e8;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem;
}
.event-photo-info { padding: 0.6rem 0.75rem; background: #fff; }
.event-photo-info strong { display: block; font-size: 0.9rem; color: #002b5c; margin-bottom: 0.2rem; }
.event-photo-info span { font-size: 0.78rem; color: #666; }

/* â”€â”€ Nav dropdown â”€â”€ */
.nav-dropdown { position: relative; display: inline-flex; align-items: center; }
.nav-dropdown-toggle { cursor: pointer; white-space: nowrap; }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #002b5c;
  min-width: 180px;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 500;
  padding: 0.25rem 0;
}
.nav-dropdown-menu a {
  display: block;
  padding: 0.5rem 1rem;
  white-space: nowrap;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  font-size: 0.85rem;
}
.nav-dropdown-menu a:last-child { border-bottom: none; }
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu { display: block; }

/* â”€â”€ Gallery â”€â”€ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.gallery-item img {
  width: 100%; height: 200px; object-fit: cover;
  border-radius: 6px; display: block; transition: opacity 0.2s;
}
.gallery-item img:hover { opacity: 0.85; }
.gallery-caption { font-size: 0.85rem; color: #555; margin-top: 0.35rem; text-align: center; }

/* â”€â”€ Social links â”€â”€ */
.social-links { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.5rem; }
.social-btn {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: #002b5c;
  color: #fff !important;
  border-radius: 4px;
  font-size: 0.75rem;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.social-btn:hover { background: #c8a227; }

/* â”€â”€ Staff featured row â”€â”€ */
.staff-featured {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2.5rem;
  background: #f5f7fb;
  border-radius: 10px;
  padding: 2rem;
}
.staff-featured-card { text-align: center; }
.staff-featured-card h2 a { color: #002b5c; text-decoration: none; }
.staff-featured-card h2 a:hover { color: #c8a227; }

/* â”€â”€ Staff grid â”€â”€ */
.staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.staff-card {
  background: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 1rem;
  text-align: center;
}
.staff-card h3 { margin: 0.5rem 0 0.25rem; font-size: 1rem; color: #002b5c; }
.staff-card .role { font-size: 0.85rem; color: #555; }

/* â”€â”€ Info box â”€â”€ */
.info-box {
  background: #eef3fb;
  border-left: 4px solid #002b5c;
  padding: 1rem 1.25rem;
  border-radius: 0 4px 4px 0;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

/* â”€â”€ Two-col layout â”€â”€ */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

/* â”€â”€ Minyanim widget â”€â”€ */
.minyanim-widget {
  border: 1px solid #d0d8e8;
  border-radius: 8px;
  padding: 1rem;
  background: #f5f8ff;
}
/* PDF download buttons */
.pub-buttons { display: flex; gap: 0.5rem; margin-bottom: 0.6rem; flex-wrap: wrap; }
.pub-btn {
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: #002b5c; color: #fff; text-decoration: none;
  border-radius: 6px; padding: 0.35rem 0.85rem; font-size: 0.82rem; font-weight: 600;
  transition: background 0.15s;
}
.pub-btn:hover { background: #004080; }

/* Week navigation bar */
.week-nav {
  display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.5rem;
}
.week-nav button {
  background: transparent; color: #7a8fa8; border: 1px solid #c0cfe0;
  border-radius: 4px; padding: 0.25rem 0.6rem;
  cursor: pointer; font-size: 0.7rem; font-weight: 400; flex-shrink: 0; line-height: 1.4;
  white-space: nowrap;
}
.week-nav button:hover { background: #eef3f8; color: #002b5c; border-color: #7a8fa8; }
.week-nav button:disabled { opacity: 0.25; cursor: default; }
.week-label {
  flex: 1; text-align: center; color: #002b5c;
  display: flex; flex-direction: column; align-items: center; gap: 0.15rem;
}
.week-dates { font-size: 0.7rem; font-weight: 700; color: #999; text-transform: uppercase; letter-spacing: 0.04em; }
.week-hebrew-range { font-size: 0.82rem; font-weight: 600; color: #002b5c; }
.week-parsha {
  font-size: 1.05rem; font-weight: 700; color: #002b5c;
  display: flex; align-items: center; gap: 0.4rem; width: 100%; justify-content: center;
}
.week-parsha::before { content: '·'; color: #c0cfe0; font-size: 1.2rem; line-height: 1; }
.week-parsha::after  { content: '·'; color: #c0cfe0; font-size: 1.2rem; line-height: 1; }
.week-label-current::after {
  content: '\2022 This Week \2022'; font-size: 0.68rem; font-weight: 400; color: #999;
}
.minyanim-nav {
  display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.5rem;
}
.minyanim-nav > button {
  background: #002b5c; color: white; border: none;
  border-radius: 4px; padding: 0.3rem 0.65rem;
  cursor: pointer; font-size: 1.05rem; flex-shrink: 0;
}
.minyanim-nav > button:hover { background: #004080; }
.min-pills {
  display: flex; flex: 1; gap: 0.5rem; flex-wrap: wrap; justify-content: center;
}
.min-pills { padding-top: 0; padding-bottom: 0; }
.min-pill {
  background: #e4ecf7; color: #002b5c; border: 1px solid #c5d3e8;
  border-radius: 10px; padding: 0.1rem 0; flex: 1; min-width: 0;
  cursor: pointer; white-space: nowrap;
  transition: background 0.15s, color 0.15s; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 0.05rem;
}
.pill-num { font-size: 0.68rem; font-weight: 400; color: #666; line-height: 1.2; }
.pill-day { font-size: 0.75rem; font-weight: 700; color: #002b5c; line-height: 1.2; }
.pill-heb { font-size: 0.72rem; font-weight: 400; color: #7a5f00; line-height: 1.2; }
.min-pill::before { content: none; }
.min-pill::after  { content: none; }
.min-pill:hover { background: #cdddf4; }
.min-pill:hover .pill-day { color: #002b5c; }
.min-pill.active {
  background: #002b5c; color: #fff; border-color: #002b5c;
  transform: scale(1.08);
}
.min-pill.active .pill-num { color: rgba(255,255,255,0.75); }
.min-pill.active .pill-day { color: #fff; }
.min-pill.active .pill-heb { color: rgba(255,255,255,0.8); }
.min-pill.today:not(.active) {
  border-color: #c8a227; background: #fdf6e3;
}
.min-pill.today:not(.active) .pill-num { color: #7a5f00; }
.min-pill.today:not(.active) .pill-day { color: #7a5f00; }
.min-pill.today:not(.active) .pill-heb { color: #7a5f00; }
.min-pill.active.today .pill-heb { color: #f9dc6e; }
.minyanim-day-header {
  text-align: center; margin-bottom: 0.5rem;
}
.minyanim-day-label {
  font-weight: 700; font-size: 1rem; color: #002b5c;
  display: flex; flex-direction: column; align-items: center; gap: 0.1rem;
}
.min-day-main { font-weight: 700; font-size: 1rem; color: #002b5c; white-space: nowrap; }
.min-day-date { font-weight: 700; font-size: 0.85rem; color: #002b5c; margin-left: 0.3rem; }
.min-day-hebrew { font-size: 0.78rem; font-weight: 400; color: #5a4200; margin-left: 0; }
.minyanim-schedule-wrap { overflow: hidden; }
.minyanim-schedule .min-day-holiday {
  font-size: 0.8rem; font-weight: 700; color: #7a4f00;
  background: #fff8e8; border-left: 3px solid #c8a227;
  padding: 3px 8px; border-radius: 3px; margin-bottom: 0.6rem;
}
.minyanim-schedule .min-section { margin-bottom: 0.75rem; }
.minyanim-schedule ul { margin: 0.25rem 0 0 1.25rem; padding: 0; }
.minyanim-schedule li { font-size: 0.9rem; margin-bottom: 0.2rem; }
.minyanim-schedule ul.times-wrap { display: flex; flex-wrap: wrap; gap: 0.3rem; list-style: none; margin-left: 0; padding-left: 0; margin-top: 0.35rem; }
.minyanim-schedule ul.times-wrap li { margin-bottom: 0; white-space: nowrap; background: #eef2f8; border: 1px solid #d0d8e8; border-radius: 999px; padding: 0.1rem 0.6rem; font-size: 0.82rem; }
.min-time { font-weight: 500; }
.min-loc { color: #555; font-size: 0.85rem; }
.min-desc { color: #777; font-size: 0.82rem; font-style: italic; }

/* Shabbat section */
.shabbat-schedule {
  margin-top: 1rem; padding: 0.85rem 1rem;
  border: 1px solid #d4b86a; border-radius: 8px;
  background: #fffcf0;
}
.shabbat-title {
  margin: 0 0 0.6rem; font-size: 1rem; color: #5a4200;
  border-bottom: 1px solid #e8d78a; padding-bottom: 0.35rem;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem;
  cursor: pointer; list-style: none; user-select: none;
}
.shabbat-title::-webkit-details-marker { display: none; }
details.shabbat-schedule[open] .shabbat-title { margin-bottom: 0.6rem; }
details.shabbat-schedule:not([open]) .shabbat-title { border-bottom: none; margin-bottom: 0; }
.shabbat-title::after { content: ' ▲ Hide'; font-size: 0.7rem; color: #a07820; margin-left: auto; }
details.shabbat-schedule:not([open]) .shabbat-title::after { content: ' ▼ Show Schedule'; }
.shabbat-parsha { font-weight: 400; font-size: 0.9rem; color: #7a5c10; }
.shabbat-parsha-heb { font-family: serif; font-size: 1rem; }
.shabbat-schedule .min-section { margin-bottom: 0.65rem; }
.shabbat-schedule ul { margin: 0.2rem 0 0 1.2rem; padding: 0; }
.shabbat-schedule ul.times-wrap { display: flex; flex-wrap: wrap; gap: 0.3rem; list-style: none; margin-left: 0; padding-left: 0; margin-top: 0.35rem; }
.shabbat-schedule ul.times-wrap li { margin-bottom: 0; white-space: nowrap; background: #fdf6e0; border: 1px solid #e8d78a; border-radius: 999px; padding: 0.1rem 0.6rem; font-size: 0.82rem; }
.shabbat-schedule li { font-size: 0.9rem; margin-bottom: 0.2rem; }

/* Holiday / special Shabbat section */
.holiday-schedule {
  margin-top: 0.75rem; padding: 0.75rem 1rem;
  border: 1px solid #b0cce8; border-radius: 8px;
  background: #f0f7ff;
}
.holiday-title {
  margin: 0 0 0.4rem; font-size: 0.95rem; color: #1a4a7a;
  border-bottom: 1px solid #c5dcf0; padding-bottom: 0.3rem;
  cursor: pointer; list-style: none; user-select: none; display: flex; align-items: center;
}
.holiday-title::-webkit-details-marker { display: none; }
details.holiday-schedule:not([open]) .holiday-title { border-bottom: none; margin-bottom: 0; }
.holiday-title::after { content: ' ▲ Hide'; font-size: 0.7rem; color: #3a7ab8; margin-left: auto; }
details.holiday-schedule:not([open]) .holiday-title::after { content: ' ▼ Show'; }
.holiday-list { margin: 0; padding: 0 0 0 1.2rem; }
.holiday-list li { font-size: 0.9rem; margin-bottom: 0.2rem; }
.holiday-date { font-size: 0.78rem; color: #888; margin-right: 0.3rem; }
.holiday-heb { font-family: serif; font-size: 1rem; }

/* Featured Announcements banner */
.featured-announcements-bar {
  display: flex; flex-wrap: wrap; gap: 1rem;
  padding: 1rem 1.5rem; background: #f5f9ff;
  border-bottom: 2px solid #d0e4f7;
}
.feat-ann-card {
  display: flex; gap: 0.9rem; align-items: flex-start;
  flex: 1 1 300px; max-width: 540px;
  background: #fff; border: 1px solid #d0e4f7;
  border-radius: 10px; padding: 0.85rem 1rem;
  box-shadow: 0 1px 4px rgba(0,60,120,0.07);
}
.feat-ann-img {
  width: 90px; height: 70px; object-fit: cover;
  border-radius: 6px; flex-shrink: 0;
}
.feat-ann-body { display: flex; flex-direction: column; gap: 0.35rem; }
.feat-ann-title { font-size: 0.95rem; color: #1a2a4a; }
.feat-ann-text { font-size: 0.85rem; color: #444; line-height: 1.5; }
.feat-ann-text p { margin: 0; }
.feat-ann-btn {
  display: inline-block; margin-top: 0.25rem;
  padding: 0.3rem 0.8rem; font-size: 0.8rem; font-weight: 600;
  background: #1a4a9a; color: #fff; border-radius: 4px;
  text-decoration: none; align-self: flex-start;
}
.feat-ann-btn:hover { background: #0d3580; }

/* Carousel slide animations */
@keyframes minSlideInRight {
  from { transform: translateX(36px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
@keyframes minSlideInLeft {
  from { transform: translateX(-36px); opacity: 0; }
  to   { transform: translateX(0);     opacity: 1; }
}
.slide-in-right { animation: minSlideInRight 0.25s ease; }
.slide-in-left  { animation: minSlideInLeft  0.25s ease; }

/* â”€â”€ Article / post â”€â”€ */
article.sermon, article.page, article.event { max-width: 720px; }
.page-subtitle { font-size: 1.2rem; color: #666; margin: -0.5rem 0 1.5rem; font-style: italic; }
article h1 { font-size: 1.75rem; }
article .byline { color: #666; font-size: 0.9rem; margin: -0.5rem 0 1.5rem; }

/* â”€â”€ Footer â”€â”€ */
footer {
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 0.85rem;
  color: #666;
  border-top: 1px solid #ddd;
  margin-top: 2rem;
}
footer a { color: #666; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   RESPONSIVE â€” tablet (â‰¤ 860px)
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
@media (max-width: 860px) {
  .staff-featured { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; padding: 1.25rem; }
  .photo-card-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   RESPONSIVE â€” mobile (â‰¤ 640px)
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
@media (max-width: 640px) {

  /* Affiliate bar: hide text links, shrink logos */
  .affiliate-bar { gap: 0.4rem 0.75rem; padding: 0.4rem 0.75rem; }
  .affiliate-bar img { height: 28px; }
  .affiliate-bar .affiliate-text-link { display: none; }

  /* Sticky bars stack â€” push header below affiliate bar */
  header { top: 0; padding: 0.5rem 0.75rem; }

  /* Hamburger nav */
  .nav-toggle { display: block; }

  nav {
    display: none;
    flex-direction: column;
    width: 100%;
    background: #002b5c;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 0.5rem 0 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 99;
    gap: 0;
  }
  nav.open { display: flex; }

  nav a {
    font-size: 1rem;
    padding: 0.65rem 1.25rem;
    border-radius: 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }

  /* Dropdown becomes inline in mobile menu */
  .nav-dropdown { display: block; width: 100%; }
  .nav-dropdown-menu {
    display: block;
    position: static;
    box-shadow: none;
    border-radius: 0;
    background: rgba(0,0,0,0.2);
    padding: 0;
  }
  .nav-dropdown-menu a {
    padding-left: 2rem;
    font-size: 0.95rem;
  }

  /* Main content */
  main { margin: 0.5rem; padding: 1rem; border-radius: 0; }

  /* Hero */
  .hero { padding: 2.5rem 1rem; margin: -1rem -1rem 1.5rem; }
  .hero h1 { font-size: 1.5rem; }
  .hero p { font-size: 0.95rem; }

  /* Layouts */
  .two-col { grid-template-columns: 1fr; gap: 1.25rem; }
  .card-grid { grid-template-columns: 1fr; }
  .photo-card-grid { grid-template-columns: 1fr; }
  .staff-featured { grid-template-columns: 1fr; gap: 1.5rem; padding: 1rem; }
  .staff-grid { grid-template-columns: repeat(2, 1fr); }
  .brs-weekly-covers { grid-template-columns: 1fr; max-width: 400px; }
  .weekly-cover-card img { height: 220px; }
  .events-photo-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }

  /* Staff table â†’ hide on very small, use card view */
  .staff-table thead { display: none; }
  .staff-table, .staff-table tbody, .staff-table tr, .staff-table td { display: block; width: 100%; }
  .staff-table tr { margin-bottom: 0.75rem; border: 1px solid #e0e6f0; border-radius: 6px; padding: 0.5rem; }
  .staff-table td { padding: 0.3rem 0.75rem; border: none; }

  /* Info box */
  .info-box { font-size: 0.85rem; padding: 0.75rem 1rem; }
  .info-box a { display: inline-block; margin: 0.1rem 0; }

  /* Satellite section */
  .satellite-inner { padding: 0.75rem 1rem; }

  /* Footer */
  footer { font-size: 0.8rem; padding: 1rem; }
  footer p { margin: 0.35rem 0; }
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   RESPONSIVE â€” very small (â‰¤ 380px)
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
@media (max-width: 380px) {
  .events-photo-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .staff-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.25rem; }
}

/* ── Agenda (Classes & Upcoming Events) ─────────────────────── */
.agenda-list { display: flex; flex-direction: column; gap: 0.6rem; }

.agenda-item {
  display: flex; align-items: center; gap: 0.9rem;
  background: #f8f8f8; border-left: 4px solid #c8a227;
  padding: 0.7rem 0.9rem; border-radius: 4px;
  text-decoration: none; color: inherit;
  transition: background 0.15s;
}
.agenda-item:hover { background: #eff2f8; }

.agenda-datebox {
  flex-shrink: 0; width: 54px; text-align: center;
  background: #002b5c; color: #fff; border-radius: 4px;
  padding: 0.4rem 0.2rem;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
}
.agenda-day    { font-size: 1.5rem; font-weight: 700; line-height: 1; }
.agenda-month  { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; }
.agenda-weekday{ font-size: 0.62rem; color: #c8a227; }

.agenda-thumb {
  flex-shrink: 0; width: 80px; height: 58px;
  object-fit: cover; border-radius: 3px;
}

.agenda-info {
  flex: 1; display: flex; flex-direction: column; gap: 0.18rem; min-width: 0;
}
.category-badge {
  display: inline-block; background: #002b5c; color: #c8a227;
  font-size: 0.68rem; padding: 1px 7px; border-radius: 10px;
  font-weight: 600; letter-spacing: 0.04em; width: fit-content;
}
.agenda-title  { font-size: 0.98rem; font-weight: 600; color: #002b5c; }
.agenda-time   { font-size: 0.82rem; color: #444; }
.agenda-loc    { font-size: 0.82rem; color: #555; }
.agenda-rsvp   { font-size: 0.8rem; color: #c8a227; font-weight: 700; }

@media (max-width: 480px) {
  .agenda-thumb { display: none; }
  .agenda-item  { gap: 0.6rem; padding: 0.6rem; }
  .agenda-title { font-size: 0.92rem; }
}

/* ── Class exception / status badges ──────────────────────── */
.agenda-cancelled { opacity: 0.65; border-left-color: #b94a48; }
.agenda-postponed { border-left-color: #e67e22; }
.agenda-rescheduled { border-left-color: #2980b9; }

.status-badge {
  display: inline-block; font-size: 0.68rem; font-weight: 700;
  padding: 1px 8px; border-radius: 10px; width: fit-content;
}
.status-cancelled   { background: #b94a48; color: #fff; }
.status-postponed   { background: #e67e22; color: #fff; }
.status-rescheduled { background: #2980b9; color: #fff; }

.strikethrough { text-decoration: line-through; }
.agenda-note   { font-size: 0.8rem; color: #666; font-style: italic; }

/* ── Recurring class cards ─────────────────────────────────── */
.class-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.class-card {
  display: flex; flex-direction: column;
  border-radius: 6px; overflow: hidden;
  border: 1px solid #dde3ef;
  text-decoration: none; color: inherit;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: box-shadow 0.15s, transform 0.15s;
}
.class-card:hover { box-shadow: 0 4px 16px rgba(0,43,92,0.13); transform: translateY(-2px); }

.class-card-img-wrap {
  position: relative; width: 100%; overflow: hidden;
  background: #f0f3f9;
  aspect-ratio: 4 / 3;
}
.class-card-img-wrap img {
  width: 100%; height: 100%; object-fit: contain; display: block;
}
.class-card-img-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center;
  justify-content: center; font-size: 2rem; color: #aab;
}
.class-card-badge {
  position: absolute; bottom: 5px; left: 6px;
  background: #002b5c; color: #c8a227;
  font-size: 0.6rem; font-weight: 700; padding: 1px 6px;
  border-radius: 10px; letter-spacing: 0.04em;
}

.class-card-body {
  padding: 0.65rem 0.75rem 0.75rem;
  display: flex; flex-direction: column; gap: 0.25rem; flex: 1;
}
.class-card-title {
  font-size: 0.95rem; font-weight: 700; color: #002b5c; line-height: 1.3;
}
.class-card-day { font-size: 0.8rem; font-weight: 600; color: #002b5c; opacity: 0.7; margin-top: 0.1rem; }
.class-card-time { font-size: 0.85rem; color: #444; }

.class-card-dates {
  display: flex; flex-wrap: wrap; gap: 0.25rem; margin-top: 0.2rem;
}
.class-date-chip {
  display: inline-block; background: #eef1f8; color: #002b5c;
  font-size: 0.65rem; padding: 1px 6px; border-radius: 10px;
  font-weight: 500;
}
.chip-cancelled { background: #f8e0e0; color: #b94a48; text-decoration: line-through; }
.chip-postponed { background: #fdebd0; color: #c0651a; }

@media (max-width: 640px) {
  .class-card-grid { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
}
@media (max-width: 380px) {
  .class-card-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Guest Speaker cards ───────────────────────────────────── */
.speaker-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}
.speaker-card {
  display: flex; flex-direction: column;
  border-radius: 6px; overflow: hidden;
  border: 1px solid #dde3ef;
  text-decoration: none; color: inherit;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: box-shadow 0.15s, transform 0.15s;
}
.speaker-card:hover { box-shadow: 0 4px 16px rgba(0,43,92,0.13); transform: translateY(-2px); }
.speaker-card-img-wrap {
  width: 100%; overflow: hidden; background: #e8edf5;
}
.speaker-card-img-wrap img {
  width: 100%; height: 130px; object-fit: cover; object-position: top; display: block;
}
.speaker-card-img-placeholder {
  width: 100%; height: 130px; display: flex; align-items: center;
  justify-content: center; font-size: 2rem; color: #aab;
}
/* ── Subsection nav tiles ─────────────────────────────────── */
.subsection-tiles {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  margin: -1rem -1rem 2rem;
  overflow: hidden;
}
.subsection-tile {
  position: relative;
  display: block;
  overflow: hidden;
  text-decoration: none;
  aspect-ratio: 3 / 4;
}
.subsection-tile img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform 0.4s ease, filter 0.4s ease;
  filter: grayscale(20%);
}
.subsection-tile:hover img {
  transform: scale(1.07);
  filter: grayscale(0%);
}
.subsection-tile::before {
  content: "";
  position: absolute; inset: 0;
  background: rgba(32, 90, 147, 0.55);
  transition: opacity 0.3s ease;
  z-index: 1;
}
.subsection-tile:hover::before {
  opacity: 0.2;
}
.subsection-tile-label {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
  padding: 0.5rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
  letter-spacing: 0.02em;
}

@media (max-width: 860px) {
  .subsection-tiles { grid-template-columns: repeat(3, 1fr); margin: -1rem -1rem 1.5rem; }
  .subsection-tiles .subsection-tile:nth-child(4),
  .subsection-tiles .subsection-tile:nth-child(5) { display: none; }
}
@media (max-width: 640px) {
  .subsection-tiles { grid-template-columns: repeat(3, 1fr); margin: -1rem -1rem 1.25rem; }
  .subsection-tile-label { font-size: 0.85rem; }
  .subsection-tiles .subsection-tile:nth-child(4),
  .subsection-tiles .subsection-tile:nth-child(5) { display: none; }
}

.speaker-card-body {
  padding: 0.5rem 0.6rem 0.6rem;
  display: flex; flex-direction: column; gap: 0.18rem;
}
.speaker-card-name  { font-size: 0.85rem; font-weight: 700; color: #002b5c; line-height: 1.3; }
.speaker-card-title { font-size: 0.73rem; color: #555; }
.speaker-card-date  { font-size: 0.73rem; color: #444; }

@media (max-width: 640px) {
  .speaker-card-grid { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
}
