:root {
  --primary: #0F2A3D;
  --primary-dark: #0A1E2C;
  --secondary: #1E88E5;
  --dark: #111827;
  --slate: #5C6B7A;
  --light: #F5F7FA;
  --white: #FFFFFF;
  --line: #E2E8F0;
  --radius: 16px;
  --shadow: 0 12px 30px rgba(15, 42, 61, 0.06);
  --container: 1160px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--dark);
  background: var(--light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 76px;
}
.brand img { height: 46px; width: auto; }
.header-nav { display: flex; align-items: center; gap: 28px; }
.header-nav a.nav-link {
  font-size: 15px;
  font-weight: 500;
  color: var(--slate);
  transition: color 0.2s;
}
.header-nav a.nav-link:hover { color: var(--primary); }
.back-link { display: inline-flex; align-items: center; gap: 6px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  border-radius: 999px;
  padding: 11px 20px;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); }
.btn svg { width: 18px; height: 18px; }

.menu-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 14px;
}
.hero h1 {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
  max-width: 820px;
  margin: 0 auto;
}
.hero p.lead {
  margin: 18px auto 0;
  max-width: 620px;
  font-size: 19px;
  color: var(--slate);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 28px;
}
.chip {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  transition: border-color 0.2s, color 0.2s;
}
.chip:hover, .chip.is-active { border-color: var(--secondary); color: var(--secondary); }

/* ---------- Posts ---------- */
.posts { padding: 36px 0 72px; }
.section-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 20px;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(15, 42, 61, 0.12); }

.cover {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--primary) 0%, #163b54 55%, var(--secondary) 130%);
  display: flex;
  align-items: flex-end;
  padding: 18px;
}
.cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(255, 255, 255, 0.16), transparent 60%),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.05) 0 2px, transparent 2px 22px);
  pointer-events: none;
}
.tag {
  position: relative;
  z-index: 1;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(4px);
  border-radius: 999px;
  padding: 6px 12px;
}
.card-body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 {
  font-size: 21px;
  line-height: 1.28;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.2px;
}
.card-body p {
  margin-top: 10px;
  color: var(--slate);
  font-size: 15.5px;
  flex: 1;
}
.meta {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--slate);
}
.meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--line); }
.read-more {
  margin-top: 16px;
  font-weight: 600;
  font-size: 15px;
  color: var(--secondary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.read-more svg { width: 16px; height: 16px; transition: transform 0.2s; }
.card:hover .read-more svg { transform: translateX(3px); }

/* Featured post (destaque) */
.featured {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  margin-bottom: 44px;
}
.featured .cover { aspect-ratio: auto; min-height: 340px; }
.featured .card-body { justify-content: center; padding: 40px; }
.featured .card-body h3 { font-size: clamp(24px, 3vw, 34px); line-height: 1.2; }
.featured .card-body p { font-size: 17px; flex: none; }

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* ---------- Newsletter ---------- */
.newsletter {
  margin: 16px 0 0;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 22px;
  padding: 48px 40px;
  text-align: center;
  color: var(--white);
}
.newsletter h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 800; }
.newsletter p { margin: 12px auto 24px; max-width: 540px; color: rgba(255, 255, 255, 0.82); }
.newsletter form { display: flex; gap: 12px; max-width: 460px; margin: 0 auto; }
.newsletter input {
  flex: 1;
  border: none;
  border-radius: 999px;
  padding: 14px 20px;
  font-size: 15px;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.95);
  color: var(--dark);
}
.newsletter .btn-light { background: var(--secondary); color: var(--white); }
.newsletter .btn-light:hover { background: #1976d2; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--primary);
  color: rgba(255, 255, 255, 0.78);
  margin-top: 72px;
  padding: 56px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}
.site-footer h4 {
  color: var(--white);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-brand img { height: 64px; margin-bottom: 16px; }
.footer-brand p { max-width: 320px; font-size: 15px; }
.footer-col a { display: block; padding: 6px 0; font-size: 15px; transition: color 0.2s; }
.footer-col a:hover { color: var(--white); }
.footer-social { display: flex; gap: 12px; margin-top: 8px; }
.footer-social a {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
}
.footer-social a:hover { background: rgba(255, 255, 255, 0.1); }
.footer-social svg { width: 18px; height: 18px; }
.footer-bottom {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13.5px;
}

/* ---------- Responsivo ---------- */
@media (max-width: 900px) {
  .featured { grid-template-columns: 1fr; }
  .featured .cover { min-height: 220px; }
  .featured .card-body { padding: 28px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 22px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .header-nav .nav-link { display: none; }
  .grid { grid-template-columns: 1fr; }
  .newsletter form { flex-direction: column; }
  .newsletter .btn-light { justify-content: center; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 28px; }
}

/* ---------- Blog dinâmico: capa com imagem, página de post ---------- */
.cover-link { display: block; }
.cover.cover-img { background-size: cover; background-position: center; }
.card-body h3 a { color: inherit; }
.card-body h3 a:hover { color: var(--secondary); }

.post-wrap { padding: 32px 0 16px; }
.post { max-width: 760px; }
.back-to-blog { display: inline-block; font-weight: 600; font-size: 14.5px; color: var(--secondary); margin-bottom: 22px; }
.post-tag {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--secondary);
  background: rgba(30, 136, 229, 0.10); border-radius: 999px; padding: 6px 13px;
}
.post-title {
  font-size: clamp(28px, 4.5vw, 44px); line-height: 1.12; font-weight: 800;
  color: var(--primary); letter-spacing: -0.5px; margin: 14px 0 12px;
}
.post-meta { display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--slate); margin-bottom: 26px; }
.post-cover {
  aspect-ratio: 16 / 9; border-radius: 18px; background-size: cover; background-position: center;
  margin-bottom: 30px; box-shadow: var(--shadow);
}
.post-cover-grad { background: linear-gradient(135deg, var(--primary) 0%, #163b54 55%, var(--secondary) 130%); }

.article { font-size: 18px; line-height: 1.75; color: #243240; }
.article > * + * { margin-top: 20px; }
.article h2 { font-size: 27px; font-weight: 800; color: var(--primary); margin-top: 36px; line-height: 1.25; }
.article h3 { font-size: 21px; font-weight: 700; color: var(--primary); margin-top: 28px; }
.article h4 { font-size: 18px; font-weight: 700; color: var(--primary); margin-top: 22px; }
.article a { color: var(--secondary); text-decoration: underline; }
.article ul, .article ol { padding-left: 24px; }
.article li { margin-top: 8px; }
.article img { border-radius: 12px; margin: 10px 0; max-width: 100%; }
.article code { background: #eef2f7; padding: 2px 6px; border-radius: 5px; font-size: 0.92em; }
.article blockquote { border-left: 4px solid var(--secondary); padding: 4px 0 4px 18px; color: var(--slate); font-style: italic; }

.post-cta { margin-top: 44px; padding: 28px; background: var(--light); border: 1px solid var(--line); border-radius: 16px; text-align: center; }
.post-cta p { font-weight: 600; color: var(--primary); margin-bottom: 14px; font-size: 18px; }

@media (max-width: 620px) {
  .post-cover { border-radius: 14px; }
  .article { font-size: 17px; }
}
