/* ==========================================================================
   LITU — base design system + site header
   Loaded on every public page via header.php, so this file carries the design
   tokens, the reset, shared components (cards, buttons, tables) and the nav.
   Page-specific sheets (style.css, index-style.css) load after this one.
   ========================================================================== */

:root {
  /* Brand — deep academic green with a gold accent */
  --brand-900: #062617;
  --brand-800: #08381f;
  --brand-700: #0b4d2c;
  --brand-600: #0f6438;
  --brand-500: #16794a;
  --brand-50:  #eef6f1;

  --accent:      #c9a227;
  --accent-soft: #f6ebc6;

  /* Neutrals */
  --ink-900: #101815;
  --ink-700: #2c3a34;
  --ink-500: #5c6b64;
  --ink-300: #8d9a94;
  --line:    #e2e8e5;
  --surface: #ffffff;
  --bg:      #f4f7f5;

  /* Shape + depth */
  --r-sm: 8px;
  --r:    14px;
  --r-lg: 22px;
  --sh-1: 0 1px 2px rgba(16, 24, 21, .06), 0 2px 8px rgba(16, 24, 21, .05);
  --sh-2: 0 4px 12px rgba(16, 24, 21, .08), 0 12px 32px rgba(16, 24, 21, .08);
  --sh-3: 0 18px 48px rgba(16, 24, 21, .16);

  --wrap: 1180px;
  --header-h: 104px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Noto Sans", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  padding-top: var(--header-h);          /* clears the fixed header */
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-700);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

h1, h2, h3, h4, h5 {
  margin: 0 0 .5em;
  color: var(--ink-900);
  line-height: 1.2;
  letter-spacing: -.015em;
  font-weight: 700;
}

h1 { font-size: clamp(2rem, 1.4rem + 2.2vw, 3rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.05rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.12rem; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--brand-600); text-decoration: none; }
a:hover { color: var(--brand-800); text-decoration: underline; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   Header — fixed, two tiers: slim auth bar over the main nav
   -------------------------------------------------------------------------- */

header {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--surface);
  box-shadow: 0 1px 0 var(--line), 0 6px 24px rgba(16, 24, 21, .07);
}

.top-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
  height: 38px;
  padding: 0 clamp(16px, 4vw, 44px);
  background: var(--brand-900);
}

.top-bar a {
  color: rgba(255, 255, 255, .82);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .02em;
  padding: 5px 12px;
  border-radius: 999px;
  margin: 0;
  transition: background .18s ease, color .18s ease;
}

.top-bar a:hover {
  color: #fff;
  background: rgba(255, 255, 255, .12);
  text-decoration: none;
}

/* Make the second auth link read as the primary action */
.header-auth-links a:last-child {
  background: var(--accent);
  color: var(--brand-900);
}
.header-auth-links a:last-child:hover {
  background: #dcb62f;
  color: var(--brand-900);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  height: calc(var(--header-h) - 38px);
  padding: 0 clamp(16px, 4vw, 44px);
  background: var(--surface);
}

.main-nav .logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  text-decoration: none;
}
.main-nav .logo:hover { text-decoration: none; }

.main-nav .logo img {
  height: 46px;
  width: 46px;
  max-width: none;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--brand-700);
  padding: 2px;
  background: #fff;
}

/* Wordmark beside the crest — the logo image alone reads as unbranded */
.main-nav .logo::after {
  content: "Long Island Technical University";
  display: block;
  max-width: 13ch;
  font-size: .92rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.01em;
  color: var(--brand-800);
}

.main-nav nav { margin-left: auto; }

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-nav ul li { position: relative; }

.main-nav ul li a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  font-size: .95rem;
  font-weight: 600;
  color: var(--ink-700);
  white-space: nowrap;
  transition: background .18s ease, color .18s ease;
}

.main-nav ul li a:hover {
  background: var(--brand-50);
  color: var(--brand-700);
  text-decoration: none;
}

.main-nav ul li a b {
  font-size: .6rem;
  opacity: .6;
  transition: transform .2s ease;
}
.main-nav ul li:hover > a b { transform: translateY(1px); }

/* Dropdown panels */
.main-nav ul li ul {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  display: grid;
  gap: 2px;
  min-width: 240px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--sh-3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}

/* Invisible bridge so the panel survives the gap on the way down */
.main-nav ul li ul::before {
  content: "";
  position: absolute;
  top: -12px; left: 0; right: 0;
  height: 12px;
}

.main-nav ul li:hover > ul {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* The Departments menu is long — split it into two columns */
.main-nav ul li:nth-child(4) ul {
  grid-template-columns: 1fr 1fr;
  min-width: 460px;
  right: 0;
  left: auto;
}

.main-nav ul li ul li a {
  padding: 9px 12px;
  font-weight: 500;
  font-size: .9rem;
  color: var(--ink-700);
  border-radius: var(--r-sm);
}

.main-nav ul li ul li a:hover {
  background: var(--brand-700);
  color: #fff;
}

.menuToggle { display: none; }

/* --------------------------------------------------------------------------
   Shared page furniture
   -------------------------------------------------------------------------- */

/* Shared content container. Defined here rather than in style.css because the
   undergraduate/graduate pages only load this sheet. */
#main {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 56px) clamp(16px, 4vw, 32px) 72px;
}

