/* ==========================================================================
   Template ASI 2026 — Main Stylesheet
   Colors: navy (#000E60), teal (#52B3CE), mint (#CEF6E3), slate (#89b7c4)
   ========================================================================== */

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; }
html { margin: 0; padding: 0; }
body { margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }

body {
  font: 1rem/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #333;
  background: #1a2a5c;
}

td, th, textarea, input, select, button {
  font: inherit;
}

/* --- Links --- */
a { color: #1a7a94; text-decoration: underline; transition: color 0.2s; }
a:visited { color: #5a8a96; }
a:hover { color: #0d4f63; }

/* --- Page wrapper — full-width so backgrounds reach the scrollbar --- */
#container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* All sections span the full viewport; content inside is centered */
#header,
#navigation,
#bodyarea,
#footer {
  width: 100%;
}

/* ==========================================================================
   Header
   ========================================================================== */
#header {
  position: relative;
  text-align: left;
  background: #0a1550;
}

.header-banner {
  width: 100%;
  background: #0a1550;
}

.header-banner .banner-desktop {
  width: 100%;
  max-width: 1240px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.header-banner .banner-mobile {
  display: none;
}

#title {
  display: none;
  padding: 14px 16px 4px;
  background: #0a1550;
}

#title h1 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

#title p {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: #c4a654;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* Search — content centered at 1240px, bg extends full-width */
#search_site {
  display: flex;
  justify-content: flex-end;
  padding: 10px 16px;
  background: #10235f;
  max-width: 1240px;
  margin: 0 auto;
  box-shadow: -100vw 0 0 #10235f, 100vw 0 0 #10235f;
}

#search_site form {
  display: flex;
  width: 100%;
  max-width: 360px;
}

#search_site fieldset {
  display: flex;
  border: none;
  margin: 0;
  padding: 0;
  width: 100%;
}

#search_site input[type="search"],
#search_site .textfield {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 4px 0 0 4px;
  outline: none;
  min-width: 0;
}

#search_site input[type="search"]:focus,
#search_site .textfield:focus {
  border-color: #52B3CE;
}

#search_site input[type="submit"] {
  padding: 6px 14px;
  background: #000E60;
  color: #fff;
  border: 1px solid #000E60;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
}

#search_site input[type="submit"]:hover {
  background: #020A37;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
#navigation {
  background: #000E60;
  border-radius: 0;
  display: flex;
  justify-content: center;
}

#navigation .menu_primary,
#navigation > .menu_primary {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 1240px;
  width: 100%;
}

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

#navigation li {
  display: block;
}

#navigation a,
#navigation a:visited {
  display: block;
  color: #fff;
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 0 14px;
  line-height: 38px;
  transition: background-color 0.2s;
}

#navigation li:hover a,
#navigation li.active a,
#navigation a:hover {
  background: #020A37;
}

/* Secondary nav */
#navigation .menu_secondary {
  background: transparent;
  padding: 0 15px;
}

#navigation .menu_secondary a {
  line-height: 28px;
  font-size: 0.72rem;
  color: #aab;
}

#navigation .menu_secondary a:hover {
  background: #020A37;
  color: #fff;
}

/* Hamburger — hidden on desktop (high specificity to override CMS base) */
#navigation button.nav-toggle {
  display: none !important;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
}

#navigation .nav-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* ==========================================================================
   Body area (main content)
   ========================================================================== */
#bodyarea {
  background: #CEF6E3;
  text-align: left;
  flex: 1;
  border-top: 3px solid #000E60;
  border-bottom: 2px solid #678893;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Column grid — flex row on desktop, centered within full-width bodyarea */
#bodyarea > .col_full {
  display: flex;
  flex-wrap: nowrap;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
}

.col_full {
  width: 100%;
}

.col_small,
.store_sidebar {
  flex: 0 0 220px;
  padding: 15px 12px;
  font-size: 0.9em;
}

.col_medium {
  flex: 1 1 0;
  min-width: 0;
  padding: 20px 15px;
}

.col_large,
.store_main_content {
  flex: 1 1 0;
  min-width: 0;
  padding: 20px 15px;
}

.spacing {
  margin-bottom: 15px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
#footer {
  text-align: center;
  padding: 15px 20px 25px;
  background: #0e1b4d;
}

#footer > .col_full {
  max-width: 1240px;
  margin: 0 auto;
}

#footer p {
  margin: 0 auto 0.8em;
  color: #9aa8c4;
  font-size: 0.82rem;
}

#footer a,
#footer a:visited {
  color: #b0bcd8;
  border-bottom: 1px dotted #b0bcd8;
}

