/*! Modern CSS - Replaces Spry Framework and old grid system */

/* Flexbox-based layout system */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.flex-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

/* Header banner: match legacy .shtml visuals */
.header {
  background-image: url(/img/background/current/banner_bkgd.jpg);
  background-repeat: repeat-x;
}

.header .container {
  background-image: url(/img/background/current/banner_bkgd.jpg);
  background-repeat: repeat-x;
}

/* Banner navigation - right align the text */
.bannernav {
  text-align: right;
  float: right;
  padding-top: 20px;
  color: #112c4c;
  font-size: 10px;
  font-family: Arial, Helvetica, Verdana, sans-serif;
}

.bannernav a {
  color: #ffffff;
  text-decoration: none;
}

.bannernav a:visited {
  color: #ffffff;
}

.bannernav a:hover {
  color: #112c4c;
  text-decoration: none;
}

/* Modern Navigation Menu */
nav, .menu, .menu .container, nav .container {
  background-color: #cccccc;
  background-image: url(/img/background/current/topnav_bkgd.jpg);
  font-family: Arial, Helvetica, sans-serif;
  font-weight: bold;
  font-size: 12px;
  padding: 0;
}

nav,
.menu,
nav .container,
.menu .container {
  width: 100%;
  box-sizing: border-box;
}

/* Match the menu container background to the header container */
.menu .container {
  background-image: url(/img/background/current/banner_bkgd.jpg);
  background-repeat: repeat-x;
}

/* Ensure all nav/menu child divs and spans also have the topnav background */
nav div, nav span,
.menu div, .menu span,
nav .container div, nav .container span,
.menu .container div, .menu .container span {
  background-image: url(/img/background/current/topnav_bkgd.jpg);
  background-repeat: repeat-x;
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
}

/* Support menus wrapped in a .container inside <nav> or legacy .menu structure (legacy .html/.shtml files) */
nav .container > ul,
.menu .container > ul,
.menu > ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
}

nav > ul > li,
nav .container > ul > li,
.menu > ul > li,
.menu .container > ul > li {
  position: relative;
  flex: 0 1 auto;
}

nav > ul > li > a,
nav .container > ul > li > a,
.menu > ul > li > a,
.menu .container > ul > li > a {
  display: block;
  padding: 0.375rem 0 0.375rem 0;
  color: #ffffff;
  text-decoration: none;
  background-image: url(/img/background/current/banner_bkgd_nav.jpg);
  background-repeat: repeat;
  border-right: 1px solid #ffffff;
  transition: background-color 0.3s ease;
  line-height: 1.4em;
  text-align: center;
  width: 8.2em;
}

nav > ul > li:first-child > a,
nav .container > ul > li:first-child > a,
.menu > ul > li:first-child > a,
.menu .container > ul > li:first-child > a {
  border-left: none;
}

nav > ul > li > a:hover,
nav > ul > li > a.active,
nav .container > ul > li > a:hover,
nav .container > ul > li > a.active,
.menu > ul > li > a:hover,
.menu > ul > li > a.active,
.menu .container > ul > li > a:hover,
.menu .container > ul > li > a.active {
  /* Use the image used by legacy Spry styles for hover to match .shtml look */
  background-image: url(/img/background/current/banner_bkgd_nav_active.jpg);
  background-repeat: repeat;
  color: #ffffff;
}

/* Dropdown submenu */
nav ul ul,
.menu ul ul {
  position: absolute;
  left: 0;
  top: 100%;
  min-width: 200px;
  flex-direction: column;
  background-color: #cccccc;
  background-image: url(/img/background/current/topnav_bkgd.jpg);
  background-repeat: repeat;
  border: 1px solid #cccccc;
  display: none;
  z-index: 1000;
}

nav > ul > li:hover > ul,
nav > ul > li.open > ul,
nav .container > ul > li:hover > ul,
nav .container > ul > li.open > ul,
.menu > ul > li:hover > ul,
.menu > ul > li.open > ul,
.menu .container > ul > li:hover > ul,
.menu .container > ul > li.open > ul {
  display: flex;
}

nav ul ul li,
.menu ul ul li {
  flex: 1 100%;
}

nav ul ul li a,
.menu ul ul li a {
  display: block;
  padding: 6px 12px 6px 5px;
  color: #ffffff;
  text-decoration: none;
  background-image: url(/img/background/current/banner_bkgd_nav.jpg);
  background-repeat: repeat;
  border: 1px solid #cccccc;
  border-top: none;
  transition: background 0.3s ease;
  line-height: 1em;
  text-align: left;
  width: auto;
  font-weight: bold;
  font-size: 12px;
}

