/* 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.1rem 0.25rem;
}
nav a {
  display: block;
  padding: 0.45rem 0.5rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 400;
  font-size: 0.75rem;
  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: 5rem 0;
  border-bottom: none;
  position: relative;
}
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: none;
  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,
#gallery-glimpse,
#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: 12px;
  box-shadow: 0 8px 30px rgba(30, 58, 95, 0.15);
  object-fit: cover;
  aspect-ratio: 3 / 2;
  transition: transform 0.5s cubic-bezier(0.4,0,0.2,1), box-shadow 0.5s;
}
.lodge-photo-main:hover {
  transform: scale(1.02);
  box-shadow: 0 16px 50px rgba(30, 58, 95, 0.2);
}
.lodge-images .lodge-founder {
  margin-top: 0;
}
.lodge-copy {
  min-width: 0;
}
.lodge-lead {
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.65;
  color: #2d3544;
  margin: 0 0 1.5rem;
  padding: 1.5rem 1.75rem;
  background: linear-gradient(135deg, rgba(30, 58, 95, 0.06) 0%, rgba(201, 162, 39, 0.04) 100%);
  border-left: 4px solid #1e3a5f;
  border-radius: 0 10px 10px 0;
  font-style: italic;
}
.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: 10px;
  padding: 1.5rem 1.75rem;
  padding-top: 1.75rem;
  box-shadow: 0 2px 10px rgba(30, 58, 95, 0.06);
  transition: box-shadow 0.4s cubic-bezier(0.4,0,0.2,1), border-color 0.3s, transform 0.4s cubic-bezier(0.4,0,0.2,1);
}
.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 12px 35px rgba(30, 58, 95, 0.12);
  transform: translateY(-3px);
}
.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: 12px;
  padding: 1.5rem 1.75rem;
  padding-top: 1.75rem;
  box-shadow: 0 4px 16px rgba(30, 58, 95, 0.08);
  transition: box-shadow 0.4s cubic-bezier(0.4,0,0.2,1), transform 0.4s cubic-bezier(0.4,0,0.2,1);
}
.lodge-founder:hover {
  box-shadow: 0 12px 40px rgba(184, 134, 11, 0.12);
  transform: translateY(-2px);
}
.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: 10px;
  padding: 0.75rem 1rem 1rem;
  padding-top: 0.9rem;
  box-shadow: 0 2px 10px rgba(30, 58, 95, 0.06);
  transition: box-shadow 0.4s cubic-bezier(0.4,0,0.2,1), transform 0.4s cubic-bezier(0.4,0,0.2,1);
}
.core-principle-card:hover {
  box-shadow: 0 8px 30px rgba(184, 134, 11, 0.12);
  transform: translateY(-3px);
}
.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: 10px;
  padding: 1.5rem 1.75rem;
  padding-top: 1.75rem;
  box-shadow: 0 4px 16px rgba(30, 58, 95, 0.06);
  transition: box-shadow 0.4s cubic-bezier(0.4,0,0.2,1), transform 0.4s cubic-bezier(0.4,0,0.2,1);
}
.distinguished-card:hover {
  box-shadow: 0 12px 40px rgba(30, 58, 95, 0.1);
  transform: translateY(-2px);
}
.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 — stylish redesign */
.grand-leadership-wrap {
  max-width: 1100px;
  margin: 0 auto;
  text-align: left;
}
.grand-leadership-header {
  margin-bottom: 2.5rem;
}
.grand-leadership-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: #1e3a5f;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}
.grand-leadership-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #c9a227, #f0d060);
  margin-top: 0.75rem;
  border-radius: 2px;
}
.grand-leadership-sub {
  font-size: 1rem;
  color: #5a6578;
  margin: 0;
  font-style: italic;
  max-width: 100%;
  white-space: nowrap;
}
.grand-leadership-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}
.gl-card {
  position: relative;
  display: flex;
  align-items: stretch;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 20px rgba(30, 58, 95, 0.06);
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1), box-shadow 0.4s;
}
.gl-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(30, 58, 95, 0.12);
}
.gl-card-photo {
  flex-shrink: 0;
  width: 150px;
  background: linear-gradient(160deg, #1e3a5f, #2c5282);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}
.gl-card-photo img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: top;
  border-radius: 8px;
  border: 2px solid rgba(201, 162, 39, 0.5);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.gl-card-info {
  flex: 1;
  padding: 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.gl-card-rank {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #c9a227;
  background: rgba(201, 162, 39, 0.1);
  padding: 0.25rem 0.75rem;
  border-radius: 3px;
  margin-bottom: 0.75rem;
  width: fit-content;
}
.gl-card-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e3a5f;
  margin: 0 0 0.35rem;
  line-height: 1.35;
}
.gl-card-title {
  font-size: 0.85rem;
  font-weight: 500;
  color: #5a6578;
  margin: 0;
  line-height: 1.4;
}
.grand-leadership-intro {
  background: #f8f9fb;
  border-radius: 12px;
  padding: 2rem 2.25rem;
  border-left: 4px solid #c9a227;
}
.grand-leadership-intro p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #3d4a5c;
  margin: 0 0 0.75rem;
}
.grand-leadership-intro p:last-of-type {
  margin-bottom: 0;
}
.grand-leadership-link {
  display: block;
  width: fit-content;
  margin: 1.25rem auto 0;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #0f1923;
  background: #c9a227;
  text-decoration: none;
  border: 1.5px solid #c9a227;
  padding: 0.7rem 1.75rem;
  border-radius: 4px;
  transition: background 0.3s, color 0.3s, transform 0.3s, box-shadow 0.3s;
}
.grand-leadership-link:hover {
  background: #f0d060;
  border-color: #f0d060;
  color: #0f1923;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201, 162, 39, 0.3);
}
@media (max-width: 768px) {
  .grand-leadership-cards {
    grid-template-columns: 1fr;
  }
  .gl-card-photo {
    width: 120px;
    padding: 1rem;
  }
  .gl-card-photo img {
    height: 160px;
  }
  .grand-leadership-title {
    font-size: 2rem;
  }
}

/* Quick Facts — stats bar */
.quick-facts-section {
  background: linear-gradient(135deg, #0f1923 0%, #1a2f4a 60%, #0f1923 100%);
  padding: 4.5rem 2rem;
  position: relative;
  overflow: hidden;
}
.quick-facts-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 600px 300px at 20% 50%, rgba(201, 162, 39, 0.06) 0%, transparent 70%),
    radial-gradient(ellipse 600px 300px at 80% 50%, rgba(201, 162, 39, 0.06) 0%, transparent 70%);
  pointer-events: none;
}
.quick-facts-wrap {
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.quick-facts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}
.quick-fact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 2rem 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(201, 162, 39, 0.15);
  position: relative;
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1), border-color 0.4s, box-shadow 0.4s;
}
.quick-fact:hover {
  transform: translateY(-4px);
  border-color: rgba(201, 162, 39, 0.4);
  box-shadow: 0 12px 40px rgba(201, 162, 39, 0.1);
}
.quick-fact::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, #c9a227, #f0d060);
  border-radius: 0 0 3px 3px;
}
.quick-fact-number {
  font-size: clamp(2.8rem, 5vw, 3.8rem);
  font-weight: 800;
  color: #c9a227;
  line-height: 1;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 20px rgba(201, 162, 39, 0.3);
}
.quick-fact-plus {
  font-size: 0.6em;
  color: #f0d060;
  vertical-align: super;
  margin-left: 2px;
}
.quick-fact-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  line-height: 1.4;
}
@media (max-width: 768px) {
  .quick-facts-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
  .quick-facts-section {
    padding: 3.5rem 1.5rem;
  }
}
@media (max-width: 480px) {
  .quick-facts-section {
    padding: 2.5rem 1rem;
  }
  .quick-fact {
    padding: 1.5rem 0.75rem;
  }
  .quick-fact-number {
    font-size: 2.2rem;
  }
}

