/*
Theme Name: LouvorLab Clear Lt 2.0
Theme URI: https://louvorlab.com
Author: Airazec Santos
Author URI: https://louvorlab.com
Description: Tema leve e otimizado para o blog LouvorLab. Desenvolvido para Gutenberg, SEO e Core Web Vitals.
Version: 2.0
Text Domain: louvorlab
*/

/* =========================
   RESET / BASE
========================= */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--wp--preset--color--background);
	color: var(--wp--preset--color--foreground);
	font-family: var(--wp--preset--font-family--inter);
}

a {
	color: var(--wp--preset--color--primary);
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
}

.container {
	max-width: 1200px;
	width: 100%;
	margin-inline: auto;
	padding-inline: 16px;
}

/* Acessibilidade */
.screen-reader-text {
	position: absolute !important;
	height: 1px;
	width: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 9999;
	background: #fff;
	color: #111;
	padding: 10px 14px;
	border-radius: 6px;
}

.skip-link:focus {
	left: 12px;
	top: 12px;
}

/* =========================
   BOTÕES
========================= */
.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.85rem 1.8rem;
	border-radius: 0.45rem;
	font-weight: 600;
	border: 1px solid transparent;
	/* Transition apenas em propriedades compostas — evita penalidade de CLS/reflow */
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
	cursor: pointer;
}

.button-primary {
	background: var(--wp--preset--color--accent);
	color: #fff;
}

.button-outline {
	border-color: rgba(255, 255, 255, 0.7);
	color: #fff;
}

.button-outline:hover {
	background: rgba(255, 255, 255, 0.15);
	text-decoration: none;
}

/* =========================
   HEADER
========================= */
.site-header {
	position: sticky;
	top: 0;
	z-index: 1000;
	background: rgba(255, 255, 255, 0.92);
	backdrop-filter: blur(12px);
	border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	min-height: 84px;
	width: 100%;
}

.site-header .brand {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	min-width: 0;
}

.site-header .custom-logo-link {
	display: inline-flex;
	align-items: center;
	line-height: 0;
}

.site-header .custom-logo {
	display: block;
	width: auto;
	height: auto;
	max-height: 48px;
}

/* Menu desktop */
.primary-menu {
	flex: 1 1 auto;
	min-width: 0;
}

.menu-list {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.menu-list a {
	font-weight: 600;
	color: rgba(10, 37, 64, 0.75);
	transition: color 0.2s ease;
}

.menu-list a:hover,
.menu-list .current-menu-item > a,
.menu-list .current_page_item > a {
	color: var(--wp--preset--color--primary);
	text-decoration: none;
}

.header-actions {
	flex: 0 0 auto;
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 0.8rem;
}

.header-cta {
	padding: 0.65rem 1.4rem;
	border-radius: 999px;
	background: var(--wp--preset--color--accent);
	color: #fff;
	font-weight: 600;
	white-space: nowrap;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.header-cta:hover {
	opacity: 0.92;
	text-decoration: none;
}

.search-toggle,
.menu-toggle {
	width: 44px;
	height: 44px;
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	cursor: pointer;
}

.search-toggle {
	border: 1px solid rgba(0, 0, 0, 0.12);
	color: rgba(10, 37, 64, 0.75);
}

.search-toggle:hover {
	color: var(--wp--preset--color--primary);
	border-color: rgba(10, 37, 64, 0.25);
}

.menu-toggle {
	display: none;
	flex-direction: column;
	gap: 0.35rem;
	border: 1px solid rgba(0, 0, 0, 0.1);
	background: transparent;
}

.menu-toggle .toggle-bar {
	width: 18px;
	height: 2px;
	background: rgba(0, 0, 0, 0.75);
	transition: transform 0.2s ease, opacity 0.2s ease;
}

body.is-menu-open .menu-toggle .toggle-bar:nth-child(1) {
	transform: translateY(6px) rotate(45deg);
}

body.is-menu-open .menu-toggle .toggle-bar:nth-child(2) {
	opacity: 0;
}

body.is-menu-open .menu-toggle .toggle-bar:nth-child(3) {
	transform: translateY(-6px) rotate(-45deg);
}

/* Busca expansível no header */
.header-search {
	display: none;
	background: rgba(12, 23, 38, 0.96);
	color: #fff;
	padding: 1.5rem 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.header-search .container {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.header-search input[type="search"] {
	flex: 1 1 320px;
	border-radius: 0.45rem;
	border: 1px solid rgba(255, 255, 255, 0.4);
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	padding: 0.85rem 1rem;
}

.header-search input::placeholder {
	color: rgba(255, 255, 255, 0.65);
}

body.is-search-open .header-search {
	display: block;
}

/* =========================
   HERO
========================= */
.hero {
	padding: 4rem 0 3rem;
	/* Gradiente base — a imagem de fundo vem via <img class="hero__image-bg"> no PHP */
	background: linear-gradient(135deg, rgba(10, 37, 64, 0.92), rgba(10, 37, 64, 0.72));
	background-color: var(--wp--preset--color--primary);
	color: #fff;
	margin-bottom: 3rem;
	position: relative;
	overflow: hidden;
}

/* Imagem de fundo do hero via <img> para permitir preload e fetchpriority */
.hero__image-bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	z-index: 0;
	pointer-events: none;
}

/* Overlay gradiente sobre a imagem */
.hero::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, rgba(10, 37, 64, 0.92), rgba(10, 37, 64, 0.72));
	z-index: 1;
}

.hero__content {
	position: relative;
	z-index: 2;
}

.hero__badge {
	display: inline-block;
	background: rgba(255, 255, 255, 0.15);
	padding: 0.35rem 0.75rem;
	border-radius: 999px;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin-bottom: 1rem;
}

.hero__title {
	font-size: clamp(2.1rem, 5vw, 3.2rem);
	margin: 0 0 1rem;
	line-height: 1.2;
}

.hero__subtitle {
	font-size: 1.1rem;
	max-width: 50ch;
	margin-bottom: 2rem;
}

.hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
}

