/* ============================================================
   Pulso Jurídico — Ghost Theme
   Paleta: Negro / Dorado
   ============================================================ */

:root {
  --gold: #b8972a;
  --gold-dark: #8a6e1a;
  --gold-light: #f5e9c0;
  --black: #111111;
  --white: #ffffff;
  --gray-100: #f5f5f3;
  --gray-200: #e8e8e5;
  --gray-400: #9a9a96;
  --gray-600: #5a5a56;
  --text-primary: #111111;
  --text-secondary: #5a5a56;
  --text-muted: #9a9a96;
  --border: #e8e8e5;
  --font-serif: 'Georgia', 'Times New Roman', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

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

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--white);
  line-height: 1.6;
}

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

/* ---- Layout ---- */
.site-wrapper { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
.container { max-width: 860px; margin: 0 auto; padding: 0 1.5rem; }

/* ---- Topbar ---- */
.topbar {
  border-bottom: 0.5px solid var(--border);
  padding: 8px 0;
  font-size: 11px;
  color: var(--text-muted);
}
.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.topbar-nav { display: flex; gap: 20px; }
.topbar-nav a { color: var(--text-muted); font-size: 11px; letter-spacing: .3px; }
.topbar-nav a:hover { color: var(--gold); }

/* ---- Masthead ---- */
.masthead {
  text-align: center;
  padding: 20px 0 12px;
  border-bottom: 2.5px solid var(--gold);
  margin-bottom: 0;
}
.masthead-name {
  font-family: var(--font-serif);
  font-size: 42px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--black);
  text-transform: uppercase;
  line-height: 1;
}
.masthead-tagline {
  font-size: 11px;
  color: var(--gold);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-top: 6px;
}

/* ---- Nav principal ---- */
.site-nav {
  border-bottom: 0.5px solid var(--border);
  margin-bottom: 28px;
}
.site-nav-inner {
  display: flex;
  justify-content: center;
  gap: 32px;
  padding: 12px 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}
.site-nav a {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: .5px;
  text-transform: uppercase;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.site-nav a:hover,
.site-nav a.active {
  color: var(--black);
  border-bottom-color: var(--gold);
}

/* ---- Tag badge ---- */
.tag-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .8px;
  text-transform: uppercase;
  padding: 2px 8px;
  background: var(--gold);
  color: #1a1400;
  border-radius: 3px;
  margin-bottom: 6px;
}

/* ---- Section header ---- */
.section-header {
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border-bottom: 2px solid var(--gold);
  display: inline-block;
  padding-bottom: 3px;
  margin-bottom: 16px;
}

/* ---- Hero grid ---- */
.hero-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 28px;
  margin-bottom: 28px;
}
.hero-main {}
.hero-main .post-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 12px;
  background: var(--gray-100);
}
.hero-main .post-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
  color: var(--black);
}
.hero-main .post-title:hover { color: var(--gold-dark); }
.hero-main .post-excerpt {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 8px;
}
.hero-sidebar { display: flex; flex-direction: column; gap: 16px; }
.sidebar-post { border-bottom: 0.5px solid var(--border); padding-bottom: 16px; }
.sidebar-post:last-child { border-bottom: none; padding-bottom: 0; }
.sidebar-post .post-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--black);
  margin-bottom: 4px;
}
.sidebar-post .post-title:hover { color: var(--gold-dark); }

/* ---- Post meta ---- */
.post-meta {
  font-size: 11px;
  color: var(--gold);
}

/* ---- Section grid (3 cols) ---- */
.section-block { margin-bottom: 24px; }
.posts-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.posts-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}
.grid-post .post-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--black);
  margin-bottom: 4px;
}
.grid-post .post-title:hover { color: var(--gold-dark); }
.grid-post .post-excerpt {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 4px;
}

/* ---- Secondary sections block ---- */
.secondary-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  background: var(--gray-100);
  border-radius: 6px;
  padding: 20px;
  margin-bottom: 28px;
}
.secondary-section-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.compact-post { margin-bottom: 10px; }
.compact-post .post-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--black);
  margin-bottom: 2px;
}
.compact-post .post-title:hover { color: var(--gold-dark); }

/* ---- Divider ---- */
.divider { border: none; border-top: 0.5px solid var(--border); margin: 20px 0; }

