/*
Theme Name: RD High Ticket
Theme URI: https://representacaodigital.com.br
Author: Representação Digital
Author URI: https://representacaodigital.com.br
Description: Tema de blocos (WordPress puro, sem plugins) para a onepage de alta conversão da Representação Digital — hospedagem verde, criação de sites, SEO e Google Ads.
Version: 2.0.0
Requires at least: 6.5
Tested up to: 6.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rd-highticket
Tags: full-site-editing, block-styles, one-column, custom-colors, custom-menu, featured-images, translation-ready
*/

/* ==========================================================================
   ESTE ARQUIVO CONTÉM APENAS O QUE OS BLOCOS NÃO CONSEGUEM EXPRESSAR.

   Cores, gradientes, bordas, raios, espaçamentos e tipografia agora vivem nos
   atributos dos blocos (patterns/onepage.php, parts/header.html,
   parts/footer.html) e nos estilos globais do theme.json.

   O que continua aqui:
   - :hover, ::before/::after e outros estados/pseudo-elementos
   - gradiente aplicado a texto (background-clip: text)
   - backdrop-filter, position: sticky/fixed/absolute
   - largura/altura fixas com display: grid + place-items
   - flex column com botão empurrado para o rodapé do cartão
   - media queries (os blocos não têm breakpoints próprios)
   ========================================================================== */

/* ==========================================================================
   1. Base
   ========================================================================== */
html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: rgba(52, 211, 153, .30); color: #fff; }

