/* Windchase - shared mobile/responsive styles */
@import url("site-modern.css");

body {
  overflow-x: hidden;
  max-width: 100%;
}

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

img[src*="blueline"],
img[src*="Line1"],
img[src*="Line2"] {
  width: 100%;
  max-width: 100%;
  height: auto;
}

table {
  max-width: 100%;
  table-layout: auto;
  word-wrap: break-word;
}

td, th {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.fadein {
  position: relative !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
  margin-left: auto;
  margin-right: auto;
}

.wc-slideshow {
  width: 100%;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.wc-slide-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 4px;
  padding: 0;
}

.wc-slide-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 2px solid #000080;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
}

.wc-slide-dot:hover,
.wc-slide-dot:focus {
  background: #bed3f8;
  outline: none;
}

.wc-slide-dot-active {
  background: #000080;
  border-color: #000080;
}

.fadein.wc-slideshow-ready img {
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  width: 100% !important;
  height: auto !important;
  display: block !important;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.fadein.wc-slideshow-ready img.wc-slide-active {
  opacity: 1 !important;
  z-index: 2 !important;
}

.fadein img {
  max-width: 100% !important;
  height: auto !important;
}

/* Desktop horizontal nav with dropdowns (same structure as hamburger) */
.desktop-nav {
  display: none;
  position: sticky;
  top: 0;
  z-index: 900;
  background: #000080;
  border-bottom: 3px solid #0080C0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.desktop-nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 12px;
}

.desktop-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.desktop-nav-depth-1 {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
}

.desktop-nav-item {
  position: relative;
}

.desktop-nav-depth-1 > .desktop-nav-item > .desktop-nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 14px;
  color: #ffffff;
  text-decoration: none;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  font-weight: bold;
  white-space: nowrap;
  line-height: 1.2;
}

.desktop-nav-depth-1 > .desktop-nav-item > .desktop-nav-link:hover,
.desktop-nav-depth-1 > .desktop-nav-item:hover > .desktop-nav-link,
.desktop-nav-depth-1 > .desktop-nav-item:focus-within > .desktop-nav-link {
  background-color: #000098;
  color: #ffffff;
}

.desktop-nav-label {
  cursor: default;
}

.desktop-nav-caret {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-top: -4px;
}

.desktop-nav-depth-2,
.desktop-nav-depth-3,
.desktop-nav-depth-4 {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: #f0f8ff;
  border: 2px solid #000080;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  z-index: 950;
}

.desktop-nav-item:hover > .desktop-nav-list,
.desktop-nav-item:focus-within > .desktop-nav-list {
  display: block;
}

.desktop-nav-depth-3,
.desktop-nav-depth-4 {
  top: 0;
  left: 100%;
}

/* Keep nested flyouts on-screen near the right edge */
.desktop-nav-depth-1 > .desktop-nav-item:nth-last-child(-n+3) .desktop-nav-depth-3,
.desktop-nav-depth-1 > .desktop-nav-item:nth-last-child(-n+3) .desktop-nav-depth-4 {
  left: auto;
  right: 100%;
}

.desktop-nav-depth-2 .desktop-nav-link,
.desktop-nav-depth-3 .desktop-nav-link,
.desktop-nav-depth-4 .desktop-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  color: #000080;
  text-decoration: none;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: bold;
  white-space: nowrap;
  background: #f0f8ff;
  border-bottom: 1px solid #d0d0d0;
}

.desktop-nav-depth-2 .desktop-nav-item:last-child > .desktop-nav-link,
.desktop-nav-depth-3 .desktop-nav-item:last-child > .desktop-nav-link,
.desktop-nav-depth-4 .desktop-nav-item:last-child > .desktop-nav-link {
  border-bottom: 0;
}

.desktop-nav-depth-2 .desktop-nav-link:hover,
.desktop-nav-depth-3 .desktop-nav-link:hover,
.desktop-nav-depth-4 .desktop-nav-link:hover,
.desktop-nav-depth-2 .desktop-nav-item:hover > .desktop-nav-link,
.desktop-nav-depth-3 .desktop-nav-item:hover > .desktop-nav-link,
.desktop-nav-depth-4 .desktop-nav-item:hover > .desktop-nav-link {
  background-color: #e0e8ff;
  color: #000098;
}

.desktop-nav-depth-2 .desktop-nav-caret,
.desktop-nav-depth-3 .desktop-nav-caret,
.desktop-nav-depth-4 .desktop-nav-caret {
  transform: rotate(-45deg);
  margin-top: 0;
  flex-shrink: 0;
}

