/* ============================================
   REMUS Livre - Identidade Visual
   Baseado no Brand Book (Pomelli)
   ============================================ */

/* Importar fonte Alegreya SC do Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Alegreya:wght@400;500;700&family=Alegreya+SC:wght@700&display=swap');

/* ============================================
   Variáveis de cor (Brand Book)
   ============================================ */
:root {
  --remus-ink: #20252b;
  --remus-paper: #f7f3ea;
  --remus-blue: #2d6cdf;
  --remus-yellow: #f2c94c;
  --remus-coral: #e9795f;
  --remus-green: #6b8e67;
  --remus-line: #d9d2c4;

  /* Aliases mantidos para as páginas existentes. */
  --remus-primary: var(--remus-blue);
  --remus-secondary: var(--remus-ink);
  --remus-background: var(--remus-paper);
  --remus-accent: var(--remus-line);
  --remus-white: #fffdf8;
  --remus-text: var(--remus-ink);
  --remus-text-light: #626a70;
}

/* ============================================
   Reset e base
   ============================================ */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Alegreya', Georgia, serif;
  background-color: var(--remus-background);
  color: var(--remus-text);
  line-height: 1.7;
  margin: 0;
  padding: 0;
  font-size: 17px;
}

/* ============================================
   Cabeçalho institucional
   ============================================ */
.site-header {
  background-color: var(--remus-secondary);
  color: var(--remus-white);
  padding: 2.5rem 1rem 2.25rem;
  text-align: center;
  border-bottom: 5px solid var(--remus-yellow);
}

.site-header h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--remus-white);
}

.site-header p {
  margin: 0.5rem 0 0 0;
  font-size: 1rem;
  opacity: 0.9;
}

/* ============================================
   Navegação
   ============================================ */
.site-nav {
  background-color: var(--remus-white);
  border-bottom: 1px solid var(--remus-line);
  padding: 0.85rem 1rem;
  text-align: center;
}

.site-nav a {
  color: var(--remus-primary);
  text-decoration: none;
  margin: 0 1rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.site-nav a:hover {
  color: var(--remus-secondary);
  border-bottom: 2px solid var(--remus-coral);
}

/* ============================================
   Conteúdo principal
   ============================================ */
main {
  max-width: 1040px;
  margin: 3rem auto;
  padding: 0 1.75rem;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Alegreya SC', Georgia, serif;
  color: var(--remus-secondary);
  font-weight: 700;
  line-height: 1.3;
  margin-top: 1.8rem;
  margin-bottom: 0.8rem;
}

h1 {
  font-size: 2.15rem;
  border-bottom: 3px solid var(--remus-yellow);
  padding-bottom: 0.6rem;
}

h2 {
  font-size: 1.5rem;
  border-bottom: 1px solid var(--remus-line);
  padding-bottom: 0.3rem;
}

h3 {
  font-size: 1.25rem;
}

/* ============================================
   Links
   ============================================ */
a {
  color: var(--remus-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--remus-coral);
  text-decoration: underline;
}

/* ============================================
   Parágrafos e listas
   ============================================ */
p {
  margin-bottom: 1rem;
}

ul, ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.4rem;
}

/* ============================================
   Tabelas
   ============================================ */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background-color: var(--remus-white);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

th {
  background-color: var(--remus-primary);
  color: var(--remus-white);
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 700;
}

td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--remus-accent);
}

tr:nth-child(even) td {
  background-color: var(--remus-background);
}

/* ============================================
   Citações (blockquote)
   ============================================ */
blockquote {
  border-left: 4px solid var(--remus-coral);
  background-color: var(--remus-white);
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  font-style: italic;
  color: var(--remus-text-light);
  border-radius: 0 6px 6px 0;
}

/* ============================================
   Código
   ============================================ */
code {
  background-color: var(--remus-accent);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
}

pre {
  background-color: var(--remus-secondary);
  color: var(--remus-white);
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
}

pre code {
  background-color: transparent;
  color: var(--remus-white);
  padding: 0;
}

/* ============================================
   Imagens
   ============================================ */
img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 1rem 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* ============================================
   Rodapé
   ============================================ */
.site-footer {
  background-color: var(--remus-secondary);
  color: var(--remus-white);
  text-align: center;
  padding: 1.5rem 1rem;
  margin-top: 3rem;
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--remus-white);
  text-decoration: underline;
}

/* ============================================
   Diário de Bordo
   ============================================ */
.diario-post-header {
  border-left: 4px solid var(--remus-primary);
  padding-left: 1rem;
  margin-bottom: 2rem;
}

.diario-kicker {
  color: var(--remus-primary);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.diario-description {
  color: var(--remus-text-light);
  font-size: 1.1rem;
}

.diario-meta,
.diario-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: var(--remus-text-light);
  font-size: 0.9rem;
}

.diario-meta span,
.diario-tags span {
  background: var(--remus-background);
  border: 1px solid var(--remus-accent);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
}

.diario-figure {
  margin: 1.5rem 0 2rem;
}

.diario-figure img {
  display: block;
  margin: 0;
}

