/*
Theme Name: Site Instituto Theme
Theme URI: https://example.com/
Author: Darven
Description: Tema WordPress convertido a partir do esboço estático. Conteúdos, imagens e menu editáveis via Admin.
Version: 1.0
Text Domain: site-instituto
*/

/* --- ESTILOS GERAIS --- */
body {
	background-color: #f2f2eb;
	color: #2d4a36;
	overflow-x: hidden;
	font-family: Inter, Arial, Helvetica, sans-serif;
}

/* --- PRELOADER --- */
#preloader {
	position: fixed;
	inset: 0;
	background-color: #f2f2eb;
	z-index: 9999;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	transition: opacity 1s ease, visibility 1s;
}
.pulse-logo { animation: pulse 2s infinite; }
@keyframes pulse { 0% { opacity: 0.5; transform: scale(0.95); } 50% { opacity: 1; transform: scale(1); } 100% { opacity: 0.5; transform: scale(0.95); } }
.loaded #preloader { opacity: 0; visibility: hidden; }

/* --- MENU MOBILE --- */
#mobile-menu-overlay {
	position: fixed;
	inset: 0;
	background-color: rgba(45, 74, 54, 0.4);
	z-index: 60;
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease;
	backdrop-filter: blur(4px);
}
#mobile-menu-overlay.open { opacity: 1; visibility: visible; }
#mobile-drawer {
	position: fixed;
	top: 0; right: 0; bottom: 0;
	width: 100%; max-width: 400px;
	background-color: #f2f2eb;
	z-index: 70;
	transform: translateX(100%);
	transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
	box-shadow: -10px 0 30px rgba(0,0,0,0.1);
	display: flex; flex-direction: column; padding: 2rem;
}
#mobile-drawer.open { transform: translateX(0); }

