/*
Theme Name: Central do UEC
Theme URI: https://centraldouec.com.br
Author: Matheus Nogueira
Description: Tema próprio do portal Central do UEC, inspirado no Central da TOCA, com a identidade verde/amarelo/branco do Uberlândia Esporte Clube.
Version: 1.0.0
Text Domain: central-uec
*/

:root {
  --paper: #FBFBF7;
  --paper-raised: #FFFFFF;
  --ink: #15201A;
  --ink-soft: #445048;
  --green-900: #0F3A22;
  --green-700: #1E7A3C;
  --green-600: #26903F;
  --green-500: #3FA35F;
  --gold-500: #D4AF37;
  --gold-700: #96751B;
  --line: #DEE6DE;
  --shadow: 0 1px 2px rgba(15,58,34,0.06), 0 6px 20px rgba(15,58,34,0.06);
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* Site header (utility bar + masthead + catnav), sticky on scroll */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--paper-raised); transition: box-shadow .25s ease; }
.site-header.is-sticky { box-shadow: 0 4px 16px rgba(15,58,34,0.10); }

.utility-bar { background: var(--green-900); }
.utility-bar-inner {
  max-width: 1180px; margin: 0 auto; padding: 7px 24px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.74rem; color: #DCE9E0;
}
.utility-social { display: flex; gap: 16px; }
.utility-social a, .utility-links a { color: #DCE9E0; }
.utility-social a:hover, .utility-links a:hover { color: var(--gold-500); }

/* Masthead */
header.masthead { background: var(--paper-raised); border-bottom: 1px solid var(--line); }
.masthead-inner {
  max-width: 1180px; margin: 0 auto; padding: 18px 24px 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.masthead-brand { display: flex; align-items: center; gap: 14px; }

/* Hamburger (mobile only) */
.hamburger {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 34px; height: 34px; background: none; border: none; cursor: pointer; padding: 0;
}
.hamburger span { display: block; width: 100%; height: 2px; background: var(--green-900); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer */
.drawer-overlay {
  position: fixed; inset: 0; background: rgba(15,32,20,0.45); z-index: 60;
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.drawer-overlay.is-open { opacity: 1; pointer-events: auto; }
.mobile-drawer {
  position: fixed; top: 0; left: 0; bottom: 0; width: 78vw; max-width: 320px;
  background: var(--paper-raised); z-index: 70; padding: 24px 20px;
  transform: translateX(-100%); transition: transform .25s ease;
  display: flex; flex-direction: column; gap: 4px; overflow-y: auto;
}
.mobile-drawer.is-open { transform: translateX(0); }
.mobile-drawer a {
  padding: 12px 8px; font-size: 0.95rem; font-weight: 700; color: var(--green-900);
  text-transform: uppercase; letter-spacing: 0.02em; border-bottom: 1px solid var(--line);
}
.mobile-drawer a.active { color: var(--green-700); }
.masthead-brand img.custom-logo { max-height: 56px; width: auto; border-radius: 50%; flex-shrink: 0; }
.masthead-text .byline {
  font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold-700); font-weight: 700; margin: 0 0 2px;
}
.masthead-text .wordmark {
  font-size: 1.5rem; font-weight: 900; letter-spacing: -0.01em;
  color: var(--green-700); margin: 0; line-height: 1;
}
.masthead-actions { display: flex; align-items: center; gap: 14px; color: var(--ink-soft); font-size: 0.85rem; }
.search-pill {
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px;
  display: flex; align-items: center; gap: 8px; color: var(--ink-soft);
}

/* Category nav */
nav.catnav { background: var(--paper-raised); border-bottom: 1px solid var(--line); box-shadow: 0 2px 6px rgba(15,58,34,0.04); }
.catnav-inner { max-width: 1180px; margin: 0 auto; padding: 0 24px; display: flex; gap: 4px; overflow-x: auto; }
.catnav-inner a {
  color: var(--green-700); font-size: 0.82rem; font-weight: 700; letter-spacing: 0.03em;
  text-transform: uppercase; padding: 13px 14px; white-space: nowrap; border-bottom: 3px solid transparent; display: inline-block;
}
.catnav-inner a.active,
.catnav-inner a:hover { border-bottom-color: var(--green-700); color: var(--green-900); }
.catnav-inner a:hover { background: color-mix(in srgb, var(--green-700) 7%, transparent); }

main { max-width: 1180px; margin: 0 auto; padding: 28px 24px 64px; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.6fr 1fr; gap: 28px; margin-bottom: 44px; }
.hero-lead .art,
.hero-lead img.article-thumb { aspect-ratio: 16/9; border-radius: 8px; margin-bottom: 16px; object-fit: cover; width: 100%; }
.tag {
  display: inline-block; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--green-700); background: color-mix(in srgb, var(--green-700) 12%, transparent);
  padding: 4px 10px; border-radius: 4px; margin-bottom: 10px;
}
.tag.gold { color: var(--gold-700); background: color-mix(in srgb, var(--gold-500) 18%, transparent); }
h1.headline { font-size: 2rem; line-height: 1.12; font-weight: 800; letter-spacing: -0.015em; margin: 0 0 12px; text-wrap: balance; }
.deck {
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif; font-size: 1.05rem; line-height: 1.55;
  color: var(--ink-soft); max-width: 62ch; margin: 0 0 14px;
}
.byline-row { font-size: 0.76rem; color: var(--ink-soft); display: flex; gap: 10px; align-items: center; font-variant-numeric: tabular-nums; }
.byline-row .dot::before { content: "•"; margin: 0 8px; opacity: .5; }

.rail { display: flex; flex-direction: column; gap: 26px; }
.rail-block h2.shelf-title {
  font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 800;
  color: var(--green-700); margin: 0 0 12px; padding-bottom: 8px; border-bottom: 2px solid var(--line);
}
.highlight-item { display: grid; grid-template-columns: 64px 1fr; gap: 12px; margin-bottom: 14px; align-items: start; }
.highlight-item .art,
.highlight-item img.article-thumb { width: 64px; height: 64px; border-radius: 6px; object-fit: cover; }
.highlight-item h3 { font-size: 0.88rem; line-height: 1.3; font-weight: 700; margin: 0 0 4px; }
.highlight-item a { display: grid; grid-template-columns: 64px 1fr; gap: 12px; }
.highlight-item .tag { font-size: 0.62rem; padding: 2px 7px; margin-bottom: 4px; }

.latest-list li { padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 0.88rem; font-weight: 600; line-height: 1.35; }
.latest-list li:last-child { border-bottom: none; }
.latest-list a:hover { color: var(--green-700); }
.latest-list time { display: block; font-size: 0.72rem; font-weight: 700; color: var(--ink-soft); margin-top: 4px; font-variant-numeric: tabular-nums; }

/* Shelves */
.shelf { margin-bottom: 42px; }
.shelf-head { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 3px solid var(--green-700); padding-bottom: 10px; margin-bottom: 18px; }
.shelf-head h2 { font-size: 1.05rem; font-weight: 900; letter-spacing: 0.01em; text-transform: uppercase; color: var(--ink); margin: 0; }
.shelf-head a { font-size: 0.76rem; font-weight: 700; color: var(--green-700); white-space: nowrap; }
.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card {
  border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: var(--paper-raised);
  box-shadow: var(--shadow); transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.card:hover { box-shadow: 0 4px 10px rgba(15,58,34,0.08), 0 14px 28px rgba(15,58,34,0.12); transform: translateY(-3px); border-color: color-mix(in srgb, var(--green-700) 30%, var(--line)); }
.card a { cursor: pointer; }
.card .art,
.card img.article-thumb { aspect-ratio: 4/3; border-radius: 6px; margin-bottom: 10px; object-fit: cover; width: 100%; }
.card h3 { font-size: 0.92rem; font-weight: 700; line-height: 1.35; margin: 0 0 6px; text-wrap: balance; transition: color .15s ease; }
.card time { font-size: 0.7rem; color: var(--ink-soft); font-weight: 600; font-variant-numeric: tabular-nums; }
.card:hover h3 { color: var(--green-700); }

/* Placeholder art (used only when a post has no real photo yet) */
.art {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, color-mix(in srgb, var(--green-700) 16%, var(--paper-raised)) 0%, color-mix(in srgb, var(--green-700) 30%, var(--paper-raised)) 100%);
  box-shadow: inset 0 0 0 1px var(--line);
}
.art::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 20%, color-mix(in srgb, var(--gold-500) 30%, transparent), transparent 55%);
}
.art.alt {
  background: linear-gradient(135deg, color-mix(in srgb, var(--gold-500) 14%, var(--paper-raised)) 0%, color-mix(in srgb, var(--green-700) 22%, var(--paper-raised)) 100%);
}

