/**
 * Header e menu principal – estilo PT (barra vermelha, mega menu, logos)
 *
 * @package PT2026
 */

/* --- Header branco --- */
.pt2026-header-white {
	border-bottom: 1px solid #E4DED2;
	background-color: #ffffff;
	padding-top: 0.5rem;
	padding-bottom: 0.5rem;
	min-height: 90px;
	position: sticky;
	top: 0;
	z-index: 1030;
}

/* Single da categoria Artigos: header com fundo bege, exceto quando mega menu estiver aberto. */
body.pt2026-single-artigos-bg .pt2026-header-white {
	background-color: #F5F3EB;
}

body.pt2026-single-artigos-bg .pt2026-header-white.pt2026-mega-open {
	background-color: #ffffff;
}

.pt2026-header-white .container-fluid {
	max-width: 100%;
	padding-left: 1rem;
	padding-right: 1rem;
}

/* --- Logos à esquerda --- */
.pt2026-logo-pt {
	height: 66px;
	width: 66px;
	display: block;
}

.pt2026-logo-defende {
	height: 38px;
	width: 151px;
	display: block;
}

@media (min-width: 992px) {
	.pt2026-logo-pt {
		height: 66px;
		width: 66px;
	}
	.pt2026-logo-defende {
		height: 38px;
		width: 151px;
	}
}

.pt2026-search-toggle {
	margin-right: 4px !important;
	color: #202020 !important;
}

.site-header .site-branding a:focus,
.site-header .site-branding a:focus-visible {
	outline: none;
	box-shadow: none;
}

/* --- Itens do menu principal --- */
.pt2026-header-white .pt2026-main-menu .nav-link {
	font-family: var(--pt2026-font-body);
	font-size: 14px;
	font-weight: 400;
	color: #202020;
	background-color: transparent;
	outline: none;
	box-shadow: none;
}

@media (min-width: 992px) {
	.pt2026-header-white .pt2026-main-menu > .current-menu-item > .nav-link,
	.pt2026-header-white .pt2026-main-menu > .current-menu-parent > .nav-link,
	.pt2026-header-white .pt2026-main-menu > .current-menu-ancestor > .nav-link,
	.pt2026-header-white .pt2026-main-menu > .current_page_item > .nav-link,
	.pt2026-header-white .pt2026-main-menu > .current_page_parent > .nav-link,
	.pt2026-header-white .pt2026-main-menu > .current_page_ancestor > .nav-link {
		font-weight: 700;
	}
}

@media (min-width: 992px) {
	.pt2026-header-white .pt2026-main-menu > .nav-item > .nav-link:hover,
	.pt2026-header-white .pt2026-main-menu > .nav-item > .nav-link:focus-visible {
		color: #E4142C;
		background-color: transparent;
		outline: none;
		box-shadow: none;
	}
}

#pt2026-menu-noticias:focus,
#pt2026-menu-diretrizes:focus,
#pt2026-menu-conheca:focus,
#pt2026-menu-comunidade:focus,
#pt2026-menu-noticias:focus-visible,
#pt2026-menu-diretrizes:focus-visible,
#pt2026-menu-conheca:focus-visible,
#pt2026-menu-comunidade:focus-visible {
	outline: none;
	box-shadow: none;
}

/* Menus com dropdown: alterna chevron por aria-expanded sem JS extra. */
#pt2026-menu-noticias,
#pt2026-menu-diretrizes,
#pt2026-menu-conheca,
#pt2026-menu-comunidade {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

#pt2026-menu-noticias .pt2026-menu-noticias-chevron,
#pt2026-menu-diretrizes .pt2026-menu-noticias-chevron,
#pt2026-menu-conheca .pt2026-menu-noticias-chevron,
#pt2026-menu-comunidade .pt2026-menu-noticias-chevron {
	font-size: 12px;
	line-height: 1;
}

#pt2026-menu-noticias .pt2026-menu-noticias-chevron-up,
#pt2026-menu-diretrizes .pt2026-menu-noticias-chevron-up,
#pt2026-menu-conheca .pt2026-menu-noticias-chevron-up,
#pt2026-menu-comunidade .pt2026-menu-noticias-chevron-up {
	display: none;
}

#pt2026-menu-noticias[aria-expanded="true"] .pt2026-menu-noticias-chevron-down,
#pt2026-menu-diretrizes[aria-expanded="true"] .pt2026-menu-noticias-chevron-down,
#pt2026-menu-conheca[aria-expanded="true"] .pt2026-menu-noticias-chevron-down,
#pt2026-menu-comunidade[aria-expanded="true"] .pt2026-menu-noticias-chevron-down {
	display: none;
}

