/* Lodge Ananthapadmanabha No. 280 — Dark theme */
:root {
  --bg: #1a1d24;
  --bg-alt: #22262e;
  --surface: #252a33;
  --text: #f0f2f5;
  --text-muted: #9ca3af;
  --accent: #c9a227;
  --accent-hover: #dbb42c;
  --accent-gold: #d4af37;
  --accent-muted: rgba(201, 162, 39, 0.15);
  --cta-blue: #2196F3;
  --cta-blue-hover: #42A5F5;
  --section-blue: #dbeafe; /* lighter blue for alternating sections and all pages */
  --know-more: #81D4FA;
  --know-more-hover: #B3E5FC;
  --border: #3b424d;
  --radius: 6px;
  --shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
  --font-sans: 'Karla', system-ui, sans-serif;
  --font-display: 'Karla', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 17px; scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.9875rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
}

.skip-link {
  position: absolute;
  top: -3rem;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #1a1d24;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  z-index: 100;
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 10000;
  background: rgba(26, 29, 36, 0.97);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}
/* Home: logo and nav overlay the banner — match reference image */
body.home header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: none;
  border-bottom: none;
  box-shadow: none;
}
body.home nav a { color: #fff; font-weight: 400; }
body.home nav a:hover, body.home nav a:focus { color: #fff; background: rgba(255,255,255,0.12); }
body.home nav a[aria-current="page"] { color: #fff; }
.header-inner {
  width: 100%;
  margin: 0;
  padding: 0.85rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  box-sizing: border-box;
}
.logo {
  display: block;
  text-decoration: none;
  flex-shrink: 0;
  margin-left: 70px;
}
.logo img {
  display: block;
  height: 128px;
  width: auto;
}
body.home .logo img { height: 144px; }

nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.5rem;
}
nav a {
  display: block;
  padding: 0.5rem 0.6rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 400;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-radius: var(--radius);
  transition: color 0.2s, background 0.2s;
  font-family: var(--font-sans);
}
nav a:hover, nav a:focus {
  color: var(--accent);
  background: var(--accent-muted);
}
nav a[aria-current="page"] {
  color: var(--accent);
  font-weight: 600;
}
.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1.1rem;
  background: var(--cta-blue);
  color: #fff !important;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.2s;
  margin-left: 0.75rem;
  font-family: var(--font-sans);
}
.nav-cta:hover, .nav-cta:focus {
  background: var(--cta-blue-hover);
  color: #fff !important;
}

/* Mobile nav toggle (hamburger) */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  border-radius: var(--radius);
  flex-shrink: 0;
  position: relative;
  z-index: 10001;
}
.nav-toggle:hover,
.nav-toggle:focus {
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}
.nav-toggle::before,
.nav-toggle::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle::before { top: 14px; }
.nav-toggle::after { bottom: 14px; }
.nav-toggle-bar {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  top: 50%;
  margin-top: -1px;
  background: currentColor;
  transition: opacity 0.2s ease;
}
body.nav-open .nav-toggle::before {
  transform: translateY(6px) rotate(45deg);
}
body.nav-open .nav-toggle::after {
  transform: translateY(-6px) rotate(-45deg);
}
body.nav-open .nav-toggle-bar {
  opacity: 0;
}

main { width: 100%; margin: 0; padding: 0 2rem 4rem; box-sizing: border-box; }
main.page-content { padding-top: 4rem; }

/* Sections */
section {
  padding: 4rem 0;
  border-bottom: 1px solid var(--border);
}
section:last-of-type { border-bottom: none; }
section.alt { background: var(--bg-alt); width: 100%; box-sizing: border-box; padding-left: 2rem; padding-right: 2rem; }
section.alt > * { max-width: none; margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }

