/* =========================================================
   MU Online Community - compact media-page layout
   ========================================================= */

.community-main {
  min-height: 65vh;
  /* no background here: an opaque --page-bg copy would cover the fixed universe/nebula
     layers (z:-2/-3) that every other page shows through the transparent body */
}

/* Shell matches every other content page: the section is a white card
   (default section styling) with the breadcrumb + content inside it. */
section.container.media-page.community-page {
  width: 93%;
  max-width: 1240px;
  margin: 2rem auto 2.6rem !important;
}

.community-page .breadcrumb-nav {
  margin: 0 0 1rem !important;
}

/* .white-box uses the global card styling (style.css) — no per-page override needed. */

/* Page header now uses the shared premium .page-header-box component in style.css
   (brand kicker + gold accent). Kept here only: page-specific header tweaks, if any. */

.community-shell {
  padding: 1.1rem !important;
}

.community-section-title {
  margin: 0 0 .85rem !important;
  color: var(--accent, #eaf0ff) !important;
  font-size: clamp(1.2rem, 1.3vw + .9rem, 1.55rem) !important;
  line-height: 1.2;
  text-align: left !important;
}

/* =========================================================
   Featured Discord hero — the #1 support channel gets top billing
   ========================================================= */

.discord-hero {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  margin: 0 0 1.1rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid rgba(88, 101, 242, .45);
  border-radius: 16px;
  background:
    radial-gradient(120% 160% at 0% 0%, rgba(88, 101, 242, .28) 0%, rgba(88, 101, 242, .08) 45%, transparent 70%),
    linear-gradient(180deg, #10182c 0%, #0b1220 100%);
  color: var(--text, #d5ddef);
  text-decoration: none;
  box-shadow: 0 0 0 1px rgba(88, 101, 242, .08), 0 12px 30px rgba(0, 0, 0, .35);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.discord-hero:hover,
.discord-hero:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(88, 101, 242, .8);
  box-shadow: 0 0 0 1px rgba(88, 101, 242, .25), 0 16px 38px rgba(0, 0, 0, .45);
  outline: none;
}

.discord-hero.is-disabled {
  opacity: .6;
  pointer-events: none;
}

.discord-hero-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: #5865f2;
  color: #fff;
  box-shadow: 0 8px 22px rgba(88, 101, 242, .4);
}

.discord-hero-icon svg {
  width: 36px;
  height: 28px;
}

.discord-hero-body {
  display: grid;
  gap: .3rem;
  min-width: 0;
}

.discord-hero-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .55rem;
}

.discord-hero-name {
  color: var(--text-strong, #eaf0ff);
  font-size: 1.25rem;
  font-weight: 950;
  line-height: 1.15;
}

.discord-hero-badge {
  padding: .18rem .55rem;
  border-radius: 999px;
  background: rgba(88, 101, 242, .18);
  border: 1px solid rgba(88, 101, 242, .5);
  color: #aab4ff;
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.discord-hero-desc {
  color: var(--text-muted, #9aa5c0);
  font-size: .92rem;
  font-weight: 700;
  line-height: 1.4;
  max-width: 62ch;
}

.discord-hero-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem 1.1rem;
  margin-top: .2rem;
  color: var(--text-muted, #8a94ad);
  font-size: .84rem;
  font-weight: 800;
}

.discord-stat {
  display: inline-flex;
  align-items: center;
  gap: .38rem;
  white-space: nowrap;
}

.discord-stat-online {
  color: #3fd07a;
}

.community-online-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #23a55a;
  box-shadow: 0 0 0 0 rgba(35, 165, 90, .55);
  animation: community-online-pulse 2.2s ease-out infinite;
}

@keyframes community-online-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(35, 165, 90, .55); }
  70%  { box-shadow: 0 0 0 7px rgba(35, 165, 90, 0); }
  100% { box-shadow: 0 0 0 0 rgba(35, 165, 90, 0); }
}

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

.discord-hero-cta {
  align-self: center;
  padding: .68rem 1.25rem;
  border-radius: 12px;
  background: #5865f2;
  color: #fff;
  font-size: .92rem;
  font-weight: 950;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(88, 101, 242, .35);
  transition: background .16s ease;
}

.discord-hero:hover .discord-hero-cta,
.discord-hero:focus-visible .discord-hero-cta {
  background: #6a76ff;
}

/* Header pill variant: live online count instead of a static link count */
.page-count-pill.community-online-pill {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: #3fd07a;
  white-space: nowrap;
}

.community-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .7rem;
}

