/* BaptistFinder Community Updates */

.community-hero {
  padding: clamp(48px, 7vw, 76px) 0;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(circle at 88% 18%, rgba(255, 255, 255, 0.7) 0 9%, transparent 9.2%),
    var(--surface-accent);
}

.community-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 390px);
  align-items: end;
  gap: clamp(32px, 6vw, 72px);
}

.community-hero h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(2.55rem, 6vw, 4.6rem);
  line-height: 1.02;
}

.community-hero-inner > div:first-child > p:last-child {
  max-width: 650px;
  margin: 20px 0 0;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.community-publisher-note {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.74);
}

.community-publisher-icon,
.community-state-icon {
  display: inline-grid;
  place-items: center;
  color: var(--green);
}

.community-publisher-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--green-light);
  font-size: 1.35rem;
}

.community-publisher-note strong,
.community-publisher-note span {
  display: block;
}

.community-publisher-note strong {
  color: var(--navy);
}

.community-publisher-note div span {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.community-feed-section {
  padding: clamp(42px, 7vw, 76px) 0 88px;
}

.community-layout {
  max-width: 900px;
}

.community-feed-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.community-feed-heading h2,
.community-feed-heading p {
  margin: 0;
}

.community-feed-heading > p {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.community-feed-status {
  display: flex;
  min-height: 52px;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
}

.community-feed-status:empty {
  display: none;
}

.community-spinner {
  width: 19px;
  height: 19px;
  border: 2px solid var(--border);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: community-spin 700ms linear infinite;
}

@keyframes community-spin {
  to { transform: rotate(360deg); }
}

.community-feed {
  display: grid;
  gap: 24px;
}

.community-post {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  scroll-margin-top: 100px;
}

.community-post:target {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.14);
}

.community-post-image-wrap {
  overflow: hidden;
  max-height: 560px;
  border-bottom: 1px solid var(--border);
  background: var(--background-soft);
}

.community-post-image {
  display: block;
  width: 100%;
  max-height: 560px;
  object-fit: cover;
}

.community-post-content {
  padding: clamp(22px, 4vw, 36px);
}

.community-post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin: 0 0 10px;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.community-post-meta .lucide-icon {
  font-size: 1.05rem;
}

.community-post h2 {
  margin: 0;
  font-size: clamp(1.55rem, 4vw, 2.25rem);
  line-height: 1.14;
}

.community-post-body {
  margin-top: 18px;
  color: var(--text);
  overflow-wrap: anywhere;
}

.community-post-body p {
  margin: 0 0 0.9em;
}

.community-post-body p:last-child {
  margin-bottom: 0;
}

.community-post-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.community-share-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  border: 1px solid var(--control-border);
  border-radius: var(--radius-sm);
  background: var(--surface-tint);
  color: var(--green);
  cursor: pointer;
  font-weight: 700;
}

.community-share-button:hover {
  border-color: var(--green);
  background: var(--green-light);
}

.community-share-status {
  min-height: 1.4em;
  color: var(--text-muted);
  font-size: 0.82rem;
  text-align: right;
}

.community-state-card {
  padding: clamp(28px, 6vw, 54px);
  border: 1px dashed var(--accent-border);
  border-radius: var(--radius-lg);
  background: var(--surface-tint);
  text-align: center;
}

.community-state-card .community-state-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--green-light);
  font-size: 1.5rem;
}

.community-state-card h3,
.community-state-card p {
  margin: 0;
}

.community-state-card p {
  margin-top: 6px;
  color: var(--text-muted);
}

.community-state-card .primary-button,
.community-state-card .secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
}

@media (max-width: 750px) {
  .community-hero-inner {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .community-publisher-note {
    max-width: 520px;
  }

  .community-feed-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 560px) {
  .community-feed-heading,
  .community-post-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .community-feed-heading > p,
  .community-share-status {
    text-align: left;
  }

  .community-share-button {
    width: 100%;
    justify-content: center;
  }
}

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