/* Content sections — alternating blue shades */
section.about,
section.services,
section.contact {
  border-bottom-color: #c5d4e4;
  color: #2d3544;
}
/* Alternate section backgrounds (order: Our Temple, Genesis, Grand Leadership, Distinguished, Officers, Meetings, Join, Contact) */
/* Alternate section backgrounds: white / blue (order: Our Temple, Core Principles, Genesis, Grand Leadership, Distinguished, Officers, Meetings, Contact) */
#about-lodge,
#genesis,
#distinguished,
#meetings {
  background: #fff;
}
#core-principles,
#grand-leadership,
#officers,
#contact {
  background: var(--section-blue);
}
#freemasonry,
#join {
  background: var(--section-blue);
}
section.about h2,
section.services h2,
section.contact h2,
section.about h3,
section.services h3,
section.contact h3 { color: #2d3544; }
#about-lodge .lodge-heading { color: #1e3a5f; }
#grand-leadership .distinguished-heading,
#distinguished .distinguished-heading { color: #1e3a5f; }
#core-principles .section-heading,
#genesis .section-heading,
#freemasonry .section-heading,
#officers .section-heading,
#meetings .section-heading,
#join .section-heading,
#contact .section-heading { color: #1e3a5f; }
section.about p,
section.services p,
section.contact p,
section.about .section-intro,
section.services .section-intro,
section.contact .section-intro { color: #3d4a5c; font-size: 0.9875rem; line-height: 1.65; }
section.about .genesis-dates,
section.about .office,
section.about .distinguished-heading,
section.about .distinguished-title,
section.services .officer .title,
section.about .founder-members li::before,
section.about .values-list li strong { color: #1e3a5f; }
section.about .distinguished-name,
section.about .distinguished p,
section.about strong { color: #2d3544; }
section.about .distinguished,
section.services .officer,
section.about .values-list li,
section.about .founder-members li,
section.about .meeting-item,
section.contact input,
section.contact textarea {
  background: #fff;
  border-color: #c5d4e4;
  color: #2d3544;
}
section.about .distinguished { border-left-color: #1e3a5f; }
section.services .officer { border-left-color: #1e3a5f; }
section.about .join-steps li { color: #3d4a5c; }
section.about .join-steps li strong { color: #2d3544; }
section.about .join-steps li::before { background: #1e3a5f; color: #fff; }
section.contact label { color: #2d3544; }
section.contact button { background: #1e3a5f; color: #fff; }
section.contact button:hover { background: #2c5282; }
section.about a:not(.cta),
section.contact a { color: #1e3a5f; }
section.about .cta,
section.contact .cta { color: #fff; background: #1e3a5f; }
section.about .cta:hover { background: #2c5282; color: #fff; }
section.about .meeting-item strong { color: #2d3544; }
section.about .meeting-item span { color: #3d4a5c; }

/* Our Temple — two images + text layout */
.lodge-section .lodge-wrap {
  max-width: 1100px;
  margin: 0 auto;
}
.lodge-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.lodge-title-emblem {
  width: 56px;
  height: 56px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(30, 58, 95, 0.12));
}
.lodge-heading {
  font-size: 2.1rem;
  font-weight: 600;
  color: #1e3a5f;
  margin: 0 0 0.5rem;
  display: inline-block;
}
.lodge-heading strong { font-weight: inherit; color: inherit; }

.lodge-visual-text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}
.lodge-images {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.lodge-photo-main {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(30, 58, 95, 0.12);
  object-fit: cover;
  aspect-ratio: 3 / 2;
}
.lodge-images .lodge-founder {
  margin-top: 0;
}
.lodge-copy {
  min-width: 0;
}
.lodge-lead {
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.55;
  color: #2d3544;
  margin: 0 0 1.5rem;
  padding: 1.25rem 1.5rem;
  background: rgba(30, 58, 95, 0.08);
  border-left: 4px solid #1e3a5f;
  border-radius: 0 6px 6px 0;
}
.lodge-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}
@media (min-width: 640px) {
  .lodge-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .lodge-visual-text {
    grid-template-columns: 1fr;
  }
  .lodge-images {
    order: -1;
  }
}
@media (max-width: 640px) {
  .lodge-grid { grid-template-columns: 1fr; }
}
.lodge-card {
  position: relative;
  background: #fff;
  border: 1px solid #c5d4e4;
  border-radius: 8px;
  padding: 1.5rem 1.75rem;
  padding-top: 1.75rem;
  box-shadow: 0 2px 10px rgba(30, 58, 95, 0.06);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.lodge-card-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: #1e3a5f;
  border-radius: 8px 8px 0 0;
}
.lodge-card:hover {
  border-color: #9bb4d4;
  box-shadow: 0 6px 20px rgba(30, 58, 95, 0.1);
}
.lodge-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #1e3a5f;
  margin: 0 0 0.6rem;
}
.lodge-card p {
  margin: 0;
  font-size: 0.9875rem;
  line-height: 1.65;
  color: #3d4a5c;
}
.lodge-founder {
  position: relative;
  background: #fff;
  border: 1px solid #d4c5a0;
  border-radius: 8px;
  padding: 1.5rem 1.75rem;
  padding-top: 1.75rem;
  box-shadow: 0 4px 16px rgba(30, 58, 95, 0.08);
}
.lodge-founder::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #8b7355, #b8860b, #8b7355);
  border-radius: 8px 8px 0 0;
}
.lodge-founder-photo {
  display: block;
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid #d4c5a0;
  margin-bottom: 0.75rem;
  box-shadow: 0 4px 14px rgba(30, 58, 95, 0.12);
}
.lodge-founder-title {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b5b45;
  margin: 0 0 0.6rem;
}
.lodge-founder p {
  margin: 0;
  font-size: 0.9875rem;
  line-height: 1.65;
  color: #3d4a5c;
}
.lodge-founder strong { color: #2d3544; }

/* Our Core Principles — compact style, less vertical space */
.core-principles-section .content-wrap {
  max-width: 1100px;
  margin: 0 auto;
}
.core-principles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}
@media (max-width: 900px) {
  .core-principles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .core-principles-grid {
    grid-template-columns: 1fr;
  }
}
.core-principle-card {
  position: relative;
  background: #fff;
  border: 1px solid #d4c5a0;
  border-radius: 6px;
  padding: 0.75rem 1rem 1rem;
  padding-top: 0.9rem;
  box-shadow: 0 2px 10px rgba(30, 58, 95, 0.06);
}
.core-principle-card .lodge-card-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #8b7355, #b8860b, #8b7355);
  border-radius: 6px 6px 0 0;
}
.core-principle-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.core-principle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  min-width: 28px;
  flex-shrink: 0;
  border-radius: 6px;
  background: rgba(184, 134, 11, 0.15);
  color: #b8860b;
}
.core-principle-icon svg {
  display: block;
  width: 14px;
  height: 14px;
}
.core-principle-title {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #1e3a5f;
  margin: 0;
  line-height: 1.2;
}
.core-principle-card p {
  font-size: 0.9375rem;
  line-height: 1.45;
  color: #3d4a5c;
  margin: 0;
}

/* Distinguished Brethren — same layout as Our Temple */
.distinguished-section .distinguished-wrap {
  max-width: 1100px;
  margin: 0 auto;
}
.distinguished-section .distinguished-heading {
  font-size: 2.1rem;
  font-weight: 600;
  color: #1e3a5f;
  margin: 0 0 0.5rem;
  display: inline-block;
  text-transform: none;
  letter-spacing: normal;
}
.distinguished-section .distinguished-heading strong { font-weight: inherit; color: inherit; }
.distinguished-lead {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #1e3a5f;
  margin: 1.25rem 0 1rem;
}
.distinguished-card {
  position: relative;
  background: #fff;
  border: 1px solid #c5d4e4;
  border-radius: 8px;
  padding: 1.5rem 1.75rem;
  padding-top: 1.75rem;
  box-shadow: 0 2px 10px rgba(30, 58, 95, 0.06);
}
.distinguished-card .lodge-card-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: #1e3a5f;
  border-radius: 8px 8px 0 0;
}
.distinguished-card .distinguished {
  background: transparent;
  border: none;
  border-left: none;
  box-shadow: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: flex-start;
}
.distinguished-card .distinguished-photo img {
  border-radius: 8px;
  border: 1px solid #c5d4e4;
  box-shadow: 0 2px 10px rgba(30, 58, 95, 0.08);
}
.distinguished-card .distinguished-name {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 700;
  color: #2d3544;
  margin: 0 0 0.25rem;
}
.distinguished-card .distinguished-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #1e3a5f;
  margin: 0 0 1rem;
}
.distinguished-card .distinguished-body p {
  font-size: 0.9875rem;
  line-height: 1.65;
  color: #3d4a5c;
  margin: 0 0 0.75rem;
  text-align: justify;
}
.distinguished-card .distinguished-body p:last-child { margin-bottom: 0; }

/* Distinguished Brethren — same golden box style as Grand Lodge Leadership */
#distinguished .distinguished-card {
  border-color: #d4c5a0;
  box-shadow: 0 4px 16px rgba(30, 58, 95, 0.08);
}
#distinguished .distinguished-card .lodge-card-accent {
  background: linear-gradient(90deg, #8b7355, #b8860b, #8b7355);
  height: 5px;
  border-radius: 8px 8px 0 0;
}
#distinguished .distinguished-card .distinguished-photo img {
  border: 2px solid #d4c5a0;
  box-shadow: 0 4px 14px rgba(30, 58, 95, 0.12);
}

/* Grand Lodge Leadership — distinct style: centered portrait cards, gold accent */
.grand-leadership-section .distinguished-wrap {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr 1fr;
  max-width: 1100px;
}
.grand-leadership-section .distinguished-heading {
  grid-column: 1 / -1;
  font-size: 2.1rem;
  font-weight: 600;
  color: #1e3a5f;
  margin: 0 0 0.5rem;
  display: inline-block;
}
.grand-leadership-section .distinguished-lead {
  grid-column: 1 / -1;
  margin: 0 0 0.5rem;
  letter-spacing: 0.1em;
}
.grand-leadership-section .distinguished-card {
  text-align: center;
  padding: 2rem 1.5rem;
  border-color: #d4c5a0;
  box-shadow: 0 4px 16px rgba(30, 58, 95, 0.08);
}
.grand-leadership-section .distinguished-card .lodge-card-accent {
  background: linear-gradient(90deg, #8b7355, #b8860b, #8b7355);
  height: 5px;
}
.grand-leadership-section .distinguished-card .distinguished {
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}
.grand-leadership-section .distinguished-card .distinguished-photo {
  margin: 0;
}
.grand-leadership-section .distinguished-card .distinguished-photo img {
  width: 160px;
  height: 280px;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid #d4c5a0;
  box-shadow: 0 4px 14px rgba(30, 58, 95, 0.12);
}
.grand-leadership-section .distinguished-card .distinguished-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1e3a5f;
  margin-bottom: 0.35rem;
  line-height: 1.35;
}
.grand-leadership-section .distinguished-card .distinguished-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #6b5b45;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.grand-leadership-intro {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  margin-top: 0.5rem;
  padding: 1.25rem 1.5rem;
  background: rgba(30, 58, 95, 0.06);
  border: 1px solid rgba(30, 58, 95, 0.15);
  border-radius: 8px;
  box-sizing: border-box;
}
.grand-leadership-intro p {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: #3d4a5c;
  margin: 0 0 0.75rem;
  text-align: justify;
  max-width: none;
  width: 100%;
  box-sizing: border-box;
}
.grand-leadership-intro p:last-of-type {
  margin-bottom: 0;
}
.grand-leadership-more {
  margin-top: 1rem !important;
  margin-bottom: 0 !important;
  text-align: right;
}
.grand-leadership-more a {
  font-weight: 600;
  color: #1e3a5f;
  text-decoration: none;
}
.grand-leadership-more a:hover {
  color: #b8860b;
  text-decoration: underline;
}
@media (max-width: 768px) {
  .grand-leadership-section .distinguished-wrap {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .grand-leadership-section .distinguished-card .distinguished-photo img {
    width: 140px;
    height: 245px;
  }
}

/* Shared section layout — Genesis, Freemasonry, Officers, Meetings, Join, Contact */
.genesis-section .content-wrap,
.freemasonry-section .content-wrap,
.officers-section .content-wrap,
.meetings-section .content-wrap,
.join-section .content-wrap,
.contact-section .content-wrap {
  max-width: 1100px;
  margin: 0 auto;
}
.section-heading {
  font-size: 2.1rem;
  font-weight: 600;
  color: #1e3a5f;
  margin: 0 0 0.5rem;
  display: inline-block;
}
.section-heading strong { font-weight: inherit; color: inherit; }
.section-lead {
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.55;
  color: #2d3544;
  margin: 1.5rem 0 1.25rem;
  padding: 1.25rem 1.5rem;
  background: rgba(30, 58, 95, 0.08);
  border-left: 4px solid #1e3a5f;
  border-radius: 0 6px 6px 0;
}
.section-card {
  position: relative;
  background: #fff;
  border: 1px solid #c5d4e4;
  border-radius: 8px;
  padding: 1.5rem 1.75rem;
  padding-top: 1.75rem;
  box-shadow: 0 2px 10px rgba(30, 58, 95, 0.06);
  margin-bottom: 1rem;
}
.section-card .lodge-card-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: #1e3a5f;
  border-radius: 8px 8px 0 0;
}
.section-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1rem;
}
@media (max-width: 700px) {
  .section-card-grid { grid-template-columns: 1fr; }
}
.section-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #1e3a5f;
  margin: 0 0 0.6rem;
}
.section-card-subhead {
  font-size: 1rem;
  font-weight: 700;
  color: #1e3a5f;
  margin: 1.5rem 0 0.75rem;
}
.section-card p {
  font-size: 0.9875rem;
  line-height: 1.65;
  color: #3d4a5c;
  margin: 0 0 0.75rem;
  max-width: none;
  text-align: justify;
}
.section-card p:last-child { margin-bottom: 0; }
.section-card .section-intro {
  margin-bottom: 1rem;
  max-width: none;
  text-align: justify;
}
.section-card .founder-members { margin-top: 1rem; }
.genesis-section .genesis-dates {
  font-size: 1rem;
  font-weight: 600;
  color: #1e3a5f;
  margin: 0 0 1rem;
}
.genesis-section .founder-members-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e3a5f;
  margin: 2rem 0 0.75rem;
}
.genesis-section .founder-members {
  list-style: none;
  padding-left: 0;
}
.genesis-section .founder-members .office {
  margin-right: 0.35rem;
}
.past-masters-cta {
  margin: 1.5rem 0 0;
}
.past-masters-cta .cta {
  padding: 0.6rem 1.25rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
}
.section-card .officers-grid {
  margin-top: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.section-card .officer {
  background: #f8fafc;
  border: 1px solid #c5d4e4;
  box-shadow: none;
}

/* Lodge Officers — Meet Our Team style: centered title, subhead, 2×3 grid, circular photos */
.officers-team-section {
  background: var(--section-blue);
}
.officers-team-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
  text-align: center;
}
.officers-team-heading {
  font-size: 2.1rem;
  font-weight: 600;
  color: #1e3a5f;
  margin: 0 0 2.5rem;
  display: inline-block;
}
.officers-team-heading .officers-year {
  display: inline-block;
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-gold) 100%);
  padding: 0.25rem 0.75rem;
  margin-left: 0.5rem;
  border-radius: 6px;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(201, 162, 39, 0.35);
  vertical-align: middle;
}
.officers-team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem 1.5rem;
}
@media (min-width: 600px) {
  .officers-team-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.officers-team-card {
  text-align: center;
  padding: 0;
  background: transparent;
  border: none;
}
.officers-team-photo {
  width: 140px;
  height: 140px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  overflow: hidden;
  border: none;
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}
.officers-team-card:hover .officers-team-photo {
  filter: none;
}
.officers-team-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.officers-team-photo.officer-photo-placeholder {
  background: linear-gradient(145deg, #d4dce4 0%, #c5d0dc 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: #5a6578;
  filter: grayscale(100%);
}
.officers-team-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0d9488;
  margin: 0 0 0.25rem;
  line-height: 1.3;
}
.officers-team-card-name-black .officers-team-name {
  color: #000;
}
.officers-team-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: #5a6578;
  margin: 0;
  line-height: 1.4;
}
@media (max-width: 480px) {
  .officers-team-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .officers-team-photo {
    width: 120px;
    height: 120px;
  }
}

