/* ==========================================================================
   Hamburger Menu & Desktop Navigation Styles
   ========================================================================== */

/* 1. Default (Desktop/Tablet) State: Hide all hamburger menu elements */
.hamburger-menu {
  display: none !important;
}

/* 2. Media Query: Styles applied ONLY when screen width is 767px or less (Mobile) */
@media (max-width: 767px) {

  /* OVERRIDE: Show the main menu container on mobile */
  .hamburger-menu {
    position: relative;
    z-index: 9999;
    display: block;
    /* Important: makes the menu visible */
  }

  /* Hide the actual checkbox input */
  .menu-toggle {
    display: none;
  }

  /* Style the Hamburger Icon (the label) */
  .menu-icon {
    display: block;
    width: 30px;
    height: 25px;
    position: relative;
    cursor: pointer;
  }

  .bar {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #333;
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
  }

  /* Style the List of Links */
  .menu-links {
    list-style: none;
    padding: 0;
    margin: 0;
    position: absolute;
    width: 200px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    /* Start hidden, move off-screen */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow: hidden;
    z-index: 9999;
  }

  .menu-links li a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #ddd;
  }

  .menu-links li:last-child a {
    border-bottom: none;
  }

  .menu-links li a:hover {
    background-color: #e0e0e0;
  }

  /* Toggling the Menu: Slide the menu links into view */
  .menu-toggle:checked~.menu-links {
    opacity: 1;
    visibility: visible;
  }

  .menu-toggle:checked~.menu-icon .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .menu-toggle:checked~.menu-icon .bar:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle:checked~.menu-icon .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}

/* ==========================================================================
   Desktop Nav Visibility Rules
   ========================================================================== */

.desktop-nav {
  /* Hide the desktop navigation by default (on mobile screens) */
  display: none !important;
}

@media (max-width: 767px) {

  /* Mobile View: SHOW Hamburger, HIDE Desktop Nav */
  .hamburger-menu {
    display: block !important;
  }

  .desktop-nav {
    display: none !important;
  }
}

@media (min-width: 768px) {

  /* Desktop/Tablet View: HIDE Hamburger, SHOW Desktop Nav */
  .hamburger-menu {
    display: none !important;
  }

  .desktop-nav {
    display: flex !important;
    align-items: center;
    gap: 1.5rem;
  }

  .desktop-nav a {
    color: #333;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
  }

  .desktop-nav a:hover {
    background-color: #e6f0ff;
    color: #004d99;
  }
}

/* ==========================================================================
   Global Layout & Container Overrides (Extracted from inline blocks)
   ========================================================================== */

html {
  overflow-x: hidden !important;
}

body {
  max-width: 1000px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  overflow-x: visible !important;
}

.wp-site-blocks {
  max-width: 1000px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  overflow-x: visible !important;
}

header,
.wp-block-template-part {
  width: 100vw !important;
  max-width: 100vw !important;
  position: relative !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  padding: 0 5% !important;
  box-sizing: border-box !important;
  z-index: 9999 !important;
  /* FIX: Prevents logo from bleeding through menu */
}

.desktop-nav {
  justify-content: center !important;
  flex-wrap: wrap !important;
}

.alignfull,
.alignwide {
  max-width: 100% !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* ==========================================================================
   Home Page Top Banner Styling (Responsive & Ultra-wide Friendly)
   ========================================================================== */

.background-banner {
  background-image: url('./background-banner.avif');
  background-position: center;
  background-color: rgba(255, 50, 0, 0.8);
  background-blend-mode: darken;
  background-repeat: repeat-x;
  /* Repeats horizontally for ultra-wide screens */
  background-size: cover;
  /* Helps image span better */
  width: 100vw;
  /* Span full viewport width */
  max-width: 100vw;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  /* Break out of 1000px max-width body constraint */
  margin-top: 0 !important;
  /* Remove top margin so it's flush with the top */
  padding: 20px;
  color: black;
  text-align: left;
  box-sizing: border-box;
}

.background-banner h2 {
  font-size: clamp(1.2rem, 3vw, 2rem) !important;
  /* Fluid typography for responsiveness */
  margin: 0 !important;
  padding: 10px 0 !important;
}