/* ==========================================================================
   Gamefik Ghost Theme v1.2 — Light Mode
   Paleta: Purple #4B3786 | Aquamarine #55FCB9 | Yellow #FCEE21 | Tundora #424242
   Tipografia: Poppins
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

/* --------------------------------------------------------------------------
   VARIABLES
   -------------------------------------------------------------------------- */
:root {
  --purple:      #4B3786;
  --purple-dark: #3a2a6e;
  --purple-light:#6b55a6;
  --aqua:        #55FCB9;
  --yellow:      #FCEE21;
  --tundora:     #424242;

  --bg:          #FFFFFF;
  --bg-soft:     #F8F7FC;
  --bg-card:     #FFFFFF;
  --border:      #ECEAF4;
  --border-dark: #D8D4EC;

  --text:        #1A1530;
  --text-2:      #5C5580;
  --text-3:      #9590AE;

  --font:        'Poppins', system-ui, sans-serif;
  --max:         1200px;
  --content:     740px;
  --ease:        cubic-bezier(.4,0,.2,1);
}

/* --------------------------------------------------------------------------
   RESET
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; line-height: 1.6; }
img { max-width: 100%; display: block; }
a { color: var(--purple); text-decoration: none; transition: color .2s; }
a:hover { color: var(--purple-dark); }

/* --------------------------------------------------------------------------
   READING PROGRESS
   -------------------------------------------------------------------------- */
.reading-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--purple), var(--aqua));
  z-index: 9999; transition: width .1s linear;
}

/* --------------------------------------------------------------------------
   HEADER
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: 68px;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 var(--border);
}

.header-inner {
  max-width: var(--max); margin: 0 auto;
  padding: 0 2rem; height: 100%;
  display: flex; align-items: center; gap: 2rem;
}

.site-logo { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.site-logo img { height: 34px; }
.logo-text { font-size: 1.2rem; font-weight: 800; letter-spacing: -.03em; color: var(--purple); }
.logo-text span { color: var(--aqua); }

.site-nav { display: flex; align-items: center; gap: 1.5rem; margin-left: auto; }
.site-nav > a { font-size: .875rem; font-weight: 500; color: var(--text-2); transition: color .2s; }
.site-nav > a:hover { color: var(--purple); }

/* Language Dropdown */
.lang-selector { position: relative; }

.lang-trigger {
  display: flex; align-items: center; gap: .375rem;
  font-size: .875rem; font-weight: 500;
  color: var(--text-2); background: none; border: 1px solid var(--border);
  padding: .375rem .75rem; border-radius: 8px; cursor: pointer;
  font-family: var(--font); transition: all .2s;
}
.lang-trigger:hover { border-color: var(--purple-light); color: var(--purple); }
.lang-trigger svg { width: 15px; height: 15px; }
.lang-trigger .chevron { transition: transform .2s; }
.lang-selector.open .chevron { transform: rotate(180deg); }

.lang-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: white; border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 8px 24px rgba(75,55,134,.12);
  min-width: 148px; overflow: hidden;
  opacity: 0; transform: translateY(-4px) scale(.97);
  pointer-events: none; transition: all .18s var(--ease);
}
.lang-selector.open .lang-dropdown {
  opacity: 1; transform: none; pointer-events: auto;
}
.lang-dropdown a {
  display: flex; align-items: center; gap: .625rem;
  padding: .625rem 1rem; font-size: .85rem; font-weight: 500;
  color: var(--text-2); transition: background .15s, color .15s;
}
.lang-dropdown a:hover { background: var(--bg-soft); color: var(--purple); }
.lang-dropdown a .flag { font-size: 1rem; }

/* CTA button */
.nav-cta {
  background: var(--purple) !important; color: #fff !important;
  padding: .5rem 1.25rem !important; border-radius: 8px !important;
  font-weight: 600 !important; font-size: .875rem !important;
  transition: background .2s, transform .15s !important;
  white-space: nowrap;
}
.nav-cta:hover { background: var(--purple-dark) !important; transform: translateY(-1px); }

/* --------------------------------------------------------------------------
   HERO
   -------------------------------------------------------------------------- */
