@import url("/media/system/css/joomla-fontawesome.min.css");

:root {
  --green: #0b5c3a;
  --green-deep: #06291b;
  --green-flag: #169b62;
  --cream: #f6f1e4;
  --paper: #fffcf6;
  --orange: #ff7900;
  --orange-deep: #c45a00;
  --gold: #d4a017;
  --ink: #1c1917;
  --muted: #5c574f;
  --line: rgba(11, 92, 58, 0.18);
  --shadow: 0 18px 40px rgba(6, 41, 27, 0.16);
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Source Sans 3", "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
}
img { max-width: 100%; display: block; }
a { color: var(--green); }
a:hover { color: var(--orange-deep); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: #fff; padding: 8px; z-index: 99; }
.topbar { background: var(--green-deep); color: var(--cream); font-size: 0.9rem; }
.topbar-inner, .nav-inner, .wrap, .footer-inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}
.topbar-inner {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 8px 0;
}
.topbar a { color: var(--gold); text-decoration: none; }
.brand-bar {
  background: linear-gradient(180deg, var(--green), var(--green-deep));
  border-bottom: 4px solid var(--gold);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 0;
}
.brand { display: flex; align-items: center; gap: 14px; color: #fff; text-decoration: none; }
.brand:hover { color: var(--gold); }
.emblem {
  width: auto; height: 72px; object-fit: contain; flex: none;
  border-radius: 6px; border: 2px solid var(--gold); background: #fff;
  padding: 3px;
}
.brand-text strong {
  display: block; font-family: var(--serif); font-size: 1.55rem; letter-spacing: 0.12em;
  font-weight: 700;
}
.brand-text span {
  display: block; font-size: 0.78rem; color: var(--gold); letter-spacing: 0.16em; text-transform: uppercase;
}
.tricolor {
  height: 8px;
  background: linear-gradient(90deg, var(--green-flag) 0 33.33%, #fff 33.33% 66.66%, var(--orange) 66.66% 100%);
}
nav ul.mod-menu, nav ul {
  list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 12px;
  align-items: center;
}
nav li { position: relative; }
nav a, nav span.nav-header, nav span.separator {
  color: #f3ead6; text-decoration: none; font-weight: 600; font-size: 0.95rem;
  padding: 8px 6px; display: inline-block; border-bottom: 2px solid transparent; cursor: pointer;
}
nav a:hover, nav a[aria-current="page"], nav li.active > a {
  color: var(--gold); border-bottom-color: var(--gold);
}
.menu-toggle {
  display: none; background: transparent; color: var(--gold); border: 1px solid var(--gold);
  padding: 8px 12px; font: inherit; cursor: pointer;
}
.hero {
  position: relative; min-height: 420px; color: #fff;
  background: var(--green-deep) center/cover no-repeat;
  display: flex; align-items: flex-end;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(6,41,27,.15) 0%, rgba(6,41,27,.72) 70%, rgba(6,41,27,.92) 100%);
}
.hero .wrap { position: relative; z-index: 1; padding: 48px 0 40px; }
.kicker {
  font-size: 0.82rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold);
  font-weight: 700; margin-bottom: 8px;
}
.hero h1, .page-hero h1 {
  font-family: var(--serif); font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.1;
  margin: 0 0 12px; font-weight: 700;
}
.hero p { max-width: 38rem; font-size: 1.15rem; color: var(--cream); }
.page-hero {
  background: var(--green); color: #fff; padding: 36px 0 28px;
}
.page-hero h1 { color: #fff; }
.section { padding: 40px 0; }
.section h2 {
  font-family: var(--serif); color: var(--green-deep); font-size: 2rem; margin: 0 0 12px;
}
.rule { border: 0; height: 3px; width: 72px; background: var(--orange); margin: 0 0 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.card {
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow);
  padding: 22px 22px 24px; border-top: 4px solid var(--green-flag);
}
.card h3 { font-family: var(--serif); color: var(--green); margin: 0 0 8px; font-size: 1.45rem; }
.card p { margin: 0 0 12px; color: var(--muted); }
.btn, .card a.btn {
  display: inline-block; background: var(--green); color: #fff; text-decoration: none;
  padding: 10px 16px; font-weight: 700; border: 1px solid var(--gold);
}
.btn:hover, .card a.btn:hover { background: var(--orange); color: #fff; }
.btn-orange { background: var(--orange); border-color: var(--orange-deep); }
footer {
  background: var(--green-deep); color: #f3ead6; padding: 36px 0 18px; margin-top: 12px;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; }
footer h3 { color: var(--gold); margin-top: 0; font-family: var(--serif); }
footer a { color: #f3ead6; }
.legal { margin-top: 24px; font-size: 0.82rem; color: #9aa3ad; border-top: 1px solid rgba(212,160,23,.25); padding-top: 12px; }
.com-content-article, .item-page, .blog { margin: 0; padding: 0; background: transparent; border: none; box-shadow: none; }
.com-content-article__body { margin: 0; padding: 0; }
.article-section { padding: 28px 0 48px; }
.article-panel {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 36px 40px 44px;
  border-top: 4px solid var(--green-flag);
}
.article-panel > p:first-of-type { margin-top: 0; }
.article-panel h2 {
  font-family: var(--serif);
  color: var(--green-deep);
  font-size: 1.55rem;
  margin: 28px 0 10px;
  font-weight: 700;
  scroll-margin-top: 12px;
}
.article-panel h2:first-of-type { margin-top: 8px; }
.article-panel .bio-photo { margin-left: 0; margin-right: 0; }
.article-panel .bio-photo.portrait { margin-right: 0; }
.com-content-article .page-header { display: none; }
#system-message-container { width: min(1120px, calc(100% - 32px)); margin: 12px auto 0; }
.com-users-login, .login {
  max-width: 520px; margin: 28px auto; background: #fff; border: 1px solid var(--line);
  box-shadow: var(--shadow); padding: 28px 32px 36px;
}
.com-users-login input, .login input {
  width: 100%; padding: 10px 12px; margin: 6px 0 14px; border: 1px solid #c9c1ae;
}
.com-users-login .btn, .login .btn {
  background: var(--green); color: var(--gold); border: 1px solid var(--gold);
}
.sources { font-size: 0.88rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; margin-top: 28px; }
.com-content-article__body::after { content: ""; display: table; clear: both; }
.bio-photo {
  margin: 8px 0 24px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.bio-photo figcaption {
  font-size: 0.86rem;
  color: var(--muted);
  padding: 8px 12px 10px;
  line-height: 1.4;
}
.bio-photo.scene img {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: cover;
  object-position: center;
}
.bio-photo.portrait {
  float: right;
  width: min(320px, 42%);
  margin: 4px 0 16px 20px;
}
.bio-photo.portrait img {
  width: 100%;
  height: auto;
  object-fit: contain;
  background: var(--cream);
}
.lore {
  background: var(--cream);
  border-left: 4px solid var(--orange);
  padding: 12px 16px;
  color: var(--muted);
  margin: 16px 0;
}
.lore strong { color: var(--orange-deep); }
.map-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 16px 0 24px;
}
.map-grid .bio-photo { margin: 0; }
.bio-photo.map img {
  width: 100%;
  height: auto;
  max-height: 560px;
  object-fit: contain;
  background: var(--cream);
}
.tl-key {
  display: flex; flex-wrap: wrap; gap: 16px 24px;
  font-size: 0.88rem; color: var(--muted); margin: 8px 0 20px;
}
.tl-key span { display: flex; align-items: center; gap: 8px; }
.tl-key i {
  width: 14px; height: 14px; border-radius: 50%; display: inline-block;
  border: 3px solid var(--gold);
}
.tl-key .k-person { background: var(--green); }
.tl-key .k-county { background: var(--orange); }
.tl-wrap { margin: 28px 0 8px; }
.tl {
  list-style: none; margin: 0; padding: 8px 0 8px 0;
  border-left: 3px solid var(--gold);
  margin-left: 8.6rem;
}
.tl-item {
  position: relative; padding: 0 0 28px 28px;
}
.tl-item:last-child { padding-bottom: 8px; }
.tl-dot {
  position: absolute; left: -9px; top: 6px; width: 15px; height: 15px;
  background: var(--green); border: 3px solid var(--gold); border-radius: 50%;
}
.tl-year {
  position: absolute; left: -8.5rem; top: 0; width: 7.5rem;
  text-align: right; font-weight: 700; color: var(--orange-deep);
  font-variant-numeric: tabular-nums;
}
.tl-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  align-items: start;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow);
  padding: 14px 16px 16px; border-top: 3px solid var(--green-flag);
}
.tl-thumb {
  width: 96px; height: 96px;
  object-fit: cover; object-position: center top;
  background: var(--cream);
}
.tl-card .tl-body { min-width: 0; }
.tl-card.tl-county {
  grid-template-columns: 1fr;
  border-top-color: var(--orange);
}
.tl-card.tl-lore { background: #fffdf8; }
.tl-kicker {
  font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold); font-weight: 700; margin: 0 0 4px;
}
.tl-county .tl-kicker { color: var(--orange-deep); }
.tl-badge {
  display: inline-block; font-family: var(--sans); font-size: 0.68rem;
  letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700;
  color: var(--orange-deep); border: 1px solid var(--orange);
  padding: 1px 6px; margin-right: 6px; vertical-align: middle;
}
.tl-card h3 { font-family: var(--serif); margin: 0 0 6px; font-size: 1.35rem; }
.tl-card h3 a { color: var(--green-deep); text-decoration: none; }
.tl-card h3 a:hover { color: var(--orange-deep); }
.tl-card p { margin: 0 0 8px; color: var(--muted); }
.tl-card .tl-more { font-weight: 700; color: var(--green); text-decoration: none; }
.tl-foot { margin-top: 24px; color: var(--muted); }
@media (max-width: 700px) {
  .tl { margin-left: 0; border-left: 3px solid var(--gold); }
  .tl-year { position: static; width: auto; text-align: left; display: block; margin-bottom: 4px; }
  .article-panel { padding: 22px 18px 28px; }
  .map-grid { grid-template-columns: 1fr; }
  .bio-photo.portrait {
    float: none;
    width: 100%;
    max-width: 320px;
    margin: 8px auto 20px;
  }
  .tl-card { grid-template-columns: 1fr; }
  .tl-thumb { width: 100%; height: 140px; }
}
@media (max-width: 900px) {
  .grid-3, .footer-grid { grid-template-columns: 1fr; }
  .menu-toggle { display: block; }
  nav { display: none; width: 100%; }
  nav.open { display: block; }
  nav ul, nav ul.mod-menu { flex-direction: column; align-items: flex-start; }
  .nav-inner { flex-wrap: wrap; }
  .hero { min-height: 320px; }
}

/* ---- Frontend edit controls (module + article) ---- */
.nav-inner {
  position: relative;
}
/* Pin module edit control to far right of the header bar */
.brand-bar .jmodedit,
.nav-inner > .jmodedit,
.nav-inner .btn.jmodedit,
header.brand-bar a.jmodedit {
  position: absolute !important;
  right: 0 !important;
  top: 50% !important;
  transform: translateY(-50%);
  z-index: 20;
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  margin: 0 !important;
  padding: 6px 10px !important;
  border: 1px solid var(--gold) !important;
  border-radius: 6px;
  background: #fff !important;
  color: var(--green-deep) !important;
  text-decoration: none !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  white-space: nowrap;
}
.brand-bar .jmodedit:hover,
.nav-inner .btn.jmodedit:hover,
header.brand-bar a.jmodedit:hover {
  background: #f7f4ea !important;
  color: var(--orange-deep) !important;
}
.brand-bar .jmodedit .icon-edit,
.nav-inner .jmodedit .icon-edit {
  font-family: "Font Awesome 5 Free", "Font Awesome 6 Free", "FontAwesome" !important;
  font-weight: 900 !important;
  font-style: normal !important;
  display: inline-block;
  width: 1em;
  text-align: center;
}
.brand-bar .jmodedit .icon-edit:before,
.nav-inner .jmodedit .icon-edit:before {
  content: "\f044";
}
/* Leave room on the right so menu items do not collide with Edit */
.nav-inner nav {
  padding-right: 5.5rem;
}
/* Hide Joomla tooltip text that was spilling into the header */
.jmodedit [role="tooltip"],
.jmodedit div[role="tooltip"],
.icons [role="tooltip"],
.icons div[role="tooltip"],
a[aria-describedby] > [role="tooltip"] {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.icons {
  position: relative;
  z-index: 5;
  margin: 0 0 12px;
  min-height: 1.5rem;
}
.icons .float-end { float: right; }
.icons a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--gold);
  border-radius: 6px;
  background: #fff;
  color: var(--green);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}
.icons a:hover { background: #f7f4ea; color: var(--orange-deep); }
.icons .icon-edit:before { content: "\f044"; }

/* ---- Hide frontend MODULE edit in header/menu (tooltip text was leaking) ---- */
.brand-bar a.jmodedit,
.brand-bar .jmodedit,
.brand-bar ul.mod-menu > a.jmodedit,
.brand-bar ul.mod-menu > a.btn.jmodedit,
header.brand-bar a.jmodedit {
  display: none !important;
}
.brand-bar [role="tooltip"],
.brand-bar ul.mod-menu > [role="tooltip"],
.brand-bar ul.mod-menu > div[role="tooltip"],
.brand-bar [id^="tip-"] {
  display: none !important;
  visibility: hidden !important;
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  font-size: 0 !important;
  color: transparent !important;
}