/* =================================================== */
/* PARK EQUITY NYC — Redesigned Stylesheet             */
/* =================================================== */

/* --- Custom Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --accent-color: #007534;
  --accent-light: #e8f5ec;
  --accent-dark: #005a28;
  --secondary-color: #6C3FA0;
  --secondary-light: #f3eefa;
  --positive-color: #eaf5ef;
  --negative-color: #fee0e2;
  --text-primary: #1a1a2e;
  --text-secondary: #4a4a68;
  --text-muted: #7a7a8e;
  --surface-0: #ffffff;
  --surface-1: #f7f8fa;
  --surface-2: #eef0f4;
  --border-light: #e2e5ea;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.07), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.08), 0 4px 10px rgba(0,0,0,0.04);
  --radius: 12px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =================================================== */
/* Base & Typography                                   */
/* =================================================== */

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--text-primary);
  background: var(--surface-1);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'DM Serif Display', Georgia, serif;
}

h3 {
  color: var(--text-primary);
  font-weight: 400;
  font-size: 2rem;
  margin-top: 3.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.6rem;
  border-bottom: none;
  position: relative;
}

h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--accent-color);
  border-radius: 2px;
}

h4 {
  font-family: 'Inter', sans-serif;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

p {
  color: var(--text-secondary);
}

hr {
  border: 0;
  height: 2px; 
  background: linear-gradient(to right, transparent, #b0b5be, transparent); 
  width: 80%;
  margin: 4rem auto;
}

blockquote {
  background: var(--surface-1);
  border-left: 4px solid var(--accent-color);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

blockquote p {
  margin: 0;
  color: var(--text-muted);
}

/* =================================================== */
/* Navbar                                              */
/* =================================================== */

.navbar {
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,0.92) !important;
  border-bottom: 1px solid var(--border-light) !important;
  box-shadow: var(--shadow-sm);
  padding: 0.5rem 0;
}

.navbar .navbar-brand {
  font-weight: 600;
}

.navbar .nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary) !important;
  transition: color var(--transition);
  letter-spacing: 0.01em;
}

.navbar .nav-link:hover {
  color: var(--accent-color) !important;
}

/* =================================================== */
/* Banner / Hero                                       */
/* =================================================== */

#title-block-header {
  margin-block-end: 0;
}

.quarto-title-banner {
  height: 520px;
  background-size: cover;
  background-position: center 65%;
  position: relative;
}

.quarto-title-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 15, 20, 0.85) 0%,
    rgba(10, 15, 20, 0.5) 40%,
    rgba(10, 15, 20, 0.15) 100%
  );
  z-index: 1;
}

.quarto-title-banner .quarto-title-banner-content {
  position: relative;
  z-index: 2;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding-bottom: 2.5rem;
}

#title-block-header .quarto-title-banner .title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 3.2rem;
  font-weight: 400;
  color: white;
  background: none;
  padding: 0;
  border-radius: 0;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
  line-height: 1.2;
}

#title-block-header .quarto-title-banner .subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 1.15rem;
  font-weight: 300;
  color: rgba(255,255,255,0.88);
  background: none;
  padding: 0;
  border-radius: 0;
  margin-top: 0.75em;
  text-shadow: 0 1px 10px rgba(0,0,0,0.2);
  letter-spacing: 0.01em;
}

/* =================================================== */
/* Main Content Area                                   */
/* =================================================== */

#quarto-content {
  background: var(--surface-0);
}

.page-columns .column-body {
  /* subtle breathing room */
}

/* Intro section — give the leading paragraph more presence */
#quarto-content > .page-columns > .column-body > .grid:first-of-type {
  background: var(--surface-0);
  padding: 3rem 0 2rem;
}

#quarto-content > .page-columns > .column-body > .grid:first-of-type h1 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 2.4rem;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 1rem;
}

/* =================================================== */
/* Key Findings Callout                                */
/* =================================================== */

.callout-note {
  background: var(--surface-0) !important;
  border-left: 4px solid var(--accent-color) !important;
  border: 1px solid var(--border-light);
  border-radius: var(--radius) !important;
  padding: 1.75rem !important;
  box-shadow: var(--shadow-md);
  transition: box-shadow var(--transition);
}

.callout-note:hover {
  box-shadow: var(--shadow-lg);
}

