/**
 * Heritage Blue — Drupal 11 Theme
 * Inspired by Bartik. Montserrat + Playfair Display typography,
 * dark blue colour scheme, sidebar navigation.
 *
 * Colour palette:
 *   --hb-navy:        #1a2a4a  (deepest dark blue — header, footer)
 *   --hb-blue:        #1e3a6e  (primary dark blue — sidebar, headings)
 *   --hb-mid:         #2c5282  (mid blue — accents, borders)
 *   --hb-accent:      #3a7bd5  (bright blue — links, highlights)
 *   --hb-light:       #e8f0fb  (pale blue — backgrounds, alternating rows)
 *   --hb-border:      #b8960c  (gold — borders, labels)
 */

/* =====================================================================
   0. CSS Custom Properties
   ===================================================================== */
:root {
  --hb-navy:          #1a2a4a;
  --hb-blue:          #1e3a6e;
  --hb-mid:           #2c5282;
  --hb-accent:        #3a7bd5;
  --hb-accent-hover:  #2563b0;
  --hb-light:         #e8f0fb;
  --hb-warm:          #ffffff;
  --hb-white:         #ffffff;
  --hb-text:          #1a1a2e;
  --hb-text-light:    #4a5568;
  --hb-border:        #c5d5ea;
  --hb-highlight:     #fff8e1;

  --hb-font:          'Montserrat', 'Segoe UI', Arial, sans-serif;
  --hb-font-heading:  'Playfair Display', 'Georgia', 'Times New Roman', serif;
  --hb-mono:          'Courier New', Courier, monospace;

  --hb-sidebar-w:     240px;
  --hb-content-max:   1520px;
  --hb-radius:        4px;
  --hb-shadow:        0 2px 8px rgba(30, 58, 110, 0.12);
}

/* =====================================================================
   1. Reset / Base
   ===================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--hb-font);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--hb-text);
  background-color: var(--hb-warm);
}

/* =====================================================================
   2. Typography
   ===================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--hb-font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--hb-blue);
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
}

h1 { font-size: 2.25rem; font-weight: 700; font-variant: small-caps; }
h2 { font-size: 1.75rem; font-weight: 600; }
h3 { font-size: 1.4rem;  font-weight: 600; }
h4 { font-size: 1.15rem; font-weight: 600; font-family: var(--hb-font); }
h5 { font-size: 1rem;    font-weight: 600; font-family: var(--hb-font); }
h6 { font-size: 0.9rem;  font-weight: 600; font-family: var(--hb-font); }

p { margin: 0 0 1rem; }

a {
  color: var(--hb-accent);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover, a:focus {
  color: var(--hb-accent-hover);
  text-decoration: underline;
}
a:focus {
  outline: 2px solid var(--hb-accent);
  outline-offset: 2px;
}

abbr[title] { cursor: help; border-bottom: 1px dotted var(--hb-text-light); }

blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  border-left: 4px solid var(--hb-accent);
  background: var(--hb-light);
  border-radius: 0 var(--hb-radius) var(--hb-radius) 0;
  font-style: italic;
  color: var(--hb-text-light);
}

pre, code, kbd, samp {
  font-family: var(--hb-mono);
  font-size: 0.9em;
}
pre {
  background: var(--hb-navy);
  color: #e2e8f0;
  padding: 1rem 1.25rem;
  border-radius: var(--hb-radius);
  overflow-x: auto;
  margin: 0 0 1rem;
}
code {
  background: var(--hb-light);
  color: var(--hb-mid);
  padding: 0.15em 0.4em;
  border-radius: 3px;
}
pre code { background: none; color: inherit; padding: 0; }

hr {
  border: none;
  border-top: 2px solid var(--hb-border);
  margin: 2rem 0;
}

/* Lists */
ul, ol { margin: 0 0 1rem 1.5rem; padding: 0; }
li { margin-bottom: 0.25rem; }

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
}
th {
  background: var(--hb-blue);
  color: var(--hb-white);
  font-weight: 600;
  text-align: left;
  padding: 0.6rem 0.8rem;
}
td {
  padding: 0.5rem 0.8rem;
  border-bottom: 1px solid var(--hb-border);
}
tr:nth-child(even) td { background: var(--hb-light); }
tr:hover td { background: #dce8f8; }

/* Images */
img { max-width: 100%; height: auto; display: block; }
figure { margin: 0 0 1.5rem; }
figcaption {
  font-size: 0.85rem;
  color: var(--hb-text-light);
  margin-top: 0.4rem;
  font-style: italic;
  text-align: center;
}

/* Forms */
input, textarea, select, button {
  font-family: var(--hb-font);
  font-size: 1rem;
}
input[type="text"],
input[type="email"],
input[type="search"],
input[type="password"],
input[type="url"],
textarea,
select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--hb-border);
  border-radius: var(--hb-radius);
  background: var(--hb-white);
  color: var(--hb-white);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--hb-accent);
  box-shadow: 0 0 0 3px rgba(58, 123, 213, 0.2);
}
label {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 600;
  color: var(--hb-blue);
}
.form-item { margin-bottom: 1.25rem; }