.section-card .meetings-list { margin-top: 0; }
.section-card .meeting-item {
  border-radius: 6px;
  margin-bottom: 0.5rem;
  border: 1px solid #c5d4e4;
  background: #f8fafc;
}
.section-card .join-steps { margin-top: 0; margin-bottom: 1rem; }
.section-card .join-cta-wrap { margin: 1rem 0 0; }
.section-card form { margin-top: 0; }

/* Hero — full-bleed like XD image: edge-to-edge banner + dark overlay */
.hero {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  min-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem 1.5rem 6rem;
  background: var(--bg) center/cover no-repeat;
  border-bottom: 1px solid var(--border);
  box-sizing: border-box;
}
.hero.has-bg { background-image: url("images/Banner_Image.jpg"); }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.65) 40%,
    rgba(0, 0, 0, 0.4) 70%,
    rgba(0, 0, 0, 0.15) 100%
  );
  z-index: 0;
}
.hero > * { position: relative; z-index: 1; }
.hero {
  align-items: flex-start;
  text-align: left;
  justify-content: center;
  padding: 6rem 2rem 5rem 8rem;
  padding-left: 8rem;
}
.hero .hero-content {
  max-width: 42rem;
}
.hero h1 {
  font-family: var(--font-sans);
  font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.12;
  margin: 0 0 0.35rem;
  letter-spacing: 0.02em;
  color: #fff;
  text-transform: uppercase;
}
.hero h1 .accent { color: #fff; }
.hero .hero-number {
  display: block;
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  margin-top: 0.25rem;
  letter-spacing: 0.12em;
  font-weight: 700;
}
.hero .hero-tagline {
  font-size: 1.1rem;
  color: #fff;
  max-width: 40ch;
  margin: 1rem 0 1.25rem;
  font-weight: 400;
  line-height: 1.5;
  font-family: var(--font-sans);
}
.hero .know-more {
  color: var(--know-more);
  font-weight: 500;
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.2s;
  font-family: var(--font-sans);
}
.hero .know-more:hover, .hero .know-more:focus {
  color: var(--know-more-hover);
  text-decoration: underline;
}
.hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 40ch;
  margin: 0 auto 2rem;
}
.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  background: var(--accent);
  color: #1a1d24;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  transition: background 0.2s, transform 0.15s;
  box-shadow: var(--shadow);
}
.cta:hover { background: var(--accent-hover); transform: translateY(-1px); color: #1a1d24; }

/* Typography */
h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 700;
  margin: 0 0 1.25rem;
  letter-spacing: -0.01em;
  color: var(--text);
}
.about p, .section-intro {
  color: var(--text-muted);
  max-width: 68ch;
  margin: 0 0 1rem;
}
/* Full width for paragraphs inside section cards (e.g. Genesis), Grand Lodge intro, and Distinguished Brethren bio */
section.about .section-card p,
section.services .section-card p,
section.contact .section-card p,
.section-card .section-intro,
.grand-leadership-section .grand-leadership-intro p,
.distinguished-section .distinguished-card .distinguished-body p {
  max-width: none;
  width: 100%;
  box-sizing: border-box;
  font-size: 0.9875rem;
  line-height: 1.65;
}
/* Normal text and paragraphs site-wide — same size as Founder Master paragraph */
.section-card p,
.lodge-card p,
.grand-leadership-intro p,
.core-principle-card p,
.contact-detail-content,
.freemasonry-content .section-card p,
.freemasonry-content .section-card .section-intro {
  font-size: 0.9875rem;
  line-height: 1.65;
}

