/* =============================================================================
   FONTS
   ============================================================================= */

@font-face {
  font-family: 'SpectralSC Bold';
  src: url('./fonts/SpectralSC-Bold.ttf');
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'SpectralSC Regular';
  src: url('./fonts/SpectralSC-Regular.ttf');
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'SpectralSC Light';
  src: url('./fonts/SpectralSC-Light.ttf');
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Source Sans 3 Bold';
  src: url('./fonts/SourceSans3-Bold.ttf');
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Source Sans 3 Regular';
  src: url('./fonts/SourceSans3-Regular.ttf');
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Source Sans 3 Light';
  src: url('./fonts/SourceSans3-Light.ttf');
  font-style: normal;
  font-display: swap;
}

/* =============================================================================
   BASE / RESET
   ============================================================================= */

body {
  margin: 0;
  padding: 0;
  background: #f4f4f4;
  color: darkslategrey;
}

h1 {
  font-family: 'SpectralSC Light';
}

h2 {
  font-family: 'Source Sans 3 Regular';
}

h3 {
  font-family: 'SpectralSC Light';
}

h4 {
  font-family: 'Source Sans 3 Bold';
  font-size: larger;
}

p {
  font-family: 'Source Sans 3 Regular';
  line-height: 1.5;
}

ul {
  font-family: 'Source Sans 3 Regular';
}

a {
  color: #184D47;
  font-weight: bold;
  text-decoration: underline;
}

a:hover {
  color: #329161;
  text-decoration: none;
}


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

.content {
  max-width: 70%;
  margin: 0 auto;
}

.text-block {
  max-width: 700px;
  margin: 0 auto 40px auto; 
}

#container {
  max-width: 1200px;
  margin: 30px auto;
  background: white;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border-top: 4px solid #2a8169;
}

#table-section {
  margin-top: 30px;
}


/* =============================================================================
   NAVIGATION
   ============================================================================= */

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 5%;
  top: 0;
  background-color: #2a8169 ;
  color: whitesmoke;
  z-index: 100;
}

h1.logo {
  font-family: 'SpectralSC Regular';
  font-size: larger;
  font-weight: bold;
}

.logo img {
    display: block;
    max-width: 120px;   /* Caps the maximum size of your logo on desktop */
    width: 100%;        /* Allows it to scale down if the screen is narrower than 180px */
    height: auto;       /* Maintains aspect ratio so it doesn't distort */
    padding: 2%;
}

.nav-links {
  display: flex;
  flex-direction: row;
  list-style: none;
  gap: 1.5rem;
  margin-left: auto;
  margin-top: 1rem;
  margin-bottom: 1rem;
  font-family: 'SpectralSC Regular';
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: bold;
}

.nav-links a.active {
  border-bottom: 2px solid whitesmoke;
}


/* =============================================================================
   MAP & CONTROLS
   ============================================================================= */

#map {
  height: 500px;
  width: 100%;
  border-radius: 8px;
  border: 1px solid #ccc;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

#controls {
  padding: 14px;
  display: flex;
  justify-content: center;
  font-family: 'Source Sans 3 Regular';
}

select {
  margin-left: 1%;
  margin-right: 3%;
}

#resetFilters {
  margin-left: 1%;
  padding: 4px 14px;
  background-color: #2a8169 ;
  color: white;
  border: none;
  border-radius: 4px;
  font-family: 'Source Sans 3 Regular';
  font-size: 1em;
  cursor: pointer;
}

#resetFilters:hover {
  background-color: #184D47;
}

.leaflet-popup { pointer-events: none }

/* =============================================================================
   CARD
   ============================================================================= */

.card {
  max-width: 1200px;
  margin: 0px auto;
  background: white;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border-top: 4px solid #2a8169;
}

.profile {
  display: flex;
  position: relative;
  justify-content:left;
}

.bio {
  padding-left: 2em;
}

img.headshot{
  border-radius: 8px;
  width: 100%;
  max-width: 25%;
  max-height:fit-content;
}


/* =============================================================================
   VIEWS (section visibility)
   ============================================================================= */

.view {
  display: none;
  padding: 60px 0;
  scroll-margin-top: 1000px;
}


.active-view {
  display: block;
}


/* =============================================================================
   Codebook Table
   ============================================================================= */

table.codebook {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-family: sans-serif;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

table.codebook thead tr {
  background-color: #2a8169; 
  color: #ffffff;
  text-align: left;
}

table.codebook th, table td {
  padding: 12px 15px;
}

table.codebook tbody tr {
  border-bottom: 1px solid #dddddd;
}
table.codebook tbody tr:nth-of-type(even) {
  background-color: #dddddd;
}

table.codebook tbody tr:last-of-type {
  border-bottom: 2px solid #2a8169;
}


/* =============================================================================
   LINKS — POLICY VARIANT
   ============================================================================= */

.policy-link {
  color: #184D47;
  font-weight: bold;
  text-decoration: underline;
}

.policy-link:hover {
  color: #329161;
  text-decoration: none;
}


/* =============================================================================
   RESPONSIVE — MOBILE (max-width: 768px)
   ============================================================================= */

@media screen and (max-width: 768px) {
  .content {
    max-width: 95%;
  }

  .navbar {
    flex-direction: column;
    max-height: none;
    padding: 15px;
    text-align: center;
  }

  .logo img {
    max-width: 120px;
    margin: 0 auto;
  }

  .nav-links {
      display: flex;
      flex-direction: column;
      align-items: center;      
      padding: 10px 0;
      gap: 1rem;         /* Adds clean spacing between stacked links */
      margin: 10px 0 0 0;        /* Resets margins for a tight, centered look */
    }

  #controls {
    flex-direction: column;
    align-items: stretch;
  }

  #controls label {
    margin-top: 10px;
  }

  select {
    margin: 5px 0 10px 0;
    width: 100%;
    font-size: 16px; /* Prevents iOS zoom on focus */
  }

  #map {
    height: 350px;
  }

  #table-section {
    overflow-x: auto;
  }

  .profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    justify-content:left;
  }
}