/* =====================================================================
   3. Buttons
   ===================================================================== */
.button,
button,
input[type="submit"],
input[type="button"],
input[type="reset"] {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  background: var(--hb-accent);
  color: var(--hb-white);
  border: none;
  border-radius: var(--hb-radius);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.1s ease;
  line-height: 1.4;
}
.button:hover,
button:hover,
input[type="submit"]:hover {
  background: var(--hb-accent-hover);
  color: var(--hb-white);
  text-decoration: none;
  transform: translateY(-1px);
}
.button--secondary {
  background: var(--hb-white);
  color: var(--hb-blue);
  border: 2px solid var(--hb-blue);
}
.button--secondary:hover {
  background: var(--hb-light);
  color: var(--hb-blue);
}

/* =====================================================================
   4. Page Layout — Sidebar-left navigation model
   ===================================================================== */

#page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ── */
#header {
  background: linear-gradient(to bottom, #1a2a4a 0%, #1e3a6e 100%);
  color: var(--hb-white);
  padding: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  position: relative;
  z-index: 100;
}

.header-inner {
  max-width: var(--hb-content-max);
  margin: 0;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.header-secondary-menu {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.header-secondary-menu a {
  color: #a8c4e8;
  font-size: 0.85rem;
}
.header-secondary-menu a:hover { color: var(--hb-white); }

/* ── Body: sidebar + main ── */
#main-wrapper {
  flex: 1 1 auto;
  display: flex;
  max-width: var(--hb-content-max);
  margin: 0;
  width: 100%;
}

/* ── Sidebar ── */
#sidebar-nav {
  width: var(--hb-sidebar-w);
  flex-shrink: 0;
  background: var(--hb-blue);
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 80px);
}

#sidebar-nav .sidebar-inner {
  padding: 1.5rem 0;
  position: sticky;
  top: 0;
}

.sidebar-nav-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7a9cc8;
  padding: 0 1.2rem 0.6rem;
  margin: 0;
}

/* Primary navigation menu in sidebar */
#sidebar-nav nav ul,
#sidebar-nav .menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

#sidebar-nav nav ul li,
#sidebar-nav .menu__item {
  margin: 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

#sidebar-nav nav ul a,
#sidebar-nav .menu__link {
  display: block;
  padding: 0.7rem 1.2rem;
  color: #c8ddf5;
  font-size: 0.92rem;
  font-weight: 400;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, padding-left 0.15s ease;
  border-left: 3px solid transparent;
}

#sidebar-nav nav ul a:hover,
#sidebar-nav .menu__link:hover,
#sidebar-nav nav ul a:focus,
#sidebar-nav .menu__link:focus {
  background: rgba(255,255,255,0.1);
  color: var(--hb-white);
  border-left-color: var(--hb-accent);
  padding-left: 1.5rem;
  text-decoration: none;
}