/* 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.2rem;
  font-weight: 700;
  color: #1e3a5f;
  margin: 0 0 0.5rem;
  display: inline-block;
  position: relative;
}
.section-heading::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, #c9a227, #b8860b);
  border-radius: 2px;
  margin-top: 0.5rem;
}
.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-sub {
  font-size: 1rem;
  color: #5a6578;
  margin: 0.5rem 0 2rem;
  font-style: italic;
  max-width: 100%;
  white-space: nowrap;
}
.section-card {
  position: relative;
  background: #fff;
  border: 1px solid #c5d4e4;
  border-radius: 10px;
  padding: 1.5rem 1.75rem;
  padding-top: 1.75rem;
  box-shadow: 0 4px 16px rgba(30, 58, 95, 0.06);
  margin-bottom: 1rem;
  transition: box-shadow 0.4s cubic-bezier(0.4,0,0.2,1), transform 0.4s cubic-bezier(0.4,0,0.2,1);
}
.section-card:hover {
  box-shadow: 0 12px 40px rgba(30, 58, 95, 0.1);
  transform: translateY(-2px);
}
.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 — Dark premium section */
.officers-team-section {
  background: linear-gradient(160deg, #0f1a2e 0%, #1a2a4a 50%, #162038 100%);
  position: relative;
  overflow: hidden;
}
.officers-team-bg-pattern {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 80%, rgba(201, 162, 39, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(201, 162, 39, 0.04) 0%, transparent 40%);
  pointer-events: none;
}
.officers-team-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 1.5rem 4.5rem;
  text-align: left;
  position: relative;
  z-index: 1;
}
.officers-team-overline {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin: 0 0 0.75rem;
}
.officers-team-heading {
  font-size: 2.4rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 2.5rem;
  display: block;
}
.officers-team-heading .officers-year {
  display: inline-block;
  font-size: 1.35rem;
  font-weight: 700;
  color: #1a1d24;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-gold) 100%);
  padding: 0.25rem 0.85rem;
  margin-left: 0.5rem;
  border-radius: 4px;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 12px rgba(201, 162, 39, 0.35);
  vertical-align: middle;
}

/* Featured WM card */
.officers-featured-card {
  display: flex;
  align-items: stretch;
  gap: 0;
  max-width: 520px;
  margin: 0 0 3rem;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(30, 58, 95, 0.1);
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1), box-shadow 0.4s;
}
.officers-featured-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(30, 58, 95, 0.15);
}
.officers-featured-photo {
  width: 180px;
  flex-shrink: 0;
  overflow: hidden;
}
.officers-featured-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}
.officers-featured-info {
  text-align: left;
  padding: 2rem 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: 4px solid #c9a227;
}
.officers-featured-badge {
  display: inline-block;
  width: fit-content;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #fff;
  background: #1e3a5f;
  padding: 0.35rem 0.85rem;
  border-radius: 3px;
  margin-bottom: 1rem;
}
.officers-featured-label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #c9a227;
  margin: 0 0 0.5rem;
}
.officers-featured-name {
  font-size: 1.35rem;
  font-weight: 700;
  color: #1e3a5f;
  margin: 0;
  line-height: 1.3;
}
.officers-featured-year {
  font-size: 0.75rem;
  font-weight: 600;
  color: #8896aa;
  margin: 0.6rem 0 0;
  letter-spacing: 0.1em;
}

/* Officer grid cards */
.officers-team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
@media (min-width: 600px) {
  .officers-team-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}
@media (min-width: 600px) and (max-width: 900px) {
  .officers-team-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.officers-team-card {
  text-align: center;
  padding: 1.5rem 0.75rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  transition: background 0.3s, transform 0.4s cubic-bezier(0.4,0,0.2,1), box-shadow 0.4s, border-color 0.3s;
}
.officers-team-card:hover {
  background: rgba(255,255,255,0.08);
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
  border-color: rgba(201, 162, 39, 0.3);
}
.officers-team-photo {
  width: 120px;
  height: 140px;
  margin: 0 auto 0.85rem;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.15);
  transition: border-color 0.4s, transform 0.4s cubic-bezier(0.4,0,0.2,1), box-shadow 0.4s;
}
.officers-team-card:hover .officers-team-photo {
  border-color: var(--accent);
  transform: scale(1.08);
  box-shadow: 0 4px 20px rgba(201, 162, 39, 0.25);
}
.officers-team-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}
.officers-team-photo.officer-photo-placeholder {
  background: linear-gradient(145deg, #2a3a5a 0%, #1e2d4a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: #8896aa;
}
.officers-team-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 0.2rem;
  line-height: 1.3;
}
.officers-team-card-name-black .officers-team-name {
  color: #fff;
}
.officers-team-title {
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255,255,255,0.5);
  margin: 0;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* View All link */
.officers-view-all {
  display: inline-block;
  margin-top: 2.5rem;
  padding: 0.7rem 1.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid rgba(201, 162, 39, 0.4);
  border-radius: 4px;
  transition: background 0.3s, color 0.3s, transform 0.3s, box-shadow 0.3s;
}
.officers-view-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-top: 2.5rem;
}
.officers-view-actions .officers-view-all {
  margin-top: 0;
}
.officers-view-all:hover {
  background: var(--accent);
  color: #1a1d24;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201, 162, 39, 0.3);
}

@media (max-width: 480px) {
  .officers-team-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  .officers-team-photo {
    width: 100px;
    height: 120px;
  }
  .officers-featured-card {
    max-width: none;
  }
  .officers-featured-photo {
    width: 140px;
  }
  .officers-featured-name {
    font-size: 1rem;
  }
}