.posts-hero {
	padding: 4rem 0 3rem;
	background: linear-gradient(135deg, rgba(10, 37, 64, 0.9), rgba(10, 37, 64, 0.7));
	color: #fff;
	margin-bottom: 2.5rem;
}

.posts-hero .container {
	max-width: 720px;
}

.archive-hero {
	background: linear-gradient(135deg, rgba(10, 37, 64, 0.88), rgba(10, 37, 64, 0.72));
}

.posts-search {
	margin-top: 2.5rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.posts-search input[type="search"] {
	flex: 1 1 300px;
	padding: 0.9rem 1rem;
	border-radius: 0.45rem;
	border: 1px solid rgba(255, 255, 255, 0.25);
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
}

.posts-search input::placeholder {
	color: rgba(255, 255, 255, 0.7);
}

.posts-search button {
	min-width: 160px;
}

/* =========================
   GRID / CARDS
========================= */
section {
	margin-bottom: 3.5rem;
}

.quick-links .grid,
.featured-posts .grid,
.category-highlight .grid {
	display: grid;
	gap: 1.8rem;
}

.grid--3 {
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid--4 {
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.card,
.card-post {
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.05);
	border-radius: 0.75rem;
	box-shadow: 0 1px 8px rgba(10, 37, 64, 0.04);
	transition: transform 0.2s ease;
}

.card {
	padding: 1.75rem;
}

.card:hover,
.card-post:hover {
	transform: translateY(-4px);
}

.card-post {
	padding: 0;
	display: flex;
	flex-direction: column;
}

.card-thumb img,
.card-thumb--placeholder {
	display: block;
	width: 100%;
	height: 200px;
	object-fit: cover;
	border-radius: 0.75rem 0.75rem 0 0;
}

.card-thumb--placeholder {
	background: var(--wp--preset--color--muted);
}

.card-body {
	padding: 1.3rem;
}

.card-category {
	display: inline-block;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--wp--preset--color--primary);
	margin-bottom: 0.75rem;
}

.card-title {
	font-size: 1.25rem;
	margin: 0 0 0.75rem;
}

.card-excerpt {
	color: rgba(0, 0, 0, 0.7);
	margin-bottom: 1.5rem;
}

.card-link,
.section-link {
	font-weight: 600;
	color: var(--wp--preset--color--accent);
}

.section-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 1.5rem;
}

/* =========================
   NEWSLETTER
========================= */
.newsletter {
	background: var(--wp--preset--color--muted);
	padding: 2.5rem 0;
}

.newsletter__box {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	padding: 2rem;
	border-radius: 0.75rem;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.05);
}

.newsletter__form {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.newsletter__form input[type="text"],
.newsletter__form input[type="email"] {
	padding: 0.85rem 1rem;
	border-radius: 0.75rem;
	border: 1px solid rgba(0, 0, 0, 0.1);
	min-width: 240px;
}

/* =========================
   LISTAGEM + PAGINAÇÃO
========================= */
.posts-grid .grid,
.posts-main .grid {
	margin-top: 2rem;
}

.post-list article {
	border-bottom: 1px solid rgba(0, 0, 0, 0.05);
	padding-bottom: 2.5rem;
	margin-bottom: 2.5rem;
}

.post-thumbnail img {
	border-radius: 0.75rem;
	margin-bottom: 1rem;
}

.entry-title {
	margin: 0 0 0.5rem;
}

.entry-meta {
	font-size: 0.9rem;
	color: rgba(0, 0, 0, 0.55);
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
}

.pagination ul {
	display: flex;
	gap: 0.5rem;
	list-style: none;
	padding: 0;
	justify-content: center;
	margin-top: 3rem;
}

.pagination a,
.pagination span {
	padding: 0.6rem 0.95rem;
	border-radius: 0.45rem;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.08);
	font-size: 0.9rem;
}

