/*
Theme Name:  4agro Blog
Theme URI:   https://4agrobrasil.com
Description: Tema oficial do blog da 4agro — tecnologia, inventário florestal, georreferenciamento e inovação para o agronegócio brasileiro.
Version:     1.0.0
Author:      4agro
Author URI:  https://4agrobrasil.com
Text Domain: 4agro
*/

/* ─── RESET + VARIABLES ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --green-900: #1A3D2B;
    --green-800: #1E5C3A;
    --green-700: #236B42;
    --green-600: #2D7A4F;
    --green-500: #3A9162;
    --green-400: #52B788;
    --green-300: #74C69D;
    --green-200: #B7E4C7;
    --green-100: #D8F3DC;
    --green-50:  #F0FDF4;
    --earth-700: #4A3728;
    --earth-500: #8B5E3C;
    --gray-900: #111827;
    --gray-800: #1F2937;
    --gray-700: #374151;
    --gray-600: #4B5563;
    --gray-500: #6B7280;
    --gray-400: #9CA3AF;
    --gray-300: #D1D5DB;
    --gray-200: #E5E7EB;
    --gray-100: #F3F4F6;
    --gray-50:  #F9FAFB;
    --white: #FFFFFF;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --shadow:    0 1px 3px rgba(0,0,0,.10), 0 1px 2px rgba(0,0,0,.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,.10), 0 4px 6px rgba(0,0,0,.05);
    --shadow-xl: 0 20px 25px rgba(0,0,0,.10), 0 10px 10px rgba(0,0,0,.04);
    --radius-lg: 16px;
    --radius-xl: 24px;
}

html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font-sans); color: var(--gray-800); background: var(--white); line-height: 1.6; }
img  { display: block; max-width: 100%; height: auto; }
a    { color: inherit; text-decoration: none; }

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

/* ─── NAV ─── */
.nav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(26,61,43,0.97);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 64px; gap: 32px;
}
.nav-logo {
    display: flex; align-items: center; gap: 10px;
    font-size: 1.25rem; font-weight: 700; color: var(--white); letter-spacing: -0.3px;
}
.nav-logo-badge {
    width: 34px; height: 34px; border-radius: 9px;
    background: var(--green-400);
    display: flex; align-items: center; justify-content: center; font-size: 17px;
}
.nav-links { display: flex; align-items: center; }
.nav-links ul { list-style: none; display: flex; align-items: center; gap: 28px; margin: 0; padding: 0; }
.nav-links ul li a {
    font-size: 0.875rem; font-weight: 500;
    color: rgba(255,255,255,0.7); transition: color 0.15s;
}
.nav-links ul li a:hover,
.nav-links ul li.current-menu-item > a { color: var(--white); }
.nav-cta {
    margin-left: 20px;
    padding: 8px 18px; background: var(--green-400);
    color: var(--white) !important; border-radius: 8px;
    font-size: 0.875rem; font-weight: 600; transition: background 0.15s;
}
.nav-cta:hover { background: var(--green-300) !important; color: var(--white) !important; }

/* ─── HERO ─── */
.hero {
    background: linear-gradient(135deg, var(--green-900) 0%, var(--green-800) 55%, #2a5c3f 100%);
    padding: 80px 0 76px; position: relative; overflow: hidden;
}
.hero::before {
    content: ''; position: absolute; inset: 0;
    background: url('https://images.unsplash.com/photo-1448375240586-882707db888b?w=1400&q=50') center/cover;
    opacity: 0.10;
}
.hero-inner { position: relative; text-align: center; }
.hero-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 5px 14px; margin-bottom: 22px;
    background: rgba(82,183,136,0.18);
    border: 1px solid rgba(82,183,136,0.35);
    border-radius: 99px;
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.9px;
    color: var(--green-300); text-transform: uppercase;
}
.hero h1 {
    font-size: clamp(1.9rem, 4vw, 3.1rem); font-weight: 800;
    color: var(--white); line-height: 1.15; letter-spacing: -0.5px;
    max-width: 680px; margin: 0 auto 20px;
}
.hero p {
    font-size: 1.1rem; color: rgba(255,255,255,0.68);
    max-width: 500px; margin: 0 auto 38px;
}
.hero-search {
    display: flex; max-width: 440px; margin: 0 auto;
    background: rgba(255,255,255,0.09);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 12px; overflow: hidden;
}
.hero-search input {
    flex: 1; padding: 14px 18px;
    background: none; border: none; outline: none;
    color: var(--white); font-size: 0.9rem; font-family: inherit;
}
.hero-search input::placeholder { color: rgba(255,255,255,0.38); }
.hero-search button {
    padding: 14px 22px; background: var(--green-400);
    border: none; cursor: pointer; color: var(--white);
    font-size: 0.875rem; font-weight: 600; font-family: inherit; transition: background 0.15s;
}
.hero-search button:hover { background: var(--green-500); }