.site-hero {
  background: linear-gradient(140deg, var(--purple) 0%, #2c1b6e 55%, #1a0f4a 100%);
  padding: 5rem 2rem 4.5rem;
  text-align: center;
  position: relative; overflow: hidden;
}

/* Decorative blobs */
.site-hero::before {
  content: ''; position: absolute;
  width: 560px; height: 560px; border-radius: 50%;
  background: radial-gradient(circle, rgba(85,252,185,.18) 0%, transparent 70%);
  top: -120px; right: -80px; pointer-events: none;
}
.site-hero::after {
  content: ''; position: absolute;
  width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, rgba(252,238,33,.1) 0%, transparent 70%);
  bottom: -100px; left: -60px; pointer-events: none;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(85,252,185,.15); border: 1px solid rgba(85,252,185,.3);
  color: var(--aqua); font-size: .75rem; font-weight: 600;
  padding: .375rem 1rem; border-radius: 999px; letter-spacing: .06em;
  text-transform: uppercase; margin-bottom: 1.5rem;
}

.site-hero h1 {
  font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  font-weight: 800; letter-spacing: -.04em; line-height: 1.08;
  color: #fff; margin-bottom: 1.25rem; position: relative; z-index: 1;
}
.site-hero h1 em { font-style: normal; color: var(--aqua); }

.site-hero p {
  font-size: 1.125rem; color: rgba(255,255,255,.72);
  max-width: 540px; margin: 0 auto 2.5rem; line-height: 1.7;
  font-weight: 300; position: relative; z-index: 1;
}

.hero-stats {
  display: flex; align-items: center; justify-content: center;
  gap: 2.5rem; flex-wrap: wrap;
  position: relative; z-index: 1;
}
.hero-stat { text-align: center; }
.hero-stat strong {
  display: block; font-size: 1.625rem; font-weight: 800; color: #fff; line-height: 1;
}
.hero-stat strong span { color: var(--aqua); }
.hero-stat small { font-size: .75rem; color: rgba(255,255,255,.5); font-weight: 400; }
.hero-divider { width: 1px; height: 40px; background: rgba(255,255,255,.15); }

/* --------------------------------------------------------------------------
   POST FEED
   -------------------------------------------------------------------------- */
.post-feed {
  max-width: var(--max); margin: 0 auto;
  padding: 3.5rem 2rem 4rem;
}

.feed-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 2rem; padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.feed-title {
  font-size: .7rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-3);
}
.feed-all { font-size: .825rem; font-weight: 600; color: var(--purple); }

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

/* Featured post (first) */
.post-grid .post-card:first-child {
  grid-column: 1 / -1;
  flex-direction: row;
}
.post-grid .post-card:first-child .post-card-image {
  width: 52%; flex-shrink: 0;
  aspect-ratio: auto; height: auto; min-height: 280px;
}
.post-grid .post-card:first-child .post-card-title { font-size: 1.5rem; }
.post-grid .post-card:first-child .post-card-excerpt {
  -webkit-line-clamp: 4; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(75,55,134,.1);
  border-color: rgba(75,55,134,.2);
}

.post-card-image {
  aspect-ratio: 16/9; overflow: hidden;
  background: var(--bg-soft);
}
.post-card-image img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s var(--ease);
}
.post-card:hover .post-card-image img { transform: scale(1.04); }

.post-card-content {
  padding: 1.375rem; flex: 1;
  display: flex; flex-direction: column; gap: .625rem;
}

.post-tags { display: flex; gap: .375rem; flex-wrap: wrap; }
.post-tag {
  font-size: .65rem; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--purple);
  background: rgba(75,55,134,.07); padding: 2px 8px; border-radius: 5px;
}

.post-card-title {
  font-size: 1.0625rem; font-weight: 700; line-height: 1.35;
  color: var(--text); letter-spacing: -.015em;
}
.post-card-title a { color: inherit; }
.post-card-title a:hover { color: var(--purple); }

.post-card-excerpt {
  font-size: .875rem; color: var(--text-2); line-height: 1.65;
  flex: 1; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}

.post-card-meta {
  display: flex; align-items: center; gap: .5rem;
  padding-top: .75rem; border-top: 1px solid var(--border);
  font-size: .775rem; color: var(--text-3); margin-top: auto;
}
.post-card-meta img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.post-card-meta .sep { opacity: .4; }
.post-card-meta time { margin-left: auto; }

/* --------------------------------------------------------------------------
   SINGLE POST
   -------------------------------------------------------------------------- */
.post-wrapper {
  max-width: var(--max); margin: 0 auto; padding: 3.5rem 2rem 5rem;
  display: grid; grid-template-columns: 1fr min(var(--content), 100%) 1fr;
}
.post-wrapper > * { grid-column: 2; }

.post-header { margin-bottom: 2.5rem; }
.post-tags-wrap { display: flex; gap: .375rem; margin-bottom: 1rem; }

