/* Adoption Stories page only. Load from happy-endings.html.
   Shared rules stay in styles.css so other pages are unchanged. */

.stories-band {
  background: linear-gradient(180deg, #f7f0fc 0%, #ead8f8 150px, #f4eafb 280px, #efeef1 460px);
}

.stories-intro {
  padding: 18px 0 6px;
  text-align: center;
}

.stories-intro .eyebrow {
  color: #6504b5;
  background: rgba(101, 4, 181, 0.08);
  border: 1px solid rgba(101, 4, 181, 0.2);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 8px;
  letter-spacing: 0.14em;
}

.stories-intro h1 {
  margin: 0 0 6px;
  font-size: clamp(1.75rem, 3.2vw, 2.45rem);
  line-height: 1.12;
  color: #410078;
}

.stories-intro__lead {
  max-width: 44rem;
  margin: 0 auto;
  font-size: 1.02rem;
  line-height: 1.45;
  color: #4d4751;
}

.stories-adopted {
  padding: 14px 0 52px;
}

.stories-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
}

.story-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  background: #fff;
  border: 1px solid rgba(101, 4, 181, 0.1);
  border-radius: 24px;
  box-shadow: 0 10px 28px rgba(46, 1, 82, 0.08);
  padding: 8px 8px 12px;
  transition: box-shadow 0.2s ease;
}

.story-card:hover {
  box-shadow: 0 16px 36px rgba(101, 4, 181, 0.14);
}

.story-card__photo {
  position: relative;
  height: 186px;
  border-radius: 18px;
  overflow: hidden;
  background: #f4e9fd;
  box-shadow: inset 0 0 0 1px rgba(101, 4, 181, 0.12);
}

.story-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-card__lead--cletus {
  object-position: center 38%;
}

.story-card__lead--ghost {
  object-position: center 10%;
}

.story-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  padding: 10px 10px 2px;
}

.story-card__heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin: 0 0 6px;
}

.story-card__heading h3 {
  margin: 0;
  font-size: 1.7rem;
  line-height: 1.1;
  color: #410078;
}

.story-card__body p {
  margin: 0 0 0.4em;
  font-size: 0.95rem;
  line-height: 1.4;
  color: #231f20;
}

.story-card__thumbs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
}

.story-card__thumbs img {
  width: 100%;
  height: 58px;
  object-fit: cover;
  object-position: center 22%;
  border-radius: 12px;
  background: #f4e9fd;
}

.stories-follow,
.stories-closing {
  max-width: 40rem;
  margin: 22px auto 0;
  text-align: center;
  color: #4d4751;
  line-height: 1.5;
}

.stories-follow {
  margin-top: 26px;
  font-size: 1.05rem;
}

.stories-kicker {
  display: block;
  margin-bottom: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6504b5;
}

.stories-closing {
  margin-top: 10px;
}

.stories-closing a,
.feature-card__body a,
.dog-card__more {
  color: #410078;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(101, 4, 181, 0.45);
  text-underline-offset: 3px;
}

.stories-closing a:hover,
.feature-card__body a:hover,
.dog-card:hover .dog-card__more {
  text-decoration-color: #6504b5;
}

.stories-next {
  background: #fff;
  padding: 64px 0 72px;
}

.stories-family {
  background: #efeef1;
  padding: 64px 0 76px;
}

.stories-head {
  max-width: 720px;
  margin: 0 auto 28px;
  text-align: center;
}

.stories-head h2,
.dog-group > h3,
.stories-help h2 {
  margin: 0;
  color: #410078;
}

.stories-head h2::after,
.dog-group > h3::after,
.stories-help h2::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  margin: 12px auto 0;
  border-radius: 999px;
  background: #6504b5;
}

.stories-head .lead,
.dog-group__note {
  max-width: 40rem;
  margin: 12px auto 0;
  text-align: center;
  color: #4d4751;
}

