/* ========= ROOT / GLOBAL ========= */
:root {
  --umd-red: #d00000;
  --umd-gold: #ffd200;
  --umd-blue: #1d428a;
  --ink: #222;
  --footer-bg: #353c3f;
  --footer-dim: #6f7a80;
  --white: #fff;
  --card-shadow: 0 0 10px 2px rgba(0, 0, 0, .12);
  --border: #e5e7eb;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--ink);
  background: #f6f7fb;
}

/* ========= HEADER (common) ========= */
.umd-bar {
  background: var(--umd-red);
  color: #fff;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-align: center;
  font-weight: 700;
  font-size: .85rem;
  padding: .4rem 1rem;
}

.main-header {
  background: #fff;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px 18px;
  border-bottom: 1px solid #eee;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 260px;
  text-decoration: none;
  color: inherit;
}

.brand img {
  height: 80px;
  width: auto;
  display: block;
}

.brand-text {
  line-height: 1.1;
}

.brand-text .school {
  font-weight: 700;
  letter-spacing: .02em;
  font-size: 2.05rem;
  text-align: center;
}

.site-nav {
  
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}

.site-nav a[aria-current="page"] {
  text-decoration: underline;
}

.site-nav a:hover {
  opacity: .8;
}

.flag-strip {
  height: 6px;
  background: linear-gradient(to right, var(--umd-gold) 0 100%);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .06) inset;
}

/* ========= GENERIC PAGE / CARD ========= */
.page {
  max-width: 1000px;
  margin: 28px auto 32px;
  padding: 0 16px;
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  padding: 20px;
}

/* ========= FORMS (download/contact) ========= */
form {
  display: grid;
  gap: 18px;
  margin-top: 12px;
}

label {
  font-weight: 600;
}

input,
textarea {
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font: inherit;
  width: 100%;
  box-sizing: border-box;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.btn {
  background: #0481a5;
  color: #fff;
  padding: 12px 18px;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}

.btn:hover {
  filter: brightness(0.95);
}

.error {
  color: #b3261e;
  font-size: .85rem;
  margin-top: 4px;
  min-height: 1em;
}

.success {
  display: none;
  margin-bottom: 12px;
  padding: 10px;
  background: #e8f5e9;
  color: #216e39;
  font-weight: 600;
  border-radius: 8px;
}

/* For purpose character counter (if used) */
#purposeCount {
  font-size: .85rem;
  text-align: right;
  margin-top: 4px;
  min-height: 1em;
}

/* ========= METHODOLOGY TABLES ========= */
.card table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.95rem;
}

.card th,
.card td {
  border: 1px solid #ddd;
  padding: 8px 10px;
  vertical-align: top;
}

.card th {
  background: #f3f4f6;
  font-weight: 600;
  text-align: left;
}

.card h2 {
  margin-top: 1.6rem;
  font-size: 1.35rem;
}

.card h3 {
  margin-top: 1.2rem;
  font-size: 1.1rem;
}

/* ========= INDEX MAP LAYOUT ========= */
.map-app {
  /* wrapper for fullscreen behavior, already in your index.html JS */
}

.map-row {
  display: grid;
  grid-template-columns: minmax(400px, 1fr) 360px; /* map | sidebar */
  gap: 16px;
  align-items: start;
}

.info-row {
  display: grid;
  grid-template-columns: 1fr 1fr; /* infoBox | sourceBox */
  gap: 16px;
  margin-top: 16px;
}

.map-shell {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
  position: relative;
}

#viewDiv {
  width: 100%;
  height: 70vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#layerSelect {
  width: 100%;
  padding: .5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fafafa;
}

#legend {
  max-height: 550px;
  overflow: auto;
}

#infoBox,
#sourceBox {
  display: none;
  max-height: 400px;
  min-height: 220px;
  overflow: auto;
}

#popup {
  border: 1px dashed #999;
  border-radius: 10px;
  background: #fffbe6;
  padding: 10px;
}

.source-link {
  color: #0b57d0;
  text-decoration: none;
}

.source-link:hover {
  text-decoration: underline;
}

/* Fullscreen adjustments (used by index.html) */
.map-app:fullscreen,
.map-app:-webkit-full-screen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  background: #f6f7fb;
  z-index: 9999;
}

.map-app:fullscreen .map-row,
.map-app:-webkit-full-screen .map-row {
  height: 100vh;
  grid-template-columns: 1fr;
}

.map-app:fullscreen .map-shell,
.map-app:-webkit-full-screen .map-shell {
  height: 100%;
}

.map-app:fullscreen #viewDiv,
.map-app:-webkit-full-screen #viewDiv {
  width: 100%;
  height: 100%;
}

.map-app:fullscreen .sidebar,
.map-app:-webkit-full-screen .sidebar {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 360px;
  max-height: calc(100vh - 40px);
  overflow: visible;
  z-index: 10000;
}

.map-app:fullscreen .info-row,
.map-app:-webkit-full-screen .info-row {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 10000;
}

.map-app:fullscreen .card,
.map-app:-webkit-full-screen .card {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(4px);
}

/* Responsive for map layout */
@media (max-width: 980px) {
  .map-row {
    grid-template-columns: 1fr;
  }

  #viewDiv {
    height: 60vh;
  }

  .info-row {
    grid-template-columns: 1fr;
  }
}

/* ========= FOOTER (common) ========= */
.site-footer {
  background: var(--footer-bg);
  color: #eef2f5;
  padding: 28px 20px 16px;
  margin-top: 28px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-top {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 280px;
}

.footer-brand img {
  height: 70px;
}

.footer-brand .org {
  font-weight: 800;
}

.footer-meta {
  color: #cfd6db;
}

.assoc-logos {
  margin-left: auto;
  opacity: .65;
  display: flex;
  gap: 24px;
  align-items: center;
}

.socials {
  display: flex;
  gap: 10px;
}

.socials a {
  height: 36px;
  width: 36px;
  border-radius: 50%;
  background: #ffd200;
  display: grid;
  place-items: center;
  color: #111;
  font-weight: 800;
  text-decoration: none;
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.footer-links a {
  color: #e8ecf0;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

.copyright {
  color: var(--footer-dim);
  margin-top: 6px;
}

/* main-header can just be your flex container, no need for position: relative */
.main-header {
  background: #fff;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px 18px;
  border-bottom: 1px solid #eee;
}

/* Center the title safely using flexbox */
.brand-text {
  flex: 1;             /* takes the middle space between logo and right side */
  text-align: center;  /* centers the text inside that space */
}

/* Optional: make the title wrap if space is tight */
.brand-text .school {
  font-weight: 700;
  font-size: 2.05rem;  /* adjust if needed */
  text-align: center;
  white-space: normal; /* allow wrapping to avoid collisions */
}



.btn-contact {
  background: var(--umd-red);
  color: #fff !important;     /* ensures text stays white */
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-contact:hover {
  background: #b00000;
}

.btn-contact .arrow {
  font-size: 1.2rem;
  line-height: 1;
}

.nav-btn-row {
  margin: 6px 0 0 18px;   /* aligns left under the header */
  display: flex;
  justify-content: flex-start;
}



