/* =========================================================
   SAFFRAN WYATT-ALLEMAND
   Cassiopeia Custom CSS
   ========================================================= */


/* ---------------------------------------------------------
   1. COLOUR AND LAYOUT VARIABLES
   --------------------------------------------------------- */

:root {
  --swa-white: #ffffff;
  --swa-page: #fbfbfb;
  --swa-text: #555555;
  --swa-heading: #4f4f4f;
  --swa-muted: #777777;
  --swa-border: #dddddd;
  --swa-border-soft: #ededed;
  --swa-yellow: #ead000;

  --swa-container: 1050px;
  --swa-content: 960px;
  --swa-radius: 4px;

  --swa-serif: Georgia, "Times New Roman", Times, serif;
  --swa-sans: Arial, Helvetica, sans-serif;
}


/* ---------------------------------------------------------
   2. GLOBAL RESET
   --------------------------------------------------------- */

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--swa-page);
  color: var(--swa-text);
  font-family: var(--swa-serif);
  font-size: 16px;
  line-height: 1.42;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover,
a:focus {
  color: var(--swa-heading);
  text-decoration: none;
}

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

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

ul,
ol {
  margin-top: 0;
  margin-bottom: 1rem;
}


/* ---------------------------------------------------------
   3. HEADINGS
   --------------------------------------------------------- */

h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
  margin-top: 0;
  color: var(--swa-heading);
  font-family: var(--swa-serif);
  font-weight: 400;
  line-height: 1.2;
}

h1,
.h1 {
  margin-bottom: 0.55rem;
  font-size: clamp(1.8rem, 3vw, 2.45rem);
}

h2,
.h2 {
  margin-bottom: 0.65rem;
  font-size: clamp(1.55rem, 2.4vw, 2rem);
}

h3,
.h3 {
  margin-bottom: 0.6rem;
  font-size: 1.35rem;
}

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

h5,
.h5,
h6,
.h6 {
  font-size: 1rem;
}


/* ---------------------------------------------------------
   4. OUTER SITE WRAPPER
   Keep Cassiopeia's native grid so sidebars remain positioned
   --------------------------------------------------------- */

.site-grid {
  width: min(calc(100% - 40px), var(--swa-container));
  margin: 20px auto 0;
  padding: 0 42px;
  background: var(--swa-white);
  border: 1px solid var(--swa-border);
  border-radius: var(--swa-radius);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.025);
}

/*
Do not add:
display: block;
overflow: hidden;

Cassiopeia needs its original display:grid structure
to position the component and sidebars.
*/

.grid-child {
  width: 100%;
  max-width: none;
}


/* ---------------------------------------------------------
   5. HEADER
   --------------------------------------------------------- */

.container-header {
  position: relative;
  z-index: 20;
  margin: 0;
  background: var(--swa-white);
  background-image: none;
  color: var(--swa-text);
  box-shadow: none;
}

.container-header .grid-child {
  width: 100%;
  max-width: none;
}

.container-header .container-topbar,
.container-header .container-below-top {
  padding-right: 0;
  padding-left: 0;
}


/* ---------------------------------------------------------
   6. LANGUAGE SELECTOR
   --------------------------------------------------------- */

.container-header .container-topbar {
  display: block;
  padding-top: 25px;
  padding-bottom: 5px;
  color: var(--swa-text);
  font-family: var(--swa-serif);
  font-size: 0.95rem;
}

.container-topbar .mod-languages {
  margin: 0;
}

.container-topbar .mod-languages p,
.container-topbar .mod-languages .lang-label {
  margin-bottom: 0.4rem;
}

.mod-languages ul {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mod-languages li {
  margin: 0;
}

.mod-languages img {
  display: block;
  width: auto;
  max-width: 22px;
  height: auto;
  border: 0;
  box-shadow: none;
}


/* ---------------------------------------------------------
   7. LOGO / BRAND AREA
   --------------------------------------------------------- */

.container-header .navbar-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 12px 0 22px;
  padding: 0;
  text-align: center;
}

.container-header .navbar-brand a {
  display: inline-block;
}

.container-header .navbar-brand img {
  display: block;
  width: auto;
  max-width: min(100%, 430px);
  max-height: none;
  margin: 0 auto;
}

.container-header .site-description {
  margin-top: 0.15rem;
  color: #777777;
  font-family: var(--swa-serif);
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.15;
}


/* Text-based brand fallback */

.container-header .navbar-brand .brand-logo {
  color: var(--swa-heading);
  font-family: var(--swa-serif);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 400;
  line-height: 1;
}