.diario-figure figcaption {
  color: var(--remus-text-light);
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.diario-post-content {
  max-width: 760px;
}

.diario-tags {
  border-top: 1px solid var(--remus-accent);
  margin-top: 2rem;
  padding-top: 1rem;
}

/* ============================================
   Página inicial
   ============================================ */
.home-hero {
  background: var(--remus-ink);
  border-bottom: 6px solid var(--remus-yellow);
  border-radius: 14px;
  color: var(--remus-white);
  margin: -0.5rem 0 2.5rem;
  overflow: hidden;
  padding: 2.5rem clamp(1.25rem, 4vw, 3.5rem);
  position: relative;
}

.home-hero::after {
  border: 1px solid rgba(242, 201, 76, 0.45);
  border-radius: 50%;
  content: '';
  height: 220px;
  position: absolute;
  right: -60px;
  top: -70px;
  width: 220px;
}

.home-hero h1 {
  border: 0;
  color: var(--remus-white);
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  margin: 0;
  max-width: 700px;
  padding: 0;
  position: relative;
  z-index: 1;
}

.home-hero .home-kicker {
  color: var(--remus-yellow);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

.home-hero .home-lead {
  color: rgba(255, 253, 248, 0.86);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  margin: 0.85rem 0 0;
  max-width: 650px;
  position: relative;
  z-index: 1;
}

.home-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 1.5rem 0 2.5rem;
}

.home-card {
  background: var(--remus-white);
  border: 1px solid var(--remus-line);
  border-top: 4px solid var(--remus-blue);
  border-radius: 10px;
  padding: 1.25rem 1.35rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.home-card:nth-child(2) { border-top-color: var(--remus-coral); }
.home-card:nth-child(3) { border-top-color: var(--remus-green); }
.home-card:nth-child(4) { border-top-color: var(--remus-yellow); }

.home-card:hover {
  box-shadow: 0 10px 24px rgba(32, 37, 43, 0.1);
  transform: translateY(-2px);
}

.home-card h2 {
  border: 0;
  font-size: 1.35rem;
  margin: 0 0 0.45rem;
  padding: 0;
}

.home-card p {
  color: var(--remus-text-light);
  margin: 0;
}

.home-section-title {
  border-left: 4px solid var(--remus-coral);
  padding-left: 0.75rem;
}

/* ============================================
   Fichas de recursos
   ============================================ */
.recurso-page {
  display: block;
  margin: 0 auto;
  max-width: 820px;
}

.recurso-hero {
  background: var(--remus-white);
  border-left: 7px solid var(--remus-coral);
  border-radius: 0 14px 14px 0;
  box-shadow: 0 8px 24px rgba(32, 37, 43, 0.08);
  color: var(--remus-text);
  margin: -0.5rem 0 1.25rem;
  padding: 2rem clamp(1.25rem, 4vw, 2.5rem);
  text-align: left;
}

.recurso-hero h1 {
  border-bottom: 0;
  color: var(--remus-ink);
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.1;
  margin: 0;
  padding: 0;
}

.recurso-kicker {
  color: var(--remus-coral);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 0.7rem;
  text-transform: uppercase;
}

.recurso-lead {
  color: var(--remus-text-light);
  font-size: 1.15rem;
  margin: 1rem 0;
  max-width: 680px;
}

.recurso-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.recurso-meta span {
  background: var(--remus-paper);
  border: 1px solid var(--remus-line);
  border-radius: 999px;
  color: var(--remus-ink);
  font-size: 0.84rem;
  padding: 0.3rem 0.7rem;
}

.recurso-sinal {
  align-items: center;
  color: var(--remus-text-light);
  display: flex;
  font-size: 0.92rem;
  gap: 0.6rem;
  margin: 0 0 2rem;
}

.recurso-sinal-fruta {
  color: var(--remus-green);
  font-size: 1.5rem;
  line-height: 1;
}

.recurso-page h2 {
  border-bottom: 0;
  border-left: 4px solid var(--remus-blue);
  margin-top: 2.4rem;
  padding: 0 0 0 0.75rem;
}

.recurso-page h3 {
  color: var(--remus-coral);
}

.recurso-page blockquote {
  background: #fff8e5;
  border-left-color: var(--remus-yellow);
  color: var(--remus-ink);
}

.recurso-page li::marker {
  color: var(--remus-coral);
}

.recurso-page hr {
  border: 0;
  border-top: 1px solid var(--remus-line);
  margin: 2.5rem 0;
}

.recurso-figure {
  margin: 2rem 0 2.5rem;
}

.recurso-figure img {
  border-radius: 10px;
  display: block;
  margin: 0;
  width: 100%;
}

.recurso-figure figcaption {
  color: var(--remus-text-light);
  font-size: 0.82rem;
  margin-top: 0.55rem;
}

.recurso-figure-simbolos {
  margin-left: auto;
  margin-right: auto;
  max-width: 560px;
}

/* ============================================
   Responsividade
   ============================================ */
@media (max-width: 600px) {
  body {
    font-size: 16px;
  }

  .site-header h1 {
    font-size: 1.5rem;
  }

  .site-nav a {
    display: block;
    margin: 0.3rem 0;
  }

  .home-grid {
    grid-template-columns: 1fr;
  }

  .home-hero {
    padding: 2rem 1.25rem;
  }

  .recurso-hero {
    padding: 1.5rem 1.1rem;
  }

  .recurso-meta span {
    font-size: 0.78rem;
  }

  main {
    margin: 2rem auto;
    padding: 0 1rem;
  }

  table {
    font-size: 0.85em;
  }

  th, td {
    padding: 0.5rem;
  }
}