.pagination .current {
	background: var(--wp--preset--color--primary);
	color: #fff;
	border-color: var(--wp--preset--color--primary);
}

/* =========================
   LAYOUT POSTS + SIDEBAR
========================= */
.posts-layout__grid {
	display: grid;
	grid-template-columns: minmax(0, 2.3fr) minmax(240px, 1fr);
	gap: 2.5rem;
	padding-bottom: 4rem;
}

.posts-sidebar {
	display: flex;
	flex-direction: column;
	gap: 2.5rem;
	position: sticky;
	top: 110px;
	height: fit-content;
}

.sidebar-section h2 {
	font-size: 1.1rem;
	margin-bottom: 0.75rem;
}

.sidebar-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	gap: 0.65rem;
}

.sidebar-list a {
	color: rgba(0, 0, 0, 0.75);
	font-weight: 500;
}

.sidebar-list a:hover {
	color: var(--wp--preset--color--primary);
}

.sidebar-social {
	display: grid;
	gap: 0.6rem;
}

.sidebar-social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 0.45rem;
	border: 1px solid rgba(10, 37, 64, 0.1);
	padding: 0.55rem 0.9rem;
	font-weight: 600;
}

.sidebar-social a:hover {
	background: rgba(10, 37, 64, 0.07);
	text-decoration: none;
}

.sidebar-banner-item {
	background: rgba(0, 0, 0, 0.02);
	padding: 1.25rem;
	border-radius: 0.5rem;
}

.sidebar-banner {
	display: block;
	border-radius: 0.5rem;
	overflow: hidden;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.sidebar-banner:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sidebar-banner img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 0.65rem;
	border: 1px solid rgba(0, 0, 0, 0.08);
}

.sidebar-banner-item .button {
	width: 100%;
}

/* =========================
   SINGLE
========================= */
.single-layout {
	padding-top: 2rem;
}

.single-layout__grid {
	display: grid;
	grid-template-columns: minmax(0, 2.4fr) minmax(260px, 1fr);
	gap: 3rem;
	padding-bottom: 4rem;
}

.single-main {
	min-width: 0;
}

.single-main__article {
	min-width: 0;
}

.single-sidebar {
	position: sticky;
	top: 110px;
	height: fit-content;
}

.single-hero {
	position: relative;
	margin-bottom: 3rem;
	background: var(--wp--preset--color--primary, #0a2540);
	color: #fff;
	overflow: visible;
}

.single-hero__media {
	max-height: 420px;
	overflow: hidden;
}

.single-hero__image,
.single-hero__placeholder {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.single-hero__placeholder {
	background: linear-gradient(135deg, rgba(10, 37, 64, 0.88), rgba(10, 37, 64, 0.72));
	min-height: 280px;
}

.single-hero__content {
	padding: 2.5rem 0 2.8rem;
}

.single-hero__title {
	font-size: clamp(2.1rem, 4vw, 2.8rem);
	margin-bottom: 1rem;
	color: #fff;
	overflow-wrap: anywhere;
}

.single-hero__meta {
	color: rgba(255, 255, 255, 0.9);
}

.single-content-wrapper {
	display: grid;
	gap: 2.5rem;
}

/* =========================
   FIX DEFINITIVO - ALINHAMENTO E CORTE (SINGLE)
========================= */

/* Evita qualquer corte causado por wrappers */
body.single .single-post,
body.single .single-layout,
body.single .single-layout__grid,
body.single .single-main,
body.single .single-main__article,
body.single .single-content-wrapper,
body.single .single-content {
	min-width: 0;
}

/* Conteúdo principal */
.single-content {
	width: 100%;
	overflow-wrap: anywhere;
	word-break: normal;
}

/* Remove desalinhamento comum do Gutenberg dentro do single */
.single-content > * {
	max-width: 100% !important;
}

/* Alinhamento: conteúdo normal começa na mesma coluna visual do hero */
.single-content > *:not(.alignleft):not(.alignright):not(.alignfull):not(.alignwide) {
	margin-left: 0 !important;
	margin-right: 0 !important;
}

/* Mídia e blocos largos nunca “estouram” */
.single-content img,
.single-content iframe,
.single-content video,
.single-content canvas,
.single-content svg,
.single-content table,
.single-content pre,
.single-content figure {
	max-width: 100% !important;
	height: auto;
}

.single-content pre {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

/* Blocos full/wide não causam corte horizontal */
.single-content .alignwide,
.single-content .alignfull {
	max-width: 100% !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

/* Tabela com scroll horizontal seguro */
.single-content .wp-block-table {
	display: block;
	overflow-x: auto;
}

/* Se houver bloco de código grande */
.single-content .wp-block-code,
.single-content code {
	overflow-wrap: anywhere;
}

/* =========================
   ADS
========================= */
.ads-slot {
	border: 1px dashed rgba(10, 37, 64, 0.2);
	border-radius: 0.8rem;
	padding: 1.2rem;
	text-align: center;
	color: rgba(10, 37, 64, 0.55);
	font-size: 0.85rem;
	min-height: 280px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f4f7fa;
	overflow: hidden;
}

.ads-slot--inline {
	margin-block: 2rem;
}

.ads-slot--bottom {
	margin-top: 3rem;
}

/* =========================
   FOOTER
========================= */
.site-footer {
	background: #0c1726;
	color: rgba(255, 255, 255, 0.85);
	padding: 3rem 0 2.5rem;
	font-size: 0.95rem;
}

.site-footer a {
	color: rgba(255, 255, 255, 0.8);
}

.footer-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(220px, 1fr));
	gap: 2.5rem;
}

.footer-col h2,
.footer-title {
	font-size: 1.1rem;
	margin-bottom: 0.8rem;
	color: #fff;
}

.footer-text,
.site-footer .footer-description {
	color: rgba(255, 255, 255, 0.7);
	margin: 1rem 0;
	font-weight: 400;
}

.footer-social {
	display: flex;
	gap: 0.75rem;
}

.footer-social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
	font-size: 0.75rem;
	font-weight: 600;
}

.footer-menu,
.footer-column--privacy .footer-links {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.55rem;
}

.footer-column--privacy .footer-links li + li {
	margin-top: 8px;
}

.footer-newsletter .newsletter__form input[type="text"],
.footer-newsletter .newsletter__form input[type="email"] {
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.12);
	color: #fff;
	border-radius: 0.45rem;
	padding: 0.75rem 0.9rem;
	width: 100%;
	min-width: 0;
}

