/*
Theme Name: Dhay
Theme URI: https://pingosde leite.com.br
Author: W3D
Author URI: https://w3d.com.br
Description: Tema WordPress para o Portal Pingos de Leite - portal de agronegócio do Nordeste com foco na cadeia produtiva do leite em Pernambuco.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: betania
Tags: news, agriculture, custom-post-types, bootstrap
*/

/* ============ VARIÁVEIS ============ */
:root {
    --verde-agro: #0060b7;
    --verde-claro: #3385c9;
    --verde-hover: #004d94;
    --amarelo-trigo: #D4A84B;
    --amarelo-claro: #F5E6C8;
    --marrom-terra: #5D4E37;
    --cinza-fundo: #F8F9FA;
    --cinza-texto: #495057;
    --branco: #FFFFFF;
    --borda-sutil: #E9ECEF;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--cinza-texto);
    background-color: var(--cinza-fundo);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Bitter', serif;
    font-weight: 600;
    color: var(--marrom-terra);
}

a { text-decoration: none; color: inherit; transition: color 0.2s ease; }
a:hover { color: var(--verde-agro); }

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

/* ============ TOP BAR ============ */
.top-bar { background-color: var(--verde-agro); padding: 8px 0; font-size: 13px; border-bottom: none; }
.top-bar a { color: rgba(255,255,255,0.85); }
.top-bar a:hover { color: var(--amarelo-trigo); }
.top-bar .social-icons a { margin-left: 12px; font-size: 14px; }

