/* SBP Eventos Menu */
.bem {
	--bem-item: #0a0a7d;
	--bem-item-h: #0a0a7d;
	--bem-line: #f2b230;
	--bem-sub-bg: #fff;
	--bem-sub-tx: #23234a;
	--bem-sub-hbg: #f4f3fb;
	--bem-sub-htx: #0a0a7d;
	--bem-cta-bg: #0a0a7d;
	--bem-cta-tx: #fff;
	--bem-cta-hbg: #f2b230;
	--bem-cta-htx: #0a0a7d;
	--bem-burger: #0a0a7d;

	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 28px;
}

/* ---------- Desktop ---------- */
.bem-nav > ul {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 28px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.bem-nav ul,
.bem-nav li { list-style: none; margin: 0; padding: 0; }

.bem-nav > ul > li { position: relative; }

.bem .bem-nav > ul > li > a {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 14px 0;
	color: var(--bem-item);
	font-size: 13px;
	font-weight: 800;
	letter-spacing: .04em;
	text-transform: uppercase;
	text-decoration: none;
	line-height: 1;
	white-space: nowrap;
	transition: color .2s ease;
}

/* Sublinhado amarelo (ativo / hover) */
.bem .bem-nav > ul > li > a::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 3px;
	border-radius: 3px;
	background: var(--bem-line);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .25s ease;
}
.bem .bem-nav > ul > li > a:hover,
.bem .bem-nav > ul > li.current-menu-item > a,
.bem .bem-nav > ul > li.current-menu-ancestor > a,
.bem .bem-nav > ul > li.current_page_item > a { color: var(--bem-item-h); }

.bem .bem-nav > ul > li > a:hover::before,
.bem .bem-nav > ul > li.current-menu-item > a::before,
.bem .bem-nav > ul > li.current-menu-ancestor > a::before,
.bem .bem-nav > ul > li.current_page_item > a::before { transform: scaleX(1); }

/* Seta nos itens com submenu */
.bem .bem-nav > ul > li.menu-item-has-children > a::after {
	content: "";
	width: 5px;
	height: 5px;
	margin: -3px 0 0 2px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform .2s ease, margin .2s ease;
}
.bem .bem-nav > ul > li.menu-item-has-children:hover > a::after,
.bem .bem-nav > ul > li.menu-item-has-children:focus-within > a::after {
	transform: rotate(-135deg);
	margin-top: 3px;
}

/* Submenu (cartão branco) */
.bem .bem-nav .sub-menu {
	position: absolute;
	top: calc(100% + 8px);
	left: -14px;
	z-index: 999;
	min-width: 256px;
	padding: 8px;
	background: var(--bem-sub-bg);
	border-radius: 12px;
	box-shadow: 0 18px 40px rgba(20, 22, 107, .14), 0 2px 6px rgba(20, 22, 107, .06);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
/* ponte invisível para o mouse não "cair" entre o item e o submenu */
.bem .bem-nav .sub-menu::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: -12px;
	height: 12px;
}
.bem .bem-nav li:hover > .sub-menu,
.bem .bem-nav li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.bem .bem-nav .sub-menu li { position: relative; }
.bem .bem-nav .sub-menu a {
	display: block;
	padding: 12px 14px;
	border-radius: 8px;
	color: var(--bem-sub-tx);
	font-size: 15px;
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
	text-decoration: none;
	line-height: 1.3;
	white-space: nowrap;
	transition: background-color .15s ease, color .15s ease;
}
.bem .bem-nav .sub-menu a:hover,
.bem .bem-nav .sub-menu a:focus-visible,
.bem .bem-nav .sub-menu .current-menu-item > a {
	background: var(--bem-sub-hbg);
	color: var(--bem-sub-htx);
}
/* 3º nível abre ao lado */
.bem .bem-nav .sub-menu .sub-menu { top: -8px; left: calc(100% + 8px); }

/* Botão Inscrições */
.bem a.bem-cta,
.bem-drawer a.bem-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	padding: 16px 28px;
	border-radius: 40px;
	background: var(--bem-cta-bg);
	color: var(--bem-cta-tx);
	font-size: 13px;
	font-weight: 800;
	letter-spacing: .04em;
	text-transform: uppercase;
	text-decoration: none;
	line-height: 1;
	white-space: nowrap;
	transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.bem a.bem-cta:hover,
.bem a.bem-cta:focus-visible,
.bem-drawer a.bem-cta:hover,
.bem-drawer a.bem-cta:focus-visible {
	background: var(--bem-cta-hbg);
	color: var(--bem-cta-htx);
	transform: translateY(-1px);
}

