/*
Theme Name: Agrocim Portal
Theme URI: https://agrocim.com.br/
Author: Agrocim
Author URI: https://agrocim.com.br/
Description: Tema editorial leve, responsivo e otimizado para SEO do portal Agrocim.
Version: 1.0.1
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: agrocim-portal
*/

:root {
  --green-950: #102b19;
  --green-900: #173a22;
  --green-800: #245331;
  --green-700: #356b3d;
  --lime: #c8d83d;
  --gold: #d4aa43;
  --cream: #f8f5ee;
  --paper: #fffdf8;
  --ink: #172018;
  --muted: #667066;
  --line: #e7e1d5;
  --radius: 16px;
  --shadow: 0 16px 40px rgba(22, 48, 28, .08);
  --container: 1440px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--cream); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.6; }
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--green-700); }
img { display: block; max-width: 100%; height: auto; }
button, input { font: inherit; }
.container { width: min(calc(100% - 40px), var(--container)); margin-inline: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.screen-reader-text:focus { position: fixed; z-index: 10000; top: 12px; left: 12px; width: auto; height: auto; padding: 12px 18px; clip: auto; color: #fff; background: var(--green-950); border-radius: 8px; }

.site-header { position: relative; z-index: 50; background: rgba(255, 253, 248, .96); border-bottom: 1px solid var(--line); }
.header-main { min-height: 112px; display: grid; grid-template-columns: minmax(230px, .8fr) 2fr auto; align-items: center; gap: 28px; }
.custom-logo { max-width: 270px; max-height: 82px; width: auto; }
.brand-fallback { display: inline-flex; align-items: center; gap: 10px; color: var(--green-950); }
.brand-mark { width: 48px; height: 54px; color: var(--green-800); }
.brand-name { display: block; font-size: clamp(2rem, 3vw, 3.2rem); line-height: .9; font-weight: 850; letter-spacing: -.06em; }
.brand-tagline { display: block; margin-top: 7px; font-size: .63rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.primary-nav ul { display: flex; align-items: center; justify-content: center; gap: clamp(18px, 2.2vw, 38px); margin: 0; padding: 0; list-style: none; }
.primary-nav a { position: relative; display: block; padding: 16px 0; font-weight: 700; font-size: .94rem; }
.primary-nav .current-menu-item > a::after, .primary-nav .current_page_item > a::after, .primary-nav a:hover::after { content: ""; position: absolute; left: 0; right: 0; bottom: 7px; height: 2px; background: var(--green-700); }
.header-actions { display: flex; gap: 8px; }
.icon-button { width: 43px; height: 43px; display: inline-grid; place-items: center; color: var(--green-950); background: transparent; border: 1px solid var(--line); border-radius: 50%; cursor: pointer; }
.icon-button:hover { background: var(--green-950); color: #fff; }
.icon-button svg { width: 20px; height: 20px; }
.menu-toggle { display: none; }
.search-panel { display: none; padding: 18px 0; background: var(--paper); border-top: 1px solid var(--line); }
.search-panel.is-open { display: block; }
.search-form { display: flex; max-width: 760px; margin-inline: auto; }
.search-field { min-width: 0; flex: 1; min-height: 50px; padding: 0 18px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 10px 0 0 10px; }
.search-submit, .button { min-height: 50px; padding: 0 22px; color: #fff; background: var(--green-800); border: 0; border-radius: 0 10px 10px 0; font-weight: 800; cursor: pointer; }
.search-submit:hover, .button:hover { background: var(--green-950); color: #fff; }

.site-main { min-height: 50vh; }
.home-main { padding: 30px 0 0; }
.hero-grid { display: grid; grid-template-columns: 1.22fr 1fr 1fr; grid-template-rows: repeat(2, minmax(220px, 1fr)); gap: 14px; min-height: 570px; }
.story-card { position: relative; overflow: hidden; isolation: isolate; min-height: 220px; color: #fff; background: var(--green-900); border-radius: var(--radius); box-shadow: var(--shadow); }
.story-card:first-child { grid-row: 1 / span 2; }
.story-card-media, .story-card-media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.story-card-media img { object-fit: cover; transition: transform .5s ease; }
.story-card:hover .story-card-media img { transform: scale(1.035); }
.story-card::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(180deg, rgba(8, 22, 12, .02) 25%, rgba(8, 22, 12, .9) 100%); }
.story-card-content { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: 24px; }
.story-card:first-child .story-card-content { padding: 34px; }
.eyebrow { display: inline-flex; align-items: center; min-height: 25px; padding: 3px 9px; margin-bottom: 12px; color: #fff; background: rgba(20, 61, 31, .92); border-radius: 6px; font-size: .67rem; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.story-title { margin: 0 0 9px; max-width: 800px; font-size: clamp(1.25rem, 2vw, 1.8rem); line-height: 1.12; letter-spacing: -.025em; text-wrap: balance; }
.story-card:first-child .story-title { font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 3.6vw, 3.25rem); font-weight: 600; }
.story-excerpt { max-width: 640px; margin: 0 0 13px; color: rgba(255,255,255,.9); font-size: 1rem; line-height: 1.45; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); font-size: .78rem; }
.story-card .post-meta { color: rgba(255,255,255,.82); }
.meta-separator::before { content: "•"; margin-right: 8px; }
.image-placeholder { position: absolute; inset: 0; background: radial-gradient(circle at 78% 22%, rgba(202,218,62,.28), transparent 28%), linear-gradient(145deg, #315d36, #102b19); }

.news-strip { margin-top: 20px; display: grid; grid-template-columns: 210px 1fr; align-items: stretch; overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: 13px; }
.news-strip-label { display: flex; align-items: center; gap: 10px; padding: 20px 24px; color: var(--green-900); font-weight: 850; text-transform: uppercase; letter-spacing: .03em; border-right: 1px solid var(--line); }
.news-strip-label svg { color: var(--green-700); width: 22px; }
.news-strip-list { display: grid; grid-template-columns: repeat(5, 1fr); margin: 0; padding: 0; list-style: none; }
.news-strip-list li { display: flex; align-items: center; min-width: 0; padding: 14px 20px; border-right: 1px solid var(--line); }
.news-strip-list a { display: -webkit-box; overflow: hidden; font-size: .82rem; font-weight: 700; line-height: 1.35; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }

.market-board { margin-top: 20px; padding: 24px; color: #fff; background: radial-gradient(circle at 90% 0, rgba(200,216,61,.18), transparent 32%), var(--green-950); border-radius: var(--radius); box-shadow: var(--shadow); }
.market-header { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.market-header .archive-kicker { color: var(--lime); }
.market-header h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 1.75rem; line-height: 1.1; }
.market-header > p { margin: 0; color: rgba(255,255,255,.62); font-size: .78rem; }
.market-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.market-card { padding: 18px; background: rgba(255,255,255,.075); border: 1px solid rgba(255,255,255,.11); border-radius: 12px; }
.market-card-heading { display: flex; align-items: center; gap: 9px; }
.market-symbol { width: 34px; height: 34px; display: grid; place-items: center; color: var(--green-950); background: var(--lime); border-radius: 9px; font-size: .67rem; font-weight: 900; }
.market-card h3 { margin: 0; font-size: .88rem; }
.market-value { margin: 15px 0 4px; font-size: 1.62rem; font-weight: 850; letter-spacing: -.035em; }
.market-value small { color: rgba(255,255,255,.56); font-size: .68rem; font-weight: 650; letter-spacing: 0; }
.market-change { margin: 0; font-size: .76rem; font-weight: 800; }
.market-change span:last-child { color: rgba(255,255,255,.5); font-weight: 600; }
.market-change.is-up { color: #b8e596; }
.market-change.is-down { color: #ffaaa3; }
.market-card time { display: block; margin-top: 10px; color: rgba(255,255,255,.48); font-size: .67rem; text-transform: uppercase; }
.market-source { margin-top: 14px; color: rgba(255,255,255,.48); font-size: .65rem; }
.market-source a { color: rgba(255,255,255,.78); text-decoration: underline; text-underline-offset: 2px; }

.home-section { margin-top: 24px; }
.section-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.category-panel { min-width: 0; padding: 22px; border-right: 1px solid var(--line); }
.category-panel:last-child { border-right: 0; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 18px; }
.section-heading h2 { display: flex; align-items: center; gap: 9px; margin: 0; color: var(--green-950); font-size: .98rem; letter-spacing: .015em; text-transform: uppercase; }
.section-icon { width: 27px; height: 27px; display: inline-grid; place-items: center; color: var(--green-900); background: #edf0ce; border-radius: 8px; }
.section-link { color: var(--green-700); font-size: .72rem; font-weight: 800; white-space: nowrap; }
.panel-feature { position: relative; display: block; overflow: hidden; min-height: 220px; margin-bottom: 12px; color: #fff; background: var(--green-900); border-radius: 12px; }
.panel-feature img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.panel-feature::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 20%, rgba(7,21,11,.9)); }
.panel-feature-title { position: absolute; z-index: 2; left: 16px; right: 16px; bottom: 15px; margin: 0; font-size: 1.08rem; line-height: 1.25; }
.compact-list { margin: 0; padding: 0; list-style: none; }
.compact-list li { padding: 11px 0; border-top: 1px solid var(--line); }
.compact-list a { display: block; font-size: .88rem; font-weight: 750; line-height: 1.35; }
.compact-list .post-meta { margin-top: 5px; font-size: .68rem; }

.lower-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature-block { padding: 22px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.feature-block .panel-feature { min-height: 190px; }
.feature-block .compact-list li:last-child { padding-bottom: 0; }

.page-shell { padding: 46px 0 72px; }
.archive-header { max-width: 900px; margin-bottom: 30px; }
.archive-kicker { margin: 0 0 6px; color: var(--green-700); font-size: .75rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.archive-title { margin: 0; color: var(--green-950); font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1.05; }
.archive-description { max-width: 760px; margin-top: 14px; color: var(--muted); }
.posts-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.post-card { overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; transition: transform .2s ease, box-shadow .2s ease; }
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.post-card-media { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--green-900); }
.post-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.post-card:hover .post-card-media img { transform: scale(1.035); }
.post-card-body { padding: 18px; }
.post-card-title { margin: 0 0 10px; font-size: 1.2rem; line-height: 1.26; letter-spacing: -.015em; }
.post-card-excerpt { margin: 12px 0 0; color: var(--muted); font-size: .9rem; }
.pagination { margin-top: 38px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pagination .page-numbers { min-width: 42px; height: 42px; display: grid; place-items: center; padding: 0 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; font-weight: 750; }
.pagination .current { color: #fff; background: var(--green-800); border-color: var(--green-800); }

.breadcrumbs { margin: 0 0 24px; color: var(--muted); font-size: .77rem; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.breadcrumbs li + li::before { content: "/"; margin-right: 8px; color: #a8aea8; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 50px; align-items: start; }
.article { min-width: 0; }
.article-header { max-width: 920px; }
.article-title { margin: 8px 0 18px; color: var(--green-950); font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.3rem, 5vw, 4.6rem); line-height: 1.04; letter-spacing: -.035em; text-wrap: balance; }
.article-deck { margin: 0 0 18px; color: var(--muted); font-size: 1.18rem; line-height: 1.5; }
.article-featured { overflow: hidden; margin: 30px 0; border-radius: var(--radius); }
.article-featured img { width: 100%; max-height: 660px; object-fit: cover; }
.entry-content { font-family: Georgia, "Times New Roman", serif; font-size: 1.13rem; line-height: 1.82; }
.entry-content > * { max-width: 780px; }
.entry-content > .alignwide { max-width: 1060px; }
.entry-content > .alignfull { max-width: none; }
.entry-content h2, .entry-content h3 { color: var(--green-950); font-family: Inter, ui-sans-serif, system-ui, sans-serif; line-height: 1.18; }
.entry-content h2 { margin-top: 2.3em; font-size: 1.8rem; }
.entry-content h3 { margin-top: 1.9em; font-size: 1.35rem; }
.entry-content a { color: var(--green-700); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.entry-content blockquote { margin: 2em 0; padding: 8px 0 8px 24px; color: var(--green-900); border-left: 4px solid var(--lime); font-size: 1.3rem; }
.entry-content img { border-radius: 12px; }
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.article-tags a { padding: 6px 11px; color: var(--green-900); background: #edf0df; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.article-sidebar { position: sticky; top: 24px; }
.sidebar-box { padding: 22px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.sidebar-box + .sidebar-box { margin-top: 18px; }
.sidebar-title { margin: 0 0 14px; color: var(--green-950); font-size: .9rem; text-transform: uppercase; }
.author-box { display: flex; align-items: center; gap: 13px; }
.author-box img { border-radius: 50%; }
.author-name { margin: 0; font-weight: 800; }
.author-description { margin: 4px 0 0; color: var(--muted); font-size: .8rem; }
.post-navigation { margin-top: 42px; padding-top: 24px; border-top: 1px solid var(--line); }
.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.post-navigation a { display: block; padding: 18px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; font-weight: 750; }
.nav-next { text-align: right; }

.comments-area { max-width: 780px; margin-top: 50px; }
.comment-list { padding: 0; list-style: none; }
.comment-body { margin: 20px 0; padding: 20px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.comment-form input:not([type="submit"]), .comment-form textarea { width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.comment-form .submit { min-height: 46px; padding: 0 20px; color: #fff; background: var(--green-800); border: 0; border-radius: 8px; font-weight: 800; }
.empty-state { padding: 45px; text-align: center; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }

.site-footer { margin-top: 0; color: rgba(255,255,255,.78); background: var(--green-950); }
.footer-grid { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 55px; padding: 52px 0 38px; }
.footer-brand .brand-fallback { color: #fff; }
.footer-brand .brand-mark { color: var(--lime); width: 38px; }
.footer-brand .brand-name { font-size: 2rem; }
.footer-brand .brand-tagline { font-size: .5rem; }
.footer-copy { max-width: 300px; margin: 18px 0 0; font-size: .86rem; }
.footer-title { margin: 0 0 13px; color: #fff; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; }
.footer-links { margin: 0; padding: 0; list-style: none; }
.footer-links li { margin: 7px 0; }
.footer-links a { font-size: .84rem; }
.footer-bottom { padding: 18px 0; font-size: .75rem; border-top: 1px solid rgba(255,255,255,.12); }

@media (max-width: 1180px) {
  .header-main { grid-template-columns: 230px 1fr auto; }
  .primary-nav ul { gap: 16px; }
  .primary-nav a { font-size: .82rem; }
  .section-grid { grid-template-columns: repeat(2, 1fr); }
  .category-panel:nth-child(2) { border-right: 0; }
  .category-panel:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .news-strip-list { grid-template-columns: repeat(3, 1fr); }
  .news-strip-list li:nth-child(n+4) { display: none; }
  .market-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 920px) {
  .header-main { min-height: 88px; grid-template-columns: 1fr auto; }
  .primary-nav { position: fixed; inset: 0 0 0 20%; z-index: 100; display: none; padding: 90px 28px 30px; background: var(--paper); box-shadow: -20px 0 60px rgba(0,0,0,.18); }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { display: block; }
  .primary-nav a { padding: 13px 0; font-size: 1.05rem; border-bottom: 1px solid var(--line); }
  .primary-nav a::after { display: none; }
  .menu-toggle { position: relative; z-index: 110; display: inline-grid; }
  .brand-name { font-size: 2.2rem; }
  .brand-mark { width: 40px; height: 46px; }
  .hero-grid { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(3, minmax(230px, auto)); }
  .story-card:first-child { grid-column: 1 / -1; grid-row: auto; min-height: 430px; }
  .lower-grid { grid-template-columns: 1fr; }
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
  .sidebar-box + .sidebar-box { margin-top: 0; }
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; }
}

@media (max-width: 680px) {
  .container { width: min(calc(100% - 24px), var(--container)); }
  .header-main { min-height: 76px; }
  .brand-name { font-size: 1.8rem; }
  .brand-tagline { display: none; }
  .brand-mark { width: 34px; height: 40px; }
  .icon-button { width: 39px; height: 39px; }
  .hero-grid { display: block; }
  .story-card, .story-card:first-child { min-height: 330px; margin-bottom: 12px; }
  .story-card:not(:first-child) { min-height: 250px; }
  .story-card:first-child .story-card-content, .story-card-content { padding: 20px; }
  .story-card:first-child .story-title { font-size: 2rem; }
  .story-excerpt { display: none; }
  .news-strip { grid-template-columns: 1fr; }
  .news-strip-label { padding: 14px 18px; border-right: 0; border-bottom: 1px solid var(--line); }
  .news-strip-list { grid-template-columns: 1fr; }
  .news-strip-list li { padding: 13px 18px; border-right: 0; border-bottom: 1px solid var(--line); }
  .news-strip-list li:nth-child(n+3) { display: none; }
  .market-board { padding: 20px; }
  .market-header { align-items: start; flex-direction: column; gap: 6px; }
  .market-grid { grid-template-columns: 1fr; }
  .section-grid { grid-template-columns: 1fr; }
  .category-panel, .category-panel:nth-child(2) { border-right: 0; border-bottom: 1px solid var(--line); }
  .category-panel:last-child { border-bottom: 0; }
  .posts-grid { grid-template-columns: 1fr; }
  .article-title { font-size: 2.35rem; }
  .entry-content { font-size: 1.05rem; }
  .article-sidebar { grid-template-columns: 1fr; }
  .post-navigation .nav-links { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 35px 24px; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
