/* --- Horizontal sibling subnav (#page-content.mission) --- */

/* Base theme forces overflow-x:scroll on .mission → embedded scrollbar.
   Scope fixes to the tab bar only (not mission ribbon headings). */
#page-content.mission {
  overflow: visible !important;
  overflow-x: visible !important;
  overflow-y: visible !important;
  padding: 0.85rem 1rem 0.7rem;
  background-color: #fff;
  border-bottom: 1px solid #e8eef2;
  box-shadow: none;
}

#page-content.mission .menu-centered {
  text-align: center;
}

#page-content.mission .menu {
  margin: 0;
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.15rem 1.75rem;
  vertical-align: top;
}

#page-content.mission .menu > li {
  position: relative;
  float: none;
}

#page-content.mission .menu > li > a {
  display: inline-block;
  padding: 0.55rem 0.1rem 0.4rem;
  font-size: 0.8125rem;
  letter-spacing: 0.07em;
  font-weight: 600;
  color: #2d7cab;
  line-height: 1.2;
  outline: none !important;
  box-shadow: none !important;
  transition: color 0.15s ease;
}

#page-content.mission .menu > li > a:hover {
  color: #1a5f8a;
}

#page-content.mission .menu > li > a:focus,
#page-content.mission .menu > li > a:active {
  outline: none !important;
  box-shadow: none !important;
}

#page-content.mission .menu > li > a:focus-visible {
  outline: 2px solid #3c88bd !important;
  outline-offset: 3px;
}

#page-content.mission .menu > li.active > a {
  color: #1a5f8a;
  font-weight: 800;
}

/* Active: underline only */
#page-content.mission .menu > li.active:before {
  content: none;
}

#page-content.mission .menu > li.active:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: auto;
  height: 2px;
  transform: none;
  background: #3c88bd;
  border: none;
  z-index: 2;
  pointer-events: none;
}

/* Narrow screens: allow sideways swipe without a visible scrollbar */
@media screen and (max-width: 40em) {
  #page-content.mission {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  #page-content.mission::-webkit-scrollbar {
    display: none;
  }

  #page-content.mission .menu {
    flex-wrap: nowrap;
    gap: 0 1.25rem;
    padding: 0 0.5rem;
  }
}

/* Page-centered wedges always sat over the middle tab (e.g. Teens).
   Hide them on pages that use the sibling subnav. */
body:has(#page-content.mission .menu > li.active) .top-wedge {
  display: none;
}

body:has(#page-content.mission .menu > li.active) .inner-page-content:after {
  display: none;
}

/* Hash-scroll focuses #page-content — don't leave a blue focus ring */
#page-content:focus,
#page-content:focus-visible {
  outline: none;
}

/* --- News & Events: equal-height cards --- */
.news {
  background: #f4f7f9;
  padding: 2rem 0 2.75rem;
}

.news .section-title {
  margin: 0 0 1.35rem;
}

.news .news-grid {
  display: flex;
  flex-wrap: wrap;
}

.news .news-grid > .column-block {
  display: flex;
  margin-bottom: 1.25rem;
}

.news .news-item {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(20, 40, 55, 0.06), 0 8px 24px rgba(20, 40, 55, 0.04);
}

/* Padding-bottom aspect box beats legacy theme height:auto on mobile */
.news .news-thumbnail {
  position: relative;
  display: block;
  width: 100%;
  height: 0 !important;
  padding-bottom: 62.5%; /* 16:10 */
  overflow: hidden;
  background: #e4ebf0;
  flex: 0 0 auto;
}

.news .news-thumbnail img {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center center !important;
  border-radius: 0 !important;
}

.news .news-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 1rem 1.1rem 1.15rem;
  gap: 0.55rem;
}

.news .news-title {
  padding: 0;
}

.news .news-title h3 {
  margin: 0;
  letter-spacing: -0.02em;
  font-size: 1.05rem;
  line-height: 1.35;
  font-weight: 700;
}

.news .news-title a,
.news a {
  color: #13252f;
  text-decoration: none;
}

.news .news-title a:hover,
.news .news-title a:focus {
  color: #1a5f8a;
}

