/*!
Theme Name: Ybakatu
Theme URI: https://www.kadencewp.com/kadence-theme/
Template: kadence
Author: Rodrigo Grigoletti
Author URI: https://duasformigasdesign.com.br/
Description: Custom theme for Ybakatu
Version: 1.0.0
License: GNU General Public License v3.0 (or later)
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Text Domain: kadence-child
*/

/* header */

.header-navigation[class*='header-navigation-style-underline']
	.header-menu-container
	> ul
	> li
	> a:after {
	height: 1px !important;
}

/* mega menu */

@media (min-width: 1025px) {
	.site-main-header-inner-wrap {
		position: relative !important;
	}

	#menu-item-2149.menu-item-has-children {
		position: static !important;
	}

	/* Posiciona o submenu colado na altura do menu e gerencia a transição de hover */
	#menu-item-2149.menu-item-has-children .sub-menu {
		position: absolute !important;
		top: 90px; /* Encosta o menu logo abaixo da linha do link */
		left: 50%;
		transform: translateX(-50%) !important;
		width: 100vw !important;
		max-width: 1300px !important;
		column-count: 4;
		column-gap: 40px;
		padding: 30px;
		box-sizing: border-box;
		background-color: #ffffff;
		box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
		/* Controla a animação de fade e evita sumiço repentino */
		visibility: hidden;
		opacity: 0;
		transition:
			opacity 0.2s ease,
			visibility 0.2s ease;
	}

	/* Mantém o menu aberto se o mouse estiver no link pai OU dentro do próprio submenu */
	#menu-item-2149.menu-item-has-children:hover > .sub-menu,
	#menu-item-2149.menu-item-has-children .sub-menu:hover {
		visibility: visible !important;
		opacity: 1 !important;
	}

	/* Ponte invisível de segurança para o mouse */
	#menu-item-2149.menu-item-has-children .sub-menu::before {
		content: '';
		position: absolute;
		top: -30px;
		left: 0;
		width: 100%;
		height: 30px;
	}

	/* Ajuste para o sticky header */

	.item-is-stuck #menu-item-2149.menu-item-has-children .sub-menu {
		top: 60px;
	}

	.item-is-stuck #menu-item-2149.menu-item-has-children .sub-menu::before {
		top: -15px;
		height: 30px;
	}

	#menu-item-2149.menu-item-has-children .sub-menu > li {
		break-inside: avoid;
		display: block;
		margin-bottom: 6px;
	}

	#menu-item-2149.menu-item-has-children .sub-menu > li > a {
		width: 100%;
		padding: 1em 0;
		white-space: normal;
	}

	#menu-item-2149.menu-item-has-children .sub-menu > li:nth-child(6n) {
		border: none !important;
	}

	#menu-item-2149.menu-item-has-children .sub-menu > li:nth-child(6n) > a {
		padding-bottom: 0;
	}
}

/* mobile menu */

#mobile-menu .sub-menu {
	padding-left: 2em;
}

.mobile-navigation ul li:last-child a {
	border: none !important;
}

/* classes globais */

.container_900 {
	width: 100%;
	max-width: 900px;
	margin: 0 auto;
	padding: 0 var(--global-content-edge-padding);
}

@media (max-width: 1400px) {
	.site-container {
		max-width: 1130px !important;
	}
}

/* margin e padding */

.section_padding_block {
	padding-top: 2em;
	padding-bottom: 2em;
}

.section_padding_top {
	padding-top: 2em;
}

.section_padding_bottom {
	padding-bottom: 2em;
}

.section_title_wrapper {
	margin-bottom: 2em;
}

.padding_top_0 {
	padding-top: 0 !important;
}

.padding_bottom_0 {
	padding-bottom: 0 !important;
}

.margin_0 {
	margin: 0;
}

.margin_top_0 {
	margin-top: 0 !important;
}

.margin_bottom_0 {
	margin-bottom: 0 !important;
}

.margin_block_1 {
	margin-top: 1.5em;
	margin-bottom: 1.5em;
}

.margin_top_1 {
	margin-top: 1em;
}

.margin_top_2 {
	margin-top: 1.5em;
}

.margin_top_3 {
	margin-top: 3em;
}

.margin_bottom_1 {
	margin-bottom: 1em;
}

.margin_bottom_2 {
	margin-bottom: 1.5em;
}

.margin_bottom_3 {
	margin-bottom: 3em;
}

.margin_block_2 {
	margin-top: 3em;
	margin-bottom: 3em;
}

