/* A single, softly cut-paper composition — no nested rounded panels. */
.community-section {
  --community-mint: #a5e7d2;
  --community-blue: #d9efff;
  display: grid;
  grid-template-columns: 36% 30% 34%;
  isolation: isolate;
  margin: 0;
  min-height: 500px;
  border-radius: 32px;
  background: var(--community-blue);
}
.community-section .safety-copy {
  position: relative;
  min-width: 0;
  padding: 48px 26px 48px 38px;
  border-radius: 0;
  background: linear-gradient(115deg, #82dfc1, var(--community-mint) 90%);
}
.community-section .safety-copy h2,
.community-section .stories h2 {
  font-size: clamp(25px, 2.2vw, 34px);
  line-height: 1.12;
  letter-spacing: -.035em;
}
.community-section .safety-copy li { line-height: 1.5; }
.community-section .safety-copy li .icon { flex: 0 0 26px; }
.community-section .learn-more-btn { margin-top: 10px; }
.community-section .family-photo {
  display: block;
  position: relative;
  min-width: 0;
  min-height: 500px;
  background-position: 52% 38%;
}
.community-section .family-photo::before,
.community-section .family-photo::after {
  content: "";
  position: absolute;
  z-index: 1;
  pointer-events: none;
  top: -1px;
  bottom: -1px;
  width: clamp(28px, 3.2vw, 56px);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}
.community-section .family-photo::before {
  left: -1px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 600' preserveAspectRatio='none'%3E%3Cpath fill='%23a5e7d2' d='M0 0H35C66 80 6 128 24 216S65 340 33 426S55 547 25 600H0Z'/%3E%3C/svg%3E");
}
.community-section .family-photo::after {
  right: -1px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 600' preserveAspectRatio='none'%3E%3Cpath fill='%23d9efff' d='M60 0H30C5 75 57 154 33 244S1 365 28 438S4 548 30 600H60Z'/%3E%3C/svg%3E");
}
.community-section .stories {
  min-width: 0;
  padding: 48px 34px 40px 24px;
}
.community-section .stories article {
  padding: 20px;
  border: 1px solid #fff9;
  border-radius: 22px 26px 24px 12px;
  background: #ffffffed;
  box-shadow: 0 7px 20px #35647c06;
}
.community-section .stories article + article { border-radius: 24px 12px 22px 26px; }
@media (min-width: 821px) and (max-width: 1180px) {
  .community-section { grid-template-columns: 1fr 1fr; }
  .community-section .safety-copy { padding: 36px 24px 40px 30px; }
  .community-section .safety-copy::after {
    content: "";
    position: absolute;
    pointer-events: none;
    inset: auto -1px -1px;
    height: 38px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 60' preserveAspectRatio='none'%3E%3Cpath fill='%23d9efff' d='M0 60V30C100 3 175 58 285 30S470 4 600 30V60Z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
  }
  .community-section .family-photo { min-height: 460px; }
  .community-section .family-photo::after {
    inset: auto -1px -1px;
    width: auto;
    height: 38px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 60' preserveAspectRatio='none'%3E%3Cpath fill='%23d9efff' d='M0 60V30C100 3 175 58 285 30S470 4 600 30V60Z'/%3E%3C/svg%3E");
  }
  .community-section .stories {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 28px 30px 34px;
  }
  .community-section .stories h2 { grid-column: 1 / -1; }
  .community-section .stories article { margin: 0; }
}
@media (max-width: 820px) {
  .community-section {
    grid-template-columns: minmax(0, 1fr);
    margin: 0;
    border: 1px solid #dce4df;
    border-radius: 26px;
    box-shadow: 0 12px 30px #3e2f1b0a;
  }
  .community-section .safety-copy {
    padding: 28px 24px 30px;
    background: linear-gradient(155deg, #82dfc1, var(--community-mint) 85%);
  }
  .community-section .safety-copy h2,
  .community-section .stories h2 { font-size: clamp(24px, 6vw, 30px); }
  .community-section .safety-copy li { margin: 16px 0; font-size: 14px; }
  .community-section .family-photo {
    min-height: 0;
    height: clamp(240px, 66vw, 360px);
    background-position: center 36%;
  }
  .community-section .family-photo::before,
  .community-section .family-photo::after {
    left: -1px;
    right: -1px;
    width: auto;
    height: 38px;
    bottom: auto;
  }
  .community-section .family-photo::before {
    top: -1px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 60' preserveAspectRatio='none'%3E%3Cpath fill='%23a5e7d2' d='M0 0H600V23C490 58 437 0 315 27S126 58 0 25Z'/%3E%3C/svg%3E");
  }
  .community-section .family-photo::after {
    top: auto;
    bottom: -1px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 60' preserveAspectRatio='none'%3E%3Cpath fill='%23d9efff' d='M0 60V35C100 3 175 58 285 30S470 4 600 30V60Z'/%3E%3C/svg%3E");
  }
  .community-section .stories { padding: 22px 24px 28px; }
  .community-section .stories article { margin-top: 18px; padding: 18px; }
}

/* Paired editorial stories: manual navigation, stable height, no auto-rotation. */
.community-section .stories[data-story-carousel] { display: block; }
.stories-heading { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 14px 10px; }
.community-section .stories-heading h2 { flex: 1 1 170px; font-size: clamp(24px, 1.9vw, 30px); }
.stories-arrows { display: flex; flex: 0 0 auto; gap: 6px; margin-left: auto; }
.stories-arrows button {
  display: inline-flex; justify-content: center; align-items: center;
  width: 40px; height: 40px; padding: 0; border: 1px solid #bad8e4;
  border-radius: 50%; color: #183f36; background: #ffffffb5; cursor: pointer;
  transition: background .18s, color .18s, border-color .18s;
}
.stories-arrows .icon { font-size: 20px; }
.stories-arrows button:hover { background: #183f36; border-color: #183f36; color: #fff; }
.stories-arrows button:focus-visible,.stories-viewport:focus-visible { outline: 3px solid #27806a; outline-offset: 4px; }
.community-section .stories-disclosure { margin: 12px 0 20px; color: #466472; font-size: 11px; line-height: 1.5; }
.stories-viewport { overflow: hidden; border-radius: 24px; touch-action: pan-y pinch-zoom; }
.stories-track { display: flex; align-items: stretch; transition: transform .3s ease; }
.story-page { flex: 0 0 100%; min-width: 0; display: grid; grid-template-columns: minmax(0,1fr); grid-template-rows: 1fr 1fr; gap: 16px; align-content: start; }
.community-section .story-page article { min-width: 0; margin: 0; padding: 20px; }
.community-section .story-page article b { display: block; font-size: 15px; line-height: 1.4; }
.community-section .story-page article p { margin: 8px 0 0; font-size: 13px; line-height: 1.6; }
.story-topic { display: block; margin-bottom: 8px; color: #3d6c63; font-size: 10px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.stories-pagination { display: flex; align-items: center; gap: 18px; justify-content: space-between; margin-top: 18px; }
.stories-page-label { flex-shrink: 0; color: #466472; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stories-progress { width: 84px; height: 4px; background: #b7d8e9; border-radius: 8px; overflow: hidden; }
.stories-progress > span { display: block; height: 100%; min-width: 4px; border-radius: inherit; background: #347b6a; transition: width .3s ease; }
@media (min-width: 821px) and (max-width: 1180px) {
  .community-section .stories-heading h2 { font-size: 28px; }
  .story-page { grid-template-columns: repeat(2,minmax(0,1fr)); grid-template-rows: 1fr; gap: 20px; }
}
@media (max-width: 820px) {
  .community-section .stories[data-story-carousel] { padding: 24px 20px 28px; }
  .community-section .stories-heading h2 { font-size: 24px; flex-basis: 160px; }
  .stories-arrows button { width: 40px; height: 40px; }
  .community-section .story-page article { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .stories-track,.stories-progress > span,.stories-arrows button { transition: none; }
}