/* ─── SECTION LABELS ─── */
.section-label {
    display: flex; align-items: center; gap: 14px; margin-bottom: 30px;
}
.section-label h2 {
    font-size: 1.3rem; font-weight: 700;
    color: var(--gray-900); letter-spacing: -0.3px; white-space: nowrap;
}
.label-line { flex: 1; height: 1px; background: var(--gray-200); }
.label-note { font-size: 0.78rem; color: var(--gray-400); white-space: nowrap; }

/* ─── FEATURED POST ─── */
.section-featured { padding: 64px 0 0; }
.featured-card {
    display: grid; grid-template-columns: 1fr 1fr;
    border-radius: var(--radius-xl); overflow: hidden;
    box-shadow: var(--shadow-xl); border: 1px solid var(--gray-200);
}
.feat-img { position: relative; overflow: hidden; min-height: 440px; }
.feat-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.featured-card:hover .feat-img img { transform: scale(1.04); }
.feat-badge {
    position: absolute; top: 20px; left: 20px;
    padding: 5px 13px; border-radius: 99px;
    background: var(--green-400); color: var(--white);
    font-size: 0.68rem; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase;
}
.feat-body {
    padding: 52px 48px; background: var(--white);
    display: flex; flex-direction: column; justify-content: center;
}
.feat-cat {
    font-size: 0.72rem; font-weight: 700;
    color: var(--green-600); letter-spacing: 0.8px;
    text-transform: uppercase; margin-bottom: 14px;
}
.feat-body h2 {
    font-size: 1.7rem; font-weight: 800; color: var(--gray-900);
    line-height: 1.25; letter-spacing: -0.4px; margin-bottom: 16px;
}
.feat-body h2 a { color: inherit; }
.feat-body h2 a:hover { color: var(--green-700); }
.feat-body > p {
    font-size: 1rem; color: var(--gray-600); line-height: 1.72; margin-bottom: 28px;
}
.post-meta { display: flex; align-items: center; gap: 18px; margin-bottom: 28px; }
.post-meta span { font-size: 0.78rem; color: var(--gray-500); }

/* ─── BUTTONS ─── */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 24px; border-radius: 10px;
    font-size: 0.9rem; font-weight: 600;
    transition: all 0.15s; cursor: pointer; border: none; font-family: inherit;
}
.btn-primary { background: var(--green-700); color: var(--white); }
.btn-primary:hover { background: var(--green-800); transform: translateY(-1px); box-shadow: var(--shadow-md); color: var(--white); }