.news .news-summary {
  padding: 0;
  flex: 1 1 auto;
}

.news .news-summary p {
  margin: 0;
  font-weight: 400;
  font-size: 0.92rem;
  line-height: 1.55;
  color: #4b5c66;
}

/* --- Gallery: sharper tiles (Flickr _b source + taller crop) --- */
.gallery {
  padding: 1.75rem 0 2.25rem;
}

.gallery .row {
  margin-left: auto;
  margin-right: auto;
}

.gallery .gallery_items {
  margin-left: -0.625rem;
  margin-right: -0.625rem;
  width: auto;
  max-width: none;
}

.gallery .gallery_items .column,
.gallery .gallery_items .column-block {
  display: flex;
  margin-bottom: 1rem;
  padding-left: 0.625rem;
  padding-right: 0.625rem;
}

.gallery .gallery-item {
  overflow: hidden;
  width: 100%;
  border-radius: 6px;
  background: #e4ebf0;
}

.gallery .gallery-item a {
  position: relative;
  display: block;
  width: 100%;
  height: 0;
  padding-bottom: 75%; /* 4:3 */
  overflow: hidden;
}

.gallery .gallery-item img {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  object-fit: cover !important;
  object-position: center !important;
  border-radius: 6px;
}

@media screen and (min-width: 64em) {
  .gallery .gallery-item a {
    padding-bottom: 70%;
  }
}

/* --- Mobile / tablet --- */
@media screen and (max-width: 63.9375em) {
  .hero.home-hero {
    height: auto !important;
    min-height: 0;
    padding-bottom: 0.5rem;
  }

  .hero.home-hero .orbit,
  .hero.home-hero .orbit-container,
  .hero.home-hero .hero-focus,
  .hero.home-hero .visual-center {
    height: auto !important;
    min-height: 0 !important;
  }

  .hero.home-hero .orbit-container {
    overflow: hidden;
  }

  .hero.home-hero .orbit-slide img.orbit-image,
  .hero.home-hero .orbit-slide img {
    width: 100% !important;
    height: auto !important;
    max-height: 52vw;
    aspect-ratio: 16 / 10;
    object-fit: cover !important;
    object-position: center center !important;
  }

  .hero .orbit-caption {
    font-size: 0.85rem;
    line-height: 1.3;
    padding: 0.45rem 0.65rem;
  }

  /* Mission ribbon: less empty space */
  .mission:not(#page-content) {
    padding: 0.85rem 1rem !important;
    overflow-x: visible !important;
  }

  .mission:not(#page-content) h3 {
    font-size: 1.05rem !important;
    line-height: 1.45 !important;
    margin: 0 !important;
  }

  .news {
    padding: 1.35rem 0 1.75rem;
  }

  .news .section-title,
  .gallery .section-title {
    margin: 0 0 0.9rem;
    font-size: 1.35rem;
  }

  .news .news-grid > .column-block {
    margin-bottom: 0.9rem;
  }

  .news .news-thumbnail {
    padding-bottom: 56.25%; /* 16:9 — shorter posters on phones */
  }

  .news .news-body {
    padding: 0.8rem 0.9rem 0.95rem;
    gap: 0.4rem;
  }

  .news .news-title h3 {
    font-size: 0.98rem;
  }

  .news .news-summary p {
    font-size: 0.875rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .gallery {
    padding: 1.25rem 0 1.75rem;
  }

  .gallery .gallery_items .column,
  .gallery .gallery_items .column-block {
    margin-bottom: 0.75rem;
  }

  footer {
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
  }
}

@media screen and (max-width: 40em) {
  .news .news-thumbnail {
    padding-bottom: 52%;
  }

  .gallery .gallery-item a {
    padding-bottom: 100%; /* square tiles on small phones */
  }
}

/* --- Footer: deeper slate so white links read cleaner --- */
footer {
  background-color: #3a5560;
}

/* --- Carousel caption links: white on the dark underlay --- */
.hero .orbit-caption,
.hero .orbit-caption a {
  color: #fff;
}

.hero .orbit-caption a:hover,
.hero .orbit-caption a:focus {
  color: #fff;
  text-decoration: underline;
}

