/* css/base.css */

:root {
  --color-primary: #1A2B4C;       /* Deep Navy */
  --color-accent: #00A8E6;        /* Cyber Blue */
  --color-neutral: #6C757D;       /* Steel Gray */
  --color-tertiary: #4A5568;      /* Slate Blue */
  --color-success: #28A745;       /* Success Green */
  --color-warning: #FF6B35;       /* Alert Orange */
  --color-bg: #FFFFFF;            /* White */
  --color-bg-soft: #F8F9FA;       /* Off-White */
  --color-text: #333C48;          /* Slightly softened navy for body text */
  --color-border: #d1d5db;        /* slightly off white for borders */
  --color-border-dark: #b0b6c2;   /* slightly darker version */
  --color-heading: var(--color-primary);
  --color-muted: #6b7280;         /* A modern muted grey (Tailwind's gray-500) */
  --color-link: var(--color-accent);

/* colours for generic use */

  --color-white: #ffffff;         /* always pure white in case the BG changes */
  --color-black: #000000;         /* always black */
  --color-off-white: #e0e0e0;     /* for shading borders */
  --color-dark-grey: #111111;     /* dark grey */
  --color-mid-grey: #333333;      /* light grey */
}

/* ----------------------------------
   Layout & Global Structure
---------------------------------- */

/* Container utility */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Grid helper (if needed later) */
.grid {
  display: grid;
  gap: 2rem;
}

/* Hidden content */
.hide, 
.confirmation {
    display: none;
}

.invisible, 
.confirmation {
    visibility: hidden;
}

/* Responsive image defaults */
img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Visually hidden but accessible */
.visually-hidden {
  position: absolute;
  clip: rect(1px, 1px, 1px, 1px);
  padding: 0;
  margin: -1px;
  height: 1px;
  width: 1px;
  overflow: hidden;
  border: 0;
}

/* Button base */
.btn {
  display: inline-block;
  padding: 0.75em 1.25em;
  background-color: var(--color-mid-grey);
  color: var(--color-white);
  border: none;
  text-align: center;
  text-decoration: none;
  border-radius: 0.25rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.btn:hover,
.btn:focus {
  background-color: var(--color-dark-grey);
  outline: none;
}

/* Typography defaults */
body {
  font-family: system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
}

h1, h2, h3, h4 {
  color: var(--color-heading);
  margin-top: 0;
  margin-bottom: 0.5em;
  font-weight: 600;
  line-height: 1.25;
}

a {
  color: var(--color-link);
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
  color: darken(var(--color-link), 10%);
}

/* Container & Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Utility Buttons */
.btn {
  background-color: var(--color-accent);
  color: var(--color-white);
  padding: 0.75em 1.25em;
  border: none;
  border-radius: 0.25rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.btn:hover,
.btn:focus {
  background-color: #008bbf; /* darker shade of Cyber Blue */
}

/* Muted text */
.text-muted {
  color: var(--color-muted);
}

/* ----------------------------------
   Repatable Content
---------------------------------- */
/* ----------------------------------
   Header
---------------------------------- */
.site-header {
  /* background-color: var(--color-primary); */
  background: linear-gradient(to right, #133649 10%, #375766 40%); /*gradient to try and match the logo */
  color: var(--color-white);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* padding: 1rem;*/
}

.logo {
  display: block;
  /* width: 440px; */
  width: clamp(120px, 100vw, 440px);
  height: 70px;
  background-image: url('/img/small_banner_logo_narrow.jpg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: left center;
  text-indent: -9999px;
  overflow: hidden;
  color: transparent;
  white-space: nowrap;
}

.site-logo {
    margin: 0;
}

/* .logo img {
  max-height: 48px;
} */

.nav-toggle {
  background: none;
  border: none;
  color: var(--color-white);
  font-size: 1.25rem;
  display: none; /* visible only on small screens */
}

.site-nav {
  display: flex;
  flex-direction: row;
}

.site-nav__list {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__list > li {
  position: relative;
}

.site-nav__list a {
  color: var(--color-white);
  font-weight: 500;
  transition: opacity 0.3s ease;
}

.site-nav__list a:hover,
.site-nav__list a:focus {
  opacity: 0.8;
}

/* Position dropdown menus */
.site-nav__list .dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--color-bg);
  border: 1px solid #ccc;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  min-width: 220px;
  z-index: 100;
}

.dropdown {
  display: block;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.has-dropdown:hover > .dropdown,
.has-dropdown:focus-within > .dropdown,
.has-dropdown.open > .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}


.site-nav__list .has-dropdown > a {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.has-dropdown:hover .fa-chevron-down,
.has-dropdown:focus-within .fa-chevron-down {
  transform: rotate(180deg);
  transition: transform 0.2s ease-in-out;
}


.site-nav__list li:hover > .dropdown,
.site-nav__list li:focus-within > .dropdown {
  display: block;
}

/* Dropdown links */
.dropdown li {
  display: block;
}

.dropdown a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--color-primary);
  white-space: nowrap;
}

.dropdown a:hover {
  background-color: var(--color-bg-soft);
}

/* Mobile Nav Toggle Breakpoint */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none; /* JS can toggle this */
    flex-direction: column;
    background-color: var(--color-primary);
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
  }

  .site-nav__list {
    flex-direction: column;
    padding: 1rem;
  }
  .site-nav.is-open {
    display: flex;
  }

  .dropdown {
    position: static;
    box-shadow: none;
    border: none;
  }

  .site-nav__list > li {
    width: 100%;
  }
}