.feature-card {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 8px;
  align-items: stretch;
  min-width: 0;
  background: #fff;
  border: 1px solid rgba(101, 4, 181, 0.1);
  border-radius: 24px;
  box-shadow: 0 12px 32px rgba(46, 1, 82, 0.08);
  overflow: hidden;
}

.feature-card__gallery {
  margin: 0;
  min-width: 0;
  padding: 14px;
  background: linear-gradient(160deg, #f7f1fc, #eadcf6);
}

.feature-card__lead {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center 22%;
  border-radius: 16px;
  background: #f4e9fd;
}

.feature-card__thumbs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.feature-card__thumbs img {
  width: 100%;
  height: 92px;
  object-fit: cover;
  object-position: center 20%;
  border-radius: 12px;
  background: #fff;
}

.feature-card__body {
  min-width: 0;
  padding: 26px 28px 24px 18px;
}

.feature-card__body h3 {
  margin: 0 0 0.35em;
  font-size: clamp(1.8rem, 2.4vw, 2.2rem);
  color: #410078;
}

.feature-card__body p {
  margin: 0 0 0.8em;
}

.feature-card__body .status {
  margin-bottom: 10px;
}

.stories-actions {
  margin-top: 0.4rem;
}

.stories-actions .btn {
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.stories-actions .btn:hover {
  transform: translateY(-1px);
}

.dog-group {
  margin-top: 48px;
}

.dog-group:first-of-type {
  margin-top: 8px;
}

.dog-group > h3 {
  text-align: center;
  font-size: clamp(1.45rem, 2.2vw, 1.85rem);
}

.dog-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 22px 0 0;
  padding: 0;
}

.dog-grid--pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.dog-grid > li {
  min-width: 0;
  display: flex;
}

.dog-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  background: #fff;
  color: inherit;
  text-decoration: none;
  border: 1px solid rgba(101, 4, 181, 0.08);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(46, 1, 82, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dog-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(101, 4, 181, 0.16);
}

.dog-card:focus-visible,
.stories-closing a:focus-visible,
.feature-card a:focus-visible,
.stories-actions .btn:focus-visible {
  outline: 3px solid #6504b5;
  outline-offset: 3px;
}

.dog-card__media {
  overflow: hidden;
  background: #f4e9fd;
}

.dog-card__media img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center 18%;
  transition: transform 0.35s ease;
}

.dog-card:hover .dog-card__media img {
  transform: scale(1.035);
}

.dog-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  padding: 14px 16px 16px;
}

.dog-card h4 {
  margin: 0 0 0.25em;
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 1.45rem;
  line-height: 1.15;
  color: #410078;
}

.dog-aka {
  margin: 0 0 0.45em;
  font-size: 0.92rem;
  color: #4d4751;
}

.dog-card__body p {
  margin: 0 0 0.65em;
}

.dog-card__more {
  display: inline-block;
  margin-top: auto;
  padding-top: 2px;
}

.dog-life {
  margin: 0 0 0.7em;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f4e9fd;
  color: #2e0152;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
}

.dog-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #f4e9fd, #e7d6fb);
  color: #410078;
  text-align: center;
  padding: 16px;
}

.dog-ph .ph-initial {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #fff;
  color: #410078;
  font-family: var(--font-heading);
  font-size: 2.4rem;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(101, 4, 181, 0.18);
}

.dog-ph svg {
  width: 28px;
  height: 28px;
  opacity: 0.6;
}

.dog-ph .ph-label {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 400;
  color: #410078;
}

.status {
  display: inline-block;
  align-self: flex-start;
  max-width: 100%;
  margin: 0 0 8px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.35;
  text-transform: uppercase;
}

.story-card .status {
  margin: 0;
}

.status--adopted,
.status--home {
  background: #6504b5;
  color: #fff;
}

.status--ask {
  background: #f4e9fd;
  color: #410078;
}

