/*
 * Adrenergics Module styles
 * Works with the Bootstrap 5.2 reboot, grid and utilities files in css/.
 * Replaces custom.css and sticky-footer.css for these pages.
 * Pitt colors: blue #003594, gold #FFB81C.
 */
:root {
  --pitt-blue: #003594;
  --pitt-blue-dark: #00205b;
  --pitt-blue-tint: #e6ecf8;
  --pitt-gold: #ffb81c;
  --pitt-gold-tint: #fff4d9;
  --nav-h: 64px;
}

html { scroll-padding-top: calc(var(--nav-h) + 1.25rem); scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-top: var(--nav-h);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: #1d2330;
  background: #fff;
}
main { flex: 1 0 auto; }
a { color: #0b56c9; text-underline-offset: 2px; }
a:hover { color: var(--pitt-blue); }

/* ---------- Top navbar ---------- */
.site-navbar {
  background: var(--pitt-blue);
  min-height: var(--nav-h);
  border-bottom: 3px solid var(--pitt-gold);
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  z-index: 1030;
}
.site-navbar-inner { display: flex; flex-wrap: wrap; align-items: center; min-height: calc(var(--nav-h) - 3px); }
.navbar-brand {
  display: flex; align-items: center; gap: .6rem;
  color: #fff; font-size: 1.25rem; font-weight: 600; text-decoration: none; padding: .5rem 0;
}
.navbar-brand:hover { color: var(--pitt-gold); }
.navbar-brand img { height: 40px; width: auto; }
.site-menu { margin-left: auto; }
.site-menu-list { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.site-menu-link {
  display: block; padding: .5rem .8rem; color: rgba(255,255,255,.88);
  text-decoration: none; border-radius: .3rem;
}
.site-menu-link:hover, .site-menu-link:focus { color: #fff; background: rgba(255,255,255,.1); }
.site-menu-link.active { color: var(--pitt-gold); font-weight: 600; }
.navbar-toggler {
  display: none; margin-left: auto; width: 44px; height: 40px; padding: 9px 10px;
  background: transparent; border: 1px solid rgba(255,255,255,.4); border-radius: .4rem;
  flex-direction: column; justify-content: space-between;
}
.navbar-toggler span { display: block; height: 2px; background: #fff; border-radius: 1px; }
@media (max-width: 991.98px) {
  .navbar-toggler { display: flex; }
  .site-menu { display: none; flex-basis: 100%; margin: 0; padding-bottom: .5rem; }
  .site-menu.show { display: block; }
  .site-menu-list { flex-direction: column; }
  .site-menu-link.active { box-shadow: inset 3px 0 0 var(--pitt-gold); }
}

/* ---------- Page banner (was .main-header / .index-header in custom.css) ---------- */
.main-header {
  background: linear-gradient(135deg, var(--pitt-blue), var(--pitt-blue-dark));
  color: #fff;
  padding: 2.25rem 0 2rem;
  margin-bottom: 2rem;
  border-bottom: 5px solid var(--pitt-gold);
}
.main-header h1 { color: var(--pitt-gold); font-weight: 700; font-size: calc(1.6rem + 1.8vw); line-height: 1.1; margin-bottom: .4rem; }
@media (min-width: 1200px) { .main-header h1 { font-size: 3.25rem; } }
.main-header h2 { font-size: 1.35rem; font-weight: 400; color: #fff; margin: 0; }
.main-header p { margin: 0 0 .25rem; font-size: 1.15rem; font-weight: 300; }
.main-header p:last-child { margin-bottom: 0; }

/* ---------- Side menu: Pitt blue panel, gold marks the current section ---------- */
.side-nav {
  position: sticky;
  top: calc(var(--nav-h) + 1rem);
  max-height: calc(100vh - var(--nav-h) - 2rem);
  overflow-y: auto;
  background: var(--pitt-blue-tint);
  border: 2px solid var(--pitt-blue);
  border-radius: .75rem;
  box-shadow: 0 6px 18px rgba(0, 53, 148, .15);
}
.side-nav-title {
  margin: 0;
  padding: .8rem 1rem;
  background: var(--pitt-blue);
  color: var(--pitt-gold);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  border-bottom: 3px solid var(--pitt-gold);
}
.side-nav-list { list-style: none; margin: 0; padding: .5rem; counter-reset: section; }
.side-nav-list li + li { margin-top: 2px; }
.side-nav .nav-link {
  counter-increment: section;
  display: flex;
  gap: .65rem;
  align-items: flex-start;
  color: var(--pitt-blue-dark);
  font-size: .95rem;
  font-weight: 500;
  line-height: 1.35;
  text-decoration: none;
  padding: .55rem .7rem;
  border-left: 4px solid transparent;
  border-radius: .35rem;
  transition: background-color .15s, color .15s, border-color .15s;
}
.side-nav .nav-link::before {
  content: counter(section);
  flex: 0 0 1.5rem;
  height: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
  border: 1.5px solid var(--pitt-blue);
  color: var(--pitt-blue);
  font-size: .75rem;
  font-weight: 700;
}
.side-nav .nav-link:hover { background: var(--pitt-gold-tint); border-left-color: var(--pitt-gold); color: var(--pitt-blue); }
.side-nav .nav-link:focus-visible { outline: 3px solid var(--pitt-gold); outline-offset: 1px; }
.side-nav .nav-link.active {
  background: var(--pitt-blue);
  border-left-color: var(--pitt-gold);
  color: #fff;
  font-weight: 700;
}
.side-nav .nav-link.active::before { background: var(--pitt-gold); border-color: var(--pitt-gold); color: var(--pitt-blue-dark); }

.side-nav-toggle { display: none; }

/* Phones and tablets: a sticky Pitt-blue bar shows the current section; tap it for the full list */
@media (max-width: 991.98px) {
  html { scroll-padding-top: calc(var(--nav-h) + 5.5rem); }
  .side-nav-col {
    position: sticky;
    top: var(--nav-h);
    z-index: 1020;
    background: #fff;
    margin-bottom: 1.25rem;
    padding-top: .5rem;
    padding-bottom: .5rem;
  }
  .side-nav { position: relative; top: auto; max-height: none; overflow: visible; }
  .side-nav-title { display: none; }
  .side-nav-toggle {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    border: 0;
    border-radius: .6rem;
    background: var(--pitt-blue);
    padding: .55rem 2.75rem .6rem 1rem;
    text-align: left;
    position: relative;
    color: #fff;
  }
  .side-nav-toggle::after {
    content: "";
    position: absolute;
    right: 1.1rem;
    top: 50%;
    width: .65rem;
    height: .65rem;
    border-right: 2.5px solid var(--pitt-gold);
    border-bottom: 2.5px solid var(--pitt-gold);
    transform: translateY(-70%) rotate(45deg);
    transition: transform .2s;
  }
  .side-nav-toggle[aria-expanded="true"] { border-radius: .6rem .6rem 0 0; }
  .side-nav-toggle[aria-expanded="true"]::after { transform: translateY(-30%) rotate(-135deg); }
  .side-nav-toggle-label { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--pitt-gold); }
  .side-nav-current { font-weight: 600; font-size: .95rem; line-height: 1.3; }
  .side-nav-list {
    display: none;
    position: absolute;
    left: -2px; right: -2px; top: 100%;
    max-height: 60vh;
    overflow-y: auto;
    background: var(--pitt-blue-tint);
    border: 2px solid var(--pitt-blue);
    border-top: 3px solid var(--pitt-gold);
    border-radius: 0 0 .75rem .75rem;
    box-shadow: 0 12px 24px rgba(0,0,0,.18);
  }
  .side-nav-list.show { display: block; }
}

/* ---------- Content ---------- */
.module-content h2 {
  color: var(--pitt-blue);
  font-size: 1.65rem;
  font-weight: 700;
  margin: 2.75rem 0 1rem;
  padding-bottom: .45rem;
  border-bottom: 3px solid var(--pitt-gold);
}
.module-content > h2:first-child { margin-top: 0; }
.module-content h3 { font-size: 1.3rem; font-weight: 600; margin: 1.75rem 0 .6rem; color: #22304f; }
.module-content video { max-width: 100%; height: auto; border-radius: .4rem; background: #000; }
.module-content blockquote { border-left: 4px solid var(--pitt-blue-tint); padding: .25rem 0 .25rem 1rem; margin: .75rem 0 1rem; }
.module-content blockquote p { font-size: 1rem; }
.img-fluid { max-width: 100%; height: auto; border-radius: .4rem; }

/* Tables (Bootstrap 5 table look, without the full bootstrap.css) */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table > :not(caption) > * > * { padding: .55rem .6rem; }
.table-bordered td, .table-bordered th { border: 1px solid #d5dbe6; }
.module-content .table tr:first-child td { font-weight: 600; }
.table-success { background: #d1e7dd; }
.table-danger { background: #f8d7da; }
.table-light { background: #f8f9fa; }

/* Carried over from custom.css: announcement tables on the index/contents/quiz pages */
.table-announce { font-size: .95em; }
.table-announce td { border-top: 0; padding: .5rem; color: #000; }
.table-announce a { color: #0b56c9; }
.table-announce a:hover { color: var(--pitt-blue); }
.no-bottom-margin { margin-bottom: 0; }

/* Quiz answer explanations (were Bootstrap 3 .progress-bar-warning) */
.alert { padding: .9rem 1.1rem; margin: .75rem 0 1rem; border: 1px solid transparent; border-radius: .45rem; }
.alert-warning { background: var(--pitt-gold-tint); border-color: #f5d27a; border-left: 5px solid var(--pitt-gold); color: #4a3a00; }
.answer-explanation { font-size: .98rem; }

.next-part {
  display: block;
  margin: 3rem 0 1rem;
  padding: 1rem 1.25rem;
  border: 2px solid var(--pitt-blue);
  border-left: 6px solid var(--pitt-gold);
  border-radius: .5rem;
  background: var(--pitt-blue-tint);
  text-decoration: none;
}
.next-part:hover { background: var(--pitt-gold-tint); }
.next-part h3 { margin: 0; font-size: 1.2rem; color: var(--pitt-blue); }
.next-part h3::after { content: " \2192"; }

/* ---------- Footer (was sticky-footer.css) ---------- */
.site-footer { flex-shrink: 0; background: #f1f3f8; border-top: 3px solid var(--pitt-blue); padding: 1.25rem 0; margin-top: 3rem; }
.site-footer p { margin: 0; }