/* ----------------------------------
   Footer
---------------------------------- */

.site-footer {
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: 2.5rem 1.5rem;
  font-size: 0.95rem;
}

.site-footer a {
  color: var(--color-accent);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  align-items: flex-start;
  max-width: 1200px;
  margin: 0 auto;
}

.site-footer .footer-info {
  flex: 1 1 300px;
}

.site-footer .footer-links {
  flex: 1 1 300px;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: flex-end;
}

/* vCard print-only section */
.printOnly {
  display: none;
}

.footer-column {
  flex: 1 1 300px;
  min-width: 260px;
}

.footer-logo {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 0;
  padding-top: 0;
  margin-bottom: 1rem;
  line-height: 1.3;
  display: flex;
  align-items: left;
}

.footer-nav ul,
.contact-list,
.social-links {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.footer-nav li,
.contact-list li,
.social-links li {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-nav a,
.contact-list a,
.social-links a {
  color: var(--color-accent);
  text-decoration: none;
}

.footer-info,
.footer-links {
  flex: 1 1 300px;
}

.footer-info address {
  font-style: normal;
  line-height: 1.6;
  color: var(--color-bg-soft);
}

.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--color-white);
  text-decoration: underline;
}

.footer-nav a:hover,
.contact-list a:hover,
.social-links a:hover {
  color: var(--color-white);
  text-decoration: underline;
}

.copy {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--color-muted);
}

.footer-heading {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-bg-soft);
}

.footer-tagline {
  font-size: 0.95rem;
  color: var(--color-muted);
  margin-bottom: 1rem;
}

/* Optional fine print or legal note */
.site-footer small {
  display: block;
  margin-top: 2rem;
  color: var(--color-muted);
  font-size: 0.85rem;
  text-align: center;
}

@media (max-width: 768px) {
  .site-footer .container {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-column {
    width: 100%;
  }

  .footer-links ul {
    padding-left: 0;
  }
}

/* ----------------------------------
  Global Breadcrumbs
---------------------------------- */

.breadcrumbs {
  /* 
  background-color: var(--color-border);
  color: var(--color-text);
  */
  background-color: #375766;
  border: 1px solid var(--color-border-dark); /* Slightly darker than var(--color-border) */
  border-radius: 4px;
  padding: 0.75rem 1.25rem;
  margin: 1.5rem auto 2.5rem;
  max-width: 1200px;
  box-sizing: border-box;
  font-size: 0.95rem;
  color: var(--color-white);
}

.breadcrumbs nav {
  width: 100%;
}

.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  margin: 0;
}

.breadcrumbs li::after {
  content: "›";
  margin: 0 0.5rem;
  color: var(--color-muted);
}

.breadcrumbs li:last-child::after {
  content: "";
  margin: 0;
}

.breadcrumbs a {
  text-decoration: none;
  /* color: var(--color-accent); */
  color: var(--color-bg);
}

.breadcrumbs a:hover {
  text-decoration: underline;
  color: var(--color-white);
  background-color: var(--color-accent);
}