.status--foster {
  background: #e6f6f6;
  color: #0c4a4b;
}

.status--sanct {
  background: #2e0152;
  color: #fff;
}

.stories-help {
  background: linear-gradient(135deg, #2e0152 0%, #410078 52%, #6504b5 100%);
  color: #fff;
  padding: 64px 0;
  text-align: center;
}

.stories-help .wrap {
  max-width: 820px;
}

.stories-help h2 {
  color: #fff;
}

.stories-help h2::after {
  background: #a2e05e;
}

.stories-help p {
  max-width: 36rem;
  margin: 14px auto 0;
  font-size: 1.15rem;
  line-height: 1.5;
  color: #fff;
}

.stories-help .btns {
  justify-content: center;
}

.stories-help .btn {
  max-width: 100%;
  text-align: center;
  white-space: normal;
}

.stories-help .btn:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1100px) {
  .dog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .story-card__photo {
    height: 176px;
  }

  .story-card__thumbs img {
    height: 52px;
  }

  .story-card__heading h3 {
    font-size: 1.5rem;
  }

  .story-card__body p {
    font-size: 0.9rem;
    line-height: 1.38;
  }

  .feature-card {
    grid-template-columns: 1fr;
  }

  .feature-card__body {
    padding: 8px 20px 22px;
  }
}

@media (max-width: 700px) {
  .dogs-cta-bar .wrap {
    gap: 8px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .dogs-cta-bar p {
    font-size: 0.95rem;
    line-height: 1.3;
  }

  .dogs-cta-bar .btn-dogs {
    padding: 8px 14px;
    font-size: 0.92rem;
  }

  .stories-intro {
    padding: 12px 0 2px;
  }

  .stories-intro .eyebrow {
    margin-bottom: 4px;
  }

  .stories-intro h1 {
    margin-bottom: 4px;
    font-size: 1.7rem;
  }

  .stories-intro__lead {
    font-size: 0.95rem;
    line-height: 1.35;
  }

  .stories-adopted {
    padding-top: 10px;
  }

  .stories-pair {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .story-card__photo {
    height: 210px;
  }

  .story-card__thumbs img {
    height: 72px;
  }

  .story-card__body p {
    font-size: 1rem;
    line-height: 1.45;
  }

  .stories-next,
  .stories-family,
  .stories-help {
    padding: 48px 0;
  }

  .dog-grid,
  .dog-grid--pair {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .feature-card__thumbs img {
    height: 84px;
  }
}

@media (max-width: 380px) {
  .stories-band .wrap,
  .stories-next .wrap,
  .stories-family .wrap,
  .stories-help .wrap {
    padding-left: 16px;
    padding-right: 16px;
  }

  .story-card {
    padding: 6px 6px 10px;
  }

  .story-card__photo {
    height: 188px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .story-card,
  .dog-card,
  .dog-card__media img,
  .stories-actions .btn,
  .stories-help .btn {
    transition: none;
  }

  .story-card:hover,
  .dog-card:hover,
  .dog-card:hover .dog-card__media img,
  .stories-actions .btn:hover {
    transform: none;
  }
}

/* Preview fixes 2026-10-26 (applied after the redesign was delivered) */
/* The paragraph colour rule above is more specific than the badge colour rule, which made the "Adopted" badge text dark purple on purple. */
.story-card__body p.status--adopted,
.story-card__body p.status--home,
.story-card__body p.status--sanct {
  color: #fff;
}

/* Keep Ghost's face in frame in the wide photo and the two small ones. */
.story-card__lead--ghost {
  object-position: center 42%;
}

#ghost .story-card__thumbs img {
  object-position: center 38%;
}

/* The link style for the Lottie write-up also caught the "Ask us about adopting" button, so its text was dark purple on dark purple. */
.feature-card__body a.btn,
.feature-card__body a.btn:hover {
  color: #fff;
  text-decoration: none;
}