/* ─── POSTS GRID ─── */
.section-grid { padding: 56px 0; }
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 28px;
}
.post-card {
    border-radius: var(--radius-lg); overflow: hidden;
    background: var(--white); border: 1px solid var(--gray-200);
    box-shadow: var(--shadow); transition: all 0.2s ease;
    display: flex; flex-direction: column;
}
.post-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-xl); border-color: var(--green-200); }
.card-img { position: relative; overflow: hidden; height: 220px; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.post-card:hover .card-img img { transform: scale(1.06); }
.card-badge {
    position: absolute; top: 14px; left: 14px;
    padding: 4px 10px; border-radius: 99px;
    font-size: 0.65rem; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase;
}
.b-geo  { background: rgba(26,61,43,0.88);  color: #B7E4C7; }
.b-inv  { background: rgba(74,55,40,0.88);   color: #F0D0B0; }
.b-carb { background: rgba(30,58,92,0.88);   color: #B7D4E4; }
.card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.card-cat  { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.7px; text-transform: uppercase; margin-bottom: 10px; }
.cat-geo   { color: var(--green-600); }
.cat-inv   { color: var(--earth-500); }
.cat-carb  { color: #3B6FAD; }
.card-body h3 {
    font-size: 1.08rem; font-weight: 700; color: var(--gray-900);
    line-height: 1.35; letter-spacing: -0.2px; margin-bottom: 10px;
}
.card-body h3 a { color: inherit; }
.card-body h3 a:hover { color: var(--green-700); }
.card-body > p { font-size: 0.875rem; color: var(--gray-600); line-height: 1.65; flex: 1; margin-bottom: 20px; }
.card-foot {
    display: flex; align-items: center; justify-content: space-between;
    padding-top: 14px; border-top: 1px solid var(--gray-100);
}
.card-foot-meta { font-size: 0.73rem; color: var(--gray-500); }
.card-link {
    font-size: 0.78rem; font-weight: 600; color: var(--green-700);
    display: flex; align-items: center; gap: 4px; transition: gap 0.15s;
}
.card-link:hover { gap: 8px; }

/* ─── PAGINATION ─── */
.agro-pagination { display: flex; justify-content: center; gap: 8px; margin-top: 48px; }
.agro-pagination .page-numbers {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 8px;
    font-size: 0.875rem; font-weight: 600; color: var(--gray-600);
    border: 1px solid var(--gray-200); background: var(--white); transition: all 0.15s;
}
.agro-pagination .page-numbers:hover { border-color: var(--green-400); color: var(--green-700); }
.agro-pagination .page-numbers.current { background: var(--green-700); color: var(--white); border-color: var(--green-700); }
.agro-pagination .prev, .agro-pagination .next { width: auto; padding: 0 16px; font-size: 0.8rem; }

/* ─── ARTICLE (single post) ─── */
.section-article { padding: 72px 0; background: var(--gray-50); border-top: 1px solid var(--gray-200); }
.article-header { max-width: 760px; margin: 0 auto 44px; text-align: center; }
.article-tag {
    display: inline-block; padding: 4px 13px; border-radius: 99px;
    background: var(--green-100); color: var(--green-700);
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.7px;
    text-transform: uppercase; margin-bottom: 18px;
}
.article-header h1 {
    font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800;
    color: var(--gray-900); line-height: 1.2; letter-spacing: -0.5px; margin-bottom: 18px;
}
.article-lead { font-size: 1.1rem; color: var(--gray-600); line-height: 1.7; max-width: 620px; margin: 0 auto 24px; }
.article-meta-row { display: flex; align-items: center; justify-content: center; gap: 18px; font-size: 0.78rem; color: var(--gray-500); }
.meta-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--gray-400); }
.article-hero-img { max-width: 900px; margin: 0 auto 56px; border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-xl); }
.article-hero-img img { width: 100%; height: 480px; object-fit: cover; }

/* Article body — WordPress content */
.article-body { max-width: 720px; margin: 0 auto; }
.article-body p,
.article-body .wp-block-paragraph { font-size: 1.05rem; line-height: 1.82; color: var(--gray-700); margin-bottom: 22px; }
.article-body h2,
.article-body .wp-block-heading h2 { font-size: 1.5rem; font-weight: 700; color: var(--gray-900); margin: 44px 0 16px; letter-spacing: -0.3px; }
.article-body h3,
.article-body .wp-block-heading h3 { font-size: 1.15rem; font-weight: 700; color: var(--gray-900); margin: 28px 0 12px; }
.article-body ul,
.article-body ol,
.article-body .wp-block-list { margin: 0 0 22px 24px; }
.article-body li { font-size: 1.02rem; line-height: 1.72; color: var(--gray-700); margin-bottom: 8px; }
.article-body strong { color: var(--gray-900); font-weight: 600; }
.article-body a { color: var(--green-700); text-decoration: underline; text-decoration-color: rgba(35,107,66,0.3); }
.article-body a:hover { text-decoration-color: var(--green-700); }
.article-body hr,
.article-body .wp-block-separator { border: none; border-top: 1px solid var(--gray-200); margin: 42px 0; }

/* WordPress table */
.article-body table,
.article-body .wp-block-table table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 0.9rem; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }
.article-body thead th,
.article-body .wp-block-table thead th { text-align: left; padding: 13px 18px; background: var(--green-900); color: var(--white); font-weight: 600; font-size: 0.8rem; }
.article-body tbody td,
.article-body .wp-block-table tbody td { padding: 12px 18px; border-bottom: 1px solid var(--gray-200); color: var(--gray-700); }
.article-body tbody tr:last-child td { border-bottom: none; }
.article-body tbody tr:hover td { background: var(--green-50); }

/* WordPress callout / quote */
.article-body blockquote,
.article-body .wp-block-quote {
    padding: 20px 24px; background: var(--green-50);
    border-left: 4px solid var(--green-500);
    border-radius: 0 10px 10px 0; margin: 28px 0;
    font-style: normal;
}
.article-body blockquote p,
.article-body .wp-block-quote p { margin: 0; font-size: 0.98rem; color: var(--green-900); font-weight: 500; }

/* WordPress images in content */
.article-body figure, .article-body .wp-block-image { margin: 32px 0; }
.article-body figure img, .article-body .wp-block-image img { border-radius: 12px; box-shadow: var(--shadow-lg); }
.article-body figcaption, .article-body .wp-block-image figcaption { font-size: 0.8rem; color: var(--gray-500); text-align: center; margin-top: 10px; }

/* CTA box at end of article */
.article-cta-box {
    padding: 36px; margin-top: 44px;
    background: linear-gradient(135deg, var(--green-900), var(--green-800));
    border-radius: var(--radius-lg); text-align: center;
}
.article-cta-box strong { display: block; font-size: 1.15rem; color: var(--white); margin-bottom: 10px; }
.article-cta-box p { color: rgba(255,255,255,0.75) !important; margin-bottom: 20px !important; font-size: 0.95rem !important; }

/* ─── TOPICS ─── */
.section-topics { padding: 60px 0; background: var(--white); border-top: 1px solid var(--gray-200); }
.topics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-top: 28px; }
.topic-pill {
    padding: 16px 18px; background: var(--gray-50);
    border: 1px solid var(--gray-200); border-radius: 12px;
    display: flex; align-items: center; gap: 12px; transition: all 0.15s;
}
.topic-pill:hover { border-color: var(--green-400); background: var(--green-50); }
.topic-icon { width: 36px; height: 36px; border-radius: 9px; background: var(--green-100); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.topic-label { font-size: 0.82rem; font-weight: 500; color: var(--gray-700); line-height: 1.3; }
.topic-soon { font-size: 0.63rem; font-weight: 700; color: var(--gray-400); letter-spacing: 0.5px; text-transform: uppercase; margin-top: 3px; }

/* ─── NEWSLETTER ─── */
.section-nl {
    padding: 76px 0;
    background: linear-gradient(135deg, var(--green-900), #1a4d34);
    position: relative; overflow: hidden;
}
.section-nl::before {
    content: ''; position: absolute; top: -80px; right: -80px;
    width: 320px; height: 320px; border-radius: 50%; background: rgba(82,183,136,0.09);
}
.nl-inner { position: relative; text-align: center; max-width: 560px; margin: 0 auto; }
.nl-inner h2 { font-size: 2rem; font-weight: 800; color: var(--white); margin-bottom: 12px; letter-spacing: -0.4px; }
.nl-inner > p { font-size: 1rem; color: rgba(255,255,255,0.68); margin-bottom: 32px; }
.nl-form {
    display: flex; background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2); border-radius: 12px; overflow: hidden;
}
.nl-form input {
    flex: 1; padding: 15px 20px; background: none; border: none; outline: none;
    color: var(--white); font-size: 0.9rem; font-family: inherit;
}
.nl-form input::placeholder { color: rgba(255,255,255,0.38); }
.nl-form button {
    padding: 15px 24px; background: var(--green-400); border: none; cursor: pointer;
    color: var(--white); font-size: 0.875rem; font-weight: 600; font-family: inherit;
    transition: background 0.15s; white-space: nowrap;
}
.nl-form button:hover { background: var(--green-300); }
.nl-disclaimer { font-size: 0.73rem; color: rgba(255,255,255,0.35); margin-top: 14px; }
/* Mailchimp for WordPress plugin form override */
.nl-inner .mc4wp-form-fields { display: flex; gap: 0; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); border-radius: 12px; overflow: hidden; }
.nl-inner .mc4wp-form-fields input[type="email"] { flex:1; padding: 15px 20px; background: none; border: none; outline: none; color: var(--white); font-size: 0.9rem; font-family: inherit; }
.nl-inner .mc4wp-form-fields input[type="submit"] { padding: 15px 24px; background: var(--green-400); border: none; cursor: pointer; color: var(--white); font-size: 0.875rem; font-weight: 600; font-family: inherit; }

