/* ============================================================
   Filazero Ghost Theme — screen.css
   Obrigatório pelo GScan: classes Koenig Editor
   ============================================================ */

/* ── Reset mínimo ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; padding: 0; font-family: 'Inter', system-ui, sans-serif; }
img  { max-width: 100%; display: block; }

/* ── Koenig Editor — larguras obrigatórias ────────────────── */
/* Ghost GScan exige que .kg-width-wide e .kg-width-full
   estejam presentes e estilizadas no CSS do tema.         */

.kg-width-wide {
  position: relative;
  width: 85vw;
  min-width: 100%;
  margin: auto calc(50% - 50vw * 0.85);
}

.kg-width-full {
  position: relative;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

/* ── Koenig — outros blocos comuns ───────────────────────── */
.kg-image-card,
.kg-gallery-card,
.kg-embed-card,
.kg-bookmark-card {
  margin: 0 0 1.5em;
}

.kg-image { max-width: 100%; }

.kg-gallery-container {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.kg-gallery-image img { width: 100%; height: 100%; object-fit: cover; }

/* Bookmark card */
.kg-bookmark-card { width: 100%; }
.kg-bookmark-container {
  display: flex;
  min-height: 148px;
  border: 1px solid #E8E3EE;
  border-radius: 11px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}
.kg-bookmark-content {
  flex: 1;
  padding: 20px;
}
.kg-bookmark-title {
  font-size: 15px;
  font-weight: 600;
  color: #1A1521;
  margin-bottom: 4px;
}
.kg-bookmark-description {
  font-size: 13px;
  color: #7A7280;
  line-height: 1.5;
}
.kg-bookmark-metadata {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 12px;
  color: #ACA4B4;
}
.kg-bookmark-thumbnail {
  width: 160px;
  flex-shrink: 0;
}
.kg-bookmark-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Video / audio */
.kg-video-card video { width: 100%; }
.kg-audio-card audio { width: 100%; }

/* Button */
.kg-button-card { text-align: center; margin: 1.5em 0; }
.kg-button-card a {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 9999px;
  background: #8C27FF;
  color: #fff;
  font-size: 17px;
  font-weight: 500;
  text-decoration: none;
}

/* HR */
.kg-divider-card {
  border: none;
  border-top: 1px solid #E8E3EE;
  margin: 2em 0;
}

/* Code */
.kg-code-card pre {
  background: #F7F4FB;
  border: 1px solid #E8E3EE;
  border-radius: 11px;
  padding: 1.2em 1.4em;
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  line-height: 1.6;
}

/* ── Ghost {{navigation}} helper — .nav ──────────────────── */
/* O helper gera <ul class="nav"><li><a> — força horizontal  */

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: nowrap;
}

.nav li {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
}

.nav a {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: -0.012em;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  white-space: nowrap;
  padding: 6px 2px;
  transition: color 160ms ease;
}

.nav a:hover { color: #fff; }

.nav a[aria-current="page"],
.nav .nav-current a { color: #fff; }

/* ── Grid de posts (não-hero) ─────────────────────────────── */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 28px;
}

@media (max-width: 900px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .posts-grid { grid-template-columns: 1fr; }
}

/* ── Layout mínimo do site (index/post) ───────────────────── */

.site-wrapper {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 24px;
}

.post-card {
  border-bottom: 1px solid #E8E3EE;
  padding: 32px 0;
}

.post-card:last-child { border-bottom: none; }

.post-card a {
  color: #1A1521;
  text-decoration: none;
}

.post-card a:hover { color: #8C27FF; }

.post-card-title {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.post-card-excerpt {
  font-size: 16px;
  color: #7A7280;
  line-height: 1.55;
  margin: 0;
}

/* ── Acessibilidade ───────────────────────────────────────── */
:focus-visible {
  outline: 2px solid #8C27FF;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
