/* Rede TIPAVA — site tipava.com.br (o "linktree completo"). v0.4.1
   Celular primeiro; no PC, links à esquerda e conteúdo à direita. Modo escuro pelo sistema ou pelo botão. */

:root {
  --r-fundo: #f6f6f7; --r-cartao: #ffffff; --r-texto: #111111; --r-suave: #5c5c5c; --r-borda: #e6e6e6;
  --r-sombra: 0 1px 2px rgba(17, 17, 17, .05), 0 10px 30px rgba(17, 17, 17, .06);
  --r-realce-fundo: var(--vermelho-suave); --r-realce-texto: var(--vermelho-forte);
  color-scheme: light;
}
html[data-tema="escuro"] {
  --r-fundo: #0e0e10; --r-cartao: #18181b; --r-texto: #f3f3f3; --r-suave: #b4b4b8; --r-borda: #2a2a2e;
  --r-sombra: 0 1px 2px rgba(0, 0, 0, .4); --r-realce-fundo: rgba(227, 28, 36, .2); --r-realce-texto: #ff7a7f; color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  html[data-tema="sistema"] {
    --r-fundo: #0e0e10; --r-cartao: #18181b; --r-texto: #f3f3f3; --r-suave: #b4b4b8; --r-borda: #2a2a2e;
    --r-sombra: 0 1px 2px rgba(0, 0, 0, .4); --r-realce-fundo: rgba(227, 28, 36, .2); --r-realce-texto: #ff7a7f; color-scheme: dark;
  }
}

