:root {
  --pgh-navy: #1b3a4b;
  --pgh-navy-light: #2c5f7c;
  --pgh-gold: #c8a951;
  --pgh-gold-light: #e6cf8a;
  --pgh-white: #ffffff;
  --pgh-gray-50: #f8f9fa;
  --pgh-gray-100: #e9ecef;
  --pgh-gray-200: #dee2e6;
  --pgh-gray-300: #ced4da;
  --pgh-gray-600: #6c757d;
  --pgh-gray-800: #343a40;
  --pgh-gray-900: #212529;
  --pgh-red: #c0392b;
  --pgh-green: #5a8a3c;
  --pgh-blue-accent: #076fe5;
  --font-heading: "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Segoe UI", system-ui, -apple-system, sans-serif;
  --max-width: 1200px;
  --transition: 0.25s ease;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--pgh-gray-900);
  background: var(--pgh-gray-50);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--pgh-navy-light);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover,
a:focus {
  color: var(--pgh-gold);
  text-decoration: underline;
}

a:focus-visible {
  outline: 3px solid var(--pgh-gold);
  outline-offset: 2px;
  border-radius: 2px;
}

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

/* ===== HEADER / NAV ===== */

/* Bootstrap navbar + City branding */
.site-header.navbar {
  background: var(--pgh-navy) !important;
  color: var(--pgh-white);
  padding: 0.5rem 0;
  z-index: 1030;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.site-header .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.35);
}

.site-header .navbar-toggler-icon {
  filter: invert(1);
}

.site-header .navbar-nav .nav-link {
  color: var(--pgh-gray-200);
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
}

.site-header .navbar-nav .nav-link:hover,
.site-header .navbar-nav .nav-link:focus {
  background: rgba(255, 255, 255, 0.1);
  color: var(--pgh-white);
}

.site-header .navbar-nav .nav-link.active,
.site-header .navbar-nav .nav-link[aria-current="page"] {
  background: var(--pgh-gold);
  color: var(--pgh-navy);
  font-weight: 600;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--pgh-white);
}

.header-brand:hover {
  color: var(--pgh-gold-light);
  text-decoration: none;
}

.header-brand img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.header-brand span {
  font-size: 1.15rem;
  font-weight: 700;
  font-family: var(--font-heading);
  letter-spacing: 0.02em;
}

.site-header .nav-link {
  text-decoration: none;
}

.site-header .nav-link:hover,
.site-header .nav-link:focus {
  text-decoration: none;
}

/* ===== HERO ===== */

.hero {
  background: var(--pgh-navy);
  color: var(--pgh-white);
  text-align: center;
  padding: 4rem 1.5rem 3.5rem;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.2;
  color: var(--pgh-white);
}

.hero h1 .accent {
  color: #ffffff;
  font-weight: 900;
  border-bottom: 3px solid var(--pgh-gold);
  padding-bottom: 0.05em;
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  max-width: 700px;
  margin: 0 auto 2rem;
  line-height: 1.7;
  color: #ffffff;
  opacity: 1;
}

/* ===== BUTTONS ===== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
}

.btn:focus-visible {
  outline: 3px solid var(--pgh-gold);
  outline-offset: 2px;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--pgh-gold);
  color: var(--pgh-navy);
  border-color: var(--pgh-gold);
}

.btn-primary:hover {
  background: var(--pgh-gold-light);
  border-color: var(--pgh-gold-light);
  color: var(--pgh-navy);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(200, 169, 81, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--pgh-white);
  border-color: var(--pgh-white);
}

.btn-secondary:hover {
  background: var(--pgh-white);
  color: var(--pgh-navy);
}

/* Hero: secondary CTA needs solid contrast on navy (WCAG AA) */
.hero .btn-secondary {
  background: var(--pgh-white);
  color: var(--pgh-navy);
  border-color: var(--pgh-white);
}

.hero .btn-secondary:hover {
  background: var(--pgh-gold-light);
  border-color: var(--pgh-gold-light);
  color: var(--pgh-navy);
}

.btn-outline {
  background: transparent;
  color: var(--pgh-navy);
  border-color: var(--pgh-navy);
}

.btn-outline:hover {
  background: var(--pgh-navy);
  color: var(--pgh-white);
}

.btn-sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.9rem;
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
}

/* ===== SECTION LAYOUT ===== */