/* Item do menu como botão (último item ou classe bem-botao) */
.bem-lastbtn-yes .bem .bem-nav > ul > li:last-child,
.bem .bem-nav > ul > li.bem-botao { margin-left: 6px; }

.bem-lastbtn-yes .bem .bem-nav > ul > li:last-child > a,
.bem .bem-nav > ul > li.bem-botao > a {
	padding: 16px 28px;
	border-radius: 40px;
	background: var(--bem-cta-bg);
	color: var(--bem-cta-tx);
	transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.bem-lastbtn-yes .bem .bem-nav > ul > li:last-child > a:hover,
.bem-lastbtn-yes .bem .bem-nav > ul > li:last-child > a:focus-visible,
.bem-lastbtn-yes .bem .bem-nav > ul > li.current-menu-item:last-child > a,
.bem .bem-nav > ul > li.bem-botao > a:hover,
.bem .bem-nav > ul > li.bem-botao > a:focus-visible,
.bem .bem-nav > ul > li.bem-botao.current-menu-item > a {
	background: var(--bem-cta-hbg);
	color: var(--bem-cta-htx);
	transform: translateY(-1px);
}
/* sem sublinhado/seta no botão */
.bem-lastbtn-yes .bem .bem-nav > ul > li:last-child > a::before,
.bem-lastbtn-yes .bem .bem-nav > ul > li:last-child > a::after,
.bem .bem-nav > ul > li.bem-botao > a::before,
.bem .bem-nav > ul > li.bem-botao > a::after { display: none; }

/* No menu lateral: vira botão de largura total */
.bem-drawer.bem-lastbtn .bem-d-menu > li:last-child,
.bem-drawer .bem-d-menu > li.bem-botao { border-bottom: 0; padding-top: 16px; }
.bem-drawer.bem-lastbtn .bem-d-menu > li:last-child > a,
.bem-drawer .bem-d-menu > li.bem-botao > a {
	display: flex;
	justify-content: center;
	padding: 16px 20px;
	border-radius: 40px;
	background: var(--bem-cta-bg);
	color: var(--bem-cta-tx);
	box-shadow: none;
}
.bem-drawer.bem-lastbtn .bem-d-menu > li:last-child > a:hover,
.bem-drawer .bem-d-menu > li.bem-botao > a:hover {
	background: var(--bem-cta-hbg);
	color: var(--bem-cta-htx);
}

/* Hambúrguer (escondido no desktop) */
.bem-burger {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 44px;
	height: 44px;
	padding: 10px;
	margin: 0;
	border: 0;
	border-radius: 10px;
	background: transparent;
	cursor: pointer;
}
.bem-burger:hover,
.bem-burger:focus { background: rgba(10, 10, 125, .06); }
.bem-burger span {
	display: block;
	height: 2.5px;
	border-radius: 2px;
	background: var(--bem-burger);
}

/* ---------- Menu lateral ---------- */
.bem-drawer {
	--bem-d-bg: #fff;
	--bem-d-tx: #0a0a7d;
	--bem-d-sub: #4a4b5e;
	--bem-d-line: #ececf6;
	--bem-d-extra-bg: #fdf0d6;
	--bem-cta-bg: #0a0a7d;
	--bem-cta-tx: #fff;
	--bem-cta-hbg: #f2b230;
	--bem-cta-htx: #0a0a7d;

	position: fixed;
	inset: 0;
	z-index: 99999;
	visibility: hidden;
	pointer-events: none;
}
.bem-drawer.is-open { visibility: visible; pointer-events: auto; }

.bem-overlay {
	position: absolute;
	inset: 0;
	background: rgba(6, 6, 60, .55);
	opacity: 0;
	transition: opacity .3s ease;
}
.bem-drawer.is-open .bem-overlay { opacity: 1; }

.bem-panel {
	position: absolute;
	top: 0;
	bottom: 0;
	right: 0;
	display: flex;
	flex-direction: column;
	width: min(340px, 88vw);
	background: var(--bem-d-bg);
	box-shadow: -20px 0 50px rgba(0, 0, 0, .2);
	transform: translateX(100%);
	transition: transform .32s cubic-bezier(.4, 0, .2, 1);
}
.bem-drawer--left .bem-panel {
	right: auto;
	left: 0;
	transform: translateX(-100%);
	box-shadow: 20px 0 50px rgba(0, 0, 0, .2);
}
.bem-drawer.is-open .bem-panel { transform: translateX(0); }

.bem-d-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 20px;
	border-bottom: 1px solid var(--bem-d-line);
}
.bem-d-logo { display: block; max-height: 44px; width: auto; }
.bem-drawer .bem-close {
	width: 40px;
	height: 40px;
	margin-left: auto;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #f4f3fb;
	color: var(--bem-d-tx);
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}

