@layer reset, base, theme, layouts, components, utilities, child-base, child;

@layer child {

	/* .single-post .wrapper { */
	/*     max-width: 1000px; */
	/* } */
	.wrapper {
		max-width: 1280px;
		margin: 0 auto;
	}

	@media (768px <=width <=1024px) {
		.wrapper {
			max-width: min(1280px, calc(100% - 22px));
			margin: 0 auto;
		}
	}

	.menu {
		width: 100%;
	}

	:where(figure) {
		margin: 0 !important;
	}

	/* Anúncios */

	:is(.post-item-content, .sidebar) [class^=contr-] {
		padding: 20px 0;
	}

	div[class*="ad-varginha-"]:not(div[class*="ad-varginha-"] div) {
		flex-wrap: wrap;
		gap: var(--medium-gap);
	}

	div[class*="ad-varginha-"]:not(div[class*="ad-varginha-"] div) {
		background-color: #eee;
		padding: 20px;
		margin: 20px 0;
		width: 100%;
		border-radius: var(--default-rounded);
	}

	div[class*="ad-varginha-"]:not(div[class*="ad-varginha-"] div) img {
		border-radius: 0;
	}

	@media (max-width: 1024px) {
		div[class*="ad-varginha-"]:not(div[class*="ad-varginha-"] div) {
			position: relative;
			width: 100vw;
			left: 50%;
			right: 50%;
			margin-left: -50vw !important;
			margin-right: -50vw !important;
			display: flex;
			justify-content: center;
			align-items: center;
			height: auto !important;
		}
	}

	/* Post */

	.single-post .wrapper .main-region .post-item-subtitle {
		margin: 0 !important;
	}

	.single-post .wrapper .main-region .post-item-content figure {
		max-width: 100%;
	}

	.custom-html-section:first-child .container {
		padding-left: 0 !important;
		padding-right: 0 !important;
	}

	.single-post .post-item-category {
		padding-left: 0;
	}

	.post-info {
		font-size: 14px;
	}

	@media (min-width: 1024px) {
		.single-post .layout-full-width:nth-of-type(3) .main-region {
			flex-direction: row !important;
			justify-content: space-between;
			align-items: center;
		}
	}

	.single-post .layout-section:nth-child(4) .post-item-image:first-of-type {
		margin: 0 !important;
		aspect-ratio: auto !important;
	}


	@media (max-width: 1024px) {

		.grid-posts-01 {
			display: flex;
			flex-direction: column;
		}


		header#header .menu-top .wrapper {
			height: 60px;
			grid-template-columns: 40px 1fr 0 !important;
		}

		.brand .logo-light {
			object-fit: contain;
		}

		.main-region {
			padding: 0 10px !important;
		}

		.main-region .post-blocks-grid-hero-01 {
			display: flex;
			flex-direction: column;
			gap: var(--medium-gap);
		}

		.main-region .post-blocks-grid-hero-01 .post-item {
			display: block !important;
		}

		.layout-section:not(:nth-child(4)):not(:nth-last-child(-n+3)) .main-region>section .post-item:first-of-type .post-item-title {
			font-size: 20px;
		}

		.layout-full-width:nth-child(4) .main-region>section:first-of-type .post-item:first-of-type,
		.main-region>section:first-of-type .post-item:not(:first-of-type),
		.main-region>section:not(:first-of-type) .post-item {
			display: flex;
			gap: var(--medium-gap);
			align-items: center;

		}

		.grid-posts-01>.post-item>.post-item-figure {
			flex: 0 0 35%;
		}

		:is(.archive, .search, .page:not(.home)) .conteiner {
			padding: 0 22px !important;
		}

		:is(.archive, .search) .main-content {
			flex-direction: column;
		}
	}

	/* Home */

	.home section.layout-section:nth-child(2) {
		margin-bottom: 20px;
	}

	.underline--full::after {
		background-color: #ccc !important;
	}

	.home .layout-section:nth-child(-n+3) .post-item .post-item-image,
	.home .layout-section:nth-child(n+5) .main-region>section:first-of-type .post-item:first-of-type .post-item-image {
		aspect-ratio: 16/9 !important;
	}

	.post-01 .post-destaque .post-item-title {
		font-size: 30px;
	}

	@media (max-width: 1024px) {
		.layout-full-width .grid-hero-01 .post-item {
			border-bottom: solid 1px #ccc;
			padding-bottom: 20px;

		}

		.layout-full-width .grid-hero-01 .post-item .post-item-title {
			font-size: 20px;
		}
	}

	/* SubDestaque */

	.layout-full-width:nth-child(4) .grid-posts-01 .post-item {
		border-bottom: solid 1px #ccc;
		padding-bottom: 20px;
		width: 100%;
	}

	/* Outros blocos */

	:is(.layout-section:nth-child(5), .layout-section:nth-child(7), .layout-section:nth-child(8)) .grid-posts-01:first-of-type .post-item {
		border-bottom: solid 1px #ccc;
		padding-bottom: 20px;
	}

	/* Bloco sem imagem */

	.layout-full-width:nth-child(09) .grid-posts-01 .post-item:not(:nth-last-child(-n+5)) {
		border-bottom: solid 1px #ccc;
		padding-bottom: 20px;
	}

	/* Noticias relacionadas - Posts*/

	.layout-main-sidebar .grid-category-posts-01 .post-item:not(:nth-last-child(-n+4)) {
		border-bottom: solid 1px #ccc;
		padding-bottom: 20px;
	}


	@media (max-width: 1024px) {
		/* Direitos Humanos */

		.layout-full-width:nth-child(5) .grid-posts-01:nth-child(-n+2) .post-item {
			border-bottom: solid 1px #ccc;
			padding-bottom: 20px;
		}

		/* Economia */

		.layout-main-sidebar:nth-child(8) .grid-posts-01:nth-child(-n+2) .post-item {
			border-bottom: solid 1px #ccc;
			padding-bottom: 20px;
		}

		/* Bloco sem imagem */

		.layout-full-width:nth-child(09) .grid-posts-01 .post-item {
			border-bottom: solid 1px #ccc;
			padding-bottom: 20px;
		}

		/* Noticias relacionadas - Posts*/

		.layout-main-sidebar .grid-category-posts-01 .post-item {
			border-bottom: solid 1px #ccc;
			padding-bottom: 20px;
		}
	}

	/* Primeiro bloco Home */
	.post-blocks-grid-hero-01 .post-hero .post-item-title.font-destaque-2 {
		font-size: 20px;
	}

	.post-blocks-grid-hero-01 .post-hero .post-item-category {
		padding: 0.1rem 0.25rem !important;
		font-size: 14px;
	}

	/* Ultimo bloco da home*/

	@media (min-width: 1024px) {
		.home .layout-main-sidebar:last-child .main-region {
			display: grid !important;
			grid-template-columns: 1fr 1fr;
		}
	}


	/* Most Viewed */

	.most-viewed__item .category {
		text-transform: uppercase !important;
	}

	/* 3 Colunas da Home*/

	.container.grid-3-cols:last-child {
		grid-template-columns: 1fr 1fr 340px !important;
	}

	@media (max-width: 1024px) {
		.container.grid-3-cols:last-child {
			grid-template-columns: 1fr !important;
		}
	}

	/* Header */

	.menu-menu-categorias-container #menu-menu-categorias {
		max-width: max-content !important;
	}

	.menu .menu-menu-categorias-container a {
		font-weight: 700 !important;
	}

	.menu-top,
	.menu-top .wrapper {
		background-color: #f8f9fb !important;
	}

	.brand img {
		max-width: 220px;
	}

	.brand:hover {
		filter: brightness(100%);
	}

	button.sidebar-toggle.js-toggle-sidebar span.sidebar-toggle-icon {
		display: flex;
		justify-content: center;
		align-items: center;
	}

	button.sidebar-toggle.js-toggle-sidebar {
		background: transparent;
	}

	header#header .menu-top .wrapper {
		height: auto !important;
		padding: 20px;
	}

	.menu-menu-categorias-container {
		padding: 8px !important;
	}


	.global-header {
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
		z-index: 99999;
		/* Garante que fique acima da maioria dos elementos */

		/* Usa 'transform' para animação suave e performática */
		transform: translateY(0);
		transition: transform 0.3s ease-in-out;

		/* Opcional: Adiciona uma sombra para destacar quando flutua */
		box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
	}

	.global-header.header-hidden {
		transform: translateY(-100%);
	}

	body {
		transition: padding-top 0.3s ease-in-out;
	}

	header#header .menu-top .wrapper {
		background: #FFF;
	}

	.sidebar-overlay,
	#sidebar-menu {
		top: var(--header-height, 60px) !important;

		height: calc(100dvh - var(--header-height, 60px)) !important;
	}

	@media (max-width: 1024px) {
		.menu-menu-categorias-container #menu-menu-categorias {
			gap: 30px !important;
		}
	}


	/* Plugins */

	.most-viewed__item .title {
		color: var(--dark-text-color) !important;
	}

	nav.rank-math-breadcrumb {
		color: #555 !important;
		font-size: 14px;
	}

	.layout-three-cols .title {
		font-weight: 800 !important;
	}

	.serverdoin-widgets--button img {
		height: 18px;
	}

	/* Menu Sidebar */

	.sidebar-is-active .sidebar-menu {
		gap: 20px;
		padding: 10px;
	}

	.menu-menu-sidebar {
		list-style: none;
		padding: 0;
		display: flex;
		flex-direction: column;
		gap: 15px;
	}

	.menu-menu-categorias-container #menu-menu-categorias a {
		font-size: 14px;
	}

	.menu-sidebar-footer {
		text-align: center;
		font-weight: 600;
		font-size: 14px;
		display: flex;
		gap: 10px;
		flex-direction: column;
	}

	.menu-sidebar-footer::before {
		display: block;
		content: "";
		background: #ccc;
		width: 80%;
		height: 1px;
		margin: auto;
		margin-bottom: 10px;
	}


	ul#menu-menu-sidebar {
		list-style: none;
		padding: 0;
		display: flex;
		flex-direction: column;
		gap: 15px;
	}

	ul#menu-menu-sidebar .menu-item a {
		color: var(--tertiary-color) !important;
		font-weight: 600;
	}

	/* Pagina de categoria archive  */

	:is(.archive, .search, .page-template-template-ultimas-noticias) .grid-posts-01 .post-item:not(:last-child) {
		border-bottom: solid 1px #ccc;
		padding-bottom: 20px;
	}

	:is(.archive, .search) .page-header {
		color: var(--primary-color);
		border-bottom: solid 3px #ccc;
		padding-bottom: 20px;
		margin-bottom: 5px;
	}

	@media (min-width: 1024px) {
		:is(.archive, .search, .page-template-template-ultimas-noticias) .grid-posts-01 {
			display: flex;
			flex-direction: column;
			gap: var(--medium-gap);
			flex: 1;
		}

		:is(.archive, .search, .page-template-template-ultimas-noticias) .grid-posts-01 .post-item {
			display: flex;
			gap: var(--medium-gap);
		}

		:is(.archive, .search, .page-template-template-ultimas-noticias) .post-item-figure {
			flex: 0 0 30%;
		}

		:is(.archive, .search, .page-template-template-ultimas-noticias) .post__overlay {
			flex: 1;
		}



		/* Meta post date */



	}

	.post-item-image img,
	.post-item-figure img {
		border-radius: var(--default-rounded) !important;
	}

	.swiper-slide .post-item .post-item-figure .post-item-image,
	.swiper-slide .post-item .post-item-figure,
	.swiper-slide .post-item .post-item-figure .post-item-image img {
		border-radius: var(--default-rounded) 0 0 var(--default-rounded) !important;
	}

	/* Ajustes do PDF */



	/* Ajuste Global de Títulos */
	/* h2, .post-item-title {
		color: var(--dark-text-color) !important;
	} */

	/* Notícia Principal (Hero) [cite: 9] */
	.post-01 .post-item-title h2 {
		font-size: 40px;
		font-weight: 700;
	}

	/* Chamada em cima do título da principal [cite: 10] */
	/* .post-01 .post-item-category {
		font-size: 12px;
		font-weight: 700;
		text-transform: none;
	} */

	/* 4 Imagens Secundárias no Desktop [cite: 23] */
	@media (min-width: 1024px) {
		.grid-hero-01 .post-hero:first-child .post-item-title h2 {
			font-size: 22px;
		}

		.grid-hero-01 .post-hero .post-item-title h2 {
			font-size: 17px;
		}

		.grid-hero-01 .post-hero .post-item-category {
			font-size: 12px;
		}
	}

	/* Ajustes Mobile [cite: 2, 43, 45] */
	@media (max-width: 767px) {
		.container {
			padding-left: 12px !important;
			padding-right: 12px !important;
		}

		.post-01 .post-item-title h2 {
			font-size: 28px;
			/* Título principal mobile [cite: 9] */
		}

		/* Títulos das 5 primeiras notícias no mobile [cite: 45, 46] */
		.post-hero .post-item-title h2 {
			font-size: 20px;
		}

		/* Barra cinza entre notícias [cite: 43] */
		.post-hero {
			border-bottom: 1px solid #eeeeee;
			padding-bottom: 15px;
			margin-bottom: 15px;
		}
	}


	/* Farmácias */

	.container-farmacias aside.sidebar {
		flex: 0 0 300px;
	}

	.container-farmacias>.main-content {
		display: flex;
		justify-content: center;
		flex-wrap: wrap;
		gap: var(--big-gap);
	}

	.container-farmacias .plantoes {
		flex: 1;
	}

	.marcador_farmacia {
		background-color: var(--primary-color);
		/* Azul do site antigo */
		color: #fff;
		padding: 8px 15px;
		font-weight: bold;
		font-size: 1.1rem;
		margin-top: 20px;
		margin-bottom: 15px;
		border-radius: 4px;
		text-align: center;
		/* Centraliza datas e titulos */
	}

	.lista_farmacia {
		padding: 15px;
		background: #f9f9f9;
		border: 1px solid #eee;
		margin-bottom: 10px;
		border-radius: 4px;
	}

	.lista_farmacia .nome {
		font-size: 1.2rem;
		font-weight: bold;
		color: #004b8d;
		margin-bottom: 5px;
	}

	.lista_farmacia .endereco,
	.lista_farmacia .telefone {
		font-size: 1rem;
		color: #555;
		line-height: 1.4;
	}

	.lista_farmacia .telefone {
		margin-top: 5px;
		font-weight: 600;
		color: #333;
	}

	.linha-separadora {
		border-bottom: 1px dashed #ccc;
		margin: 20px 0;
		height: 1px;
	}

	@media (max-width: 1024px) {
		.container-farmacias>.main-content {
			flex-direction: column;
		}

		#menu-footer-copyright {
			display: flex;
			flex-wrap: wrap;
			justify-content: center;
			gap: 5px;
			padding: 0;
		}

		#menu-footer-copyright li a {
			font-size: 16px;
		}

		#menu-footer-copyright li::after {
			content: "|";
			margin-left: 5px;
			font-size: 12px;
			opacity: 0.7;
		}

		#menu-footer-copyright li:last-child::after {
			content: "";
		}
	}

}