.section {
  padding: 4rem 1.5rem;
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  color: var(--pgh-navy);
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.section-header h2 .section-header-heading-link {
  color: inherit;
  font-weight: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(27, 58, 75, 0.35);
  text-underline-offset: 0.12em;
}

.section-header h2 .section-header-heading-link:hover,
.section-header h2 .section-header-heading-link:focus {
  color: var(--pgh-navy-light);
  text-decoration-color: var(--pgh-gold);
}

.section-header p {
  color: var(--pgh-gray-600);
  font-size: 1.05rem;
  max-width: 650px;
  margin: 0 auto;
}

/* Section intros on gray page background need darker text than on white cards */
.section:not(.bg-white) .section-header p {
  color: var(--pgh-gray-800);
}

/* ===== TOUR SECTION CARDS (Bootstrap row + .pgh-card) ===== */

.pgh-card {
  background: var(--pgh-white);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--pgh-gray-200);
  transition: transform var(--transition), box-shadow var(--transition);
}

.pgh-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.pgh-card-icon {
  width: 48px;
  height: 48px;
  background: var(--pgh-navy);
  color: var(--pgh-gold);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.pgh-card h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--pgh-navy);
  margin-bottom: 0.5rem;
}

.pgh-card p {
  color: var(--pgh-gray-600);
  font-size: 0.95rem;
  line-height: 1.6;
}

.pgh-card .btn {
  margin-top: 1.25rem;
}

/* ===== TOUR PAGE LAYOUT ===== */

.tour-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.tour-content {
  flex: 1;
  width: 100%;
}

.tour-intro {
  background: var(--pgh-white);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  border: 1px solid var(--pgh-gray-200);
}

.tour-intro h2 {
  font-family: var(--font-heading);
  color: var(--pgh-navy);
  margin-bottom: 0.75rem;
  font-size: 1.5rem;
}

.tour-intro p {
  color: var(--pgh-gray-600);
  margin-bottom: 1rem;
  line-height: 1.7;
}

.screenshot-container {
  position: relative;
  background: var(--pgh-white);
  border-radius: 12px;
  /* Allow hotspot borders/labels to extend beyond screenshot edges. */
  overflow: visible;
  border: 1px solid var(--pgh-gray-200);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.screenshot-container img {
  width: 100%;
  display: block;
  border-radius: 12px;
}

/* Overlay hotspots for tour steps */
.hotspot {
  position: absolute;
  border: 3px solid var(--pgh-gold);
  border-radius: 8px;
  background: rgba(200, 169, 81, 0.08);
  cursor: pointer;
  transition: all var(--transition);
  z-index: 2;
}

.hotspot:hover {
  background: rgba(200, 169, 81, 0.2);
  box-shadow: 0 0 0 4px rgba(200, 169, 81, 0.25);
}

.hotspot-label {
  position: absolute;
  /* Keep the step badge INSIDE the hotspot so it never clips
     when a hotspot sits on the screenshot edges (e.g., step #1). */
  top: 8px;
  left: 8px;
  right: auto;
  transform: none;
  width: 28px;
  height: 28px;
  background: var(--pgh-gold);
  color: var(--pgh-navy);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Step #2: place badge on far-right middle of the hotspot */
#hs-nav .hotspot-label {
  top: 50%;
  right: 8px;
  left: auto;
  transform: translateY(-50%);
}

/* Map step #3: badge top-right of filter instructions hotspot */
#hs-filter-text .hotspot-label {
  top: 8px;
  right: 8px;
  left: auto;
  bottom: auto;
  transform: none;
}

/* Map step #4: badge far-right middle of the hotspot */
#hs-filters .hotspot-label {
  top: 50%;
  right: 8px;
  left: auto;
  transform: translateY(-50%);
}

/* Map step #5: badge bottom-right of record-types hotspot */
#hs-record-types .hotspot-label {
  top: auto;
  bottom: 8px;
  right: 8px;
  left: auto;
  transform: none;
}

/* Map step #7: narrow toolbar strip — badge centered in hotspot */
#hs-map-toolbar .hotspot-label {
  top: 50%;
  left: 50%;
  right: auto;
  bottom: auto;
  transform: translate(-50%, -50%);
}

/* Map steps #9–10 (records table & legend): middle-right */
#hs-table .hotspot-label,
#hs-legend .hotspot-label {
  top: 50%;
  left: auto;
  right: 8px;
  transform: translateY(-50%);
}

#hs-description .hotspot-label,
#hs-table-detail .hotspot-label {
  top: auto;
  bottom: 8px;
  transform: none;
}

/* Stats step #3: move badge to the right side */
#hs-bar-chart .hotspot-label {
  left: auto;
  right: 8px;
}

/* Search tour: custom badge positions (steps 1–3) */
#hs-search-map .hotspot-label {
  top: auto;
  bottom: 8px;
  left: 8px;
  right: auto;
  transform: none;
}