#pt2026-menu-noticias[aria-expanded="true"] .pt2026-menu-noticias-chevron-up,
#pt2026-menu-diretrizes[aria-expanded="true"] .pt2026-menu-noticias-chevron-up,
#pt2026-menu-conheca[aria-expanded="true"] .pt2026-menu-noticias-chevron-up,
#pt2026-menu-comunidade[aria-expanded="true"] .pt2026-menu-noticias-chevron-up {
	display: inline-block;
}

.pt2026-header-white .pt2026-main-menu .nav-item + .nav-item {
	margin-left: 4px;
}

/* Corrige display herdado de .main-navigation ul { display:none } do style.css */
.pt2026-header-white .pt2026-main-menu {
	display: flex;
}

/* --- Botões Área PT e Filie-se (QA 2.1:20px laterais, 12px topo/base no desktop) --- */
.pt2026-btn-nav {
	font-size: 0.8rem;
	padding: 0.35rem 0.9rem;
}

/* Variáveis --bs-btn-padding-* alinham com o componente .btn do Bootstrap (QA 2.1). */
.pt2026-header-white .btn-danger {
	font-family: var(--pt2026-font-body);
	font-size: 14px;
	font-weight: 700;
	text-transform: uppercase;
	border-width: 1px;
	--bs-btn-padding-y: 12px;
	--bs-btn-padding-x: 20px;
	padding: 12px 20px;
}

/* --- Toggler mobile --- */
.pt2026-navbar-toggler {
	border-color: rgba(0, 0, 0, 0.2);
}

.pt2026-navbar-toggler .navbar-toggler-icon {
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0, 0, 0, 0.85)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* --- Mega dropdown branco --- */
.pt2026-header-white .pt2026-mega {
	position: static;
}

.pt2026-header-white .pt2026-mega-panel {
	border-radius: 0;
	border: none;
	background-color: #ffffff;
	color: #111;
	margin-top: 0;
	padding: 1.30rem 0 2rem;
	width: 100%;
	left: 0;
	right: 0;
	z-index: 1031;
}

@media (min-width: 992px) {
	/* Mantem o painel montado para permitir transicao de opacidade no .show. */
	.pt2026-header-white .dropdown-menu.pt2026-mega-panel {
		position: absolute;
		inset: 100% 0 auto 0 !important;
		top: 100% !important;
		left: 0 !important;
		right: 0 !important;
		margin-top: 0 !important;
		display: block;
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
		transform: none !important;
		/* Fade-out um pouco mais longo para suavizar a troca entre megamenus. */
		transition: opacity 0.32s ease, visibility 0s linear 0.32s;
	}

	.pt2026-header-white .dropdown-menu.pt2026-mega-panel.show {
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
		/* Fade-in prioriza abertura rapida do menu que entra. */
		transition: opacity 0.2s ease, visibility 0s linear 0s;
	}
}

.pt2026-mega-container {
	margin-left: auto;
	margin-right: auto;
}

.pt2026-mega-title {
	font-family: var(--pt2026-font-display-ultra-cond);
	color: #E4142C;
	font-size: 80px;
	font-weight: 900;
	text-transform: uppercase;
	margin-bottom: 1.5rem;
}

.pt2026-mega-left {
	position: relative;
	z-index: 2;
}

.pt2026-mega-menu {
	margin: 0;
	padding: 0;
	position: relative;
	z-index: 2;
	/* Sobrescreve .main-navigation ul { display:none } */
	display: block !important;
}

.pt2026-mega-menu li {
	margin-bottom: 0.4rem;
}

/* Icones 16x16 para itens do menu de Diretrizes. */
.pt2026-mega-menu a .pt2026-menu-diretrizes-item-icon {
	width: 16px;
	height: 16px;
	min-width: 16px;
	margin-right: 6px;
	vertical-align: middle;
	position: relative;
	top: -2px;
}

.pt2026-mega-menu a .pt2026-menu-diretrizes-item-text {
	display: inline;
}

.pt2026-mega-menu .sub-menu {
	margin: 0;
	padding-left: 0;
}

.pt2026-mega-menu a {
	font-family: var(--pt2026-font-body);
	color: #202020;
	font-size: 20px;
	font-weight: 600;
	text-decoration: none;
}

/* Menu Noticias: ponto 13x13 com cor da categoria. */
#pt2026-menu-noticias-dropdown > li > a.pt2026-menu-subitem-with-dot,
#pt2026-menu-noticias-dropdown .sub-menu > li > a.pt2026-menu-subitem-with-dot {
	display: inline-flex;
	align-items: center;
	gap: 10px;
}

#pt2026-menu-noticias-dropdown > li > a.pt2026-menu-subitem-with-dot::before,
#pt2026-menu-noticias-dropdown .sub-menu > li > a.pt2026-menu-subitem-with-dot::before {
	content: "";
	width: 13px;
	height: 13px;
	border-radius: 50%;
	flex: 0 0 13px;
	background-color: var(--pt2026-menu-dot-color, #E4142C);
}

