/* ALKEW shared header / menu / footer / page-top for all inner pages.
   Mirrors the React homepage (src/styles.css). Loaded AFTER common.css.
   Generated markup lives in tools/sync-chrome.py - edit the menu there. */

#site-header, #site-nav, #site-footer { font-family: "Inter", "Segoe UI", Aptos, Arial, sans-serif; letter-spacing: .1px; }

/* ---- header: logo left, Contact Us / Careers right ---- */
#site-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 24px;
  width: 100%; max-width: 1116px; margin: 0 auto; padding: 20px 20px 16px; box-sizing: border-box;
}
#site-header .site-logo { display: block; width: clamp(240px, 34vw, 450px); }
#site-header .site-logo img { display: block; width: 100%; height: auto; }
#site-header .site-utility { display: flex; gap: 44px; padding-top: 6px; }
#site-header .site-utility a { color: #111; font-size: 14px; font-weight: 600; text-decoration: none; letter-spacing: .1px; padding-bottom: 1px; border-bottom: 3px solid transparent; }
#site-header .site-utility a:hover, #site-header .site-utility a:focus-visible { color: #111; text-decoration: none; border-bottom-color: #917700; }

/* ---- main menu bar (same look as homepage) ---- */
#site-nav { position: sticky; top: 0; z-index: 50; width: 100%; background: #5189ca; box-shadow: 0 2px 12px rgba(0,0,0,.12); }
#site-nav ul { list-style: none; margin: 0; padding: 0; }
#site-nav > ul { display: flex; justify-content: center; flex-wrap: wrap; }
#site-nav > ul > li { position: relative; min-height: 60px; display: flex; align-items: stretch; flex: 0 1 auto; margin: 0; padding: 0; background: none; }
#site-nav > ul > li > a {
  width: 100%; display: flex; align-items: center; justify-content: center;
  padding: 10px 22px; color: #fff; text-align: center; white-space: nowrap; text-decoration: none;
  font-size: clamp(13px, 1.05vw, 16px); line-height: 1.15; font-weight: 600; letter-spacing: .2px;
}
#site-nav > ul > li:hover > a, #site-nav > ul > li:focus-within > a { background: #467db9; text-decoration: none; }
#site-nav .submenu { position: absolute; top: 100%; left: 0; right: 0; display: none; background: #6b9bd2; }
#site-nav li:hover > .submenu, #site-nav li:focus-within > .submenu { display: block; }
#site-nav .submenu li { margin: 0; padding: 0; width: 100%; background: none; }
#site-nav .submenu a { display: block; padding: 9px 12px; color: #fff; font-size: 13px; text-align: center; text-decoration: none; background: none; }
#site-nav .submenu a:hover { background: #5189ca; text-decoration: none; }
#site-nav .site-nav-toggle { display: none; }

/* ---- space between the main menu bar and the page content (sidebar + text) ---- */
#site-nav ~ #contents { margin-top: 40px; }

/* ---- footer (same as homepage) ---- */
#site-footer { border-top: 1px solid #ddd; margin: 40px auto 0; padding: 20px 5% 30px; text-align: center; max-width: 1116px; box-sizing: border-box; font-family: Verdana, 'DejaVu Sans', Geneva, sans-serif; letter-spacing: 1px; }
#site-footer ul { list-style: none; display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 73px; margin: 0 0 10px; padding: 0; }
#site-footer li { margin: 0; padding: 0; }
#site-footer li a { display: inline-block; padding: 5px 0; color: #000; font-size: 13px; text-decoration: none; }
#site-footer li a:hover { color: #666; text-decoration: underline; }
#site-footer p { margin: 0; color: #999; font-size: 11px; line-height: 3; letter-spacing: 1px; }

/* ---- page top: round blue button, up arrow only ---- */
#pageTop { position: fixed; right: 24px; bottom: 24px; z-index: 60; }
#pageTop a {
  display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0;
  border-radius: 50%; background: #5189ca; background-image: none; font-size: 0; color: transparent;
  box-shadow: 0 4px 14px rgba(0,0,0,.18); text-decoration: none; transition: background-color .2s ease;
}
#pageTop a:hover { background: #467db9; }
#pageTop a::before { content: ''; width: 10px; height: 10px; margin-top: 4px; border-left: 2px solid #fff; border-top: 2px solid #fff; transform: rotate(45deg); }

