/* ==========================================================================
   COMMUNITY — join the inner circle
   ========================================================================== */

.community {
  background: var(--paper);
  padding: clamp(4.5rem, 10vh, 8rem) 0;
  position: relative;
  overflow: hidden;
}

/* Faint decorative word */
.community::before {
  content: 'Community';
  position: absolute;
  bottom: -1rem;
  right: -1rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(5rem, 12vw, 10rem);
  font-weight: 300;
  letter-spacing: -0.04em;
  color: var(--orange);
  opacity: 0.05;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.community-inner {
  max-width: var(--w-wide);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 4fr);
  gap: clamp(3rem, 6vw, 6rem);
  align-items: center;
}

/* ─── Left: content ─── */
.community-head { margin-bottom: 1.6rem; }
.community-head .section-title { margin-top: 1.2rem; }

.community-dek {
  max-width: 50ch;
  font-size: 1rem;
  line-height: 1.75;
  color: #4b3b2d;
  margin-bottom: 2rem;
}

/* ─── Benefits list ─── */
.community-benefits {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  margin-bottom: 2.4rem;
}

.community-benefit {
  display: flex;
  align-items: flex-start;
  gap: 1.1rem;
}

.benefit-icon {
  flex-shrink: 0;
  width: 2.4rem;
  height: 2.4rem;
  background: rgba(237, 85, 15, 0.09);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--orange);
  margin-top: 0.1rem;
}

.benefit-copy {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.benefit-copy strong {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--espresso);
  letter-spacing: -0.01em;
}

.benefit-copy span {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--taupe);
}

/* ─── CTA button ─── */
.community-join-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.wa-icon { flex-shrink: 0; }

/* ─── Right: WhatsApp chat visual ─── */
.community-visual {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  align-items: flex-start;
}

/* Phone-frame chat mockup */
.community-chat {
  width: 100%;
  max-width: 320px;
  background: #0b141a;
  border-radius: 16px;
  padding: 1.1rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  box-shadow: 0 8px 40px rgba(46, 33, 24, 0.18);
  position: relative;
}

/* WhatsApp dark-mode header bar mockup at top */
.community-chat::before {
  content: 'AididitMyWay Community';
  display: block;
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #00a884;
  padding: 0 0.3rem 0.7rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 0.3rem;
}

.chat-bubble {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  max-width: 86%;
}

.chat-bubble-in {
  align-self: flex-start;
  background: #202c33;
  border-radius: 0 10px 10px 10px;
  padding: 0.5rem 0.75rem 0.4rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.chat-bubble-out {
  align-self: flex-end;
  background: #005c4b;
  border-radius: 10px 10px 0 10px;
  padding: 0.5rem 0.75rem 0.4rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.chat-name {
  font-family: var(--font-body);
  font-size: 0.58rem;
  font-weight: 700;
  color: #00a884;
  letter-spacing: 0.02em;
  display: block;
}

.chat-text {
  font-family: var(--font-body);
  font-size: 0.72rem;
  line-height: 1.5;
  color: #e9edef;
  display: block;
}

.chat-time {
  font-family: var(--font-body);
  font-size: 0.55rem;
  color: #8696a0;
  text-align: right;
  display: block;
}

/* Member count badge */
.community-member-count {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.8rem 1.2rem;
  background: var(--orange);
  border-radius: 3px;
  align-self: flex-end;
  margin-right: 1rem;
}

.count-num {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.6rem;
  color: #fff;
  line-height: 1;
  letter-spacing: -0.02em;
}

.count-label {
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
}

/* ─── Responsive ─── */
@media (max-width: 860px) {
  .community-inner {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
  }

  /* promote children to direct flex items so order works */
  .community-content { display: contents; }

  .community-head    { order: 1; }
  .community-visual  { order: 2; }
  .community-dek     { order: 3; }
  .community-benefits { order: 4; }
  .community-cta     { order: 5; }

  .community-visual {
    align-items: center;
    width: 100%;
  }

  .community-chat { max-width: 100%; }

  .community-member-count {
    align-self: flex-start;
    margin-right: 0;
  }

  .community-cta { text-align: center; }
  .community-join-btn { width: 100%; justify-content: center; }
}

@media (max-width: 560px) {
  .community-chat { border-radius: 12px; }
}
