:root {
  --cassiopeia-color-primary: #6E20A0;
}

a,
.btn-primary,
.nav-link,
.navbar-brand {
  color: darkgrey !important;
}

.btn-primary,
.nav-link:hover {
  background-color: white !important;
  border-color: lightgrey !important;
}

/* Hessian header background – stretched */
header.header,
.site-header,
.header {
  background-image: url("https://scoutwiki.scouts.org.za/w/images/6/69/Hessian_brown.png");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
}

/* Optional: ensure any existing background-color doesn't cover it */
header.header,
.site-header,
.header {
  background-color: transparent;
}

/* --- Main menu bar directly below header --- */
.menu-bar {
  background: #622599;
}

/* Ensure the menu container spans full width and looks like a bar */
.menu-bar .container,
.menu-bar .container-fluid {
  padding-top: 0;
  padding-bottom: 0;
}

/* Link styling */
.menu-bar .mod-menu a,
.menu-bar .mod-menu .nav-link {
  color: #fff;
  padding: 0.9rem 1rem;
  font-weight: 600;
}

.menu-bar .mod-menu a:hover,
.menu-bar .mod-menu .nav-link:hover,
.menu-bar .mod-menu .nav-link:focus {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

/* Active item */
.menu-bar .mod-menu .active > a,
.menu-bar .mod-menu .active > .nav-link {
  background: rgba(0,0,0,0.18);
  color: #fff;
}

/* Remove any default borders/shadows */
.menu-bar .navbar,
.menu-bar nav {
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
}

/* --- Main menu bar directly below header --- */
.menu-bar {
  background: #622599;
}

/* Ensure the menu container spans full width and looks like a bar */
.menu-bar .container,
.menu-bar .container-fluid {
  padding-top: 0;
  padding-bottom: 0;
}

/* Link styling */
.menu-bar .mod-menu a,
.menu-bar .mod-menu .nav-link {
  color: #fff;
  padding: 0.9rem 1rem;
  font-weight: 600;
}

.menu-bar .mod-menu a:hover,
.menu-bar .mod-menu .nav-link:hover,
.menu-bar .mod-menu .nav-link:focus {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

/* Active item */
.menu-bar .mod-menu .active > a,
.menu-bar .mod-menu .active > .nav-link {
  background: rgba(0,0,0,0.18);
  color: #fff;
}

/* Remove any default borders/shadows */
.menu-bar .navbar,
.menu-bar nav {
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
}

.site-description {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase; /* optional */
}


.site-description {
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
/* Site header title */
.site-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  text-transform: uppercase; /* optional */
}

/* Optional Scout-style contrast on hessian background */
.site-title {
  text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

/* Custom header title */
.header-title {
  font-size: 4rem;
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
  margin: 0;
}

/* Optional heritage feel */
.header-title {
  letter-spacing: 0.04em;
  text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}


/* Fix breadcrumbs floating over header/menu */
.container-breadcrumbs,
.breadcrumbs,
.mod-breadcrumbs {
  position: relative !important;
  top: auto !important;
  z-index: 1;
}
/* Ensure left sidebar/position sits above overlapping elements */
.sidebar-left,
#sidebar-left,
.container-sidebar-left,
aside.sidebar-left,
aside[class*="sidebar"],
[class*="sidebar"] {
  position: relative;
  z-index: 10;
}


.container-breadcrumbs,
.breadcrumbs,
.mod-breadcrumbs {
  position: relative !important;
  z-index: 1 !important;
}
/* ================================
   Footer Hessian Texture
================================ */
footer,
.site-footer,
.container-footer,
.footer {
  background-image: url("https://scoutwiki.scouts.org.za/w/images/4/48/Hessian_texture_purple.png");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  background-color: transparent;
}
  
/* Footer text contrast */
.site-footer,
.site-footer a,
.container-footer,
.container-footer a {
  color: #fff;
}

.site-footer a:hover {
  color: #e6d9f2;
  text-decoration: underline;
}

  /* Optional depth for footer */
.site-footer,
.container-footer {
  box-shadow: inset 0 8px 12px rgba(0,0,0,0.25);
}

  .site-footer,
.container-footer {
  padding-top: 2rem;
  padding-bottom: 2rem;
}
  /* Remove inner footer background */
.site-footer .container,
.container-footer .container {
  background: transparent;
}
 
/* Cassiopeia main menu background */
.container-header .navbar {
  background-color: #622599;
}

/* Ensure the menu itself inherits the color */
.container-header .mod-menu,
.container-header .mod-menu ul {
  background-color: #622599;
}

/* Menu links */
.container-header .mod-menu a {
  color: #ffffff;
}

/* Hover and focus states */
.container-header .mod-menu a:hover,
.container-header .mod-menu a:focus {
  color: #f2d9ff;
}

/* Active menu item */
.container-header .mod-menu .active > a,
.container-header .mod-menu a[aria-current="page"] {
  font-weight: 700;
  border-bottom: 2px solid #ffffff;
}

/* FORCE background on Cassiopeia menu position */
.container-nav,
.container-nav .navbar,
.container-nav .mod-menu,
.container-nav .mod-menu ul {
  background-color: #622599 !important;
}
/* ===== Main page content background (between header and footer) ===== */
.site-content,
body:not(.offline) .site-content {
  background-image: url("https://scoutwiki.scouts.org.za/w/images/0/03/Canvas_texture_cream_High_Res.png");
  background-repeat: repeat;
  background-position: top left;
  background-size: auto;
  background-attachment: scroll;
}

/* Remove white backgrounds that may cover the texture */
.site-content .container,
.site-content .container-fluid,
.site-content .component,
.site-content .card,
.site-content .card-body {
  background: transparent !important;
}

.site-content .card,
.site-content .content-item,
.site-content article {
  background-color: rgba(255, 255, 255, 0.85) !important;
}

/* ===== Smaller footer text ===== */
.site-footer,
.site-footer p,
.site-footer li,
.site-footer span,
.site-footer a,
.container-footer,
.container-footer p,
.container-footer li,
.container-footer span,
.container-footer a {
  font-size: 0.75rem;   /* slightly smaller than default */
  line-height: 1.4;
  margin-bottom: 0.2rem
}


/* ===== Reduce footer padding ===== */

.site-footer,
.container-footer {
  padding-top: 0.6rem !important;
  padding-bottom: 0.6rem !important;
}

.site-footer .moduletable,
.container-footer .moduletable {
  margin-bottom: 0.5rem;
}

.site-footer p {
  margin-bottom: 0.4rem;
}


/* =========================================
   Second logo (works whether navbar-brand is <a> or <div>)
========================================= */

/* Make the brand container a single row */
.navbar-brand,
a.navbar-brand {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
}

/* Add the second logo */
.navbar-brand::after,
a.navbar-brand::after {
  content: "" !important;
  display: inline-block !important;
  width: 175px !important;
  height: 175px !important;
  margin-left: 0.5rem !important;

  background-image: url("https://scouts.nashfam.org/images/Correct-Stitched-GR-Badge.png") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: contain !important;

  flex: 0 0 auto !important;
}
/* =========================================
   Fix small logo on mobile (Cassiopeia)
========================================= */

/* Phones & small tablets */
@media (max-width: 768px) {

  /* Main logo image */
  .navbar-brand img,
  a.navbar-brand img {
    height: 75px !important;   /* ← increase as needed */
    width: auto !important;
    max-height: none !important;
  }

  /* If branding text is present */
  .site-title {
    font-size: 1.2rem !important;
    line-height: 1.2;
  }

  .site-description {
    font-size: 0.9rem !important;
  }
}

/* =========================================
   Second logo: responsive sizing on mobile
========================================= */

/* Phones (portrait/most mobile devices) */
@media (max-width: 576px) {
  a.navbar-brand::after,
  .navbar-brand::after {
    width: 48px !important;
    height: 48px !important;
    margin-left: 0.4rem !important;
  }
}

/* Small tablets / large phones (landscape) */
@media (min-width: 577px) and (max-width: 768px) {
  a.navbar-brand::after,
  .navbar-brand::after {
    width: 70px !important;
    height: 70px !important;
    margin-left: 0.5rem !important;
  }
}

/* Optional: medium devices (tablets) */
@media (min-width: 769px) and (max-width: 992px) {
  a.navbar-brand::after,
  .navbar-brand::after {
    width: 90px !important;
    height: 90px !important;
  }
}

/* =========================================
   AG Stencil Font
========================================= */
@font-face {
  font-family: "AG Stencil";
  src:
    url("../fonts/AG-Stencil.tff") format("tff"),
    url("../fonts/AGStencil.woff") format("woff"),
    url("../fonts/AGStencil.woff2") format("woff2"),
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* =========================================
   Header Title – AG Stencil
========================================= */
.header-title {
  font-family: "AG Stencil", Impact, sans-serif;
  letter-spacing: 0.08em;     /* stencil fonts need breathing room */
  text-transform: uppercase; /* optional, looks great for Scouts */
}

@media (max-width: 768px) {
  .header-title {
    font-size: 1.6rem;   /* adjust as needed */
    letter-spacing: 0.06em;
  }
}

.header-title {
  text-shadow:
    0 2px 3px rgba(0,0,0,0.6),
    0 0 6px rgba(0,0,0,0.25);
}


/* =========================================
   Center header title text
========================================= */
.header-title {
  text-align: center;
  width: 100%;
}

/* Center the header title module itself */
.header-title {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* =========================================
   Header title & tagline – white text
   with thin purple outline
========================================= */
.header-title,
.site-title,
.site-description {
  color: #ffffff !important;

  /* Thin purple outline (best quality) */
  -webkit-text-stroke: 0.3px #622599;

  /* Fallback outline using shadows */
  text-shadow:
    1px  1px 0 #622599,
   -1px  1px 0 #622599,
    1px -1px 0 #622599,
   -1px -1px 0 #622599;
}

/* ==================================================
   Header branding layout:
   main logo LEFT, text CENTER, second logo RIGHT
================================================== */

/* Make the brand area a full-width flex container */
.navbar-brand,
a.navbar-brand {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
}

/* Main logo (first image) stays left */
.navbar-brand img,
a.navbar-brand img {
  flex: 0 0 auto;
  margin-right: 1rem;
}

/* Wrap title + tagline visually in the center */
.site-title,
.site-description,
.header-title {
  margin-left: auto;
  margin-right: auto;
  text-align: centre;
}

/* Secondary logo pushed to the far right */
.navbar-brand::after,
a.navbar-brand::after {
  content: "" !important;
  display: block !important;

  width: 80px;
  height: 80px;

  background-image: url("https://scouts.nashfam.org/images/Correct-Stitched-GR-Badge.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;

  margin-left: auto;   /* THIS pushes it to the right */
  flex: 0 0 auto;
}