nav ul ul li:first-child a,
.menu ul ul li:first-child a {
  border-top: 1px solid #cccccc;
}

nav ul ul li a:hover,
nav ul ul li a.active,
.menu ul ul li a:hover,
.menu ul ul li a.active {
  /* Match main menu hover: use hover background image and keep text white */
  background-image: url(/img/background/current/banner_bkgd_nav_active.jpg);
  background-repeat: repeat;
  color: #ffffff;
}

/* Responsive menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 1rem;
}

@media (max-width: 768px) {
  /* Keep menu horizontal with flex-wrap, do NOT change to column */
  nav > ul,
  nav .container > ul,
  .menu > ul,
  .menu .container > ul {
    flex-direction: row;
    flex-wrap: wrap;
  }

  nav > ul > li > a,
  nav .container > ul > li > a,
  .menu > ul > li > a,
  .menu .container > ul > li > a {
    border-right: 1px solid #ffffff;
    border-bottom: none;
  }

  nav > ul > li:last-child > a,
  nav .container > ul > li:last-child > a,
  .menu > ul > li:last-child > a,
  .menu .container > ul > li:last-child > a {
    border-bottom: none;
  }

  /* Submenus always overlay (position: absolute), never inline (position: static) */
  nav ul ul,
  .menu ul ul {
    position: absolute;
    display: none;
  }

  nav > ul > li.open > ul,
  nav .container > ul > li.open > ul,
  .menu > ul > li.open > ul,
  .menu .container > ul > li.open > ul {
    display: flex;
  }

  nav > ul > li.open > ul {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }
}


/* Modern Carousel - match FlexSlider visuals and center images */
.carousel {
  position: relative;
  width: 100%;
  max-width: 765px;
  margin: 0 auto;
  height: 40vh;
  overflow: hidden;
  border: 4px solid #ffffff;
  border-radius: 5px;
  background: transparent;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .carousel {
    height: 30vh;
  }
}

.carousel-inner {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-slides {
  background: transparent;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-item {
  display: none;
  /* keep inline centering fallback */
  text-align: center;
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 100%;
  align-items: center;
  justify-content: center;
}

.carousel-item > a {
  display: block;
  width: 100%;
  height: 100%;
}

.carousel-item img,
.carousel-item video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
  margin: 0;
  -webkit-user-drag: none;
  user-select: none;
}

.carousel-item img {
  max-width: 100%;
  max-height: 100%;
}

.carousel-item > a > img,
.carousel-item > a > video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
}

/* Carousel caption with transparent background */
.carousel-caption {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: #ffffff;
  text-align: center;
  padding: 8px 12px;
  margin: 0;
  font-size: 12px;
  font-family: Arial, Helvetica, sans-serif;
  white-space: nowrap;
  max-width: 90%;
}

.error-art {
  position: relative;
  margin: 2rem auto 0;
  max-width: 960px;
}

.error-art img {
  display: block;
  width: 100%;
  height: auto;
}