/* Home */

.grid-hero-01 .post-hero .post-item-category {
	border-radius: 0 !important;
}

.home .layout-section:nth-child(4) section.grid-posts-01.lista-vertical-posts-01 {
	display: flex;

}

.home .layout-section:nth-child(4) section.grid-posts-01.lista-vertical-posts-01 .html-injected-item {
	width: 340px;
	/* margin: auto; */
}

.home .layout-section:nth-child(4) section.grid-posts-01.lista-vertical-posts-01 .html-injected-item div[class*="ad-varginha-"]:not(div[class*="ad-varginha-"] div) {
	width: 340px !important;
	height: 290px !important;
	margin: auto;
}

@media (max-width: 1024px) {
	.home .layout-section:nth-child(4) section.grid-posts-01.lista-vertical-posts-01 .html-injected-item div[class*="ad-varginha-"]:not(div[class*="ad-varginha-"] div) {
		width: 100vw !important;
		/* position: static !important; */
		/* margin: auto !important; */
	}
}

@media (max-width: 1024px) {

	.layout-full-width:nth-child(4) .main-region>section:first-of-type .post-item:first-of-type .post-item-image,
	.main-region>section:first-of-type .post-item:not(:first-of-type) .post-item-image,
	.main-region>section:not(:first-of-type) .post-item .post-item-image {
		aspect-ratio: 4/3;
	}
}

