/*
Theme Name: Nordeste Agro Independente
Theme URI: https://nordesteagro.com/
Author: Nordeste Agro
Author URI: https://nordesteagro.com/
Description: Tema WordPress independente do portal Nordeste Agro, com cabeçalho, página inicial, slider de publicações, cards estratégicos e rodapé próprios. Versão 2.1.1 ajusta logo, espaçamento e adiciona slider de imagens editável na home.
Version: 2.1.1
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nordeste-agro-independente
Tags: blog, news, agriculture, custom-logo, custom-menu, featured-images, full-width-template, theme-options
*/

:root {
  --na-verde-950: #082b16;
  --na-verde-900: #0b2f19;
  --na-verde-800: #123f22;
  --na-verde-700: #1b5a30;
  --na-verde-600: #2f7a3b;
  --na-verde-100: #edf6ea;
  --na-verde-50: #f7fbf4;
  --na-laranja: #ff8a1f;
  --na-laranja-700: #e86f00;
  --na-laranja-100: #fff1e4;
  --na-marrom: #8b6f47;
  --na-texto: #1d281f;
  --na-muted: #69736a;
  --na-borda: #dfe8dc;
  --na-card: #ffffff;
  --na-fundo: #ffffff;
  --na-sombra: 0 18px 48px rgba(15, 63, 34, 0.10);
  --na-sombra-leve: 0 10px 28px rgba(15, 63, 34, 0.07);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--na-fundo);
  color: var(--na-texto);
  font-family: "Segoe UI", Roboto, Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
}

body,
body * {
  box-sizing: border-box;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.na-container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.na-site-header {
  position: relative;
  z-index: 30;
  padding: 18px 0 14px;
  background: #ffffff;
  border-bottom: 1px solid rgba(223, 232, 220, 0.48);
}

.na-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
}

.na-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}

.na-brand .custom-logo-link,
.na-brand-fallback {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  line-height: 0;
}

.na-brand-fallback {
  line-height: 1;
}

.na-brand img.custom-logo {
  display: block;
  width: auto !important;
  max-width: var(--na-logo-max-width, 175px) !important;
  max-height: var(--na-logo-max-height, 54px) !important;
  object-fit: contain;
}

.na-logo-symbol {
  position: relative;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--na-laranja) 0 45%, transparent 45% 100%);
  overflow: hidden;
  flex: 0 0 auto;
}

.na-logo-symbol::before {
  content: "";
  position: absolute;
  left: 7px;
  right: 7px;
  bottom: 7px;
  height: 32px;
  border-radius: 0 0 40px 40px;
  background:
    repeating-linear-gradient(163deg, transparent 0 9px, #fff 9px 13px),
    linear-gradient(135deg, #0c341c, #1f6b35);
  clip-path: polygon(0 12%, 100% 0, 100% 100%, 0 100%);
}

.na-logo-symbol::after {
  content: "";
  position: absolute;
  left: 7px;
  right: 7px;
  bottom: 0;
  height: 10px;
  background: #ffffff;
}

.na-brand-text strong {
  display: block;
  color: var(--na-verde-900);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 27px;
  line-height: 0.95;
  letter-spacing: -0.045em;
  font-weight: 800;
}

.na-brand-text span {
  display: block;
  margin-top: 6px;
  color: #687168;
  font-size: 9px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.na-nav-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
}

.na-primary-menu {
  display: flex;
  align-items: center;
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.na-primary-menu li {
  margin: 0;
  padding: 0;
}

.na-primary-menu a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  color: #121d14;
  font-size: 15px;
  font-weight: 700;
  transition: color 0.2s ease;
}

.na-primary-menu a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: transparent;
  transform: scaleX(0.4);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.na-primary-menu a:hover,
.na-primary-menu .current-menu-item > a,
.na-primary-menu .current_page_item > a {
  color: var(--na-verde-700);
}

.na-primary-menu a:hover::after,
.na-primary-menu .current-menu-item > a::after,
.na-primary-menu .current_page_item > a::after {
  opacity: 1;
  transform: scaleX(1);
  background: var(--na-laranja);
}

.na-search-btn,
.na-mobile-toggle {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--na-borda);
  border-radius: 11px;
  background: #ffffff;
  color: var(--na-verde-900);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.na-search-btn:hover,
.na-mobile-toggle:hover {
  background: var(--na-laranja);
  color: #ffffff;
  border-color: var(--na-laranja);
  transform: translateY(-2px);
}

.na-search-btn svg {
  width: 21px;
  height: 21px;
}

.na-mobile-toggle {
  display: none;
  font-size: 24px;
  line-height: 1;
}

.na-page-main {
  background: #ffffff;
}

.na-content-wrap {
  width: min(980px, calc(100% - 40px));
  margin: 0 auto;
  padding: 52px 0 70px;
}

.na-content-wrap h1,
.na-content-wrap h2,
.na-content-wrap h3 {
  color: var(--na-verde-900);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.15;
}

.na-content-wrap a {
  color: var(--na-verde-700);
  font-weight: 700;
}

.na-archive-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-top: 28px;
}

.na-archive-card {
  overflow: hidden;
  border: 1px solid var(--na-borda);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--na-sombra-leve);
}

.na-archive-card-image {
  display: block;
  height: 180px;
  background: var(--na-verde-100);
  overflow: hidden;
}

.na-archive-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.na-archive-card-body {
  padding: 20px;
}

