/* Puerto del <style> de src/components/Header.astro */

.site-header {
	position: relative;
	z-index: 50;
	font-family: var(--font-body);
}

.topbar {
	background: var(--color-navy);
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.topbar-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 52px;
	font-size: 14px;
	color: rgba(255, 255, 255, 0.85);
}

.topbar-left {
	display: flex;
	align-items: center;
	gap: 32px;
}

.topbar-accreditation {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-left: auto;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.01em;
	color: rgba(255, 255, 255, 0.72);
	white-space: nowrap;
}

.topbar-accreditation > span:first-child {
	color: rgba(255, 255, 255, 0.92);
}

.topbar-separator {
	color: var(--color-red);
}

.topbar-accreditation a {
	color: rgba(255, 255, 255, 0.55);
	text-decoration: none;
	transition: color 0.2s ease;
}

.topbar-accreditation a:hover {
	color: var(--color-white);
}

@media (max-width: 900px) {
	.topbar-accreditation {
		display: none;
	}
}

.topbar-item {
	display: flex;
	align-items: center;
	gap: 8px;
	text-decoration: none;
	color: inherit;
}

.navbar {
	position: sticky;
	top: 0;
	z-index: 60;
	background: #000b1c;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
	transition:
		background-color 0.3s ease,
		box-shadow 0.3s ease;
}

.navbar.is-scrolled {
	background: rgba(0, 11, 28, 0.72);
	backdrop-filter: blur(16px) saturate(140%);
	-webkit-backdrop-filter: blur(16px) saturate(140%);
	box-shadow: 0 12px 28px -16px rgba(0, 0, 0, 0.6);
}

.navbar-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 32px;
	height: 104px;
}

.logo {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	text-decoration: none;
	flex-shrink: 0;
}

.logo-img {
	height: 46px;
	width: auto;
	display: block;
}

.logo-suffix {
	font-family: var(--font-body);
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.05em;
	color: #c8beb6;
}

.nav-desktop {
	flex: 1;
	display: flex;
	justify-content: center;
}

.nav-desktop ul {
	display: flex;
	align-items: center;
	gap: 32px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.nav-desktop a {
	position: relative;
	display: inline-block;
	color: rgba(255, 255, 255, 0.9);
	text-decoration: none;
	font-size: 16px;
	font-weight: 500;
	padding-bottom: 4px;
	white-space: nowrap;
}

.nav-desktop a::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: 0;
	width: 100%;
	height: 2px;
	background: var(--color-red);
	transform: scaleX(0);
	transform-origin: right;
	transition: transform 0.3s cubic-bezier(0.65, 0, 0.35, 1);
}

.nav-desktop a:hover {
	color: var(--color-white);
}

.nav-desktop a:hover::after {
	transform: scaleX(1);
	transform-origin: left;
}

.nav-item {
	position: relative;
}

.nav-item a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.nav-item .nav-caret {
	transition: transform 0.2s ease;
}

.nav-item.has-dropdown:hover .nav-caret,
.nav-item.has-dropdown:focus-within .nav-caret {
	transform: rotate(180deg);
}

.nav-dropdown {
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translate(-50%, 6px);
	z-index: 70;
	min-width: 240px;
	padding-top: 14px;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.nav-item.has-dropdown:hover .nav-dropdown,
.nav-item.has-dropdown:focus-within .nav-dropdown {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translate(-50%, 0);
}

.nav-dropdown ul {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 2px;
	list-style: none;
	margin: 0;
	padding: 10px;
	background: var(--color-navy-soft);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 6px;
	box-shadow: 0 20px 36px -16px rgba(0, 0, 0, 0.55);
}

.nav-dropdown a {
	display: block;
	padding: 10px 14px;
	border-radius: 4px;
	font-size: 14.5px;
	font-weight: 500;
	white-space: nowrap;
	color: rgba(255, 255, 255, 0.82);
}

.nav-dropdown a::after {
	display: none;
}

.nav-dropdown a:hover {
	background: rgba(190, 24, 32, 0.14);
	color: var(--color-white);
}

.cta-desktop {
	flex-shrink: 0;
}

.menu-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	background: none;
	border: none;
	border-radius: 6px;
	color: var(--color-white);
	width: 44px;
	height: 44px;
	padding: 0;
	margin-left: auto;
	cursor: pointer;
	flex-shrink: 0;
	transition: background-color 0.2s ease;
}

.menu-toggle:hover,
.menu-toggle:focus-visible {
	background: rgba(255, 255, 255, 0.1);
}

.menu-toggle .icon-close {
	display: none;
}

.menu-toggle.is-active .icon-menu {
	display: none;
}

.menu-toggle.is-active .icon-close {
	display: block;
}

.nav-mobile {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: var(--color-navy-soft);
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.25s ease;
}

.nav-mobile.is-open {
	max-height: 80vh;
	overflow-y: auto;
	padding-bottom: 8px;
}

.nav-mobile ul {
	list-style: none;
	margin: 0;
	padding: 8px 24px;
}

.nav-mobile li {
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-mobile a {
	display: block;
	padding: 14px 0;
	color: var(--color-white);
	text-decoration: none;
	font-size: 16px;
	font-weight: 500;
}

.nav-mobile-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.nav-mobile-row a {
	flex: 1;
}

.nav-mobile-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	flex-shrink: 0;
	background: none;
	border: none;
	color: rgba(255, 255, 255, 0.7);
	cursor: pointer;
}

.nav-mobile-toggle svg {
	transition: transform 0.2s ease;
}

.has-children.is-open .nav-mobile-toggle svg {
	transform: rotate(180deg);
}

.nav-mobile-submenu {
	list-style: none;
	margin: 0;
	padding: 0 0 8px;
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.25s ease;
}

.has-children.is-open .nav-mobile-submenu {
	max-height: 480px;
}

.nav-mobile-submenu li {
	border-bottom: none;
}

.nav-mobile-submenu a {
	padding: 10px 0 10px 16px;
	font-size: 14.5px;
	font-weight: 400;
	color: rgba(255, 255, 255, 0.75);
}

.nav-mobile .cta-mobile {
	/* ".nav-mobile a" (clase+tag) tiene más especificidad que ".cta-mobile"
	   sola y fuerza display:block — se pisa acá con ".nav-mobile .cta-mobile"
	   para que el botón quede igual que en desktop (tamaño de contenido,
	   no estirado a todo el ancho). */
	display: inline-flex;
	margin: 16px 24px 20px;
}

@media (max-width: 1300px) {
	.nav-desktop,
	.cta-desktop {
		display: none;
	}

	.menu-toggle {
		display: flex;
	}

	.nav-mobile {
		display: block;
	}
}

@media (max-width: 640px) {
	.topbar-item span {
		display: none;
	}

	.topbar-inner {
		font-size: 12px;
	}

	.navbar-inner {
		height: 72px;
	}

	.logo-img {
		height: 32px;
	}
}
