/* San Fernando Lodge No. 365 — IOOF
   Shared stylesheet.
   Palette derived from the lodge's IOOF three-link logo (cobalt blue + red),
   refined into a unique heritage variation: deepened navy, richer red,
   warm ivory, and a blue-charcoal ink. */

:root {
  --navy:      #21386f;   /* refined, deepened relative of the logo's cobalt blue */
  --navy-deep: #182a54;   /* headers / footers / hero */
  --blue:      #2f4f9e;   /* mid blue (close to logo blue) — links & details */
  --red:       #c8202a;   /* the logo red, slightly deepened */
  --red-deep:  #99161d;   /* hovers / strong accents */
  --steel:     #aebfdf;   /* light blue tint for dark backgrounds */
  --cream:     #f6f1e6;   /* page background (warm ivory) */
  --paper:     #fffdf9;   /* cards / header bar */
  --ink:       #1b2333;   /* blue-charcoal body text */
  --muted:     #5f6470;
  --line:      #ddd6c7;   /* hairline borders */
  --link:      #2f4f9e;
  --maxw:      1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  font-size: 18px;
}

h1, h2, h3, .brand-name, nav a {
  font-family: "Trajan Pro", "Times New Roman", Georgia, serif;
  letter-spacing: 0.02em;
}

a { color: var(--link); }
a:hover { color: var(--red-deep); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Header (light bar showing the logo) ---------- */
.site-header {
  background: var(--paper);
  border-bottom: 4px solid var(--red);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 24px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.header-inner .logo {
  height: 54px;
  width: auto;
  flex: 0 0 auto;
}
.brand-name {
  font-size: 1.35rem;
  color: var(--navy-deep);
  margin: 0;
  line-height: 1.2;
}
.brand-sub {
  font-family: Georgia, serif;
  font-size: 0.82rem;
  color: var(--red);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 3px;
}

/* ---------- Nav ---------- */
nav.main-nav { background: var(--navy-deep); }
nav.main-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: var(--maxw);
}
nav.main-nav a {
  display: block;
  padding: 14px 18px;
  color: #e8ecf6;
  text-decoration: none;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
nav.main-nav a:hover,
nav.main-nav a.active {
  background: var(--red);
  color: #fff;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(rgba(24,42,84,0.86), rgba(24,42,84,0.92)), var(--navy);
  color: var(--cream);
  text-align: center;
  padding: 96px 24px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.9), 0 2px 18px rgba(0,0,0,0.7);
}
.hero h1 { font-size: 2.6rem; margin: 0 0 10px; color: #fff; }
.hero .motto {
  font-style: italic;
  color: var(--steel);
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  max-width: 620px;
  margin: 0 auto;
}
.hero .est { margin-top: 14px; font-size: 1rem; opacity: 0.9; }

/* ---------- Content ---------- */
main { padding: 48px 0 64px; }
section.block { margin-bottom: 40px; }

h1.page-title {
  font-size: 2.1rem;
  color: var(--navy-deep);
  border-bottom: 2px solid var(--red);
  padding-bottom: 12px;
  margin-bottom: 8px;
}
.page-lead { color: var(--muted); font-size: 1.1rem; margin-top: 0; }

h2 { font-size: 1.5rem; color: var(--navy-deep); margin-top: 2em; }
h3 { font-size: 1.15rem; color: var(--red-deep); margin-bottom: 0.3em; }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 28px 32px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

/* Quick-links grid on home */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 32px;
}
.tile {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 4px solid var(--red);
  border-radius: 6px;
  padding: 24px;
  text-decoration: none;
  color: var(--ink);
  display: block;
  transition: transform 0.15s, box-shadow 0.15s;
}
.tile:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0,0,0,0.10); color: var(--ink); }
.tile h3 { margin-top: 0; }
.tile p { color: var(--muted); font-size: 0.95rem; margin-bottom: 0; }

/* Officer / leadership grid */
.officers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
  margin-top: 24px;
}
.officer {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 22px;
  text-align: center;
}
.officer .photo {
  width: 110px; height: 110px;
  border-radius: 50%;
  margin: 0 auto 14px;
  background: #e6e9f1 url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="110" height="110"><circle cx="55" cy="44" r="22" fill="%23b9c2d8"/><path d="M20 100 a35 35 0 0 1 70 0 z" fill="%23b9c2d8"/></svg>') center/cover no-repeat;
  border: 3px solid var(--blue);
}
.officer .role { color: var(--red-deep); font-weight: bold; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; }
.officer .name { font-size: 1.15rem; margin: 4px 0; }

