/* ============================================
   TINBOL BLOG - Header Styles
   Cores: Azul #2162ad | Verde CTA #53A221
   ============================================ */

/* ---- TOP BAR ---- */
.tinbol-topbar {
	display: block;
	background-color: #2162ad;
	border-bottom: 1px solid #1a4d8a;
	color: #ffffff;
	font-size: 0.8125rem;
	line-height: 1.4;
	position: relative;
	z-index: 100;
}

.tinbol-topbar-inner {
	max-width: 1340px;
	margin: 0 auto;
	padding: 8px 24px;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.tinbol-topbar-contact {
	display: flex;
	align-items: center;
	gap: 20px;
}

.tinbol-topbar-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: #ffffff !important;
	text-decoration: none !important;
	transition: opacity 0.2s ease;
	white-space: nowrap;
}

.tinbol-topbar-item:hover {
	opacity: 0.85;
	color: #ffffff !important;
}

.tinbol-topbar-item svg {
	flex-shrink: 0;
}

.tinbol-topbar-help .tinbol-topbar-item {
	font-weight: 500;
}

/* ---- HEADER FIXO (alternativa ao sticky) ---- */
.tinbol-header-fixed {
	position: fixed !important;
	top: 0 !important;
	left: 0 !important;
	right: 0 !important;
	width: 100% !important;
	z-index: 1000 !important;
	gap: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* Remove gap entre topbar e navbar */
.tinbol-header-fixed > * {
	margin: 0 !important;
}

.tinbol-header-fixed .tinbol-topbar {
	margin-bottom: 0 !important;
}

.tinbol-header-fixed .tinbol-navbar {
	margin-top: 0 !important;
}

/* Override block gap do WordPress entre topbar e navbar */
.tinbol-header-fixed.wp-block-group {
	--wp--style--block-gap: 0 !important;
}

.tinbol-header-spacer {
	display: block;
	height: 120px !important;
	min-height: 120px !important;
	pointer-events: none;
}

/* ---- NAVBAR PRINCIPAL ---- */
.tinbol-navbar {
	display: block;
	margin-top: 0 !important;
	background-color: #ffffff !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	z-index: 99;
}

.tinbol-navbar.wp-block-group {
	margin: 0 !important;
	padding: 0 !important;
}

/* Logo */
.tinbol-logo {
	margin: 0 !important;
	flex-shrink: 0;
}

.tinbol-logo img {
	height: 55px !important;
	width: auto !important;
	display: block;
}

/* Navigation */
.tinbol-main-nav {
	font-size: 0.95rem;
}

.tinbol-main-nav .wp-block-navigation__container {
	gap: 8px;
}

.tinbol-main-nav .wp-block-navigation-item__content {
	color: #111111;
	font-weight: 500;
	padding: 8px 12px;
	transition: color 0.2s ease;
}

.tinbol-main-nav .wp-block-navigation-item__content:hover {
	color: #2162ad !important;
}

/* CTA Button */
.tinbol-cta-btn .wp-block-button__link {
	background-color: #53A221 !important;
	color: #ffffff !important;
	border-radius: 8px !important;
	font-weight: 600 !important;
	font-size: 0.875rem !important;
	padding: 10px 24px !important;
	transition: all 0.3s ease !important;
	white-space: nowrap;
	text-decoration: none !important;
	line-height: 1.4;
}

.tinbol-cta-btn .wp-block-button__link:hover {
	background-color: #468C1C !important;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(83, 162, 33, 0.35);
}

/* Nav right container */
.tinbol-nav-right {
	flex: 1;
	justify-content: flex-end !important;
}

/* ---- MOBILE RESPONSIVE ---- */

/* Tablet (max 1024px) */
@media (max-width: 1024px) {
	.tinbol-topbar-inner {
		padding: 8px 16px;
	}

	.tinbol-cta-wrapper {
		display: none !important;
	}
}

/* Mobile (max 768px) */
@media (max-width: 768px) {
	/* Top bar: scroll horizontal */
	.tinbol-topbar-inner {
		padding: 8px 16px;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		-ms-overflow-style: none;
		gap: 16px;
	}

	.tinbol-topbar-inner::-webkit-scrollbar {
		display: none;
	}

	.tinbol-topbar-contact {
		gap: 16px;
	}

	.tinbol-topbar-help {
		flex-shrink: 0;
	}

	/* Navbar */
	.tinbol-logo img {
		height: 42px !important;
	}

	/* CTA esconder em mobile (mostra no menu overlay) */
	.tinbol-cta-wrapper {
		display: none !important;
	}
}

/* Mobile pequeno (max 480px) */
@media (max-width: 480px) {
	.tinbol-topbar {
		font-size: 0.75rem;
	}

	.tinbol-topbar-inner {
		padding: 6px 12px;
	}

	.tinbol-logo img {
		height: 36px !important;
	}
}

/* ---- OVERLAY NAVIGATION (mobile menu) ---- */
/* Evita overlap com a topbar azul: overlay começa abaixo do header */
.wp-block-navigation__responsive-container.is-menu-open {
	top: 120px !important;
	left: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	height: calc(100vh - 120px) !important;
	padding: 24px !important;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	padding-top: 20px;
}

/* Botão de fechar (X) no topo do overlay, visível abaixo da topbar */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close {
	top: 24px !important;
	right: 24px !important;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-size: 1.1rem;
	padding: 12px 0;
	border-bottom: 1px solid #f0f0f0;
}

/* ---- DARK MODE / CONTRAST SUPPORT ---- */
@media (prefers-color-scheme: dark) {
	.tinbol-topbar {
		background-color: #1a4d8a;
	}
}

/* ---- SCROLL BEHAVIOR ---- */
.tinbol-navbar.is-scrolled {
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12) !important;
}

/* ---- PRINT STYLES ---- */
@media print {
	.tinbol-topbar,
	.tinbol-navbar {
		position: static !important;
		box-shadow: none !important;
	}

	.tinbol-cta-wrapper {
		display: none !important;
	}
}

/* ---- ACCESSIBILITY ---- */
.tinbol-topbar-item:focus-visible,
.tinbol-cta-btn .wp-block-button__link:focus-visible,
.tinbol-main-nav .wp-block-navigation-item__content:focus-visible {
	outline: 2px solid #ffffff;
	outline-offset: 2px;
}

.tinbol-navbar .tinbol-main-nav .wp-block-navigation-item__content:focus-visible {
	outline-color: #2162ad;
}
