/* ═══════════════════════════════════════════════════════════════
   style.css — Base global do portal Marabá em Foco
   Versão: 2025-06 — sem dependência de outros arquivos para regras
   básicas. home-news.css, ads.css e responsive.css adicionam camadas.
   ═══════════════════════════════════════════════════════════════ */

/* ── 1. Variáveis ────────────────────────────────────────────── */
:root {
  --bg:        #f4f6fb;
  --paper:     #ffffff;
  --dark:      #0f172a;
  --dark2:     #1e293b;
  --text:      #334155;
  --muted:     #64748b;
  --line:      #e2e8f0;
  --red:       #e11d48;
  --red2:      #be123c;
  --blue:      #0f4c81;
  --yellow:    #facc15;
  --shadow:    0 12px 40px rgba(15,23,42,.10);
  --radius:    16px;
  --container: 1180px;
}

/* ── 2. Reset ────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a  { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

/* ── 3. Container ────────────────────────────────────────────── */
.container {
  width: min(var(--container), calc(100% - 32px));
  margin-inline: auto;
}

/* ── 4. Skip link (acessibilidade) ──────────────────────────── */
.skip-link {
  position: absolute;
  top: -999px;
  left: 8px;
  background: var(--dark);
  color: #fff;
  padding: 8px 14px;
  border-radius: 0 0 8px 8px;
  font-size: 13px;
  font-weight: 700;
  z-index: 200;
}
.skip-link:focus { top: 0; }

/* ── 5. Header sticky ────────────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.93);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

/* ── 6. Nav ──────────────────────────────────────────────────── */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  flex-wrap: nowrap;
  min-height: 136px;
}

/* ── 7. Brand ────────────────────────────────────────────────── */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 1;
  min-width: 0;
}

/* Modo padrão: logo quadrada + texto */
.brand--default .logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 4px 12px rgba(15,23,42,.07);
  object-fit: contain;
  padding: 3px;
  flex-shrink: 0;
}

/* Modo custom: imagem enviada no admin, sem moldura */
.brand--custom .logo {
  height: 120px;
  width: auto;
  max-width: 400px;
  border-radius: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.brand-text {
  min-width: 0;
  overflow: hidden;
}

.brand-text strong {
  display: block;
  font-size: 18px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -.04em;
  color: var(--dark);
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-text strong span { color: var(--red); }

.brand-text small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-top: 2px;
  white-space: nowrap;
}

/* ── 8. Menu desktop ─────────────────────────────────────────── */
.menu {
  display: flex;
  list-style: none;
  gap: 2px;
}

.menu a {
  display: block;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  color: var(--dark2);
  white-space: nowrap;
  transition: background .14s, color .14s;
}

.menu a:hover,
.menu a.active {
  background: #ffe4e6;
  color: var(--red2);
}

/* ── 9. Ferramentas de acessibilidade ───────────────────────── */
.accessibility-tools {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.accessibility-tools button {
  background: #f1f5f9;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
  color: var(--dark2);
  cursor: pointer;
  white-space: nowrap;
  transition: background .14s, color .14s;
  line-height: 1;
}

.accessibility-tools button:hover {
  background: var(--dark);
  color: #fff;
  border-color: var(--dark);
}

/* ── 10. Botão hamburguer (mobile) ──────────────────────────── */
.mobile {
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--dark);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 0;
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
  line-height: 1;
}

/* ── 11. Botões ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 10px 20px;
  font-family: inherit;
  font-weight: 900;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity .14s, transform .14s;
  text-decoration: none;
}

.btn:hover { opacity: .88; transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--red), var(--red2));
  color: #fff;
  box-shadow: 0 6px 20px rgba(225,29,72,.22);
}

.btn-dark {
  background: var(--dark);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--dark);
  border: 2px solid var(--line);
}

.btn-outline:hover {
  background: var(--dark);
  color: #fff;
  border-color: var(--dark);
}

.link-button {
  background: none;
  border: 0;
  color: var(--red2);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  padding: 0;
  text-decoration: none;
}

/* ── 12. Box / Kicker / Tag / Badge ─────────────────────────── */
.box {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 2px 10px rgba(15,23,42,.05);
}

.kicker {
  color: var(--red2);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 8px;
}

.title {
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.1;
  letter-spacing: -.03em;
  color: var(--dark);
  margin-bottom: 10px;
}

.desc {
  color: var(--muted);
  font-weight: 500;
  font-size: 15px;
}

/* Tag: usado sobre imagens e no hero */
.tag {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 5px;
  padding: 4px 9px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #fff;
}

/* Badge: posicionado absolutamente sobre thumb de card */
.badge {
  position: absolute;
  left: 10px;
  top: 10px;
  background: var(--red);
  color: #fff;
  border-radius: 5px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
  line-height: 1.4;
}

/* ── 13. Seção ───────────────────────────────────────────────── */
.section { padding: 48px 0; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

/* ── 14. Tabs de editorias ───────────────────────────────────── */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tabs a {
  display: inline-block;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--dark);
  padding: 7px 13px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
  transition: background .14s, color .14s;
  white-space: nowrap;
}

.tabs a:hover {
  background: var(--dark);
  color: #fff;
  border-color: var(--dark);
}

/* ── 15. Barra de busca ──────────────────────────────────────── */
.searchbar {
  display: flex;
  gap: 8px;
  margin: 14px 0 0;
  max-width: 480px;
}

.searchbar input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 16px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
  background: var(--paper);
  outline: none;
  transition: border-color .14s;
}