/* Placeholder note */
.placeholder {
  background: #eef2fb;
  border: 1px dashed var(--blue);
  border-radius: 6px;
  padding: 14px 18px;
  color: var(--navy-deep);
  font-size: 0.92rem;
  margin: 16px 0;
}
.placeholder::before { content: "✎ "; }

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 24px;
}
.gallery-grid .frame {
  aspect-ratio: 4 / 3;
  background: #e6e9f1;
  border: 1px solid var(--line);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.85rem;
  overflow: hidden;
}
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Info rows (contact / facts) */
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.info-list li:last-child { border-bottom: none; }
.info-list .label { display: block; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--red-deep); }
.info-list a { font-weight: bold; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
@media (max-width: 720px) {
  .two-col { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2rem; }
  .header-inner { flex-wrap: wrap; }
}

/* Buttons */
.btn {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  padding: 12px 26px;
  border-radius: 4px;
  text-decoration: none;
  font-family: Georgia, serif;
  letter-spacing: 0.03em;
  margin-top: 8px;
}
.btn:hover { background: var(--navy-deep); color: #fff; }

/* Contact emphasis block */
.contact-cta {
  background: var(--navy-deep);
  color: var(--cream);
  border-radius: 6px;
  padding: 26px 32px;
}
.contact-cta a { color: var(--steel); font-weight: bold; }
.contact-cta .big { font-size: 1.4rem; color: #fff; }
.contact-cta .es, .contact-cta p.es { color: #dbe4f7; border: none; padding-left: 0; margin-top: 2px; font-style: italic; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-deep);
  color: #cdd5e6;
  padding: 32px 24px;
  font-size: 0.9rem;
  border-top: 4px solid var(--red);
}
.footer-inner { max-width: var(--maxw); margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.site-footer a { color: var(--steel); }
.site-footer .motto { font-style: italic; color: var(--steel); }

/* ---------- Bilingual (English + Spanish) ---------- */
/* Spanish translation paragraphs sit just beneath their English original */
p.es, .es-block {
  color: #5b6675;
  border-left: 3px solid #d4dbec;
  padding-left: 14px;
  margin-top: -2px;
}
/* Spanish translation under a heading */
.t-es {
  display: block;
  font-family: Georgia, "Palatino Linotype", serif;
  font-style: italic;
  font-weight: normal;
  color: var(--red-deep);
  letter-spacing: 0;
  margin-top: 3px;
}
h1.page-title .t-es { font-size: 1.2rem; }
h2 .t-es { font-size: 0.98rem; }
h3 .t-es { font-size: 0.84rem; }
.brand-es { display: block; color: #8aa0cf; font-style: italic; text-transform: none; letter-spacing: 0.03em; font-size: 0.8rem; margin-top: 2px; }
/* list/info Spanish */
.info-list .es { display: block; color: #5b6675; font-style: italic; font-size: 0.92rem; }
.tile .es, .officer .es { display: block; color: #5b6675; font-style: italic; border: none; padding-left: 0; margin-top: 2px; }
.officer .role .es { color: var(--red-deep); font-style: italic; font-size: 0.92em; }
.tile p.es { border: none; padding-left: 0; margin-top: 2px; }

/* Nav: English on top, Spanish beneath */
nav.main-nav a { text-align: center; line-height: 1.12; padding: 10px 15px; }
nav.main-nav .nav-es { display: block; font-size: 0.68rem; font-style: italic; text-transform: none; letter-spacing: 0; opacity: 0.85; margin-top: 2px; }

/* Hero Spanish — light, no border, on dark background */
.hero .t-es, .hero .es { color: #dbe4f7; border: none; padding-left: 0; margin-top: 4px; font-style: italic; }

/* ---------- History sidebar ---------- */
.sidebar {
  float: right;
  width: 290px;
  margin: 4px 0 20px 28px;
  background: #eef2fb;
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  border-radius: 6px;
  padding: 20px 22px;
  font-size: 0.95rem;
  line-height: 1.55;
}
.sidebar h3 { margin: 0 0 12px; color: var(--navy-deep); font-size: 1.1rem; }
.sidebar dl { margin: 0; }
.sidebar dt { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--red-deep); margin-top: 12px; }
.sidebar dt:first-child { margin-top: 0; }
.sidebar dd { margin: 2px 0 0; }
.sidebar dd .es { display: block; font-style: italic; color: #5b6675; font-size: 0.88rem; margin-top: 1px; }
.sidebar dt .es { font-style: italic; color: #8a93a3; text-transform: none; letter-spacing: 0; }
.member p.es { margin-top: -2px; }
.member { margin-top: 1.6em; }
.member h3 { color: var(--navy-deep); margin-bottom: 0.3em; font-size: 1.15rem; }
.member p { margin-top: 0; }
@media (max-width: 720px) {
  .sidebar { float: none; width: auto; margin: 0 0 22px 0; }
}

/* ---------- Symbols & Principles page ---------- */
.symbol-card { margin-bottom: 22px; }
.symbol-row { display: flex; gap: 30px; align-items: center; }
.symbol-row .art { flex: 0 0 160px; }
.symbol-row .art svg { width: 160px; height: 160px; display: block; margin: 0 auto; }
.symbol-row .text h3 { margin: 0 0 10px; font-size: 1.4rem; color: var(--navy-deep); }
.symbol-row .text p { margin: 0; }
@media (max-width: 640px) {
  .symbol-row { flex-direction: column; text-align: center; gap: 16px; }
}