.contact-details {
  margin: 0;
  padding: 0;
}
.contact-detail-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin: 0 0 1.25rem;
  font-size: 1rem;
  line-height: 1.5;
  color: #2d3544;
}
.contact-detail-item:last-child {
  margin-bottom: 0;
}
.contact-detail-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1e3a5f;
}
.contact-detail-icon svg {
  display: block;
}
.contact-detail-icon-inline {
  display: inline-flex;
  width: auto;
  height: auto;
  margin-right: 0.35rem;
  vertical-align: -0.2em;
}
.contact-detail-content {
  min-width: 0;
}
.contact-detail-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #1e3a5f;
  margin-bottom: 0.35rem;
}
.contact-details a {
  color: #1e3a5f;
  font-weight: 500;
  text-decoration: none;
}
.contact-details a:hover {
  text-decoration: underline;
}
.contact-map-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-weight: 600;
  color: #1e3a5f;
}
.contact-map-link:hover {
  color: #2c5282;
  text-decoration: underline;
}

/* Contact Us — stylish card and details */
.contact-section .section-card.contact-details-card {
  padding: 2rem 2rem 2.25rem;
  border-radius: 12px;
  border: 1px solid rgba(30, 58, 95, 0.12);
  box-shadow: 0 4px 20px rgba(30, 58, 95, 0.06);
  background: #fff;
}
.contact-section .section-card.contact-details-card .lodge-card-accent {
  height: 4px;
  border-radius: 12px 12px 0 0;
}
.contact-section .contact-detail-item {
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  background: rgba(30, 58, 95, 0.04);
  border-radius: 8px;
  border: 1px solid transparent;
  transition: background 0.2s, border-color 0.2s;
}
.contact-section .contact-detail-item:last-of-type {
  margin-bottom: 0;
}
.contact-detail-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.contact-detail-row .contact-detail-item {
  flex: 1;
  margin-bottom: 0;
  min-width: 0;
}
@media (max-width: 600px) {
  .contact-detail-row {
    flex-direction: column;
    gap: 0.75rem;
  }
}
.contact-section .contact-detail-item:hover {
  background: rgba(30, 58, 95, 0.06);
  border-color: rgba(30, 58, 95, 0.1);
}
.contact-section .contact-detail-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 10px;
  background: rgba(30, 58, 95, 0.08);
  color: #1e3a5f;
}
.contact-section .contact-detail-content {
  font-size: 1rem;
  line-height: 1.6;
  color: #2d3544;
}
.contact-section .contact-details a {
  font-weight: 600;
}
.contact-section .contact-details a:hover {
  color: #2c5282;
}