.na-archive-card-body h2 {
  margin: 0 0 10px;
  font-size: 21px;
}

.na-post-meta {
  color: var(--na-muted);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
}

.na-site-footer {
  background: var(--na-verde-950);
  color: rgba(255, 255, 255, 0.82);
  padding: 42px 0 22px;
}

.na-footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(180px, 0.8fr) minmax(220px, 0.8fr);
  gap: 28px;
  align-items: start;
}

.na-footer-title {
  color: #ffffff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.na-footer-grid h3 {
  color: #ffffff;
  margin: 0 0 12px;
  font-size: 16px;
}

.na-footer-grid p {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
}

.na-footer-menu {
  margin: 0;
  padding: 0;
  list-style: none;
}

.na-footer-menu li + li {
  margin-top: 8px;
}

.na-footer-menu a:hover,
.na-footer-contact a:hover {
  color: var(--na-laranja);
}

.na-footer-bottom {
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
}

@media (max-width: 1120px) {
  .na-header-inner {
    align-items: flex-start;
  }

  .na-primary-menu {
    gap: 20px;
  }

  .na-archive-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .na-header-inner {
    align-items: center;
  }

  .na-mobile-toggle {
    display: grid;
  }

  .na-nav-wrap {
    gap: 10px;
  }

  .na-primary-menu {
    position: absolute;
    top: 100%;
    left: 20px;
    right: 20px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border: 1px solid var(--na-borda);
    border-radius: 15px;
    background: #ffffff;
    box-shadow: var(--na-sombra);
  }

  .na-primary-menu.is-open {
    display: flex;
  }

  .na-primary-menu a {
    min-height: 44px;
    padding: 0 12px;
    border-radius: 10px;
  }

  .na-primary-menu a:hover {
    background: var(--na-laranja-100);
  }

  .na-primary-menu a::after {
    display: none;
  }

  .na-brand-text strong {
    font-size: 27px;
  }

  .na-brand-text span {
    letter-spacing: 0.16em;
  }

  .na-footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .na-brand img.custom-logo {
    max-width: min(var(--na-logo-max-width, 175px), 150px) !important;
    max-height: min(var(--na-logo-max-height, 54px), 46px) !important;
  }

  .na-container,
  .na-content-wrap {
    width: min(100% - 24px, 1180px);
  }

  .na-site-header {
    padding: 18px 0 10px;
  }

  .na-brand {
    gap: 9px;
  }

  .na-logo-symbol {
    width: 50px;
    height: 50px;
  }

  .na-brand-text strong {
    font-size: 23px;
  }

  .na-brand-text span {
    font-size: 8px;
    letter-spacing: 0.12em;
  }

  .na-search-btn {
    display: none;
  }

  .na-archive-grid {
    grid-template-columns: 1fr;
  }
}
/* =========================================================
   Nordeste Agro — Lupa com caixa de pesquisa suspensa
   ========================================================= */

.na-header-search-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.na-header-search-dropdown .na-search-btn {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 14px;
    border: 1px solid rgba(15, 74, 26, 0.14);
    background: #ffffff;
    color: #0f4a1a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    box-shadow: 0 8px 22px rgba(15, 74, 26, 0.08);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.na-header-search-dropdown .na-search-btn svg {
    width: 20px;
    height: 20px;
    display: block;
}

.na-header-search-dropdown .na-search-btn:hover,
.na-header-search-dropdown.is-open .na-search-btn {
    background: #55c83b;
    color: #ffffff;
    border-color: #55c83b;
    transform: translateY(-1px);
}

.na-search-panel {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 360px;
    max-width: calc(100vw - 32px);
    padding: 14px;
    background: #ffffff;
    border: 1px solid rgba(15, 74, 26, 0.14);
    border-radius: 18px;
    box-shadow: 0 18px 42px rgba(15, 74, 26, 0.18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease;
}

.na-header-search-dropdown.is-open .na-search-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.na-search-panel::before {
    content: "";
    position: absolute;
    top: -7px;
    right: 16px;
    width: 14px;
    height: 14px;
    background: #ffffff;
    border-left: 1px solid rgba(15, 74, 26, 0.14);
    border-top: 1px solid rgba(15, 74, 26, 0.14);
    transform: rotate(45deg);
}

.na-search-form-panel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 2;
}

.na-search-input-panel {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    height: 44px;
    padding: 0 14px;
    border: 1px solid rgba(15, 74, 26, 0.16);
    border-radius: 14px;
    background: #faf9f6;
    color: #2f2a24;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.na-search-input-panel::placeholder {
    color: rgba(47, 42, 36, 0.58);
}

.na-search-input-panel:focus {
    border-color: #55c83b;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(85, 200, 59, 0.14);
}

.na-search-submit-panel {
    height: 44px;
    padding: 0 18px;
    border: none;
    border-radius: 14px;
    background: #0f4a1a;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease, transform 0.2s ease;
}

.na-search-submit-panel:hover {
    background: #55c83b;
    transform: translateY(-1px);
}

@media (max-width: 920px) {
    .na-header-search-dropdown {
        width: auto;
    }

    .na-search-panel {
        right: 0;
        width: 320px;
    }

    .na-search-form-panel {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .na-search-submit-panel {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .na-search-panel {
        position: fixed;
        top: 78px;
        left: 14px;
        right: 14px;
        width: auto;
        max-width: none;
    }

    .na-search-panel::before {
        display: none;
    }
}