/* ============================================
   AgroMZ - CSS Principal
   ============================================ */

/* Reset e base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --verde-primario: #2d7a3e;
    --verde-escuro: #1e5429;
    --verde-claro: #4caf50;
    --amarelo: #f9a825;
    --terra: #8d6e63;
    --texto: #2c3e2d;
    --texto-suave: #5a6c5d;
    --fundo: #ffffff;
    --fundo-suave: #f5f8f5;
    --borda: #e0e6e0;
    --sombra: 0 2px 8px rgba(0,0,0,0.08);
    --sombra-media: 0 4px 16px rgba(0,0,0,0.12);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Roboto, -apple-system, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--texto);
    background: var(--fundo);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--verde-primario);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--verde-escuro);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--texto);
}

h1 { font-size: 2.5rem; margin-bottom: 1rem; }
h2 { font-size: 2rem; margin-bottom: 1rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }

p { margin-bottom: 1rem; }

/* ============================================
   HEADER
   ============================================ */
.site-header {
    background: #fff;
    box-shadow: var(--sombra);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 20px;
}

.logo {
    font-size: 1.5rem;
    color: var(--verde-primario);
    font-weight: 800;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.main-nav ul a {
    color: var(--texto);
    font-weight: 500;
}

.main-nav ul a:hover {
    color: var(--verde-primario);
}

.nav-auth {
    display: flex;
    gap: 0.5rem;
}

/* ============================================
   BOTÕES
   ============================================ */
.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border: 2px solid transparent;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.btn-primary {
    background: var(--verde-primario);
    color: white;
}

.btn-primary:hover {
    background: var(--verde-escuro);
    color: white;
    transform: translateY(-1px);
}

.btn-outline {
    border-color: var(--verde-primario);
    color: var(--verde-primario);
    background: transparent;
}

.btn-outline:hover {
    background: var(--verde-primario);
    color: white;
}

.btn-large {
    padding: 0.9rem 2rem;
    font-size: 1.05rem;
}

/* ============================================
   HERO (topo da página)
   ============================================ */
.hero {
    background: linear-gradient(135deg, var(--verde-primario) 0%, var(--verde-escuro) 100%);
    color: white;
    padding: 5rem 0;
    text-align: center;
}

.hero h1 {
    color: white;
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto 2rem;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero .btn-primary {
    background: var(--amarelo);
    color: var(--texto);
}

.hero .btn-primary:hover {
    background: #f57f17;
}

.hero .btn-outline {
    border-color: white;
    color: white;
}

.hero .btn-outline:hover {
    background: white;
    color: var(--verde-primario);
}

/* ============================================
   SECÇÕES
   ============================================ */
.section {
    padding: 4rem 0;
}

.section-alt {
    background: var(--fundo-suave);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    margin-bottom: 0.5rem;
}

.section-title p {
    color: var(--texto-suave);
    font-size: 1.1rem;
}

/* ============================================
   GRELHAS
   ============================================ */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: var(--sombra);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--sombra-media);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: var(--verde-primario);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.card h3 {
    color: var(--verde-primario);
    margin-bottom: 0.5rem;
}

/* Card de artigo */
.article-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--sombra);
    transition: transform 0.2s;
}

.article-card:hover {
    transform: translateY(-4px);
}

.article-card-image {
    height: 200px;
    background: linear-gradient(135deg, var(--verde-claro), var(--verde-primario));
    background-size: cover;
    background-position: center;
}

.article-card-body {
    padding: 1.5rem;
}

.article-card-meta {
    font-size: 0.85rem;
    color: var(--texto-suave);
    margin-bottom: 0.5rem;
}

.article-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.article-card h3 a {
    color: var(--texto);
}

.article-card h3 a:hover {
    color: var(--verde-primario);
}

/* ============================================
   CTA (Call to Action)
   ============================================ */
.cta {
    background: var(--verde-primario);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.cta h2 {
    color: white;
}

.cta p {
    font-size: 1.15rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta .btn-primary {
    background: var(--amarelo);
    color: var(--texto);
}

/* ============================================
   ESTATÍSTICAS
   ============================================ */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--verde-primario);
    display: block;
}

.stat-label {
    color: var(--texto-suave);
    font-weight: 500;
}

/* ============================================
   FORMULÁRIOS
   ============================================ */
.form-box {
    max-width: 450px;
    margin: 3rem auto;
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--sombra-media);
}

.form-box h1 {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--texto);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--borda);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--verde-primario);
}

.form-box .btn {
    width: 100%;
    padding: 0.9rem;
    font-size: 1.05rem;
}

.form-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--texto-suave);
}

/* ============================================
   ALERTAS / FLASH
   ============================================ */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    border-left: 4px solid;
}

.alert-success {
    background: #e8f5e9;
    color: #1b5e20;
    border-color: #4caf50;
}

.alert-error {
    background: #ffebee;
    color: #b71c1c;
    border-color: #f44336;
}

.alert-warning {
    background: #fff8e1;
    color: #e65100;
    border-color: #ff9800;
}

.alert-info {
    background: #e3f2fd;
    color: #0d47a1;
    border-color: #2196f3;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: #1a2e1d;
    color: #b8c5b9;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.site-footer h3,
.site-footer h4 {
    color: white;
    margin-bottom: 1rem;
}

.site-footer ul {
    list-style: none;
}

.site-footer ul li {
    margin-bottom: 0.5rem;
}

.site-footer a {
    color: #b8c5b9;
}

.site-footer a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #2d4a31;
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
}

/* ============================================
   RESPONSIVO
   ============================================ */
@media (max-width: 768px) {
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    
    .hero {
        padding: 3rem 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .site-header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-nav {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }
    
    .main-nav ul {
        gap: 1rem;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .section {
        padding: 2.5rem 0;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}