/* Post */

.post-item-tag-list {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.single-post .post-item-meta .author-name {
	color: var(--secondary-color);
}

.single-post a.tag-list-item {
	border-radius: 20px;
	border: solid 1px var(--primary-color);
	padding: 2px 8px;
}

.single-post a.tag-list-item:hover {
	background-color: var(--primary-color);
	color: #FFF;
	filter: none;
}

.single-post .post-item-category {
	padding-left: 0;
}

.single-post .wrapper .main-region .post-item-category {
	margin-bottom: 0 !important;
	margin-top: 5px !important;
	padding: 0 !important;
	line-height: 1;
}

.post-item-meta .post-share-buttons {
	gap: var(--big-gap) !important;
}

.single-post .wrapper .main-region .post-item-category {
	text-transform: capitalize !important;
}

.single-post .wrapper .main-region .post-item-category:hover {
	text-decoration: none !important;
}

@media (max-width: 1024px) {
	.single-post .wrapper .main-region>.post-item-title {
		font-size: 28px !important;
		font-weight: 700 !important;
	}

	body .single-post .wrapper .main-region>.post-item-subtitle {
		font-size: 15px !important;
		font-weight: 400 !important;
		color: #666 !important;
	}

}

@media (min-width: 1024px) {
	.single-post .wrapper .main-region>.post-item-title {
		font-size: 40px !important;
		font-weight: 700 !important;
	}

	.single-post .wrapper .main-region>.post-item-subtitle {
		margin-bottom: 0 !important;
		font-size: 18px !important;
		font-weight: 400 !important;
		color: #666 !important;
	}

}

/* Footer */

body .footer-01 #menu-footer-copyright .menu-item:not(:last-child):after {
	color: #fff;
}

