/* ==========================================================================
   MY WEIZEROUTER · COMMUNITY & SUPPORT v2 (grouped hubs, official brand icons)
   Layout adapts to the real content width (container queries), so laptop,
   Android, and Android "Desktop site" (sidebar + 980px viewport) all fit.
   ========================================================================== */

.community-center {
  max-width: 1360px;
  width: 100%;
  margin: 0 auto;
  padding: 0 0 64px;
  color: var(--text-main);
  font-family: var(--font);
  container-type: inline-size;
}

.community-heading {
  position: relative;
  padding: 24px 0 28px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 30px;
}

.community-heading::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: min(220px, 40%);
  height: 1px;
  background: linear-gradient(90deg, var(--gold-bright, #d4b878), rgba(0, 242, 254, .6), transparent);
}

.community-heading span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(212, 184, 120, .08);
  border: 1px solid rgba(212, 184, 120, .28);
  color: var(--gold-bright);
  font: 700 10px var(--mono);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.community-heading h1 {
  font-size: clamp(30px, 4vw, 50px);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin: 0 0 10px;
  background: linear-gradient(135deg, #fff 40%, #cce2f5 75%, #8cb3d6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.community-heading p {
  font-size: clamp(14px, 1.2vw, 15px);
  color: var(--text-dim);
  line-height: 1.6;
  margin: 0;
  max-width: 680px;
}

/* Groups */
.cm-group { margin-bottom: 30px; min-width: 0; }
.cm-row { display: grid; gap: 0 22px; }

.cm-group-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  color: var(--text-dim);
  font: 700 11px var(--mono);
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

.cm-group-title::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan, #00f2fe);
  box-shadow: 0 0 10px rgba(0, 242, 254, .7);
}

.cm-group-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(148, 178, 214, .22), transparent);
}

.community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 18px;
}

@container (min-width: 1000px) {
  .cm-row { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
}

/* Cards (accent per channel via --acc / --acc-rgb) */
.community-card {
  --acc: #00f2fe;
  --acc-rgb: 0, 242, 254;
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 24px;
  border-radius: 20px;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(var(--acc-rgb), .09), transparent 55%),
    linear-gradient(180deg, rgba(15, 23, 36, .82), rgba(8, 13, 21, .9));
  backdrop-filter: blur(14px);
  border: 1px solid rgba(var(--acc-rgb), .16);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .04);
  transition: transform .25s cubic-bezier(.16, 1, .3, 1), border-color .25s ease, box-shadow .25s ease;
}

.community-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(var(--acc-rgb), .85), transparent);
  opacity: .55;
  transition: opacity .25s ease;
}

.community-card:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--acc-rgb), .45);
  box-shadow: 0 20px 46px rgba(0, 0, 0, .45), 0 0 26px rgba(var(--acc-rgb), .14);
}

.community-card:hover::before { opacity: 1; }

.cm-telegram, .cm-owner { --acc: #2aabee; --acc-rgb: 42, 171, 238; }
.cm-bot { --acc: #00f2fe; --acc-rgb: 0, 242, 254; }
.cm-whatsapp { --acc: #25d366; --acc-rgb: 37, 211, 102; }
.cm-youtube { --acc: #ff3b4f; --acc-rgb: 255, 59, 79; }
.cm-tiktok { --acc: #4de8f4; --acc-rgb: 77, 232, 244; }

.cm-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.community-icon {
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: var(--acc);
  background: rgba(var(--acc-rgb), .1);
  border: 1px solid rgba(var(--acc-rgb), .3);
  box-shadow: 0 0 18px rgba(var(--acc-rgb), .12);
}

.community-icon svg { width: 24px; height: 24px; }

.cm-tag {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(var(--acc-rgb), .28);
  background: rgba(var(--acc-rgb), .07);
  color: var(--acc);
  font: 700 10px var(--mono);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  white-space: nowrap;
}

.community-card h3 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: break-word;
}

.community-card p {
  margin: 0 0 18px;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.6;
  flex: 1;
}

/* Contact value + copy */
.cm-contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  margin-bottom: 14px;
  padding: 10px 12px 10px 14px;
  border-radius: 11px;
  background: rgba(4, 8, 14, .75);
  border: 1px solid rgba(148, 178, 214, .14);
}

.cm-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--gold-bright, #d4b878);
  font: 700 13px var(--mono);
  letter-spacing: .4px;
}

.cm-copy {
  flex: none;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(var(--acc-rgb), .35);
  background: rgba(var(--acc-rgb), .08);
  color: var(--acc);
  font: 600 11px var(--mono);
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.cm-copy:hover { background: rgba(var(--acc-rgb), .16); }
.cm-copy.is-copied { color: #0b1119; background: var(--acc); border-color: var(--acc); }

/* Primary action */
.cm-actions { margin-top: auto; }

.community-card a.cm-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  padding: 11px 18px;
  border-radius: 12px;
  text-decoration: none;
  font: 700 13px var(--font);
  color: #fff;
  background: linear-gradient(135deg, rgba(var(--acc-rgb), .22), rgba(var(--acc-rgb), .08));
  border: 1px solid rgba(var(--acc-rgb), .42);
  transition: background .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.community-card a.cm-btn:hover {
  border-color: rgba(var(--acc-rgb), .75);
  background: linear-gradient(135deg, rgba(var(--acc-rgb), .32), rgba(var(--acc-rgb), .12));
  box-shadow: 0 0 22px rgba(var(--acc-rgb), .22);
  color: #fff;
}

.cm-whatsapp a.cm-btn {
  background: linear-gradient(135deg, #1fae55, #128c4b);
  border-color: rgba(37, 211, 102, .7);
}

.cm-whatsapp a.cm-btn:hover {
  background: linear-gradient(135deg, #25d366, #16a058);
  box-shadow: 0 0 26px rgba(37, 211, 102, .35);
}

.community-card a.cm-btn:focus-visible,
.cm-copy:focus-visible,
.cm-resource:focus-visible {
  outline: 2px solid var(--acc, #00f2fe);
  outline-offset: 2px;
}

/* Help & resources */
.cm-resources {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 14px;
}

.cm-resource {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 16px 18px;
  border-radius: 14px;
  text-decoration: none;
  background: rgba(11, 17, 27, .7);
  border: 1px solid rgba(148, 178, 214, .14);
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
}

.cm-resource strong { color: #fff; font-size: 14px; font-weight: 700; }
.cm-resource span { color: var(--text-dim); font-size: 12px; line-height: 1.5; }

.cm-resource:hover {
  transform: translateY(-2px);
  border-color: rgba(212, 184, 120, .45);
  background: rgba(16, 25, 38, .82);
}

.community-note {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.6;
}

#community-status {
  min-height: 18px;
  margin-top: 10px;
  color: var(--cyan);
  font: 600 12px var(--mono);
}

@media (max-width: 560px) {
  .community-card { padding: 20px; border-radius: 18px; }
  .community-card h3 { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  .community-card, .cm-resource, .community-card a.cm-btn { transition: none; }
  .community-card:hover, .cm-resource:hover { transform: none; }
}