.searchbar input:focus {
  border-color: var(--red);
}

/* ── 16. Meta (data + autor) ─────────────────────────────────── */
.meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 6px;
}

/* ── 17. Layout artigo (grid 2 col) ──────────────────────────── */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  align-items: start;
}

/* ── 18. Artigo ──────────────────────────────────────────────── */
.article {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(20px, 4vw, 40px);
  box-shadow: var(--shadow);
}

.article h1 {
  font-size: clamp(24px, 3.5vw, 44px);
  line-height: 1.1;
  letter-spacing: -.03em;
  color: var(--dark);
  margin-bottom: 14px;
}

.article .lead {
  font-size: 17px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 16px;
  line-height: 1.55;
}

.article-content {
  font-size: 17px;
  color: var(--dark2);
  line-height: 1.75;
}

.article-content p { margin-bottom: 16px; }

.article-image {
  border-radius: 16px;
  overflow: hidden;
  margin: 20px 0;
}

.share {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 16px 0;
}

.share a {
  padding: 9px 14px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid var(--line);
  font-weight: 800;
  font-size: 13px;
  transition: background .14s, color .14s;
}

.share a:hover {
  background: var(--dark);
  color: #fff;
}

/* ── 19. Card de mídia (slot de anúncio — sem aspect-ratio aqui) */
.midia-card {
  display: block;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: #f1f5f9;
  border: 1px solid var(--line);
}

.midia-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
  display: block;
}

.midia-placeholder {
  min-height: 70px;
  border: 1px dashed rgba(100,116,139,.25);
  border-radius: 12px;
  background: #fafafa;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
  padding: 14px;
  font-size: 13px;
  width: 100%;
}

.midia-placeholder strong {
  display: block;
  color: var(--dark2);
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 3px;
}

/* ── 20. Seção "Anuncie conosco" ─────────────────────────────── */
.advertise {
  padding: 56px 0;
  background: linear-gradient(135deg, #020617 0%, #0f172a 55%, #1e3a8a 100%);
  color: #fff;
}

.advertise-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: center;
}

.advertise h2 {
  font-size: clamp(24px, 3.5vw, 40px);
  line-height: 1.1;
  letter-spacing: -.04em;
  margin-bottom: 14px;
}

.advertise p {
  color: rgba(255,255,255,.75);
  font-size: 16px;
  max-width: 480px;
  margin-bottom: 20px;
  line-height: 1.6;
}

.plans { display: grid; gap: 10px; }

.plan {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: rgba(255,255,255,.85);
}

.plan strong { color: var(--yellow); font-weight: 900; }