/* Gallery Glimpse — home page preview */
/* Distinguished Brethren Glimpse — home page preview */
.distinguished-glimpse-section {
  background: #f8f9fb;
}
.distinguished-glimpse-wrap {
  max-width: 1000px;
  margin: 0 auto;
  text-align: left;
}
.distinguished-glimpse-wrap .section-heading {
  display: block;
}
.distinguished-glimpse-wrap .section-heading::after {
  margin: 0.5rem 0 0;
}
.distinguished-glimpse-sub {
  font-size: 1rem;
  color: #5a6578;
  margin: 0.5rem 0 2.5rem;
  max-width: 100%;
}
.distinguished-glimpse-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.distinguished-glimpse-card {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  text-align: left;
  transition: transform 0.3s, box-shadow 0.3s;
}
.distinguished-glimpse-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(30,58,95,0.1);
}
.distinguished-glimpse-photo {
  width: 130px;
  align-self: stretch;
  object-fit: cover;
  object-position: top;
  flex-shrink: 0;
  border-right: 3px solid #c9a227;
}
.distinguished-glimpse-info {
  min-width: 0;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.distinguished-glimpse-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e3a5f;
  margin: 0 0 0.3rem;
  line-height: 1.3;
}
.distinguished-glimpse-title {
  font-size: 0.72rem;
  color: #5a6578;
  margin: 0 0 0.6rem;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.distinguished-glimpse-badge {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  background: #1e3a5f;
  color: #c9a227;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 4px;
}
.distinguished-glimpse-cta {
  display: inline-block;
  margin-top: 2.5rem;
  padding: 0.7rem 1.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #1e3a5f;
  text-decoration: none;
  border: 1.5px solid #1e3a5f;
  border-radius: 4px;
  transition: background 0.3s, color 0.3s, transform 0.3s;
}
.distinguished-glimpse-cta:hover {
  background: #1e3a5f;
  color: #fff;
  transform: translateY(-2px);
}
@media (max-width: 650px) {
  .distinguished-glimpse-grid {
    grid-template-columns: 1fr;
  }
  .distinguished-glimpse-photo {
    width: 100px;
  }
}

/* Achievements glimpse on homepage */
.achievements-glimpse-section {
  background: #f4f6f9;
}
.achievements-glimpse-wrap {
  max-width: 1100px;
  margin: 0 auto;
  text-align: left;
}
.achievements-glimpse-wrap .section-heading {
  display: block;
}
.achievements-glimpse-wrap .section-heading::after {
  margin: 0.5rem 0 0;
}
.achievements-glimpse-sub {
  font-size: 1rem;
  color: #5a6578;
  margin: 0.5rem 0 2.5rem;
  max-width: 100%;
}
.achievements-glimpse-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.achievements-glimpse-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.achievements-glimpse-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(30, 58, 95, 0.12);
}
.achievements-glimpse-photo {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #1e3a5f;
}
.achievements-glimpse-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.achievements-glimpse-card:hover .achievements-glimpse-photo img {
  transform: scale(1.06);
}
.achievements-glimpse-year {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  padding: 0.3rem 0.7rem;
  background: #c9a227;
  color: #0f1923;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  border-radius: 4px;
}
.achievements-glimpse-info {
  padding: 1.25rem 1.35rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.achievements-glimpse-badge {
  margin: 0 0 0.45rem;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #c9a227;
}
.achievements-glimpse-title {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: #1e3a5f;
  line-height: 1.3;
  font-family: "Libre Baskerville", Georgia, serif;
}
.achievements-glimpse-note {
  margin: 0;
  font-size: 0.88rem;
  color: #5a6578;
  line-height: 1.5;
}
.achievements-glimpse-cta {
  display: inline-block;
  margin-top: 2.5rem;
  padding: 0.7rem 1.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #1e3a5f;
  text-decoration: none;
  border: 1.5px solid #1e3a5f;
  border-radius: 4px;
  transition: background 0.3s, color 0.3s, transform 0.3s, box-shadow 0.3s;
}
.achievements-glimpse-cta:hover {
  background: #1e3a5f;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(30, 58, 95, 0.2);
}
@media (max-width: 900px) {
  .achievements-glimpse-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
  }
}

.gallery-glimpse-section {
  background: #fff;
}
.gallery-glimpse-wrap {
  max-width: 1100px;
  margin: 0 auto;
  text-align: left;
}
.gallery-glimpse-wrap .section-heading {
  display: block;
}
.gallery-glimpse-wrap .section-heading::after {
  margin: 0.5rem 0 0;
}
.gallery-glimpse-sub {
  font-size: 1rem;
  color: #5a6578;
  margin: 0.5rem 0 2rem;
  max-width: 100%;
  white-space: nowrap;
}
.gallery-glimpse-grid {
  columns: 3;
  column-gap: 0.75rem;
}
.gallery-glimpse-item {
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  margin-bottom: 0.75rem;
  break-inside: avoid;
}
.gallery-glimpse-item img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
}
.gallery-glimpse-item:hover img {
  transform: scale(1.08);
}
.gallery-glimpse-cta {
  display: block;
  margin-top: 2rem;
  text-align: center;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  padding: 0.7rem 1.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #1e3a5f;
  text-decoration: none;
  border: 1px solid #1e3a5f;
  border-radius: 4px;
  transition: background 0.3s, color 0.3s, transform 0.3s, box-shadow 0.3s;
}
.gallery-glimpse-cta:hover {
  background: #1e3a5f;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(30, 58, 95, 0.2);
}
@media (max-width: 768px) {
  .gallery-glimpse-grid {
    columns: 2;
  }
}
@media (max-width: 480px) {
  .gallery-glimpse-grid {
    columns: 2;
    column-gap: 0.5rem;
  }
}

.section-card .meetings-list { margin-top: 0; }
.section-card .meeting-item {
  border-radius: 8px;
  margin-bottom: 0.75rem;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 1.25rem 1.5rem;
  transition: box-shadow 0.3s, transform 0.3s;
}
.section-card .meeting-item:hover {
  box-shadow: 0 4px 16px rgba(30,58,95,0.06);
  transform: translateX(4px);
}
.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: 100vh;
  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: none;
  box-sizing: border-box;
  overflow: hidden;
}
.hero.has-bg { background-image: url("images/Banner_Image.jpg"); background-attachment: fixed; }
@media (max-width: 768px) {
  .hero.has-bg { background-attachment: scroll; }
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(10, 15, 30, 0.92) 0%,
    rgba(10, 15, 30, 0.7) 35%,
    rgba(10, 15, 30, 0.4) 65%,
    rgba(10, 15, 30, 0.2) 100%
  );
  z-index: 0;
}
.hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to top, #fff, transparent);
  z-index: 1;
  pointer-events: none;
}
.hero > * { position: relative; z-index: 2; }
.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;
  animation: heroFadeUp 1s cubic-bezier(0.4, 0, 0.2, 1) both;
}
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-overline {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin: 0 0 1rem;
  padding: 0.4rem 1rem;
  border: 1px solid rgba(201, 162, 39, 0.4);
  border-radius: 2rem;
  background: rgba(201, 162, 39, 0.1);
}
.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;
  color: var(--accent);
}
.hero .hero-tagline {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 40ch;
  margin: 1.25rem 0 2rem;
  font-weight: 400;
  line-height: 1.6;
  font-family: var(--font-sans);
}
.know-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  background: var(--accent);
  color: #1a1d24;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 4px 15px rgba(201, 162, 39, 0.3);
  font-family: var(--font-sans);
}
.know-more-btn:hover, .know-more-btn:focus {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(201, 162, 39, 0.4);
}
.know-more-arrow {
  font-size: 1.1rem;
  animation: bounceDown 2s infinite;
}
@keyframes bounceDown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}
.hero-scroll-indicator {
  position: absolute;
  bottom: 140px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}