.container-header .navbar-brand .brand-tagline {
  display: block;
  margin-top: 0.1rem;
  color: #777777;
  font-family: var(--swa-serif);
  font-size: 1.05rem;
}


/* ---------------------------------------------------------
   8. MAIN NAVIGATION
   --------------------------------------------------------- */

.container-header .container-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  padding: 0;
  background: transparent;
  border-bottom: 1px solid var(--swa-border-soft);
}

.container-header .container-nav nav {
  width: 100%;
}

.container-header .navbar {
  width: 100%;
  padding: 0;
}

.container-header .mod-menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.container-header .mod-menu > li {
  position: relative;
  margin: 0;
  padding: 0;
}

.container-header .mod-menu > li > a,
.container-header .mod-menu > li > span,
.container-header .mod-menu > li > .nav-header {
  display: block;
  padding: 14px 15px 13px;
  color: #6d6d6d;
  font-family: var(--swa-sans);
  font-size: 0.89rem;
  font-weight: 400;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0;
  white-space: nowrap;
}

.container-header .mod-menu > li > a:hover,
.container-header .mod-menu > li > a:focus,
.container-header .mod-menu > li.active > a,
.container-header .mod-menu > li.current > a {
  color: #404040;
  background: transparent;
}

.container-header .mod-menu > li.active > a::after,
.container-header .mod-menu > li.current > a::after {
  content: "";
  position: absolute;
  right: 15px;
  bottom: -1px;
  left: 15px;
  height: 1px;
  background: #999999;
}


/* ---------------------------------------------------------
   9. DROPDOWN MENUS
   --------------------------------------------------------- */

.container-header .mod-menu .metismenu.mod-menu .mm-collapse {
  background: var(--swa-white);
}

.container-header .mod-menu .metismenu.mod-menu .mm-collapse > li > a {
  color: var(--swa-text);
}

.metismenu.mod-menu .metismenu-item > ul {
  min-width: 220px;
  padding: 8px 0;
  background: var(--swa-white);
  border: 1px solid var(--swa-border);
  border-radius: 0;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.08);
}

.metismenu.mod-menu .metismenu-item > ul > li > a,
.metismenu.mod-menu .metismenu-item > ul > li > span {
  display: block;
  padding: 9px 15px;
  color: var(--swa-text);
  font-family: var(--swa-sans);
  font-size: 0.84rem;
  font-weight: 400;
  text-transform: none;
}

.metismenu.mod-menu .metismenu-item > ul > li > a:hover,
.metismenu.mod-menu .metismenu-item > ul > li > a:focus {
  color: #333333;
  background: #f6f6f6;
}


/* ---------------------------------------------------------
   10. BREADCRUMBS
   --------------------------------------------------------- */

.breadcrumb {
  justify-content: center;
  margin: -1px 0 0;
  padding: 0 0 7px;
  background: transparent;
  border-bottom: 1px solid var(--swa-border-soft);
  border-radius: 0;
  color: #777777;
  font-family: var(--swa-serif);
  font-size: 0.78rem;
}

.breadcrumb-item {
  color: #777777;
}

.breadcrumb-item + .breadcrumb-item::before {
  color: #aaaaaa;
}


/* ---------------------------------------------------------
   11. MAIN CONTENT AREA
   --------------------------------------------------------- */

.container-component {
  width: 100%;
  margin: 0;
  padding: 52px 18px 34px;
}

main {
  min-width: 0;
}

.com-content-article,
.blog,
.blog-featured,
.category-list {
  width: 100%;
}

.item-page {
  width: 100%;
}

.page-header {
  margin-bottom: 0;
  border: 0;
}


/* ---------------------------------------------------------
   12. HOME PAGE INTRO LAYOUT
   --------------------------------------------------------- */

/*
   Suggested HTML:

   <div class="swa-intro">
     <div class="swa-intro__content">...</div>
     <div class="swa-intro__image">...</div>
   </div>
*/

.swa-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 215px;
  gap: 42px;
  align-items: start;
  width: 100%;
}

.swa-intro__content {
  min-width: 0;
  padding-top: 27px;
}

.swa-intro__content h1,
.swa-intro__content h2 {
  margin-bottom: 0.55rem;
}

.swa-intro__content p {
  max-width: 690px;
}

.swa-intro__image {
  width: 100%;
}

.swa-intro__image img {
  display: block;
  width: 100%;
  aspect-ratio: 0.69;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(100%);
}


/* Alternative generic image-right Joomla layout */

.swa-image-right {
  float: right;
  width: 215px;
  margin: 0 0 25px 42px;
}

.swa-image-right img {
  display: block;
  width: 100%;
  filter: grayscale(100%);
}


