/* ── Support page ──────────────────────────────────────── */

/* Darker, lower-contrast page vs default landing (less orange wash) */
body.page-support {
  background: radial-gradient(980px 680px at 78% -5%, rgba(var(--accent-rgb), 0.07) 0%, transparent 58%),
    var(--bg);
}

.sp-main {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: clamp(5rem, 14vh, 9rem) 1.5rem clamp(4rem, 10vh, 7rem);
  overflow: hidden;
}

.sp-glow {
  position: absolute;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 600px;
  background: radial-gradient(ellipse 60% 55% at 50% 8%, rgba(255,138,31,.04) 0%, transparent 68%);
  pointer-events: none;
  z-index: 0;
}

.sp-container {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

/* ── Hero ──────────────────────────────────────────────── */
.sp-hero {
  text-align: center;
  margin-bottom: clamp(2rem, 5vh, 3rem);
}

.sp-eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 179, 71, 0.72);
}

.sp-title {
  margin: 0 0 0.85rem;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.15;
  color: rgba(255, 255, 255, 0.88);
  font-family: var(--title-font);
}

.sp-subtitle {
  margin: 0 auto;
  max-width: 50ch;
  font-size: 1.05rem;
  color: rgba(180, 188, 210, 0.78);
  font-weight: 300;
  line-height: 1.6;
}

/* ── Topic selector ────────────────────────────────────── */
.sp-topic-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: clamp(2rem, 5vh, 3rem);
}

.sp-topic-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2, #56607f);
  margin: 0;
}

.sp-topic-btns {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  justify-content: center;
}

.sp-topic-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.3rem;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.018);
  color: rgba(180, 188, 210, 0.82);
  cursor: pointer;
  font-family: var(--title-font);
  text-align: left;
  transition: border-color .18s, background .18s, color .18s, box-shadow .18s;
  min-width: 220px;
}

.sp-topic-btn:hover {
  border-color: rgba(255,255,255,0.11);
  background: rgba(255,255,255,0.035);
  color: rgba(240, 242, 248, 0.9);
}

.sp-topic-btn.is-active {
  border-color: rgba(255,138,31,0.28);
  background: rgba(255,138,31,0.045);
  color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 1px rgba(255,138,31,0.08) inset;
}

.sp-topic-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  transition: background .18s, border-color .18s, color .18s;
}

.sp-topic-icon svg {
  width: 17px;
  height: 17px;
}

.sp-topic-btn.is-active .sp-topic-icon {
  background: rgba(255,138,31,0.09);
  border-color: rgba(255,138,31,0.2);
  color: rgba(255, 179, 71, 0.85);
}

.sp-topic-text strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.25;
  color: inherit;
}

.sp-topic-text small {
  display: block;
  font-size: 0.76rem;
  font-weight: 300;
  line-height: 1.35;
  color: var(--muted-2, #56607f);
  margin-top: 0.15rem;
}

/* ── Cards grid ────────────────────────────────────────── */
.sp-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}

/* `display:grid` would override the UA-stylesheet's [hidden]{display:none} */
.sp-cards[hidden] { display: none !important; }

/* ── Base card ─────────────────────────────────────────── */
.sp-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  padding: 1.65rem 1.5rem 1.4rem;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(255,255,255,0.065);
  background: rgba(255,255,255,0.022);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
  overflow: hidden;
}

.sp-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity .22s ease;
  background: radial-gradient(ellipse 80% 55% at 50% 0%, rgba(255,255,255,.04), transparent 70%);
  pointer-events: none;
}

.sp-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255,255,255,0.11);
  box-shadow: 0 16px 40px rgba(0,0,0,.45);
}

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

/* ── Featured card — subtle tint ───────────────────────── */
.sp-card--featured {
  background: rgba(255,138,31,0.028);
  border-color: rgba(255,138,31,0.14);
}

.sp-card--featured:hover {
  border-color: rgba(255,138,31,0.24);
  box-shadow: 0 16px 40px rgba(255,138,31,.06), 0 4px 14px rgba(0,0,0,.4);
}

/* Badge */
.sp-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  align-self: flex-start;
  margin-bottom: 1.1rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent-2);
  background: rgba(255,138,31,0.12);
  border: 1px solid rgba(255,138,31,0.25);
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  line-height: 1;
}

/* Icon wrap */
.sp-card-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  margin-bottom: 1.1rem;
  flex-shrink: 0;
}

.sp-card-icon-wrap svg { width: 24px; height: 24px; }

.sp-card-icon-wrap--featured {
  background: rgba(255,138,31,0.07);
  border: 1px solid rgba(255,138,31,0.16);
  color: rgba(255, 179, 71, 0.82);
}

.sp-card-icon-wrap--telegram {
  background: rgba(42,171,238,0.06);
  border: 1px solid rgba(42,171,238,0.14);
  color: rgba(42, 171, 238, 0.88);
}