.hero-scroll-line {
  display: block;
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.5));
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.7); }
  50% { opacity: 1; transform: scaleY(1); }
}
.hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 40ch;
  margin: 0 auto 2rem;
}

/* Scroll-reveal animation for home page sections only */
body.home main > section:not(.hero) {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
body.home main > section:not(.hero).revealed {
  opacity: 1;
  transform: translateY(0);
}
.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  background: #1e3a5f;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.3s, transform 0.3s cubic-bezier(0.4,0,0.2,1), box-shadow 0.3s;
  box-shadow: 0 4px 15px rgba(30, 58, 95, 0.2);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cta:hover { background: #2c5282; transform: translateY(-2px); color: #fff; box-shadow: 0 8px 25px rgba(30, 58, 95, 0.3); }

/* 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: 14px;
  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.4s, border-color 0.3s, transform 0.4s cubic-bezier(0.4,0,0.2,1);
  text-decoration: none;
  color: inherit;
}
.contact-gmap-block:hover {
  box-shadow: 0 12px 35px rgba(30, 58, 95, 0.12);
  border-color: rgba(30, 58, 95, 0.2);
  transform: translateY(-2px);
}
.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;
}

/* Officers page — override first-column teal for name column */
.officers-page .past-masters-table td:first-child {
  width: auto;
  color: #1a1d24;
  font-weight: 500;
}
.officers-page .past-masters-table td:nth-child(2) {
  color: #0d9488;
  font-weight: 600;
}

/* Achievements & Recognitions page — timeline redesign */
.achievements-page {
  background: #f4f6f9;
}
.achievements-page main {
  padding: 0;
}
.achievements-page main > section {
  opacity: 1 !important;
  transform: none !important;
}
.achievements-page main > section {
  opacity: 1 !important;
  transform: none !important;
}
.achv-hero {
  background: linear-gradient(145deg, #0f1923 0%, #1e3a5f 55%, #162a45 100%);
  padding: 5rem 2rem 4.5rem;
  position: relative;
  overflow: hidden;
}
.achv-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 500px 280px at 85% 20%, rgba(201, 162, 39, 0.12), transparent 70%),
    radial-gradient(ellipse 400px 240px at 10% 80%, rgba(201, 162, 39, 0.06), transparent 70%);
  pointer-events: none;
}
.achv-hero-inner {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.achv-hero .back-link {
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  display: inline-block;
  text-decoration: none;
}
.achv-hero .back-link:hover {
  color: #c9a227;
}
.achv-hero-overline {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #c9a227;
  margin: 0 0 0.85rem;
}
.achv-hero-title {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 700;
  color: #fff;
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.achv-hero-divider {
  width: 60px;
  height: 4px;
  background: #c9a227;
  margin: 1.5rem 0;
  border-radius: 2px;
}
.achv-hero-intro {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.65);
  max-width: 560px;
  line-height: 1.7;
  margin: 0;
}
.achv-timeline {
  padding: 3.5rem 1.5rem 5rem;
}
.achv-timeline-inner {
  max-width: 960px;
  margin: 0 auto;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.achv-timeline-inner::before {
  content: '';
  position: absolute;
  left: 3.1rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: linear-gradient(180deg, #c9a227 0%, rgba(201, 162, 39, 0.15) 100%);
}
.achv-item {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 1.5rem;
  align-items: stretch;
  position: relative;
}
.achv-year-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding-top: 1.75rem;
  position: relative;
  z-index: 1;
}
.achv-year {
  font-size: 1.15rem;
  font-weight: 800;
  color: #1e3a5f;
  letter-spacing: 0.04em;
  background: #f4f6f9;
  padding: 0.2rem 0;
}
.achv-year-muted {
  color: #94a3b8;
  font-weight: 700;
}
.achv-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #c9a227;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px #c9a227;
  flex-shrink: 0;
}
.achv-panel {
  display: grid;
  grid-template-columns: 1.4fr auto;
  gap: 1.5rem;
  align-items: center;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.75rem 1.75rem 1.75rem 2rem;
  box-shadow: 0 8px 28px rgba(30, 58, 95, 0.06);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  position: relative;
  overflow: hidden;
}
.achv-panel::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #c9a227, #f0d060);
}
.achv-panel:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(30, 58, 95, 0.12);
}
.achv-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #1e3a5f;
  background: rgba(30, 58, 95, 0.08);
  padding: 0.3rem 0.7rem;
  border-radius: 3px;
  margin: 0 0 0.85rem;
}
.achv-title {
  font-size: clamp(1.4rem, 2.5vw, 1.75rem);
  font-weight: 800;
  color: #1e3a5f;
  margin: 0 0 0.4rem;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.achv-name {
  font-size: 1rem;
  font-weight: 700;
  color: #c9a227;
  margin: 0 0 0.75rem;
}
.achv-note {
  font-size: 0.95rem;
  line-height: 1.65;
  color: #5a6578;
  margin: 0;
  max-width: 38rem;
}
.achv-photos {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.achievement-photo {
  display: block;
  width: 120px;
  height: 90px;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  background: #f1f5f9;
  flex-shrink: 0;
  cursor: pointer;
  font: inherit;
  position: relative;
}
.achievement-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 25, 35, 0.25), transparent 50%);
  opacity: 0;
  transition: opacity 0.3s;
}
.achievement-photo:hover::after {
  opacity: 1;
}
.achievement-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.4s ease;
  pointer-events: none;
}
.achievement-photo:hover img {
  transform: scale(1.06);
}
.achievement-popup .gallery-popup-image-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  max-width: min(920px, 92vw);
}
.achievement-popup .gallery-popup-image {
  max-height: 72vh;
  width: auto;
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(201, 162, 39, 0.35);
}
.achievement-popup-caption {
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  text-align: center;
  max-width: 36rem;
  line-height: 1.45;
}
.achievement-popup-counter {
  margin: 0;
  color: #c9a227;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}
@media (max-width: 768px) {
  .achv-hero {
    padding: 3.5rem 1.25rem 3rem;
  }
  .achv-timeline {
    padding: 2.5rem 1rem 3.5rem;
  }
  .achv-timeline-inner::before {
    left: 1.35rem;
  }
  .achv-item {
    grid-template-columns: 3rem 1fr;
    gap: 0.85rem;
  }
  .achv-year {
    font-size: 0.8rem;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
  }
  .achv-panel {
    grid-template-columns: 1fr;
    padding: 1.35rem 1.25rem 1.35rem 1.35rem;
    gap: 1.1rem;
  }
  .achv-photos {
    flex-direction: row;
  }
  .achievement-photo {
    width: 100px;
    height: 76px;
  }
}
@media (max-width: 480px) {
  .achv-hero-title {
    font-size: 2rem;
  }
  .achv-title {
    font-size: 1.25rem;
  }
}

/* Members page — name + year of joining */
.members-page .past-masters-content {
  max-width: 1200px;
}
.members-tables-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}
.members-page .members-table th:last-child,
.members-page .members-table td:last-child {
  width: 4.5rem;
  text-align: center;
  white-space: nowrap;
}
.members-page .members-table td:last-child {
  color: #1e3a5f;
  font-weight: 700;
}
.members-page .past-masters-table-card {
  margin: 0;
}
@media (max-width: 800px) {
  .members-tables-grid {
    grid-template-columns: 1fr;
  }
}