/* ---------------------------------------------------------
   13. HOMEPAGE LOCATION TEXT
   --------------------------------------------------------- */

.swa-locations {
  margin: 15px auto 0;
  padding-top: 0;
  text-align: center;
  color: #444444;
  font-size: 0.98rem;
  line-height: 1.8;
}

.swa-locations p {
  margin-bottom: 0.2rem;
}


/* ---------------------------------------------------------
   14. ARTICLE CONTENT
   --------------------------------------------------------- */

.article-info {
  color: var(--swa-muted);
  font-size: 0.85rem;
}

.item-page ul,
.item-page ol {
  padding-left: 1.3rem;
}

.item-page li {
  margin-bottom: 0.4rem;
}

blockquote {
  position: relative;
  margin: 1.75rem 0;
  padding: 0.9rem 1.4rem;
  color: #555555;
  font-family: var(--swa-serif);
  font-size: 1.15rem;
  font-style: italic;
  border-left: 2px solid var(--swa-yellow);
}


/* ---------------------------------------------------------
   15. BUTTONS
   --------------------------------------------------------- */

.btn,
button,
input[type="submit"],
input[type="button"] {
  border-radius: 0;
  font-family: var(--swa-sans);
  font-weight: 400;
  box-shadow: none;
}

.btn-primary {
  padding: 9px 18px;
  color: #444444;
  background: var(--swa-yellow);
  border: 1px solid var(--swa-yellow);
}

.btn-primary:hover,
.btn-primary:focus {
  color: #222222;
  background: #dbc300;
  border-color: #dbc300;
}


/* ---------------------------------------------------------
   16. FORMS
   --------------------------------------------------------- */

.form-control,
.form-select,
input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
  color: var(--swa-text);
  background: var(--swa-white);
  border: 1px solid #cccccc;
  border-radius: 0;
  font-family: var(--swa-serif);
  box-shadow: none;
}

.form-control:focus,
.form-select:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
  border-color: #999999;
  box-shadow: none;
}


/* ---------------------------------------------------------
   17. SIDEBARS
   --------------------------------------------------------- */

.container-sidebar-left,
.container-sidebar-right {
  padding-top: 52px;
}

.card,
.moduletable {
  border-radius: 0;
  box-shadow: none;
}

.card {
  border-color: var(--swa-border-soft);
}


/* ---------------------------------------------------------
   18. FOOTER
   --------------------------------------------------------- */

.container-footer {
  display: block;
  width: min(calc(100% - 40px), var(--swa-container));
  margin: 16px auto 0;
  padding: 0 20px 32px;
  color: #686868;
  background: transparent;
  background-image: none;
  box-shadow: none;
}

.container-footer .grid-child {
  display: block;
  width: 100%;
  max-width: none;
  padding: 18px 0 0;
  border-top: 1px solid var(--swa-border-soft);
}

.container-footer .moduletable,
.container-footer .mod-custom {
  margin-bottom: 0;
}

.swa-footer {
  color: #666666;
  font-family: var(--swa-serif);
  font-size: 0.95rem;
  line-height: 1.35;
}

.swa-footer p {
  margin-bottom: 0.5rem;
}

.swa-footer strong {
  color: #555555;
}

.swa-footer__credit {
  margin-top: 12px;
  font-size: 0.65rem;
}

.swa-footer__bottom {
  margin-top: 38px;
}

.swa-footer__bottom p {
  margin-bottom: 0.45rem;
}

.swa-footer a:hover {
  color: #333333;
}


/* ---------------------------------------------------------
   19. COOKIE BUTTON
   --------------------------------------------------------- */

#cookiehintsubmit,
.cookiehintsubmit,
.cc-revoke,
.cc-window .cc-btn,
.cookie-policy-button {
  color: #ffffff !important;
  background: #050505 !important;
  border: 0 !important;
  border-radius: 4px !important;
  font-family: var(--swa-sans) !important;
  font-size: 0.78rem !important;
  font-weight: 400 !important;
  box-shadow: none !important;
}


/* ---------------------------------------------------------
   20. CASSIOPEIA BACK TO TOP
   --------------------------------------------------------- */

.back-to-top-link {
  right: 1rem;
  bottom: 1rem;
  color: #555555;
  background: var(--swa-white);
  border: 1px solid var(--swa-border);
  border-radius: 0;
  box-shadow: none;
}

.back-to-top-link:hover,
.back-to-top-link:focus {
  color: #222222;
  background: #f5f5f5;
}


/* ---------------------------------------------------------
   21. MOBILE NAVBAR TOGGLER
   Includes Font Awesome fallback
   --------------------------------------------------------- */