/* ── 21. Rodapé ──────────────────────────────────────────────── */
.footer {
  background: #020617;
  color: #94a3b8;
  padding: 48px 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr .7fr .7fr .6fr;
  gap: 24px;
  margin-bottom: 32px;
}

.footer h3,
.footer h4 {
  color: #fff;
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 800;
}

.footer ul {
  list-style: none;
  display: grid;
  gap: 7px;
}

.footer a,
.footer p {
  color: #94a3b8;
  font-size: 13px;
  font-weight: 600;
}

.footer a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(148,163,184,.18);
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #64748b;
}

/* ── 22. Botão WhatsApp flutuante ────────────────────────────── */
.wpp {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background: #22c55e;
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(34,197,94,.32);
  transition: transform .18s;
}

.wpp:hover { transform: scale(1.08); }
.wpp svg { width: 28px; height: 28px; fill: currentColor; }

/* ── 23. Admin ───────────────────────────────────────────────── */
.admin { background: #f8fafc; }

.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
  border-radius: 14px;
  overflow: hidden;
}

.table th,
.table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 14px;
}

.table th {
  background: #f8fafc;
  font-weight: 800;
  color: var(--dark2);
}

.form {
  display: grid;
  gap: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
}

.form input,
.form textarea,
.form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 14px;
  font: inherit;
  font-size: 14px;
  color: var(--dark);
  background: var(--paper);
  outline: none;
  transition: border-color .14s;
}

.form input:focus,
.form textarea:focus,
.form select:focus {
  border-color: var(--red);
}

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

.form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--dark2);
}

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--bg);
}

.login-card {
  width: min(400px, calc(100% - 32px));
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  box-shadow: var(--shadow);
}

/* ── 24. Responsivo: tablet/menu ─────────────────────────────── */
@media (max-width: 1080px) {
  /* Menu some, hamburguer aparece */
  .menu { display: none; }
  .mobile { display: flex; }

  /* Menu aberto via JS */
  .menu.open {
    display: grid;
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 8px;
    box-shadow: var(--shadow);
    grid-template-columns: repeat(2, 1fr);
    z-index: 100;
  }

  .menu.open li a {
    display: block;
    border-radius: 10px;
    padding: 10px 12px;
  }

  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static !important; }
  .advertise-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ── 25. Responsivo: mobile completo ─────────────────────────── */
@media (max-width: 760px) {
  .container { width: min(100% - 20px, var(--container)); }
  .nav { padding: 8px 0; gap: 8px; }

  /* Brand compacta */
  .brand--default .logo { width: 40px; height: 40px; border-radius: 10px; }
  .brand--custom .logo  { height: 80px; max-width: 280px; }
  .brand-text strong    { font-size: 15px; }
  .brand-text small     { display: none; }

  /* Acessibilidade: apenas A- e A+ visíveis */
  .accessibility-tools {
    gap: 4px;
  }

  .accessibility-tools button {
    padding: 6px 8px;
    font-size: 11px;
    border-radius: 7px;
  }

  .accessibility-tools button[data-contrast],
  .accessibility-tools button[data-motion] {
    display: none;
  }

  .mobile { width: 38px; height: 38px; font-size: 16px; }

  /* Seção */
  .section { padding: 28px 0; }
  .title { font-size: 22px; }
  .section-head { flex-direction: column; gap: 10px; align-items: flex-start; }
  .tabs { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }

  /* Busca */
  .searchbar { max-width: none; flex-direction: column; }
  .searchbar input,
  .searchbar .btn { width: 100%; border-radius: 12px; }

  /* Anuncie */
  .advertise { padding: 36px 0; }
  .advertise h2 { font-size: 22px; }
  .plan { flex-direction: column; align-items: flex-start; }

  /* Layout artigo */
  .layout { grid-template-columns: 1fr; }
  .article h1 { font-size: 22px; }
  .article .lead,
  .article-content { font-size: 15px; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 6px; }

  /* WhatsApp */
  .wpp { width: 48px; height: 48px; right: 12px; bottom: 12px; }
  .wpp svg { width: 24px; height: 24px; }
}
