/* --- 1. VARIÁVEIS DE DESIGN (AGRO TECH) --- */
:root {
    --primary: #4a342c; /* Verde Floresta Profundo (Usado para Títulos e Botões APROVAR) */
    --secondary: #4a342c; /* Verde Médio */
    --accent: #D4AF37; /* Dourado Nobre */
    --bg-body: #F7F9F8; 
    --white: #FFFFFF;
    --brown-cocoa: #5C4033; /* MARROM COCOA (Cor principal do texto de conteúdo) */
    --dark-footer: #4a342c; /* NOVO: Marrom mais escuro para o rodapé */
    --shadow-soft: 0 8px 24px rgba(149, 157, 165, 0.15); 
    --radius: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Open Sans', sans-serif;
    background-color: var(--bg-body);
    /* Remove a cor marrom do body, que estava deixando tudo marrom. 
       A cor base volta a ser preta/cinza escura. */
    color: #333; 
    line-height: 1.6;
}
/* Os títulos e botões já usam --primary (verde), então não precisamos mudar */
h1, h2, h3, h4, .btn, button { font-family: 'Montserrat', sans-serif; }

/* --- 2. LAYOUT BASE E NAVBAR --- */
.container { width: 90%; max-width: 1100px; margin: 0 auto; height: 100%; }

.navbar {
    background: rgba(255, 255, 255, 0.98); 
    backdrop-filter: blur(12px);
    padding: 0.5rem 0;
    position: sticky; top: 0; z-index: 1000;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    height: 80px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.nav-content { display: flex; justify-content: space-between; align-items: center; height: 100%; }

.logo { 
    color: var(--brown-cocoa); font-weight: 800; font-size: 1.2rem; 
    display: flex; align-items: center; gap: 12px; text-transform: uppercase; letter-spacing: 0.5px;
}

.logo-img { height: 55px; width: auto; object-fit: contain; }
.logo-img:not([style*="display: none"]) + #icone-padrao { display: none; }

.link-menu {
    color: var(--brown-cocoa); 
    text-decoration: none; margin-right: 25px;
    font-weight: 600; font-size: 0.95rem;
    transition: 0.3s; position: relative;
}
.link-menu::after {
    content: ''; position: absolute; width: 0; height: 2px;
    bottom: -5px; left: 0; background-color: var(--accent);
    transition: width 0.3s;
}
.link-menu:hover::after { width: 100%; }

.btn-nav {
    background: var(--brown-cocoa); color: var(--white); 
    padding: 10px 28px; border-radius: 50px;
    text-decoration: none; font-size: 0.9rem; font-weight: 700;
    transition: all 0.3s ease; display: inline-block;
    border: none; box-shadow: 0 4px 10px rgba(92, 64, 51, 0.3);
}
.btn-nav:hover { 
    transform: translateY(-2px); background: #7a5848; 
    box-shadow: 0 6px 15px rgba(92, 64, 51, 0.4); 
}

/* --- 3. HERO (CAPA) --- */
.hero {
    height: 60vh; min-height: 400px;
    position: relative; z-index: 10;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.7)), url('capa.jpg') center/cover no-repeat;
    
    display: flex; flex-direction: column; align-items: center; justify-content: center; 
    
    text-align: center; color: var(--white);
    margin-bottom: 2rem;
    border-bottom-left-radius: 30px; border-bottom-right-radius: 30px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    
    padding-top: 100px; padding-left: 20px; padding-right: 20px;
    box-sizing: border-box;
}
.hero h1 { font-size: 2.5rem; margin-bottom: 0.5rem; font-weight: 800; text-shadow: 0 1px 5px rgba(0,0,0,0.5); line-height: 1.1; }
.hero p { font-size: 1.1rem; max-width: 700px; margin: 0 auto; opacity: 1; font-weight: 500; text-shadow: 0 1px 3px rgba(0,0,0,0.5); }


/* --- 4. SEÇÕES DE CONTEÚDO --- */
.section-content { padding: 3rem 0; }
.card-grid {
    display: grid; grid-template-columns: 1fr 1.2fr; gap: 3rem;
    align-items: center; background: var(--white); padding: 3rem;
    border-radius: var(--radius); box-shadow: var(--shadow-soft);
}
.tag-line { color: var(--secondary); font-weight: 800; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 2px; display: block; margin-bottom: 10px; }
.text-block h2 { color: var(--primary); }

.text-block p { color: var(--brown-cocoa); font-size: 1rem; margin-bottom: 1.5rem; } 

.stats-row { display: flex; gap: 30px; margin-top: 20px; }
.stat-item { border-left: 4px solid var(--accent); padding-left: 15px; }
.stat-number { display: block; font-weight: 800; font-size: 1.8rem; color: var(--primary); line-height: 1; }
.stat-label { display: block; font-size: 0.8rem; color: #777; text-transform: uppercase; }

.image-block img { width: 100%; height: 350px; object-fit: cover; border-radius: 12px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }

/* --- 5. MAPA --- */
.section-map { padding: 2rem 0 5rem; }
.map-container {
    padding: 10px; background: var(--white);
    border-radius: var(--radius); box-shadow: var(--shadow-soft);
}
#map { width: 100%; height: 500px; border-radius: 12px; z-index: 1; }

/* --- 6. FOOTER --- */
footer { background: var(--primary); color: rgba(255,255,255,0.7); padding: 2.5rem 0 1.5rem; font-size: 0.9rem; }

.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2rem; margin-bottom: 1.5rem; padding-bottom: 1rem; }
.footer-col h4 { color: var(--white); margin-bottom: 1.2rem; font-size: 1.1rem; }
.footer-links a { color: rgba(255,255,255,0.6); text-decoration: none; transition: 0.3s; display: flex; align-items: center; gap: 8px; }
.footer-links a:hover { color: var(--accent); padding-left: 5px; }

