/* Barony of Urquhart — recreated from the original 2010s theme, made responsive */
:root {
  --bg: #2d2a29;
  --panel: #f8f8f8;
  --ink: #383838;
  --maroon: #600202;
  --link: #661400;
  --muted: #716a5b;
  --rule: #cccccc;
  --w: 960px;
}
* { box-sizing: border-box; }
html { background: var(--bg) url(/images/main_bg.gif) repeat-x left top; }
body {
  margin: 0;
  color: var(--ink);
  font: 15px/1.75 "Liberation Sans", Arial, Helvetica, sans-serif;
  background: url(/images/header_bg.jpg) no-repeat center 68px;
}
img { max-width: 100%; height: auto; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Top navigation ---------- */
.topnav { min-height: 68px; }
.topnav__inner { max-width: var(--w); margin: 0 auto; display: flex; align-items: center; justify-content: center; }
.topnav__brand { display: none; }
.topnav__toggle { display: none; }
.topnav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; }
.topnav li a {
  display: block; max-width: 8.5em; padding: 16px 12px; text-align: center;
  color: #fff; font: 700 12px/16px Arial, Helvetica, sans-serif; text-decoration: none;
}
.topnav li a:hover, .topnav li a[aria-current] { color: #e9d9b4; }

/* ---------- Announcement banner ---------- */
.banner { max-width: var(--w); margin: 4px auto 0; padding: 0 16px; }
.banner p {
  margin: 0; padding: 10px 18px; text-align: center;
  background: #f3ead6; color: #4a1d10; border: 1px solid #c9b48a; border-radius: 4px;
  font-family: Georgia, "Times New Roman", serif; font-size: 16px;
}
.banner a { font-weight: bold; text-decoration: underline; }

/* ---------- Header: crest over slideshow ---------- */
.page { max-width: var(--w); margin: 0 auto; }
.hero { position: relative; padding-top: 120px; }
.banner + .page .hero { padding-top: 90px; }
.hero__crest {
  position: absolute; left: 50%; top: 22px; transform: translateX(-50%);
  width: 512px; z-index: 3; pointer-events: none;
}
.banner + .page .hero__crest { top: -8px; }
.slideshow { position: relative; aspect-ratio: 960 / 364; overflow: hidden; background: #1d1b1a; }
.slideshow::after { content: ""; position: absolute; left: 0; right: 0; bottom: -24px; height: 24px; background: url(/images/shade_header.png) no-repeat center top / 100% 100%; }
.slideshow img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s ease; }
.slideshow img.is-active { opacity: 1; }
.slideshow__dots { position: absolute; right: 14px; bottom: 10px; display: flex; gap: 6px; z-index: 2; }
.slideshow__dots span { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.45); }
.slideshow__dots span.is-active { background: #fff; }

/* ---------- Content panel ---------- */
.content {
  margin-top: 24px; padding: 28px 40px 24px; background: var(--panel);
  border-radius: 3px; box-shadow: 0 2px 14px rgba(0,0,0,.35);
}
.content::after { content: ""; display: block; clear: both; }
h2 {
  margin: 0 0 14px; padding-bottom: 6px; border-bottom: 1px solid var(--rule);
  font: normal 32px/1.1 "Trebuchet MS", Arial, Helvetica, sans-serif; color: var(--maroon);
}
h2 small { display: block; margin-top: 6px; font-size: 16px; letter-spacing: .02em; }
h3.kicker { margin: 0 0 14px; padding-bottom: 6px; border-bottom: 1px solid var(--rule); font: normal 16px/1.3 "Trebuchet MS", Arial, sans-serif; color: var(--maroon); letter-spacing: .02em; }
.prose p { margin: 0 0 1.1em; }
.prose h3 { color: var(--maroon); font-family: "Trebuchet MS", Arial, sans-serif; font-weight: normal; font-size: 20px; margin: 1.2em 0 .4em; }
.prose ul { padding-left: 1.4em; }

.section { margin-bottom: 8px; }
.section::after { content: ""; display: block; clear: both; }
.section figure { margin: 4px 0 16px; max-width: 46%; }
.section.img-right figure { float: right; margin-left: 28px; }
.section.img-left figure { float: left; margin-right: 28px; }
.section.img-center figure { max-width: 100%; text-align: center; margin: 8px auto 18px; }
.section figure img { display: block; margin: 0 auto; }
figcaption { text-align: center; font-size: 13px; color: #555; margin-top: 6px; }
.divider { clear: both; border: 0; border-bottom: 1px dotted #666; margin: 18px 0 24px; }

.gallery { clear: both; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin: 10px 0 14px; }
.gallery img { display: block; height: 160px; width: auto; }
a.zoom { cursor: zoom-in; }

.pager { clear: both; display: flex; justify-content: space-between; margin-top: 24px; }
.btn { display: inline-block; padding: 8px 18px; background: #3b3634; color: #fff !important; border-radius: 3px; font-weight: bold; font-size: 13px; letter-spacing: .03em; }
.btn--next { margin-left: auto; }
.btn:hover { background: var(--maroon); text-decoration: none; }

/* ---------- Footer ---------- */
footer { max-width: var(--w); margin: 0 auto; }
.footer-title { background: #ededed url(/images/shade_f2.png) no-repeat center top; padding: 24px 16px 28px; text-align: center; }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 22px 30px 30px; font-size: 11px; color: var(--muted); }
.footer-bottom a { color: var(--muted); font-weight: bold; }

/* ---------- Lightbox ---------- */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 94vw; max-height: 92vh; }
.lightbox::backdrop { background: rgba(10,8,8,.82); }
.lightbox img { display: block; max-width: 94vw; max-height: 88vh; box-shadow: 0 6px 30px #000; }
.lightbox__close { position: absolute; top: 6px; right: 6px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(0,0,0,.65); color: #fff; font-size: 24px; cursor: pointer; }

/* ---------- Phones & tablets ---------- */
@media (max-width: 860px) {
  html { background-size: auto 60px; }
  body { background-position: center 56px; background-size: 1000px auto; }
  .topnav { min-height: 56px; background: #1f1c1b; position: sticky; top: 0; z-index: 10; }
  .topnav__inner { justify-content: space-between; flex-wrap: wrap; padding: 0 12px; }
  .topnav__brand { display: block; color: #e9d9b4; font: 18px/56px Georgia, serif; letter-spacing: .04em; }
  .topnav__toggle { display: block; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; }
  .topnav__toggle .bars, .topnav__toggle .bars::before, .topnav__toggle .bars::after { display: block; width: 24px; height: 2px; background: #fff; position: relative; margin: 0 auto; content: ""; }
  .topnav__toggle .bars::before { position: absolute; top: -7px; }
  .topnav__toggle .bars::after { position: absolute; top: 7px; }
  #menu { display: none; width: 100%; padding-bottom: 8px; }
  #menu.is-open { display: block; }
  .topnav ul { flex-direction: column; align-items: stretch; }
  .topnav li a { max-width: none; text-align: left; font-size: 15px; padding: 12px 6px; border-top: 1px solid #3a3533; }
  .hero, .banner + .page .hero { padding-top: 15vw; }
  .hero__crest, .banner + .page .hero__crest { width: 62vw; top: 1vw; }
  .banner p { font-size: 15px; }
  .content { margin-top: 18px; padding: 20px 16px; border-radius: 0; }
  h2 { font-size: 26px; }
  .section figure, .section.img-right figure, .section.img-left figure { float: none; max-width: 100% !important; margin: 4px auto 16px; text-align: center; }
  .gallery img { height: 110px; }
  .footer-bottom { justify-content: center; text-align: center; }
}

/* ---------- Page features ---------- */
.section.is-centered .prose, .section.is-centered h2, .section.is-centered .kicker { text-align: center; }
.section.two-col .prose ul { columns: 2; column-gap: 40px; }
.prose ul.plain, .section.two-col .prose ul { list-style: none; padding-left: 0; }
.section.two-col .prose li { break-inside: avoid; padding: 3px 0; }
.source-note { clear: both; margin-top: 24px; font-size: 12px; color: #777; }
.source-note p { margin: 0; }

/* Former barons: ribbon list (replaces the old picture-of-text banners) */
.barons { list-style: none; padding: 0; margin: 10px 0 20px; clear: both; }
.barons li { display: flex; align-items: center; gap: 16px; padding: 8px 0; border-bottom: 1px solid #c9c9c9; max-width: 640px; }
.barons__rank {
  flex: 0 0 120px; height: 48px; display: flex; align-items: center; justify-content: flex-end; padding-right: 26px;
  margin-left: -40px; color: #f1e3d3; font: italic 30px/1 "IM Fell English", Georgia, serif;
  background: linear-gradient(180deg, #8b3a36 0%, #6e1f1c 55%, #57110f 100%);
  clip-path: polygon(0 0, 88% 0, 100% 50%, 88% 100%, 0 100%);
  text-shadow: 0 1px 0 rgba(0,0,0,.4);
}
.barons__who { font: 20px/1.3 "IM Fell English", Georgia, serif; color: #1d1d1d; }
.barons__who a { color: #1d1d1d; }
.barons__who a:hover { color: var(--maroon); }
.barons__who small { display: block; font: 13px/1.4 Arial, sans-serif; color: var(--link); }
.barons li.barons__note { border: 0; justify-content: center; padding: 10px 0; }
.barons__note span {
  display: block; max-width: 470px; padding: 10px 28px; text-align: center;
  font: italic 19px/1.35 "IM Fell English", Georgia, serif; color: #2b1d08;
  background: linear-gradient(180deg, #ecd9a0, #c9a85a 60%, #b8923f); border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,.25);
}

/* Feudal baronies table */
.table-wrap { clear: both; margin-top: 10px; }
.table-filter { width: 100%; max-width: 420px; padding: 9px 12px; margin: 0 0 12px; border: 1px solid #bbb; border-radius: 3px; font-size: 15px; }
table.baronies { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
.baronies th { text-align: left; background: #3b3634; color: #fff; padding: 8px 10px; position: sticky; top: 0; }
.baronies td { padding: 6px 10px; border-bottom: 1px solid #e2e2e2; vertical-align: top; }
.baronies tr:nth-child(even) td { background: #faf7f2; }

/* Contact */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 36px; align-items: start; }
.contact__form label { display: block; font-weight: bold; font-size: 14px; margin-bottom: 14px; }
.contact__form input, .contact__form textarea { display: block; width: 100%; margin-top: 4px; padding: 9px 12px; border: 1px solid #cfcfcf; border-radius: 3px; font: inherit; font-weight: normal; background: #fff; }
.contact__form button { border: 0; cursor: pointer; font-size: 15px; padding: 10px 26px; }
.contact__info { border-left: 1px solid var(--rule); padding-left: 24px; }
.hp { position: absolute; left: -9999px; }

@media (max-width: 860px) {
  .barons__rank { margin-left: -16px; flex-basis: 92px; height: 42px; font-size: 24px; padding-right: 18px; }
  .barons__who { font-size: 17px; }
  .barons__who small { word-break: break-all; }
  .section.two-col .prose ul { columns: 1; }
  .contact { grid-template-columns: 1fr; }
  .contact__info { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); padding-top: 16px; }
  .baronies { font-size: 13px; }
}
.hero__caption { color: #e8e1d6; font-size: 14px; line-height: 1.6; margin: 30px 8px 0; }
h2 .h-icon { float: left; width: 110px; margin: -6px 18px 6px 0; }
h2:has(.h-icon) { overflow: hidden; }
.gallery--large img { height: 300px; }
@media (max-width: 860px) { .gallery--large img { height: 200px; } }
