.join-page{
  width:100vw;
  position:relative;
  left:50%;
  right:50%;
  margin-left:-50vw;
  margin-right:-50vw;
  padding-bottom:28px;
  background:#fff;
}

.join-content{
  width:calc(100% - 40px);
  max-width:var(--content-max);
  margin-left:auto;
  margin-right:auto;
}

.join-hero{
  padding:52px 0 34px;
  background:#fff;
}

.join-hero-layout{
  display:grid;
  grid-template-columns:minmax(0, 1.1fr) minmax(320px, .9fr);
  align-items:center;
  gap:48px;
}

.join-hero h1{
  margin:0 0 18px;
  color:#0a5771;
  font-size:2.7rem;
  font-weight:700;
  line-height:1.15;
}

.join-team-carousel{
  position:relative;
  width:100%;
  height:520px;
  overflow:hidden;
  border-radius:6px;
}

.join-sweeties-carousel{
  position:relative;
  width:100%;
  overflow:hidden;
  border-radius:8px;
  box-shadow:0 6px 16px rgba(0,0,0,.15);
}

.join-sweeties-carousel{
  height:420px;
  flex:1 1 58%;
  min-width:0;
}

.join-carousel-track{
  position:relative;
  width:100%;
  height:100%;
}

.join-carousel-slide{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center center;
  opacity:0;
  transition:opacity .45s ease;
}

.join-team-carousel .join-carousel-slide{
  object-fit:cover;
  background:#fff;
}

.join-sweeties-carousel .join-carousel-slide--loki-1{
  object-position:center 46%;
}

.join-sweeties-carousel .join-carousel-slide--loki-2{
  object-position:center 52%;
}

.join-sweeties-carousel .join-carousel-slide--loki-3{
  object-position:center 42%;
}

.join-sweeties-carousel .join-carousel-slide--loki-4{
  object-position:center 18%;
}

.join-sweeties-carousel .join-carousel-slide--loki-5{
  object-position:center 45%;
}

.join-sweeties-carousel .join-carousel-slide--loki-6{
  object-position:center 38%;
}

.join-carousel-slide.active{
  opacity:1;
}

.join-carousel-dots{
  position:absolute;
  left:50%;
  bottom:14px;
  display:flex;
  gap:8px;
  transform:translateX(-50%);
  z-index:2;
}

.join-carousel-dots button{
  width:9px;
  height:9px;
  padding:0;
  border:0;
  border-radius:50%;
  background:rgba(255,255,255,.72);
  cursor:pointer;
  box-shadow:0 1px 4px rgba(0,0,0,.18);
}

.join-carousel-dots button.active{
  background:#0a5771;
}

.join-copy p{
  margin:0 0 18px;
  color:#333;
  font-size:1rem;
  line-height:1.72;
}

.join-lead{
  font-size:1.08rem !important;
}

.join-copy ul{
  margin:0 0 20px 1.25rem;
  padding:0;
  color:#333;
  line-height:1.68;
}

.join-copy li{
  margin:6px 0;
}

.join-sweeties-band{
  padding:44px 0 52px;
  background:#fff;
}

.join-title-row{
  display:flex;
  justify-content:flex-start;
  margin-bottom:24px;
}

.join-title-row h2{
  display:inline-block;
  width:auto;
  max-width:100%;
  margin:0;
  padding:14px 48px 14px 18px;
  background:#0a5771;
  color:#fff;
  font-size:2rem;
  font-weight:700;
  line-height:1.2;
  clip-path:polygon(0 0, calc(100% - 28px) 0, 100% 50%, calc(100% - 28px) 100%, 0 100%);
}

.join-sweeties{
  display:grid;
  grid-template-columns:minmax(260px, .72fr) minmax(0, 1fr);
  align-items:center;
  gap:40px;
}

.join-sweeties-copy p{
  margin:0 0 14px;
  color:#333;
  font-size:1.05rem;
  line-height:1.7;
}

.join-sweeties-copy p:first-child{
  color:#0a5771;
  font-size:1.25rem;
  font-weight:700;
  line-height:1.35;
}

.join-sweeties-copy p:last-child{
  margin-bottom:0;
}

