/* Redação Vida — farmaciabr.click | Design: local-newspaper / soft-neutral */

:root {
  --rv-bg: #f5f4f0;
  --rv-surface: #ffffff;
  --rv-ink: #1e1e1c;
  --rv-ink-soft: #4a4a46;
  --rv-muted: #7a7974;
  --rv-line: #d8d6cf;
  --rv-line-strong: #b8b5ac;
  --rv-accent: #7a2e2e;
  --rv-accent-hover: #5c2222;
  --rv-tag-bg: #edeae3;
  --rv-overlay: rgba(20, 18, 16, 0.62);
  --rv-cookie-bg: #2a2826;
  --rv-cookie-text: #f0eeea;

  --rv-font-display: "Libre Baskerville", Georgia, "Times New Roman", serif;
  --rv-font-body: "Source Serif 4", Georgia, serif;
  --rv-font-ui: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;

  --rv-space-xs: 8px;
  --rv-space-sm: 16px;
  --rv-space-md: 24px;
  --rv-space-lg: 32px;
  --rv-space-xl: 48px;

  --rv-radius: 1px;
  --rv-container: 960px;
  --rv-aspect-hero: 16 / 9;

  --rv-shadow-card: 0 1px 0 var(--rv-line);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--rv-font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--rv-ink);
  background: var(--rv-bg);
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--rv-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--rv-accent-hover);
}

h1, h2, h3, h4 {
  font-family: var(--rv-font-display);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 var(--rv-space-sm);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); }
h3 { font-size: 1.2rem; }

p {
  margin: 0 0 var(--rv-space-sm);
}

ul, ol {
  margin: 0 0 var(--rv-space-sm);
  padding-left: 1.35rem;
}

.container {
  width: min(100% - var(--rv-space-md) * 2, var(--rv-container));
  margin-inline: auto;
}

/* Cookie strip */
.cookie-strip {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--rv-cookie-bg);
  color: var(--rv-cookie-text);
  padding: var(--rv-space-xs) var(--rv-space-sm);
  font-family: var(--rv-font-ui);
  font-size: 0.8125rem;
  display: none;
  align-items: center;
  justify-content: center;
  gap: var(--rv-space-sm);
  text-align: center;
}

.cookie-strip.is-visible {
  display: flex;
}

.cookie-strip p {
  margin: 0;
  flex: 1;
}

.cookie-strip a {
  color: #e8c4a8;
}

.cookie-strip .btn {
  flex-shrink: 0;
  border-color: var(--rv-cookie-text);
  color: var(--rv-cookie-text);
  font-size: 0.75rem;
  padding: 4px 12px;
}

.cookie-strip .btn:hover {
  background: var(--rv-cookie-text);
  color: var(--rv-cookie-bg);
}

body.cookie-visible {
  padding-top: 44px;
}

/* Stacked header */
.site-header {
  background: var(--rv-surface);
  border-bottom: 2px solid var(--rv-ink);
}

.header-top {
  text-align: center;
  padding: var(--rv-space-md) var(--rv-space-sm) var(--rv-space-sm);
  border-bottom: 1px solid var(--rv-line);
}

.site-masthead {
  font-family: var(--rv-font-display);
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  letter-spacing: -0.02em;
  margin: 0;
}

.site-masthead a {
  color: var(--rv-ink);
  text-decoration: none;
}

.site-tagline {
  font-family: var(--rv-font-ui);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--rv-muted);
  margin: var(--rv-space-xs) 0 0;
}

.header-meta {
  display: flex;
  justify-content: center;
  gap: var(--rv-space-md);
  font-family: var(--rv-font-ui);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rv-muted);
  padding: var(--rv-space-xs) 0;
}

/* Nav */
.site-nav {
  border-bottom: 1px solid var(--rv-line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0;
}

.nav-list a {
  display: block;
  padding: var(--rv-space-sm) var(--rv-space-md);
  font-family: var(--rv-font-ui);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--rv-ink);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s;
}

.nav-list a:hover,
.nav-list a.is-active {
  border-bottom-color: var(--rv-accent);
  color: var(--rv-accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--rv-line-strong);
  border-radius: var(--rv-radius);
  padding: 6px 10px;
  font-family: var(--rv-font-ui);
  font-size: 0.75rem;
  cursor: pointer;
  color: var(--rv-ink);
}