.contact-gmap-block {
  display: block;
  margin-top: 1.5rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(30, 58, 95, 0.12);
  box-shadow: 0 4px 20px rgba(30, 58, 95, 0.06);
  transition: box-shadow 0.2s, border-color 0.2s;
  text-decoration: none;
  color: inherit;
}
.contact-gmap-block:hover {
  box-shadow: 0 8px 28px rgba(30, 58, 95, 0.1);
  border-color: rgba(30, 58, 95, 0.2);
}
.contact-gmap-image {
  display: block;
  line-height: 0;
  background: #f0f4f8;
  overflow: hidden;
}
.contact-gmap-image img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 280px;
  object-fit: cover;
  object-position: center;
}
.contact-gmap-caption {
  display: block;
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #1e3a5f;
  text-align: center;
  background: #f8fafc;
  border-top: 1px solid rgba(30, 58, 95, 0.08);
}
.contact-gmap-block:hover .contact-gmap-caption {
  background: rgba(30, 58, 95, 0.06);
}

/* Officers */
.officers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.officer {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.officer:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 24px rgba(124, 45, 52, 0.1);
}
.officer .title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.35rem;
}
.officer .name { font-weight: 600; margin: 0; color: var(--text); }

/* Officer with photo (e.g. Secretary) */
.officer-with-photo {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}
.officer-with-photo .officer-photo {
  flex-shrink: 0;
}
.officer-with-photo .officer-photo img {
  display: block;
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.officer-with-photo .officer-info { flex: 1; min-width: 0; }
.section-card .officer-with-photo .officer-photo img {
  border-color: #c5d4e4;
}

/* Meetings */
.meetings-list { margin-top: 1.5rem; }
.meeting-item {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.meeting-item:last-child { border-bottom: 1px solid var(--border); margin-bottom: 0; }
.meeting-item strong { color: var(--text); }
.meeting-item span { color: var(--text-muted); }

/* Values list */
.values-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.values-list li {
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  box-shadow: var(--shadow);
}
.values-list li strong { color: var(--accent); display: block; margin-bottom: 0.35rem; font-family: var(--font-display); }

/* Genesis */
.genesis-dates {
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 1rem;
  font-size: 1rem;
}

/* Distinguished */
.distinguished {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 2rem 2rem 2.5rem;
  margin-top: 1rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: flex-start;
}
.distinguished-photo {
  flex-shrink: 0;
}
.distinguished-photo img {
  display: block;
  width: 160px;
  height: auto;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  box-shadow: var(--shadow);
}
.distinguished-body { flex: 1; min-width: 0; }
.distinguished-heading {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-gold);
  margin: 0 0 0.75rem;
}
.distinguished-name {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.75rem);
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.25rem;
  letter-spacing: -0.01em;
}
.distinguished-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 1.5rem;
}
.distinguished p {
  color: var(--text-muted);
  max-width: 72ch;
  margin: 0 0 1rem;
  font-size: 0.9375rem;
  line-height: 1.7;
}
.distinguished .distinguished-body p:last-child { margin-bottom: 0; }