/* ─── FOOTER ─── */
footer { background: var(--gray-900); padding: 52px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 44px; }
.footer-brand-logo { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; font-weight: 700; color: var(--white); margin-bottom: 14px; }
.footer-logo-badge { width: 32px; height: 32px; border-radius: 8px; background: var(--green-500); display: flex; align-items: center; justify-content: center; font-size: 16px; }
.footer-tagline { font-size: 0.875rem; color: rgba(255,255,255,0.42); line-height: 1.65; max-width: 230px; }
.footer-col h4 { font-size: 0.75rem; font-weight: 700; color: rgba(255,255,255,0.45); text-transform: uppercase; letter-spacing: 0.9px; margin-bottom: 18px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 11px; }
.footer-col a { font-size: 0.875rem; color: rgba(255,255,255,0.55); transition: color 0.15s; }
.footer-col a:hover { color: var(--white); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 28px; border-top: 1px solid rgba(255,255,255,0.07); font-size: 0.78rem; color: rgba(255,255,255,0.28); }

/* ─── RESPONSIVE ─── */
@media (max-width: 860px) {
    .featured-card { grid-template-columns: 1fr; }
    .feat-img { min-height: 280px; }
    .feat-body { padding: 28px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
    .nav-links { display: none; }
    .posts-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .article-hero-img img { height: 260px; }
    .feat-body h2 { font-size: 1.35rem; }
}