.footer-newsletter .newsletter__form input[type="text"]::placeholder,
.footer-newsletter .newsletter__form input[type="email"]::placeholder {
	color: rgba(255, 255, 255, 0.65);
}

.footer-newsletter button {
	margin-top: 0.75rem;
	width: 100%;
}

.footer-bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	margin-top: 3rem;
	padding: 1.5rem 0;
	font-size: 0.9rem;
	text-align: center;
	color: rgba(255, 255, 255, 0.65);
}

.footer-signature {
	margin: 0;
	color: #cfe0ff;
}

.footer-brand {
	font-weight: 800;
	letter-spacing: 0.2px;
}

.footer-brand-louvor {
	color: #fff;
}

.footer-brand-lab {
	color: #ff7a00;
}

/* =========================
   INSTITUCIONAL
========================= */
.institucional-page,
.institucional-single {
	padding: 40px 20px 70px;
}

.institucional-wrap {
	max-width: 1160px;
	margin: 0 auto;
}

.institucional-container {
	max-width: 980px;
	margin: 0 auto;
}

.institucional-header {
	margin-bottom: 28px;
}

.institucional-hero {
	margin-bottom: 18px;
}

.institucional-title {
	margin: 0 0 8px;
	font-size: 32px;
	line-height: 1.2;
}

.institucional-subtitle {
	margin: 0;
	opacity: 0.9;
}

.institucional-grid {
	display: grid;
	grid-template-columns: 280px 1fr;
	gap: 28px;
	align-items: start;
}

.institucional-nav {
	position: sticky;
	top: 100px;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 12px;
	padding: 14px;
}

.institucional-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.institucional-nav li + li {
	margin-top: 8px;
}

.institucional-nav a {
	font-weight: 600;
}

.institucional-content {
	min-width: 0;
}

.institucional-section,
.institucional-card {
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 14px;
	padding: 22px;
}

.institucional-card {
	padding: 24px;
}

.institucional-section {
	scroll-margin-top: 110px;
}

.institucional-section + .institucional-section {
	margin-top: 18px;
}

.institucional-section h2 {
	margin: 0 0 12px;
	font-size: 22px;
	line-height: 1.25;
}

.institucional-entry > :first-child,
.institucional-card > :first-child {
	margin-top: 0;
}

.institucional-entry > :last-child,
.institucional-card > :last-child {
	margin-bottom: 0;
}

.institucional-empty {
	margin: 0;
	opacity: 0.8;
}

/* =========================
   CATEGORIAS / ARQUIVOS
========================= */
.category-banner {
	position: relative;
	min-height: 400px;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 4rem;
}

.category-banner-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.7));
	display: flex;
	align-items: center;
	justify-content: center;
}

.category-banner-content {
	position: relative;
	z-index: 2;
	text-align: center;
	color: #fff;
	max-width: 800px;
	padding: 2rem;
}