/* Distinguished Brethren page */
.distinguished-page main {
  padding: 0;
  background: #f4f6f9;
}
.dist-hero {
  background: #1e3a5f;
  padding: 5rem 2rem 5rem;
  position: relative;
  overflow: hidden;
}
.dist-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("images/Banner_Image.jpg") center/cover no-repeat;
  opacity: 0.08;
  pointer-events: none;
}
.dist-hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.dist-hero .back-link {
  color: rgba(255,255,255,0.5);
  font-weight: 500;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
}
.dist-hero .back-link:hover {
  color: #c9a227;
}
.dist-hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  color: #fff;
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.dist-hero-divider {
  width: 60px;
  height: 4px;
  background: #c9a227;
  margin: 1.5rem 0;
  border-radius: 2px;
}
.dist-hero-intro {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.65);
  max-width: 550px;
  line-height: 1.7;
  margin: 0;
}
.dist-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 3.5rem 2rem 5rem;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}
.dist-profile-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(30, 58, 95, 0.06);
  border: 1px solid #e2e8f0;
  transition: box-shadow 0.4s cubic-bezier(0.4,0,0.2,1), transform 0.4s cubic-bezier(0.4,0,0.2,1);
}
.dist-profile-card:hover {
  box-shadow: 0 16px 50px rgba(30, 58, 95, 0.12);
  transform: translateY(-4px);
}
.dist-profile-image {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 2rem 2.5rem;
  background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%);
}
.dist-profile-image img {
  width: 140px;
  height: 170px;
  object-fit: cover;
  object-position: top;
  border-radius: 10px;
  border: 4px solid rgba(201, 162, 39, 0.6);
  box-shadow: 0 6px 24px rgba(0,0,0,0.3);
  flex-shrink: 0;
}
.dist-profile-badge {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  padding: 0.5rem 1.1rem;
  background: rgba(201, 162, 39, 0.15);
  color: #c9a227;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border-radius: 4px;
  border: 1px solid rgba(201, 162, 39, 0.4);
  white-space: nowrap;
}
.dist-profile-image .dist-profile-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.3rem;
  line-height: 1.3;
}
.dist-profile-image .dist-profile-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: #c9a227;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: none;
  padding: 0;
}
.dist-profile-body {
  min-width: 0;
  padding: 2rem 2.5rem 2.5rem;
}
.dist-profile-body .dist-profile-name,
.dist-profile-body .dist-profile-title {
  display: none;
}
.dist-profile-text p {
  font-size: 0.92rem;
  line-height: 1.8;
  color: #3d4a5c;
  margin: 0 0 0.85rem;
}
.dist-profile-text p:last-child {
  margin-bottom: 0;
}
.dist-profile-text p:first-child {
  font-size: 0.95rem;
  color: #1e3a5f;
  font-weight: 500;
}
@media (max-width: 768px) {
  .dist-hero {
    padding: 3.5rem 1.5rem 3.5rem;
  }
  .dist-content {
    padding: 2.5rem 1.5rem 3rem;
    gap: 2rem;
  }
  .dist-profile-image {
    flex-direction: column;
    text-align: center;
    padding: 2rem 1.5rem;
    gap: 1rem;
  }
  .dist-profile-image img {
    width: 120px;
    height: 150px;
  }
  .dist-profile-badge {
    position: static;
    margin-top: 0.5rem;
  }
  .dist-profile-body {
    padding: 1.5rem;
  }
}
@media (max-width: 480px) {
  .dist-profile-image img {
    width: 100px;
    height: 130px;
  }
  .dist-profile-image .dist-profile-name {
    font-size: 1.2rem;
  }
}

