:root {
  --pico-primary: #24678d;
}

header, footer {
  background-color: #000;
}

header, header *, .site-nav, .site-nav *, footer, footer * {
  color: #fff;
}

header a:hover, .site-nav a:hover, footer a:hover {
  color: #e86812;
}

/* Site header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 0;
}

.site-title {
  font-size: 64px;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.035em;
  white-space: nowrap;
}

@media (max-width: 1024px) {
  .site-title {
    font-size: 31px;
  }
}

@media (max-width: 600px) {
  .site-title {
    font-size: 20px;
  }
}

/* Navigation */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: #000;
}

.site-nav .container {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  gap: 1.5rem;
}

.nav-menu li {
  margin: 0;
}

.nav-menu a {
  text-decoration: none;
  padding: 0.5rem 0;
}

/* Hamburger button - hidden on desktop */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  margin-right: 1rem;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #fff;
  margin: 5px 0;
  transition: 0.3s;
}

/* Mobile styles */
@media (max-width: 768px) {
  header {
    position: sticky;
    top: 0;
    z-index: 101;
  }

  .site-header {
    padding: 0.75rem 0;
  }

  .hamburger {
    display: block;
  }

  /* Hide desktop nav, show dropdown menu */
  .site-nav {
    display: none;
    position: fixed;
    /* top is set dynamically by JavaScript */
    left: 0;
    right: 0;
    background-color: #000;
    z-index: 100;
  }

  .site-nav.active {
    display: block;
  }

  .nav-menu {
    flex-direction: column;
    text-align: center;
    padding: 0.5rem 0;
    gap: 0;
  }

  .nav-menu li {
    padding: 0.5rem 0;
  }

  /* Hamburger animation when active */
  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -7px);
  }
}

footer {
  border-top: 1px solid rgba(255,255,255,0.1);
}

.social-links {
  text-align: center;
  max-width: 150px;
}

.social-links a {
  display: inline-block;
  margin: 0 0.5rem;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.social-links a:hover {
  opacity: 1;
}

.footer-logos {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: 1fr auto;
  gap: 0.5rem 2rem;
  justify-content: start;
}

.footer-mffo {
  max-width: 150px;
  align-self: end;
}

.affiliate {
  text-align: center;
  align-self: end;
}

.affiliate img {
  max-width: 100px;
  background-color: #fff;
  padding: 0.5rem 0.25rem 0.5rem 0.4rem;
  border-radius: 4px;
}

.social-links {
  grid-column: 1;
}

@media (max-width: 768px) {
  .footer-logos {
    justify-content: center;
  }
}

.hero {
  text-align: center;
  padding: 4rem 2rem;
  background-size: cover;
  background-position: center;
  /* Break out of container to go edge-to-edge */
  width: 100vw;
  position: relative;
  left: 50%;
  margin-left: -50vw;
  /* Remove gap after header */
  margin-top: calc(-1 * var(--pico-block-spacing-vertical));
  margin-bottom: 2rem;
  /* Default hero height for inner pages */
  min-height: 35vh;
  /* Vertically center content */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-parallax {
  background-attachment: fixed;
  background-position: top;
  /* Taller hero for home page */
  min-height: 70vh;
  align-items: flex-start;
  /* Left-align content with container edge */
  text-align: left;
  /* 50vw - 50% = container's left margin (50% is relative to parent container width) */
  padding-left: calc(50vw - 50%);
}

.hero img {
  max-width: 300px;
  margin-bottom: 1rem;
}

.hero h1 {
  color: #fff;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

.accent {
  color: #e86812;
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.card {
  border: 1px solid var(--pico-muted-border-color);
  border-radius: var(--pico-border-radius);
  padding: 1rem;
}

.card img {
  width: 100%;
  height: auto;
}

.float-right {
  float: right;
  max-width: 40%;
  margin: 0 0 1rem 1rem;
}

.float-left {
  float: left;
  max-width: 40%;
  margin: 0 1rem 1rem 0;
}

@media (max-width: 576px) {
  .float-left, .float-right {
    float: none;
    max-width: 100%;
    margin: 1rem 0;
  }

  .hide-mobile {
    display: none;
  }
}

/* Insect cards */
.insect-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(0,0,0,0.1);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.insect-card h3 {
  margin-top: 0;
  font-size: 1.25rem;
}

.video-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.video-link svg {
  vertical-align: middle;
}

.insect-image img {
  width: clamp(150px, 40vw, 400px);
  height: auto;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 4px;
}

@media (max-width: 600px) {
  .insect-card {
    grid-template-columns: 1fr;
  }

  .insect-image {
    order: -1;
    text-align: center;
  }

  .insect-image img {
    width: 100%;
    max-width: 400px;
  }
}

