/* =============================================================================
   Grupos de Oferta — estilos. Vanilla, sem libs. Layout COMPACTO (mobile-first):
   uma linha por grupo -> ícone + nome + membros | WhatsApp | Telegram.
   Paleta e medidas centralizadas em :root pra ajustar fácil a identidade.
   ============================================================================= */
:root {
  --ink:           rgba(26, 43, 51, 1);   /* preto azulado (fundo do header)        */
  --accent:        rgba(0, 197, 229, 1);  /* azul oficial da marca (destaques)      */
  --accent-dark:   #009cc1;               /* azul mais escuro (hover/gradiente)     */
  --whatsapp:      #25d366;   /* verde oficial WhatsApp                 */
  --whatsapp-dark: #1da851;
  --telegram:      #229ed9;   /* azul oficial Telegram                  */
  --telegram-dark: #1b86b8;

  --bg:        #f4f6fb;
  --card:      #ffffff;
  --text:      #1f2333;
  --text-soft: #6b7080;
  --border:    #e6e8f0;

  --radius:  10px;
  --shadow:  0 1px 2px rgba(16, 20, 40, .05);
  --maxw:    760px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Roboto", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.45;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 16px;
}

/* ---- Header (compacto) ----------------------------------------------------- */
.site-header {
  background: linear-gradient(135deg, var(--ink) 0%, var(--accent-dark) 100%);
  color: #fff;
  padding: 26px 0 22px;
  text-align: center;
  border-bottom: 3px solid var(--accent);
}

.site-title {
  margin: 0;
  font-size: clamp(1.35rem, 5vw, 2rem);
  font-weight: 800;
  letter-spacing: .4px;
  text-transform: uppercase;
}

.site-tagline {
  margin: 8px auto 0;
  max-width: 560px;
  font-size: clamp(.82rem, 2.4vw, .98rem);
  color: rgba(255, 255, 255, .9);
}

/* ---- Lista de grupos ------------------------------------------------------- */
.groups-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 0;
}

/* Uma linha = um grupo: [ícone] | título+descrição | botões. */
.group-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 8px 12px;
}

/* Bloco principal = coluna do ícone + coluna de texto. Ocupa o espaço livre. */
.group-row__main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Coluna do ícone: largura reservada e fixa, ícone centralizado. */
.group-row__icon {
  flex-shrink: 0;
  width: 1.9rem;
  text-align: center;
  font-size: 1.15rem;
  line-height: 1;
}

/* Coluna de texto: nome em cima, descrição embaixo (empilhados). */
.group-row__label {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.group-row__name {
  font-weight: 600;
  font-size: .95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.group-row__members {
  flex-shrink: 0;
  color: var(--text-soft);
  font-size: .76rem;
  white-space: nowrap;
}

/* Lado direito: botões. Nunca encolhem. */
.group-row__actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* ---- Botões (compactos) ---------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border: none;
  border-radius: 8px;
  font-size: .8rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s ease, transform .05s ease;
}

.btn:active { transform: translateY(1px); }

.btn svg { width: 15px; height: 15px; fill: currentColor; flex-shrink: 0; }

.btn--whatsapp { background: var(--whatsapp); }
.btn--whatsapp:hover { background: var(--whatsapp-dark); }

.btn--telegram { background: var(--telegram); }
.btn--telegram:hover { background: var(--telegram-dark); }

/* Placeholder (link ainda não definido): mesmo visual, porém inativo. */
.btn--placeholder { cursor: default; }
.btn--placeholder:active { transform: none; }

/* Slot reservado: ocupa o espaço de um botão mas fica invisível. Mantém o
   WhatsApp alinhado à esquerda quando o grupo ainda não tem Telegram. */
.btn--reserved { visibility: hidden; }

/* ---- Nota discreta sob uma linha (ex.: canal do Instagram) ----------------- */
/* Fica FORA do box, logo abaixo da linha do grupo, com pouco destaque. */
.group-note {
  margin: -2px 0 2px;
  padding-right: 14px;
  font-size: .9rem;
  text-align: right;
  color: var(--text-soft);
}

/* Descrição (palavras-chave / SEO) logo abaixo do título, na coluna de texto. */
.group-desc {
  margin: 1px 0 0;
  font-size: .8rem;
  line-height: 1.25;
  color: var(--text-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* "Instagram": bold, gradiente rosa/roxo e sublinhado pra sinalizar clique. */
.group-note__ig {
  font-weight: 700;
  background: linear-gradient(45deg, #7b2ff7 0%, #f10796 60%, #ff6a3d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-decoration: underline;
  text-decoration-color: #c7299b;   /* texto é transparente, então fixa a cor do sublinhado */
  text-underline-offset: 2px;
}

/* ---- Footer ---------------------------------------------------------------- */
.site-footer {
  margin-top: 18px;
  padding: 20px 0 28px;
  text-align: center;
  color: var(--text-soft);
  font-size: .85rem;
  border-top: 1px solid var(--border);
}

.footer-cta { margin: 0 0 14px; }

/* Letras miúdas (disclaimer / palavras-chave). */
.legal {
  margin: 0;
  text-align: justify;
  font-size: .7rem;
  line-height: 1.5;
  color: #9aa0b0;
}

.legal strong { color: #7c8294; font-weight: 600; }

/* ---- Mobile (< 560px): empilha em 2 linhas -------------------------------- */
/* No celular:
   linha 1 = [ícone] + (nome em cima / descrição embaixo);
   linha 2 = WhatsApp + Telegram ocupando a largura toda. */
@media (max-width: 560px) {
  .group-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 11px 13px;
  }

  /* Nome inteiro agora — tem a linha toda pra ele. */
  .group-row__name {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    font-size: 1rem;
  }
  /* Descrição inteira também (sem truncar) no celular. */
  .group-desc {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  /* Botões lado a lado, dividindo a largura (alvo de toque maior). */
  .group-row__actions { width: 100%; }
  .btn {
    flex: 1 1 0;
    justify-content: center;
    padding: 10px;
    font-size: .85rem;
  }
}

/* ---- Desktop (>= 561px): nome e ícone um pouco maiores --------------------- */
@media (min-width: 561px) {
  .group-row__name { font-size: 1.2rem; }
  .group-row__icon { font-size: 1.75rem; width: 2.6rem; }
}