#sidebar-nav .menu__item--active-trail > .menu__link,
#sidebar-nav nav ul .is-active,
#sidebar-nav nav ul a.is-active {
  background: rgba(58, 123, 213, 0.3);
  color: var(--hb-white);
  border-left-color: #7ab3ff;
  font-weight: 600;
}

#sidebar-nav ul ul,
#sidebar-nav .menu ul {
  background: rgba(0,0,0,0.15);
}
#sidebar-nav ul ul a,
#sidebar-nav .menu ul .menu__link {
  padding-left: 2rem;
  font-size: 0.87rem;
  color: #a0bfdf;
}
#sidebar-nav ul ul a:hover,
#sidebar-nav .menu ul .menu__link:hover {
  padding-left: 2.3rem;
  color: var(--hb-white);
}

/* Sidebar first block area */
#sidebar-first {
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 1rem;
}

/* Inputs inside the sidebar */
#sidebar-nav input[type="text"],
#sidebar-nav input[type="search"],
#sidebar-nav input[type="email"],
#sidebar-nav input[type="password"],
#sidebar-nav textarea,
#sidebar-nav select {
  padding: 0.45rem 0.75rem;
  margin: 0 1.2rem;
  width: calc(100% - 2.4rem);
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--hb-white);
  border-radius: var(--hb-radius);
}

#sidebar-nav input::placeholder {
  color: #a0bfdf;
}

#sidebar-nav input:focus,
#sidebar-nav textarea:focus {
  background: rgba(255,255,255,0.18);
  border-color: var(--hb-accent);
  outline: none;
  box-shadow: 0 0 0 2px rgba(58, 123, 213, 0.4);
}

#sidebar-nav .form-submit,
#sidebar-nav input[type="submit"] {
  margin: 0.05rem 1.2rem 0;
  width: calc(100% - 2.4rem);
}

/* ── Main content column ── */
#main-content-area {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Highlighted / messages */
#highlighted {
  padding: 0;
  font-size: 0.95rem;
}
#highlighted:not(:empty) {
  padding: 0.75rem 1.5rem;
}

/* Help */
#help { padding: 0.5rem 1.5rem; }

/* Breadcrumb */
#breadcrumb {
  padding: 0.5rem 1.5rem;
  background: transparent;
  border-bottom: none;
  font-size: 0.85rem;
  color: var(--hb-text-light);
  line-height: 1.4;
  position: relative;
}

#breadcrumb .block,
#breadcrumb .contextual-region {
  margin: 0;
  padding: 0;
}

#breadcrumb .block {
  margin-bottom: 0;
}

#breadcrumb .block__title {
  display: none;
}

#breadcrumb .contextual {
  visibility: hidden;
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
}
#breadcrumb .contextual-region:hover .contextual,
#breadcrumb .contextual-region:focus-within .contextual {
  visibility: visible;
}

#breadcrumb nav.breadcrumb {
  display: block;
  margin: 0 !important;
  padding: 0.35rem 1rem !important;
  background: linear-gradient(to right, var(--hb-light), var(--hb-white));
  border: 1px solid var(--hb-border);
  border-radius: 6px;
}
#breadcrumb ol, #breadcrumb ul, #breadcrumb .breadcrumb__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem; align-items: center; }
#breadcrumb li::after { content: '›'; margin-left: 0.25rem; color: var(--hb-text-light); }
#breadcrumb li:last-child::after { content: ''; }
#breadcrumb a { color: var(--hb-mid); }
#breadcrumb a:hover { color: var(--hb-accent); }

/* Content + sidebar-second layout */
#content-wrapper {
  flex: 1 1 auto;
  display: flex;
  gap: 0;
  align-items: flex-start;
}

#content {
  flex: 1 1 auto;
  padding: 2rem 2rem 2rem 1.75rem;
  min-width: 0;
}

#sidebar-second {
  width: 240px;
  flex-shrink: 0;
  padding: 2rem 1rem 2rem 0.5rem;
  background: rgba(255,255,255,0.12);
  border-left: 1px solid var(--hb-border);
}

/* =====================================================================
   5. Blocks in sidebars
   ===================================================================== */
.block {
  margin-bottom: 1.5rem;
}

