/*
Theme Name: enjoy
Theme URI: https://example.com
Author: Carlos
Author URI: https://example.com
Description: Tema leve e rápido voltado ao Agro, com grid de posts em 3 colunas, sidebar e menu responsivo.
Version: 1.0
Text Domain: enjoy
*/

/* ===============================
   BASE RESET
================================*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
    background: #ffffff;
    color: #222;
    line-height: 1.6;
}

img {
    width: 100%;
    height: auto;
    display: block;
}

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

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===============================
   HEADER
================================*/
.header {
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo a {
    font-size: 24px;
    font-weight: 700;
    color: #2F9E44; /* Verde folha */
}

/* Menu Desktop */
.main-menu ul {
    display: flex;
    gap: 30px;
}

.main-menu li {
    list-style: none;
}

.main-menu a {
    font-size: 16px;
    padding: 4px 0;
    color: #222;
    transition: 0.2s;
}

.main-menu a:hover,
.main-menu .current-menu-item > a {
    color: #2F9E44;
}

/* ===============================
   MOBILE MENU
================================*/
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #222;
    border-radius: 3px;
}

/* menu que desliza da direita */
.mobile-menu {
    display: block;
    position: fixed;
    top: 70px;
    right: -100%;
    width: 70%;
    height: calc(100% - 70px);
    background: #fff;
    transition: right 0.3s ease;
    padding: 30px;
    z-index: 999;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
}

.mobile-menu.open {
    right: 0;
}

.mobile-menu ul {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mobile-menu a {
    font-size: 18px;
    color: #222;
}

/* ===============================
   LAYOUT PRINCIPAL
================================*/
.main-content {
    padding-top: 30px;
}

.content-area {
    display: flex;
    gap: 40px;
    margin-top: 20px;
    margin-bottom: 40px;
}

.posts-grid {
    flex: 3;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.sidebar {
    flex: 1;
}

/* ===============================
   POST CARDS
================================*/
.post-card {
    border-radius: 18px;
    overflow: hidden;
    position: relative;
    background: #000; /* fallback caso não tenha thumb */
}

.post-thumb {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    height: 330px;
    background: #333;
}

.post-thumb img {
    object-fit: cover;
    height: 100%;
    width: 100%;
    filter: brightness(0.85);
    transition: 0.3s;
}

.post-card:hover img {
    transform: scale(1.05);
}

/* Overlay do conteúdo sobre a imagem */
.overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 25px;
    width: 100%;
    color: #fff;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
}

.overlay h2 {
    font-size: 20px;
    line-height: 1.3;
    margin-bottom: 8px;
}

.overlay p {
    font-size: 14px;
    opacity: 0.9;
}

/* ===============================
   SIDEBAR
================================*/
.widget {
    background: #fafafa;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 12px;
    border: 1px solid #eee;
}

.widget-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    border-left: 4px solid #2F9E44;
    padding-left: 8px;
}

/* ===============================
   PAGINAÇÃO
================================*/
.pagination {
    text-align: center;
    margin: 0 0 40px;
}

.pagination a,
.pagination span {
    display: inline-block;
    margin: 5px;
    padding: 8px 14px;
    color: #2F9E44;
    border: 1px solid #2F9E44;
    border-radius: 6px;
    transition: 0.2s;
    font-size: 14px;
}

.pagination .current {
    background: #2F9E44;
    color: #fff;
}

.pagination a:hover {
    background: #2F9E44;
    color: #fff;
}

/* ===============================
   SINGLE / PÁGINAS
================================*/
.single-area {
    display: flex;
    gap: 40px;
    margin-top: 40px;
    margin-bottom: 40px;
}

.single-post {
    flex: 3;
}

.single-post h1 {
    font-size: 32px;
    margin-bottom: 20px;
}

.single-content {
    margin-top: 20px;
}

.page-content {
    margin: 40px 0;
}

/* ===============================
   FOOTER
================================*/
.footer {
    background: #f9f9f9;
    margin-top: 60px;
    padding: 60px 0;
    border-top: 1px solid #eee;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.footer-logo {
    font-size: 24px;
    font-weight: bold;
    color: #2F9E44;
    margin-bottom: 15px;
}

