/**
 * Header, footer, shell
 * @package Vertex
 */

.site-header {
	position: sticky;
	top: 0;
	left: 0;
	width: 100%;
	z-index: var(--header-z);
	background: var(--color-primary);
	box-shadow: var(--header-shadow);
	min-height: var(--header-height);
	transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

/* --- Internal Header --- */
.site-header--internal {
    background-image: url('../images/fundo/Imagens de fundo/Treinamentos_E_Consultorias/Treinamentos_E_Consultorias.png');
    background-color: #13284C;
    background-size: cover;
    background-position: center top;
    background-attachment: fixed;
    border-bottom: none;
    position: relative;
    z-index: 1000;
}

.site-header--internal::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5); /* dark overlay to see logo and menu */
    z-index: -1;
}

.site-header--internal .site-logo img {
    filter: brightness(0) invert(1); /* Ensure white logo visibility */
}

.site-header--internal .menu-item a {
    color: #ffffff;
}

.site-header--internal .menu-item a:hover {
    color: #f47726;
}

.site-header--internal .action-icon {
    color: #ffffff;
}

.site-header--internal .btn-whatsapp {
    background-color: #22c55e;
    color: #ffffff;
}

/*
 * Home + hero: header fixo no topo do viewport (não ocupa fluxo).
 * Evita faixa clara quando a altura real do header > --header-height: o overlap
 * com margin-top negativo no .hero ficava aquém e o body aparecia por baixo do header transparente.
 */
body.home:has(.hero) .site-header,
body.home.vertex-home-hero .site-header {
	position: fixed;
	top: 0;
}

@media screen and (min-width: 783px) {
	body.admin-bar.home:has(.hero) .site-header,
	body.admin-bar.home.vertex-home-hero .site-header {
		top: 32px;
	}
}

@media screen and (max-width: 782px) {
	body.admin-bar.home:has(.hero) .site-header,
	body.admin-bar.home.vertex-home-hero .site-header {
		top: 46px;
	}
}

/* Figma: header transparent over home hero; solid elsewhere and after scroll */
body.home:has(.hero) .site-header,
body.home.vertex-home-hero .site-header {
	background: transparent;
	box-shadow: none;
}

body.home:has(.hero) .site-header.site-header--solid,
body.home.vertex-home-hero .site-header.site-header--solid {
	background: var(--color-primary);
	box-shadow: var(--header-shadow);
}

body.home:has(.hero) .site-header:has(.main-navigation.is-open),
body.home.vertex-home-hero .site-header:has(.main-navigation.is-open) {
	background: var(--color-primary);
	box-shadow: var(--header-shadow);
}

.site-header__container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-block: var(--header-padding-y);
	flex-wrap: wrap;
}

@media (min-width: 1024px) {
	.site-header__container {
		flex-wrap: nowrap;
	}
}

.site-branding .site-logo {
	display: inline-flex;
	align-items: center;
}

.site-branding .site-logo img {
	width: var(--logo-width);
	height: var(--logo-height);
	object-fit: contain;
}

.header-right-wrapper {
	display: flex;
	align-items: center;
	gap: 1rem;
	flex: 1;
	justify-content: flex-end;
}

.menu-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.35);
	border-radius: var(--radius-sm);
	background: transparent;
	color: var(--color-header-text);
	cursor: pointer;
}

.menu-toggle__bar {
	display: block;
	width: 22px;
	height: 2px;
	background: currentColor;
	position: relative;
}

.menu-toggle__bar::before,
.menu-toggle__bar::after {
	content: "";
	position: absolute;
	left: 0;
	width: 100%;
	height: 2px;
	background: currentColor;
}

.menu-toggle__bar::before {
	top: -7px;
}

.menu-toggle__bar::after {
	top: 7px;
}

@media (min-width: 1024px) {
	.menu-toggle {
		display: none;
	}
}

.main-navigation {
	display: none;
}