.bem-d-body {
	flex: 1;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 8px 20px 20px;
}

.bem-d-menu,
.bem-d-menu ul { list-style: none; margin: 0; padding: 0; }

.bem-d-menu > li { border-bottom: 1px solid var(--bem-d-line); }
.bem-d-menu li { position: relative; }

.bem-drawer .bem-d-menu > li > a {
	display: block;
	padding: 16px 48px 16px 0;
	color: var(--bem-d-tx);
	font-size: 14px;
	font-weight: 800;
	letter-spacing: .04em;
	text-transform: uppercase;
	text-decoration: none;
	line-height: 1.2;
}
.bem-drawer .bem-d-menu > li.current-menu-item > a,
.bem-drawer .bem-d-menu > li.current-menu-ancestor > a {
	box-shadow: inset 3px 0 0 #f2b230;
	padding-left: 12px;
}

.bem-drawer .bem-d-menu > li > a:hover { color: var(--bem-d-tx); }

/* Botão de abrir subitens (criado pelo JS) */
.bem-d-toggle {
	position: absolute;
	top: 6px;
	right: 0;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--bem-d-tx);
	cursor: pointer;
}
.bem-d-toggle::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 7px;
	height: 7px;
	margin: -6px 0 0 -4px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform .2s ease, margin .2s ease;
}
.bem-d-menu li.is-open > .bem-d-toggle::before { transform: rotate(-135deg); margin-top: -2px; }
.bem-d-toggle:hover { background: #f4f3fb; }

.bem-d-menu .sub-menu {
	display: none;
	padding: 0 0 12px 12px;
}
.bem-d-menu li.is-open > .sub-menu { display: block; }
.bem-drawer .bem-d-menu .sub-menu a {
	display: block;
	padding: 10px 12px;
	border-radius: 8px;
	color: var(--bem-d-sub);
	font-size: 15px;
	text-decoration: none;
	line-height: 1.3;
}
.bem-drawer .bem-d-menu .sub-menu a:hover,
.bem-drawer .bem-d-menu .sub-menu .current-menu-item > a { background: #f4f3fb; color: var(--bem-d-tx); }

/* Links extras */
.bem-d-extras {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 22px;
}
.bem-d-extras-title {
	margin-bottom: 2px;
	color: #a86a00;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: .1em;
	text-transform: uppercase;
}
.bem-drawer a.bem-d-extra {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	border-radius: 12px;
	background: var(--bem-d-extra-bg);
	color: var(--bem-d-tx);
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
	line-height: 1.25;
	transition: transform .15s ease, filter .15s ease;
}
.bem-drawer a.bem-d-extra:hover { filter: brightness(.97); transform: translateX(2px); color: var(--bem-d-tx); }
.bem-d-extra-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: #fff;
	color: var(--bem-d-tx);
	font-size: 15px;
}
.bem-d-extra-icon svg { width: 16px; height: 16px; fill: currentColor; }

.bem-d-foot {
	padding: 16px 20px 20px;
	border-top: 1px solid var(--bem-d-line);
}
.bem-d-foot .bem-cta { width: 100%; }

body.bem-lock { overflow: hidden; }

/* ---------- Troca para o menu lateral ---------- */
@media (max-width: 1024px) {
	.bem-bp-tablet .bem-nav { display: none; }
	.bem-bp-tablet .bem-burger { display: inline-flex; }
	.bem-bp-tablet .bem-cta-m-drawer .bem-cta--top { display: none; }
	.bem-bp-tablet .bem { gap: 12px; }
}
@media (max-width: 767px) {
	.bem-bp-mobile .bem-nav { display: none; }
	.bem-bp-mobile .bem-burger { display: inline-flex; }
	.bem-bp-mobile .bem-cta-m-drawer .bem-cta--top { display: none; }
	.bem-bp-mobile .bem { gap: 12px; }
	.bem .bem-cta--top { padding: 12px 18px; font-size: 12px; }
}
@media (min-width: 1025px) {
	.bem-drawer { display: none; }
}
@media (min-width: 768px) {
	.bem-drawer.bem-bp-only-mobile { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.bem-panel, .bem-overlay, .bem .bem-nav .sub-menu { transition: none; }
}
