/* ============================================================
   MAKERS LOBBY — CSS Principal
   Paleta: #1E1E2C | #FF6B35 | #C2410C | #6C5CE7 | #FAF7F2
   Fontes: Poppins (títulos) · Inter (corpo) · JetBrains Mono
   ============================================================ */

/* ===== VARIÁVEIS ===== */
:root {
  --ink:        #1E1E2C;
  --orange:     #FF6B35;
  --orange-dk:  #C2410C;
  --violet:     #6C5CE7;
  --cream:      #FAF7F2;
  --white:      #FFFFFF;
  --gray:       #5C5F6E;
  --border:     #E8E4DD;

  --f-head: 'Poppins', sans-serif;
  --f-body: 'Inter', sans-serif;
  --f-mono: 'JetBrains Mono', monospace;

  --w-max:    1200px;
  --radius:   8px;
  --shadow:   0 2px 8px rgba(30,30,44,.08);
  --shadow-h: 0 4px 20px rgba(30,30,44,.14);
  --ease:     .2s ease;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--f-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a   { color: var(--orange-dk); text-decoration: none; transition: color var(--ease); }
a:hover { color: var(--orange); }

/* ===== LAYOUT ===== */
.container {
  max-width: var(--w-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ===== HEADER ===== */
.site-header {
  background: var(--white);
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo img { height: 36px; width: auto; }

/* Nav */
.main-nav ul { display: flex; gap: 2rem; list-style: none; }
.main-nav a {
  font-family: var(--f-head);
  font-weight: 600;
  font-size: .875rem;
  color: var(--ink);
  padding: .25rem 0;
  border-bottom: 2px solid transparent;
  transition: color var(--ease), border-color var(--ease);
}
.main-nav a:hover,
.main-nav a.active {
  color: var(--orange);
  border-bottom-color: var(--orange);
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: var(--ease);
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--white);
    border-bottom: 2px solid var(--border);
    padding: 1rem 1.25rem 1.5rem;
    box-shadow: var(--shadow);
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: .75rem; }
}

/* ===== HERO ===== */
.hero {
  background: var(--ink);
  color: var(--white);
  padding: 4.5rem 0;
  text-align: center;
}
.hero h1 {
  font-family: var(--f-head);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}
.hero h1 span { color: var(--orange); }
.hero p {
  font-size: 1.1rem;
  color: rgba(255,255,255,.75);
  max-width: 520px;
  margin: 0 auto;
}

/* ===== SECTIONS ===== */
.posts-section { padding: 3rem 0 4rem; }
.posts-section h2 {
  font-family: var(--f-head);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

/* ===== GRID DE CARDS ===== */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* ===== CARD ===== */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow var(--ease), transform var(--ease);
}
.card:hover {
  box-shadow: var(--shadow-h);
  transform: translateY(-3px);
}
.card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
}
.card-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--border);
}
.card-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.card:hover .card-image img { transform: scale(1.04); }
.card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card-category {
  font-family: var(--f-head);
  font-size: .7rem;
  font-weight: 700;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: .5rem;
}
.card-title {
  font-family: var(--f-head);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
  margin-bottom: .5rem;
}
.card-summary {
  font-size: .875rem;
  color: var(--gray);
  flex: 1;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  display: flex;
  gap: 1rem;
  font-size: .78rem;
  color: var(--gray);
}

/* ===== "VER TODOS" ===== */
.see-all { text-align: center; margin-top: 2.5rem; }
.no-posts { color: var(--gray); font-style: italic; padding: 1rem 0; }

/* ===== BOTÃO ===== */
.btn {
  display: inline-block;
  background: var(--orange);
  color: var(--white) !important;
  font-family: var(--f-head);
  font-weight: 600;
  font-size: .95rem;
  padding: .75rem 2rem;
  border-radius: var(--radius);
  transition: background var(--ease), transform var(--ease);
}
.btn:hover { background: var(--orange-dk); transform: translateY(-1px); }

/* ===== PAGE HEADER (listas) ===== */
.page-header {
  padding: 2.5rem 0 1.75rem;
  border-bottom: 2px solid var(--border);
  margin-bottom: 2rem;
}
.page-header h1 {
  font-family: var(--f-head);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
}
.page-header p { color: var(--gray); margin-top: .5rem; }