/* Buttons */
.btn {
  display: inline-block;
  font-family: var(--rv-font-ui);
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 8px 18px;
  border: 1px solid var(--rv-accent);
  border-radius: var(--rv-radius);
  background: transparent;
  color: var(--rv-accent);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.btn:hover {
  background: var(--rv-accent);
  color: var(--rv-surface);
}

/* Tags */
.tag {
  display: inline-block;
  font-family: var(--rv-font-ui);
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--rv-ink-soft);
  background: var(--rv-tag-bg);
  padding: 3px 8px;
  border: 1px solid var(--rv-line);
  border-radius: var(--rv-radius);
  text-decoration: none;
}

.tag:hover {
  border-color: var(--rv-line-strong);
  color: var(--rv-accent);
}

/* Hero */
.hero {
  position: relative;
  aspect-ratio: var(--rv-aspect-hero);
  overflow: hidden;
  background: var(--rv-ink);
}

.hero img,
.hero svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--rv-overlay) 0%, transparent 55%);
  display: flex;
  align-items: flex-end;
  padding: var(--rv-space-lg);
}

.hero-content {
  color: #fff;
  max-width: 640px;
}

.hero-content .tag {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.3);
  color: #fff;
  margin-bottom: var(--rv-space-xs);
}

.hero-content h2 {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  margin-bottom: var(--rv-space-xs);
}

.hero-content h2 a {
  color: #fff;
  text-decoration: none;
}

.hero-content h2 a:hover {
  text-decoration: underline;
}

.hero-meta {
  font-family: var(--rv-font-ui);
  font-size: 0.75rem;
  opacity: 0.9;
}

/* Grid */
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--rv-space-md);
}

.col-main { grid-column: span 8; }
.col-side { grid-column: span 4; }

/* Cards */
.card {
  background: var(--rv-surface);
  border: 1px solid var(--rv-line);
  border-radius: var(--rv-radius);
  box-shadow: var(--rv-shadow-card);
}

.card-body {
  padding: var(--rv-space-sm);
}

.card-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 1px solid var(--rv-line);
  background: var(--rv-tag-bg);
}

.card-thumb img,
.card-thumb svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-title {
  font-size: 1.1rem;
  margin-bottom: var(--rv-space-xs);
}

.card-title a {
  color: var(--rv-ink);
  text-decoration: none;
}

.card-title a:hover {
  color: var(--rv-accent);
}

.card-excerpt {
  font-size: 0.9375rem;
  color: var(--rv-ink-soft);
  margin-bottom: var(--rv-space-xs);
}

.card-meta {
  font-family: var(--rv-font-ui);
  font-size: 0.6875rem;
  color: var(--rv-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Vertical article list */
.article-list {
  display: flex;
  flex-direction: column;
  gap: var(--rv-space-md);
}

.article-list .card {
  display: grid;
  grid-template-columns: 200px 1fr;
}

.article-list .card-thumb {
  border-bottom: none;
  border-right: 1px solid var(--rv-line);
}

/* Sidebar */
.sidebar-block {
  margin-bottom: var(--rv-space-lg);
}

.sidebar-block h3 {
  font-family: var(--rv-font-ui);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border-bottom: 2px solid var(--rv-ink);
  padding-bottom: var(--rv-space-xs);
  margin-bottom: var(--rv-space-sm);
}

.sidebar-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-links li {
  border-bottom: 1px solid var(--rv-line);
  padding: var(--rv-space-xs) 0;
}

.sidebar-links a {
  color: var(--rv-ink);
  text-decoration: none;
  font-size: 0.9375rem;
}

.sidebar-links a:hover {
  color: var(--rv-accent);
}

/* Section */
.section {
  padding: var(--rv-space-lg) 0;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--rv-space-md);
  border-bottom: 1px solid var(--rv-line);
  padding-bottom: var(--rv-space-xs);
}

.section-title {
  font-family: var(--rv-font-ui);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin: 0;
}

/* Article page */
.article-header {
  margin-bottom: var(--rv-space-md);
}

.article-header .tag {
  margin-bottom: var(--rv-space-xs);
}

.article-byline {
  font-family: var(--rv-font-ui);
  font-size: 0.8125rem;
  color: var(--rv-muted);
  margin-bottom: var(--rv-space-sm);
  padding-bottom: var(--rv-space-sm);
  border-bottom: 1px solid var(--rv-line);
}

.article-byline strong {
  color: var(--rv-ink);
}

.article-featured-img {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  margin-bottom: var(--rv-space-md);
  border: 1px solid var(--rv-line);
  border-radius: var(--rv-radius);
}

.article-featured-img img,
.article-featured-img svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-body p {
  margin-bottom: var(--rv-space-sm);
}

.article-body h2 {
  margin-top: var(--rv-space-lg);
  font-size: 1.35rem;
}

.lead {
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--rv-ink-soft);
}