.footer-01 {
	background-color: var(--primary-color) !important;
}

.footer-01 #menu-footer-copyright .menu-item a,
.footer-01 .social-buttons a .social-button-icon {
	color: #FFF !important;
	fill: #FFF !important;
}

/* Páginas */

.page:not(.home) .page-header h1 {
	color: var(--primary-color) !important;
	border-bottom: solid 3px #ccc;
	padding-bottom: 20px;
	margin-bottom: 5px;
	font-size: 40px;

}

.page:not(.home) a {
	color: var(--secondary-color);
}

.page:not(.home) :where(p, li, h1, h2, h3, h4, h5) {
	color: var(--dark-text-color);
}

.page:not(.home) h1 {
	font-size: 34px;
	font-weight: 700;
	line-height: 1;
}

.page:not(.home) h2 {
	font-size: 24px;
	font-weight: 700;
	line-height: 1.5;
}

.page:not(.home) h3 {
	font-size: 18px;
	font-weight: 600;
	line-height: 1.5;
}

.page:not(.home) h4 {
	font-size: 14px;
	font-weight: 400;
	line-height: 1.5;
}

.page:not(.home) h5 {
	font-size: 16px;
	font-weight: 700;
	line-height: 1.5;
}


/* Lista Vertical 03  */

@media (max-width: 767px) {

	body .grid-3-cols .container.py-4 {
		padding: 0 !important;
	}
}