.page-head {
  margin-bottom: 28px;
  text-align: center;
}

.page-head h1 { margin: 0 0 10px; }

.page-head > p {
  max-width: 62ch;
  margin: 0 auto;
  color: var(--ink-500);
  font-size: 1.05rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  padding: clamp(22px, 3.5vw, 40px);
}

.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  padding: 5px 13px;
  border-radius: 999px;
  background: var(--brand-50);
  color: var(--brand-700);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border: 0;
  border-radius: 999px;
  background: var(--brand-700);
  color: #fff;
  font: inherit;
  font-weight: 650;
  font-size: .97rem;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.btn:hover {
  background: var(--brand-600);
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--sh-2);
}

.btn-ghost {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, .55);
}
.btn-ghost:hover { background: rgba(255, 255, 255, .14); border-color: #fff; }

.btn-outline {
  background: transparent;
  color: var(--brand-700);
  border: 1.5px solid var(--brand-700);
}
.btn-outline:hover { background: var(--brand-700); color: #fff; }

/* Tables — used by the calendar and the master schedule */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  font-size: .95rem;
}

thead th {
  background: var(--brand-700);
  color: #fff;
  text-align: left;
  font-weight: 650;
  font-size: .82rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 14px 18px;
  border: 0;
}

tbody td {
  padding: 13px 18px;
  border: 0;
  border-top: 1px solid var(--line);
  vertical-align: top;
}

tbody tr:nth-child(even) { background: #fafbfa; }
tbody tr:hover { background: var(--brand-50); }

/* --------------------------------------------------------------------------
   Undergraduate / Graduate pages (.wrapper3) — heading + body pairs that were
   spaced apart with stacks of <br>. Suppress those and lay them out as cards.
   -------------------------------------------------------------------------- */

#UndergraduateContainer,
#GraduateContainer {
  padding-top: 0;
}

/* h4 and h5 alternate as separate grid items, so the spacing has to come from
   the h5 (the bottom half of each card) — a grid gap would split the pair. */
.wrapper3 {
  display: grid;
  gap: 0;
}

.wrapper3 br { display: none; }

.wrapper3 h4 {
  margin: 0;
  padding: 26px 28px 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  font-size: 1.24rem;
  color: var(--brand-800);
  box-shadow: var(--sh-1);
}

.wrapper3 h4::before {
  content: "";
  display: block;
  width: 46px;
  height: 4px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: var(--accent);
}

.wrapper3 h5 {
  margin: 0 0 18px;
  padding: 12px 28px 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 var(--r-lg) var(--r-lg);
  box-shadow: var(--sh-1);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--ink-700);
  letter-spacing: 0;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1040px) {
  .main-nav ul li a { padding: 10px 10px; font-size: .9rem; }
  .main-nav .logo::after { display: none; }
}

@media (max-width: 900px) {
  :root { --header-h: 96px; }

  .main-nav { gap: 12px; }
  .main-nav nav {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--surface);
    border-top: 1px solid var(--line);
    box-shadow: var(--sh-2);
    display: none;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }
  header.active nav { display: block; }

  .main-nav .logo::after { display: block; max-width: none; }

  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px;
  }

  .main-nav ul li a { padding: 13px 14px; font-size: 1rem; }

  /* Nested lists become inline accordions toggled by the ▼ */
  .main-nav ul li ul,
  .main-nav ul li:nth-child(4) ul {
    position: static;
    display: none;
    grid-template-columns: 1fr;
    min-width: 0;
    box-shadow: none;
    border: 0;
    border-left: 3px solid var(--brand-50);
    border-radius: 0;
    margin: 0 0 6px 14px;
    padding: 2px 0 2px 8px;
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .main-nav ul li.active > ul { display: grid; }
  .main-nav ul li:hover > ul { opacity: 1; visibility: visible; }

  .menuToggle {
    position: relative;
    display: block;
    height: 42px;
    width: 42px;
    margin-left: auto;
    cursor: pointer;
    border-radius: var(--r-sm);
  }
  .menuToggle::before,
  .menuToggle::after {
    content: "";
    position: absolute;
    left: 8px;
    top: 50%;
    width: 26px;
    height: 2.5px;
    border-radius: 2px;
    background: var(--brand-800);
    transition: transform .3s ease;
  }
  .menuToggle::before { transform: translateY(-6px); }
  .menuToggle::after  { transform: translateY(6px); }

  header.active .menuToggle::before { transform: rotate(45deg); }
  header.active .menuToggle::after  { transform: rotate(-45deg); }

  .main-nav nav { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