.author-box {
  display: flex;
  gap: var(--rv-space-sm);
  align-items: flex-start;
  padding: var(--rv-space-sm);
  border: 1px solid var(--rv-line);
  border-radius: var(--rv-radius);
  margin-top: var(--rv-space-lg);
  background: var(--rv-surface);
}

.author-avatar {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border: 1px solid var(--rv-line);
  border-radius: var(--rv-radius);
  overflow: hidden;
}

.author-avatar svg {
  width: 100%;
  height: 100%;
}

.author-box h4 {
  font-family: var(--rv-font-ui);
  font-size: 0.875rem;
  margin-bottom: 4px;
}

.author-box p {
  font-size: 0.875rem;
  color: var(--rv-ink-soft);
  margin: 0;
}

.related-articles {
  margin-top: var(--rv-space-xl);
  padding-top: var(--rv-space-md);
  border-top: 2px solid var(--rv-ink);
}

/* Prose pages */
.prose {
  max-width: 680px;
}

.prose h2 {
  margin-top: var(--rv-space-lg);
  font-size: 1.25rem;
}

/* Contact form */
.form-group {
  margin-bottom: var(--rv-space-sm);
}

.form-group label {
  display: block;
  font-family: var(--rv-font-ui);
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 4px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 8px 12px;
  font-family: var(--rv-font-ui);
  font-size: 0.9375rem;
  border: 1px solid var(--rv-line-strong);
  border-radius: var(--rv-radius);
  background: var(--rv-surface);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

/* Footer — editorial masthead */
.site-footer {
  background: var(--rv-ink);
  color: #d8d6cf;
  margin-top: var(--rv-space-xl);
  padding: var(--rv-space-lg) 0 var(--rv-space-md);
}

.footer-masthead {
  text-align: center;
  padding-bottom: var(--rv-space-md);
  border-bottom: 1px solid rgba(255,255,255,0.15);
  margin-bottom: var(--rv-space-md);
}

.footer-masthead .site-masthead {
  color: #fff;
  font-size: 1.75rem;
}

.footer-masthead .site-masthead a {
  color: #fff;
}

.footer-masthead p {
  font-family: var(--rv-font-ui);
  font-size: 0.75rem;
  color: #9a9890;
  margin: var(--rv-space-xs) 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--rv-space-md);
  margin-bottom: var(--rv-space-md);
}

.footer-col h4 {
  font-family: var(--rv-font-ui);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #9a9890;
  margin-bottom: var(--rv-space-xs);
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  margin-bottom: 6px;
}

.footer-col a {
  color: #d8d6cf;
  text-decoration: none;
  font-family: var(--rv-font-ui);
  font-size: 0.8125rem;
}

.footer-col a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-bottom {
  text-align: center;
  font-family: var(--rv-font-ui);
  font-size: 0.6875rem;
  color: #7a7870;
  padding-top: var(--rv-space-sm);
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* Utility */
.text-muted { color: var(--rv-muted); }
.mb-lg { margin-bottom: var(--rv-space-lg); }
.text-center { text-align: center; }

/* Responsive */
@media (max-width: 768px) {
  .col-main,
  .col-side {
    grid-column: span 12;
  }

  .article-list .card {
    grid-template-columns: 1fr;
  }

  .article-list .card-thumb {
    border-right: none;
    border-bottom: 1px solid var(--rv-line);
  }

  .nav-toggle {
    display: block;
    margin: var(--rv-space-xs);
  }

  .nav-list {
    display: none;
    flex-direction: column;
    width: 100%;
    border-top: 1px solid var(--rv-line);
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-list a {
    border-bottom: 1px solid var(--rv-line);
    border-left: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-overlay {
    padding: var(--rv-space-sm);
  }
}