#hs-map-search-bar .hotspot-label {
  top: 50%;
  left: auto;
  right: 8px;
  transform: translateY(-50%);
}

#hs-record-header .hotspot-label {
  top: 50%;
  left: 50%;
  right: auto;
  transform: translate(-50%, -50%);
}

#hs-record-subscribe .hotspot-label {
  top: 50%;
  left: auto;
  right: 8px;
  transform: translateY(-50%);
}

#hs-record-body .hotspot-label {
  top: 50%;
  left: auto;
  right: 8px;
  transform: translateY(-50%);
}

/* Notifications tour: badge placement */
#hs-notif-map .hotspot-label {
  top: 10px;
  left: auto;
  right: 10px;
  bottom: auto;
  transform: none;
}

#hs-notif-intro-boundary .hotspot-label,
#hs-area-select .hotspot-label {
  top: auto;
  bottom: 8px;
  left: auto;
  right: 8px;
  transform: none;
}

#hs-notif-subscribe .hotspot-label {
  top: auto;
  bottom: 8px;
  left: auto;
  right: 8px;
  transform: none;
}

/* Subscribe hotspot sits on top of the map hotspot where they overlap */
#screenshot .hotspot[data-step="3"] {
  z-index: 2;
}

#screenshot .hotspot[data-step="4"] {
  z-index: 3;
}

/* ===== TOUR NAVIGATION BAR ===== */

.tour-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  background: var(--pgh-white);
  border-top: 1px solid var(--pgh-gray-200);
  gap: 1rem;
  flex-wrap: wrap;
}

.tour-nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.tour-progress {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--pgh-gray-600);
}

.tour-progress-bar {
  width: 120px;
  height: 6px;
  background: var(--pgh-gray-200);
  border-radius: 3px;
  overflow: hidden;
}

.tour-progress-fill {
  height: 100%;
  background: var(--pgh-gold);
  border-radius: 3px;
  transition: width 0.4s ease;
}

/* ===== DEPARTMENTS LIST ===== */

