/* =========================================================
   Royal Navy History - custom.css
   Global site theme + homepage theme
   Clean pure Wagtail version
   ========================================================= */

/* -------------------------
   General utility / legacy
   ------------------------- */
.broker-width {
  width: 80%;
}

.bg-light {
  background-color: #ffffff !important;
}

.bg-secondary {
  background-color: rgb(205 210 214) !important;
}

.navbar-light {
  border-bottom: 1px solid #dee2e6;
}

.topmar {
  border-top: 1px solid #dee2e6;
}

.goldf p {
  color: #6c757d;
  font-size: 1rem;
  text-align: center;
  margin-bottom: 0;
}

/* -------------------------
   Base typography
   ------------------------- */
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "Noto Sans",
               "Liberation Sans", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: #212529;
  background-color: #ffffff;
}

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

.lead {
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.6;
}

small,
.small,
.text-muted {
  color: #6c757d !important;
}

/* -------------------------
   Headings
   ------------------------- */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: inherit;
  line-height: 1.25;
  color: #212529;
}

h1, .h1 {
  font-size: calc(1.375rem + 1.5vw);
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 1rem;
}

h2, .h2 {
  font-size: calc(1.325rem + 0.9vw);
  font-weight: 600;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}

h3, .h3 {
  font-size: calc(1.3rem + 0.6vw);
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.6rem;
}

h4, .h4 {
  font-size: calc(1.275rem + 0.3vw);
  font-weight: 600;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

h5, .h5 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 1rem;
  margin-bottom: 0.4rem;
}

h6, .h6 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 0.9rem;
  margin-bottom: 0.35rem;
  color: #6c757d;
}

/* -------------------------
   Links
   ------------------------- */
a {
  color: #0d6efd;
  text-decoration: none;
}

a:hover,
a:focus {
  color: #0a58ca;
  text-decoration: underline;
}

main a,
article a,
.richtext a,
.rich-text a,
p a,
li a,
td a {
  text-decoration: none;
  border-bottom: 1px solid rgba(13, 110, 253, 0.3);
}

main a:hover,
article a:hover,
.richtext a:hover,
.rich-text a:hover,
p a:hover,
li a:hover,
td a:hover {
  border-bottom-color: rgba(10, 88, 202, 0.7);
  text-decoration: none;
}

.navbar a,
.nav-link,
.navbar-brand,
.btn,
.btn a,
button a,
.page-link,
.pagination a,
.card a.stretched-link {
  text-decoration: none !important;
  border-bottom: none !important;
}

/* -------------------------
   Lists
   ------------------------- */
ul,
ol {
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.25rem;
}

/* -------------------------
   Blockquotes
   ------------------------- */
blockquote {
  margin: 1.5rem 0;
  padding: 0.75rem 1rem;
  border-left: 4px solid #dee2e6;
  color: #495057;
  background-color: #f8f9fa;
  font-style: italic;
}

blockquote p:last-child {
  margin-bottom: 0;
}

/* -------------------------
   Tables
   ------------------------- */
table {
  width: 100%;
  margin-bottom: 1.5rem;
  border-collapse: collapse;
}

th,
td {
  padding: 0.75rem;
  border: 1px solid #dee2e6;
  vertical-align: top;
}

th {
  background-color: #f8f9fa;
  font-weight: 600;
  text-align: left;
}

/* -------------------------
   Images
   ------------------------- */
img {
  max-width: 100%;
  height: auto;
}

figure {
  margin: 1.5rem 0;
}

figcaption {
  margin-top: 0.5rem;
  color: #6c757d;
  font-size: 0.875rem;
}

/* -------------------------
   Horizontal rules
   ------------------------- */
hr {
  border: 0;
  border-top: 1px solid #dee2e6;
  margin: 2rem 0;
  opacity: 1;
}

/* -------------------------
   Buttons
   ------------------------- */
.btn {
  font-weight: 500;
}

.btn-primary {
  background-color: #0d6efd;
  border-color: #0d6efd;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #0b5ed7;
  border-color: #0a58ca;
}

.btn-outline-primary {
  color: #0d6efd;
  border-color: #0d6efd;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background-color: #0d6efd;
  border-color: #0d6efd;
  color: #ffffff;
}

/* -------------------------
   Cards
   ------------------------- */
.card {
  border-color: #dee2e6;
}

.card-header {
  background-color: #f8f9fa;
  font-weight: 600;
}

/* -------------------------
   Header / Navbar
   ------------------------- */