@media (max-width: 900px) {
  /* Phone menu: hamburger icon -> 2-column grid of square tiles, opens in the page flow (no overlay) */
  #site-nav { position: relative; background: #fff; box-shadow: none; }
  #site-nav .site-nav-toggle {
    display: flex; align-items: center; justify-content: center;
    width: 48px; height: 48px; margin: 6px 0 6px 14px; padding: 0; border: 0; border-radius: 6px;
    background: transparent; font-size: 0; color: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent;
  }
  #site-nav .site-nav-toggle:active { background: #eef3fa; }
  #site-nav .site-nav-toggle::before {
    content: ''; display: block; width: 26px; height: 3px; border-radius: 2px; background: #2f5a8f;
    box-shadow: 0 -8px 0 #2f5a8f, 0 8px 0 #2f5a8f;
  }
  #site-nav .site-nav-toggle::after { content: none; }
  #site-nav > ul { display: none; }
  #site-nav > ul.is-open {
    display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 0 14px 14px; padding: 0 0 1px;
    background: rgba(255,255,255,.55); border-radius: 0; overflow: visible; box-shadow: none;
  }
  #site-nav > ul.is-open > li { display: block; min-height: 0; background: #5189ca; }
  #site-nav > ul.is-open > li > a {
    height: 100%; min-height: 54px; padding: 8px 10px; box-sizing: border-box; white-space: normal; text-align: center;
    font-family: Verdana, 'DejaVu Sans', Geneva, sans-serif; font-weight: 400; letter-spacing: 1px; font-size: 14px; line-height: 1.2; text-wrap: balance;
  }
  #site-nav > ul.is-open > li > a:active { background: #3f72ad; }
  #site-nav .submenu, #site-nav li:hover > .submenu, #site-nav li.is-expanded > .submenu { display: none; }
}
@media (max-width: 800px) {
  #site-header { padding: 16px 20px 12px; }
  #site-nav > ul > li { min-height: 54px; }
  #site-nav > ul > li > a { padding: 8px 16px; }
  #site-footer ul { gap: 6px 28px; }
  #site-nav ~ #contents { margin-top: 28px; }
}
@media (max-width: 560px) {
  #site-header .site-logo { width: 210px; }
  #site-header .site-utility { gap: 12px; }
  #site-header .site-utility a { font-size: 13px; }
}

/* =====================================================================
   PHONE / TABLET LAYOUT FOR INNER PAGES
   common.css still carries the old fixed-width desktop layout
   (#contents 940px, #conR 700px float:right, #conL 200px float:left,
   650-700px tables). Everything below only applies at <= 900px and
   leaves the desktop layout untouched.
   ===================================================================== */
@media (max-width: 900px) {
  html, body { max-width: 100%; }
  body { margin: 0; padding: 0; }
  #container { width: 100%; max-width: 100%; margin: 0; padding: 0; box-sizing: border-box; }

  /* one column: content first, section sub-menu (#conL) after it.
     To show the sub-menu above the content instead, add: #conL { order: -1; } */
  #contents {
    display: flex; flex-direction: column;
    width: 100%; max-width: 100%; margin-left: 0; margin-right: 0;
    padding: 0 20px; box-sizing: border-box; overflow: visible;
  }
  #conR, #conL, #TOPconL, #TOPconR {
    float: none; clear: none; width: 100%; max-width: 100%; margin: 0; box-sizing: border-box;
  }
  #conL { margin-top: 36px; }
  #conR { overflow-wrap: break-word; word-wrap: break-word; }
  #conR p { text-align: left; }

  /* the header image sits in the flow, the common.css "img {padding-top:20px; display:block}" must not push the logo down */
  #site-header img { padding: 0; }

  /* images always scale down to the screen */
  #contents img { max-width: 100%; height: auto; }

  /* fixed-width data tables fill the screen instead of 560-700px */
  table.normal, table.wide, table.layout { width: 100%; max-width: 100%; box-sizing: border-box; }
  table.normal td, table.normal th, table.wide td, table.wide th { overflow-wrap: break-word; word-wrap: break-word; }

  /* old inline margins / widths used to indent things on desktop */
  #conR [style*="margin-left"] { margin-left: 0 !important; }
  #conR fieldset { width: auto !important; max-width: 100%; margin-left: 0 !important; box-sizing: border-box; }
  /* inline "text + image side by side" flex rows (Geo Analysis) stack */
  #conR [style*="display:flex"], #conR [style*="display: flex"] { flex-direction: column; }
  #conR iframe, #conR video, #conR embed, #conR object { max-width: 100%; }
  #conR pre { max-width: 100%; overflow-x: auto; }
}

@media (max-width: 560px) {
  #contents { padding: 0 24px; }
  #conR, #conL { letter-spacing: .3px; }

  /* header: logo + Contact Us / Careers stay on one line */
  #site-header { gap: 12px; padding: 16px 24px 8px; }
  #site-header .site-logo { width: auto; flex: 1 1 0; max-width: 270px; min-width: 0; }
  #site-header .site-utility { flex: 0 0 auto; gap: 14px; padding-top: 2px; }
  #site-header .site-utility a { white-space: nowrap; font-size: 12.5px; }

  h2 { font-size: 21px; padding: 0; }
  h3 { font-size: 17px; }
  #site-footer { padding: 20px 24px 30px; }
  #site-footer ul { gap: 4px 22px; }
}

/* side-by-side photo pairs / text+image tables need ~620px, so stack them below 680px */
@media (max-width: 680px) {
  table.layout, table.layout tbody, table.layout tr, table.layout td, table.layout th {
    display: block; width: 100% !important; box-sizing: border-box;
  }
  table.layout td, table.layout th { padding-left: 0; padding-right: 0; }
  table.layout td img { margin-bottom: 8px; }
}

/* phones: section sub-menu (#conL) sits at the top, right under the main menu, above the page content */
@media (max-width: 680px) {
  #conL { order: -1; margin-top: 0; margin-bottom: 24px; }
}

/* phones: no floating back-to-top button */
@media (max-width: 560px) {
  #pageTop { display: none; }
}