.sp-card-icon-wrap--discord {
  background: rgba(88,101,242,0.06);
  border: 1px solid rgba(88,101,242,0.14);
  color: rgba(121, 131, 245, 0.88);
}

/* Body */
.sp-card-body { flex: 1; margin-bottom: 1.1rem; }

.sp-card-title {
  margin: 0 0 0.5rem;
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.2;
  font-family: var(--title-font);
}

.sp-card-desc {
  margin: 0;
  font-size: 0.88rem;
  color: rgba(160, 168, 190, 0.82);
  font-weight: 300;
  line-height: 1.65;
}

/* Meta row */
.sp-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.85rem;
  margin-bottom: 1.4rem;
}

.sp-card-detail {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.76rem;
  font-weight: 400;
  color: var(--muted-2, #56607f);
}

/* CTA */
.sp-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(255,255,255,0.55);
  transition: color .15s, gap .15s;
  margin-top: auto;
}

.sp-card:hover .sp-card-cta {
  color: rgba(255,255,255,.92);
  gap: 0.6rem;
}

.sp-card-cta--featured {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.68rem 1.1rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #0b0e18;
  background: linear-gradient(135deg, #e67a18, #d9a04a);
  box-shadow: 0 4px 14px rgba(255,138,31,.18), inset 0 1px 0 rgba(255,255,255,.14);
  transition: filter .18s, gap .18s;
  width: 100%;
  margin-top: 0;
}

.sp-card--featured:hover .sp-card-cta--featured {
  filter: brightness(1.05);
  gap: 0.65rem;
  color: #0b0e18;
}

/* ── Pro badge variant ─────────────────────────────────── */
.sp-card-badge--pro {
  color: rgba(147, 197, 253, 0.88);
  background: rgba(96, 165, 250, 0.07);
  border: 1px solid rgba(96, 165, 250, 0.18);
}
/* only keep the shield-check icon, hide the first (placeholder) icon */
.sp-card-badge--pro svg:first-child { display: none; }

/* ── Pro card ──────────────────────────────────────────── */
.sp-card--pro {
  background: rgba(96, 165, 250, 0.028);
  border-color: rgba(96, 165, 250, 0.14);
}

.sp-card--pro:hover {
  border-color: rgba(96, 165, 250, 0.26);
  box-shadow: 0 16px 40px rgba(96, 165, 250, 0.05), 0 4px 14px rgba(0,0,0,.4);
}

.sp-card-icon-wrap--pro {
  background: rgba(96, 165, 250, 0.07);
  border: 1px solid rgba(96, 165, 250, 0.16);
  color: rgba(147, 197, 253, 0.85);
}

/* Pro CTA button */
.sp-card-cta--pro {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.68rem 1.1rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  background: linear-gradient(135deg, #2f6fd4, #5558d4);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.16), inset 0 1px 0 rgba(255,255,255,.1);
  transition: filter .18s, gap .18s;
  width: 100%;
  margin-top: 0;
}

.sp-card--pro:hover .sp-card-cta--pro {
  filter: brightness(1.06);
  gap: 0.65rem;
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 820px) {
  .sp-cards {
    grid-template-columns: 1fr;
    max-width: 440px;
    margin: 0 auto;
  }
  .sp-card--featured { order: -1; }
  /* Same horizontal band as .sp-cards — aligned insets from the page edge */
  .sp-topic-btns {
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
  }
  /* min-width only here — flex-basis 180px must NOT apply in column layout (≤500px)
     or it becomes a 180px minimum height per button and looks empty */
  .sp-topic-btn { min-width: 0; }
}

@media (max-width: 820px) and (min-width: 501px) {
  .sp-topic-btn { flex: 1 1 180px; }
}

@media (max-width: 640px) {
  /* Topic row: match card stack width (440px cap) + roomier tap targets */
  .sp-topic-btns {
    gap: 0.55rem;
  }
  .sp-topic-btn {
    padding: 0.8rem 1.1rem;
    gap: 0.65rem;
    min-width: 0;
  }
  .sp-topic-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
  }
  .sp-topic-icon svg {
    width: 16px;
    height: 16px;
  }
  .sp-topic-text strong {
    font-size: 0.88rem;
    line-height: 1.22;
  }
  .sp-topic-text small {
    font-size: 0.74rem;
    line-height: 1.35;
    margin-top: 0.12rem;
  }
}

@media (max-width: 500px) {
  .sp-main { padding: 5rem 1rem 3rem; }
  .sp-topic-btns {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .sp-topic-btn {
    min-width: 0;
    flex: 0 1 auto; /* explicit: no flex-grow / no 180px basis on height */
    width: 100%;
    padding-block: 0.88rem;
    padding-inline: 1.05rem;
  }
}