.callout.callout-style-default .callout-header {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.callout.callout-style-default .callout-body {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.callout-body li {
  margin-bottom: 0.75rem;
  padding-left: 0.25rem;
}

.callout-body .fas {
  font-size: 1.1rem;
  width: 24px;
  text-align: center;
}

.key-finding {
  margin-bottom: 0.75rem;
}

/* =================================================== */
/* Map Description Panel                               */
/* =================================================== */

.map-description {
  font-size: 1.05rem;
  color: var(--text-secondary);
  background: var(--surface-1);
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  line-height: 1.7;
}

.map-description b,
.map-description strong {
  color: var(--text-primary);
}

/* =================================================== */
/* Tabset Styling                                      */
/* =================================================== */

.nav-tabs {
  border-bottom: 2px solid var(--surface-2);
  gap: 0.25rem;
  margin-bottom: 1.5rem;
}

.nav-tabs .nav-link {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-muted);
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.75rem 1.25rem;
  margin-bottom: -2px;
  border-radius: 0;
  transition: all var(--transition);
  background: none;
}

.nav-tabs .nav-link:hover {
  color: var(--accent-color);
  border-bottom-color: var(--accent-color);
  background: none;
}

.nav-tabs .nav-link.active {
  font-weight: 600;
  color: var(--accent-color);
  border-bottom: 2px solid var(--accent-color);
  background: none;
}

/* Pill sub-tabs */
.nav-pills {
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.nav-pills .nav-link {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.85rem;
  border: 1.5px solid var(--border-light);
  border-radius: 100px;
  padding: 0.4rem 1.1rem;
  margin: 0;
  color: var(--text-secondary);
  background: var(--surface-0);
  transition: all var(--transition);
}

.nav-pills .nav-link:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
  background: var(--accent-light);
}

.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: white;
  box-shadow: 0 2px 8px rgba(0, 117, 52, 0.25);
}

/* =================================================== */
/* Tab Content Panels                                  */
/* =================================================== */

.tab-content {
  background: var(--surface-0);
  border-radius: 0 0 var(--radius) var(--radius);
}

/* =================================================== */
/* Leaflet Map Containers                              */
/* =================================================== */

.cell-output-display .leaflet {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
}

/* =================================================== */
/* Methodology / About Section                         */
/* =================================================== */

.column-body ul {
  list-style: none;
  padding-left: 0;
}

.column-body ul li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.column-body ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 8px;
  height: 8px;
  background: var(--accent-color);
  border-radius: 50%;
}

.column-body ul li strong {
  color: var(--text-primary);
}

/* =================================================== */
/* Scatter Plots                                       */
/* =================================================== */

.girafe_container {
  border-radius: var(--radius);
  overflow: hidden;
}

/* =================================================== */
/* Footer                                              */
/* =================================================== */

.nav-footer {
  background: var(--surface-1);
  border-top: 1px solid var(--border-light);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* =================================================== */
/* Responsive                                          */
/* =================================================== */

@media (max-width: 768px) {
  .quarto-title-banner {
    height: 380px;
  }
  #title-block-header .quarto-title-banner .title {
    font-size: 2.2rem;
  }
  #title-block-header .quarto-title-banner .subtitle {
    font-size: 1rem;
  }
  .map-description {
    padding: 1.25rem;
  }
  h3 {
    font-size: 1.6rem;
  }
}

/* =================================================== */
/* Smooth Scroll & Selection                           */
/* =================================================== */

html {
  scroll-behavior: smooth;
}

::selection {
  background: var(--accent-light);
  color: var(--accent-dark);
}

/* =================================================== */
/* Legislature Cards — 2×2 Quadrant Layout             */
/* =================================================== */

.legislature-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: 1fr 1fr;
  gap: 0;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
}

/* Vertical axis */
.legislature-cards::before {
  content: '';
  position: absolute;
  top: 1rem;
  bottom: 1rem;
  left: 50%;
  width: 1px;
  background: #ddd9d0;
  z-index: 0;
}

/* Horizontal axis */
.legislature-cards::after {
  content: '';
  position: absolute;
  left: 1.5rem;
  right: 1.5rem;
  top: 50%;
  height: 1px;
  background: #ddd9d0;
  z-index: 0;
}

.legislature-cards .law-card {
  margin: 1.25rem;
  position: relative;
  z-index: 1;
  border-radius: 10px;
}

@media (max-width: 768px) {
  .legislature-cards {
    grid-template-columns: 1fr;
  }
  .legislature-cards::before,
  .legislature-cards::after {
    display: none;
  }
}

/* =================================================== */
/* Card Hover Effect (Key Takeaways + Legislature)     */
/* =================================================== */

.law-card,
.takeaway-card {
  transition: transform var(--transition), box-shadow var(--transition), border-left-width var(--transition);
}

.law-card:hover,
.takeaway-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-left-width: 6px;
}

.law-card a:hover {
  border-bottom-color: currentColor;
}