#sidebar-second .block__title {
  font-size: 1.1rem;
  font-weight: 700;
  font-family: var(--hb-font-heading);
  color: var(--hb-blue);
  border-bottom: 2px solid var(--hb-accent);
  padding-bottom: 0.3rem;
  margin-bottom: 0.75rem;
}

#sidebar-nav .block__title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7a9cc8;
  padding: 0 1.2rem 0.4rem;
  margin: 0;
}

/* =====================================================================
   6. Footer
   ===================================================================== */
#footer {
  background: var(--hb-navy);
  color: #8aa8cc;
  padding: 2.5rem 0 1.5rem;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--hb-content-max);
  margin: 0;
  padding: 0 1.5rem;
}

.footer-columns {
  display: grid;
  grid-template-columns: 25% 75%;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-column .block__title {
  font-size: 0.95rem;
  font-weight: 700;
  font-family: var(--hb-font-heading);
  letter-spacing: 0.02em;
  color: #c0d4ec;
  margin-bottom: 0.75rem;
}

#footer a { color: #8aa8cc; }
#footer a:hover { color: #c0d4ec; text-decoration: underline; }

#footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
#footer ul li { margin-bottom: 0.35rem; font-size: 0.88rem; }

.footer-bottom-region,
.footer-bottom-default {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1rem;
  font-size: 0.85rem;
  color: #8aa8cc;
}

.footer-bottom-region .block__title {
  font-size: 0.85rem;
  font-family: var(--hb-font-heading);
  color: #c0d4ec;
  margin-bottom: 0.4rem;
}

/* Site branding block */
.site-branding,
.block-system-branding-block {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.site-branding .site-logo,
.block-system-branding-block .site-logo {
  flex-shrink: 0;
}

.site-branding .site-logo img,
.block-system-branding-block .site-logo img {
  height: 50px;
  width: auto;
  display: block;
}

.site-branding .site-text,
.block-system-branding-block .site-text {
  min-width: 0;
}

.site-branding .site-name {
  margin: 0;
  font-size: 1.85rem;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.1;
  font-family: var(--hb-font-heading);
  letter-spacing: -0.01em;
}

.site-branding .site-name a {
  color: var(--hb-white);
  text-decoration: none;
}

.site-branding .site-name a:hover {
  color: #b8d0f8;
  text-decoration: none;
}

.site-branding .site-slogan {
  color: #a8c4e8;
  font-size: 0.9rem;
  font-weight: 300;
  margin: 0.15rem 0 0;
  letter-spacing: 0.02em;
}

/* =====================================================================
   7. Messages / Status
   ===================================================================== */
.messages {
  padding: 0.8rem 1rem 0.8rem 3rem;
  border-radius: var(--hb-radius);
  margin: 0 0 1rem;
  font-size: 0.95rem;
  position: relative;
}
.messages::before {
  position: absolute;
  left: 0.9rem;
  top: 0.85rem;
  font-size: 1.1rem;
}
.messages--status  { background: #e6f4ea; border: 1px solid #a8d5b0; color: #1e5631; }
.messages--warning { background: #fff8e1; border: 1px solid #f0c040; color: #7a5800; }
.messages--error   { background: #fdecea; border: 1px solid #f5a8a3; color: #7a1a1a; }
.messages--status::before  { content: '✓'; color: #2e7d32; }
.messages--warning::before { content: '⚠'; color: #e65100; }
.messages--error::before   { content: '✕'; color: #c62828; }

/* =====================================================================
   8. Node / Article styling
   ===================================================================== */
article.node {
  margin-bottom: 2.5rem;
}
.node__title {
  margin-bottom: 0.25rem;
}
.node__meta {
  font-size: 0.82rem;
  color: var(--hb-text-light);
  margin-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}
.node__meta a { color: var(--hb-text-light); }
.node__meta a:hover { color: var(--hb-accent); }

.view-mode--teaser {
  border-bottom: 1px solid var(--hb-border);
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
}

.field--name-field-tags .field__label,
.field--name-field-tags .field__items {
  display: inline;
}
.field--name-field-tags .field__item {
  display: inline-block;
  background: var(--hb-light);
  border: 1px solid var(--hb-border);
  border-radius: 2rem;
  padding: 0.15rem 0.65rem;
  font-size: 0.8rem;
  margin: 0.1rem;
}

/* =====================================================================
   8a. Primary & Secondary Tabs
   ===================================================================== */

.tabs-wrapper {
  margin: 0 0 1.5rem;
  padding: 0;
  border-bottom: 1px solid var(--hb-border);
  background: transparent;
}

ul.tabs,
ul.tabs.primary,
ul.tabs.secondary,
ul.tabs--primary,
ul.tabs--secondary,
.tabs-wrapper > ul {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  flex-wrap: wrap;
  align-items: flex-end;
  background: transparent;
  border: none;
}

ul.tabs li,
ul.tabs.primary li,
ul.tabs--primary li,
.tabs__tab,
.tabs-wrapper > ul li {
  margin: 0 3px 0 0 !important;
  padding: 0 !important;
  list-style: none !important;
  float: none !important;
}

ul.tabs li a,
ul.tabs.primary li a,
ul.tabs--primary li a,
a.tabs__link,
.tabs-wrapper > ul li a {
  display: block !important;
  padding: 0.5rem 1.1rem !important;
  font-family: var(--hb-font) !important;
  font-size: 0.88rem !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  color: var(--hb-mid) !important;
  text-decoration: none !important;
  background: var(--hb-light) !important;
  border: 1px solid var(--hb-border) !important;
  border-bottom: none !important;
  border-radius: var(--hb-radius) var(--hb-radius) 0 0 !important;
  position: relative;
  bottom: -1px;
  transition: background 0.15s ease, color 0.15s ease;
}

ul.tabs li a:hover,
ul.tabs.primary li a:hover,
ul.tabs--primary li a:hover,
a.tabs__link:hover,
.tabs-wrapper > ul li a:hover {
  background: var(--hb-white) !important;
  color: var(--hb-blue) !important;
  border-color: var(--hb-border) !important;
  border-bottom: none !important;
  text-decoration: none !important;
}

ul.tabs li.is-active a,
ul.tabs li a.is-active,
ul.tabs.primary li.is-active a,
ul.tabs.primary li a.active,
ul.tabs--primary li a.is-active,
.tabs__tab.is-active a.tabs__link,
a.tabs__link.is-active,
.tabs-wrapper > ul li a[aria-current],
.tabs-wrapper > ul li a.is-active {
  background: var(--hb-white) !important;
  color: var(--hb-blue) !important;
  border-color: var(--hb-border) !important;
  border-bottom: 1px solid var(--hb-white) !important;
  font-weight: 700 !important;
}

ul.tabs.secondary,
ul.tabs--secondary {
  margin: 0 0 1.25rem !important;
  padding: 0.5rem 0 !important;
  border-bottom: 1px solid var(--hb-border) !important;
  gap: 0.3rem;
  align-items: center;
}

ul.tabs.secondary li,
ul.tabs--secondary li {
  margin: 0 !important;
}

ul.tabs.secondary li a,
ul.tabs--secondary li a {
  display: inline-block !important;
  padding: 0.25rem 0.8rem !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  color: var(--hb-mid) !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  border-radius: 2rem !important;
  bottom: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

ul.tabs.secondary li a:hover,
ul.tabs--secondary li a:hover {
  background: var(--hb-light) !important;
  color: var(--hb-blue) !important;
  border-color: var(--hb-border) !important;
}

ul.tabs.secondary li.is-active a,
ul.tabs.secondary li a.active,
ul.tabs.secondary li a.is-active,
ul.tabs--secondary li a.is-active {
  background: var(--hb-blue) !important;
  color: var(--hb-white) !important;
  border-color: var(--hb-blue) !important;
}

/* =====================================================================
   9. Pager
   ===================================================================== */

nav.pager {
  margin: 2rem 0;
  text-align: center;
}

.pager__items {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.25rem;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.pager__item {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.pager__item a,
.pager__current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2rem;
  padding: 0.4rem 0.7rem;
  font-family: var(--hb-font);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1;
  border: 1px solid var(--hb-border);
  border-radius: var(--hb-radius);
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.pager__item a {
  color: var(--hb-accent);
  background: var(--hb-white);
}

.pager__item a:hover {
  background: var(--hb-light);
  border-color: var(--hb-accent);
  color: var(--hb-accent-hover);
  text-decoration: none;
}

.pager__item--current .pager__current {
  background: var(--hb-blue);
  color: var(--hb-white);
  border-color: var(--hb-blue);
  cursor: default;
}

.pager__item--first a,
.pager__item--previous a,
.pager__item--next a,
.pager__item--last a {
  color: var(--hb-mid);
  font-weight: 400;
  font-size: 0.85rem;
  min-width: auto;
  padding: 0.4rem 0.8rem;
}

.pager__item--first a:hover,
.pager__item--previous a:hover,
.pager__item--next a:hover,
.pager__item--last a:hover {
  color: var(--hb-blue);
  background: var(--hb-light);
  border-color: var(--hb-border);
}

/* =====================================================================
   10. Search
   ===================================================================== */
.search-form .form--inline {
  display: flex;
  gap: 0.5rem;
}
.search-form input[type="search"] {
  flex: 1 1 auto;
}
.search-results .search-result {
  border-bottom: 1px solid var(--hb-border);
  padding: 1rem 0;
}
.search-result__title { margin-bottom: 0.2rem; }
.search-result__snippet { color: var(--hb-text-light); font-size: 0.9rem; }

/* =====================================================================
   11. Mobile hamburger toggle
   ===================================================================== */
.nav-toggle {
  display: none;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--hb-white);
  padding: 0.4rem 0.8rem;
  border-radius: var(--hb-radius);
  cursor: pointer;
  font-size: 0.9rem;
}

/* =====================================================================
   12. Responsive
   ===================================================================== */

@media (max-width: 899px) {
  .footer-columns {
    grid-template-columns: 25% 75%;
  }
  #sidebar-second {
    width: 200px;
  }
}

@media (max-width: 767px) {
  :root { --hb-sidebar-w: 100%; }

  .nav-toggle { display: inline-block; }

  #main-wrapper {
    flex-direction: column;
  }

  #sidebar-nav {
    width: 100%;
    min-height: auto;
    order: -1;
  }

  #sidebar-nav .sidebar-inner {
    position: static;
    padding: 0;
  }

  #sidebar-nav nav,
  #sidebar-nav .menu {
    display: none;
  }
  #sidebar-nav.is-open nav,
  #sidebar-nav.is-open .menu {
    display: block;
  }

  #sidebar-nav nav ul a,
  #sidebar-nav .menu__link {
    padding: 0.75rem 1rem;
    border-left: none;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  #sidebar-nav nav ul a:hover,
  #sidebar-nav .menu__link:hover {
    padding-left: 1rem;
  }

  #content-wrapper {
    flex-direction: column;
  }

  #sidebar-second {
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--hb-border);
    padding: 1.5rem;
  }

  #content {
    padding: 1.25rem;
  }

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

  .header-inner {
    padding: 1rem;
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-bottom-region,
  .footer-bottom-default {
    text-align: center;
  }
}