.dept-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.dept-list li {
  background: var(--pgh-white);
  padding: 1.25rem;
  border-radius: 8px;
  border-left: 4px solid var(--pgh-gold);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.dept-list li strong {
  color: var(--pgh-navy);
  display: block;
  margin-bottom: 0.25rem;
}

.dept-list li span {
  color: var(--pgh-gray-600);
  font-size: 0.9rem;
}

/* ===== RECORD TYPE BADGES ===== */

.record-types {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.badge {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-ce { background: #f8d7da; color: #721c24; }
.badge-za { background: #cce5ff; color: #004085; }
.badge-pli { background: #d4edda; color: #155724; }
.badge-cd { background: #e2d5f1; color: #3c1f6e; }
.badge-cr { background: #ffeeba; color: #856404; }
.badge-rr { background: #fff3cd; color: #856404; }
.badge-dp { background: #d1ecf1; color: #0c5460; }
.badge-dpl { background: #f5c6cb; color: #721c24; }

/* ===== FOOTER ===== */

.site-footer {
  background: var(--pgh-navy);
  color: rgba(255, 255, 255, 0.92);
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: 0.9rem;
}

.site-footer .site-footer-tagline {
  color: rgba(255, 255, 255, 0.95);
  max-width: 52rem;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0.75rem;
}

.site-footer .site-footer-cta {
  margin-bottom: 0;
  max-width: 52rem;
  margin-left: auto;
  margin-right: auto;
}

.site-footer .site-footer-cta .site-footer-inline-sep {
  color: rgba(255, 255, 255, 0.55);
  user-select: none;
}

.site-footer .site-footer-cta .site-footer-credit {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.95);
}

.site-footer a {
  color: var(--pgh-gold);
  font-weight: 600;
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus {
  color: var(--pgh-gold-light);
  text-decoration: underline;
}

/* ===== COMPLETION PAGE ===== */

.completion {
  text-align: center;
  padding: 5rem 1.5rem;
}

.completion h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--pgh-navy);
  margin-bottom: 1rem;
}

.completion p {
  color: var(--pgh-gray-600);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.completion .btn-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== INTRO.JS OVERRIDES — high-contrast tour UI (WCAG-friendly) ===== */

.introjs-tooltip {
  max-width: 400px;
  border-radius: 12px;
  font-family: var(--font-body);
  background-color: var(--pgh-white) !important;
  color: var(--pgh-gray-900) !important;
  border: 1px solid var(--pgh-gray-200);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.22);
}

.introjs-tooltip-title {
  font-family: var(--font-heading);
  color: var(--pgh-navy) !important;
  font-weight: 700;
}

.introjs-tooltiptext {
  line-height: 1.6;
  font-size: 0.95rem;
  color: var(--pgh-gray-800) !important;
}

.introjs-tooltiptext p {
  margin: 0 0 0.75rem 0;
}

.introjs-tooltiptext p:last-child {
  margin-bottom: 0;
}

.introjs-tooltiptext img.map-tour-legend-img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  margin: 0.35rem 0 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--pgh-gray-200);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.introjs-tooltiptext p:last-child img.map-tour-legend-img {
  margin-bottom: 0;
}

.introjs-tooltip .introjs-button {
  font-family: var(--font-body);
  border-radius: 8px;
  font-weight: 600;
  text-shadow: none !important;
  box-shadow: none !important;
  background-image: none !important;
  padding: 0.45rem 0.9rem !important;
  border: 2px solid transparent !important;
}

.introjs-button.introjs-prevbutton {
  color: var(--pgh-navy) !important;
  background-color: var(--pgh-gray-100) !important;
  border: 2px solid var(--pgh-navy) !important;
}

.introjs-button.introjs-prevbutton:hover,
.introjs-button.introjs-prevbutton:focus {
  background-color: var(--pgh-white) !important;
  color: var(--pgh-navy) !important;
  border-color: var(--pgh-navy-light) !important;
  outline: none;
}

.introjs-button.introjs-prevbutton.introjs-disabled {
  color: var(--pgh-gray-600) !important;
  background-color: var(--pgh-gray-100) !important;
  border-color: var(--pgh-gray-300) !important;
  opacity: 1;
}

.introjs-button.introjs-skipbutton {
  color: var(--pgh-navy) !important;
  background-color: var(--pgh-gray-100) !important;
  border: 2px solid var(--pgh-gray-300) !important;
  font-weight: 700 !important;
  min-width: 2.5rem;
  line-height: 1.2;
}

.introjs-button.introjs-skipbutton:hover,
.introjs-button.introjs-skipbutton:focus {
  background-color: #fff5f5 !important;
  border-color: var(--pgh-navy) !important;
  color: var(--pgh-navy) !important;
  outline: none;
}

.introjs-button.introjs-nextbutton,
.introjs-button.introjs-donebutton {
  background: var(--pgh-gold) !important;
  color: var(--pgh-navy) !important;
  border-color: var(--pgh-navy) !important;
}

.introjs-button.introjs-nextbutton:hover,
.introjs-button.introjs-donebutton:hover,
.introjs-button.introjs-nextbutton:focus,
.introjs-button.introjs-donebutton:focus {
  background: var(--pgh-gold-light) !important;
  border-color: var(--pgh-navy-light) !important;
  color: var(--pgh-navy) !important;
}

.introjs-helperLayer {
  border-radius: 8px;
}

.introjs-progressbar {
  background: var(--pgh-gold) !important;
}

/* Step dots: clearer on light tooltip */
.introjs-bullets ul li a {
  background: var(--pgh-gray-300) !important;
}

.introjs-bullets ul li a.active {
  background: var(--pgh-navy) !important;
}

/* Tooltip pointer arrows — match white panel */
.introjs-arrow.top,
.introjs-arrow.top-middle,
.introjs-arrow.top-right {
  border-bottom-color: var(--pgh-white) !important;
}

.introjs-arrow.bottom,
.introjs-arrow.bottom-middle,
.introjs-arrow.bottom-right {
  border-top-color: var(--pgh-white) !important;
}

.introjs-arrow.left,
.introjs-arrow.left-bottom {
  border-right-color: var(--pgh-white) !important;
}

.introjs-arrow.right,
.introjs-arrow.right-bottom {
  border-left-color: var(--pgh-white) !important;
}

/* Above Bootstrap sticky navbar (z-index 1030) */
.introjs-overlay,
.introjs-helperLayer,
.introjs-tooltipReferenceLayer {
  z-index: 1055 !important;
}

/* ===== SKIP LINK ===== */

.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--pgh-gold);
  color: var(--pgh-navy);
  padding: 0.75rem 1.5rem;
  z-index: 1060;
  font-weight: 600;
  border-radius: 0 0 8px 0;
}

.skip-link:focus {
  top: 0;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 768px) {
  .hero {
    padding: 3rem 1rem 2.5rem;
  }

  .section {
    padding: 2.5rem 1rem;
  }

  .tour-nav-inner {
    flex-direction: column;
    text-align: center;
  }

  .btn-lg {
    padding: 0.85rem 2rem;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 15px;
  }

  .header-brand span {
    font-size: 1rem;
  }

  .site-header .navbar-nav .nav-link {
    padding: 0.3rem 0.6rem;
    font-size: 0.85rem;
  }
}