.pt2026-mega-left ul li a {
	text-decoration: none !important;
}

.pt2026-mega-left ul li a:hover {
	color: #E4DED2 !important;
}

/* Versão em duas colunas (usado em Notícias) */
.pt2026-mega-menu-cols-2 {
	column-count: 2;
	column-gap: 2.5rem;
}

.pt2026-mega-menu-cols-2 > li {
	break-inside: avoid;
}

.pt2026-mega-menu a:hover,
.pt2026-mega-menu a:focus {
	color: #c41e3a;
	text-decoration: underline;
}

.pt2026-mega-right {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 1.5rem;
}

.pt2026-mega-social {
	padding-right: 4px !important;
}

.pt2026-mega-social-label {
	font-family: var(--pt2026-font-body);
    font-size: 12px;
    font-weight: 700;
    color: #202020;
    text-transform: uppercase;
}

.pt2026-mega-social-icon {
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background-color: #E4142C;
	color: #fff;
	font-size: 0.9rem;
	text-decoration: none;
	border: 0;
}

.pt2026-mega-social-icon i {
	color: #fff;
}

.pt2026-mega-social-icon:hover {
	background-color: #a01830;
	color: #fff;
}

.pt2026-mega-highlight {
	width: 100%;
	max-width: 420px;
	min-height: 160px;
	border-radius: 12px;
	border: 1px solid #E4DED2;
	background-color: #fff;
}

.pt2026-mega-highlight .home-campaigns-btn {
	max-width: 130px !important;
	margin: 0 auto;
}

@media (max-width: 991.98px) {
	.pt2026-mega-right {
		align-items: flex-start;
	}
	.pt2026-mega-highlight {
		max-width: none;
		width: 100%;
	}
}

/* --- Backdrop escuro para mega menu aberto --- */
.pt2026-menu-backdrop {
	position: fixed;
	inset: 0;
	background: linear-gradient(
		to bottom,
		#ffffff 0%,
		#ffffff 75%,
		rgba(0, 0, 0, 0.58) 25%,
		rgba(0, 0, 0, 0.58) 100%
	);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.2s ease, visibility 0.2s ease;
	z-index: 1020;
}

.pt2026-menu-backdrop.is-visible {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transition: opacity 0.2s ease, visibility 0s linear 0s;
}

/* --- Overlay de busca em tela cheia --- */
.pt2026-search-overlay {
	position: fixed;
	inset: 0;
	background-color: #E4142C;
	color: #ffffff;
	z-index: 2000;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}

.pt2026-search-overlay:target {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.pt2026-search-overlay-inner {
	padding-bottom: 3rem;
}

.pt2026-search-overlay-body {
	padding-top: 3rem;
}

.pt2026-search-logo-pt {
	height: 66px;
	width: auto;
}

.pt2026-search-logo-defende {
	height: 32px;
	width: auto;
}

.pt2026-search-overlay-top {
	padding-top: 0.8rem;
}

@media (min-width: 992px) {
	.pt2026-search-logo-defende {
		height: 40px;
	}
}

.pt2026-search-close {
	color: #ffffff !important;
	font-size: 2rem;
	line-height: 1;
	text-decoration: none;
	padding: 1.0rem 0.3rem;
}

.pt2026-search-close:hover,
.pt2026-search-close:focus {
	color: #ffffff;
	text-decoration: none;
}

.pt2026-search-title {
	font-family: var(--pt2026-font-display-ultra-cond);
	font-size: 80px;
	font-weight: 900;
	letter-spacing: 0.05em;
}

.pt2026-search-input-wrapper {
	width: 100%;
	background-color: #ffffff;
	border-radius: 999px;
	padding: 0.6rem 1.5rem;
}

.pt2026-search-input-wrapper input[type="search"] {
	background-color: transparent;
	color: #000;
	font-size: 1.1rem;
	padding: 0.4rem 0;
}

.pt2026-search-input-wrapper input[type="search"]::placeholder {
	color: #999;
}

.pt2026-search-submit {
	background: none;
	border: none;
	color: #c41e3a;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	margin-left: 0.75rem;
}

.pt2026-search-submit svg {
	display: block;
}

/* Faixa “Siga nossas redes” abaixo do header (single de post, page.php padrão) */
.pt2026-single-post-header {
	margin-top: 4px;
}

.pt2026-noticias-social-label {
	font-family: var(--pt2026-font-body);
	font-size: 12px;
	font-weight: 700;
	color: #202020;
	text-transform: uppercase;
}

.pt2026-noticias-header-right {
	padding-right: 16px !important;
}

.dropdown-toggle::after {
	display: none !important;
}