/* =====================================================================
   13. Skip link (accessibility)
   ===================================================================== */
.visually-hidden.focusable:focus,
.skip-link:focus {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 9999;
  padding: 0.5rem 1rem;
  background: var(--hb-accent);
  color: var(--hb-white);
  border-radius: var(--hb-radius);
  font-weight: 600;
}

/* =====================================================================
   14. Print
   ===================================================================== */
@media print {
  #sidebar-nav, #sidebar-second, #footer, #header .header-secondary-menu { display: none; }
  #main-wrapper { display: block; }
  #content { padding: 0; }
  body { background: white; color: black; }
  a[href]::after { content: ' (' attr(href) ')'; font-size: 0.8em; color: #666; }
}

/* =====================================================================
   15. Views & Custom Block overrides
   ===================================================================== */

.custom-block {
  margin-bottom: 2em;
}

.custom-block .views-field {
  padding: 0.25em 0;
  border-bottom: 1px solid #eee;
}

.custom-block .views-label {
  color: var(--hb-accent);
  font-size: 0.75em;
  float: left;
}

.custom-block .field-content {
  margin-left: 20%;
}

.custom-block .field-content p {
  margin: 0;
}

.custom-block a {
  text-decoration: none;
}

.custom-block a:hover {
  text-decoration: underline;
}

.custom-block .edit-link {
  font-size: 0.6em;
  float: right;
}

.block__title {
  font-size: 1.25em;
  font-family: var(--hb-font-heading);
  border-bottom: 2px solid var(--hb-border);
  padding-bottom: 0.3em;
  margin-bottom: 0.75em;
}

.attribution {
  font-size: 75%;
  text-align: center;
  color: var(--hb-text-light);
}

.custom-list {
  margin-bottom: 2em;
}

.custom-list .view-content {
  display: block;
}

.custom-list .views-row {
  padding: 0.25em 0;
  border-bottom: 1px solid #eee;
}

.custom-list .id-style {
  font-size: 0.75em;
  color: var(--hb-accent);
}

.page-title {
  font-size: 2rem;
  font-family: var(--hb-font-heading);
  font-weight: 700;
  color: var(--hb-blue);
}

b, strong {
  font-weight: 700;
}

/* =====================================================================
   16. Layout Builder — responsive two-column stacking
   ===================================================================== */

/* Gutter between columns */
.layout--twocol-section .layout__region--second,
.layout--twocol-section--67-33 .layout__region--second,
.layout--twocol-section--75-25 .layout__region--second {
  padding-left: 2rem;
}

/* Mobile: stack columns — html body prefix beats Drupal inline styles */
@media (max-width: 768px) {
  html body .layout--twocol-section .layout__region,
  html body .layout--twocol-section--67-33 .layout__region,
  html body .layout--twocol-section--75-25 .layout__region {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    padding-left: 0 !important;
  }
}

/* =====================================================================
   17. Contextual links
   ===================================================================== */

#sidebar-nav .contextual-region {
  position: relative;
}