/* Founder members — compact, less vertical space */
.founder-members {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.35rem 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.founder-members li {
  position: relative;
  padding: 0.4rem 0.5rem 0.4rem 0.65rem;
  padding-left: 0.65rem;
  background: #fff;
  border-left: 3px solid #1e3a5f;
  border-radius: 0 4px 4px 0;
  box-shadow: 0 1px 3px rgba(30, 58, 95, 0.06);
  transition: box-shadow 0.15s;
}
.founder-members li:hover {
  box-shadow: 0 2px 8px rgba(30, 58, 95, 0.08);
}
.founder-members li::before {
  content: none;
  display: none;
}
.founder-members .office {
  display: inline;
  font-size: inherit;
  font-weight: 700;
  color: #1e3a5f;
  margin-bottom: 0;
}
.founder-members li:last-child { border-bottom: none; }
section.about .founder-members li {
  background: #fff;
  border-left-color: #1e3a5f;
}
section.about .founder-members .office { color: #1e3a5f; }

/* Join steps */
.join-steps {
  margin-top: 1.5rem;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.join-steps li {
  position: relative;
  padding-left: 3.25rem;
  padding-bottom: 1.25rem;
  color: var(--text-muted);
}
.join-steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.85rem;
  height: 1.85rem;
  background: var(--accent);
  color: #1a1d24;
  font-weight: 700;
  font-size: 0.875rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.join-steps li strong { color: var(--text); }

/* Past masters table */
.past-masters-wrap {
  overflow-x: auto;
  margin-top: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--surface);
}
.past-masters-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
.past-masters-table th,
.past-masters-table td {
  padding: 0.85rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.past-masters-table th {
  background: var(--bg-alt);
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-display);
}
.past-masters-table tr:last-child td { border-bottom: none; }
.past-masters-table tbody tr:hover td { background: var(--accent-muted); }
.past-masters-table .col-year { width: 4.5rem; }

/* Cards (if used) */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 24px rgba(124, 45, 52, 0.1);
}
.card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
}
.card p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* Contact form */
.contact form {
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.contact label {
  font-weight: 600;
  display: block;
  margin-bottom: 0.25rem;
  color: var(--text);
}
.contact input,
.contact textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}
.contact input:focus,
.contact textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-muted);
}
.contact textarea { min-height: 120px; resize: vertical; }
.contact button {
  align-self: flex-start;
  padding: 0.85rem 1.75rem;
  font: inherit;
  font-weight: 600;
  color: #1a1d24;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s;
  box-shadow: var(--shadow);
}
.contact button:hover { background: var(--accent-hover); color: #1a1d24; }

/* Footer — two sections: dark top, blue bottom */
footer {
  margin-top: 4rem;
}
.footer-top {
  background: #0a0a0a;
  padding: 3rem 2rem;
}
.footer-top .footer-inner {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-sizing: border-box;
}
.footer-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  max-width: 560px;
}
.footer-logo {
  display: block;
  height: 140px;
  width: auto;
  flex-shrink: 0;
  opacity: 0.95;
}
.footer-info {
  min-width: 0;
  text-align: center;
}
.footer-lodge-name {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff;
  margin: 0 0 1rem;
  line-height: 1.3;
}
.footer-address,
.footer-email,
.footer-dates {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 0.5rem;
  line-height: 1.5;
}
.footer-dates {
  color: var(--cta-blue);
  margin-top: 0.75rem;
}
.footer-top a {
  color: #fff;
  text-decoration: none;
}
.footer-top a:hover { text-decoration: underline; }
@media (max-width: 520px) {
  .footer-logo {
    height: 110px;
  }
}
.footer-right {
  flex: 0 1 auto;
  min-width: 240px;
}
.footer-links-title {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff;
  margin: 0 0 1.25rem;
}
.footer-links-grid {
  display: flex;
  gap: 2.5rem 3rem;
  margin-bottom: 1.5rem;
}
.footer-links-col {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-links-col li { margin-bottom: 0.5rem; }
.footer-links-col a {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
}
.footer-links-col a:hover { color: #fff; text-decoration: underline; }
.footer-cta {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  background: #64B5F6;
  color: #fff !important;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.2s;
}
.footer-cta:hover { background: #90CAF9; }
.footer-bottom {
  background: #1976D2;
  padding: 1rem 2rem;
  text-align: center;
}
.footer-bottom p {
  margin: 0;
  font-size: 0.875rem;
  color: #fff;
}
.footer-bottom a {
  color: #fff;
  text-decoration: none;
}
.footer-bottom a:hover { text-decoration: underline; }
.footer-sep {
  margin: 0 0.5rem;
  opacity: 0.9;
}
.contact a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.contact a:hover { text-decoration: underline; }

/* Page-specific: Past Masters */
.back-link {
  display: inline-block;
  margin-bottom: 2rem;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}
.back-link:hover { color: var(--accent); }

/* Past Masters page — redesigned to match index sections */
.past-masters-page {
  background: var(--section-blue);
  padding-bottom: 3rem;
}
.past-masters-hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem 1.5rem;
}
.past-masters-title {
  font-size: 2.1rem;
  font-weight: 600;
  color: #1e3a5f;
  margin: 1rem 0 0.5rem;
  line-height: 1.25;
}
.past-masters-intro {
  font-size: 1rem;
  color: #3d4a5c;
  margin: 0;
  line-height: 1.5;
}
.past-masters-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem 2rem;
}
.founder-master-card {
  margin-bottom: 1.5rem;
}
.founder-master-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: flex-start;
}
.founder-master-card .founder-master-photo {
  flex-shrink: 0;
}
.founder-master-card .founder-master-photo img {
  display: block;
  width: 160px;
  height: auto;
  border-radius: 8px;
  border: 1px solid #c5d4e4;
  box-shadow: 0 2px 10px rgba(30, 58, 95, 0.08);
}
.founder-master-card .founder-master-body {
  flex: 1;
  min-width: 0;
}
.founder-master-heading {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #1e3a5f;
  margin: 0 0 0.75rem;
}
.founder-master-card .founder-master-body p {
  margin: 0 0 0.6rem;
  color: #3d4a5c;
  font-size: 0.9875rem;
  line-height: 1.6;
}
.founder-master-card .founder-master-body p:last-child {
  margin-bottom: 0;
}
.founder-master-card .verify {
  font-style: italic;
  color: #5a6578;
}
.past-masters-table-card {
  padding: 1.5rem 1.75rem 1.75rem;
}
.past-masters-table-heading {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #1e3a5f;
  margin: 0 0 1rem;
}
.past-masters-page .past-masters-wrap {
  overflow-x: auto;
  margin: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
.past-masters-page .past-masters-table {
  min-width: 480px;
  font-size: 0.9375rem;
}
.past-masters-page .past-masters-table th,
.past-masters-page .past-masters-table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
}
.past-masters-page .past-masters-table th {
  background: #f1f5f9;
  font-weight: 700;
  color: #1e3a5f;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.past-masters-page .past-masters-table tbody tr:hover td {
  background: #f8fafc;
}
.past-masters-page .past-masters-table .col-year,
.past-masters-page .past-masters-table td:first-child {
  width: 4rem;
  color: #0d9488;
  font-weight: 600;
}
.past-masters-page .past-masters-table td:nth-child(2),
.past-masters-page .past-masters-table td:nth-child(3) {
  color: #1a1d24;
  font-weight: 500;
}
.past-masters-page .back-link {
  color: #1e3a5f;
  font-weight: 500;
}
.past-masters-page .back-link:hover {
  color: #0d9488;
}