@media (min-width: 992px) {
	.section_padding_block {
		padding-top: 5em;
		padding-bottom: 5em;
	}

	.section_padding_top {
		padding-top: 5em;
	}

	.section_padding_bottom {
		padding-bottom: 5em;
	}

	.section_title_wrapper {
		margin-bottom: 4em;
	}

	.margin_block_1 {
		margin-top: 3em;
		margin-bottom: 3em;
	}

	.margin_top_1 {
		margin-top: 1.5em;
	}

	.margin_top_2 {
		margin-top: 3em;
	}

	.margin_top_3 {
		margin-top: 5em;
	}

	.margin_bottom_1 {
		margin-bottom: 1.5em;
	}

	.margin_bottom_2 {
		margin-bottom: 3em;
	}

	.margin_bottom_3 {
		margin-bottom: 5em;
	}

	.margin_block_2 {
		margin-top: 5em;
		margin-bottom: 5em;
	}
}

/* alinhamentos */

.align_center {
	text-align: center;
}

/* tipografia */

.page-title .entry-title,
.section_title {
	text-transform: uppercase;
	text-align: center;
	letter-spacing: 0.16em;
}

@media (min-width: 768px) {
	.page-title .entry-title::before,
	.section_title::before {
		content: '';
		display: inline-block;
		width: 150px;
		height: 0.5px;
		background: #bababa;
		vertical-align: super;
		margin-right: 1em;
	}

	.page-title .entry-title::after,
	.section_title::after {
		content: '';
		display: inline-block;
		width: 150px;
		height: 0.5px;
		background: #bababa;
		vertical-align: super;
		margin-left: 1em;
	}
}

/* blog geral */

.grid-cols {
	column-gap: 0.4rem !important;
	row-gap: 0.5rem !important;
}

.loop-entry {
	box-shadow: none !important;
}

.loop-entry .post-thumbnail {
	margin-bottom: 0 !important;
}

.loop-entry .entry-content-wrap {
	padding: 0.5em 0 0 !important;
}

.loop-entry .entry-header {
	margin-bottom: 0.8em;
}

.loop-entry .entry-content-wrap h3 {
	font-style: normal;
	font-size: 15px;
	line-height: 1.3;
	letter-spacing: 0.15rem;
}

.loop-entry .entry-content-wrap h3 a:hover {
	color: var(--global-palette1);
}

.loop-entry .post-thumbnail img {
	transform: scale(1) translateX(0);
	transition: all 0.3s ease;
}

.loop-entry .post-thumbnail:hover img {
	transform: scale(1.05) translateX(5px);
	transition: all 0.3s ease;
}

/* single */

.single-post article {
	max-width: 842px;
	margin-left: auto;
	margin-right: auto;
}

.single-content p {
	margin-bottom: 1rem !important;
}

/* posts relacionados */

.grid-posts-relacionados {
	display: grid !important;
	grid-template-columns: repeat(2, 1fr);
	gap: 0.4rem !important;
	list-style: none !important;
	padding: 0 !important;
	margin: 2rem 0 0 0 !important;
}

.grid-posts-relacionados .entry-list-item {
	margin: 0 !important;
	width: 100% !important;
}

.entry-related .entry-related-inner-content.alignwide {
	width: 100%;
	max-width: var(--global-content-width);
	margin-left: auto;
	margin-right: auto;
	padding-left: 0 !important;
	padding-right: 0 !important;
}

/* vídeos */

.jetpack-video-wrapper > iframe {
	width: 100% !important;
}

/* responsivo */

@media (min-width: 768px) {
	.grid-posts-relacionados {
		grid-template-columns: repeat(4, 1fr);
	}
}

@media (min-width: 1025px) {
	.grid-cols,
	.grid-posts-relacionados {
		column-gap: 1.9rem !important;
		row-gap: 0.65rem !important;
	}
}

/* busca */

.search-results .wp-site-blocks .post-thumbnail {
	margin-bottom: 0 !important;
}

/* footer */

#colophon h3,
#colophon p,
#colophon a {
	color: #fff;
}

#colophon a:hover {
	text-decoration: underline;
}

#menu-menu-rodape li:not(#menu-menu-rodape li:last-child) {
	margin-bottom: 5px;
}

.link_footer span {
	vertical-align: sub;
	margin-right: 5px;
}

@media (min-width: 1025px) {
	.menu-menu-rodape-container {
		display: flex;
		justify-content: center;
	}

	.footer_col_3 {
		display: webkit-box;
		display: -ms-flexbox;
		display: flex;
		-webkit-box-pack: center;
		-ms-flex-pack: center;
		justify-content: center;
	}
}