#sidebar-nav .contextual .trigger {
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
}

#sidebar-nav .contextual-links {
  background: var(--hb-white);
  border: 1px solid var(--hb-border);
  border-radius: var(--hb-radius);
  box-shadow: var(--hb-shadow);
  list-style: none;
  margin: 0;
  padding: 0.25rem 0;
  min-width: 160px;
  white-space: nowrap;
  z-index: 1000;
}

#sidebar-nav .contextual-links li { margin: 0; padding: 0; }

#sidebar-nav .contextual-links a {
  display: block;
  padding: 0.4rem 0.9rem;
  font-size: 0.82rem;
  color: var(--hb-white);
  text-decoration: none;
}

#sidebar-nav .contextual-links a:hover {
  background: var(--hb-light);
  color: var(--hb-blue);
}

/* =====================================================================
   18. Views Exposed Filter Form
   ===================================================================== */

.views-exposed-form {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.views-exposed-form .form-type-textfield,
.views-exposed-form .js-form-type-textfield {
  display: flex;
  flex-direction: column;
  width: auto;
  margin-bottom: 0;
}

.views-exposed-form .form-type-textfield input[type="text"],
.views-exposed-form .js-form-type-textfield input[type="text"] {
  width: 280px;
}

.views-exposed-form .form-type-textfield .description,
.views-exposed-form .js-form-type-textfield .description {
  font-size: 0.78rem;
  color: var(--hb-text-light);
  margin-top: 0.25rem;
}

.views-exposed-form .form-actions {
  display: flex;
  align-items: flex-end;
  margin: 0;
  padding: 0;
  width: auto;
}

.views-exposed-form .form-actions input[type="submit"] {
  margin: 0;
  padding: 0.49rem 1.25rem;
  white-space: nowrap;
  height: 2.35rem;
}