.footer-col h3 {
    margin-bottom: 15px;
    font-weight: 600;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col a:hover {
    color: #2F9E44;
}

.footer-col input[type="email"] {
    width: 100%;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #ddd;
    margin-bottom: 10px;
    font-size: 14px;
}

.btn-sub {
    background: #2F9E44;
    color: #fff;
    padding: 10px 18px;
    border-radius: 8px;
    margin-top: 4px;
    display: inline-block;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.copy {
    margin-top: 40px;
    text-align: center;
    font-size: 14px;
    opacity: 0.7;
}

/* ===============================
   MOBILE RESPONSIVE
================================*/
@media (max-width: 992px) {
    .content-area {
        flex-direction: column;
    }

    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .single-area {
        flex-direction: column;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .main-menu {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }

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




/* Espaçamento melhor entre títulos e parágrafos */
.single-content h1,
.single-content h2,
.single-content h3,
.single-content h4,
.single-content h5,
.single-content h6 {
    margin-top: 2.5rem;
    margin-bottom: 1.2rem;
}

.single-content p {
    margin-bottom: 1.8rem;
    line-height: 1.7;
}

/* Listas com recuo e visual melhor */
.single-content ul,
.single-content ol {
    margin: 1.6rem 0 1.6rem 1.6rem;
    padding-left: 0;
}

.single-content ul li,
.single-content ol li {
    margin-bottom: 0.9rem;
    padding-left: 0.9rem;
    position: relative;
}

.single-content ul li::before {
    /*content: "•";*/
    position: absolute;
    left: 0;
    color: #2F9E44;
    font-weight: bold;
}

/* Tabela padrão */
.single-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.95rem;
}

.single-content table th,
.single-content table td {
    border: 1px solid #ddd;
    padding: 10px 14px;
    text-align: left;
}

.single-content table th {
    background-color: #f3f9f4;
    font-weight: 600;
}

/* Imagens centralizadas */
.single-content img {
    display: block;
    margin: 0 auto 1.8rem auto;
    max-width: 100%;
    height: auto;
}



/* ===== MENU MOBILE MELHORADO ===== */

/* Fundo suave para o menu */
.mobile-menu {
    background: #f5f5f5;
    padding: 25px 20px;
    height: 100vh;
    overflow-y: auto;
}

/* Remove bullets e padrão do WP */
.mobile-menu ul {
    list-style: none !important;
    padding-left: 0 !important;
    margin: 0 !important;
}

/* Itens do menu */
.mobile-menu ul li {
    padding: 14px 5px;
    border-bottom: 1px solid #e1e1e1;
}

/* Último item sem borda */
.mobile-menu ul li:last-child {
    border-bottom: none;
}

/* Links */
.mobile-menu ul li a {
    font-size: 18px;
    color: #333;
    font-weight: 500;
    display: block;
    text-decoration: none;
}

/* Hover */
.mobile-menu ul li:hover {
    background: #eaeaea;
}

.mobile-menu ul li a:hover {
    color: #2F9E44;
}


/* ===========================
   MENU MOBILE RESPONSIVO REAL
   =========================== */

/* Oculta o menu mobile no desktop */
#mobile-menu {
  display: none;
}

/* Quando a tela for menor que 992px (tablets e celulares) */
@media screen and (max-width: 992px) {

  /* Esconde o menu principal e mostra o hambúrguer */
  .main-menu {
    display: none;
  }

  .hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 20px;
    cursor: pointer;
  }

  .hamburger span {
    display: block;
    height: 3px;
    background: #333;
    border-radius: 3px;
  }

  /* Exibe o menu mobile quando ativo */
  #mobile-menu.open {
    display: block;
    position: fixed;
    top: 0;
    right: 0;
    width: 80%;
    height: 100vh;
    background: #f5f5f5;
    padding: 25px 20px;
    box-shadow: -4px 0 10px rgba(0,0,0,0.15);
    z-index: 9999;
    overflow-y: auto;
    transition: right 0.3s ease;
  }

  /* Links do menu */
  #mobile-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  #mobile-menu li {
    border-bottom: 1px solid #ddd;
    padding: 14px 5px;
  }

  #mobile-menu a {
    display: block;
    font-size: 18px;
    color: #333;
    font-weight: 500;
    text-decoration: none;
  }

  #mobile-menu li:hover {
    background: #eaeaea;
  }

  #mobile-menu a:hover {
    color: #2F9E44;
  }
}

/* Desktop: garante que o menu mobile nunca apareça */
@media screen and (min-width: 993px) {
  #mobile-menu {
    display: none !important;
  }
}

/* === POSTS GRID - IMAGEM MAIS ALTA E FUNDO ESCURO ATRÁS DO TEXTO === */

.post-card {
  position: relative;
  overflow: hidden;
}

.post-thumb {
  position: relative;
  height: 380px; /* aumenta a altura da imagem e do card */
  overflow: hidden;
}

.post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Fundo preto transparente atrás do texto */
.post-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5); /* preto com 50% transparência */
  z-index: 1;
}

/* Conteúdo sobre a imagem */
.post-thumb .overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 25px 20px;
  color: #fff;
  z-index: 2; /* acima da camada preta */
  box-sizing: border-box;
}

.post-thumb .overlay h2 {
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.post-thumb .overlay p {
  font-size: 1rem;
  line-height: 1.5;
  margin: 0;
}

/* Ajustes para telas menores */
@media screen and (max-width: 768px) {
  .post-thumb {
    height: 300px;
  }
  .post-thumb .overlay {
    padding: 18px;
  }
  .post-thumb .overlay h2 {
    font-size: 1.2rem;
  }
}

/* ===== SIDEBAR - LISTA DE CATEGORIAS ===== */

.wp-block-categories-list,
.wp-block-categories {
  list-style: none;          /* remove os bullets */
  padding: 0;
  margin: 0;
  font-family: "Inter", Arial, sans-serif;
  border-bottom: 1px solid #eee;
  border-top:none;
  border-right:none;
  border-left:none;
  overflow: hidden;
}

.wp-block-categories-list li {
  border-bottom: 1px solid #eaeaea;   /* linha de separação */
  margin: 0;
  padding: 12px 14px;
  transition: background 0.2s ease;
}

.wp-block-categories-list li:last-child {
  border-bottom: none; /* remove a linha do último item */
}

.wp-block-categories-list li a {
  color: #333;
  font-size: 15px;
  text-decoration: none;
  text-transform: capitalize;
  display: block;
  font-weight: 500;
}

.wp-block-categories-list li:hover {
  background: #f9f9f9;  /* leve destaque no hover */
}

.wp-block-categories-list li a:hover {
  color: #2F9E44;        /* verde folha no hover */
}