/* Single article */
.article-header { max-width: 76ch; margin: 0 auto 28px; }
.article-header .tag { margin-bottom: 14px; }
.article-header h1 { font-size: 2.1rem; line-height: 1.15; font-weight: 800; letter-spacing: -0.015em; margin: 0 0 14px; text-wrap: balance; }
.article-header .deck { font-size: 1.15rem; margin-bottom: 16px; }
.article-thumb-wrap { max-width: 900px; margin: 0 auto 32px; }
.article-thumb-wrap img { border-radius: 10px; aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.article-body { max-width: 68ch; margin: 0 auto; font-size: 1.08rem; line-height: 1.75; }
.article-body p { margin: 0 0 22px; }
.article-body h2 { font-size: 1.3rem; font-weight: 800; margin: 36px 0 16px; color: var(--green-900); }
.article-body ul, .article-body ol { margin: 0 0 22px 1.4em; padding: 0; }
.article-body li { margin-bottom: 6px; }
.article-body a { color: var(--green-700); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--green-700) 40%, transparent); }
.article-body figure.wp-block-rank-math-toc-block {
  background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 18px 22px; margin: 0 0 28px;
}
.article-body figure.wp-block-rank-math-toc-block h2 { margin-top: 0; }

/* Linha do tempo e figuras dentro de páginas institucionais (ex: História) */
.article-body figure { margin: 0 0 28px; }
.article-body figure img { border-radius: 8px; width: 100%; object-fit: cover; }
.article-body figcaption { font-size: 0.8rem; color: var(--ink-soft); margin-top: 8px; }