/* Hamburger menu - mobile only, fixed top-left while scrolling */
.hamburger-menu {
  display: none;
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 1001;
  background-color: #000080;
  border: 2px solid #0080C0;
  border-radius: 5px;
  padding: 10px;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.hamburger-menu:hover {
  background-color: #000098;
}

.hamburger-icon {
  width: 30px;
  height: 25px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hamburger-icon span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: #FFFFFF;
  border-radius: 3px;
  transition: all 0.3s ease;
}

.hamburger-icon.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.hamburger-icon.active span:nth-child(2) {
  opacity: 0;
}

.hamburger-icon.active span:nth-child(3) {
  transform: rotate(-45deg) translate(8px, -8px);
}

.sidebar-menu {
  display: block;
  position: fixed;
  top: 0;
  left: -300px;
  width: 280px;
  height: 100%;
  background-color: #f0f8ff;
  border-right: 3px solid #000080;
  z-index: 1000;
  overflow-y: auto;
  transition: left 0.3s ease;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
}

.sidebar-menu.active {
  left: 0;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
  display: block;
  opacity: 1;
}

.sidebar-menu-content {
  padding: 60px 12px 20px 12px;
}

.sidebar-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-nav-item {
  border-bottom: 1px solid #d0d0d0;
}

.sidebar-nav-depth-2 .sidebar-nav-item,
.sidebar-nav-depth-3 .sidebar-nav-item,
.sidebar-nav-depth-4 .sidebar-nav-item {
  border-bottom: 1px solid #e8eef8;
}

.sidebar-nav-row {
  display: flex;
  align-items: stretch;
}

.sidebar-nav-link,
.sidebar-nav-label {
  display: block;
  flex: 1;
  padding: 12px 15px;
  color: #000080;
  text-decoration: none;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  font-weight: bold;
  line-height: 1.3;
}

.sidebar-nav-label {
  cursor: default;
}

.sidebar-nav-link:hover {
  background-color: #e0e8ff;
  color: #000098;
}

.sidebar-nav-toggle {
  flex: 0 0 44px;
  width: 44px;
  border: 0;
  background: transparent;
  color: #000080;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-nav-toggle:hover {
  background-color: #e0e8ff;
}

.sidebar-nav-chevron {
  display: block;
  width: 8px;
  height: 8px;
  border-right: 2px solid #000080;
  border-bottom: 2px solid #000080;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  margin-top: -4px;
}

.sidebar-nav-item.open > .sidebar-nav-row .sidebar-nav-chevron {
  transform: rotate(225deg);
  margin-top: 2px;
}

.sidebar-nav-submenu {
  display: none;
  background-color: #f7faff;
}

.sidebar-nav-item.open > .sidebar-nav-submenu {
  display: block;
}

.sidebar-nav-depth-2 .sidebar-nav-link,
.sidebar-nav-depth-2 .sidebar-nav-label {
  padding-left: 28px;
  font-size: 15px;
}

.sidebar-nav-depth-3 .sidebar-nav-link,
.sidebar-nav-depth-3 .sidebar-nav-label {
  padding-left: 40px;
  font-size: 14px;
  font-weight: normal;
}

.sidebar-nav-depth-4 .sidebar-nav-link,
.sidebar-nav-depth-4 .sidebar-nav-label {
  padding-left: 52px;
  font-size: 14px;
  font-weight: normal;
}

.sidebar-menu-content a {
  color: #000080;
  text-decoration: none;
  font-family: Arial, Helvetica, sans-serif;
}

.sidebar-social-links {
  margin-top: 1.5em;
  padding-top: 1em;
  border-top: 2px solid #000080;
}

.sidebar-social-title {
  margin: 0 0 0.75em;
  padding: 0 15px;
  color: #000080;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: bold;
}

.sidebar-social-links a {
  display: block;
  padding: 12px 15px;
  font-size: 15px;
  font-weight: bold;
  border-bottom: 1px solid #d0d0d0;
}

.sidebar-social-links a:hover {
  background-color: #e0e8ff;
  color: #000098;
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
  background-color: #000080;
  color: #FFFFFF;
  border: 2px solid #0080C0;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  text-align: center;
  line-height: 46px;
  font-size: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  padding: 0;
  margin: 0;
  outline: none;
  font-family: Arial, sans-serif;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.back-to-top:hover {
  background-color: #000098;
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

/* Hide legacy table nav; replaced by desktop-nav / hamburger */
table[width="800"][height="67"],
table[bordercolorlight="#BED3F8"][bordercolordark="#0080C0"],
table[bordercolorlight="#BED3F8"][height="115"],
table[bordercolorlight="#BED3F8"][height="67"] {
  display: none !important;
}

/* Bottom footer link rows replaced by main nav */
.site-footer-nav {
  display: none !important;
}

/* Blue bars that bracketed the old top nav table */
.wc-legacy-nav-blueline {
  display: none !important;
}

/* Laptop / desktop: wider page frame + horizontal dropdown nav */
@media screen and (min-width: 769px) {
  .desktop-nav {
    display: block;
  }

  .hamburger-menu,
  .sidebar-menu,
  .sidebar-overlay {
    display: none !important;
  }

  body > div[align="center"] > table[bordercolorlight="#EDF2FE"] {
    width: 96% !important;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    border-color: #c8daf8 !important;
  }

  /* Legacy layout left ~26% empty when sidebar column was removed */
  table[bordercolorlight="#EDF2FE"] > tbody > tr > td[width="74%"],
  table[bordercolorlight="#EDF2FE"] > tr > td[width="74%"] {
    width: 100% !important;
  }

  table[bordercolorlight="#EDF2FE"] table[width="90%"],
  table[bordercolorlight="#EDF2FE"] table[width="85%"],
  table[bordercolorlight="#EDF2FE"] table[width="80%"] {
    width: 98% !important;
  }

  table[bordercolorlight="#EDF2FE"] table[width="70%"] {
    width: 85% !important;
  }

  body > div[align="center"] > table[width="97%"] {
    width: 96% !important;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
  }

  .fadein,
  .wc-slideshow {
    max-width: 1100px;
  }
}

@media screen and (max-width: 768px) {
  .desktop-nav {
    display: none !important;
  }

  .hamburger-menu {
    display: block;
  }

  body {
    font-size: 14px;
    padding: 8px;
    padding-top: 64px; /* clearance for fixed hamburger */
    margin: 0;
  }

  div[align="center"] {
    padding: 0 5px;
    max-width: 100%;
  }

  /* Keep page titles on-screen (legacy &nbsp; prevented wrapping) */
  font[size="6"],
  font[size="5"] {
    word-break: break-word;
  }

  font[size="6"] b,
  font[size="5"] b,
  td font[size="6"],
  td font[size="5"] {
    white-space: normal !important;
  }

  table[width="85%"],
  table[width="800"],
  table[width="930"],
  table[width="1000"],
  table[width="1100"],
  table[width="1200"] {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto;
  }

  table[border="1"][bordercolorlight="#EDF2FE"],
  table[bordercolorlight="#EDF2FE"] {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Inline slideshow shells often hard-code 900px */
  .fadein {
    width: 100% !important;
    max-width: 100% !important;
    position: relative !important;
    overflow: hidden !important;
  }

  .fadein img {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    margin-bottom: 0 !important;
    display: block !important;
  }

  img[width="400"],
  img[width="450"],
  img[width="500"],
  img[width="623"],
  img[width="634"],
  img[width="655"],
  img[width="657"],
  img[width="659"],
  img[width="667"],
  img[width="671"],
  img[width="683"],
  img[width="684"],
  img[width="750"],
  img[width="769"],
  img[width="820"],
  img[width="900"],
  img[width="930"],
  img[width="943"],
  img[width="1000"],
  img[width="862"],
  img[width="700"],
  img[width="600"],
  img[width="586"],
  img[width="576"],
  img[width="534"],
  img[width="546"],
  img[width="590"],
  img[width="593"],
  img[width="543"],
  img[width="567"],
  img[width="578"],
  img[width="738"],
  img[width="740"] {
    width: 100% !important;
    height: auto !important;
    max-width: 100%;
  }

  font[size="6"] { font-size: 1.55em !important; }
  font[size="5"] { font-size: 1.4em !important; }
  font[size="4"] { font-size: 1.25em !important; }
  font[size="3"] { font-size: 1.1em !important; }
  font[size="2"] { font-size: 1em !important; }
  font[size="1"] { font-size: 0.95em !important; }

  table[width="77%"],
  table[width="70%"],
  table[width="60%"],
  table[width="55%"],
  table[width="40%"],
  table[width="80%"],
  table[width="90%"],
  table[width="95%"],
  table[width="98%"] {
    width: 95% !important;
  }

  hr[width="650"],
  hr[width="750"],
  hr[width="738"] {
    width: 90% !important;
  }

  table[width="97%"] td {
    display: block;
    width: 100% !important;
    text-align: center !important;
    padding: 5px 0 !important;
  }

  table[width="97%"] a {
    font-size: 1em !important;
    padding: 10px 14px !important;
    display: inline-block;
    min-height: 44px;
    min-width: 44px;
    line-height: 1.4;
    margin: 4px 2px;
    word-wrap: break-word;
  }

  td[width="24%"],
  td[width="76%"],
  td[width="33%"] {
    display: block;
    width: 100% !important;
  }

  table[bordercolorlight="#6699FF"],
  table[bordercolorlight="#0033CC"],
  table[bordercolorlight="#3399FF"] {
    width: 95% !important;
  }

  .back-to-top {
    bottom: 20px !important;
    right: 20px !important;
    width: 45px !important;
    height: 45px !important;
    line-height: 41px !important;
    font-size: 22px !important;
  }
}

@media screen and (max-width: 480px) {
  body {
    font-size: 12px;
  }

  font[size="6"] { font-size: 1.8em !important; }
  font[size="4"] { font-size: 1.3em !important; }
  font[size="3"] { font-size: 1.1em !important; }

  table {
    font-size: 12px;
  }
}
