/*
Theme Name: Radik Blog
Theme URI: https://radik.com.br
Author: Radik Indústria Química
Author URI: https://radik.com.br
Description: Tema oficial do blog da Radik — aromatizadores, antimofo e controle de pragas.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: radik-blog
*/

/* ─── RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Brand — exatamente igual ao site principal */
  --brand:        #d32f2f;
  --brand-dark:   #8b1a1a;
  --brand-soft:   #fdf1f0;
  --accent-ink:   #1c1917;

  /* Superfícies */
  --bg:           #ffffff;
  --bg-secondary: #f7f5f4;
  --bg-dark:      #1e1a1a;

  /* Texto */
  --text-primary:   #111111;
  --text-secondary: #555555;
  --text-muted:     #888888;

  /* Bordas */
  --border:       #e5e5e5;
  --border-hover: #cccccc;

  /* Tipografia — igual ao Lovable */
  --font-display: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;

  /* Espaçamentos */
  --max-width: 1280px;
  --radius-sm: 4px;
  --radius:    6px;
  --radius-lg: 10px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text-primary);
}

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

/* ─── TOPBAR ────────────────────────────────────────────────── */
.site-topbar {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.85);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.site-topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

.site-topbar span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.site-topbar svg {
  width: 12px;
  height: 12px;
  opacity: 0.7;
  flex-shrink: 0;
}

/* ─── HEADER ────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 1rem;
}

/* Logo */
.site-logo img {
  height: 32px;
  width: auto;
}

/* Nav */
.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.site-nav a {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}

.site-nav a:hover { color: var(--brand); }
.site-nav a.current-page,
.site-nav a[aria-current="page"] {
  color: var(--brand);
  background: var(--brand-soft);
}

/* Botão orçamento */
.btn-orcamento {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--brand);
  color: #fff !important;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: background 0.15s, transform 0.1s;
  white-space: nowrap;
}
.btn-orcamento:hover { background: var(--brand-dark); transform: translateY(-1px); }
.btn-orcamento svg { width: 15px; height: 15px; }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--text-primary);
}

/* ─── CONTAINER ─────────────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

/* ─── HERO DO BLOG ──────────────────────────────────────────── */
.blog-hero {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 3rem 0 2.5rem;
}

.blog-hero .badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(211,47,47,0.25);
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 3px;
  margin-bottom: 1rem;
}

.blog-hero h1 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.blog-hero h1 span { color: var(--brand); }

.blog-hero p {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 520px;
  line-height: 1.65;
  margin-bottom: 1.75rem;
}

/* Filtros de categoria */
.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-filters a {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.15s;
}

.category-filters a:hover,
.category-filters a.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

/* ─── POSTS GRID ────────────────────────────────────────────── */
.posts-section {
  padding: 3rem 0 4rem;
}

.posts-section .section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 4px;
}

.posts-section h2 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 2rem;
  color: var(--text-primary);
}

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

/* Card base */
.post-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px -10px rgba(0,0,0,0.12);
  border-color: var(--border-hover);
}

/* Card destaque */
.post-card.featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
}

.post-card.featured .post-card-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.75rem;
}

.post-card.featured .post-card-title {
  font-size: 20px;
}

