/* Royal Blue Lodge 173 — Minimal Modern Theme */
:root {
  --royal: #003366;
  --royal-dark: #002244;
  --bg: #f0f4f8;
  --text: #222;
  --card: #ffffff;
  --accent: #d4af37; /* gold-ish */
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
}

/* Links */
a { color: var(--royal); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
header { background: var(--royal); color: #fff; }
.topbar {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo img { height: 80px; width: auto; }
.brand { font-weight: 700; letter-spacing: .3px; font-size: 2.5rem; }
nav { margin-left: auto; display: flex; gap: 18px; }
nav a { color: #fff; padding: 8px 10px; border-radius: 12px; }
nav a:hover { background: rgba(255, 255, 255, .12); }

/* Hero Section */
.hero {
  max-width: 1100px;
  margin: 20px auto;
  background: linear-gradient(180deg, #ffffff, #f7faff);
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .06);
  padding: 28px;
  display: flex;
  gap: 20px;
}
.hero-text h1 { margin-top: 0; color: var(--royal); }
.hero-text p { margin: 10px 0; color: #333; }
.hero-logo img { width: 240px; }

/* Buttons */
.button,
input[type=submit],
button {
  display: inline-block;
  padding: 10px 14px;
  background: var(--royal);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.3s ease;
  white-space: nowrap;
}

.button:hover,
input[type=submit]:hover,
button:hover {
  background: var(--royal-dark);
}

@media (max-width: 500px) {
  .button,
  input[type=submit],
  button {
    width: 100%;
    text-align: center;
  }
}

/* Containers & Cards */
.container {
  max-width: 1100px;
  margin: 20px auto;
  padding: 0 18px;
}

.card {
  background: var(--card);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .06);
  margin-bottom: 20px;
}

h1, h2 { color: var(--royal); }

/* Forms */
input[type=text],
input[type=email],
input[type=password],
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d7dee5;
  border-radius: 10px;
  background: #fff;
}
textarea { min-height: 140px; }
.form-row { margin-bottom: 12px; }

/* Tables */
.table {
  width: 100%;
  border-collapse: collapse;
}
.table th, .table td {
  border-top: 1px solid #e6ecf2;
  padding: 10px 8px;
  text-align: left;
}
.table th { background: #f7f9fc; }

/* Footer */
footer {
  background: var(--royal); /* same as header */
  color: #cfd7e6;
  margin-top: 40px;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px;
  color: #ffffff;       /* brighter text */
  font-weight: 600;     /* stronger weight */
  font-size: 1.1rem;    /* slightly larger */
  letter-spacing: 0.5px;
}

/* Notices */
.notice {
  padding: 10px 12px;
  border-radius: 10px;
  background: #eef6ff;
  border: 1px solid #cfe3ff;
  color: #0b3d91;
  margin: 10px 0;
}
.error {
  background: #ffeef0;
  border-color: #ffd0d4;
  color: #b00020;
}
.success {
  background: #eaf9ee;
  border-color: #c0ebca;
  color: #11662b;
}
.small { font-size: .92rem; color: #555; }

/* Action buttons container */
.action-buttons {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.action-buttons form { margin: 0; }

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.gallery figure {
  margin: 0;
  background: #fff;
  border: 1px solid #e6ecf2;
  border-radius: 12px;
  padding: 10px;
  cursor: pointer;
}
.gallery img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}
.gallery figcaption {
  margin-top: 6px;
  color: #555;
  font-size: .95rem;
}

/* Lightbox */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .7);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 9999;
}
.lightbox {
  background: #111;
  color: #fff;
  border-radius: 14px;
  max-width: 900px;
  width: 96%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
  overflow: hidden;
}
.lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #0b1d3a;
}
.lightbox-title {
  font-size: 1rem;
  margin: 0;
  color: #fff;
}
.lightbox-close {
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}
.lightbox-body {
  background: #000;
  text-align: center;
  padding: 14px;
}
.lightbox-body img { max-width: 100%; height: auto; }
.lightbox-caption {
  color: #ddd;
  font-size: .95rem;
  padding: 10px 14px 16px;
}

/* Past Masters Board */
.wood-board {
  background-image: url('wood.svg');
  background-repeat: repeat;
  background-size: 512px 512px; /* adjust to taste: 384px for tighter grain, 640px for looser */
  background-position: 0 0;
  border: 5px solid #ffd975;
  border-radius: 20px;
  padding: 22px 18px;
  color: #d8b94f;
  box-shadow: 0 12px 36px rgba(0, 0, 0, .28),
              inset 0 0 0 2px rgba(255, 255, 255, .06);
}
.board-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.board-header img {height: 80px; width: auto;}
.board-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 4rem;
  letter-spacing: 1px;
  margin: 0;
  color: #ffd975;
  text-shadow: 0 1px 0 #5a3a12, 0 2px 4px rgba(0, 0, 0, .45);
}
.board-entry {
  font-weight: 800;
  color: #f2cf6b;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .55);
  letter-spacing: .2px;
}
.board-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 10px 24px;
}
.board-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(0, 0, 0, .08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.board-year { font-weight: 800; }
.board-name { text-align: right; }

@media (max-width: 900px) {
  .board-grid { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
}
@media (max-width: 600px) {
  .board-grid { grid-template-columns: 1fr; }
}

/* Hero Learn More button */
.hero-text .btn {
  display: inline-block;
  padding: 10px 18px;
  background: var(--royal);
  color: #fff;
  border-radius: 10px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: background 0.3s ease;
}
.hero-text .btn:hover {
  background: var(--royal-dark);
}

/* Facebook feed wrapper - center content */
.fb-wrap {
  text-align: center;
}
.fb-wrap .fb-page {
  margin: 0 auto; /* center the widget itself */
}
/* center fallback iframe too */
#fb-fallback iframe { display:block; margin: 0 auto; }


/* ================================
   Past Masters Board - Three Columns
   ================================ */
.board-columns {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr; /* three equal columns */
  gap: 0 24px; /* space between columns horizontally */
}

.board-column {
  position: relative;
  padding: 0 16px;
}

/* vertical divider as pseudo-element */
.board-column::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 2px;
  height: 100%;
  background: #f2cf6b; /* gold color */
  box-shadow: 2px 0 2px rgba(0, 0, 0, .55); /* subtle shadow to the right */
}

/* remove divider on last column */
.board-column:last-child::after {
  display: none;
}

/* List in each column */
.board-col {
  list-style: none;
  margin: 0;
  padding: 0;
}

.board-col .board-entry {
  padding: 6px 0;
}

/* Responsive tweaks */
@media (max-width: 900px) {
  .board-columns {
    grid-template-columns: 1fr 1fr; /* switch to two columns */
  }

  .board-column:nth-child(2)::after {
    display: none;
  }

  /* Hide decorative images in the header for more room */
  .board-header img {
    display: none;
  }
}

@media (max-width: 600px) {
  .board-columns {
    grid-template-columns: 1fr; /* stack into a single column */
  }

  .board-column:nth-child(1)::after {
    display: none;
  }

  /* Hide images in header */
  .board-header img {
    display: none;
  }

  /* Make header text smaller for mobile */
  .board-title {
    font-size: 2rem;
  }
}

/* Separator line between gallery rows */
.table .photo-sep td {
  padding: 0;
  height: 0;
  border: 0;
  border-top: 3px solid var(--royal); /* subtle divider */
}


    .audit-entry {
      border: 1px solid #e6ecf2;
      border-radius: 12px;
      padding: 12px;
      margin-bottom: 14px;
      background: #fff;
      box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    }
    .audit-meta {
      font-size: .9rem;
      margin-bottom: 8px;
      color: #555;
    }
    .audit-meta strong {
      color: #003366;
    }
    .audit-block {
      display: grid;
      gap: 8px;
    }
    .audit-content {
      background: #f9f9f9;
      border: 1px solid #ddd;
      border-radius: 8px;
      padding: 10px;
      white-space: pre-wrap;
      word-break: break-word;
      font-size: .95rem;
    }
    .pager {
      display: flex;
      justify-content: flex-end;
      gap: 8px;
      margin-top: 14px;
    }
    .pager a, .pager span.current {
      padding: 6px 10px;
      border-radius: 6px;
      text-decoration: none;
      border: 1px solid #d7dee5;
      background: #fff;
      color: #003366;
    }
    .pager span.current {
      background: #003366;
      color: #fff;
      border-color: #003366;
    }

/* --- Normalize action buttons inside tables --- */
.table td form { 
  display: inline-block;   /* sit next to links cleanly */
  margin: 0;               /* kill default form margin */
}

a.button,
button.button,
input[type="submit"].button,
.button {
  display: inline-flex;     /* ensure same layout model for <a> and <button> */
  align-items: center;
  justify-content: center;
  line-height: 1.2;         /* normalize line-height */
  padding: 10px 14px;       /* keep your existing paddings */
  height: 38px;             /* lock to the same visual height */
  vertical-align: middle;   /* align nicely within table cells */
  -webkit-appearance: none; /* remove native button quirks */
  appearance: none;
}

/* optional: keep buttons from looking cramped in tight cells */
.table td a.button,
.table td button.button,
.table td input[type="submit"].button {
  white-space: nowrap;
}

/* Arched heading to match board-title look */
.board-arch {
  flex: 0 0 100%;
  display: block;
  width: 100%;
  height: 120px;        /* control the visual height */
  margin: 0;            /* remove extra spacing */
  line-height: 0;       /* remove inline baseline gap */
}

.board-header { 
  flex-wrap: wrap; 
  overflow: hidden;     /* hide any tiny overflow from the SVG */
}

/* Use rem so it matches your board-title = 4rem on desktop */
.board-arch text {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 4rem;      /* same as .board-title */
  letter-spacing: 1px;
  fill: #ffd975;
}

@media (max-width: 600px) {
  .board-arch { height: 70px; } /* scale down on small screens */
  .board-arch text { font-size: 2rem; }
}