@media (max-width: 900px){
  .join-hero{
    padding-top:38px;
  }

  .join-hero-layout{
    grid-template-columns:1fr;
    gap:28px;
  }

  .join-team-carousel{
    height:420px;
  }

  .join-sweeties{
    grid-template-columns:1fr;
    gap:22px;
  }

  .join-sweeties-carousel{
    height:380px;
  }
}

@media (max-width: 600px){
  .join-hero h1{
    font-size:2.2rem;
  }

  .join-team-carousel,
  .join-sweeties-carousel{
    height:auto;
    aspect-ratio:4 / 3;
  }

  .join-title-row h2{
    font-size:1.65rem;
  }
}

/* ========== JHU blue join treatment ========== */

.join-hero {
  background: linear-gradient(120deg, var(--jhu-pale) 0%, var(--jhu-sky) 100%);
  border-top: 0;
}

.join-hero h1,
.join-sweeties-copy p:first-child {
  color: var(--jhu-blue);
}

.join-team-carousel,
.join-sweeties-carousel {
  box-shadow: 0 9px 24px rgba(0, 45, 114, .18);
}

.join-carousel-dots button.active,
.join-title-row h2 {
  background: var(--jhu-spirit-blue);
  color: var(--jhu-blue-dark);
}

.join-sweeties-band {
  background: linear-gradient(180deg, #fff 0%, var(--jhu-pale) 100%);
}

/* Preserve the full pet photo across portrait and landscape images. */
.join-sweeties-carousel { background: #edf3f8; }
.join-sweeties-carousel .join-carousel-slide {
  object-fit: contain;
  object-position: center center;
  box-sizing: border-box;
  padding: 12px 16px 38px;
}
.join-sweeties-copy p:first-child {
  color: #333;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.7;
}
.join-sweeties-carousel .join-carousel-dots button { background: #b6c6d5; }
.join-sweeties-carousel .join-carousel-dots button.active { background: var(--jhu-blue); }

/* Our Memory: centered photo carousel with its introduction below. */
.join-sweeties {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.join-memory-subtitle {
  width: 100%;
  max-width: 840px;
  margin: 0;
  color: var(--jhu-blue);
  font-size: 1.5rem;
  line-height: 1.3;
  text-align: center;
}
.join-sweeties-carousel {
  flex: none;
  max-width: 840px;
  height: 440px;
}
.join-sweeties-copy {
  width: 100%;
  max-width: 840px;
  text-align: center;
}
@media (max-width: 600px) {
  .join-sweeties-carousel { height: auto; aspect-ratio: 4 / 3; }
}

/* A self-contained horizontal exhibition; the page keeps its vertical flow. */
.memory-gallery { margin-top: 64px; padding-top: 36px; border-top: 1px solid #d7e2ec; }
.memory-gallery .join-memory-subtitle { max-width: none; margin: 0 0 30px; }
.memory-exhibit { display: grid; grid-template-columns: minmax(300px, 31%) minmax(0, 1fr); background: #111; color: #fff; }
.memory-story { display: flex; flex-direction: column; padding: 36px 30px 26px; min-height: 560px; }
.memory-eyebrow { color: #999; font-size: 10px; letter-spacing: .16em; line-height: 1.6; }
.memory-captions { display: grid; margin: 32px 0 24px; }
.memory-caption { grid-area: 1 / 1; align-self: start; }
/* All captions reserve space; only the active one is visible or accessible. */
.memory-caption[hidden] { display: block; visibility: hidden; pointer-events: none; }
.page__content .memory-caption h4 { margin: 0 0 22px; color: #fff; font-size: clamp(24px, 2.3vw, 32px); font-weight: 500; line-height: 1.2; }
.page__content .memory-caption p { margin: 0; color: #c9c9c9; font-size: 15px; line-height: 1.8; }
.memory-controls { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: auto; }
.memory-count { color: #aaa; font-size: 12px; letter-spacing: .14em; font-variant-numeric: tabular-nums; }
.memory-arrows { display: flex; gap: 10px; }
.memory-arrows button { width: 42px; height: 42px; padding: 0; border: 1px solid #555; border-radius: 50%; background: transparent; color: #fff; font-size: 23px; cursor: pointer; }
.memory-arrows button:hover:not(:disabled) { background: #fff; color: #111; }
.memory-arrows button:disabled { opacity: .25; cursor: default; }
.memory-track { position: relative; display: flex; align-items: stretch; gap: 16px; min-width: 0; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: #777 #191919; background: #191919; }
.memory-track::after { content: ''; flex: 0 0 calc(6% - 16px); }
.memory-track .memory-slide { display: flex; flex: 0 0 94%; min-width: 0; margin: 0; scroll-snap-align: start; }
.memory-slide a { display: flex; align-items: center; width: 100%; }
.memory-track .memory-slide img { display: block; width: 100%; height: 100%; max-height: 650px; object-fit: contain; margin: 0; }
.memory-exhibit :focus-visible { outline: 2px solid #8ccaff; outline-offset: -3px; }
@media (max-width: 700px) {
  .memory-gallery { margin-top: 44px; padding-top: 28px; }
  .memory-exhibit { grid-template-columns: 1fr; }
  .memory-story { min-height: 390px; padding: 26px 24px 22px; }
  .memory-captions { margin: 20px 0; }
  .page__content .memory-caption h4 { font-size: 26px; margin-bottom: 14px; }
  .page__content .memory-caption p { font-size: 14px; line-height: 1.7; }
  .memory-track { height: auto; aspect-ratio: 1.5; }
}

/* Pets use the same gallery structure with a white exhibition panel. */
.pet-gallery .join-memory-subtitle { max-width: none; margin: 0 0 30px; }
.memory-exhibit--light { background: #fff; color: #222; }
.memory-exhibit--light .memory-story { justify-content: center; }
.memory-exhibit--light .memory-captions { margin-top: auto; }
.page__content .memory-exhibit--light .memory-caption p { color: #444; }
.memory-exhibit--light .memory-count { color: #666; }
.memory-exhibit--light .memory-arrows button { border-color: #ccc; color: #222; }
.memory-exhibit--light .memory-arrows button:hover { background: #222; color: #fff; }
.memory-exhibit--light .memory-track { background: #fff; }
.memory-exhibit--light .memory-slide img { max-height: 560px; }
/* Hide a finite scrollbar: both ends of the repeated strip loop seamlessly. */
[data-memory-carousel] .memory-track { scrollbar-width: none; }
[data-memory-carousel] .memory-track::-webkit-scrollbar { display: none; }
@media (max-width: 700px) {
  .memory-exhibit--light .memory-story { min-height: 230px; }
}

/* Life and interests: a compact, looping strip of two or three photos. */
.life-interests { margin-top: 64px; padding-top: 36px; border-top: 1px solid #d7e2ec; }
.life-interests .join-memory-subtitle { max-width: none; margin: 0 0 32px; }
.life-slider { max-width: 1200px; margin: 0 auto; }
.life-slider .memory-track { background: transparent; gap: 20px; height: 320px; }
.life-slider .memory-track::after { display: none; }
.life-slider .memory-track .memory-slide { flex-basis: calc((100% - 40px) / 3); height: 100%; }
.life-slider .memory-slide a { justify-content: center; height: 100%; }
.life-slider .memory-track .memory-slide img { width: 100%; height: 100%; max-height: none; object-fit: contain; }
.life-slider .memory-captions { margin: 20px auto; max-width: 720px; text-align: center; }
.page__content .life-slider .memory-caption h4 { margin: 0 0 10px; color: var(--jhu-blue); font-size: 22px; }
.page__content .life-slider .memory-caption p { margin: 0; color: #394653; font-size: 16px; line-height: 1.7; }
.life-slider .memory-controls { justify-content: center; gap: 24px; margin-top: 20px; }
.life-slider .memory-count { color: #526577; }
.life-slider .memory-controls button { width: 42px; height: 42px; padding: 0; border: 1px solid #b8c8d6; border-radius: 50%; background: transparent; color: var(--jhu-blue); font-size: 23px; cursor: pointer; }
.life-slider .memory-controls button:hover { background: #e1edf7; }
.life-slider :focus-visible { outline: 2px solid var(--jhu-blue); outline-offset: -2px; }
@media (max-width: 700px) {
  .life-interests { margin-top: 44px; padding-top: 28px; }
  .life-slider .memory-track { height: 240px; aspect-ratio: auto; gap: 12px; }
}

@media (max-width: 1000px) {
  .life-slider .memory-track .memory-slide { flex-basis: calc((100% - 20px) / 2); }
}
@media (max-width: 700px) {
  .life-slider .memory-track .memory-slide { flex-basis: calc((100% - 12px) / 2); }
}