body.rede { background: var(--r-fundo); color: var(--r-texto); min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body.rede a:not(.botao):not(.pular) { color: inherit; }
.ic { width: 22px; height: 22px; flex: none; }
.rede .texto-suave { color: var(--r-suave); }
.rede .recado { color: var(--preto); }

/* Barra do topo */
.rede-barra {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .55rem max(1rem, env(safe-area-inset-left)); background: color-mix(in srgb, var(--r-fundo) 88%, transparent);
  position: sticky; top: 0; z-index: 20; backdrop-filter: blur(10px);
}
.rede-barra-marca { display: inline-flex; text-decoration: none; }
.rede-barra-marca .marca-icone { width: 32px; height: 32px; }
.rede-barra-marca .marca-texto { font-size: 1.1rem; color: var(--r-texto); }
.rede-barra-marca .marca-logo { height: 32px; }
.rede-barra-acoes { display: flex; align-items: center; gap: .4rem; }
.rede-icone-botao {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: var(--r-cartao); color: var(--r-texto); box-shadow: var(--r-sombra); cursor: pointer;
}
html[data-tema="escuro"] .ic-lua, html:not([data-tema="escuro"]) .ic-sol { display: none; }
@media (prefers-color-scheme: dark) { html[data-tema="sistema"] .ic-lua { display: none; } html[data-tema="sistema"] .ic-sol { display: block; } }
.rede-conta {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: 0 .9rem; border-radius: 999px;
  background: var(--r-cartao); box-shadow: var(--r-sombra); text-decoration: none; font-weight: 800; font-size: .92rem; white-space: nowrap;
}
@media (max-width: 420px) {
  .rede-conta span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .rede-conta { padding: 0; width: 44px; justify-content: center; }
}

/* Grade */
.rede-principal { flex: 1; width: min(100% - 1.5rem, 1100px); margin: 0 auto; padding: .5rem 0 3rem; }
.rede-grade { display: grid; gap: 1.25rem; }
.rede-coluna-links, .rede-coluna-conteudo { display: grid; gap: 1.25rem; align-content: start; min-width: 0; }
@media (min-width: 1000px) {
  .rede-grade { grid-template-columns: 400px minmax(0, 1fr); gap: 2rem; align-items: start; }
  .rede-grade-uma { grid-template-columns: minmax(0, 520px); justify-content: center; }
  .rede-coluna-links { position: sticky; top: 72px; }
}

/* Perfil */
.rede-perfil { text-align: center; padding: 1rem .5rem 0; }
.perfil-tip img { width: 132px; height: 132px; object-fit: contain; }
.imagem-reservada {
  display: inline-grid; place-items: center; width: 132px; height: 132px; border-radius: 28px;
  background: repeating-linear-gradient(45deg, var(--r-borda) 0 10px, transparent 10px 20px), var(--r-cartao);
  color: var(--r-suave); font-weight: 800; font-size: .85rem; border: 2px dashed var(--r-borda);
}
.rede-perfil h1 { font-size: clamp(1.9rem, 1.5rem + 2vw, 2.4rem); margin: .5rem 0 .25rem; font-weight: 900; }
.perfil-frase { margin: 0 auto .75rem; color: var(--r-suave); font-weight: 700; max-width: 34ch; }
.selo-atendimento {
  display: inline-flex; align-items: center; gap: .5rem; margin: 0 0 .9rem; padding: .4rem .85rem; border-radius: 999px;
  background: var(--r-cartao); box-shadow: var(--r-sombra); font-weight: 800; font-size: .9rem;
}
.selo-ponto { width: 10px; height: 10px; border-radius: 50%; background: var(--cinza-4); }
.selo-aberto .selo-ponto { background: #1fa463; box-shadow: 0 0 0 4px rgba(31, 164, 99, .18); }
.perfil-redes { list-style: none; margin: 0; padding: 0; display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; }
.perfil-redes a { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--r-cartao); box-shadow: var(--r-sombra); }

/* Botões principais */
.rede-links ul { list-style: none; margin: 0 0 .5rem; padding: 0; display: grid; gap: .65rem; }
.rede-links-grupo { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--r-suave); margin: 1rem .25rem .5rem; font-weight: 900; }
.link-botao {
  display: flex; align-items: center; gap: .85rem; min-height: 64px; padding: .7rem 1rem; border-radius: 22px;
  background: var(--r-cartao); border: 2px solid var(--r-borda); text-decoration: none; color: var(--r-texto);
  transition: transform .15s, border-color .15s;
}
a.link-botao:hover { border-color: var(--vermelho); transform: translateY(-1px); }
a.link-botao:focus-visible { outline: none; box-shadow: var(--foco); }
.link-icone { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: var(--r-realce-fundo); color: var(--r-realce-texto); flex: none; }
.link-texto { flex: 1; display: grid; gap: .1rem; text-align: left; min-width: 0; }
.link-texto strong { font-size: 1.05rem; font-weight: 900; }
.link-texto small { color: var(--r-suave); font-size: .88rem; line-height: 1.3; }
.link-seta { color: var(--r-suave); }
.link-selo { font-size: .72rem; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; padding: .2rem .55rem; border-radius: 999px; background: var(--r-realce-fundo); color: var(--r-realce-texto); white-space: nowrap; }
.link-destaque { background: var(--vermelho); border-color: var(--vermelho); color: #fff !important; animation: pulso 2.6s ease-in-out infinite; }
.link-destaque .link-icone { background: rgba(255, 255, 255, .18); color: #fff; }
.link-destaque .link-texto small, .link-destaque .link-seta { color: rgba(255, 255, 255, .9); }
.link-destaque .link-selo { background: #fff; color: var(--vermelho-forte); }
.link-em-breve { opacity: .55; cursor: not-allowed; border-style: dashed; }
@keyframes pulso { 0%, 100% { box-shadow: 0 0 0 0 rgba(227, 28, 36, .35); } 50% { box-shadow: 0 0 0 10px rgba(227, 28, 36, 0); } }
@media (prefers-reduced-motion: reduce) { .link-destaque { animation: none; } a.link-botao:hover { transform: none; } * { scroll-behavior: auto !important; } }

/* Blocos */
.rede-bloco { background: var(--r-cartao); border-radius: 24px; box-shadow: var(--r-sombra); padding: clamp(1.1rem, 3.5vw, 1.75rem); scroll-margin-top: 80px; }
.rede-titulo { font-size: clamp(1.3rem, 1.1rem + 1vw, 1.65rem); font-weight: 900; margin: 0 0 1rem; }
.rede-acoes { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.rede-acoes .botao { gap: .5rem; }
.botao .ic { width: 20px; height: 20px; }

.rede-banners { padding: 0; overflow: hidden; }
.carrossel { position: relative; }
.carrossel-trilho { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-behavior: smooth; }
.carrossel-trilho::-webkit-scrollbar { display: none; }
.carrossel-item { flex: 0 0 100%; scroll-snap-align: center; }
.carrossel-item img { display: block; width: 100%; height: auto; }
.carrossel-seta { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); color: #111; display: grid; place-items: center; cursor: pointer; box-shadow: var(--sombra); }
.carrossel-anterior { left: .5rem; } .carrossel-proximo { right: .5rem; }

.marcas { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.marca-cartao { border: 2px solid var(--r-borda); border-radius: 20px; padding: 1rem; display: grid; gap: .75rem; align-content: start; }
.marca-em-breve { border-style: dashed; opacity: .8; }
.marca-cabeca { display: flex; gap: .75rem; align-items: center; }
.marca-cabeca h3 { margin: 0; font-size: 1.1rem; font-weight: 900; }
.marca-cabeca p { margin: .1rem 0 0; color: var(--r-suave); font-size: .9rem; }
.marca-cabeca .link-selo { margin-left: auto; }
.marca-inicial { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--vermelho); color: #fff; font-weight: 900; font-size: 1.4rem; flex: none; }
.marca-logo-img { width: 52px; height: 52px; object-fit: contain; border-radius: 14px; }
.marca-beneficios { margin: 0; padding-left: 1.1rem; color: var(--r-suave); display: grid; gap: .2rem; font-size: .93rem; }
.marca-cartao .botao { justify-self: start; }

.beneficios { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.beneficios li { display: grid; gap: .3rem; align-content: start; }
.beneficios span:not(.beneficio-icone) { color: var(--r-suave); font-size: .9rem; line-height: 1.4; }
.beneficio-icone { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 16px; background: var(--r-realce-fundo); color: var(--r-realce-texto); }

.passos-rede { list-style: none; margin: 0; padding: 0; counter-reset: passo; display: grid; gap: .8rem; }
.passos-rede li { counter-increment: passo; display: grid; grid-template-columns: 44px 1fr; column-gap: .8rem; }
.passos-rede li::before { content: counter(passo); grid-row: span 2; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--vermelho); color: #fff; font-weight: 900; font-size: 1.15rem; }
.passos-rede span { color: var(--r-suave); font-size: .93rem; }

.rede-tip { display: grid; gap: 1rem; align-items: center; }
@media (min-width: 640px) { .rede-tip { grid-template-columns: 200px 1fr; } }
.rede-tip-imagem img { width: 200px; height: auto; max-width: 100%; }
.rede-tip-imagem .imagem-reservada { width: 180px; height: 180px; }
.rede-tip p { color: var(--r-suave); line-height: 1.55; }

.horarios-rede { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin: 1rem 0 .5rem; }
.horarios-rede h3 { display: flex; align-items: center; gap: .4rem; font-size: 1rem; margin: 0 0 .5rem; }
.horarios-rede ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.horarios-rede li { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem .7rem; border-radius: 12px; background: var(--r-fundo); }

.depoimentos { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.depoimento { margin: 0; padding: 1rem; border-radius: 18px; background: var(--r-fundo); }
.depoimento blockquote { margin: 0 0 .6rem; line-height: 1.5; }
.depoimento figcaption { display: flex; align-items: center; gap: .5rem; font-weight: 800; }
.depoimento img { border-radius: 50%; object-fit: cover; }

.faq-rede { display: grid; gap: .5rem; }
.faq-rede details { border: 2px solid var(--r-borda); border-radius: 16px; padding: 0 1rem; }
.faq-rede summary { cursor: pointer; font-weight: 800; padding: .9rem 0; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq-rede summary::after { content: "+"; font-weight: 900; color: var(--vermelho); }
.faq-rede details[open] summary::after { content: "–"; }
.faq-rede summary::-webkit-details-marker { display: none; }
.faq-rede .texto-formatado { padding-bottom: .9rem; color: var(--r-suave); }

.contato-lista { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.contato-lista a { display: flex; align-items: center; gap: .75rem; padding: .75rem .9rem; border-radius: 16px; background: var(--r-fundo); text-decoration: none; min-height: 56px; }
.contato-lista span { display: grid; font-size: .92rem; color: var(--r-suave); }
.contato-lista strong { color: var(--r-texto); }
.rede-form { margin-top: .5rem; }
.rede-form h2 { margin: 0; font-size: 1.15rem; }
.rede .campo input, .rede .campo textarea { background: var(--r-cartao); color: var(--r-texto); border-color: var(--r-borda); }
.rede .campo-ajuda { color: var(--r-suave); }
.armadilha { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Páginas internas */
.rede-pagina { background: var(--r-cartao); border-radius: 24px; box-shadow: var(--r-sombra); padding: clamp(1.1rem, 4vw, 2rem); max-width: 760px; margin: 0 auto; display: grid; gap: 1rem; }
.rede-pagina h1 { margin: 0; font-size: clamp(1.7rem, 1.4rem + 1.5vw, 2.2rem); font-weight: 900; }
.rede-pagina .texto-formatado { line-height: 1.65; }
.rede-mais { text-align: center; margin: .5rem 0 0; }
.rede-mais a { display: inline-flex; align-items: center; gap: .35rem; font-weight: 800; text-decoration: none; }
.rede-mais a { color: var(--r-realce-texto); }
.rede-compacta { padding-top: .5rem; }

/* Rodapé, WhatsApp flutuante, instalar e avisos */
.rede-rodape { text-align: center; color: var(--r-suave); font-size: .88rem; padding: 2rem 1rem calc(5.5rem + env(safe-area-inset-bottom)); display: grid; gap: .35rem; justify-items: center; }
.rede-rodape p { margin: 0; }
.rede-rodape nav a { color: var(--r-texto); font-weight: 700; }
.rede-rodape-marca .marca-texto { color: var(--r-texto); }
.rede-versao { font-size: .75rem; opacity: .7; }
.rede-zap-flutuante {
  position: fixed; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 30;
  display: inline-flex; align-items: center; gap: .45rem; min-height: 54px; padding: 0 1.1rem; border-radius: 999px;
  background: #1a7f45; color: #fff !important; font-weight: 900; text-decoration: none; box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
}
.rede-instalar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(5rem + env(safe-area-inset-bottom)); z-index: 40;
  width: min(100% - 1.5rem, 420px); display: flex; align-items: center; gap: .6rem; padding: .7rem .7rem .7rem 1rem;
  background: var(--r-cartao); color: var(--r-texto); border-radius: 20px; box-shadow: 0 12px 34px rgba(0, 0, 0, .2);
}
.rede-instalar p { margin: 0; flex: 1; display: grid; font-size: .9rem; }
.rede-instalar p span { color: var(--r-suave); }
.rede-aviso { position: fixed; left: 50%; transform: translateX(-50%); top: 80px; z-index: 50; background: var(--r-texto); color: var(--r-fundo); padding: .6rem 1.1rem; border-radius: 999px; font-weight: 800; white-space: nowrap; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
@media print { .rede-barra, .rede-zap-flutuante, .rede-instalar { display: none; } }