.main-navigation.is-open {
	display: block;
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: var(--color-primary);
	padding: 1rem var(--container-padding-x) 1.5rem;
	border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.main-navigation.is-open ul {
	flex-direction: column;
	align-items: flex-start;
	gap: 0;
}

.main-navigation.is-open li {
	padding: 0.5rem 0;
	width: 100%;
}

@media (min-width: 1024px) {
	.main-navigation {
		display: block;
		position: static;
		background: transparent;
		padding: 0;
		border: 0;
	}

	.main-navigation ul {
		display: flex;
		align-items: center;
		gap: 0;
	}

	.main-navigation li {
		padding-left: 1.5rem;
	}

	@media (min-width: 1200px) {
		.main-navigation li {
			padding-left: 2rem;
		}
	}
}

.main-navigation a {
	font-weight: var(--fw-medium);
	font-size: var(--fs-nav);
	line-height: var(--lh-nav);
	color: var(--color-header-text);
	display: inline-flex;
	align-items: center;
	gap: var(--nav-link-gap);
}

.header-actions {
	display: flex;
	align-items: center;
	gap: var(--header-actions-gap);
	margin-left: 0;
}

@media (min-width: 1024px) {
	.header-actions {
		margin-left: 1.5rem;
	}
}

.action-icon {
	display: flex;
	align-items: center;
}

/* Links are <a class="action-icon"> — color must apply to the anchor, not a nested a */
a.action-icon {
	color: var(--color-header-text);
	text-decoration: none;
}

a.action-icon svg {
	color: inherit;
}

.btn-whatsapp {
	display: inline-flex;
	align-items: center;
	padding: var(--btn-padding-y) var(--btn-padding-x);
	background-color: var(--color-secondary);
	border-radius: var(--radius-sm);
	color: var(--color-neutral-lightest);
	font-weight: var(--fw-medium);
	font-size: var(--fs-nav);
	line-height: var(--lh-nav);
	gap: var(--nav-link-gap);
	white-space: nowrap;
}

.btn-whatsapp:hover {
	text-decoration: none;
	filter: brightness(1.05);
}

.cart-icon-wrapper {
	position: relative;
	display: flex;
	align-items: center;
}

.cart-badge {
	position: absolute;
	top: var(--badge-offset-top);
	right: var(--badge-offset-right);
	background-color: var(--color-secondary);
	color: var(--color-neutral-lightest);
	font-size: var(--badge-font-size);
	border-radius: var(--radius-full);
	min-width: var(--badge-size);
	height: var(--badge-size);
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 0 4px;
}

/* Footer — Figma node 89:10543 */
.site-footer {
	background: var(--color-primary);
	color: var(--color-neutral-lightest);
	padding: 4rem 0 2rem;
	margin-top: auto;
}

.site-footer a {
	color: var(--color-neutral-light);
	text-decoration: none;
}

.site-footer a:hover {
	color: var(--color-neutral-lightest);
}

.site-footer__container {
	max-width: 80rem; /* 1280px — Figma footer inner */
	width: 100%;
	margin: 0 auto;
	padding-left: 24px;
	padding-right: 24px;
	box-sizing: border-box;
}

.site-footer__grid {
	display: grid;
	gap: 2.5rem;
	grid-template-columns: 1fr;
}

@media (min-width: 768px) {
	.site-footer__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {
	.site-footer__grid {
		grid-template-columns: repeat(4, 1fr);
		gap: 48px;
	}
}

.site-footer__col--brand {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.site-footer__col--brand .site-footer__logo,
.site-footer__col--brand .site-footer__logo-text {
	margin-bottom: 0;
}

.site-footer__col--brand .site-footer__tagline {
	margin: 0;
}

.site-footer__logo {
	max-width: 195px;
	height: auto;
	margin-bottom: 0.5rem;
}

.site-footer__logo-text {
	font-size: 1.5rem;
	font-weight: var(--fw-bold);
	margin: 0 0 0.5rem;
}

.site-footer__tagline {
	font-size: 1rem;
	line-height: 1.625;
	color: var(--color-neutral-light);
	margin: 0 0 1.5rem;
}

.site-footer__title {
	font-size: 1.125rem;
	font-weight: var(--fw-bold);
	color: var(--color-neutral-lightest);
	margin: 0 0 1.5rem;
}

.site-footer__menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-footer__menu li {
	margin-bottom: 0.75rem;
}

.site-footer__menu a {
	font-size: 1rem;
	line-height: 1.5;
}

/* Contact items with icons */
.site-footer__contact {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.site-footer__contact-item {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	font-size: 1rem;
	line-height: 1.5;
	color: var(--color-neutral-light);
}

.site-footer__contact-icon {
	flex-shrink: 0;
	margin-top: 0.25rem;
	color: var(--color-secondary);
}

.site-footer__contact-item a {
	color: var(--color-neutral-light);
}

/* Social icons — circular bg */
.site-footer__social {
	display: flex;
	gap: 1rem;
}

.site-footer__social-link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.1);
	color: var(--color-neutral-lightest);
	transition: background 0.2s ease;
}

.site-footer__social-link:hover {
	background: rgba(255, 255, 255, 0.2);
}

.site-footer__social-link--static {
	pointer-events: none;
	opacity: 0.85;
}

.site-footer__social-link--static:hover {
	background: rgba(255, 255, 255, 0.1);
}

/* Bottom bar */
.site-footer__bottom {
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 1px solid rgba(255, 255, 255, 0.15);
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	font-size: var(--fs-small);
	color: var(--color-neutral-light);
}

.site-footer__bottom p {
	margin: 0;
}

.site-footer__legal {
	display: flex;
	gap: 1.5rem;
}

.site-footer__legal a {
	color: var(--color-neutral-light);
	text-decoration: underline;
	text-underline-offset: 2px;
}

#page.site {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}
