/* ============================================================
   Bônus 20 Cadastro — Dark Immersive Theme
   ============================================================ */

/* --- Reset & Base ------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  background: #0D0D1A;
  color: #E8E8F0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  overflow-x: hidden;
  min-width: 0;
}

/* --- Typography -------------------------------------------- */
h1, h2, h3, h4 {
  font-family: Georgia, 'Times New Roman', serif;
  color: #00E5A0;
  line-height: 1.25;
}

h1 { font-size: clamp(1.4rem, 4vw, 2.2rem); margin-bottom: 0.75rem; }
h2 { font-size: clamp(1.15rem, 3vw, 1.6rem); margin: 1.75rem 0 0.4rem; }
h3 { font-size: clamp(1rem, 2.5vw, 1.25rem); margin: 1.2rem 0 0.3rem; }

p { margin-bottom: 1rem; }
a { color: #00E5A0; text-decoration: underline; }
a:hover { color: #C9A84C; }

strong { color: #C9A84C; }

hr {
  border: none;
  border-top: 1px solid #00E5A040;
  margin: 0.5rem 0 1rem;
}

time { color: #a0a0b8; font-size: 0.875rem; }

/* --- Skip Link --------------------------------------------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  position: fixed;
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  background: #00E5A0;
  color: #0D0D1A;
  padding: 0.5rem 1rem;
  z-index: 9999;
  border-radius: 4px;
  font-weight: 700;
  text-decoration: none;
}

/* --- Header ------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #0D0D1Af5;
  border-bottom: 1px solid #00E5A030;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1rem;
  height: 60px;
  max-width: 1280px;
  margin: 0 auto;
  flex-wrap: nowrap;
}

.brand {
  font-family: Georgia, serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #00E5A0;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  margin-right: auto;
}
.brand:hover { color: #C9A84C; }

/* --- Nav (details/summary pattern) ------------------------- */
.nav-details {
  position: relative;
  flex-shrink: 0;
}

.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid #00E5A050;
  border-radius: 6px;
  cursor: pointer;
  list-style: none;
  flex-shrink: 0;
}
.nav-toggle::-webkit-details-marker { display: none; }
.nav-toggle::marker { display: none; }

.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 20px;
  height: 2px;
  background: #00E5A0;
  border-radius: 2px;
  position: relative;
  transition: transform 0.2s;
}
.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  left: 0;
}
.hamburger::before { top: -6px; }
.hamburger::after  { top: 6px; }

.nav-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: #161628;
  border: 1px solid #00E5A040;
  border-radius: 8px;
  padding: 0.5rem 0;
  min-width: 240px;
  max-width: 90vw;
  z-index: 200;
  list-style: none;
}

.nav-details[open] .nav-menu {
  display: block;
}

.nav-menu li { list-style: none; }