.grid-3-cols .container.py-4::after {
	content: "";
	display: block;
	bottom: 0;
	left: 0;
	background-color: #ccc;
	width: 100%;
	height: 1px;
	margin-bottom: var(--medium-gap);
}

.grid-3-cols h2.section-title {
	position: relative;
	width: fit-content;
	color: var(--tertiary-color);
}

.grid-3-cols h2.section-title::after {
	content: "";
	width: 100%;
	display: block;
	background-color: var(--primary-color);
	height: 4px;
	position: absolute;
	bottom: -2px;
	border-radius: 10px;
}

.grid-posts-02 {
	padding-left: 12px;
	padding-right: 12px;

	.post-item {
		display: flex;
		gap: var(--small-gap);
		align-items: center;

		&:not(:last-child) {
			padding-bottom: var(--medium-padding);
			border-bottom: solid #ccc 1px;
			margin-bottom: var(--medium-padding);

		}

		.post-item-figure {
			width: 30%;

			.post-item-image {
				aspect-ratio: 4/3;
			}
		}

		.post__overlay {
			flex: 1;
		}
	}
}


/* Geral */

.post-item .post-item-image {
	aspect-ratio: 16/9;
	min-width: auto;
}

/* Category */

/* .post-item-category-02 {
	color: var(--contrast-color-1) !important;
	background-color: var(--primary-color);
	border-radius: 0 !important;
	padding: 0.1rem 0.25rem !important;
	margin-top: .60rem !important;
} */

.post-item-date {
	margin-top: 5px;
	font-size: 12px;
	color: #666;
}


/* Sidebar */

.sidebar .layout-section:nth-child(2) h2.section-title {
	position: relative;
	width: fit-content;
	color: var(--tertiary-color);
}

.sidebar .layout-section:nth-child(2) h2.section-title::after {
	content: "";
	width: 100%;
	display: block;
	background-color: var(--primary-color);
	height: 4px;
	position: absolute;
	bottom: -2px;
	border-radius: 10px;
}

.sidebar .layout-section:nth-child(2) .container.py-4::after {
	content: "";
	display: block;
	bottom: 0;
	left: 0;
	background-color: #ccc;
	width: 100%;
	height: 1px;
	margin-bottom: var(--medium-gap);
}

.sidebar .layout-section:nth-child(2) .container .main-region {
	gap: 0;
}

@media (max-width: 1024px) {
	.font-destaque-1 {
		font-size: 24px;
		font-weight: 700;
		line-height: 1;
	}
}

body.author .grid-posts-01 {
	justify-content: start;
}