/* Mercado Aberto — rendabr.digital */
:root {
  --slate: #2D3748;
  --slate-dark: #1A202C;
  --gold: #D4A853;
  --gold-light: #E8C97A;
  --bg: #F7FAFC;
  --bg-alt: #EDF2F7;
  --text: #2D3748;
  --text-muted: #718096;
  --border: #CBD5E0;
  --white: #FFFFFF;
  --font-serif: Georgia, "Times New Roman", serif;
  --font-sans: "Segoe UI", system-ui, -apple-system, sans-serif;
  --max-width: 1200px;
  --article-width: 720px;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a { color: var(--slate); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--gold); }

/* ── Compact Topbar ── */
.topbar {
  background: var(--slate);
  color: var(--white);
  font-size: 0.75rem;
  padding: 0.35rem 1rem;
  text-align: center;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.topbar a { color: var(--gold-light); }
.topbar a:hover { color: var(--white); }

.site-header {
  background: var(--white);
  border-bottom: 3px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.logo-main {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--slate);
  letter-spacing: -0.02em;
}

.logo-sub {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  font-weight: 600;
}

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--slate);
  border-radius: 4px;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  color: var(--slate);
  font-size: 1.25rem;
  line-height: 1;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.main-nav a {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate);
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

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

main { flex: 1; }

.section {
  padding: 2.5rem 0;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--slate);
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--gold);
  display: inline-block;
}

/* ── Featured Story ── */
.featured-story {
  background: var(--white);
  border: 1px solid var(--border);
  margin: 2rem auto;
  max-width: var(--max-width);
}

.featured-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0;
}

.featured-image {
  background: var(--bg-alt);
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--border);
}

.featured-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.featured-content h2 {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  line-height: 1.25;
  margin-bottom: 1rem;
  color: var(--slate-dark);
}

.featured-content h2 a { color: inherit; }
.featured-content h2 a:hover { color: var(--gold); }

.featured-excerpt {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.article-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
}

.article-meta .author { font-weight: 600; color: var(--slate); }

/* ── Wide Magazine Grid ── */
.magazine-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.magazine-card {
  background: var(--white);
  border: 1px solid var(--border);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.magazine-card:hover {
  border-color: var(--gold);
  box-shadow: 0 4px 12px rgba(45, 55, 72, 0.08);
}

.magazine-card-image {
  aspect-ratio: 16/10;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.magazine-card-body {
  padding: 1.25rem;
}

.magazine-card-body .category {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.magazine-card-body h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

.magazine-card-body h3 a { color: var(--slate-dark); }
.magazine-card-body h3 a:hover { color: var(--gold); }

.magazine-card-body p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

/* ── Compact News ── */
.compact-news {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 1.5rem;
}

.compact-news-list {
  list-style: none;
}

.compact-news-list li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 1rem;
  align-items: start;
}

.compact-news-list li:last-child { border-bottom: none; }

.compact-date {
  font-size: 0.75rem;
  color: var(--gold);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.compact-news-list h4 {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
}

.compact-news-list h4 a { color: var(--slate); }
.compact-news-list h4 a:hover { color: var(--gold); }

.compact-news-list .meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ── Two-column home layout ── */
.home-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  align-items: start;
}

/* ── Article page ── */
.article-header {
  max-width: var(--article-width);
  margin: 2rem auto 0;
  padding: 0 1.25rem;
}

.article-header .category {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.article-header h1 {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  line-height: 1.2;
  color: var(--slate-dark);
  margin-bottom: 1rem;
}

.article-body {
  max-width: var(--article-width);
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

.article-body p {
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
  line-height: 1.75;
}

.article-body h2 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  margin: 2rem 0 1rem;
  color: var(--slate);
  padding-left: 0.75rem;
  border-left: 3px solid var(--gold);
}

.article-body ul, .article-body ol {
  margin: 0 0 1.25rem 1.5rem;
}

.article-body li { margin-bottom: 0.5rem; }

.article-hero-img {
  max-width: var(--article-width);
  margin: 1.5rem auto;
  border: 1px solid var(--border);
}

/* ── Author box ── */
.author-box {
  max-width: var(--article-width);
  margin: 2rem auto;
  padding: 1.5rem;
  background: var(--white);
  border: 1px solid var(--border);
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 1.25rem;
  align-items: start;
}

.author-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  overflow: hidden;
}

.author-box h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.author-box .role {
  font-size: 0.8rem;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.author-box p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Related articles ── */
.related-articles {
  max-width: var(--article-width);
  margin: 2rem auto 3rem;
  padding: 0 1.25rem;
}

.related-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.related-card {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 1rem;
}

.related-card h4 {
  font-size: 0.9rem;
  line-height: 1.35;
}

.related-card h4 a { color: var(--slate); }

/* ── Static pages ── */
.page-header {
  background: var(--slate);
  color: var(--white);
  padding: 2.5rem 0;
  margin-bottom: 2rem;
}

.page-header h1 {
  font-family: var(--font-serif);
  font-size: 2rem;
}

.page-header p {
  margin-top: 0.5rem;
  color: var(--gold-light);
  font-size: 0.95rem;
}

.page-content {
  max-width: var(--article-width);
  margin: 0 auto 3rem;
  padding: 0 1.25rem;
}

.page-content p { margin-bottom: 1.25rem; line-height: 1.75; }

.page-content h2 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  margin: 2rem 0 0.75rem;
  color: var(--slate);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.35rem;
}

.page-content ul, .page-content ol {
  margin: 0 0 1.25rem 1.5rem;
}

.page-content li { margin-bottom: 0.5rem; }

/* ── Contact form ── */
.contact-form {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.form-group { margin-bottom: 1rem; }

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--bg);
}

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

.btn {
  display: inline-block;
  background: var(--slate);
  color: var(--white);
  border: none;
  padding: 0.7rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s;
}

.btn:hover { background: var(--gold); color: var(--slate-dark); }

/* ── Articles listing ── */
.articles-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.article-list-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.5rem;
  background: var(--white);
  border: 1px solid var(--border);
  padding: 1.25rem;
  transition: border-color 0.2s;
}