.timeline { display: flex; flex-direction: column; margin: 0 0 28px; }
.timeline-item { display: grid; grid-template-columns: 90px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.timeline-item:first-child { border-top: 1px solid var(--line); }
.timeline-year { font-weight: 900; color: var(--green-700); font-variant-numeric: tabular-nums; font-size: 0.95rem; }

.curiosidade { background: var(--paper); border-left: 4px solid var(--gold-500); border-radius: 6px; padding: 18px 22px; margin: 0 0 28px; }
.curiosidade h3 { margin: 0 0 10px; color: var(--green-900); font-size: 1.05rem; }
.curiosidade figure { margin: 14px 0 0; max-width: 280px; }

@media (max-width: 600px) {
  .timeline-item { grid-template-columns: 64px 1fr; }
}

/* Footer */
footer.site-footer { background: var(--paper-raised); color: var(--ink-soft); margin-top: 40px; border-top: 1px solid var(--line); }
.footer-inner { max-width: 1180px; margin: 0 auto; padding: 44px 24px 28px; display: grid; grid-template-columns: 1.2fr repeat(3, 1fr); gap: 32px; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { width: 44px; height: 44px; border-radius: 50%; }
.footer-brand strong { font-size: 1.05rem; color: var(--green-700); }
.footer-col h4 { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--green-700); margin: 0 0 12px; }
.footer-col a { display: block; font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 9px; }
.footer-col a:hover { color: var(--green-700); }
.footer-bottom { border-top: 1px solid var(--line); text-align: center; font-size: 0.75rem; color: var(--ink-soft); padding: 18px 24px; }

@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  h1.headline { font-size: 1.5rem; }
  .article-header h1 { font-size: 1.6rem; }

  .hamburger { display: flex; }
  nav.catnav { display: none; }
  .utility-links { display: none; }
  .masthead-inner { justify-content: flex-start; gap: 12px; }
  .masthead-actions { margin-left: auto; }
}
@media (prefers-reduced-motion: no-preference) {
  .card, .highlight-item { transition: transform .18s ease; }
  .card:hover .art, .highlight-item:hover .art { transform: translateY(-2px); }
}