/* Freemasonry page */
.freemasonry-page {
  background: var(--section-blue);
  padding-bottom: 3rem;
}
.freemasonry-hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem 1rem;
}
.freemasonry-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.freemasonry-title-row .lodge-title-emblem {
  width: 56px;
  height: 56px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(30, 58, 95, 0.12));
}
.freemasonry-title {
  font-size: 2.1rem;
  font-weight: 600;
  color: #1e3a5f;
  margin: 0;
}
.freemasonry-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem 2rem;
}
.freemasonry-page .back-link {
  color: #1e3a5f;
  font-weight: 500;
}
.freemasonry-page .back-link:hover {
  color: #0d9488;
}
.freemasonry-who-card {
  margin-top: 1.5rem;
}
.freemasonry-section-heading {
  font-size: 1.35rem;
  font-weight: 700;
  font-style: italic;
  color: #1e3a5f;
  margin: 0 0 1rem;
}
.freemasonry-qa-card {
  background: #fff;
  border: 1px solid #c5d4e4;
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-top: 1rem;
  box-shadow: 0 2px 8px rgba(30, 58, 95, 0.06);
}
.freemasonry-qa-card:first-of-type {
  margin-top: 0;
}
.freemasonry-qa-card-alt {
  background: rgba(30, 58, 95, 0.06);
  border-color: rgba(30, 58, 95, 0.15);
}
.freemasonry-qa-section .freemasonry-qa-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #1e3a5f;
  margin: 0 0 0.5rem;
}
.freemasonry-qa-card p {
  font-size: 0.9875rem;
  line-height: 1.65;
  color: #3d4a5c;
  margin: 0 0 0.6rem;
}
.freemasonry-qa-card p:last-child {
  margin-bottom: 0;
}
.freemasonry-who-card p {
  font-size: 0.9875rem;
  line-height: 1.65;
  color: #3d4a5c;
  margin: 0 0 0.75rem;
}
.freemasonry-who-card p:last-of-type {
  margin-bottom: 0;
}
.freemasonry-who-list {
  margin: 0.75rem 0 1rem;
  padding-left: 1.5rem;
  color: #3d4a5c;
  font-size: 0.9875rem;
  line-height: 1.6;
}
.freemasonry-who-list li {
  margin-bottom: 0.4rem;
}
.freemasonry-who-list li:last-child {
  margin-bottom: 0;
}
.freemasonry-who-card a {
  color: #1e3a5f;
  font-weight: 600;
  text-decoration: none;
}
.freemasonry-who-card a:hover {
  color: #0d9488;
  text-decoration: underline;
}
.freemasonry-content .section-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #1e3a5f;
  margin: 1.5rem 0 0.5rem;
}
.freemasonry-content .section-card h3:first-of-type {
  margin-top: 0;
}
/* Freemasonry Teaches — stylish card */
.freemasonry-teaches-card {
  border-left: 4px solid #1e3a5f;
  background: linear-gradient(135deg, rgba(30, 58, 95, 0.04) 0%, rgba(30, 58, 95, 0.08) 100%);
}
.freemasonry-teaches-heading {
  font-size: 1.1rem !important;
  letter-spacing: 0.02em;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(30, 58, 95, 0.2);
  margin-bottom: 1rem !important;
}
.freemasonry-teaches-list {
  margin: 0 0 1.25rem;
  padding-left: 0;
  list-style: none;
  color: #2d3544;
  font-size: 1rem;
  line-height: 1.7;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 2rem;
}
.freemasonry-teaches-list li {
  margin-bottom: 0;
  padding-left: 1.75rem;
  position: relative;
}
@media (max-width: 600px) {
  .freemasonry-teaches-list {
    grid-template-columns: 1fr;
  }
}
.freemasonry-teaches-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  background: #1e3a5f;
  border-radius: 50%;
}
.freemasonry-teaches-list li.freemasonry-teaches-last {
  font-weight: 600;
  color: #1e3a5f;
  margin-top: 0.5rem;
  grid-column: 1 / -1;
}
.freemasonry-teaches-list li.freemasonry-teaches-last::before {
  background: #b8860b;
  width: 8px;
  height: 8px;
  top: 0.5em;
  left: -0.15rem;
}
.freemasonry-way-of-life {
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  font-size: 1.15rem !important;
  font-weight: 600;
  font-style: italic;
  color: #1e3a5f;
  margin: 0 !important;
  padding: 1rem 1.25rem;
  background: rgba(30, 58, 95, 0.08);
  border-radius: 6px;
  border: 1px solid rgba(30, 58, 95, 0.15);
  letter-spacing: 0.02em;
}
.freemasonry-poem-wrap {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
}
.freemasonry-poem {
  margin: 0;
  max-width: 440px;
  width: 100%;
  padding: 0;
  padding-top: 0.25rem;
  text-align: center;
  background: linear-gradient(180deg, #fff 0%, rgba(232, 238, 244, 0.6) 100%);
  border: 1px solid rgba(30, 58, 95, 0.15);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(30, 58, 95, 0.1), 0 2px 8px rgba(30, 58, 95, 0.06);
  font-style: italic;
  margin-inline-start: 0;
  margin-inline-end: 0;
  position: relative;
  overflow: hidden;
}
.freemasonry-poem::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #1e3a5f, #b8860b, #1e3a5f);
  border-radius: 16px 16px 0 0;
}
.freemasonry-poem p {
  text-align: center;
  padding: 0 2rem;
}
.freemasonry-poem .poem-title {
  font-style: normal;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  color: #1e3a5f;
  margin: 0 0 1.5rem;
  padding-top: 2rem;
  padding-bottom: 0;
  text-transform: uppercase;
  text-align: center;
  position: relative;
}
.freemasonry-poem .poem-title::after {
  content: "";
  display: block;
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #b8860b, transparent);
  margin: 1rem auto 0;
  border-radius: 1px;
}
.freemasonry-poem p:last-child {
  margin: 0;
  padding-bottom: 2.25rem;
  line-height: 2;
  font-size: 1rem;
  color: #2d3544;
  text-align: center;
}

/* Legacy founder-master (if used elsewhere) */
.founder-master {
  margin: 2rem 0 2.5rem;
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: flex-start;
  box-shadow: var(--shadow);
}
.founder-master-photo { flex-shrink: 0; }
.founder-master-photo img {
  display: block;
  width: 140px;
  height: auto;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  box-shadow: var(--shadow);
}
.founder-master-body { flex: 1; min-width: 0; }
.founder-master h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  color: var(--accent);
}
.founder-master p {
  margin: 0 0 0.5rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
  max-width: none;
}
.founder-master .founder-master-body p:last-child { margin-bottom: 0; }
.founder-master .verify { font-style: italic; }

/* Page-specific: Gallery */
body.gallery-page main {
  padding-left: 7rem;
  padding-right: 7rem;
}
@media (max-width: 768px) {
  body.gallery-page main {
    padding-left: 4rem;
    padding-right: 4rem;
  }
}
.gallery-intro {
  color: var(--text-muted);
  margin-bottom: 2rem;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.gallery-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: border-color 0.2s, box-shadow 0.2s, outline 0.2s, outline-offset 0.2s;
  outline: 2px solid transparent;
  outline-offset: 4px;
}
.gallery-item:hover,
.gallery-item:focus-within {
  border-color: var(--accent);
  box-shadow: 0 8px 32px rgba(124, 45, 52, 0.12);
  outline-color: var(--accent);
  outline-offset: 4px;
}
.gallery-item-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
  position: relative;
}
.gallery-item-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 40px 20px rgba(0, 0, 0, 0.15);
}
.gallery-item-btn img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: var(--bg-alt);
  pointer-events: none;
  mask-image: radial-gradient(ellipse 92% 92% at 50% 50%, black 75%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 92% 92% at 50% 50%, black 75%, transparent 100%);
  mask-size: cover;
  -webkit-mask-size: cover;
}