/* 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: 0;
  background: #f8fafc;
}
.gallery-hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 2rem 1.5rem;
}
.gallery-title {
  font-size: 2.4rem;
  font-weight: 800;
  color: #1e3a5f;
  margin: 0.5rem 0 0.75rem;
  letter-spacing: -0.02em;
}
.gallery-intro {
  color: #64748b;
  font-size: 1.05rem;
  margin-bottom: 0;
  max-width: 600px;
  line-height: 1.6;
}
.gallery-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 2rem 3rem;
}
.gallery-month-section {
  margin-bottom: 3rem;
}
.gallery-month-heading {
  font-size: 1.1rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 1.25rem;
  padding: 0;
  border: none;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.gallery-month-heading::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, #cbd5e1, transparent);
}
.gallery-month-text {
  background: #fff;
  padding: 0.35rem 1rem;
  border-radius: 2rem;
  border: 1px solid #e2e8f0;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #1e3a5f;
  font-weight: 700;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.gallery-item {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: #fff;
  border: none;
  outline: none;
}
.gallery-item:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 40px rgba(30, 58, 95, 0.15);
}
.gallery-item-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
  position: relative;
  overflow: hidden;
}
.gallery-item-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.2) 0%, transparent 40%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.gallery-item:hover .gallery-item-btn::after {
  opacity: 1;
}
.gallery-item-btn img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: #e2e8f0;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.gallery-item:hover .gallery-item-btn img {
  transform: scale(1.05);
}
@media (max-width: 768px) {
  .gallery-hero {
    padding: 2rem 1.5rem 1rem;
  }
  .gallery-title {
    font-size: 1.8rem;
  }
  .gallery-content {
    padding: 1rem 1.5rem 2rem;
  }
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
  }
  .gallery-item-btn img {
    height: 160px;
  }
}
@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .gallery-item-btn img {
    height: 140px;
  }
  .gallery-item {
    border-radius: 8px;
  }
}

/* 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;
  animation: galleryFadeIn 0.25s ease;
}
@keyframes galleryFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.gallery-popup[hidden] { display: none !important; }
.gallery-popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 15, 30, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}
.gallery-popup-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 10004;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
}
.gallery-popup-close:hover,
.gallery-popup-close:focus {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.1);
}
.gallery-popup-prev,
.gallery-popup-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10004;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  user-select: none;
}
.gallery-popup-prev { left: 1.25rem; }
.gallery-popup-next { right: 1.25rem; }
.gallery-popup-prev:hover,
.gallery-popup-prev:focus,
.gallery-popup-next:hover,
.gallery-popup-next:focus {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-50%) scale(1.1);
}
.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: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  animation: galleryImageIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes galleryImageIn {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* 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; }
  body.nav-open #main-nav li:nth-child(9) { animation-delay: 0.45s; }
  body.nav-open #main-nav li:nth-child(10) { animation-delay: 0.5s; }
  body.nav-open #main-nav li:nth-child(11) { animation-delay: 0.55s; }
  body.nav-open #main-nav li:nth-child(12) { animation-delay: 0.6s; }
  #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-inner {
    position: relative;
    z-index: 2147483647;
    padding: 0.6rem 1rem;
  }
  .logo {
    margin-left: 0;
    position: relative;
    z-index: 1;
  }
  .logo img {
    height: 52px;
    width: auto;
  }
  body.home .logo img {
    height: 52px;
  }
  .nav-toggle {
    z-index: 2;
  }
  main {
    padding-left: 1rem;
    padding-right: 1rem;
    padding-bottom: 3rem;
  }
  main.page-content {
    padding-top: 2rem;
  }
  .hero {
    min-height: 90vh;
    padding: 4rem 1.5rem 3rem;
    padding-left: 1.5rem;
  }
  .hero .hero-content {
    max-width: none;
  }
  .hero-scroll-indicator {
    bottom: 100px;
  }
  .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 {
    min-height: 85vh;
    padding: 3.5rem 1rem 3rem;
  }
  .hero h1 {
    font-size: clamp(1.75rem, 6vw, 2.5rem);
  }
  .hero .hero-tagline {
    font-size: 1rem;
  }
  .hero-scroll-indicator {
    display: none;
  }
  section { padding: 2rem 0; }
  .header-inner { padding: 0.5rem 0.75rem; }
  .logo {
    margin-left: 0;
  }
  .logo img {
    height: 44px;
    width: auto;
  }
  body.home .logo img {
    height: 44px;
  }
  .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;
  }
}

/* ═══════════════════════════════════════════════════════════════
   HOME PAGE BOLD REDESIGN — Dynamic, high-contrast, animated
   ═══════════════════════════════════════════════════════════════ */

/* Section backgrounds — bold alternating dark/light */
body.home #about-lodge {
  background: #fff;
}
body.home #core-principles {
  background: #0f1923;
  color: #fff;
}
body.home #core-principles .section-heading { color: #fff; }
body.home #core-principles .section-heading::after { background: linear-gradient(90deg, #c9a227, #f0d060); }
body.home #core-principles .core-principle-card {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
}
body.home #core-principles .core-principle-card:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(201,162,39,0.3);
}
body.home #core-principles .core-principle-title { color: #fff; }
body.home #core-principles p { color: rgba(255,255,255,0.7); }
body.home #core-principles .core-principle-icon { color: #c9a227; }

body.home #genesis {
  background: #fff;
}
body.home #grand-leadership {
  background: linear-gradient(135deg, #0f1923 0%, #1a2f4a 100%);
  color: #fff;
}
body.home .grand-leadership-title { color: #fff; }
body.home .grand-leadership-sub { color: rgba(255,255,255,0.6); }
body.home .gl-card {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
}
body.home .gl-card:hover {
  background: rgba(255,255,255,0.08);
  box-shadow: 0 16px 40px rgba(0,0,0,0.3);
}
body.home .gl-card-photo { background: rgba(255,255,255,0.05); }
body.home .gl-card-name { color: #fff; }
body.home .gl-card-title { color: rgba(255,255,255,0.6); }
body.home .grand-leadership-intro { background: rgba(255,255,255,0.04); border-left-color: #c9a227; }
body.home .grand-leadership-intro p { color: rgba(255,255,255,0.75); }
body.home .grand-leadership-link { color: #0f1923; background: #c9a227; border-color: #c9a227; }
body.home .grand-leadership-link:hover { background: #f0d060; border-color: #f0d060; color: #0f1923; }

body.home #officers {
  background: #fff;
}

body.home #distinguished-glimpse {
  background: #0f1923;
}
body.home .distinguished-glimpse-section {
  background: #0f1923;
}

body.home #achievements-glimpse {
  background: #f4f6f9;
}
body.home .achievements-glimpse-section {
  padding: 5rem 0;
}
body.home .achievements-glimpse-wrap .section-heading {
  font-size: 2.75rem;
}
body.home .achievements-glimpse-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 40px rgba(30, 58, 95, 0.14);
}
body.home .achievements-glimpse-cta {
  font-weight: 700;
  letter-spacing: 0.06em;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
body.home .achievements-glimpse-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(30, 58, 95, 0.15);
}

body.home #gallery-glimpse {
  background: #fff;
}
body.home #meetings {
  background: #f4f6f9;
}
body.home #contact {
  background: linear-gradient(135deg, #0f1923 0%, #1a2f4a 100%);
  color: #fff;
}
body.home #contact .section-heading { color: #fff; }
body.home #contact .section-heading::after { background: linear-gradient(90deg, #c9a227, #f0d060); }
body.home #contact .section-card.contact-details-card {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
  box-shadow: 0 8px 40px rgba(0,0,0,0.2);
}
body.home #contact .section-card .lodge-card-accent { background: #c9a227; }
body.home #contact .contact-detail-item {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.06);
}
body.home #contact .contact-detail-item:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(201,162,39,0.2);
}
body.home #contact .contact-detail-content { color: rgba(255,255,255,0.9); }
body.home #contact .contact-detail-content a { color: #c9a227; }
body.home #contact .contact-detail-icon { background: rgba(201,162,39,0.1); color: #c9a227; }
body.home #contact .contact-detail-icon svg { stroke: #c9a227; }
body.home #contact .contact-gmap-caption { color: rgba(255,255,255,0.6); }