/* RODAPÉ INFERIOR CENTRALIZADO (Compacto) */
.footer-bottom {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; gap: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 30px; margin-top: 10px;
}
.footer-bottom span { font-size: 0.85rem; opacity: 0.8; letter-spacing: 0.5px; }

/* BOTÃO DE ADMIN NO RODAPÉ */
.btn-admin-footer {
    background: transparent; border: 2px solid rgba(255,255,255,0.5); color: rgba(255,255,255,0.9);
    padding: 10px 25px; border-radius: 50px; cursor: pointer; font-size: 0.9rem; font-weight: 600;
    transition: all 0.3s ease; display: flex; align-items: center; gap: 8px;
    text-transform: uppercase; letter-spacing: 1px;
}
.btn-admin-footer:hover {
    background: var(--accent); color: var(--primary); border-color: var(--accent);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4); transform: translateY(-2px);
}

/* --- 7. BOTÃO FLUTUANTE DE ADICIONAR (+) --- */
.fab-admin {
    position: fixed; bottom: 30px; right: 30px; background: var(--accent); color: var(--primary);
    width: 65px; height: 65px; border-radius: 50%; border: none; font-size: 28px; cursor: pointer;
    box-shadow: 0 6px 20px rgba(0,0,0,0.6); z-index: 9999; transition: 0.3s;
    display: flex; align-items: center; justify-content: center;
}
.fab-admin:hover { transform: scale(1.08) rotate(90deg); }
.hidden { display: none !important; }

/* --- 8. MODAIS E FORMULÁRIOS (CORREÇÃO DO BOTÃO 'X') --- */
.modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(5px);
    z-index: 2000; justify-content: center; align-items: center; padding: 20px;
}
.modal-overlay.active { display: flex; }

.modal-card {
    background: var(--white); width: 100%; max-width: 850px;
    border-radius: var(--radius); overflow: hidden; 
    display: flex; 
    position: relative; /* Essencial para o position: absolute do botão 'X' */
    box-shadow: 0 20px 50px rgba(0,0,0,0.3); max-height: 90vh;
}

/* CORREÇÃO FINAL: Botão de Fechar */
.close-modal {
    position: absolute; 
    top: 15px; 
    right: 15px; /* Posição no canto superior direito */
    
    background: rgba(255,255,255,0.9); border: none; 
    width: 35px; height: 35px; border-radius: 50%; 
    cursor: pointer; 
    color: var(--primary); /* Cor Verde do texto/ícone */
    z-index: 100; /* Garante que fique acima de todos os elementos do modal */
    
    transition: 0.2s; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.close-modal:hover { background: #ffdddd; color: red; transform: rotate(90deg); }


/* Estilos dos Inputs */
.small-card { max-width: 400px; flex-direction: column; padding: 40px; }
.medium-card { max-width: 650px; flex-direction: column; padding: 35px; }

.input-field { width: 100%; padding: 12px 15px; margin-bottom: 15px; border: 1px solid #e0e0e0; border-radius: 8px; background: #f9f9f9; font-size: 0.95rem; color: #333; transition: 0.3s; }
.input-field:focus { outline: none; border-color: var(--secondary); background: #fff; box-shadow: 0 0 0 4px rgba(78, 140, 47, 0.1); }
.label-form { font-size: 0.85rem; font-weight: 700; color: var(--primary); display: block; margin-bottom: 6px; margin-left: 2px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.full-width { width: 100%; display: block; text-align: center; cursor: pointer; margin-top: 10px; }
.scrollable { overflow-y: auto; padding-right: 10px; }

/* --- 9. RESPONSIVIDADE MOBILE --- */
@media (max-width: 768px) {
    .navbar { height: auto; padding: 10px 0; }
    .nav-content { flex-direction: column; height: auto; gap: 15px; }
    .hero { height: auto; padding: 120px 20px 60px; }
    .card-grid { grid-template-columns: 1fr; gap: 1.5rem; padding: 1.5rem; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; text-align: center; }
    .modal-card { flex-direction: column; max-height: 90vh; }
    .modal-img-col { width: 100%; height: 200px; }
    .modal-info-col { width: 100%; padding: 25px; }
}

/* --- ESTILO DO BOTÃO DE GEOLOCALIZAÇÃO (CORRIGIDO) --- */
.btn-geo {
    background: #EFEFEF;
    color: var(--primary);
    border: 1px solid #ddd;
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    
    /* CORREÇÃO CRÍTICA: Força o espaçamento */
    margin-top: 5px;
    margin-bottom: 15px; 
}
.btn-geo:hover {
    background: #e0e0e0;
}