.article-list-item:hover { border-color: var(--gold); }

.article-list-item .thumb {
  aspect-ratio: 16/10;
  background: var(--bg-alt);
  border: 1px solid var(--border);
}

.article-list-item h2 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.article-list-item h2 a { color: var(--slate-dark); }

.article-list-item .excerpt {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

/* ── Footer ── */
.site-footer {
  background: var(--slate);
  color: var(--bg);
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 1.5rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
}

.footer-brand .logo-main { color: var(--white); }
.footer-brand .logo-sub { color: var(--gold); }

.footer-brand p {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: #A0AEC0;
  line-height: 1.5;
}

.footer-col h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

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

.footer-col li { margin-bottom: 0.4rem; }

.footer-col a {
  color: #CBD5E0;
  font-size: 0.85rem;
}

.footer-col a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 1rem 1.25rem;
  text-align: center;
  font-size: 0.75rem;
  color: #A0AEC0;
}

.footer-bottom a { color: var(--gold-light); }

/* ── Cookie notice ── */
.cookie-notice {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--slate-dark);
  color: var(--white);
  padding: 1rem 1.25rem;
  z-index: 200;
  display: none;
  border-top: 3px solid var(--gold);
}

.cookie-notice.visible { display: block; }

.cookie-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.cookie-inner p {
  font-size: 0.85rem;
  flex: 1;
  min-width: 200px;
}

.cookie-inner a { color: var(--gold-light); }

.cookie-actions { display: flex; gap: 0.5rem; }

.btn-cookie {
  background: var(--gold);
  color: var(--slate-dark);
  border: none;
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 4px;
}

.btn-cookie:hover { background: var(--gold-light); }

/* ── Responsive ── */
@media (max-width: 900px) {
  .featured-inner { grid-template-columns: 1fr; }
  .featured-image { min-height: 200px; border-right: none; border-bottom: 1px solid var(--border); }
  .magazine-grid { grid-template-columns: 1fr 1fr; }
  .home-layout { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .article-list-item { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav-toggle { display: block; }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 2px solid var(--gold);
    padding: 1rem;
  }

  .main-nav.open { display: block; }

  .main-nav ul {
    flex-direction: column;
    gap: 0.75rem;
  }

  .magazine-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .article-header h1 { font-size: 1.65rem; }
  .compact-news-list li { grid-template-columns: 1fr; gap: 0.25rem; }
}