/* ===== ARTIGO ===== */
.article-layout {
  padding: 2rem 0 3.5rem;
  max-width: 800px;
}
.article-header { margin-bottom: 2rem; }
.article-meta {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  margin-bottom: .875rem;
  font-size: .85rem;
  color: var(--gray);
}
.category-tag {
  background: var(--orange);
  color: var(--white);
  font-family: var(--f-head);
  font-size: .7rem;
  font-weight: 700;
  padding: .2rem .6rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.article-header h1 {
  font-family: var(--f-head);
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: .75rem;
}
.article-description {
  font-size: 1.1rem;
  color: var(--gray);
  font-style: italic;
  border-left: 3px solid var(--orange);
  padding-left: .875rem;
}

/* ===== TIPOGRAFIA DO ARTIGO ===== */
.article-body {
  line-height: 1.85;
  font-size: 1.05rem;
}
.article-body h2 {
  font-family: var(--f-head);
  font-size: 1.45rem;
  font-weight: 700;
  margin: 2.5rem 0 .875rem;
  padding-bottom: .4rem;
  border-bottom: 2px solid var(--border);
  color: var(--ink);
}
.article-body h3 {
  font-family: var(--f-head);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 2rem 0 .6rem;
  color: var(--ink);
}
.article-body h4 {
  font-family: var(--f-head);
  font-size: 1rem;
  font-weight: 600;
  margin: 1.5rem 0 .4rem;
  color: var(--ink);
}
.article-body p  { margin-bottom: 1.25rem; }
.article-body a  { color: var(--orange-dk); text-decoration: underline; text-underline-offset: 3px; }
.article-body a:hover { color: var(--orange); }

.article-body ul,
.article-body ol  { margin-bottom: 1.25rem; padding-left: 1.5rem; }
.article-body li  { margin-bottom: .4rem; }

.article-body code {
  font-family: var(--f-mono);
  font-size: .875em;
  background: rgba(30,30,44,.06);
  padding: .15em .35em;
  border-radius: 3px;
  color: var(--orange-dk);
}
.article-body pre {
  background: var(--ink);
  color: #e8e4dd;
  padding: 1.25rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin-bottom: 1.5rem;
  font-size: .9rem;
}
.article-body pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}
.article-body blockquote {
  border-left: 4px solid var(--orange);
  padding: .75rem 1.25rem;
  margin: 1.5rem 0;
  background: rgba(255,107,53,.05);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--gray);
}
.article-body img {
  border-radius: var(--radius);
  margin: 1.75rem auto;
  box-shadow: var(--shadow);
}
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: .95rem;
  overflow-x: auto;
  display: block;
}
.article-body th {
  background: var(--ink);
  color: var(--white);
  font-family: var(--f-head);
  font-weight: 600;
  text-align: left;
  padding: .6rem .9rem;
}
.article-body td {
  padding: .55rem .9rem;
  border-bottom: 1px solid var(--border);
}
.article-body tr:nth-child(even) td { background: rgba(30,30,44,.02); }
.article-body tr:hover td { background: rgba(255,107,53,.04); }

/* ===== TAGS ===== */
.tags { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.tag {
  font-family: var(--f-head);
  font-size: .8rem;
  font-weight: 600;
  color: var(--violet);
  background: rgba(108,92,231,.08);
  padding: .25rem .65rem;
  border-radius: 4px;
  transition: background var(--ease);
}
.tag:hover { background: rgba(108,92,231,.18); color: var(--violet); }

/* ===== ADSENSE PLACEHOLDERS ===== */
.ad-container {
  background: rgba(30,30,44,.03);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  color: var(--gray);
  font-size: .8rem;
  margin: 1.75rem 0;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== PÁGINAS INSTITUCIONAIS ===== */
.page-content {
  padding: 2.5rem 0 4rem;
  max-width: 720px;
}
.page-content h1 {
  font-family: var(--f-head);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
  padding-bottom: .75rem;
  border-bottom: 2px solid var(--border);
}
.page-content h2 {
  font-family: var(--f-head);
  font-size: 1.3rem;
  font-weight: 700;
  margin: 2rem 0 .75rem;
  color: var(--ink);
}
.page-content p  { margin-bottom: 1.25rem; }
.page-content ul { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.page-content li { margin-bottom: .4rem; }
.page-content a  { color: var(--orange-dk); text-decoration: underline; }
.page-content a:hover { color: var(--orange); }

/* ===== FORMULÁRIO DE CONTATO ===== */
.contact-form { max-width: 560px; margin-top: 1.5rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-family: var(--f-head);
  font-size: .875rem;
  font-weight: 600;
  margin-bottom: .375rem;
  color: var(--ink);
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: .625rem .875rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--f-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--white);
  transition: border-color var(--ease);
}
.form-group input:focus,
.form-group textarea:focus { outline: none; border-color: var(--orange); }
.form-group textarea { min-height: 140px; resize: vertical; }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,.7);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: start;
  margin-bottom: 2rem;
}
.footer-brand img  { margin-bottom: .75rem; }
.footer-brand p    { font-size: .9rem; max-width: 320px; line-height: 1.6; }
.footer-nav ul     { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.footer-nav a      { color: rgba(255,255,255,.7); font-size: .9rem; transition: color var(--ease); }
.footer-nav a:hover { color: var(--orange); }
.footer-copy {
  font-size: .8rem;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 1.5rem;
}

@media (max-width: 600px) {
  .footer-inner { grid-template-columns: 1fr; }
  .footer-nav ul { flex-direction: row; flex-wrap: wrap; gap: .75rem; }
}

/* ===== RESPONSIVIDADE GERAL ===== */
@media (max-width: 480px) {
  .posts-grid { grid-template-columns: 1fr; }
  .article-body table { font-size: .85rem; }
}