/* Gradiente aplicado a texto — não há suporte em atributos de bloco. */
.rd-grad {
  background: linear-gradient(120deg, #34d399 0%, #a3e635 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* Números de destaque do hero com gradiente branco → verde. */
.rd-trust-num {
  background: linear-gradient(120deg, #ffffff, #34d399);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* Fonte serifada em itálico dentro de um título (span interno). */
.rd-serif {
  font-family: var(--wp--preset--font-family--serif);
  font-style: italic;
  font-weight: 400;
}

/* Revelação suave ao rolar (só quando o JS está ativo). */
.rd-js .rd-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s cubic-bezier(.16, .84, .44, 1), transform .8s cubic-bezier(.16, .84, .44, 1);
}
.rd-js .rd-reveal.rd-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .rd-js .rd-reveal { opacity: 1 !important; transform: none !important; }
  html { scroll-behavior: auto; }
}

/* display: inline-block — não existe atributo de bloco para display. */
.rd-eyebrow,
.rd-tag {
  display: inline-block;
}

/* ==========================================================================
   2. Header — sticky, desfoque de fundo e selo "RD" (::before)
   ========================================================================== */
.rd-header {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
}

.rd-brand-name {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin: 0;
  line-height: 1;
  color: #e9eef4;
  white-space: nowrap;
}

.rd-brand-name a { color: inherit; text-decoration: none; }

/* Selo quadrado antes do nome — conteúdo gerado por ::before. */
.rd-brand-name::before {
  content: "RD";
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(140deg, #34d399, #a3e635);
  color: #04120c;
  font-size: .9rem;
  font-weight: 800;
  letter-spacing: -.03em;
}

/* Links do menu — estado normal e hover. */
.rd-nav .wp-block-navigation-item__content {
  color: #e9eef4;
  opacity: .86;
  text-decoration: none;
  padding: .35rem .55rem;
}
.rd-nav .wp-block-navigation-item__content:hover { opacity: 1; color: #34d399; }
.rd-nav .wp-block-navigation__responsive-container-open,
.rd-nav .wp-block-navigation__responsive-container-close { color: #e9eef4; }

/* ==========================================================================
   3. Botões — hover e sombra
   ========================================================================== */
.wp-block-button__link {
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease;
}
.wp-block-button__link:hover { transform: translateY(-2px); }

.wp-block-button:not(.is-style-rd-ghost) .wp-block-button__link {
  background: linear-gradient(120deg, #34d399, #a3e635);
  color: #04120c;
  box-shadow: 0 18px 40px -22px rgba(52, 211, 153, .9);
}
.wp-block-button:not(.is-style-rd-ghost) .wp-block-button__link:hover {
  box-shadow: 0 24px 50px -20px rgba(163, 230, 53, .85);
}

.is-style-rd-ghost .wp-block-button__link {
  background: transparent;
  color: #e9eef4;
  border: 1px solid rgba(255, 255, 255, .10);
}
.is-style-rd-ghost .wp-block-button__link:hover {
  border-color: rgba(52, 211, 153, .6);
  background: rgba(52, 211, 153, .08);
}

/* ==========================================================================
   4. Ícones e avatar — dimensões fixas em grade
   ========================================================================== */
.rd-ico {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
}

.rd-avatar {
  width: 78px;
  height: 78px;
  margin-left: auto !important;
  margin-right: auto !important;
  display: grid;
  place-items: center;
}

/* ==========================================================================
   5. Cartões — altura, hover e coluna de plano
   ========================================================================== */
.rd-card {
  height: 100%;
  transition: transform .35s ease, border-color .35s ease, box-shadow .35s ease;
}
.rd-card:hover {
  transform: translateY(-6px);
  border-color: rgba(52, 211, 153, .45);
  box-shadow: 0 30px 70px -40px rgba(52, 211, 153, .55);
}

.rd-plan { display: flex; flex-direction: column; position: relative; }
.rd-plan h3 { min-height: 3.1em; }
.rd-plan .wp-block-button { margin-top: auto; }
.rd-plan .wp-block-button__link { width: 100%; }

.rd-plan--featured:hover { transform: translateY(-8px); }

/* Selo "Mais contratado" sobreposto à borda do cartão. */
.rd-plan-flag {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}

/* ==========================================================================
   6. Preço — sobrescrito e unidades dentro de um mesmo parágrafo
   ========================================================================== */
.rd-price .rd-cur {
  font-size: 1.1rem;
  font-weight: 700;
  vertical-align: super;
  color: #9aa7b4;
  margin-right: .15rem;
}
.rd-price .rd-per {
  font-size: .95rem;
  font-weight: 600;
  color: #9aa7b4;
  letter-spacing: 0;
}

/* ==========================================================================
   7. Citação — família serifada no texto e cite em sans
   ========================================================================== */
.rd-quote,
.rd-quote p {
  font-family: var(--wp--preset--font-family--serif);
}
.rd-quote cite {
  font-family: var(--wp--preset--font-family--body);
  font-style: normal;
  font-size: .85rem;
  color: #9aa7b4;
}

/* ==========================================================================
   8. Lista de checagem — marcador via ::before
   ========================================================================== */
.rd-checks { list-style: none; padding-left: 0 !important; }
.rd-checks li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: .65rem;
}
.rd-checks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: .05em;
  color: #34d399;
  font-weight: 800;
}

/* ==========================================================================
   8. FAQ — marcador +/− e estado aberto
   ========================================================================== */
.wp-block-details.rd-faq-item { transition: border-color .3s ease, background .3s ease; }
.wp-block-details.rd-faq-item[open] {
  border-color: rgba(52, 211, 153, .4);
  background: rgba(52, 211, 153, .05);
}
.wp-block-details.rd-faq-item summary {
  cursor: pointer;
  font-size: 1.03rem;
  font-weight: 700;
  color: #fff;
  list-style: none;
  position: relative;
  padding-right: 2rem;
}
.wp-block-details.rd-faq-item summary::-webkit-details-marker { display: none; }
.wp-block-details.rd-faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: -.1em;
  color: #34d399;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
}
.wp-block-details.rd-faq-item[open] summary::after { content: "–"; }

/* ==========================================================================
   9. Rodapé — links e lista
   ========================================================================== */
.rd-foot-links { list-style: none !important; }
.rd-foot-links li { margin-bottom: .55rem; }
.rd-foot-links a,
.rd-footer a { color: #cbd5df; text-decoration: none; font-size: .94rem; }
.rd-foot-links a:hover,
.rd-footer a:hover { color: #34d399; }

.rd-sep { background: none !important; }

/* ==========================================================================
   10. Conteúdo migrado do site oficial (páginas internas, blog, busca)
   ========================================================================== */
/* Cartões com fundo claro precisam de texto escuro. */
.has-light-gray-background-color,
.has-very-light-gray-background-color {
  color: #161616;
}
.has-light-gray-background-color a,
.has-very-light-gray-background-color a { color: #1d4ed8; }

.has-vivid-green-cyan-background-color,
.has-vivid-green-cyan-background-color a { color: #04120c; }

/* Títulos de seção das páginas internas. */
.rd-inner h1 { margin-bottom: 1rem; }
.rd-inner h2 { margin-top: 2.2rem; }
.rd-inner p { color: #b9c4d0; }
.rd-inner .has-light-gray-background-color p,
.rd-inner .has-very-light-gray-background-color p { color: #333; }

/* Imagens do conteúdo: nunca estourar a largura. */
.rd-inner img,
.rd-post img { max-width: 100%; height: auto; }

/* Posts: largura de leitura confortável. */
.rd-post-body { font-size: 1.08rem; line-height: 1.8; }
.rd-post-body h2 { margin-top: 2.4rem; }
.rd-post-body h3 { margin-top: 2rem; }
.rd-post-body ul,
.rd-post-body ol { padding-left: 1.3rem; }
.rd-post-body li { margin-bottom: .5rem; color: #cbd5df; }

/* Listagem de posts / arquivos. */
.rd-post-card {
  display: block;
  height: 100%;
  padding: 1.6rem;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 18px;
  background: rgba(255, 255, 255, .045);
  text-decoration: none !important;
  transition: transform .3s ease, border-color .3s ease;
}
.rd-post-card:hover { transform: translateY(-4px); border-color: rgba(52, 211, 153, .45); }
.rd-post-card h3 { margin: 0 0 .6rem; font-size: 1.1rem; color: #fff; }
.rd-post-card p { margin: 0; color: #9aa7b4; font-size: .94rem; }
.rd-post-meta { color: #34d399; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

/* Busca e paginação. */
.rd-inner .wp-block-search__input {
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .10);
  color: #e9eef4;
  border-radius: 999px;
  padding: .8rem 1.2rem;
}
.rd-inner .wp-block-query-pagination a,
.rd-inner .page-numbers {
  color: #34d399;
  text-decoration: none;
  font-weight: 700;
}

/* ==========================================================================
   11. Responsivo — os blocos não têm breakpoints próprios
   ========================================================================== */
@media (max-width: 960px) {
  .rd-header-cta { display: none; }
}

@media (max-width: 700px) {
  .rd-card, .rd-founder { padding: 1.6rem !important; }
}

@media (max-width: 480px) {
  .rd-trust .wp-block-column { flex-basis: 100% !important; }
}