.error-art .error-code {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(25, 25, 25, 0.88);
  text-shadow: 0 2px 4px rgba(255, 255, 255, 0.55);
  font-size: clamp(3rem, 10vw, 7rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  pointer-events: none;
  user-select: none;
}

.error-home-link {
  text-align: center;
  color: #ffffff;
  margin: 0.75rem 0 1.25rem;
}

.error-message {
  text-align: center;
  color: #ffffff;
  margin: 0 0 0.5rem;
}

.carousel-item.active {
  display: flex;
  width: 100%;
  height: 100%;
  animation: fadeIn 0.5s ease-in-out;
}

.flex-container {
  position: relative;
  width: 100%;
  max-width: 765px;
  margin: 0 auto;
}

.flexslider {
  border: 4px solid #ffffff;
  position: relative;
  border-radius: 5px;
  overflow: hidden;
  background: transparent;
}

.carousel-item.active img {
  margin: 0 auto;
}

.carousel-item.active video {
  width: auto;
  height: auto;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.carousel-controls {
  position: absolute;
  inset: 0;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.carousel-controls.visible,
.carousel:focus-within .carousel-controls {
  opacity: 1;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: auto;
  border: none;
  background: rgba(0, 0, 0, 0.35);
  color: #ffffff;
  width: 1.375rem;
  height: 2.25rem;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.9;
  transition: background-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.carousel-arrow-prev {
  left: 0.5rem;
}

.carousel-arrow-next {
  right: 0.5rem;
}

.carousel-arrow:hover {
  background: rgba(0, 0, 0, 0.55);
  opacity: 1;
  transform: translateY(-50%) scale(1.04);
}

.carousel-arrow:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  border: none;
  transition: background-color 0.3s ease;
}

.carousel-dot.active {
  background-color: rgba(255, 255, 255, 0.9);
}

.carousel-dot:hover {
  background-color: rgba(255, 255, 255, 0.7);
}

.carousel-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  pointer-events: auto;
}

/* Clock Display */
#clock {
  font-family: 'Courier New', monospace;
  font-size: 1.5rem;
  font-weight: bold;
  text-align: right;
  padding: 0.5rem;
  min-width: 100px;
}

/* Responsive Grid */
.grid {
  display: grid;
  grid-gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-col-2 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

@media (max-width: 768px) {
  .grid,
  .grid-col-2 {
    grid-template-columns: 1fr;
  }
}

/* Typography improvements */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: #000000;
  margin: 0;
  font-size: 12px;
  font-family: Arial, Verdana, Univers, sans-serif;
  background-color: rgb(182,207,209);
  background-position: top;
  background-image: url(/img/background/current/background_image.jpg);
  background-repeat: repeat;
  font-weight: normal;
}

.toplogo {
  float: left;
  padding: 10px 0 0 0;
}

.toplogo img {
  display: block;
  max-width: 200px;
  height: auto;
}

/* Ensure the outer page wrapper stays transparent like the legacy layout */
body .gridContainer.clearfix,
.gridContainer.clearfix,
.gridContainer.clearfix.container {
  background: transparent !important;
  background-image: none !important;
}

/* Main layout */
.gridContainer.clearfix,
.gridContainer {
  margin-left: auto;
  margin-right: auto;
  width: 98.1818%;
  padding-left: 0.909%;
  padding-right: 0.909%;
  flex: 1 0 auto;
}

#header,
#Header,
.header {
  width: 100%;
  float: left;
  clear: both;
}

#menu,
#Menu,
.menu,
nav {
  width: 100%;
  float: left;
  clear: both;
}

#content,
#Content,
.content {
  width: 100%;
  float: left;
  min-width: 0;
  clear: both;
  box-sizing: border-box;
}

#Content p,
.content p,
#Content li,
.content li,
#Content span,
.content span {
  font-size: 1rem;
}

#sidebar,
#Sidebar,
.sidebar {
  width: 100%;
  float: left;
  clear: both;
}

#sidebar2,
#Sidebar2,
.sidebar2 {
  width: 100%;
  float: left;
  clear: both;
}

#footer,
#Footer,
.footer {
  width: 100%;
  float: left;
  clear: both;
}

#Sidebar,
#Sidebar2,
.sidebar,
.sidebar2 {
  min-width: 0;
  box-sizing: border-box;
  position: relative;
  z-index: 20;
}

.sidebar,
.sidebar2 {
  z-index: 30;
  background: transparent;
  padding: 0;
  border-radius: 0;
  border-bottom: none;
}

.sidebar .container,
.sidebar2 .container,
#Sidebar .container,
#sidebar .container,
#Sidebar2 .container,
#sidebar2 .container {
  padding-top: 10px;
  padding-left: 10px;
  width: auto;
}

.content .container,
#Content .container,
.main-content .container {
  border: 2px solid rgba(255,255,255,0.7);
  position: relative;
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  -o-border-radius: 5px;
  border-radius: 5px;
  padding-top: 20px;
  padding-bottom: 30px;
  min-height: 200px;
  background: rgb(255, 255, 255);
  background: rgba(255, 255, 255, 0.7);
}

.sidebar .container,
#Sidebar .container {
  border: 2px solid rgba(255,255,255,0.7);
  position: relative;
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  -o-border-radius: 5px;
  border-radius: 5px;
  padding-top: 10px;
  padding-left: 10px;
  background: rgb(255, 255, 255);
  background: rgba(255, 255, 255, 0.7);
  top: 5px;
}

.sidebar2 .container,
#Sidebar2 .container {
  border: 2px solid rgba(255,255,255,0.7);
  position: relative;
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  -o-border-radius: 5px;
  border-radius: 5px;
  padding-top: 10px;
  padding-left: 10px;
  background: rgb(255, 255, 255);
  background: rgba(255, 255, 255, 0.7);
  top: 10px;
}