.nav-menu li a {
  display: block;
  padding: 0.75rem 1.25rem;
  color: #E8E8F0;
  text-decoration: none;
  font-size: 0.9rem;
  border-bottom: 1px solid #ffffff10;
  min-height: 44px;
  line-height: 1.4;
}
.nav-menu li:last-child a { border-bottom: none; }
.nav-menu li a:hover { background: #00E5A015; color: #00E5A0; }

/* --- Header CTA Buttons ------------------------------------ */
.header-cta {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
  align-items: center;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.75rem;
  height: 44px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s, background 0.2s;
  min-width: 44px;
}

.cta-signup {
  background: #00E5A0;
  color: #0D0D1A;
}
.cta-signup:hover { opacity: 0.85; color: #0D0D1A; }

.cta-login {
  background: transparent;
  color: #00E5A0;
  border: 1.5px solid #00E5A0;
}
.cta-login:hover { background: #00E5A015; }

/* --- Layout: sidebar left + main content ------------------- */
.page-layout {
  display: flex;
  flex-direction: column;
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  gap: 2rem;
}

/* Sidebar */
.sidebar-global {
  width: 100%;
}

.sidebar-inner {
  background: rgba(255,255,255,0.04);
  border: 1px solid #00E5A025;
  border-radius: 10px;
  padding: 1.25rem;
  backdrop-filter: blur(4px);
}

.sidebar-inner h2 {
  font-size: 1rem;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.sidebar-links { margin-top: 0.5rem; }

.sidebar-link {
  margin-bottom: 0.25rem;
}

.sidebar-link a {
  display: block;
  padding: 0.6rem 0.75rem;
  background: rgba(255,255,255,0.03);
  border-left: 3px solid #C9A84C;
  border-radius: 0 4px 4px 0;
  color: #E8E8F0;
  text-decoration: none;
  font-size: 0.875rem;
  min-height: 44px;
  line-height: 1.4;
  transition: background 0.15s, color 0.15s;
}
.sidebar-link a:hover { background: #00E5A015; color: #00E5A0; }

/* Main area */
main {
  flex: 1;
  min-width: 0;
}

.wrap {
  max-width: 800px;
  margin: 0 auto;
}

/* Sections & Articles */
.page-content {
  margin-top: 1rem;
}

.page-content a {
  color: #00E5A0;
  text-decoration: underline;
}

.page-content h2 { margin-top: 2rem; }
.page-content h3 { margin-top: 1.5rem; }

/* --- Byline & Stage ---------------------------------------- */
.byline {
  color: #a0a0b8;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.stage-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}
.stage-awareness  { background: #00E5A020; color: #00E5A0; border: 1px solid #00E5A050; }
.stage-consideration { background: #C9A84C20; color: #C9A84C; border: 1px solid #C9A84C50; }
.stage-decision   { background: #ff6b3520; color: #ff9060; border: 1px solid #ff6b3550; }

.date-meta {
  font-size: 0.8rem;
  color: #a0a0b8;
  margin-bottom: 1rem;
}

/* --- Hero image -------------------------------------------- */
.hero-img, .article-hero-img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin-bottom: 1.25rem;
  display: block;
}

/* --- Home: child cards ------------------------------------- */
.child-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.5rem;
}

.card {
  background: rgba(255,255,255,0.04);
  border: 1px solid #00E5A025;
  border-radius: 10px;
  padding: 1.25rem;
  transition: border-color 0.2s;
  backdrop-filter: blur(4px);
}
.card:hover { border-color: #00E5A070; }

.card h3 { font-size: 1rem; margin: 0 0 0.4rem; }
.card h3 a { color: #E8E8F0; text-decoration: none; }
.card h3 a:hover { color: #00E5A0; }
.card p { font-size: 0.875rem; color: #a0a0b8; margin-bottom: 0.4rem; }
.card-date { font-size: 0.75rem; color: #6060a0; }

/* --- Home hero article ------------------------------------- */
.home-hero {
  padding: 2rem 0;
}

.hero-article h1 {
  font-size: clamp(1.6rem, 5vw, 2.4rem);
}

/* --- FAQ article ------------------------------------------- */
.faq-section { padding: 1.5rem 0; }
.faq-article  { padding: 0; }

/* --- Article article --------------------------------------- */
.article-section { padding: 1.5rem 0; }
.article-body   { }

/* --- About article ----------------------------------------- */
.about-section { padding: 1.5rem 0; }

.author-section {
  margin-top: 2.5rem;
  padding: 1.5rem;
  background: rgba(201,168,76,0.08);
  border: 1px solid #C9A84C40;
  border-radius: 10px;
}

.author-name { font-size: 1.1rem; margin-bottom: 0.25rem; }
.author-credentials { font-size: 0.875rem; color: #a0a0b8; margin-bottom: 0.75rem; }
.author-bio { font-size: 0.95rem; }

/* --- Sidebar Author box ------------------------------------ */
.sidebar-author {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #00E5A025;
}
.sidebar-author p { font-size: 0.85rem; color: #a0a0b8; margin-bottom: 0.3rem; }

/* --- Privacy article --------------------------------------- */
.privacy-section { padding: 1.5rem 0; }
.privacy-article { }

/* --- Footer ------------------------------------------------ */
.site-footer {
  background: #080812;
  border-top: 1px solid #00E5A025;
  padding: 1.5rem 1rem;
  text-align: center;
}

.footer-brand {
  font-size: 0.875rem;
  color: #6060a0;
  margin-bottom: 0.6rem;
}

.footer-trust {
  margin-bottom: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.footer-trust a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #a0a0b8;
  font-size: 0.875rem;
  text-decoration: underline;
  padding: 0.6rem 0.75rem;
  min-height: 44px;
  border-radius: 4px;
  border: 1px solid #ffffff15;
  background: rgba(255,255,255,0.03);
  transition: color 0.15s, border-color 0.15s;
}
.footer-trust a:hover { color: #00E5A0; border-color: #00E5A040; }

/* Remove the <p> wrapper margin inside footer-trust */
.footer-trust p {
  margin: 0;
  display: contents;
}

.rg-notice {
  display: block;
  font-size: 0.75rem;
  color: #6060a0;
  line-height: 1.5;
  max-width: 600px;
  margin: 0 auto;
}

/* --- Screen reader only ------------------------------------ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* --- Tables in content ------------------------------------- */
.page-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
  overflow-x: auto;
  display: block;
  max-width: 100%;
}
.page-content th,
.page-content td {
  padding: 0.6rem 0.75rem;
  border: 1px solid #00E5A025;
  text-align: left;
}
.page-content th {
  background: #00E5A015;
  color: #00E5A0;
  font-family: Georgia, serif;
}
.page-content tr:nth-child(even) td { background: rgba(255,255,255,0.02); }

/* Code / pre in content */
.page-content pre,
.page-content code {
  background: #161628;
  border-radius: 4px;
  font-size: 0.875rem;
  overflow-x: auto;
  max-width: 100%;
}
.page-content pre { padding: 1rem; margin: 1rem 0; }
.page-content code { padding: 0.1em 0.35em; }

/* --- Utility ----------------------------------------------- */
img { max-width: 100%; height: auto; }

/* Prevent anything from causing horizontal scroll */
.wrap,
.page-content,
.sidebar-inner,
.card,
.faq-article,
.article-body,
.about-article,
.privacy-article,
.hero-article {
  overflow-wrap: break-word;
  word-break: break-word;
  min-width: 0;
  max-width: 100%;
}

/* ============================================================
   DESKTOP (≥769px): sidebar left of content
   ============================================================ */
@media (min-width: 769px) {

  body {
    /* Two-column layout: sidebar | main */
    display: grid;
    grid-template-columns: 240px 1fr;
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
      "header header"
      "aside  main"
      "footer footer";
    min-height: 100vh;
    overflow-x: hidden;
  }

  .site-header { grid-area: header; }
  .sidebar-global { grid-area: aside; }
  main           { grid-area: main; }
  .site-footer   { grid-area: footer; }

  .sidebar-global {
    padding: 1.5rem 0.75rem 1.5rem 1rem;
    position: sticky;
    top: 60px;
    align-self: start;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
  }

  main {
    padding: 2rem 2rem 2rem 1.5rem;
  }

  .wrap {
    max-width: 780px;
  }

  /* Desktop nav: keep dropdown but show links inline instead */
  .nav-details { position: static; }

  .nav-toggle {
    display: none; /* hide hamburger on desktop */
  }

  .nav-menu {
    display: flex !important;
    position: static;
    background: transparent;
    border: none;
    padding: 0;
    gap: 0.25rem;
    min-width: 0;
    max-width: none;
    flex-wrap: wrap;
    align-items: center;
  }

  .nav-menu li a {
    padding: 0.4rem 0.75rem;
    border-bottom: none;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    min-height: 44px;
  }

  .header-inner {
    gap: 1rem;
  }

  .cta { font-size: 0.85rem; padding: 0 1rem; }

  .child-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
}

/* ============================================================
   MOBILE (≤768px): single column, touch-optimised
   ============================================================ */
@media (max-width: 768px) {
  body {
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    max-width: 100vw;
  }

  .site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    max-width: 100vw;
  }

  .header-inner {
    height: auto;
    min-height: 60px;
    padding: 0.5rem 0.75rem;
    gap: 0.4rem;
    flex-wrap: nowrap;
    max-width: 100vw;
    overflow: hidden;
  }

  .brand {
    font-size: 0.9rem;
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .header-cta {
    flex-shrink: 0;
  }

  .cta {
    font-size: 0.72rem;
    padding: 0 0.5rem;
    height: 44px;
    min-width: 44px;
  }

  main {
    padding: 1rem 0.75rem;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .wrap {
    max-width: 100%;
    overflow-x: hidden;
  }

  .sidebar-global {
    order: 2;
    padding: 0 0.75rem 1rem;
    width: 100%;
    max-width: 100vw;
  }

  .site-footer {
    order: 3;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .nav-menu {
    max-width: calc(100vw - 2rem);
    right: 0.5rem;
  }

  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }

  .page-content table {
    font-size: 0.8rem;
  }

  .footer-trust {
    flex-direction: column;
    align-items: center;
  }

  .footer-trust a,
  .footer-trust p a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 280px;
    text-align: center;
    min-height: 44px;
  }

  .footer-trust p {
    width: 100%;
    text-align: center;
  }
}

/* Extra safety: nothing overflows the viewport */
@media (max-width: 480px) {
  html, body {
    max-width: 100vw;
    overflow-x: hidden;
  }

  .header-inner {
    padding: 0.4rem 0.5rem;
  }

  .brand { font-size: 0.82rem; }

  .cta {
    font-size: 0.68rem;
    padding: 0 0.4rem;
    height: 44px;
  }

  main {
    padding: 0.75rem 0.5rem;
  }

  .sidebar-global { padding: 0 0.5rem 0.75rem; }

  .sidebar-inner { padding: 1rem; }

  .sidebar-link a {
    font-size: 0.82rem;
  }
}

a[data-cta],button[aria-controls]{min-height:44px;min-width:44px;box-sizing:border-box}main p a{text-decoration:underline}.tbl-scroll{overflow-x:auto;max-width:100%}