/* Hero — more dramatic and punchy */
body.home .hero {
  min-height: 100vh;
}
body.home .hero::before {
  background: linear-gradient(
    160deg,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(15, 25, 35, 0.7) 40%,
    rgba(0, 0, 0, 0.4) 100%
  );
}
body.home .hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-shadow: 0 4px 30px rgba(0,0,0,0.4);
}
body.home .hero .hero-number {
  color: #c9a227;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  text-shadow: 0 2px 20px rgba(201,162,39,0.3);
}
body.home .hero .hero-tagline {
  font-size: 1.25rem;
  color: rgba(255,255,255,0.9);
  font-weight: 300;
  max-width: 32ch;
}
body.home .hero .hero-overline {
  background: rgba(201,162,39,0.2);
  border: 2px solid #c9a227;
  color: #c9a227;
  font-size: 1rem;
  padding: 0.7rem 2rem;
  letter-spacing: 0.3em;
  font-weight: 800;
  text-shadow: 0 1px 8px rgba(201, 162, 39, 0.4);
  box-shadow: 0 4px 20px rgba(201, 162, 39, 0.2);
}
body.home .know-more-btn {
  padding: 1rem 2.25rem;
  font-size: 0.9rem;
  border-radius: 0;
  background: #c9a227;
  position: relative;
  overflow: hidden;
}
body.home .know-more-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s;
}
body.home .know-more-btn:hover::before {
  transform: translateX(100%);
}

/* Section headings — bigger and bolder */
body.home .section-heading {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
body.home .section-heading::after {
  width: 60px;
  height: 4px;
  border-radius: 2px;
}

/* Scroll reveal — more dramatic entrance */
body.home main > section:not(.hero) {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
body.home main > section:not(.hero).revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Lodge section — bolder lead text */
body.home .lodge-heading {
  font-size: 2.75rem;
  font-weight: 800;
}
body.home .lodge-lead {
  font-size: 1.2rem;
  line-height: 1.7;
  font-weight: 400;
}
body.home .lodge-card {
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1), box-shadow 0.4s;
}
body.home .lodge-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(30,58,95,0.12);
}

/* Core principles — cards pop against dark bg */
body.home .core-principle-card {
  border-radius: 12px;
  padding: 2rem 1.5rem;
  transition: transform 0.4s, box-shadow 0.4s, border-color 0.4s;
}
body.home .core-principle-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

/* Officers section — enhance the team feel */
body.home .officers-team-section {
  background: #fff;
}
body.home .officers-team-bg-pattern {
  display: none;
}
body.home .officers-team-overline {
  color: #1e3a5f;
}
body.home .officers-team-heading {
  font-size: 2.5rem;
  font-weight: 800;
  color: #1e3a5f;
}
body.home .officers-team-wrap .section-sub {
  color: #5a6578;
}
body.home .officers-team-name {
  color: #1e3a5f;
}
body.home .officers-team-title {
  color: #5a6578;
}
body.home .officers-featured-card {
  background: #fff;
  border-color: #e2e8f0;
  box-shadow: 0 8px 32px rgba(30,58,95,0.1);
}
body.home .officers-team-card {
  background: #f8f9fb;
  border: 1px solid #e2e8f0;
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1), box-shadow 0.4s;
}
body.home .officers-team-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 40px rgba(30,58,95,0.12);
  background: #fff;
}

