/* Petty community v68: balanced profiles and one optional publication preview. */
.community-section {
  --community-ink: #302219;
  --community-muted: #78665a;
  --community-orange: #e64a00;
  --community-border: #efddcf;
  padding-block: 48px;
  background: #fffaf4;
  color: var(--community-ink);
  scroll-margin-top: 144px;
}

.community-section .community-panel {
  box-sizing: border-box;
  padding: 32px;
  border: 1px solid #f3d6be;
  border-radius: 28px;
  background: linear-gradient(125deg, #fffdf9 20%, #fff2e4 100%);
  box-shadow: 0 12px 34px #733b1210;
}

.community-heading,
.community-header {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(230px, .8fr);
  align-items: end;
  gap: 28px;
  margin-bottom: 26px;
}

.community-kicker {
  display: block;
  margin-bottom: 10px;
  color: #b84008;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.community-heading h2,
.community-header h2 {
  max-width: 670px;
  margin: 0;
  color: var(--community-ink);
  font-size: clamp(30px, 3.3vw, 44px);
  font-weight: 850;
  line-height: 1.08;
  letter-spacing: -1.5px;
  text-wrap: balance;
}

.community-heading h2 em,
.community-header h2 em {
  color: var(--community-orange);
  font-style: normal;
}

.community-heading > p,
.community-header > p {
  max-width: 550px;
  margin: 0 0 3px;
  color: var(--community-muted);
  font-size: 15px;
  line-height: 1.65;
}

.community-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 18px;
}

.community-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--community-border);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 5px 16px #6d391208;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.community-card.is-active {
  border-color: #e9793a;
  box-shadow: 0 0 0 2px #ffecdf;
}

.community-card__head {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 13px;
}

.community-card__head > div { min-width: 0; }
.community-card__head h3 {
  margin: 0 0 3px;
  color: var(--community-ink);
  font-size: 21px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.5px;
}

.community-card__account,
.community-card__handle {
  display: block;
  margin: 0;
  color: var(--community-muted);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.community-card__icon {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  place-items: center;
  border: 1px solid #f5d3bf;
  border-radius: 15px;
  background: #fff1e8;
  color: #c7460f;
}

.community-card__icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.community-card--instagram .community-card__icon {
  border-color: #f4cde1;
  background: #fff0f7;
  color: #b7326c;
}

.community-card--facebook .community-card__icon {
  border-color: #d7e3f7;
  background: #edf4ff;
  color: #1960bd;
}

.community-card--tiktok .community-card__icon {
  border-color: #e6dfda;
  background: #f5f1ed;
  color: #29211d;
}

.community-card--instagram .social-icon-dot { fill: currentColor; stroke: none; }
.community-card--facebook .community-card__icon svg,
.community-card--tiktok .community-card__icon svg { fill: currentColor; stroke: none; }

.community-card__description {
  margin: 18px 0 22px;
  color: var(--community-muted);
  font-size: 14px;
  line-height: 1.6;
}

.community-card__actions {
  display: grid;
  gap: 5px;
  margin-top: auto;
}

.community-card__profile,
.community-card__link,
.community-card__preview {
  display: inline-flex;
  box-sizing: border-box;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.community-card__profile,
.community-card__link {
  border-color: #dc4900;
  background: var(--community-orange);
  color: #fff;
  box-shadow: 0 4px 10px #d64a0015;
}

.community-card__profile:hover,
.community-card__link:hover { background: #c84000; color: #fff; }
.community-card__preview { background: transparent; color: #96532c; }
.community-card__preview:hover,
.community-card__preview.is-active { background: #fff3e9; color: #a63800; }

.community-section :is(a, button):focus-visible {
  outline: 3px solid #a63a00;
  outline-offset: 4px;
}

.community-preview {
  min-width: 0;
  margin-top: 24px;
  padding: 24px;
  border: 1px solid var(--community-border);
  border-radius: 20px;
  background: #fff;
  scroll-margin-top: 150px;
}

.community-section [hidden] { display: none !important; }
.community-preview__head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.community-preview__head > div { min-width: 0; flex: 1; }
.community-preview__head h3 {
  margin: 0;
  color: var(--community-ink);
  font-size: 23px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.5px;
}

.community-preview__account {
  margin: 4px 0 0;
  color: var(--community-muted);
  font-size: 13px;
  line-height: 1.5;
}

.community-preview__profile {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--community-border);
  border-radius: 11px;
  color: #a43b09;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
}

.community-preview__profile:hover { background: #fff3e9; }
.community-preview__close {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--community-border);
  border-radius: 50%;
  background: #fffaf5;
  color: var(--community-ink);
  font: inherit;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.community-preview__close:hover { background: #ffecdf; }
.community-preview__embed {
  box-sizing: border-box;
  width: 100%;
  max-width: 500px;
  min-width: 0;
  min-height: 0;
  margin-inline: auto;
  overflow: hidden;
  border: 1px solid #eee7df;
  border-radius: 12px;
  background: #fffaf6;
}

.community-preview__embed iframe,
.community-preview__iframe {
  display: block;
  box-sizing: border-box;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: 440px;
  margin: 0;
  border: 0;
  background: #fff;
}

.community-preview__embed .tiktok-embed {
  box-sizing: border-box;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  border: 0;
}

.community-preview__embed .tiktok-embed > section {
  display: grid;
  min-height: 120px;
  place-items: center;
  padding: 20px;
  color: var(--community-muted);
  font-size: 14px;
  text-align: center;
}

.community-preview__embed .tiktok-embed > section a { color: #a43b09; }
.community-preview__note {
  margin: 14px 0 0;
  color: var(--community-muted);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

@media (max-width: 1000px) {
  .community-section .community-panel { padding: 26px; }
  .community-heading,
  .community-header { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .community-grid { gap: 13px; }
  .community-card { padding: 20px 16px 15px; }
  .community-card__head { gap: 10px; }
  .community-card__head h3 { font-size: 19px; }
  .community-card__icon { width: 42px; height: 42px; flex-basis: 42px; border-radius: 13px; }
}

@media (max-width: 760px) {
  .community-section { padding-block: 32px; scroll-margin-top: 145px; }
  .community-section .community-panel { padding: 22px 20px; border-radius: 23px; }
  .community-heading,
  .community-header { gap: 14px; margin-bottom: 22px; }
  .community-heading h2,
  .community-header h2 { font-size: clamp(29px, 6.5vw, 38px); letter-spacing: -1px; }
  .community-heading > p,
  .community-header > p { font-size: 14px; line-height: 1.6; }
  .community-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .community-card { padding: 20px; border-radius: 18px; }
  .community-card__head h3 { font-size: 21px; }
  .community-card__icon { width: 46px; height: 46px; flex-basis: 46px; }
  .community-card__description { margin: 15px 0 18px; }
  .community-card__actions { gap: 3px; }
  .community-preview { padding: 18px 12px; border-radius: 18px; }
  .community-preview__head { flex-wrap: wrap; gap: 10px; }
  .community-preview__head > div { flex-basis: calc(100% - 58px); }
  .community-preview__head h3 { font-size: 21px; }
  .community-preview__profile { order: 3; width: 100%; justify-content: center; }
  .community-preview__close { margin-left: auto; }
  .community-preview__embed { border-radius: 9px; }
  .community-preview__embed iframe { height: 420px; }
}

@media (max-width: 380px) {
  .community-section .community-panel { padding: 20px 14px; }
  .community-card { padding: 18px 15px 14px; }
  .community-card__head h3 { font-size: 20px; }
  .community-card__profile,
  .community-card__link,
  .community-card__preview { padding-inline: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .community-card { transition: none; }
}