.category-banner-title {
	font-size: 3rem;
	font-weight: 700;
	margin: 0 0 1rem;
	color: #fff;
	text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.category-banner-subtitle {
	font-size: 1.25rem;
	margin: 0 0 2rem;
	color: rgba(255, 255, 255, 0.95);
	line-height: 1.6;
}

.category-banner-button {
	display: inline-block;
	padding: 0.875rem 2rem;
	background-color: #ff6600;
	color: #fff;
	border-radius: 4px;
	font-weight: 600;
	transition: background-color 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
}

.category-banner-button:hover {
	background-color: #e55500;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(255, 102, 0, 0.4);
	text-decoration: none;
}

.category-hero.has-custom-banner {
	background-image: linear-gradient(135deg, rgba(10, 37, 64, 0.92), rgba(10, 37, 64, 0.72)), var(--category-banner-url);
	background-size: cover;
	background-position: center;
}

/* Compat legado (layout 2 colunas antigo) */
.content-with-sidebar {
	display: grid;
	grid-template-columns: 1fr 350px;
	gap: 3rem;
	margin-bottom: 3rem;
}

.posts-list {
	display: flex;
	flex-direction: column;
	gap: 2.5rem;
}

.post-item {
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
	transition: transform 0.3s ease, opacity 0.3s ease;
}

.post-item:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

/* =========================
   AJUSTES DE COR NO HERO
========================= */
.single-hero,
.single-hero__content {
	color: #fff;
}

.single-hero .breadcrumbs a {
	color: #fff;
	text-decoration: none;
}

.single-hero .breadcrumbs a:hover {
	color: #d6e9ff;
	text-decoration: underline;
}

.single-hero .breadcrumbs span[aria-hidden="true"] {
	color: rgba(255, 255, 255, 0.75);
}

/* Título hero sempre branco */
.single-hero .single-hero__title,
.single-hero h1,
.hero .hero__title,
.posts-hero h1,
.archive-hero h1 {
	color: #fff !important;
	-webkit-text-fill-color: #fff;
}

.single-hero .single-hero__meta,
.single-hero .breadcrumbs,
.single-hero .breadcrumbs a,
.hero .hero__subtitle {
	color: rgba(255, 255, 255, 0.95) !important;
}

/* MENU: item atual em laranja */
.menu-list .current-menu-item > a,
.menu-list .current_page_item > a,
.menu-list .current-menu-ancestor > a,
.menu-list .current-page-ancestor > a {
	color: var(--wp--preset--color--accent, #ff7a00) !important;
	text-decoration: none;
}

/* =========================
   RESPONSIVO
========================= */
@media (max-width: 1024px) {
	.posts-layout__grid,
	.single-layout__grid {
		grid-template-columns: 1fr;
	}

	.posts-sidebar,
	.single-sidebar {
		position: static;
	}

	.single-sidebar {
		order: 2;
	}

	body.single .single-layout__grid {
		grid-template-columns: minmax(0, 1fr) !important;
		align-items: flex-start;
	}

	body.single .single-main {
		order: 1;
		min-width: 0;
	}

	body.single .single-sidebar {
		order: 2 !important;
		position: static !important;
	}

	body.single .single-post,
	body.single .single-layout,
	body.single .single-layout__grid,
	body.single .single-main,
	body.single .single-content-wrapper,
	body.single .single-content {
		height: auto !important;
		min-height: 0 !important;
		max-height: none !important;
		overflow: visible !important;
	}
}

@media (max-width: 980px) {
	.institucional-grid {
		grid-template-columns: 1fr;
	}

	.institucional-nav {
		position: static;
	}
}

@media (max-width: 960px) {
	.site-header .custom-logo {
		max-height: 36px;
	}

	.menu-toggle {
		display: inline-flex;
		z-index: 1201;
	}

	.header-cta {
		display: none;
	}

	.primary-menu {
		position: fixed;
		inset: 0;
		z-index: 1200;
		display: flex;
		width: 100%;
		height: 100dvh;
		min-height: 100vh;

		background: rgba(12, 23, 38, 0.96);
		transform: translateY(-100%);
		opacity: 0;
		pointer-events: none;
		transition: transform 0.25s ease, opacity 0.25s ease;

		align-items: flex-start;
		justify-content: flex-start;
		padding:
			calc(env(safe-area-inset-top, 0px) + 88px)
			20px
			calc(env(safe-area-inset-bottom, 0px) + 24px);
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}

	body.is-menu-open {
		overflow: hidden;
	}

	body.is-menu-open .primary-menu {
		transform: translateY(0);
		opacity: 1;
		pointer-events: auto;
	}

	.menu-list {
		flex-direction: column;
		width: 100%;
		max-width: 560px;
		margin: 0 auto;
		align-items: flex-start;
		gap: 0.75rem;
	}

	.menu-list li {
		width: 100%;
	}

	.menu-list a {
		display: block;
		width: 100%;
		padding: 0.7rem 0;
		line-height: 1.35;
		font-size: 1.12rem;
		color: rgba(255, 255, 255, 0.9);
	}
}

@media (max-width: 768px) {
	.hero {
		text-align: left;
		background-position: center left;
	}

	.hero__actions {
		flex-direction: column;
		align-items: flex-start;
	}

	.newsletter__form {
		flex-direction: column;
		align-items: stretch;
	}

	.footer-grid {
		grid-template-columns: 1fr;
		gap: 1.8rem;
		text-align: left;
	}

	.institucional-title {
		font-size: 26px;
	}

	.institucional-card {
		padding: 18px;
	}

	.category-banner {
		min-height: 300px;
	}

	.category-banner-title {
		font-size: 2rem;
	}

	.category-banner-subtitle {
		font-size: 1rem;
	}

	.content-with-sidebar {
		grid-template-columns: 1fr;
	}

	/* SINGLE MOBILE - correção final */
	body.single {
		overflow-x: hidden;
	}

	body.single .single-layout {
		padding-top: 0 !important;
	}

	body.single .site-main,
	body.single .content-area {
		padding-top: 0 !important;
		margin-top: 0 !important;
	}

	body.single .single-layout__grid {
		grid-template-columns: 1fr !important;
		gap: 1.25rem !important;
	}

	body.single .single-post,
	body.single .single-hero,
	body.single .single-hero__content,
	body.single .single-content-wrapper,
	body.single .single-content,
	body.single #primary,
	body.single .site-main {
		height: auto !important;
		min-height: 0 !important;
		max-height: none !important;
		overflow: visible !important;
		transform: none !important;
		top: auto !important;
		inset: auto !important;
		margin-top: 0 !important;
		padding-top: 0 !important;
	}

	body.single .single-hero {
		margin-bottom: 1.25rem !important;
	}

	body.single .single-hero__media {
		max-height: none !important;
		height: auto !important;
		overflow: visible !important;
	}

	body.single .single-hero__image,
	body.single .single-hero__placeholder {
		display: block;
		width: 100%;
		height: auto !important;
		min-height: 0 !important;
		object-fit: cover;
	}

	/* mantém a caixa azul e conteúdo alinhados */
	body.single .single-hero__content.container,
	body.single .single-main__article > .container.single-content-wrapper {
		padding-inline: 16px !important;
	}

	body.single .single-hero__content {
		position: relative !important;
		padding: 1rem 0 1.25rem !important;
		text-align: left !important;
	}

	body.single .single-hero__title {
		font-size: clamp(1.8rem, 8.2vw, 2.3rem) !important;
		line-height: 1.15 !important;
		margin: 0 0 0.75rem !important;
		overflow-wrap: anywhere;
		word-break: normal;
		text-align: left !important;
	}

	body.single .single-hero__meta {
		font-size: 0.95rem;
		line-height: 1.35;
	}

	body.single .single-content-wrapper {
		gap: 1.5rem;
	}

	body.single .single-content > :first-child {
		margin-top: 0 !important;
	}

	/* segurança extra para conteúdo do post */
	body.single .single-content > * {
		max-width: 100% !important;
	}

	body.single .single-content img,
	body.single .single-content iframe,
	body.single .single-content video,
	body.single .single-content figure,
	body.single .single-content table,
	body.single .single-content pre {
		max-width: 100% !important;
		height: auto !important;
	}

	body.single .single-content pre {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	/* Sidebar - Banners Promocionais */
	.sidebar .banners-promocionais,
	.sidebar .widget_banners_promocionais,
	.sidebar .banner-grid {
		display: grid;
		grid-template-columns: 1fr;
		gap: 12px;
	}

	.sidebar .banners-promocionais a,
	.sidebar .widget_banners_promocionais a,
	.sidebar .banner-item {
		display: block;
		width: 100%;
		height: auto !important;
		min-height: 0 !important;
	}

	.sidebar .banners-promocionais img,
	.sidebar .widget_banners_promocionais img,
	.sidebar .banner-item img {
		display: block;
		width: 100%;
		max-width: 100%;
		height: auto !important;
		object-fit: contain !important;
	}
}

@media (max-width: 480px) {
	.category-banner-title {
		font-size: 1.75rem;
	}
}

/* =========================
   COMENTÁRIOS - ESTILO LOUVORLAB
========================= */

/* Container principal de comentários */
#comments,
.comments-area {
	margin-top: 4rem;
	padding-top: 3rem;
	border-top: 2px solid rgba(10, 37, 64, 0.1);
}

/* Título "Comentários" */
.comments-title,
#comments h2 {
	font-size: 1.5rem;
	font-weight: 700;
	color: #0a2540;
	margin-bottom: 2.5rem;
}

/* Lista de comentários */
.comment-list,
ol.commentlist {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	gap: 1.8rem;
}

/* Item individual de comentário */
.comment,
.comment-body,
.comment-item {
	background: #fff;
	border: 1px solid rgba(10, 37, 64, 0.08);
	border-radius: 0.75rem;
	padding: 1.5rem;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
	box-shadow: 0 1px 4px rgba(10, 37, 64, 0.04);
}

.comment:hover {
	border-color: rgba(10, 37, 64, 0.15);
	box-shadow: 0 4px 12px rgba(10, 37, 64, 0.08);
}

/* Comentário do autor do post (destaque) */
.comment.bypostauthor,
.comment-list li.bypostauthor {
	background: linear-gradient(135deg, rgba(10, 37, 64, 0.02), rgba(255, 122, 0, 0.03));
	border-color: rgba(255, 122, 0, 0.2);
}

.comment.bypostauthor::before {
	content: "Autor";
	display: inline-block;
	background: #ff7a00;
	color: #fff;
	font-size: 0.65rem;
	font-weight: 700;
	padding: 0.3rem 0.6rem;
	border-radius: 999px;
	margin-bottom: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

/* Avatar do comentarista */
.comment-author .avatar,
.avatar {
	display: block;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	object-fit: cover;
	margin-bottom: 0.75rem;
	border: 2px solid rgba(10, 37, 64, 0.1);
	transition: transform 0.2s ease;
}

.comment-author .avatar:hover {
	transform: scale(1.08);
}

/* Metadata do comentário (nome, data, hora) */
.comment-author,
.comment-meta {
	display: flex;
	align-items: flex-start;
	gap: 1rem;
	margin-bottom: 1rem;
}

.comment-author-name,
.comment-author cite {
	font-size: 1rem;
	font-weight: 700;
	color: #0a2540;
}

.comment-author a {
	color: var(--wp--preset--color--primary);
}

.comment-metadata,
.comment-meta-info {
	font-size: 0.85rem;
	color: rgba(10, 37, 64, 0.6);
}

.comment-metadata a,
.comment-meta-info a {
	color: rgba(10, 37, 64, 0.6);
	text-decoration: none;
	transition: color 0.2s ease;
}

.comment-metadata a:hover,
.comment-meta-info a:hover {
	color: var(--wp--preset--color--primary);
	text-decoration: underline;
}

/* Conteúdo do comentário */
.comment-content,
.comment-text {
	margin-top: 0.75rem;
	color: rgba(10, 37, 64, 0.8);
	line-height: 1.6;
}

.comment-content p {
	margin-bottom: 0.75rem;
}

.comment-content p:last-child {
	margin-bottom: 0;
}

/* Links dentro de comentários */
.comment-content a {
	color: var(--wp--preset--color--primary);
	font-weight: 500;
	text-decoration: none;
	border-bottom: 1px solid rgba(10, 37, 64, 0.2);
}

.comment-content a:hover {
	color: var(--wp--preset--color--accent);
	border-bottom-color: var(--wp--preset--color--accent);
}

/* Footer do comentário (Reply, Edit, etc.) */
.comment-footer-meta,
.comment-reply-link,
.edit-link,
.reply {
	margin-top: 1rem;
}

.reply a,
.comment-reply-link,
.edit-link a {
	display: inline-block;
	font-size: 0.85rem;
	font-weight: 600;
	color: #fff;
	background: var(--wp--preset--color--primary);
	padding: 0.5rem 1rem;
	border-radius: 0.4rem;
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.reply a:hover,
.comment-reply-link:hover,
.edit-link a:hover {
	background: var(--wp--preset--color--accent);
	text-decoration: none;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(10, 37, 64, 0.15);
}

/* Comentários aninhados (respostas) */
.children,
.comment-list ul {
	list-style: none;
	padding: 0;
	margin: 1.5rem 0 0 0;
	border-left: 3px solid rgba(10, 37, 64, 0.1);
	padding-left: 1.5rem;
	display: grid;
	gap: 1.5rem;
}

/* ===== FORMULÁRIO DE COMENTÁRIOS ===== */

/* Container do formulário */
#respond,
.comment-form-wrapper {
	background: #fff;
	border: 1px solid rgba(10, 37, 64, 0.08);
	border-radius: 0.75rem;
	padding: 2rem;
	margin-top: 3rem;
}

/* Título do formulário */
#reply-title,
.comment-form > h3 {
	font-size: 1.3rem;
	font-weight: 700;
	color: #0a2540;
	margin-bottom: 1.5rem;
}

/* Wrapper dos campos do formulário */
.comment-form-field,
.comment-form p {
	margin-bottom: 1.5rem;
}

.comment-form p:last-child {
	margin-bottom: 0;
}

/* Labels */
.comment-form label {
	display: block;
	font-size: 0.95rem;
	font-weight: 600;
	color: #0a2540;
	margin-bottom: 0.5rem;
}

.comment-form .required {
	color: #ff3333;
}

/* Inputs de texto (nome, email, website) */
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form input[type="number"] {
	width: 100%;
	padding: 0.85rem 1rem;
	border: 1px solid rgba(10, 37, 64, 0.15);
	border-radius: 0.5rem;
	font-size: 0.95rem;
	font-family: inherit;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
	background: #f8fafb;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form input[type="number"]:focus {
	outline: none;
	background: #fff;
	border-color: var(--wp--preset--color--primary);
	box-shadow: 0 0 0 3px rgba(10, 37, 64, 0.1);
}

/* Textarea para comentário */
.comment-form textarea {
	width: 100%;
	min-height: 160px;
	padding: 1rem;
	border: 1px solid rgba(10, 37, 64, 0.15);
	border-radius: 0.5rem;
	font-size: 0.95rem;
	font-family: inherit;
	resize: vertical;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
	background: #f8fafb;
}

.comment-form textarea:focus {
	outline: none;
	background: #fff;
	border-color: var(--wp--preset--color--primary);
	box-shadow: 0 0 0 3px rgba(10, 37, 64, 0.1);
}

/* Placeholder */
.comment-form input::placeholder,
.comment-form textarea::placeholder {
	color: rgba(10, 37, 64, 0.45);
}

/* Botão de envio */
.comment-form input[type="submit"],
.comment-form .form-submit button {
	display: inline-block;
	background: var(--wp--preset--color--accent);
	color: #fff;
	padding: 0.85rem 2.2rem;
	border: none;
	border-radius: 0.5rem;
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
	text-transform: none;
}

.comment-form input[type="submit"]:hover,
.comment-form .form-submit button:hover {
	background: #e55500;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(255, 122, 0, 0.3);
}

.comment-form input[type="submit"]:active {
	transform: translateY(0);
}

/* Aviso de login */
.comment-form-login,
.logged-in-as {
	background: rgba(10, 37, 64, 0.03);
	padding: 1rem;
	border-left: 3px solid var(--wp--preset--color--primary);
	border-radius: 0.4rem;
	margin-bottom: 1.5rem;
	font-size: 0.9rem;
	color: rgba(10, 37, 64, 0.75);
}

.comment-form-login a,
.logged-in-as a {
	color: var(--wp--preset--color--primary);
	font-weight: 600;
}

/* Aviso de que comentário aguarda moderação */
.comment-awaiting-moderation {
	background: #fff3cd;
	color: #856404;
	padding: 0.75rem 1rem;
	border-radius: 0.4rem;
	margin-top: 1rem;
	font-size: 0.85rem;
	border-left: 3px solid #ffc107;
}

/* Seção "Sem comentários" */
.no-comments {
	background: rgba(10, 37, 64, 0.03);
	padding: 2rem;
	text-align: center;
	border-radius: 0.75rem;
	color: rgba(10, 37, 64, 0.6);
}

.no-comments p {
	margin: 0;
}

/* Paginação de comentários */
.comment-navigation,
.comments-nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin: 2rem 0;
	padding: 1.5rem;
	background: rgba(10, 37, 64, 0.03);
	border-radius: 0.75rem;
}

.comment-navigation a,
.comments-nav a {
	display: inline-block;
	padding: 0.65rem 1.4rem;
	background: var(--wp--preset--color--primary);
	color: #fff;
	border-radius: 0.4rem;
	text-decoration: none;
	font-weight: 600;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.comment-navigation a:hover,
.comments-nav a:hover {
	background: var(--wp--preset--color--accent);
	transform: translateY(-2px);
}

/* =========================
   SINGLE - COMENTÁRIOS OTIMIZADO
========================= */

/* Remove título "Comentários" do WordPress */
body.single .single-comments-title,
body.single #comments .comments-title,
body.single h2.comments-title,
body.single .comments-area .comments-title {
	display: none !important;
}

/* Aproxima comentários do conteúdo (reduz espaçamento) */
body.single .single-comments-title + .comments-area,
body.single .comments-area {
	margin-top: 1.25rem !important; /* Era 4rem, agora 1.25rem */
	padding-top: 0 !important; /* Remove padding top */
	border-top: none !important; /* Remove linha divisória */
}

/* Título do formulário fica como "Deixe um comentário" */
body.single #reply-title,
body.single .comment-reply-title {
	font-size: clamp(1.2rem, 2.1vw, 1.5rem) !important;
	font-weight: 700;
	color: var(--wp--preset--color--primary, #0a2540);
	margin-bottom: 1.2rem !important;
}

/* Container do formulário mais integrado */
body.single #respond,
body.single .comment-form-wrapper {
	background: #fff;
	border: 1px solid rgba(10, 37, 64, 0.08);
	border-radius: 12px;
	padding: 1.5rem;
	margin-top: 1.75rem;
	box-shadow: 0 2px 12px rgba(10, 37, 64, 0.06);
}

/* Mobile: ainda mais próximo */
@media (max-width: 768px) {
	body.single .comments-area {
		margin-top: 0.75rem !important;
	}
	
	body.single #respond {
		padding: 1.25rem;
		margin-top: 1.25rem;
		border-radius: 10px;
	}
}