/* Gallery popup (lightbox) */
.gallery-popup {
  position: fixed;
  inset: 0;
  z-index: 10002;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  box-sizing: border-box;
}
.gallery-popup[hidden] { display: none !important; }
.gallery-popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  cursor: pointer;
}
.gallery-popup-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10004;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.gallery-popup-close:hover,
.gallery-popup-close:focus {
  background: rgba(255, 255, 255, 0.35);
}
.gallery-popup-prev,
.gallery-popup-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10004;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  user-select: none;
}
.gallery-popup-prev { left: 1rem; }
.gallery-popup-next { right: 1rem; }
.gallery-popup-prev:hover,
.gallery-popup-prev:focus,
.gallery-popup-next:hover,
.gallery-popup-next:focus {
  background: rgba(255, 255, 255, 0.35);
}
.gallery-popup-image-wrap {
  position: relative;
  z-index: 10003;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-popup-image {
  max-width: 100%;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

/* Subheading in genesis */
.genesis h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 2rem 0 0.75rem;
  color: var(--accent);
}

@keyframes mobile-nav-item-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Desktop: overlay wrapper is transparent so nav shows in header */
@media (min-width: 901px) {
  .mobile-nav-overlay {
    display: contents;
  }
}

/* Mobile menu — overlay div above everything, all items visible */
@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
  }
  /* Full-screen overlay: above all page content */
  .mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    z-index: 2147483646;
    background: rgba(26, 29, 36, 0.98);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
  }
  body.nav-open .mobile-nav-overlay {
    display: block;
  }
  /* Nav and list inside overlay: full width, scrollable list */
  .mobile-nav-overlay #main-nav {
    display: block;
    width: 100%;
    padding: 5.5rem 1.5rem 2rem;
    box-sizing: border-box;
  }
  .mobile-nav-overlay #main-nav ul {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0;
    align-items: stretch;
    margin: 0;
    padding: 0;
    list-style: none;
    width: 100%;
    box-sizing: border-box;
  }
  /* Menu items: one per row, appear one by one when menu opens */
  .mobile-nav-overlay #main-nav li {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  body.nav-open #main-nav li {
    opacity: 0;
    animation: mobile-nav-item-in 0.3s ease forwards;
  }
  body.nav-open #main-nav li:nth-child(1) { animation-delay: 0.05s; }
  body.nav-open #main-nav li:nth-child(2) { animation-delay: 0.1s; }
  body.nav-open #main-nav li:nth-child(3) { animation-delay: 0.15s; }
  body.nav-open #main-nav li:nth-child(4) { animation-delay: 0.2s; }
  body.nav-open #main-nav li:nth-child(5) { animation-delay: 0.25s; }
  body.nav-open #main-nav li:nth-child(6) { animation-delay: 0.3s; }
  body.nav-open #main-nav li:nth-child(7) { animation-delay: 0.35s; }
  body.nav-open #main-nav li:nth-child(8) { animation-delay: 0.4s; }
  #main-nav li:last-child {
    border-bottom: none;
  }
  #main-nav a {
    display: block;
    padding: 1rem 1rem;
    font-size: 1.0625rem;
    color: #fff !important;
    font-weight: 500;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    min-height: 48px;
    line-height: 1.4;
    box-sizing: border-box;
  }
  #main-nav a:hover,
  #main-nav a:focus {
    background: rgba(255, 255, 255, 0.1);
    color: #fff !important;
  }
  #main-nav a[aria-current="page"] {
    font-weight: 600;
    background: rgba(255, 255, 255, 0.08);
    color: #fff !important;
  }
  #main-nav .nav-cta {
    margin-top: 0.5rem;
    padding: 1rem;
    text-align: center;
    background: var(--cta-blue) !important;
    border-radius: 8px;
  }
  #main-nav .nav-cta:hover,
  #main-nav .nav-cta:focus {
    background: var(--cta-blue-hover) !important;
    color: #fff !important;
  }
  body.nav-open {
    overflow: hidden;
  }
  /* Header bar (logo + close) above overlay so it stays visible */
  .header-inner {
    position: relative;
    z-index: 2147483647;
    padding: 0.6rem 1rem;
  }
  .logo {
    margin-left: 0;
    position: relative;
    z-index: 1;
  }
  .logo img {
    height: 100px;
  }
  body.home .logo img {
    height: 100px;
  }
  .nav-toggle {
    z-index: 2;
  }
  main {
    padding-left: 1rem;
    padding-right: 1rem;
    padding-bottom: 3rem;
  }
  main.page-content {
    padding-top: 2rem;
  }
  .hero {
    padding: 4rem 1rem 3rem;
    padding-left: 1rem;
  }
  .hero .hero-content {
    max-width: none;
  }
  .content-wrap,
  .lodge-wrap,
  .distinguished-wrap,
  .officers-team-wrap,
  .past-masters-content,
  .past-masters-hero,
  .freemasonry-hero,
  .freemasonry-content {
    padding-left: 0;
    padding-right: 0;
  }
  section {
    padding: 2.5rem 0;
  }
  .section-card,
  .lodge-card,
  .contact-details-card {
    padding: 1.25rem 1rem;
  }
  .section-heading,
  .lodge-heading,
  .distinguished-section .distinguished-heading,
  .officers-team-heading {
    font-size: 1.65rem;
  }
  .officers-team-heading .officers-year {
    font-size: 1.05rem;
    padding: 0.2rem 0.55rem;
  }
  .contact-gmap-image img {
    max-height: 220px;
  }
  .footer-inner {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .footer-bottom p {
    font-size: 0.8125rem;
    text-align: center;
  }
  /* Distinguished Brethren: photo above, text below on mobile */
  .distinguished-section .distinguished-card .distinguished {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .distinguished-section .distinguished-card .distinguished-photo {
    flex-shrink: 0;
  }
  .distinguished-section .distinguished-card .distinguished-body {
    text-align: left;
    width: 100%;
  }
  .distinguished-section .distinguished-card .distinguished-body p {
    text-align: justify;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 3.5rem 1rem 3rem;
  }
  .hero h1 {
    font-size: clamp(1.75rem, 6vw, 2.5rem);
  }
  .hero .hero-tagline {
    font-size: 1rem;
  }
  section { padding: 2rem 0; }
  .header-inner { padding: 0.5rem 0.75rem; }
  .logo img {
    height: 80px;
  }
  body.home .logo img {
    height: 80px;
  }
  .officers-team-grid {
    gap: 1.5rem;
  }
  .past-masters-page .past-masters-table th,
  .past-masters-page .past-masters-table td {
    padding: 0.6rem 0.75rem;
    font-size: 0.875rem;
  }
  .past-masters-page .past-masters-table {
    min-width: 320px;
  }
}