/* ---- Newsletter CTA ---- */
.newsletter-cta {
  background: var(--gray-100);
  border: 0.5px solid var(--gold);
  border-radius: 6px;
  padding: 28px;
  text-align: center;
  margin: 28px 0;
}
.newsletter-cta h3 {
  font-size: 11px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.newsletter-cta p {
  font-size: 16px;
  font-weight: 600;
  color: var(--black);
  margin-bottom: 4px;
}
.newsletter-cta small {
  font-size: 13px;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 16px;
}
.newsletter-form {
  display: flex;
  gap: 8px;
  justify-content: center;
  max-width: 420px;
  margin: 0 auto;
}
.newsletter-form input[type="email"] {
  flex: 1;
  padding: 10px 14px;
  font-size: 14px;
  border: 0.5px solid var(--border);
  border-radius: 4px;
  background: var(--white);
  color: var(--text-primary);
  outline: none;
}
.newsletter-form input[type="email"]:focus { border-color: var(--gold); }
.newsletter-form button {
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  background: var(--gold);
  color: #1a1400;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background .15s;
}
.newsletter-form button:hover { background: var(--gold-dark); color: var(--white); }

/* ---- Footer ---- */
.site-footer {
  border-top: 2px solid var(--gold);
  padding: 24px 0;
  margin-top: 40px;
  text-align: center;
}
.site-footer p { font-size: 12px; color: var(--text-muted); }
.site-footer a { color: var(--gold); }

/* ---- Article / Post page ---- */
.post-header { margin-bottom: 28px; }
.post-header .post-title-large {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--black);
  margin-bottom: 12px;
}
.post-header .post-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 0.5px solid var(--border);
  border-bottom: 0.5px solid var(--border);
  padding: 10px 0;
}
.post-featured-image {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 28px;
}
.post-content {
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-primary);
  max-width: 680px;
  margin: 0 auto;
}
.post-content h2 { font-size: 22px; font-weight: 700; margin: 2rem 0 1rem; }
.post-content h3 { font-size: 18px; font-weight: 700; margin: 1.5rem 0 .75rem; }
.post-content p { margin-bottom: 1.25rem; }
.post-content ul, .post-content ol { margin: 0 0 1.25rem 1.5rem; }
.post-content li { margin-bottom: .4rem; }
.post-content blockquote {
  border-left: 3px solid var(--gold);
  padding-left: 1.25rem;
  color: var(--text-secondary);
  font-style: italic;
  margin: 1.5rem 0;
}
.post-content a { color: var(--gold-dark); text-decoration: underline; }
.post-content figure { margin: 2rem 0; }
.post-content figcaption { font-size: 13px; color: var(--text-muted); text-align: center; margin-top: 8px; font-family: var(--font-sans); }

/* ---- Tag page ---- */
.tag-header {
  border-bottom: 2.5px solid var(--gold);
  padding-bottom: 14px;
  margin-bottom: 28px;
}
.tag-header h1 {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  color: var(--black);
}
.tag-header p { font-size: 14px; color: var(--text-secondary); margin-top: 4px; }
.tag-posts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 24px;
}
.tag-post-card {
  border-bottom: 0.5px solid var(--border);
  padding-bottom: 20px;
}
.tag-post-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 10px;
  background: var(--gray-100);
}
.tag-post-card .post-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--black);
  margin-bottom: 6px;
}
.tag-post-card .post-title:hover { color: var(--gold-dark); }
.tag-post-card .post-excerpt { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }

/* ---- Pagination ---- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 32px 0;
  font-size: 13px;
}
.pagination a {
  padding: 6px 14px;
  border: 0.5px solid var(--border);
  border-radius: 4px;
  color: var(--text-secondary);
}
.pagination a:hover { border-color: var(--gold); color: var(--gold); }
.pagination .current {
  padding: 6px 14px;
  background: var(--gold);
  color: #1a1400;
  border-radius: 4px;
  font-weight: 600;
}

/* ---- Ghost card widths ---- */
.kg-width-wide {
  margin-left: -80px;
  margin-right: -80px;
}
.kg-width-full {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}
.kg-width-wide img,
.kg-width-full img {
  width: 100%;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .masthead-name { font-size: 28px; letter-spacing: 2px; }
  .hero-grid { grid-template-columns: 1fr; }
  .posts-grid-3 { grid-template-columns: 1fr; }
  .posts-grid-2 { grid-template-columns: 1fr; }
  .secondary-sections { grid-template-columns: 1fr; }
  .tag-posts-grid { grid-template-columns: 1fr; }
  .site-nav-inner { gap: 16px; flex-wrap: wrap; justify-content: center; }
  .topbar-nav { display: none; }
  .newsletter-form { flex-direction: column; }
}
