/*
Theme Name: Site Instituto Theme
Theme URI: https://marapara.org/
Author: Darven & Tiago
Description: Tema WordPress convertido a partir do esboço estático. Conteúdos, imagens e menu editáveis via Admin.
Version: 0.1.0-alpha
Text Domain: site-instituto
*/

/* --- ESTILOS GERAIS --- */
body {
	background-color: #f2f2eb;
	color: #2d4a36;
	overflow-x: hidden;
	font-family: Inter, Arial, Helvetica, sans-serif;
}

body::before,
body::after {
	content: '';
	position: fixed;
	top: 0;
	bottom: 0;
	width: 280px;
	background-image: url('assets/images/thybackground.jpeg');
	background-size: auto 100%;
	background-repeat: no-repeat;
	z-index: -1;
	pointer-events: none;
}
body::before {
	left: 0;
	background-position: left center;
}
body::after {
	right: 0;
	background-position: right center;
}


/* --- 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); } }
body.loaded #preloader { opacity: 0; visibility: hidden; }

/* --- MENU MOBILE E DRAWERS --- */
.overlay-bg {
	position: fixed; inset: 0; background-color: rgba(28, 25, 23, 0.6); z-index: 60;
	opacity: 0; visibility: hidden; transition: all 0.3s ease; backdrop-filter: blur(4px);
}
.overlay-bg.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 E ANIMAÇÕES --- */
.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; }

.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 WP_NAV_MENU --- */
.navbar-scrolled {
    background: rgba(28, 25, 23, 0.95) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(12px);
}

/* Espaçamento main content */
.site-main { padding-top: 6rem; }
.site-main:has(> #main) { padding-top: 0; }

/* ============================================================
   BLOG E POSTS
   ============================================================ */
.blog-meta { color: #4CAF50; }
.blog-title-link { color: #2d4a36; text-decoration: none; transition: color 0.2s; }
.blog-title-link:hover { color: #4CAF50; }
.blog-read-more:hover { color: #4CAF50; border-color: #4CAF50; }

.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, .nav-links span.current { background: #2d4a36; color: #f2f2eb; border-color: #2d4a36; }

.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 #4CAF50; text-decoration: none; transition: color 0.2s; }
.entry-content a:hover { color: #4CAF50; }
.entry-content blockquote {
    border-left: 4px solid #4CAF50; padding: 1rem 1.5rem; margin: 2rem 0; font-style: italic; color: rgba(45,74,54,0.7);
    background: rgba(76,175,80,0.05);
}
.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: #4CAF50; color: white; }
.post-nav-link a:hover { color: #4CAF50; opacity: 1; }

/* ============================================================
   WOOCOMMERCE
   ============================================================ */
.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; } }

.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: #4CAF50 !important; font-weight: 700 !important; font-size: 0.9rem !important; display: block !important; }
.woo-product-card .onsale {
    background: #4CAF50 !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;
}

.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; }

.woocommerce div.product p.price, .woocommerce div.product span.price { color: #4CAF50 !important; font-size: 1.5rem !important; font-weight: 700 !important; }

.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; }

.woocommerce form .form-row input.input-text:focus, .woocommerce form .form-row textarea:focus { border-color: #4CAF50; outline: none; }
.woocommerce-message { border-top-color: #4CAF50 !important; }
.woocommerce-message::before, .woocommerce-info::before { color: #4CAF50 !important; }

/* ============================================================
   TIPOGRAFIA – CLASSES GLOBAIS
   ============================================================ */
.heading-hero {
	font-size: clamp(2rem, 4vw, 3.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;
}

/* ============================================================
   STAT CARDS (Aldeias / Diagnóstico Territorial)
   ============================================================ */
.stat-card {
	background: #ffffff;
	padding: 1.5rem;
	border-bottom: 3px solid #4CAF50;
	text-align: center;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.stat-card .stat-number {
	font-size: 2rem;
	font-weight: 800;
	color: #2d4a36;
	line-height: 1;
}
.stat-card .stat-label {
	font-size: 0.65rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.15em;
	color: rgba(45, 74, 54, 0.6);
	margin-top: 0.5rem;
}

/* ============================================================
   FORMULÁRIO DE CONTATO
   ============================================================ */
.form-input {
	width: 100%;
	padding: 1rem;
	background-color: #ffffff;
	border: 1px solid rgba(45, 74, 54, 0.2);
	border-radius: 4px;
	color: #1c1917;
	font-size: 0.875rem;
	font-family: Inter, Arial, Helvetica, sans-serif;
	transition: all 0.3s ease;
}
.form-input:focus {
	outline: none;
	border-color: #4CAF50;
	box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

/* Divisor sobre fundo escuro */
.divider-icon-dark { background: #2d4a36; z-index: 10; padding: 10px; }

/* ============================================================
   LOJA WOOCOMMERCE – PAGINAÇÃO E RESULTADOS
   ============================================================ */
.woocommerce-result-count { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(45,74,54,0.5); }
.woocommerce-ordering { display: none !important; }
.woocommerce nav.woocommerce-pagination ul { display: flex; justify-content: center; gap: 0.5rem; flex-wrap: wrap; list-style: none; padding: 2rem 0; }
.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li 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;
}
.woocommerce nav.woocommerce-pagination ul li a:hover,
.woocommerce nav.woocommerce-pagination ul li span.current { background: #2d4a36; color: #f2f2eb; border-color: #2d4a36; }

/* ====== DESLIGAR FUNDO LATERAL (body::before/after) EM PÁGINAS COM HERO ====== */
.page-template-page-sobrenos::before,
.page-template-page-sobrenos::after,
.page-template-page-aldeias::before,
.page-template-page-aldeias::after,
body.archive::before,
body.archive::after,
body.home::before,
body.home::after {
  display: none !important;
}

/* ====== HERO CINEMÁTICO (VINHETA) ====== */
.page-hero {
  position: relative;
  background: #000;
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55); /* escurecimento geral */
  z-index: 1;
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right,
    rgba(0,0,0,0.65),
    rgba(0,0,0,0.05),
    rgba(0,0,0,0.65)
  );
  z-index: 2;
}

/* garante que a imagem fique atrás das camadas */
.page-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Fundo suave só nas aldeias */
.single-aldeia {
  background: linear-gradient(to bottom, rgba(45,74,54,0.03), transparent 40%);
}


body.single-aldeia::before,
body.single-aldeia::after {
  display: none !important;
}