.container-header .navbar-toggler {
  width: 44px;
  height: 40px;
  margin: 0 auto 12px;
  padding: 5px 8px;
  color: #555555;
  background: var(--swa-white);
  border: 1px solid #bdbdbd;
  border-radius: 0;
  box-shadow: none;
}

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

.container-header .navbar-toggler-icon {
  position: relative;
  display: block;
  width: 24px;
  height: 20px;
  margin: 0 auto;
  background-image: none !important;
}

.container-header .navbar-toggler-icon::before {
  content: "\f0c9";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555555;
  font-family: "Font Awesome 6 Free";
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
}

/* CSS-only fallback if Font Awesome is unavailable */

.container-header .navbar-toggler-icon::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 1px;
  left: 1px;
  height: 2px;
  background: #555555;
  box-shadow:
    0 6px 0 #555555,
    0 12px 0 #555555;
  z-index: -1;
}


/* ---------------------------------------------------------
   22. TABLET
   --------------------------------------------------------- */

@media (max-width: 991.98px) {

  .site-grid {
    width: min(calc(100% - 24px), var(--swa-container));
    margin-top: 12px;
    padding-right: 28px;
    padding-left: 28px;
  }

  .container-header .navbar-brand {
    margin-bottom: 16px;
  }

  .container-header .container-nav {
    display: block;
    padding-bottom: 8px;
  }

  .container-header .navbar-toggler {
    display: block;
  }

  .container-header .navbar-collapse {
    width: 100%;
  }

  .container-header .mod-menu {
    display: block;
    width: 100%;
    padding: 8px 0;
  }

  .container-header .mod-menu > li {
    width: 100%;
    border-top: 1px solid var(--swa-border-soft);
  }

  .container-header .mod-menu > li:last-child {
    border-bottom: 1px solid var(--swa-border-soft);
  }

  .container-header .mod-menu > li > a,
  .container-header .mod-menu > li > span,
  .container-header .mod-menu > li > .nav-header {
    padding: 11px 8px;
    text-align: center;
  }

  .container-header .mod-menu > li.active > a::after,
  .container-header .mod-menu > li.current > a::after {
    display: none;
  }

  .metismenu.mod-menu .metismenu-item > ul {
    position: static;
    width: 100%;
    min-width: 0;
    border-right: 0;
    border-left: 0;
    box-shadow: none;
  }

  .swa-intro {
    grid-template-columns: minmax(0, 1fr) 190px;
    gap: 30px;
  }

  .swa-image-right {
    width: 190px;
    margin-left: 30px;
  }
}


/* ---------------------------------------------------------
   23. MOBILE
   --------------------------------------------------------- */

@media (max-width: 767.98px) {

  body {
    font-size: 15px;
  }

  .site-grid {
    width: calc(100% - 16px);
    margin-top: 8px;
    padding-right: 18px;
    padding-left: 18px;
  }

  .container-header .container-topbar {
    padding-top: 18px;
    text-align: center;
  }

  .mod-languages ul {
    justify-content: center;
  }

  .container-header .navbar-brand {
    margin-top: 18px;
    margin-bottom: 18px;
  }

  .container-header .navbar-brand img {
    max-width: 320px;
  }

  .container-header .site-description {
    font-size: 0.95rem;
  }

  .container-component {
    padding: 34px 4px 28px;
  }

  .breadcrumb {
    padding-top: 5px;
    font-size: 0.72rem;
  }

  .swa-intro {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  .swa-intro__content {
    order: 1;
    padding-top: 0;
  }

  .swa-intro__image {
    order: 2;
    width: min(100%, 280px);
    margin: 0 auto;
  }

  .swa-intro__image img {
    aspect-ratio: auto;
  }

  .swa-image-right {
    float: none;
    width: min(100%, 280px);
    margin: 0 auto 25px;
  }

  .swa-locations {
    margin-top: 28px;
  }

  .container-footer {
    width: calc(100% - 16px);
    padding-right: 10px;
    padding-left: 10px;
  }

  .swa-footer__bottom {
    margin-top: 28px;
  }
}


/* ---------------------------------------------------------
   24. SMALL MOBILE
   --------------------------------------------------------- */

@media (max-width: 480px) {

  .site-grid {
    padding-right: 14px;
    padding-left: 14px;
  }

  .container-header .navbar-brand img {
    max-width: 270px;
  }

  .container-header .mod-menu > li > a,
  .container-header .mod-menu > li > span,
  .container-header .mod-menu > li > .nav-header {
    font-size: 0.82rem;
  }

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

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