/* Distinguished glimpse — bold dark section */
body.home .distinguished-glimpse-section {
  background: #0f1923;
  padding: 5rem 0;
}
body.home .distinguished-glimpse-wrap .section-heading {
  color: #fff;
  font-size: 2.75rem;
}
body.home .distinguished-glimpse-wrap .section-heading::after {
  background: linear-gradient(90deg, #c9a227, #f0d060);
}
body.home .distinguished-glimpse-sub {
  color: rgba(255,255,255,0.6);
}
body.home .distinguished-glimpse-card {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
}
body.home .distinguished-glimpse-card:hover {
  background: rgba(255,255,255,0.08);
  box-shadow: 0 16px 40px rgba(0,0,0,0.3);
}
body.home .distinguished-glimpse-name { color: #fff; }
body.home .distinguished-glimpse-title { color: rgba(255,255,255,0.6); }
body.home .distinguished-glimpse-cta {
  color: #0f1923;
  background: #c9a227;
  border-color: #c9a227;
  font-weight: 700;
}
body.home .distinguished-glimpse-cta:hover {
  background: #f0d060;
  border-color: #f0d060;
  color: #0f1923;
}

/* Gallery glimpse — enhanced grid hover */
body.home .gallery-glimpse-item {
  transition: transform 0.5s cubic-bezier(0.4,0,0.2,1), box-shadow 0.5s;
}
body.home .gallery-glimpse-item:hover {
  transform: scale(1.03);
  box-shadow: 0 12px 30px rgba(0,0,0,0.15);
  z-index: 2;
}

/* Meetings section — cleaner */
body.home .meetings-section .section-lead {
  background: #fff;
  border-left-color: #c9a227;
  box-shadow: 0 2px 12px rgba(30,58,95,0.04);
}

/* Genesis section — add visual interest */
body.home .genesis-section .section-card {
  border-left: 4px solid #c9a227;
  border-radius: 0 12px 12px 0;
}
body.home .genesis-dates {
  font-size: 1.1rem;
  color: #c9a227 !important;
  font-weight: 600;
}

/* Footer — darker and bolder */
body.home ~ footer,
body.home + footer {
  background: #0a0f14;
}

/* CTA buttons — consistent bold style */
body.home .officers-view-all {
  color: #1e3a5f;
  border-color: #1e3a5f;
  font-weight: 700;
  letter-spacing: 0.06em;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}
body.home .officers-view-all:hover {
  background: #1e3a5f;
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(30,58,95,0.15);
}
body.home .gallery-glimpse-cta {
  font-weight: 700;
  letter-spacing: 0.06em;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}
body.home .gallery-glimpse-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(30,58,95,0.15);
}

/* Responsive — maintain drama on mobile */
@media (max-width: 768px) {
  body.home .section-heading {
    font-size: 2rem;
  }
  body.home .lodge-heading {
    font-size: 2rem;
  }
  body.home .officers-team-heading {
    font-size: 1.8rem;
  }
  body.home .distinguished-glimpse-wrap .section-heading {
    font-size: 2rem;
  }
  body.home .achievements-glimpse-wrap .section-heading {
    font-size: 2rem;
  }
}

/* ═══════════════════════════════════════════════════════════════
   SITE-WIDE MOBILE POLISH
   ═══════════════════════════════════════════════════════════════ */

img, video, iframe {
  max-width: 100%;
}
.logo img {
  max-width: none;
}

@media (max-width: 900px) {
  .grand-leadership-wrap,
  .quick-facts-wrap,
  .distinguished-glimpse-wrap,
  .achievements-glimpse-wrap,
  .gallery-glimpse-wrap,
  .officers-team-wrap {
    padding-left: 0;
    padding-right: 0;
  }
  .officers-team-wrap {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
  .quick-facts-section {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .section-sub,
  .grand-leadership-sub,
  .gallery-glimpse-sub,
  .achievements-glimpse-sub,
  .distinguished-glimpse-sub {
    white-space: normal;
    line-height: 1.55;
  }
  .past-masters-wrap,
  .members-page .past-masters-wrap {
    -webkit-overflow-scrolling: touch;
  }
  .past-masters-page .past-masters-table,
  .members-page .members-table {
    min-width: 0;
    width: 100%;
  }
  .footer-bottom p {
    line-height: 1.6;
  }
  .footer-sep {
    display: none;
  }
  .footer-bottom a {
    display: inline-block;
    margin: 0.15rem 0.35rem;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 16px;
  }
  .know-more-btn,
  .cta,
  .gallery-glimpse-cta,
  .achievements-glimpse-cta,
  .officers-view-all,
  .distinguished-glimpse-cta,
  .grand-leadership-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
  }
  .gallery-glimpse-cta,
  .achievements-glimpse-cta,
  .grand-leadership-link {
    display: flex;
    width: fit-content;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
  .officers-featured-card {
    flex-direction: column;
    max-width: none;
  }
  .officers-featured-photo {
    width: 100%;
    height: 220px;
    border-right: none;
  }
  .officers-featured-info {
    border-left: none;
    border-top: 4px solid #c9a227;
    padding: 1.5rem 1.25rem;
  }
  .gl-card {
    flex-direction: column;
  }
  .gl-card-photo {
    width: 100%;
    padding: 1.25rem 1.25rem 0;
  }
  .gl-card-photo img {
    height: 220px;
    width: 100%;
  }
  .gl-card-info {
    padding: 1.25rem;
  }
  .distinguished-glimpse-card {
    flex-direction: column;
  }
  .distinguished-glimpse-photo {
    width: 100% !important;
    height: 220px;
    border-right: none;
    border-bottom: 3px solid #c9a227;
    border-radius: 0;
  }
  .distinguished-glimpse-info {
    padding: 1.25rem;
  }
  .gallery-glimpse-grid {
    columns: 2;
  }
  .core-principles-grid {
    grid-template-columns: 1fr;
  }
  .founder-members {
    grid-template-columns: 1fr;
  }
  .grand-leadership-intro {
    padding: 1.25rem 1.25rem;
  }
  .grand-leadership-link {
    float: none;
  }
  body.home .section-sub,
  body.home #core-principles .section-sub,
  body.home #contact .section-sub {
    white-space: normal;
  }
  body.home #core-principles .section-sub,
  body.home #contact .section-sub {
    color: rgba(255, 255, 255, 0.65);
  }
  .contact-section .contact-detail-item {
    padding: 0.85rem 1rem;
  }
  .contact-gmap-image img,
  .contact-gmap-block img {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: cover;
  }
  .past-masters-hero,
  .freemasonry-hero,
  .dist-hero {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
  .past-masters-intro,
  .dist-hero-intro {
    font-size: 0.95rem;
  }
  .dist-profile-image {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  .dist-profile-badge {
    position: static;
  }
  .members-tables-grid {
    grid-template-columns: 1fr;
  }
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .section-card .meeting-item {
    padding: 1rem;
  }
  .section-card .meeting-item:hover {
    transform: none;
  }
  .gallery-popup {
    padding: 1rem;
  }
  .gallery-popup-image-wrap,
  .gallery-popup-image {
    max-width: calc(100vw - 2rem);
    max-height: 75vh;
  }
  .gallery-popup-prev,
  .gallery-popup-next {
    width: 2.5rem;
    height: 2.5rem;
  }
  .gallery-popup-prev { left: 0.5rem; }
  .gallery-popup-next { right: 0.5rem; }
  .past-masters-cta .cta {
    display: inline-flex;
    width: 100%;
    max-width: 100%;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
  }
}

@media (max-width: 480px) {
  main {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  .hero {
    min-height: 78vh;
    padding: 3rem 0.75rem 2.5rem;
  }
  .hero h1 {
    font-size: 1.65rem;
    line-height: 1.2;
  }
  .hero .hero-number {
    font-size: 1.45rem;
  }
  .hero .hero-tagline {
    font-size: 0.95rem;
  }
  .hero-overline {
    font-size: 0.7rem;
    padding: 0.4rem 0.9rem;
    letter-spacing: 0.15em;
  }
  body.home .hero .hero-overline {
    font-size: 0.75rem;
    padding: 0.5rem 1.1rem;
    letter-spacing: 0.18em;
  }
  .know-more-btn {
    width: 100%;
    max-width: 280px;
    padding: 0.85rem 1.25rem;
    font-size: 0.8rem;
  }
  .quick-facts-section {
    padding: 2rem 0.75rem;
  }
  .quick-fact {
    padding: 1.15rem 0.5rem;
  }
  .quick-fact-number {
    font-size: 1.85rem;
  }
  .quick-fact-label {
    font-size: 0.68rem;
    letter-spacing: 0.06em;
  }
  .section-heading,
  .lodge-heading,
  .officers-team-heading,
  .grand-leadership-title,
  body.home .section-heading,
  body.home .lodge-heading,
  body.home .officers-team-heading {
    font-size: 1.5rem !important;
  }
  .section-sub,
  .grand-leadership-sub,
  .gallery-glimpse-sub,
  .achievements-glimpse-sub,
  .distinguished-glimpse-sub {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
  }
  .gl-card-name,
  .officers-featured-name,
  .distinguished-glimpse-name {
    font-size: 1.05rem;
  }
  .officers-team-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }
  .officers-team-card {
    padding: 1rem 0.5rem;
  }
  .officers-team-photo {
    width: 100%;
    height: 120px;
    max-width: 110px;
  }
  .officers-team-name {
    font-size: 0.8rem;
  }
  .officers-team-title {
    font-size: 0.65rem;
  }
  .officers-featured-photo {
    height: 200px;
  }
  .gallery-glimpse-grid {
    columns: 1;
  }
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .members-page .members-table th,
  .members-page .members-table td,
  .officers-page .past-masters-table th,
  .officers-page .past-masters-table td {
    padding: 0.55rem 0.65rem;
    font-size: 0.8rem;
  }
  .members-page .members-table th:last-child,
  .members-page .members-table td:last-child {
    width: 3.5rem;
  }
  .past-masters-title,
  .dist-hero-title {
    font-size: 1.85rem;
  }
  .dist-profile-image img {
    width: 100px;
    height: 130px;
  }
  .dist-profile-body {
    padding: 1.25rem;
  }
  .dist-profile-text p {
    font-size: 0.88rem;
  }
  .footer-logo {
    width: 80px;
    height: auto;
  }
  .footer-lodge-name {
    font-size: 1rem;
  }
  .footer-dates {
    font-size: 0.75rem;
  }
  .nav-toggle {
    width: 44px;
    height: 44px;
  }
  .mobile-nav-overlay #main-nav {
    padding: 4.5rem 1rem 2rem;
  }
  #main-nav a {
    font-size: 0.95rem;
    padding: 0.9rem 0.75rem;
  }
}

@media (max-width: 360px) {
  .quick-facts-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
  }
  .officers-team-grid {
    grid-template-columns: 1fr;
  }
  .officers-team-photo {
    max-width: 140px;
    height: 160px;
  }
}