.post-full-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800; letter-spacing: -.035em; line-height: 1.12;
  color: var(--text); margin-bottom: 1.25rem;
}

.post-excerpt {
  font-size: 1.125rem; color: var(--text-2); line-height: 1.75;
  font-weight: 300; border-left: 3px solid var(--aqua);
  padding-left: 1.25rem; margin-bottom: 1.5rem;
}

.post-meta {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 0; border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: .85rem; color: var(--text-3);
}
.author-wrap { display: flex; align-items: center; gap: .625rem; }
.author-wrap img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.author-name { font-weight: 600; color: var(--text); font-size: .9rem; }

.feature-image {
  margin: 2.5rem 0;
  grid-column: 1 / -1;
  border-radius: 16px; overflow: hidden;
  border: 1px solid var(--border);
}
.feature-image img { width: 100%; }

/* --------------------------------------------------------------------------
   CONTENT TYPOGRAPHY
   -------------------------------------------------------------------------- */
.post-content,
.gh-canvas {
  font-size: 1.0625rem; line-height: 1.85; color: var(--text);
}

/* Ghost v6: gh-canvas é obrigatório para o renderer de conteúdo funcionar */
.gh-content.gh-canvas {
  max-width: var(--content);
  margin: 0 auto;
}
.post-content h2 {
  font-size: 1.625rem; font-weight: 700;
  letter-spacing: -.025em; line-height: 1.2;
  color: var(--text); margin: 3rem 0 1rem;
  padding-top: 2rem; border-top: 1px solid var(--border);
}
.post-content h3 {
  font-size: 1.25rem; font-weight: 700;
  margin: 2rem 0 .75rem; color: var(--text);
}
.post-content p { margin-bottom: 1.5rem; }
.post-content strong { font-weight: 600; color: var(--text); }
.post-content em { color: var(--text-2); }
.post-content a { color: var(--purple); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.post-content a:hover { color: var(--purple-dark); }
.post-content ul, .post-content ol { margin: 0 0 1.5rem 1.5rem; }
.post-content li { margin-bottom: .5rem; }

.post-content blockquote {
  margin: 2rem 0; padding: 1.25rem 1.75rem;
  background: rgba(75,55,134,.05); border-left: 3px solid var(--purple);
  border-radius: 0 10px 10px 0;
}
.post-content blockquote p { margin: 0; font-size: 1.0625rem; font-style: italic; color: var(--text); }

.post-content pre {
  background: #0f0d1a; border-radius: 10px;
  padding: 1.25rem 1.5rem; overflow-x: auto;
  margin: 1.5rem 0; font-size: .875rem; line-height: 1.7;
}
.post-content code {
  font-size: .875em; background: rgba(75,55,134,.08);
  color: var(--purple); padding: 2px 6px; border-radius: 5px;
}
.post-content pre code { background: none; color: #e0e0e0; padding: 0; }
.post-content hr { border: none; border-top: 1px solid var(--border); margin: 2.5rem 0; }

/* --------------------------------------------------------------------------
   KOENIG CARDS (required)
   -------------------------------------------------------------------------- */
.kg-width-wide {
  margin-left: min(-8vw, -60px);
  margin-right: min(-8vw, -60px);
}
.kg-width-full { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); width: 100vw; }
.kg-image { max-width: 100%; border-radius: 10px; }
.kg-gallery-container { display: flex; flex-direction: column; gap: 4px; }
.kg-gallery-row { display: flex; gap: 4px; }
.kg-gallery-image img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.kg-callout-card {
  background: rgba(75,55,134,.06); border: 1px solid rgba(75,55,134,.15);
  border-radius: 10px; padding: 1.25rem 1.5rem;
  margin: 1.5rem 0; display: flex; gap: .875rem;
}
.kg-callout-text { font-size: 1rem; }
.kg-toggle-card { border: 1px solid var(--border); border-radius: 10px; padding: 1rem 1.25rem; margin: 1rem 0; }
.kg-video-card video { width: 100%; border-radius: 10px; }
.kg-bookmark-card {
  border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin: 1.5rem 0;
  display: flex; background: var(--bg-card);
}

/* --------------------------------------------------------------------------
   GAMEFIK CTA
   -------------------------------------------------------------------------- */
.gf-cta {
  background: linear-gradient(135deg, var(--purple) 0%, #2c1b6e 100%);
  border-radius: 20px; padding: 2.5rem 2rem;
  margin: 3rem 0; text-align: center; position: relative; overflow: hidden;
}
.gf-cta::before {
  content: ''; position: absolute;
  width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(85,252,185,.15) 0%, transparent 70%);
  top: -80px; right: -40px; pointer-events: none;
}
.gf-cta h3 { font-size: 1.375rem; font-weight: 700; color: #fff; margin-bottom: .625rem; }
.gf-cta p  { color: rgba(255,255,255,.72); font-size: .9375rem; margin-bottom: 1.5rem; }
.gf-cta a  {
  display: inline-block; background: var(--aqua); color: var(--purple);
  font-weight: 700; padding: .75rem 2rem; border-radius: 8px;
  transition: background .2s, transform .15s; font-size: .9375rem;
}
.gf-cta a:hover { background: var(--yellow); transform: translateY(-1px); }

/* --------------------------------------------------------------------------
   TABLE OF CONTENTS
   -------------------------------------------------------------------------- */
.toc-box {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.5rem; margin: 2rem 0;
}
.toc-label {
  font-size: .7rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--purple); margin-bottom: 1rem;
}
.toc-box ol { margin: 0 0 0 1.25rem; }
.toc-box li { margin-bottom: .375rem; }
.toc-box a { font-size: .875rem; color: var(--text-2); }
.toc-box a:hover { color: var(--purple); }

/* --------------------------------------------------------------------------
   FOOTER
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--bg-soft); border-top: 1px solid var(--border);
  padding: 4rem 2rem 2rem;
}
.footer-inner {
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 3rem;
}
.footer-logo { font-size: 1.1rem; font-weight: 800; letter-spacing: -.02em; color: var(--purple); margin-bottom: .75rem; }
.footer-logo span { color: var(--aqua); }
.footer-desc { font-size: .875rem; color: var(--text-3); line-height: 1.7; margin-bottom: 1.5rem; }
.footer-link { font-size: .875rem; font-weight: 600; color: var(--purple); }
.footer-col h4 {
  font-size: .7rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-3); margin-bottom: .875rem;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: .5rem; }
.footer-col a { font-size: .875rem; color: var(--text-2); }
.footer-col a:hover { color: var(--purple); }
.footer-bottom {
  max-width: var(--max); margin: 3rem auto 0;
  padding-top: 1.5rem; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  font-size: .8rem; color: var(--text-3);
}

/* --------------------------------------------------------------------------
   PAGINATION
   -------------------------------------------------------------------------- */
.pagination {
  max-width: var(--max); margin: 0 auto; padding: 0 2rem 4rem;
  display: flex; justify-content: center; align-items: center; gap: 1rem;
}
.pagination a {
  font-size: .875rem; font-weight: 600; color: var(--text-2);
  border: 1px solid var(--border); padding: .5rem 1.25rem;
  border-radius: 8px; transition: all .2s;
}
.pagination a:hover { border-color: var(--purple); color: var(--purple); }
.pagination .page-number { font-size: .875rem; color: var(--text-3); }

/* --------------------------------------------------------------------------
   TAG PAGE
   -------------------------------------------------------------------------- */
.tag-header {
  max-width: var(--max); margin: 0 auto;
  padding: 3.5rem 2rem 2.5rem;
  border-bottom: 1px solid var(--border);
}
.tag-header h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 800; letter-spacing: -.035em; margin-bottom: .5rem; }
.tag-header h1 span { color: var(--aqua); }
.tag-desc { font-size: 1rem; color: var(--text-2); max-width: 560px; }

/* --------------------------------------------------------------------------
   RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .post-grid .post-card:first-child { grid-column: 1 / -1; flex-direction: column; }
  .post-grid .post-card:first-child .post-card-image { width: 100%; min-height: auto; aspect-ratio: 16/9; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .header-inner { padding: 0 1.25rem; }
  .site-nav > a:not(.nav-cta) { display: none; }
  .site-hero { padding: 3.5rem 1.25rem 3rem; }
  .hero-stats { gap: 1.5rem; }
  .hero-divider { height: 30px; }
  .post-feed { padding: 2.5rem 1.25rem; }
  .post-grid { grid-template-columns: 1fr; }
  .post-wrapper { padding: 2rem 1.25rem; }
  .post-wrapper .kg-width-wide { margin-left: -1.25rem; margin-right: -1.25rem; }
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: .5rem; text-align: center; }
}

@media (max-width: 480px) {
  .hero-stats { flex-direction: column; gap: 1rem; }
  .hero-divider { display: none; }
}