/* ============ HEADER ============ */
.header-main { background: var(--branco); padding: 25px 0; border-bottom: 1px solid var(--verde-agro); }
.logo-container img { max-height: 101px; width: auto; }
.header-tagline { font-size: 14px; font-style: italic; color: #6c757d; }
.header-search { max-width: 320px; }
.header-search .form-control { border-radius: 24px 0 0 24px; border: 1px solid var(--borda-sutil); font-size: 14px; padding: 11px 20px; }
.header-search .btn { border-radius: 0 24px 24px 0; background: var(--verde-agro); border: none; color: white; padding: 11px 20px; }
.header-search .btn:hover { background: var(--verde-hover); }

/* ============ NAVEGAÇÃO ============ */
.navbar-main { background: var(--branco); border-bottom: 1px solid var(--borda-sutil); padding: 0; }
.navbar-main .nav-link { color: var(--marrom-terra); font-weight: 500; padding: 14px 16px; font-size: 14px; text-transform: uppercase; letter-spacing: 0.3px; border-bottom: 3px solid transparent; transition: all 0.2s ease; }
.navbar-main .nav-link:hover, .navbar-main .nav-link.active { color: var(--verde-agro); background: rgba(0,96,183,0.05); }
.navbar-main .nav-link i { margin-right: 6px; font-size: 12px; }
.dropdown-menu { border: none; box-shadow: 0 4px 20px rgba(0,0,0,0.12); border-radius: 8px; padding: 10px 0; }
@media (min-width: 1200px) {
    .navbar-main .dropdown:hover > .dropdown-menu { display: block; margin-top: 0; animation: ddFadeIn .15s ease; }
}
@keyframes ddFadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.dropdown-item { padding: 8px 20px; font-size: 14px; }
.dropdown-item:hover { background: var(--amarelo-claro); color: var(--verde-agro); }

/* ============ TICKER DE PREÇOS ============ */
.price-ticker { background: #d4a84b; padding: 10px 0; overflow: hidden; }
.ticker-label { background: var(--amarelo-trigo); color: var(--marrom-terra); padding: 6px 15px; font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; border-radius: 3px; white-space: nowrap; }
.ticker-wrapper { overflow: hidden; flex: 1; }
.ticker-content { display: flex; animation: ticker 40s linear infinite; white-space: nowrap; }
.ticker-content:hover { animation-play-state: paused; }
@keyframes ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.ticker-item { display: inline-flex; align-items: center; padding: 0 25px; color: white; font-size: 13px; }
.ticker-item strong { margin-right: 8px; color: var(--amarelo-claro); }
.ticker-item .price-up { color: #5d4e37; }
.ticker-item .price-down { color: #2e7d32; }
.ticker-item .divider { width: 4px; height: 4px; background: #5d4e37; border-radius: 50%; margin-left: 25px; }

/* ============ DESTAQUE PRINCIPAL ============ */
.section-main { padding: 40px 0; }
.featured-card { position: relative; border-radius: 6px; overflow: hidden; background: var(--branco); box-shadow: 0 2px 15px rgba(0,0,0,0.08); }
.featured-card img { width: 100%; height: auto; aspect-ratio: 9 / 5; object-fit: cover; object-position: center; }
.featured-card .overlay { position: absolute; bottom: 0; left: 0; right: 0; padding: 30px; background: linear-gradient(transparent, rgba(0,0,0,0.85)); color: white; }
.featured-card .category-badge { display: inline-block; background: var(--amarelo-trigo); color: var(--marrom-terra); padding: 5px 12px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; border-radius: 3px; margin-bottom: 12px; }
.featured-card h2 { color: white; font-size: 1.6rem; line-height: 1.3; margin-bottom: 10px; }
.featured-card .meta { font-size: 13px; opacity: 0.8; }

/* ============ CARDS DE NOTÍCIAS ============ */
.news-card { background: var(--branco); border-radius: 6px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.06); transition: transform 0.2s ease, box-shadow 0.2s ease; height: 100%; }
.news-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.1); }
.news-card img { width: 100%; height: 160px; object-fit: cover; }
.news-card .card-body { padding: 18px; }
.news-card .category-badge { display: inline-block; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; padding: 4px 10px; border-radius: 3px; margin-bottom: 10px; }
.news-card .category-badge.mercado { background: #E3F2FD; color: #1565C0; }
.news-card .category-badge.leite { background: #FFF8E1; color: #F57F17; }
.news-card .category-badge.radar { background: #F3E5F5; color: #7B1FA2; }
.news-card .category-badge.pecuaria { background: #FFEBEE; color: #C62828; }
.news-card .category-badge.lavouras { background: #E8F5E9; color: #2E7D32; }
.news-card .category-badge.vozes { background: #FBE9E7; color: #D84315; }
.news-card .category-badge.territorio { background: #E0F2F1; color: #00695C; }
.news-card .category-badge.territorio-nome { background: transparent; color: #00695C; border: 1px solid #00695C; text-decoration: none; }
.news-card .category-badge.opiniao { background: #EDE7F6; color: #4527A0; }
.news-card h5 { font-size: 1rem; line-height: 1.4; margin-bottom: 8px; }
.news-card .meta { font-size: 12px; color: #999; }

/* ============ LISTA COMPACTA ============ */
.news-list-item { display: flex; gap: 15px; padding: 15px 0; border-bottom: 1px solid var(--borda-sutil); }
.news-list-item:last-child { border-bottom: none; }
.news-list-item img { width: 100px; height: 70px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.news-list-item h6 { font-size: 14px; line-height: 1.4; margin-bottom: 5px; }
.news-list-item .meta { font-size: 11px; color: #999; }

/* ============ SEÇÕES ============ */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 25px; margin-top: 15px; padding-bottom: 12px; border-bottom: 1px solid var(--verde-agro); }
.section-header h3 { font-size: 1.3rem; margin: 0; display: flex; align-items: center; gap: 10px; }
.section-header h3 i { color: var(--verde-agro); font-size: 1.1rem; }
.section-header .ver-mais { font-size: 13px; color: var(--verde-agro); font-weight: 500; }
.section-header .ver-mais:hover { text-decoration: underline; }

/* ============ BOLETIM DESTAQUE ============ */
.boletim-destaque { background: var(--branco); border-radius: 6px; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,0.12); }
.boletim-header { background: var(--verde-agro); color: white; padding: 16px 24px; font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 10px; }
.boletim-header i { color: var(--amarelo-trigo); font-size: 18px; }
.boletim-destaque .carousel-item img { width: 100%; height: auto; object-fit: unset; }
.boletim-destaque-main .carousel-item img { width: 100%; height: auto; object-fit: unset; }
.boletim-destaque .carousel-control-prev, .boletim-destaque .carousel-control-next { width: 32px; height: 32px; background: var(--verde-agro); border-radius: 4px; top: 12px; bottom: auto; transform: none; opacity: 1; }
.boletim-destaque .carousel-control-prev { left: auto; right: 52px; }
.boletim-destaque .carousel-control-next { right: 12px; }
.boletim-destaque .carousel-control-prev:hover, .boletim-destaque .carousel-control-next:hover { background: var(--verde-hover); }
.boletim-destaque .carousel-control-prev-icon, .boletim-destaque .carousel-control-next-icon { width: 12px; height: 12px; }
.boletim-destaque .carousel-indicators { margin-bottom: 10px; }
.boletim-destaque .carousel-indicators button { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.5); border: none; }
.boletim-destaque .carousel-indicators button.active { background: var(--amarelo-trigo); }

/* ============ SIDEBAR ============ */
.sidebar-widget { background: var(--branco); border-radius: 6px; padding: 20px; margin-bottom: 25px; box-shadow: 0 2px 10px rgba(0,0,0,0.06); }
.patrocinador-widget { padding: 0; overflow: hidden; }
.patrocinador-label { background: var(--cinza-fundo); color: var(--cinza-texto); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; padding: 8px 15px; text-align: center; border-bottom: 1px solid var(--borda-sutil); }
.patrocinador-link { display: block; }
.patrocinador-link img { width: 100%; height: auto; display: block; transition: opacity 0.2s ease; }
.patrocinador-link:hover img { opacity: 0.9; }
.sidebar-widget h4 { font-size: 1rem; margin-bottom: 18px; padding-bottom: 10px; border-bottom: 2px solid var(--verde-agro); display: flex; align-items: center; gap: 8px; }
.sidebar-widget h4 i { color: var(--verde-agro); }

/* Widget Preços */
.price-widget-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px dashed var(--borda-sutil); }
.price-widget-item:last-child { border-bottom: none; }
.price-widget-item .label { font-size: 13px; font-weight: 500; }
.price-widget-item .value { font-weight: 600; font-size: 14px; }
.price-widget-item .value.up { color: #2E7D32; }
.price-widget-item .value.down { color: #C62828; }

/* Widget Newsletter */
.newsletter-widget { background: linear-gradient(135deg, var(--verde-agro) 0%, var(--verde-claro) 100%); color: white; }
.newsletter-widget h4 { color: white; border-bottom-color: var(--amarelo-trigo); }
.newsletter-widget h4 i { color: var(--amarelo-trigo); }
.newsletter-widget p { font-size: 14px; margin-bottom: 15px; opacity: 0.9; }
.newsletter-widget .form-control { border: none; border-radius: 6px; padding: 12px 15px; font-size: 14px; }
.newsletter-widget .btn { background: var(--amarelo-trigo); color: var(--marrom-terra); border: none; font-weight: 600; padding: 12px 20px; border-radius: 6px; width: 100%; margin-top: 10px; }
.newsletter-widget .btn:hover { background: #C49940; }

/* ============ NEWSLETTER ============ */
.section-newsletter { background: var(--verde-agro); padding: 55px 0; margin-bottom: 0; }
.newsletter-inner i.far { font-size: 44px; color: rgba(255,255,255,0.75); display: block; margin-bottom: 12px; }
.newsletter-inner h2 { color: white; font-size: 1.7rem; margin-bottom: 8px; }
.newsletter-inner p { color: rgba(255,255,255,0.85); font-size: 15px; margin-bottom: 28px; }
.newsletter-form { display: flex; flex-wrap: wrap; gap: 10px; max-width: 640px; margin: 0 auto; }
.newsletter-form input { flex: 1 1 180px; padding: 12px 16px; border: 1px solid rgba(255,255,255,0.35); border-radius: 4px; background: rgba(255,255,255,0.15); color: white; font-size: 14px; outline: none; }
.newsletter-form input::placeholder { color: rgba(255,255,255,0.7); }
.newsletter-form input:focus { background: rgba(255,255,255,0.25); border-color: rgba(255,255,255,0.7); }
.newsletter-form button { padding: 12px 30px; background: var(--amarelo-trigo); color: var(--marrom-terra); border: none; border-radius: 4px; font-weight: 700; font-size: 14px; cursor: pointer; transition: background .2s; }
.newsletter-form button:hover { background: #c49a3a; }

/* ============ SEÇÃO LEITE EM FOCO ============ */
.section-leite { background: var(--amarelo-claro); padding: 40px 0; margin: 30px 0; }
.section-leite .section-header { border-bottom-color: var(--amarelo-trigo); }
.section-leite .section-header h3 i { color: var(--amarelo-trigo); }

/* ============ SEÇÃO PINGOS DE OPINIÃO ============ */
.section-opiniao { background: var(--amarelo-claro); padding: 40px 0; margin: 30px 0; }
.section-opiniao .section-header { border-bottom-color: var(--amarelo-trigo); }
.section-opiniao .section-header h3 i { color: var(--amarelo-trigo); }

/* ============ TERRITÓRIOS ============ */
.territorio-card { background: var(--branco); border-radius: 6px; padding: 20px; text-align: center; transition: all 0.2s ease; box-shadow: 0 2px 10px rgba(0,0,0,0.06); }
.territorio-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.1); }
.territorio-card i { font-size: 2rem; color: var(--verde-agro); margin-bottom: 12px; }
.territorio-card h5 { font-size: 0.95rem; margin-bottom: 5px; }
.territorio-card span { font-size: 12px; color: #999; }
.territorio-card-recente { font-size: 11px; color: #555; line-height: 1.35; margin-top: 8px; margin-bottom: 0; text-align: left; border-top: 1px solid rgba(0,0,0,0.07); padding-top: 7px; }

/* ============ CARD DE BOLETIM (arquivo) ============ */
.boletim-card { background: var(--branco); border-radius: 6px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.06); transition: box-shadow 0.2s ease; }
.boletim-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.12); }
.boletim-card a { text-decoration: none; color: inherit; }
.boletim-card-img { width: 100%; height: auto; display: block; }
.boletim-card-title { padding: 14px 16px; font-family: 'Bitter', serif; font-weight: 600; font-size: 1rem; color: var(--marrom-terra); line-height: 1.4; }
.boletim-card:hover .boletim-card-title { color: var(--verde-agro); }

/* ============ BANNERS ============ */
.banner-patrocinador { background: var(--branco); border-radius: 6px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.06); margin-bottom: 25px; text-align: center; }
.banner-patrocinador .banner-label { background: var(--cinza-fundo); color: #999; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; padding: 5px 0; text-align: center; }
.banner-patrocinador a { display: block; }
.banner-patrocinador img { width: 100%; height: auto; display: block; }
.banner-patrocinador-wide { height: 200px; background: linear-gradient(135deg, #e8e8e8 0%, #f5f5f5 100%); display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; font-weight: 500; }
.banner-patrocinador-square { width: 100%; padding: 80px 0; background: linear-gradient(135deg, #e8e8e8 0%, #f5f5f5 100%); display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; font-weight: 500; }

/* ============ SINGLE POST ============ */
.single-post-header { padding: 40px 0 20px; }
.single-post-header h1 { font-size: 2rem; line-height: 1.3; margin-bottom: 15px; }
.post-meta-bar { font-size: 13px; color: #999; padding: 15px 0; border-top: 1px solid var(--borda-sutil); border-bottom: 1px solid var(--borda-sutil); margin-bottom: 30px; }
.post-meta-bar a { color: var(--verde-agro); }
.post-content { font-size: 17px; line-height: 1.8; }
.post-content p { margin-bottom: 1.5rem; }
.post-content h2, .post-content h3 { margin: 2rem 0 1rem; }
.post-content img { border-radius: 6px; margin: 1.5rem 0; }
.post-thumbnail-header { width: 100%; max-height: 500px; object-fit: cover; border-radius: 6px; margin-bottom: 30px; }

/* ============ ARCHIVE ============ */
.archive-header { padding: 30px 0; border-bottom: 3px solid var(--verde-agro); margin-bottom: 30px; }
.archive-header h1 { font-size: 1.8rem; }

/* ============ PAGINAÇÃO ============ */
.pagination-wrapper { padding: 30px 0; }
.page-numbers { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 6px; border: 1px solid var(--borda-sutil); color: var(--cinza-texto); font-size: 14px; margin: 0 3px; transition: all 0.2s ease; }
.page-numbers:hover, .page-numbers.current { background: var(--verde-agro); color: white; border-color: var(--verde-agro); }

/* ============ FOOTER ============ */
.footer { background: #0060b7; color: rgba(255,255,255,0.8); padding: 50px 0 25px; margin-top: 0; border-top: 1px solid rgba(255,255,255,0.3); }
.footer h5 { color: var(--amarelo-trigo); font-size: 1rem; margin-bottom: 20px; }
.footer ul { list-style: none; padding: 0; }
.footer ul li { margin-bottom: 10px; }
.footer ul li a { color: rgba(255,255,255,0.7); font-size: 14px; transition: all 0.2s ease; }
.footer ul li a:hover { color: var(--amarelo-trigo); padding-left: 5px; }
.footer-logo { max-width: 180px; margin-bottom: 15px; }
.footer-about p { font-size: 14px; line-height: 1.7; }
.footer-social a { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; background: rgba(255,255,255,0.1); border-radius: 50%; color: white; margin-right: 10px; transition: all 0.2s ease; }
.footer-social a:hover { background: var(--amarelo-trigo); color: var(--marrom-terra); }
.footer-bottom { background: var(--marrom-terra); padding: 18px 0; font-size: 13px; color: rgba(255,255,255,0.9); }

/* ============ BOTÃO VOLTAR AO TOPO ============ */
#btn-topo { position: fixed; bottom: 30px; right: 30px; width: 48px; height: 48px; background: var(--verde-agro); color: white; border: 2px solid rgba(255,255,255,0.25); border-radius: 50%; font-size: 17px; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(0,0,0,0.25); opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .3s, transform .3s, visibility .3s, background .2s; z-index: 1050; }
#btn-topo.visivel { opacity: 1; visibility: visible; transform: translateY(0); }
#btn-topo:hover { background: var(--verde-hover); }
@media (max-width: 767px) { #btn-topo { width: 38px; height: 38px; bottom: 18px; right: 18px; font-size: 14px; } }

/* ============ UTILITÁRIOS ============ */
.bg-white { background: var(--branco); }
.rounded-lg { border-radius: 6px; }
.shadow-sm-custom { box-shadow: 0 2px 10px rgba(0,0,0,0.06); }

/* ============ RESPONSIVO ============ */
/* Menu em telas intermediárias (xl expandido): reduz padding e esconde ícones */
@media (min-width: 1200px) and (max-width: 1399px) {
    .navbar-main .nav-link { padding: 12px 9px; font-size: 12px; letter-spacing: 0; }
    .navbar-main .nav-link i { display: none; }
}

@media (max-width: 1199px) {
    /* Menu colapsado (hamburger): espaçamento vertical confortável */
    .navbar-main .nav-link { padding: 10px 15px; }
    .featured-card h2 { font-size: 1.3rem; }
}

@media (max-width: 767px) {
    .top-bar { display: none; }
    .header-main { padding: 10px 0; }
    .logo-container img { max-height: 50px; }
    .price-ticker { display: none; }
    .section-leite { padding: 25px 0; }
    .footer { padding: 35px 0 20px; }
    .single-post-header h1 { font-size: 1.5rem; }
}