.footer .container,
#Footer .container {
  border: 2px solid rgba(51,102,153,0.7);
  position: relative;
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  -o-border-radius: 5px;
  border-radius: 5px;
  height: auto;
  width: auto;
  background-color: rgb(51,102,153);
  background-color: rgba(51,102,153,0.7);
  top: 15px;
}

.copyright {
  padding-left: 40px;
  padding-top: 12px;
  padding-bottom: 2px;
  color: #FFFFFF;
  font-size: 12px;
  font-family: Arial, Helvetica, Verdana, sans-serif;
}

@media only screen and (min-width: 481px) {
  .gridContainer.clearfix,
  .gridContainer {
    width: 93.9204%;
    padding-left: 0.5397%;
    padding-right: 0.5397%;
  }

  #Content,
  .content {
    clear: both;
    float: left;
    width: 62.0689%;
  }

  #Sidebar,
  #Sidebar2,
  .sidebar,
  .sidebar2 {
    clear: none;
    float: right;
    width: 36.7816%;
    margin-left: 1.1494%;
  }

  .content .container {
    border-right-style: solid;
    border-right-width: 1px;
    border-right-color: rgb(102,51,0);
    border-bottom-style: none;
  }

  .sidebar,
  .sidebar2 {
    border-top-style: none;
    border-right-style: none;
  }
}

@media only screen and (min-width: 769px) {
  .gridContainer.clearfix {
    width: 94.2803%;
    max-width: 1232px;
    padding-left: 0.3598%;
    padding-right: 0.3598%;
    margin-left: auto;
    margin-right: auto;
  }

  #Content,
  .content {
    clear: both;
    float: left;
    width: 66.4122%;
  }

  #Sidebar,
  #Sidebar2,
  .sidebar,
  .sidebar2 {
    clear: none;
    float: right;
    width: 32.8244%;
    margin-left: 0.7633%;
  }

  .content .container {
    border-right-style: solid;
    border-right-width: 1px;
    border-right-color: rgb(102,51,0);
    border-bottom-style: none;
  }

  .sidebar,
  .sidebar2 {
    border-top-style: none;
    border-right-style: none;
  }

  .sidebar {
    border-bottom: 1px dotted rgb(102,51,0);
  }
}

@media only screen and (max-width: 480px) {
  #Content,
  .content,
  #Sidebar,
  #Sidebar2,
  .sidebar,
  .sidebar2 {
    width: 100%;
    clear: both;
    float: left;
    margin-left: 0;
  }
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  color: #000000;
}

h1 {
  font-size: 1.5rem;
  font-weight: bold;
  margin: 0.1875rem 0 1.5625rem 0;
}

h2 {
  font-size: 1.2rem;
  font-weight: bold;
  margin: 0 0 0.9375rem 0;
}

h3 {
  font-size: 1rem;
  margin-top: 0.75rem;
  margin-bottom: 0;
}

h4 {
  font-size: 0.8rem;
}

a {
  color: #000000;
}

.copyright a,
.copyright a:visited {
  color: #ffffff;
}

/* Tabs */
.tabs {
  margin-top: 1rem;
}

.tabs [role="tablist"] {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.tabs [role="tab"] {
  appearance: none;
  border: 1px solid rgba(57, 88, 127, 0.8);
  border-bottom: none;
  border-radius: 5px 5px 0 0;
  background: rgba(209, 225, 246, 0.9);
  color: #000000;
  font: inherit;
  font-weight: 700;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
}

.tabs [role="tab"].active {
  background: rgba(255, 255, 255, 0.95);
}

.tabs [role="tabpanel"] {
  border: 1px solid rgba(57, 88, 127, 0.8);
  border-radius: 0 5px 5px 5px;
  background: rgba(209, 225, 246, 0.9);
  padding: 1rem;
}

.tabs [role="tabpanel"] summary {
  list-style: none;
}

.tabs [role="tabpanel"] .grid {
  margin-top: 0.75rem;
}

/* Images responsive */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Utility classes */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

/* Sticky footer: ensure footer sits at bottom when page content is short */
html, body {
  height: 100%;
}

/* Use flex layout so the footer is pushed to the bottom when content is short */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* The main page wrapper should expand to fill available space between header and footer */
.gridContainer.clearfix {
  flex: 1 0 auto;
}

/* Common content containers — let them grow to fill vertical space */
main, #Content, .content, .main-content {
  flex: 1 0 auto;
}

/* Footer should not shrink and should sit at the bottom */
footer, #Footer, .footer, #footer {
  flex-shrink: 0;
  margin-top: auto;
}
