/* ========================================
   Base Styles
======================================== */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.4286;
  color: #ffffff;
  background-color: #515151;
  text-align: center;
  font-weight: normal;
}

/* ========================================
   Headings
======================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: normal;
  line-height: 1.1;
  color: #333;
}

h1 { font-size: 45px; line-height: 48px; }
h2 { font-size: 36px; line-height: 40px; }
h3 { font-size: 30px; line-height: 32px; }
h4 { font-size: 26px; line-height: 28px; }
h5 { font-size: 20px; line-height: 24px; }
h6 { font-size: 18px; line-height: 22px; }

/* ========================================
   Links
======================================== */
a {
  color: black;
  text-decoration: none;
}
a:hover, a:focus {
  color: #3282e6;
  text-decoration: underline;
}

/* Navigation (same as homepage.css */
nav.site-nav {
  background-color: #333;
  font-size: 18px;
  position: relative;
  z-index: 1000;
}

/* Desktop nav */
nav.site-nav .nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

nav.site-nav .nav-list li a {
  display: block;
  color: white;
  padding: 14px 16px;
  transition: color 0.3s ease;
}

nav.site-nav .nav-list li a:hover {
  color: #3282e6;
}

/* Hamburger Menu Button (dark version) */
.menu-toggle {
  display: none; /* hidden on desktop */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  position: absolute;
  top: 10px;
  right: 20px;
  cursor: pointer;
  z-index: 1100;
  background-color: rgba(255,255,255,0.75); /* subtle backdrop */
  border-radius: 6px;
  border: none;
}

.menu-toggle .bar {
  height: 3px;
  width: 25px;
  background-color: #515151; /* dark gray */
  margin: 4px 0;
  transition: all 0.3s ease;
}

/* Mobile Navigation */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  nav.site-nav .nav-list {
    display: none;
    flex-direction: column;
    align-items: center;
    background-color: #333;
    width: 100%;
    position: absolute;
    top: 60px;
    left: 0;
    text-align: center;
    z-index: 999;
  }

  nav.site-nav .nav-list.showing {
    display: flex;
  }

  nav.site-nav .nav-list li {
    border-top: 1px solid #444;
    width: 100%;
  }

  nav.site-nav .nav-list li a {
    padding: 14px;
    display: block;
    width: 100%;
  }
}

/* Hamburger animation to X */
.menu-toggle.open .bar:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.menu-toggle.open .bar:nth-child(2) {
  opacity: 0;
}
.menu-toggle.open .bar:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ========================================
   Containers
======================================== */
.container {
  margin: 48px auto 0;
  max-width: 90%;
  padding: 0 10px;
}

/* ========================================
   Footer
======================================== */
footer {
  background-color: #333;
  color: white;
  padding: 25px 10px;
  font-size: 14px;
  text-align: center;
  margin-top: 80px;
  border-top: 4px solid #3282e6;
}

/* ========================================
   Images
======================================== */
img {
  display: block;
  max-width: 40%;
  height: auto;
  border-radius: 0;
  margin: 20px auto;
  box-sizing: border-box;
}

/* ========================================
   Staff Cards
======================================== */
.staff-container {
  display: flex;
  justify-content: center;
  gap: 50px;
  flex-wrap: wrap;
  margin-top: 40px;
  align-items: stretch;
}

.staff-member {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 300px;
  background: #fff;
  padding: 30px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  color: #515151;
}

.staff-member img {
  width: 100%;
  height: auto;
  border-radius: 50%;
  margin-bottom: 15px;
}

.staff-text {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-grow: 1;
  text-align: center;
}

.staff-member h3 {
  margin: 0;
}

.staff-member h4 {
  margin: 0;
  font-size: 18px;
}

.staff-member p {
  margin: 0;
  line-height: 1.4;
}

/* ==== NAV OVERRIDE (paste at very end of layout-styles.css) ==== */

/* base safety: ensure site-nav has known stacking context */
nav.site-nav {
  position: relative;
  z-index: 2000;
}

/* enforce desktop default (no change) */
nav.site-nav .nav-list {
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-around !important;
  align-items: center !important;
}

/* mobile rules */
@media (max-width: 768px) {

  /* hide nav by default on mobile */
  nav.site-nav .nav-list {
    display: none !important;
    flex-direction: column !important;
    width: 100% !important;
    background-color: #333 !important;
    position: absolute !important;
    top: 56px !important; /* place below nav */
    left: 0 !important;
    text-align: center !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  }

  /* show nav when JS adds .showing */
  nav.site-nav .nav-list.showing {
    display: flex !important;
  }

  /* ensure hamburger is visible/clickable */
  .menu-toggle {
    display: flex !important;
    position: absolute !important;
    top: 10px !important;
    right: 16px !important;
    z-index: 3000 !important;
    background: transparent !important;
    border: none !important;
    width: 44px !important;
    height: 44px !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
  }

  .menu-toggle .bar {
    width: 26px !important;
    height: 3px !important;
    background: #fff !important;
    margin: 4px 0 !important;
  }

  /* nav items full width for tapping */
  nav.site-nav .nav-list li {
    width: 100% !important;
    border-top: 1px solid #444 !important;
  }

  nav.site-nav .nav-list li a {
    padding: 14px 16px !important;
    display: block !important;
    width: 100% !important;
  }
}

/* animate hamburger -> X */
.menu-toggle.open .bar:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px) !important;
}
.menu-toggle.open .bar:nth-child(2) {
  opacity: 0 !important;
}
.menu-toggle.open .bar:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px) !important;
}

/* small focus ring for accessibility */
.menu-toggle:focus-visible,
nav.site-nav .nav-list li a:focus-visible {
  outline: 3px solid rgba(50,130,230,0.15);
  outline-offset: 4px;
}

/* ========================================
   Staff Cards
======================================== */
.staff-container {
  display: flex;
  justify-content: center;
  gap: 50px;
  flex-wrap: wrap;
  margin-top: 40px;
  align-items: stretch;
}

.staff-member {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 375px;
  background: #fff;
  padding: 30px 30px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  color: #515151;
}

.staff-member img {
  width: 100%;
  height: auto;
  border-radius: 50%;
  margin-bottom: 15px;
}

.staff-text {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-grow: 1;
  text-align: center;
}

.staff-member h3 {
  margin: 0;
}

.staff-member h4 {
  margin: 0;
  font-size: 18px;
}

.staff-member p {
  margin: 0;
  line-height: 1.4;
}

@media (max-width: 768px) {
  nav.site-nav {
    background-color: #ffffff !important; /* nav bar itself */
  }

  nav.site-nav .nav-list {
    background-color: #ffffff !important; /* dropdown links */
  }

  nav.site-nav .nav-list li a {
    color: #333 !important; /* make links visible on white */
  }

  .menu-toggle .bar {
    background-color: #333 !important; /* hamburger bars dark on white */
  }
}