/* --- DIVISORES --- */
.section-divider {
	display: flex; justify-content: center; align-items: center;
	padding: 4rem 0; position: relative;
}
.section-divider::before, .section-divider::after {
	content: ''; height: 60px; width: 1px;
	background: rgba(45, 74, 54, 0.2);
	position: absolute; left: 50%; transform: translateX(-50%);
}
.section-divider::before { top: 0; }
.section-divider::after { bottom: 0; }
.divider-icon { background: #f2f2eb; z-index: 10; padding: 10px; }

/* --- TIPOGRAFIA --- */
.heading-hero {
	font-size: clamp(2.5rem, 5vw, 4.5rem);
	font-weight: 800;
	letter-spacing: -0.05em;
	line-height: 1.1;
}
.section-label {
	font-size: 0.75rem; font-weight: 800; text-transform: uppercase;
	letter-spacing: 0.3em; text-align: center; display: block;
	margin-bottom: 2rem; opacity: 0.7;
}

/* --- ANIMAÇÕES --- */
.reveal-up {
	opacity: 0; transform: translateY(40px);
	transition: all 1s cubic-bezier(0.2, 1, 0.3, 1);
}
.reveal-up.active { opacity: 1; transform: translateY(0); }

/* --- NAVEGAÇÃO DESKTOP --- */
.desktop-nav {
    display: none;
}
@media (min-width: 768px) {
    .desktop-nav { display: flex; align-items: center; }
}
.desktop-nav .nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0.75rem 2rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 9999px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.desktop-nav .nav-menu li { list-style: none; }
.desktop-nav .nav-menu li a {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #2d4a36;
    text-decoration: none;
    transition: color 0.2s;
    white-space: nowrap;
}
.desktop-nav .nav-menu li a:hover,
.desktop-nav .nav-menu li.current-menu-item > a,
.desktop-nav .nav-menu li.current_page_item > a { color: #84cc16; }

/* --- NAVBAR SCROLL STATE --- */
.navbar-scrolled {
    background: rgba(242, 242, 235, 0.95) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

/* --- MOBILE DRAWER STRUCTURE --- */
.mobile-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}
.mobile-menu-label {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    opacity: 0.5;
    color: #2d4a36;
}
#mobile-close {
    padding: 0.5rem;
    border-radius: 9999px;
    cursor: pointer;
    background: none;
    border: none;
    color: #2d4a36;
    line-height: 0;
    transition: background 0.2s;
}
#mobile-close:hover { background: rgba(45, 74, 54, 0.1); }

/* --- MOBILE NAV LINKS --- */
.mobile-nav { flex: 1; }
.mobile-nav .mobile-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}
.mobile-nav .mobile-menu li { border-bottom: 1px solid rgba(45, 74, 54, 0.1); }
.mobile-nav .mobile-menu li a {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d4a36;
    text-decoration: none;
    padding: 0.75rem 0;
    transition: color 0.2s;
}
.mobile-nav .mobile-menu li a:hover { color: #84cc16; }

/* --- MOBILE DRAWER FOOTER --- */
.mobile-drawer-footer { margin-top: auto; padding-top: 2rem; }
.mobile-cta-btn {
    display: block;
    width: 100%;
    background: #2d4a36;
    color: #f2f2eb;
    text-align: center;
    padding: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.75rem;
    text-decoration: none;
    transition: background 0.2s;
    border-radius: 2px;
}
.mobile-cta-btn:hover { background: #1c1917; color: #f2f2eb; }
.mobile-copyright {
    font-size: 10px;
    text-align: center;
    margin-top: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    opacity: 0.4;
    color: #2d4a36;
}

/* --- MAIN CONTENT --- */
/* Páginas internas: padding-top para compensar a navbar fixa */
.site-main {
    padding-top: 6rem;
}
/* A homepage tem o seu próprio pt-32 na hero section */
.site-main:has(> #main) { padding-top: 0; }

/* --- FOOTER --- */
.footer-grid-border {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 3rem;
}
.footer-link {
    color: #f2f2eb;
    text-decoration: none;
    transition: color 0.2s;
}
.footer-link:hover { color: #84cc16; }
.footer-copy {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    opacity: 0.3;
    color: #f2f2eb;
}

/* --- RESET PARA MENUS WP --- */
#navbar ul, #mobile-drawer ul { list-style: none; padding: 0; margin: 0; }

/* --- PÁGINAS INTERNAS (index, page, single) --- */
.site-main .entry-title a { color: #2d4a36; text-decoration: none; }
.site-main .entry-title a:hover { color: #84cc16; }

/* ============================================================
   BLOG
   ============================================================ */
.blog-card-image { background: rgba(45,74,54,0.06); }
.blog-placeholder-img { display: flex; align-items: center; justify-content: center; }
.blog-meta { color: #84cc16; }
.blog-title-link { color: #2d4a36; text-decoration: none; transition: color 0.2s; }
.blog-title-link:hover { color: #84cc16; }
.blog-excerpt { color: rgba(45,74,54,0.7); }
.blog-read-more {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #2d4a36;
    text-decoration: none;
    border-bottom: 1px solid rgba(45,74,54,0.3);
    padding-bottom: 2px;
    transition: color 0.2s, border-color 0.2s;
}
.blog-read-more:hover { color: #84cc16; border-color: #84cc16; }

/* Paginação do blog */
.nav-links { display: flex; justify-content: center; gap: 0.5rem; flex-wrap: wrap; }
.nav-links a, .nav-links span.current {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 2.5rem; height: 2.5rem; padding: 0 0.5rem;
    font-size: 0.875rem; font-weight: 600;
    color: #2d4a36; border: 1px solid rgba(45,74,54,0.2);
    text-decoration: none; transition: all 0.2s;
}
.nav-links a:hover { background: #2d4a36; color: #f2f2eb; border-color: #2d4a36; }
.nav-links span.current { background: #2d4a36; color: #f2f2eb; border-color: #2d4a36; }

/* Post individual */
.post-hero-image img { width: 100%; height: 100%; object-fit: cover; }

.entry-content { color: rgba(45,74,54,0.85); line-height: 1.85; font-size: 1.0625rem; }
.entry-content h2, .entry-content h3, .entry-content h4 {
    color: #2d4a36; font-weight: 700; margin-top: 2.5rem; margin-bottom: 0.75rem;
}
.entry-content p { margin-bottom: 1.5rem; }
.entry-content a { color: #2d4a36; border-bottom: 1px solid #84cc16; text-decoration: none; transition: color 0.2s; }
.entry-content a:hover { color: #84cc16; }
.entry-content img { border-radius: 2px; max-width: 100%; height: auto; }
.entry-content ul, .entry-content ol { padding-left: 1.5rem; margin-bottom: 1.5rem; }
.entry-content li { margin-bottom: 0.5rem; }
.entry-content blockquote {
    border-left: 4px solid #84cc16;
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: rgba(45,74,54,0.7);
    background: rgba(132,204,22,0.05);
}
.entry-content pre, .entry-content code {
    background: rgba(45,74,54,0.06);
    border-radius: 2px;
    font-size: 0.9em;
}
.entry-content pre { padding: 1.5rem; overflow-x: auto; }
.entry-content code { padding: 0.1em 0.4em; }

.post-tag {
    font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.1em; background: rgba(45,74,54,0.08); color: #2d4a36;
    padding: 0.35rem 0.75rem; text-decoration: none; transition: background 0.2s;
    border-radius: 2px;
}
.post-tag:hover { background: #84cc16; color: #2d4a36; }

.post-nav-link a {
    font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.05em; color: #2d4a36; text-decoration: none;
    transition: color 0.2s; opacity: 0.7;
}
.post-nav-link a:hover { color: #84cc16; opacity: 1; }

/* ============================================================
   WOOCOMMERCE
   ============================================================ */

/* Grelha de produtos */
.woo-products-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.5rem !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
@media (min-width: 768px) {
    .woo-products-grid { grid-template-columns: repeat(4, 1fr) !important; }
}

/* Cartão de produto */
.woo-product-card { list-style: none !important; }
.woo-product-thumb {
    filter: grayscale(100%);
    transition: filter 0.5s;
    width: 100%; height: 100%; object-fit: cover;
}
.woo-product-card:hover .woo-product-thumb { filter: grayscale(0%); }

.woo-product-card .price { color: #84cc16 !important; font-weight: 700 !important; font-size: 0.9rem !important; display: block !important; }
.woo-product-card .price del { color: rgba(45,74,54,0.4) !important; }
.woo-product-card .onsale {
    background: #84cc16 !important; color: #2d4a36 !important;
    font-weight: 700 !important; font-size: 0.65rem !important;
    position: absolute !important; top: 0.5rem !important; left: 0.5rem !important;
    z-index: 10 !important; padding: 0.25rem 0.6rem !important; border-radius: 2px !important;
    text-transform: uppercase !important; letter-spacing: 0.05em !important;
}

/* Botão adicionar ao carrinho na grelha */
.woo-product-card .button,
.woo-product-card a.add_to_cart_button {
    display: block !important;
    width: 100% !important;
    background: #2d4a36 !important;
    color: #f2f2eb !important;
    text-align: center !important;
    padding: 0.65rem 1rem !important;
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    text-decoration: none !important;
    transition: background 0.2s !important;
    border: none !important;
    cursor: pointer !important;
    border-radius: 2px !important;
}
.woo-product-card .button:hover,
.woo-product-card a.add_to_cart_button:hover { background: #1c1917 !important; color: #f2f2eb !important; }
.woo-product-card .added_to_cart { display: none !important; }

/* Cabeçalho da página da loja */
.woocommerce-products-header { text-align: center; margin-bottom: 2.5rem; }
.woocommerce-products-header__title, .woocommerce-page h1.page-title {
    font-size: 2.5rem; font-weight: 800; color: #2d4a36; letter-spacing: -0.05em;
    text-align: center; margin-bottom: 2rem;
}

/* Breadcrumb */
.woocommerce-breadcrumb {
    font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em;
    opacity: 0.55; margin-bottom: 2rem; text-align: center;
}
.woocommerce-breadcrumb a { color: #2d4a36; text-decoration: none; }

/* Contagem de resultados e ordenação */
.woocommerce-result-count { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; opacity: 0.6; }
.woocommerce-ordering select {
    border: 1px solid rgba(45,74,54,0.2); background: white;
    color: #2d4a36; padding: 0.5rem 1rem; font-size: 0.75rem; font-weight: 600;
    border-radius: 2px;
}

/* Produto individual */
.woocommerce div.product .product_title {
    font-size: 2rem; font-weight: 800; color: #2d4a36; letter-spacing: -0.03em; margin-bottom: 0.5rem;
}
.woocommerce div.product p.price,
.woocommerce div.product span.price { color: #84cc16 !important; font-size: 1.5rem !important; font-weight: 700 !important; }
.woocommerce div.product .woocommerce-product-details__short-description { color: rgba(45,74,54,0.7); line-height: 1.7; margin-bottom: 1.5rem; }

/* Todos os botões WooCommerce */
.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce #payment #place_order,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
    background-color: #2d4a36 !important;
    color: #f2f2eb !important;
    border-radius: 2px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    font-size: 0.75rem !important;
    padding: 1rem 2rem !important;
    transition: background 0.2s !important;
    border: none !important;
}
.woocommerce #respond input#submit:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover { background-color: #1c1917 !important; color: #f2f2eb !important; }

/* Tabela do carrinho */
.woocommerce table.shop_table { border-collapse: collapse; width: 100%; }
.woocommerce table.shop_table th {
    color: #2d4a36; font-weight: 700; font-size: 0.75rem;
    text-transform: uppercase; letter-spacing: 0.1em;
    border-bottom: 2px solid rgba(45,74,54,0.1); padding: 1rem 0.75rem;
}
.woocommerce table.shop_table td { padding: 1rem 0.75rem; border-bottom: 1px solid rgba(45,74,54,0.06); }

/* Campos de formulário WooCommerce */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea {
    border: 1px solid rgba(45,74,54,0.2);
    border-radius: 2px; color: #2d4a36;
    padding: 0.75rem 1rem; width: 100%;
    transition: border-color 0.2s;
}
.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus { border-color: #84cc16; outline: none; }

/* Notificações WooCommerce */
.woocommerce-message { border-top-color: #84cc16 !important; }
.woocommerce-info { border-top-color: #2d4a36 !important; }
.woocommerce-error { border-top-color: #dc2626 !important; }
.woocommerce-message::before, .woocommerce-info::before { color: #84cc16 !important; }