.community-card {
  /* Per-network identity color — overridden by the --facebook/--youtube/
     --guides/--top100 modifiers below; defaults to the brand red. */
  --card-accent: var(--brand-1, #d61f2b);
  --card-accent-soft: rgba(214, 31, 43, .10);
  --card-accent-border: rgba(214, 31, 43, .38);
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: .68rem;
  align-items: flex-start;
  min-height: 112px;
  padding: .82rem;
  border: 1px solid var(--border, rgba(146,166,214,.16));
  border-radius: 15px;
  background:
    radial-gradient(130% 95% at 100% 0%, var(--card-accent-soft), transparent 55%),
    linear-gradient(180deg, #0e1626 0%, #0b1220 100%);
  color: var(--text, #d5ddef);
  text-decoration: none;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.community-card--facebook {
  --card-accent: #5b9dff;
  --card-accent-soft: rgba(24, 119, 242, .16);
  --card-accent-border: rgba(24, 119, 242, .45);
}

.community-card--youtube {
  --card-accent: #ff4d4d;
  --card-accent-soft: rgba(255, 45, 45, .13);
  --card-accent-border: rgba(255, 45, 45, .42);
}

.community-card--guides {
  --card-accent: #f5c24b;
  --card-accent-soft: rgba(245, 194, 75, .13);
  --card-accent-border: rgba(245, 194, 75, .42);
}

.community-card--top100 {
  --card-accent: #ffb054;
  --card-accent-soft: rgba(255, 145, 0, .14);
  --card-accent-border: rgba(255, 145, 0, .45);
}

.community-card:hover,
.community-card:focus-visible {
  transform: translateY(-1px);
  border-color: var(--card-accent-border);
  background:
    radial-gradient(130% 95% at 100% 0%, var(--card-accent-soft), transparent 55%),
    linear-gradient(180deg, #131d31 0%, #0e1626 100%);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .35), 0 0 22px var(--card-accent-soft);
  outline: none;
}

.community-card.is-disabled {
  opacity: .6;
  pointer-events: none;
}

.community-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--card-accent-soft, var(--surface-1, #0b1220));
  border: 1px solid var(--card-accent-border, rgba(146, 166, 214, .16));
  color: var(--card-accent, var(--brand-1, #d61f2b));
  font-size: .83rem;
  font-weight: 950;
  line-height: 1;
}

.community-card-body {
  display: grid;
  gap: .18rem;
  min-width: 0;
}

.community-name {
  color: var(--text-strong, #eaf0ff);
  font-size: .96rem;
  font-weight: 950;
  line-height: 1.2;
}

.community-desc {
  color: var(--text-muted, #8a94ad);
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.32;
}

.community-action {
  margin-top: .12rem;
  color: var(--card-accent, var(--brand-1, #d61f2b));
  font-size: .8rem;
  font-weight: 950;
  line-height: 1.25;
}

.community-seo-copy {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .65rem;
  align-items: center;
  margin-top: .9rem;
  padding: .8rem .9rem;
  border: 1px solid var(--border, rgba(146,166,214,.16));
  border-radius: 14px;
  background: var(--surface-1, #0b1220);
  color: var(--text-muted, #8a94ad);
  font-size: .9rem;
  line-height: 1.42;
}

.community-seo-copy strong {
  color: var(--text-strong, #eaf0ff);
  font-weight: 950;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .community-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  section.container.media-page.community-page {
    width: 94%;
    margin-top: 1rem !important;
  }

  .community-page .page-header-box {
    align-items: flex-start;
    flex-direction: column;
    padding: 1rem !important;
  }

  .community-page .page-title {
    font-size: clamp(1.55rem, 8vw, 2rem) !important;
  }

  .community-shell {
    padding: 1rem !important;
  }

  .community-grid {
    grid-template-columns: 1fr;
  }

  .community-card {
    min-height: 0;
  }

  .discord-hero {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: .8rem;
    padding: .95rem 1rem;
  }

  .discord-hero-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }

  .discord-hero-icon svg {
    width: 27px;
    height: 21px;
  }

  .discord-hero-cta {
    grid-column: 1 / -1;
    justify-self: stretch;
    text-align: center;
  }

  .community-seo-copy {
    grid-template-columns: 1fr;
    gap: .25rem;
  }

  .community-seo-copy strong {
    white-space: normal;
  }
}