/* ==========================================================================
   Content elements
   ========================================================================== */

/* Lists */
#bodyarea ul, #bodyarea ol { margin: 4px 25px 10px; }
#bodyarea .col_small ul, .store_sidebar ul,
#bodyarea .col_small ol, .store_sidebar ol { margin: 0; }
#bodyarea ul { list-style: disc; }

/* News items */
.newsitemsmall { float: right; margin: 0 0 1em 1em; }
.content_item { border-bottom: 1px solid #ccc; padding-bottom: 10px; }
.meta { margin-top: 0; padding: 0; font-size: 0.8em; color: #777; font-weight: 700; }
.content_item h3 { margin-bottom: 0; padding: 0; }

/* Image captions */
.imagecaption {
  float: right; margin: 0 0 1em 1em; padding: 2px;
  border: 1px solid #aaa; background: #eee; max-width: 240px;
}
.imagecaption img { display: block; }
.imagecaption p { margin: 0; font-size: 0.9em; }

/* Functions bar */
.functions { padding: 1.5em 0; margin: 0; }
.functions p { background: #CEE7ED; margin: 0 -15px; padding: 6px 14px; }
.functions a, .functions a:visited {
  color: #333; border: 0; padding: 6px 8px 6px 26px;
  background: url(../images/icon-add.gif) 6px 6px no-repeat;
}
.functions a:hover { color: #111; background-color: #A5D3DF; }

/* Edit link */
.content_item a.edit,
.meta a.edit {
  padding: 3px 2px 3px 20px;
  background: url(../images/icon-edit.gif) no-repeat 0 0;
  border: 0;
}

/* Pagination */
#paginate {
  clear: both; background: #CEE7ED;
  margin: 1.5em -15px; padding: 6px 0;
  overflow: hidden;
}
#paginate .next { float: right; }
#paginate .previous { float: left; }
#paginate a { color: #333; padding: 8px 20px; background: #A5D3DF; }
#paginate a:visited { color: #555; }
#paginate a:hover { color: #111; background: #8DC3D0; }

/* Calendar */
#event_calendar { width: 100%; border-collapse: collapse; }
#event_calendar td, #event_calendar th { width: 14%; vertical-align: top; }
#event_calendar th { text-align: center; padding: 4px 3px; font-weight: 700; background: #ddd; }
#event_calendar td {
  height: 10em; padding: 3px; background: #eee;
  border-top: 2px solid #ccc; font-size: 0.85em; overflow: auto;
}
#event_calendar td a,
#event_calendar td a:visited {
  padding: 2px; display: block; background: #CEE7ED; color: #333;
  border: 1px solid #ACD1D9; border-radius: 4px; margin: 2px 0;
}
#event_calendar td a:hover { background: #ACD1D9; }
#event_calendar ul { margin: 0; list-style: none; }
#event_calendar p { margin: 0; font-weight: 700; display: inline; }

/* Calendar subscribe */
.subscribe { text-align: center; }
.subscribe a, .subscribe a:visited, .subscribe a:hover { background: transparent; border: 0; }

/* Sort controls */
.sort { font-size: 0.8em; }
.sort ul { margin: 0; padding: 0; overflow: hidden; }
.sort li { display: inline; }
.sort a {
  color: #555; background: #A5D3DF url(../images/icon-view.gif) 4px 4px no-repeat;
  padding: 2px 4px 2px 24px; margin: 0 2px; border-radius: 2px;
}
.sort a:hover { background-color: #90C0CC; color: #333; }
.sort select { font-size: 0.9em; border: 4px solid #A5D3DF; background: #A5D3DF; border-radius: 2px; margin: 0 2px; }

/* Gallery */
.thumb { float: left; }
.thumbnails { overflow: hidden; }
.thumbnails a { padding: 0; margin: 0; border: 0; }
.thumbnails a:hover { background: transparent; }
.thumbnails img { border: 2px solid #ccc; margin-right: 5px; }
.thumbnails a:hover img { border-color: #A6A853; }

.content_item .thumb { display: inline; float: none; }
.content_item a { padding: 0; border: 0; }

/* Search results */
#searchcontent {
  padding: 0 14px 8px;
  text-align: right;
}
#searchcontent .textfield { width: 140px; background: #F6F7D7; border: 1px solid #C2C48D; padding: 2px; }
#searchcontent .submitbutton { font-size: 0.78em; font-weight: 700; padding: 2px 4px; background: #A5D3DF; border: 2px solid #ddd; }

/* Store */
#bodyarea #buysteps { margin: 0 0 10px; color: #fff; font-size: 85%; background: #678893; }
#bodyarea #buysteps ul { padding: 4px 10px; margin: 0; list-style: none; }
#bodyarea #buysteps ul li { padding: 0 10px 0 0; display: inline; }
#bodyarea #buysteps ul li.current { font-weight: 700; }

#bodyarea ul.products_list { list-style: none; padding: 0; margin: 0; }
#bodyarea ul.products_list li { padding: 10px 0 0; margin: 0; border-top: 1px solid #89b7c4; overflow: hidden; }
#bodyarea ul.products_list li .product_img { float: left; width: 120px; }
#bodyarea ul.products_list li .product_img a { padding: 0; }
#bodyarea ul.products_list li .product_img img { display: block; margin: 0 0 10px; }
#bodyarea ul.products_list li .product_desc { margin-left: 130px; }
#bodyarea ul.products_list li p { padding: 0 0 10px; margin: 0; }
#bodyarea #cart p { text-align: right; font-size: 85%; margin: 0; padding: 10px 20px 0; }
#bodyarea table.products_list,
#bodyarea .summary table { margin: 0 0 40px; border-collapse: collapse; width: 100%; }
#bodyarea table.products_list th, #bodyarea .summary table th { padding: 3px; }
#bodyarea table.products_list td, #bodyarea .summary table td { padding: 3px; border-top: 1px solid #89b7c4; }

h4.AbstractTitle { padding: 10px 0 0; }
#color_key ul li { clear: both; }
ul.subscribe_nav { margin: 0 !important; }
.upcoming_events { padding-bottom: 10px; }
ul.podcasts_list li { border-bottom: 1px solid #52B3CE; }
ul.podcasts_list li:last-child { border-bottom: none; }

.nalivemedia-live-media-widget a { border: 0 !important; background: 0 !important; }

/* ==========================================================================
   Tablet  (<=1024px)
   ========================================================================== */
@media (max-width: 1024px) {
  .col_small, .store_sidebar { flex: 0 0 180px; }

  #title h1 { font-size: 1.5rem; }
}

/* ==========================================================================
   Mobile  (<=768px)
   ========================================================================== */
@media (max-width: 768px) {

  /* Stack columns vertically — hero (center) first, then left, then right */
  #bodyarea > .col_full {
    flex-direction: column;
  }

  .col_small,
  .col_medium,
  .col_large,
  .store_sidebar,
  .store_main_content {
    flex: none;
    width: 100%;
  }

  .col_medium,
  .col_large { order: -1; }

  /* Header — swap to mobile banner */
  #header { border-radius: 0; }
  .header-banner .banner-desktop { display: none; }
  .header-banner .banner-mobile {
    display: block;
    width: 100%;
    height: auto;
  }
  #title {
    display: none;
    padding: 0;
  }
  #title h1 { font-size: 1.3rem; }
  #search_site {
    justify-content: stretch;
    padding: 8px 12px;
  }
  #search_site form {
    width: 100%;
    max-width: none;
  }
  #search_site fieldset { flex-wrap: nowrap; }
  #search_site input[type="search"],
  #search_site .textfield {
    padding: 8px 10px;
    font-size: 0.95rem;
  }
  #search_site input[type="submit"] {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 8px 12px;
    font-size: 0.95rem;
  }

  /* Show hamburger, hide nav */
  #navigation button.nav-toggle {
    display: flex !important;
    padding: 8px 12px;
  }

  #navigation {
    flex-direction: column;
    align-items: flex-start;
    border-radius: 0;
  }

  #navigation ul,
  #navigation .menu_primary ul {
    display: none !important;
    flex-direction: column;
    width: 100%;
  }

  #navigation .menu_primary,
  #navigation li {
    width: 100%;
  }

  #navigation.nav-open ul,
  #navigation.nav-open .menu_primary ul {
    display: flex !important;
  }

  #navigation a,
  #navigation a:visited {
    display: block;
    width: 100%;
    line-height: 40px;
    padding: 0 12px;
    border-top: 1px solid rgba(255,255,255,0.1);
  }

  /* Animated hamburger when open */
  .nav-open .nav-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-open .nav-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  /* Content adjustments */
  .newsitemsmall { float: none; margin: 0 0 1em; }
  .imagecaption { float: none; margin: 0 0 1em; max-width: 100%; }
  #paginate { margin: 1.5em 0; }
  .functions p { margin: 0; }

  #bodyarea ul.products_list li .product_img { float: none; width: auto; margin-bottom: 10px; }
  #bodyarea ul.products_list li .product_desc { margin-left: 0; }

  /* Calendar — horizontal scroll on small screens */
  #event_calendar { display: block; overflow-x: auto; }
}