.site-header {
  background: linear-gradient(to bottom, #f7f9fb 0%, #eef3f6 100%);
  border-bottom: 1px solid rgba(16, 38, 58, 0.12);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.site-header .container {
  min-height: 78px;
}

.site-header::before {
  content: "";
  display: block;
  height: 2px;
  background: #c89a3d;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

.site-branding:hover,
.site-branding:focus {
  text-decoration: none;
}

.site-branding img,
.site-branding .header-emblem {
  width: 46px;
  height: auto;
  display: block;
  flex-shrink: 0;
}

.site-branding-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.site-branding-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #10263a;
  letter-spacing: 0.01em;
  margin: 0;
}

.site-branding-tagline {
  font-size: 0.84rem;
  color: #66798a;
  margin: 0.15rem 0 0 0;
}

.site-header .form-control,
.site-header input,
.site-header input[type="search"],
.site-header input[type="text"] {
  background-color: #ffffff !important;
  border: 1px solid #8fa1af !important;
  border-radius: 6px !important;
  box-shadow: inset 0 0 0 1px #8fa1af !important;
  background-clip: padding-box !important;
  min-height: 38px;
}

.site-header .form-control:focus,
.site-header input:focus,
.site-header input[type="search"]:focus,
.site-header input[type="text"]:focus {
  border-color: #c89a3d !important;
  box-shadow: inset 0 0 0 1px #c89a3d, 0 0 0 0.12rem rgba(200, 154, 61, 0.18) !important;
  outline: none !important;
}

.site-header form .mb-3,
.site-header form .form-group {
  margin-bottom: 0 !important;
}

.site-header form {
  display: flex;
  align-items: center;
}

.site-header form .btn {
  margin-left: 0.5rem;
}

.main-nav {
  align-items: center;
}

.main-nav .nav-item {
  position: relative;
}

.main-nav .nav-link {
  color: #122c44 !important;
  white-space: nowrap;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.9rem 0.75rem;
  position: relative;
  transition: color 0.2s ease;
  text-decoration: none !important;
  border-bottom: none !important;
}

.main-nav .nav-link:hover,
.main-nav .nav-link:focus,
.main-nav .nav-item.active > .nav-link,
.main-nav .nav-link.active,
.main-nav .show > .nav-link {
  color: #a47922 !important;
}

.main-nav .nav-link.active::after,
.main-nav .nav-item.active > .nav-link::after,
.main-nav .show > .nav-link::after {
  content: "";
  position: absolute;
  left: 0.95rem;
  right: 0.95rem;
  bottom: 0.45rem;
  height: 2px;
  background: #c89a3d;
  border-radius: 2px;
}

.main-nav .dropdown-toggle::after {
  margin-left: 0.4rem;
  vertical-align: 0.15em;
}

.main-nav .dropdown-menu {
  background: #10263a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
  padding: 0.45rem 0;
  margin-top: 0.4rem;
  min-width: 250px;
}

.main-nav .dropdown-item {
  color: #d9e3ea;
  font-size: 0.94rem;
  padding: 0.72rem 1rem;
  transition: background-color 0.2s ease, color 0.2s ease;
  text-decoration: none !important;
  border-bottom: none !important;
}

.main-nav .dropdown-item:hover,
.main-nav .dropdown-item:focus,
.main-nav .dropdown-item.active {
  background: rgba(255, 255, 255, 0.05);
  color: #d4a84f;
}

.navbar-toggler {
  border: 1px solid rgba(16, 38, 58, 0.18);
  padding: 0.4rem 0.65rem;
}

.navbar-toggler:focus {
  box-shadow: none;
}

.header-search-toggle {
  color: #17324a;
  font-size: 1rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid rgba(16, 38, 58, 0.12);
  border-radius: 999px;
  background: #ffffff;
  transition: border-color 0.2s ease, color 0.2s ease;
  text-decoration: none !important;
}

.header-search-toggle:hover,
.header-search-toggle:focus {
  color: #a47922;
  border-color: rgba(200, 154, 61, 0.45);
  text-decoration: none;
}

.site-header .btn-outline-primary {
  color: #17324a;
  background-color: #ffffff;
  border: 1px solid rgba(16, 38, 58, 0.22) !important;
}

.site-header .btn-outline-primary:hover,
.site-header .btn-outline-primary:focus {
  color: #ffffff;
  background-color: #10263a;
  border: 1px solid #10263a !important;
  box-shadow: none;
}

/* -------------------------
   Footer
   ------------------------- */
.site-footer {
  background: linear-gradient(to bottom, #6d767c 0%, #596772 100%);
  color: #edf1f4;
  margin-top: 0 !important;
  border-top: 1px solid rgba(184, 115, 51, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.site-footer a {
  color: #c3d0da;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.site-footer a:hover,
.site-footer a:focus {
  color: #d4a84f;
  text-decoration: none;
}

.footer-main {
  display: grid;
  grid-template-columns: 1.15fr 2fr;
  gap: 4rem;
  padding-top: 4rem;
  padding-bottom: 2.5rem;
}

.footer-brand h3 {
  margin: 0 0 1rem 0;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #ffffff;
}

.footer-brand p {
  margin: 0;
  max-width: 360px;
  color: #aebdca;
  line-height: 1.8;
  font-size: 0.98rem;
}

.footer-links-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 2.5rem;
}

.footer-column h4 {
  margin: 0 0 1rem 0;
  color: #f4f7fa;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  position: relative;
  padding-bottom: 0.6rem;
}

.footer-column h4::after {
  content: "";
  display: block;
  width: 32px;
  height: 1px;
  background: rgba(212, 168, 79, 0.55);
  margin-top: 0.55rem;
}

.footer-column ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-column li {
  margin-bottom: 0.72rem;
  line-height: 1.6;
}

.footer-column a {
  font-size: 0.96rem;
}

.footer-muted {
  color: #7f94a5;
  cursor: default;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.1rem;
  padding-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  margin: 0;
  color: #8ea1b0;
  font-size: 0.88rem;
  letter-spacing: 0.01em;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
}

.footer-legal a {
  font-size: 0.88rem;
  color: #9fb1bf;
}

.footer-legal a:hover,
.footer-legal a:focus {
  color: #d4a84f;
}

/* -------------------------
   Generic page / article / web page styling
   ------------------------- */
.rnh-page-header {
  background: linear-gradient(to bottom, #f7f9fb 0%, #eef3f6 100%);
  border-bottom: 1px solid rgba(16, 38, 58, 0.08);
  padding: 3.25rem 0 2.25rem;
}

.rnh-page-header-inner {
  max-width: 860px;
}

.rnh-page-title {
  margin: 0;
  font-size: clamp(2rem, 3.2vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  color: #10263a;
  letter-spacing: -0.01em;
}

.rnh-page-caption {
  margin-top: 1rem;
  max-width: 760px;
  font-size: 1.05rem;
  line-height: 1.75;
  color: #5b6f7f;
}

.rnh-page-body {
  padding: 3rem 0 4rem;
}

.rnh-content-wrap {
  max-width: 760px;
}

.rnh-richtext {
  font-size: 1.05rem;
  line-height: 1.85;
  color: #22313d;
}

.rnh-richtext > *:first-child {
  margin-top: 0;
}

.rnh-richtext h2,
.rnh-richtext h3,
.rnh-richtext h4 {
  color: #10263a;
  margin-top: 2rem;
}

.rnh-richtext p {
  margin-bottom: 1.2rem;
}

.rnh-richtext img {
  border-radius: 8px;
  margin: 1.5rem 0;
}

.rnh-richtext blockquote {
  margin: 2rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid #c89a3d;
  background: #f8fafb;
  color: #4a5d6d;
  font-style: italic;
}

.rnh-article-header {
  padding-top: 3rem;
  padding-bottom: 2.25rem;
  max-width: 900px;
}

.rnh-article-title {
  font-size: clamp(2rem, 3.2vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: #10263a;
  margin-bottom: 0.75rem;
}

.rnh-article-caption {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  color: #5d7181;
  font-size: 1.08rem;
  line-height: 1.75;
}

.rnh-article-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  color: #6a7d8d;
  font-size: 0.95rem;
  margin-top: 1rem;
  margin-bottom: 0;
  border-top: 1px solid rgba(16, 38, 58, 0.08);
  padding-top: 1rem;
}

.rnh-article-author-img {
  width: 34px;
  height: 34px;
  object-fit: cover;
}

.rnh-article-cover-wrap {
  max-width: 1100px;
}

.rnh-article-cover-image {
  border-radius: 10px;
  display: block;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.rnh-article-body {
  max-width: 760px;
  font-size: 1.05rem;
  line-height: 1.85;
  color: #22313d;
}

.rnh-article-body > *:first-child {
  margin-top: 0;
}

.rnh-article-body h2,
.rnh-article-body h3,
.rnh-article-body h4 {
  color: #10263a;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.rnh-article-body p {
  margin-bottom: 1.2rem;
}

.rnh-article-body img {
  border-radius: 8px;
}

.rnh-article-body blockquote {
  margin: 2rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid #c89a3d;
  background: #f8fafb;
  color: #4f6473;
  font-style: italic;
}

.rnh-article-hero {
  background: linear-gradient(to bottom, #f7f9fb 0%, #eef3f6 100%);
  border-bottom: 1px solid rgba(16, 38, 58, 0.08);
  margin-bottom: 2.5rem;
}

.rnh-web-hero {
  margin-bottom: 2.75rem !important;
  background-position: center center;
  background-size: cover;
}

.rnh-web-hero-overlay {
  background: linear-gradient(to bottom, rgba(8, 20, 31, 0.28), rgba(8, 20, 31, 0.48));
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.rnh-web-page-hero {
  background: linear-gradient(to bottom, #f7f9fb 0%, #eef3f6 100%);
  border-bottom: 1px solid rgba(16, 38, 58, 0.08);
  margin-bottom: 2.5rem;
}

.rnh-web-page-header {
  padding-top: 2.75rem;
  padding-bottom: 2rem;
  max-width: 900px;
}

.rnh-web-page-title {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: #10263a;
}

.rnh-web-hero .rnh-web-page-title {
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.28);
}

.rnh-web-page-caption {
  margin-top: 1rem;
  max-width: 760px;
  color: #5f7281;
  font-size: 1.05rem;
  line-height: 1.75;
}

.rnh-web-page-caption-on-image {
  color: rgba(255, 255, 255, 0.96);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
  max-width: 700px;
}

.rnh-web-page-body,
main .rich-text {
  color: #22313d;
}

.rnh-web-page-body p,
main .rich-text p {
  font-size: 1.03rem;
  line-height: 1.8;
  margin-bottom: 1.15rem;
}

.rnh-web-page-body h2,
.rnh-web-page-body h3,
.rnh-web-page-body h4,
main .rich-text h2,
main .rich-text h3,
main .rich-text h4 {
  color: #10263a;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.rnh-web-page-body img,
main .rich-text img {
  border-radius: 8px;
}

.rnh-web-page-body blockquote,
main .rich-text blockquote {
  margin: 2rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid #c89a3d;
  background: #f8fafb;
  color: #4f6473;
  font-style: italic;
}

/* -------------------------
   Homepage theme
   ------------------------- */
main,
.content,
.container,
.container-fluid {
  margin-top: 0 !important;
}

.home-hero {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-top: 0 !important;
  min-height: 460px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    background:
      radial-gradient(circle at center, rgba(8, 20, 31, 0.04) 0%, rgba(8, 20, 31, 0.12) 100%),
      linear-gradient(to bottom, rgba(12, 24, 36, 0.04), rgba(12, 24, 36, 0.16));
  position: relative;
  overflow: hidden;
}

.home-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 88%;
  background-repeat: no-repeat;
  opacity: 0,95;
  transform: scale(1.02);
  z-index: 1;
}

.home-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.04) 0%, rgba(10, 18, 26, 0.18) 100%),
    linear-gradient(to bottom, rgba(10, 18, 26, 0.08), rgba(10, 18, 26, 0.26));
}

.home-hero > .container {
  position: relative;
  z-index: 2;
}

.home-hero .text-center {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  text-align: center !important;
}

.home-hero-overline {
  display: block;
  width: 100%;
  margin: 0 auto 0.55rem auto;
  text-align: center !important;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 244, 220, 0.96);
  text-shadow:
    0 2px 6px rgba(0, 0, 0, 0.55),
    0 8px 18px rgba(0, 0, 0, 0.28);
}

.home-hero h1 {
  width: 100%;
  margin: 0 auto 0.85rem auto;
  text-align: center !important;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fffaf0;
  text-shadow:
    0 3px 8px rgba(0, 0, 0, 0.60),
    0 10px 24px rgba(0, 0, 0, 0.32);
}

.home-hero .lead {
  max-width: 680px;
  margin: 0 auto 1.15rem auto !important;
  text-align: center !important;
  font-size: 1.08rem;
  line-height: 1.55;
  color: rgba(255, 248, 234, 0.98);
  text-shadow:
    0 2px 6px rgba(0, 0, 0, 0.52),
    0 8px 18px rgba(0, 0, 0, 0.24);
}

.home-hero .mt-4.d-flex {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center !important;
  align-items: center;
  gap: 0.65rem !important;
  margin: 0 auto !important;
}

.home-hero .btn {
  min-width: 150px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 0;
  padding: 0.7rem 1.4rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
}

.home-hero a.btn.btn-primary {
  background: linear-gradient(to bottom, #c89a3d 0%, #a47922 100%) !important;
  border-color: #a47922 !important;
  color: #fffdf8 !important;
}

.home-hero a.btn.btn-primary:hover,
.home-hero a.btn.btn-primary:focus {
  background: linear-gradient(to bottom, #d4a84f 0%, #b4872a 100%) !important;
  border-color: #b4872a !important;
  color: #ffffff !important;
}

.home-hero a.btn.btn-outline-primary {
  color: #fff7ea !important;
  border-color: rgba(255, 247, 234, 0.72) !important;
  background: rgba(16, 26, 40, 0.16) !important;
}

.home-hero a.btn.btn-outline-primary:hover,
.home-hero a.btn.btn-outline-primary:focus {
  color: #10263a !important;
  background: #f4e7c8 !important;
  border-color: #f4e7c8 !important;
}

.section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin: 0.1rem 0 1.35rem 0;
}

.section-divider::before,
.section-divider::after {
  content: "";
  display: block;
  width: 64px;
  height: 1px;
  background: linear-gradient(to right, rgba(184, 115, 51, 0), rgba(184, 115, 51, 0.55), rgba(184, 115, 51, 0));
}

.section-divider span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  opacity: 0.78;
  color: #8c4f24;
  font-size: 1.1rem;
  line-height: 1;
  text-indent: 0;
  overflow: visible;
  background: none;
}

.start-here-section {
  padding: 0.5rem 0 1.25rem 0;
}

.start-here-heading {
  text-align: center;
  margin-bottom: 1.35rem;
}

.start-here-heading h2,
.explore-site-heading h2 {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.35rem;
}

.start-here-heading p,
.explore-site-heading p {
  font-size: 0.98rem;
  line-height: 1.6;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  color: #5c6a75;
}

.explore-site-heading {
  text-align: center;
  margin-bottom: 1.35rem !important;
}

.start-here-card {
  height: 100%;
  border: 1px solid rgba(16, 38, 58, 0.08);
  border-left: 4px solid #b87333;
  border-top: 1px solid rgba(16, 38, 58, 0.08);
  border-radius: 0;
  background: linear-gradient(180deg, #fffefc 0%, #faf6f1 100%);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.start-here-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.12);
}

.start-here-card .card-body {
  padding: 1.25rem 1.25rem 1.35rem 1.25rem;
}

.start-here-kicker {
  display: inline-block;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8c4f24;
  font-weight: 700;
  margin-bottom: 0.55rem;
}

.start-here-card h3 {
  margin-bottom: 0.65rem;
  line-height: 1.3;
  font-weight: 700;
}

.start-here-card h3 a {
  color: #10263a;
  text-decoration: none;
}

.start-here-card h3 a:hover {
  color: #8c4f24;
  text-decoration: none;
}

.start-here-card p {
  color: #6a5748;
  margin-bottom: 0;
  line-height: 1.65;
}

.explore-site-section {
  padding: 0.35rem 0 0.2rem 0;
}

.explore-card {
  border: 1px solid rgba(16, 38, 58, 0.10);
  border-radius: 0;
  background: linear-gradient(180deg, #fffdfb 0%, #f7f3ee 100%);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.explore-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.12);
}

.explore-card .card-body {
  padding: 1.4rem;
}

.explore-kicker {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8c4f24;
  font-weight: 700;
  margin-bottom: 0.65rem;
}

.explore-card h3 {
  margin-bottom: 0.7rem;
  line-height: 1.35;
}

.explore-card h3 a {
  color: #10263a;
  text-decoration: none;
}

.explore-card h3 a:hover {
  color: #8c4f24;
  text-decoration: none;
}

.explore-card .explore-visual {
  height: 84px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(16, 38, 58, 0.08);
  background: linear-gradient(135deg, #efe5d7 0%, #e2d2bd 100%);
}

.explore-card .explore-visual::before {
  content: "";
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  opacity: 0.22;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.explore-card .explore-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(255,255,255,0.20), rgba(255,255,255,0));
}

.explore-card-ships .explore-visual {
  background: linear-gradient(135deg, #d8e3ea 0%, #b8c9d5 100%);
}

.explore-card-battles .explore-visual {
  background: linear-gradient(135deg, #e7d7c0 0%, #cfb08c 100%);
}

.explore-card-timelines .explore-visual {
  background: linear-gradient(135deg, #d7ddd3 0%, #b8c2b2 100%);
}

.explore-card-monuments .explore-visual {
  background: linear-gradient(135deg, #e5ddd4 0%, #cbb8a5 100%);
}

.explore-card-artifacts .explore-visual {
  background: linear-gradient(135deg, #ead9cb 0%, #d3b39c 100%);
}

.explore-card-shipwrecks .explore-visual {
  background: linear-gradient(135deg, #d3dee3 0%, #a8bcc7 100%);
}

.explore-card-ships .explore-visual::before {
  background-image: url("/static/images/icons/ships.png");
}

.explore-card-battles .explore-visual::before {
  background-image: url("/static/images/icons/battles.png");
}

.explore-card-timelines .explore-visual::before {
  background-image: url("/static/images/icons/timelines.png");
}

.explore-card-monuments .explore-visual::before {
  background-image: url("/static/images/icons/monuments.png");
}

.explore-card-artifacts .explore-visual::before {
  background-image: url("/static/images/icons/artifacts.png");
}

.explore-card-shipwrecks .explore-visual::before {
  background-image: url("/static/images/icons/shipwrecks.png");
}

.featured-timelines-section {
  position: relative;
  padding: 3.25rem 0;
  background:
    linear-gradient(180deg, rgba(28, 26, 24, 0.82), rgba(20, 18, 16, 0.88)),
    linear-gradient(90deg, #4a3424 0%, #6a4a2f 18%, #5a3f28 35%, #3b2a1d 100%);
  border-top: 4px solid #8f6a2a;
  border-bottom: 4px solid #8f6a2a;
  overflow: hidden;
}

.featured-timelines-heading {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #f3e6bf;
  margin-bottom: 2.5rem;
}

.featured-timelines-heading h2 {
  margin-bottom: 0.75rem;
  font-weight: 700;
  color: beige;
}

.featured-timelines-heading p {
  max-width: 760px;
  margin: 0 auto;
  color: rgba(243, 230, 191, 0.82);
}

.featured-timelines-section .container-fluid {
  padding-left: 3rem;
  padding-right: 3rem;
}

.gunport-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
  align-items: stretch;
  width: 100%;
}

.gunport-slot {
  display: flex;
  justify-content: center;
  width: 100%;
}

.gunport-card {
  display: flex;
  position: relative;
  width: 100%;
  max-width: 240px;
  aspect-ratio: 1 / 1;
  min-height: 0;
  padding: 14px;
  background: linear-gradient(180deg, #8a6239 0%, #674528 100%);
  border: 4px solid #4a2d18;
  box-shadow:
    inset 0 0 0 2px #c79b56,
    inset 0 0 0 6px #8a6239,
    0 10px 20px rgba(0, 0, 0, 0.26);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin: 0 auto;
  overflow: hidden;
}

.gunport-card:hover {
  transform: translateY(-4px);
  box-shadow:
    inset 0 0 0 2px #d4ab66,
    inset 0 0 0 6px #8a6239,
    0 16px 28px rgba(0, 0, 0, 0.34);
  text-decoration: none;
}

.gunport-card::before,
.gunport-card::after {
  content: "";
  position: absolute;
  top: -6px;
  width: 34px;
  height: 10px;
  background: linear-gradient(180deg, #1a1a1a 0%, #000000 100%);
  border: 1px solid #000000;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.05),
    0 1px 5px rgba(0,0,0,0.35);
  z-index: 3;
}

.gunport-card::before {
  left: 26%;
  transform: translateX(-50%);
  border-radius: 3px 3px 0 0;
}

.gunport-card::after {
  left: 74%;
  transform: translateX(-50%);
  border-radius: 3px 3px 0 0;
}

.gunport-bg {
  position: absolute;
  inset: 14px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 1;
  z-index: 1;
}

.gunport-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(10, 13, 17, 0.15) 0%, rgba(10, 13, 17, 0.65) 100%),
    linear-gradient(to bottom, rgba(10, 13, 17, 0.30), rgba(10, 13, 17, 0.72));
}

.gunport-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  padding: 1.1rem 1rem;
  background: rgba(24, 20, 16, 0.30);
  border: 3px solid #c39a4a;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.42);
  color: #f3e6bf;
  text-align: center;
  display: grid;
  grid-template-rows: 1.2rem 3.6rem 1fr;
  align-content: start;
  justify-items: center;
  backdrop-filter: blur(0.6px);
}

.gunport-label {
  width: 100%;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #d9bd79;
  margin: 0 0 0.8rem 0;
  line-height: 1.2;
}

.gunport-title {
  width: 100%;
  color: #fff1c8;
  margin: 0 0 0.75rem 0;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.01em;
  text-shadow:
    0 2px 6px rgba(0, 0, 0, 0.42),
    0 6px 12px rgba(0, 0, 0, 0.18);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  text-align: center;
}

.gunport-text {
  width: 100%;
  color: rgba(243, 230, 191, 0.94);
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  text-align: center;
}

.gunport-card-fleet .gunport-inner {
  border-color: #d8b56a !important;
}

.gunport-card-fleet .gunport-label {
  color: #edd08c !important;
}

.gunport-card-battles .gunport-inner {
  border-color: #cf8754 !important;
}

.gunport-card-battles .gunport-label {
  color: #e8ab7b !important;
}

.gunport-card-people .gunport-inner {
  border-color: #d9c48a !important;
}

.gunport-card-people .gunport-label {
  color: #f0deac !important;
}

.gunport-card-technology .gunport-inner {
  border-color: #b89f73 !important;
}

.gunport-card-technology .gunport-label {
  color: #d7c39d !important;
}

.lower-section-heading {
  text-align: center;
  margin-bottom: 2rem;
}

.lower-section-heading h2 {
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.lower-section-heading p {
  color: #5c6a75;
  margin-bottom: 0;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.home-feature-section,
.featured-monuments-section {
  position: relative;
}

.home-feature-section {
  padding: 0.75rem 0 1rem 0;
}

.home-feature-card {
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(16, 38, 58, 0.10);
  border-radius: 0;
  background: linear-gradient(180deg, #fffdfb 0%, #f7f3ee 100%);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.12);
}

.home-feature-card .card-img-wrap {
  position: relative;
  overflow: hidden;
}

.home-feature-card .card-img-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(16, 38, 58, 0.22), rgba(16, 38, 58, 0.04));
  pointer-events: none;
}

.home-feature-card .card-img-top {
  height: 230px;
  width: 100%;
  object-fit: cover;
  display: block;
}

.home-feature-card .card-body {
  padding: 1.25rem 1.25rem 1.35rem 1.25rem;
}

.home-feature-kicker {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8c4f24;
  font-weight: 700;
  margin-bottom: 0.65rem;
}

.home-feature-card h3 {
  margin-bottom: 0.7rem;
  line-height: 1.35;
}

.home-feature-card h3 a {
  color: #10263a;
  text-decoration: none;
}

.home-feature-card h3 a:hover {
  color: #8c4f24;
  text-decoration: none;
}

.home-feature-meta {
  color: #6f5a4a;
  margin-bottom: 0;
  line-height: 1.5;
}

.home-feature-meta strong {
  color: #8c4f24;
}

.home-feature-section-ships .lower-section-heading h2,
.home-feature-section-battles .lower-section-heading h2 {
  position: relative;
  display: inline-block;
  padding-bottom: 0.35rem;
}

.home-feature-section-ships .lower-section-heading h2::after,
.home-feature-section-battles .lower-section-heading h2::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 64px;
  height: 2px;
  transform: translateX(-50%);
}

.home-feature-section-ships .lower-section-heading h2::after {
  background: #6f8da3;
}

.home-feature-section-battles .lower-section-heading h2::after {
  background: #b87333;
}

.home-feature-section-ships .home-feature-kicker {
  color: #5d7f95;
}

.home-feature-section-battles .home-feature-kicker {
  color: #a55f2e;
}

.home-feature-section-ships .home-feature-card .card-img-top {
  filter: saturate(0.92) contrast(0.98);
}

.home-feature-section-battles .home-feature-card .card-img-top {
  filter: saturate(0.96) contrast(1.02);
}

.home-feature-section-ships .home-feature-card .card-img-wrap::after,
.home-feature-section-ships .card-img-wrap::after {
  background:
    linear-gradient(to top, rgba(36, 64, 86, 0.20), rgba(36, 64, 86, 0.04)),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0));
}

.home-feature-section-battles .home-feature-card .card-img-wrap::after,
.home-feature-section-battles .card-img-wrap::after {
  background:
    linear-gradient(to top, rgba(96, 52, 24, 0.24), rgba(96, 52, 24, 0.05)),
    linear-gradient(to bottom, rgba(255, 244, 232, 0.03), rgba(255, 244, 232, 0));
}

.featured-monuments-section {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: 4rem 0 3rem 0;
  margin-bottom: 0 !important;
  background:
    linear-gradient(180deg, rgba(224, 184, 142, 0.92), rgba(205, 155, 112, 0.94)),
    linear-gradient(90deg, #efd0ac 0%, #dca874 45%, #c98d58 100%);
  border-top: 4px solid #d39a5f;
  border-bottom: 0;
}

.featured-monuments-heading {
  color: #5a2f16;
}

.featured-monuments-heading h2 {
  color: #4a2410;
  font-weight: 700;
}

.featured-monuments-heading p {
  color: rgba(90, 47, 22, 0.82);
}

.featured-monuments-section .container-fluid {
  padding-left: 3rem;
  padding-right: 3rem;
  padding-bottom: 1rem;
}

.monuments-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  width: 100%;
}

.monument-slot {
  width: 100%;
}

.monument-card {
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(111, 61, 28, 0.35);
  border-radius: 0;
  background: linear-gradient(180deg, #fffaf5 0%, #f4e5d6 100%);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.monument-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.24);
}

.monument-card .card-img-wrap {
  position: relative;
  overflow: hidden;
  background: #ead8c5;
}

.monument-card .card-img-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(74, 36, 16, 0.18), rgba(74, 36, 16, 0.03)),
    linear-gradient(to bottom, rgba(255, 248, 240, 0.04), rgba(255, 248, 240, 0));
  pointer-events: none;
}

.monument-card .card-img-top {
  height: 220px;
  width: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.92) contrast(0.96);
}

.monument-card .card-body {
  padding: 1.3rem 1.25rem 1.45rem 1.25rem;
}

.monument-card .monument-kicker {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8c4f24;
  font-weight: 700;
  margin-bottom: 0.65rem;
}

.monument-card h3 {
  margin-bottom: 0.7rem;
  line-height: 1.35;
}

.monument-card h3 a {
  color: #3f2414;
  text-decoration: none;
}

.monument-card h3 a:hover {
  color: #8c4f24;
  text-decoration: none;
}

.monument-card .monument-location {
  color: #6f5a4a;
  margin-bottom: 0;
}

.monument-card .monument-location strong {
  color: #8c4f24;
}

/* -------------------------
   Responsive
   ------------------------- */
@media (max-width: 1399.98px) {
  /* reserved for future global widescreen adjustments */
}

@media (max-width: 1199.98px) {
  /* reserved for future global tablet-large adjustments */
}

@media (max-width: 991.98px) {
  .broker-width {
    width: 92%;
  }

  .site-header {
    position: relative;
  }

  .site-header .container {
    min-height: auto;
  }

  .site-branding-title {
    font-size: 1.1rem;
  }

  .site-branding-tagline {
    font-size: 0.8rem;
  }

  .main-nav {
    padding-top: 0.75rem;
    padding-bottom: 0.25rem;
  }

  .main-nav .nav-link {
    padding: 0.7rem 0;
  }

  .main-nav .nav-link.active::after,
  .main-nav .nav-item.active > .nav-link::after,
  .main-nav .show > .nav-link::after {
    left: 0;
    right: auto;
    width: 40px;
    bottom: 0.2rem;
  }

  .main-nav .dropdown-menu {
    border-radius: 8px;
    box-shadow: none;
    margin-top: 0.35rem;
  }

  .footer-main {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding-top: 3rem;
  }

  .footer-links-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 2rem;
  }

  .footer-brand p {
    max-width: 100%;
  }

  .rnh-page-header {
    padding: 2.5rem 0 1.75rem;
  }

  .rnh-page-body {
    padding: 2.25rem 0 3rem;
  }

  .rnh-richtext {
    font-size: 1rem;
    line-height: 1.8;
  }

  .rnh-article-header {
    padding-top: 1rem;
  }

  .rnh-article-body {
    font-size: 1rem;
    line-height: 1.8;
  }

  .rnh-web-hero-overlay {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }

  .rnh-web-page-header {
    padding-top: 2.25rem;
    padding-bottom: 1.6rem;
  }

  .start-here-section {
    padding-bottom: 1.5rem;
  }

  .gunport-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
  }

  .monuments-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .featured-timelines-section {
    padding: 3rem 0;
  }

  .gunport-card {
    min-height: 220px;
  }
}

@media (max-width: 575.98px) {
  .footer-links-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-legal {
    gap: 0.85rem 1rem;
  }

  .gunport-row {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .featured-monuments-section .container-fluid {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .monuments-grid {
    grid-template-columns: 1fr;
  }

  .featured-monuments-section {
    padding: 3rem 0 1rem 0;
  }
}

@media (min-width: 1200px) {
  h1, .h1 {
    font-size: 2.5rem;
  }

  h2, .h2 {
    font-size: 2rem;
  }

  h3, .h3 {
    font-size: 1.75rem;
  }

  h4, .h4 {
    font-size: 1.5rem;
  }
}


/* -------------------------
   Pure Wagtail compatibility
   ------------------------- */

.rnh-wide-container {
  max-width: 1320px;
  margin-left: auto;
  margin-right: auto;
}

.rnh-page-layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 2rem;
  align-items: start;
}

.rnh-page-main {
  min-width: 0;
}

.rnh-page-sidebar {
  min-width: 0;
}

.rnh-detail-header {
  max-width: 900px;
}

.rnh-detail-title {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: #10263a;
}

.rnh-detail-intro {
  margin-top: 1rem;
  max-width: 760px;
  color: #5f7281;
  font-size: 1.05rem;
  line-height: 1.75;
}

.rnh-section-overline,
.rnh-archive-kicker {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8c4f24;
  font-weight: 700;
  margin-bottom: 0.65rem;
}

.rnh-archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
  gap: 1.5rem;
}

.rnh-archive-card,
.rnh-sidebar-panel,
.rnh-detail-panel {
  border: 1px solid rgba(16, 38, 58, 0.10);
  border-radius: 0;
  background: linear-gradient(180deg, #fffdfb 0%, #f7f3ee 100%);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.rnh-archive-card-body,
.rnh-sidebar-panel-body,
.rnh-detail-panel-body {
  padding: 1.25rem;
}

.rnh-archive-card-title a {
  color: #10263a;
  text-decoration: none;
  border-bottom: none;
}

.rnh-archive-card-title a:hover,
.rnh-archive-card-title a:focus {
  color: #8c4f24;
  text-decoration: none;
}

.rnh-archive-card-text {
  color: #6a5748;
  line-height: 1.65;
}

.rnh-sidebar-list {
  list-style: none;
  padding-left: 0;
}

.rnh-sidebar-list li {
  margin-bottom: 0.5rem;
}

.rnh-sidebar-facts dt {
  color: #10263a;
  font-weight: 700;
}

.rnh-sidebar-facts dd {
  color: #5f7281;
  margin-bottom: 0.75rem;
}

.rnh-empty-state {
  border: 1px dashed rgba(16, 38, 58, 0.18);
  background: #fffdfb;
  padding: 1.5rem;
}

@media (max-width: 991.98px) {
  .rnh-page-layout-grid {
    grid-template-columns: 1fr;
  }
}