/* Thumbnail */
.post-card-thumb {
  background: linear-gradient(135deg, #2a1a1a 0%, #3d1212 100%);
  aspect-ratio: 16/9;
  overflow: hidden;
  position: relative;
}

.post-card.featured .post-card-thumb {
  aspect-ratio: auto;
  min-height: 220px;
}

.post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.post-card:hover .post-card-thumb img { transform: scale(1.03); }

/* Accent line colorida por categoria */
.post-card-accent {
  height: 3px;
  flex-shrink: 0;
}

/* Body */
.post-card-body { padding: 1rem 1.1rem 1.1rem; flex: 1; display: flex; flex-direction: column; }

.post-card-category {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.post-card-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
  flex: 1;
}

.post-card-title a { color: inherit; }
.post-card-title a:hover { color: var(--brand); }

.post-card-excerpt {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card.featured .post-card-excerpt { -webkit-line-clamp: 3; }

.post-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.post-card-link {
  color: var(--brand);
  font-weight: 600;
  font-size: 12px;
  transition: gap 0.15s;
}
.post-card-link:hover { text-decoration: underline; }

/* Paginação */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 3rem;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.15s;
}

.pagination a:hover { border-color: var(--brand); color: var(--brand); }
.pagination .current { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ─── POST SINGULAR ─────────────────────────────────────────── */
.single-post {
  padding: 3rem 0 5rem;
}

.single-post .post-header {
  max-width: 760px;
  margin: 0 auto 2.5rem;
}

.post-header .post-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 3px;
  margin-bottom: 1rem;
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid rgba(211,47,47,0.2);
}

.post-header h1 {
  font-size: clamp(26px, 4vw, 40px);
  margin-bottom: 1rem;
  line-height: 1.1;
}

.post-header .post-meta {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.post-header .post-meta span { display: inline-flex; align-items: center; gap: 4px; }

.post-featured-image {
  max-width: 900px;
  margin: 0 auto 3rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

/* Conteúdo do post */
.post-content {
  max-width: 760px;
  margin: 0 auto;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-primary);
}

.post-content h2 { font-size: 24px; margin: 2.5rem 0 1rem; }
.post-content h3 { font-size: 19px; margin: 2rem 0 0.75rem; }
.post-content p { margin-bottom: 1.25rem; }
.post-content ul, .post-content ol { margin: 1rem 0 1.25rem 1.5rem; }
.post-content li { margin-bottom: 0.4rem; }
.post-content a { color: var(--brand); text-decoration: underline; }
.post-content strong { font-weight: 700; }
.post-content blockquote {
  border-left: 3px solid var(--brand);
  padding: 0.75rem 1.25rem;
  background: var(--brand-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--text-secondary);
}

.post-content img {
  border-radius: var(--radius);
  margin: 1.5rem 0;
  border: 1px solid var(--border);
}

/* CTA do post */
.post-cta {
  max-width: 760px;
  margin: 3rem auto 0;
  background: var(--bg-dark);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.post-cta p { color: rgba(255,255,255,0.7); font-size: 14px; margin: 0; }
.post-cta strong { display: block; font-family: var(--font-display); font-size: 18px; color: #fff; font-weight: 800; margin-bottom: 4px; }

.btn-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--brand);
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: background 0.15s;
}
.btn-brand:hover { background: var(--brand-dark); }

/* Posts relacionados */
.related-posts {
  max-width: 900px;
  margin: 4rem auto 0;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
}

.related-posts h3 { font-size: 18px; margin-bottom: 1.5rem; }
.related-posts .posts-grid { grid-template-columns: repeat(3, 1fr); }

/* ─── FOOTER ────────────────────────────────────────────────── */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  margin-top: 5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding: 3.5rem 0;
}

.footer-logo img { height: 28px; width: auto; }

.footer-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-top: 0.75rem;
  max-width: 240px;
}

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0;
  margin-bottom: 0.85rem;
}

.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }

.footer-col ul li a {
  font-size: 13px;
  color: var(--text-muted);
  transition: color 0.15s;
}
.footer-col ul li a:hover { color: var(--brand); }

.footer-col .contact-item {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.footer-col .contact-item svg { width: 15px; height: 15px; margin-top: 2px; color: var(--brand); flex-shrink: 0; }

.footer-copy {
  border-top: 1px solid var(--border);
}

.footer-copy .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
  font-size: 11px;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ─── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .post-card.featured { grid-template-columns: 1fr; }
  .post-card.featured .post-card-thumb { min-height: 200px; aspect-ratio: 16/9; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
  .container { padding: 0 1.25rem; }
  .site-nav { display: none; }
  .site-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1.25rem;
    gap: 2px;
  }
  .site-nav.open a { padding: 10px 12px; border-radius: var(--radius-sm); }
  .menu-toggle { display: flex; align-items: center; justify-content: center; }
  .posts-grid { grid-template-columns: 1fr; }
  .post-card.featured { grid-template-columns: 1fr; }
  .related-posts .posts-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .site-topbar .container { justify-content: center; gap: 10px; }
  .post-cta { flex-direction: column; }
}
