/* El Atlante Digital — global header v0.6 */

:root {
	--atlante-header-ink: #13151b;
	--atlante-header-muted: #626873;
	--atlante-header-blue: #505a78;
	--atlante-header-topbar: #303b48;
	--atlante-header-line: #e3e5e9;
	--atlante-header-white: #fff;
}

.atlante-site-header,
.atlante-site-header * {
	box-sizing: border-box;
}

.atlante-site-header {
	background: var(--atlante-header-white);
	box-shadow: 0 5px 13px rgba(23, 28, 38, .12);
	flex: 0 0 auto;
	font-family: inherit;
	margin: 20px auto 0;
	max-width: 1350px;
	position: relative;
	width: calc(100% - 40px);
	z-index: 100;
}

.atlante-header-container {
	margin: 0 auto;
	max-width: 1300px;
	width: calc(100% - 40px);
}

.atlante-icon {
	display: block;
	fill: none;
	height: 1em;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.8;
	width: 1em;
}

.atlante-icon--filled {
	fill: currentColor;
	stroke: none;
}

.atlante-icon .atlante-icon-fill {
	fill: currentColor;
	stroke: none;
}

/* Top bar */
.atlante-topbar {
	background: var(--atlante-header-topbar);
	color: var(--atlante-header-white);
}

.atlante-topbar__inner {
	align-items: center;
	display: grid;
	grid-template-columns: 1fr auto .6fr;
	height: 40px;
}

.atlante-topbar__clock {
	align-items: center;
	background: var(--atlante-header-white);
	border-radius: 2px;
	color: #272a31;
	display: inline-flex;
	font-size: .78rem;
	font-weight: 600;
	gap: 7px;
	justify-self: start;
	line-height: 1;
	padding: 7px 10px;
	white-space: nowrap;
}

.atlante-topbar__clock .atlante-icon {
	color: #5d626b;
	font-size: 1.05rem;
}

.atlante-topbar__time {
	font-variant-numeric: tabular-nums;
	font-weight: 800;
}

.atlante-topbar__date {
	margin-left: 7px;
}

.atlante-socials {
	align-items: center;
	display: flex;
	gap: 12px;
	justify-content: center;
}

.atlante-socials a,
.atlante-topbar__actions a {
	align-items: center;
	color: rgba(255, 255, 255, .96);
	display: inline-flex;
	font-size: 1.05rem;
	height: 28px;
	justify-content: center;
	text-decoration: none;
	transition: color .2s ease, opacity .2s ease, transform .2s ease;
	width: 22px;
}

.atlante-socials a:hover,
.atlante-socials a:focus-visible,
.atlante-topbar__actions a:hover,
.atlante-topbar__actions a:focus-visible {
	color: #fff;
	opacity: .72;
	transform: translateY(-1px);
}

.atlante-topbar__actions {
	align-items: center;
	display: flex;
	gap: 15px;
	justify-self: end;
}

.atlante-topbar__actions a {
	font-size: 1.12rem;
}

/* Logo and navigation */
.atlante-main-header {
	background: var(--atlante-header-white);
}

.atlante-main-header__inner {
	align-items: center;
	display: flex;
	min-height: 74px;
}

.atlante-branding {
	flex: 0 0 28%;
	min-width: 215px;
	padding-right: 20px;
}

.atlante-branding__link {
	align-items: center;
	color: var(--atlante-header-ink);
	display: inline-flex;
	max-width: 100%;
	text-decoration: none;
}

.atlante-branding__logo {
	display: block;
	height: auto;
	max-height: 78px;
	max-width: 230px;
	object-fit: contain;
	object-position: left center;
	width: auto;
}

.atlante-branding__name {
	font-family: Georgia, 'Times New Roman', serif;
	font-size: clamp(2rem, 3.4vw, 3.3rem);
	font-weight: 700;
	letter-spacing: -.055em;
	line-height: 1;
	white-space: nowrap;
}

.atlante-primary-nav {
	flex: 1 1 auto;
	min-width: 0;
}

.atlante-primary-menu,
.atlante-primary-menu ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.atlante-primary-menu {
	align-items: center;
	display: flex;
	gap: clamp(17px, 1.75vw, 31px);
	justify-content: flex-end;
}

.atlante-primary-menu > li {
	position: relative;
}

.atlante-primary-menu a {
	color: var(--atlante-header-ink);
	display: block;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.25;
	padding: 12px 0;
	text-decoration: none;
	transition: color .2s ease;
	white-space: nowrap;
}

.atlante-primary-menu a:hover,
.atlante-primary-menu a:focus-visible,
.atlante-primary-menu .current-menu-item > a,
.atlante-primary-menu .current-menu-ancestor > a {
	color: var(--atlante-header-blue);
}

.atlante-primary-menu .menu-item-has-children > a::after {
	border-bottom: 2px solid currentColor;
	border-right: 2px solid currentColor;
	content: '';
	display: inline-block;
	height: 6px;
	margin: 0 0 3px 8px;
	transform: rotate(45deg);
	width: 6px;
}

.atlante-primary-menu .sub-menu {
	background: var(--atlante-header-white);
	box-shadow: 0 8px 22px rgba(18, 22, 31, .14);
	left: -18px;
	min-width: 210px;
	opacity: 0;
	padding: 8px 18px;
	pointer-events: none;
	position: absolute;
	top: calc(100% - 1px);
	transform: translateY(7px);
	transition: opacity .2s ease, transform .2s ease;
	visibility: hidden;
	z-index: 20;
}

.atlante-primary-menu .sub-menu a {
	border-bottom: 1px solid var(--atlante-header-line);
	font-size: .9rem;
	padding: 10px 0;
}

.atlante-primary-menu .sub-menu li:last-child a {
	border-bottom: 0;
}

.atlante-primary-menu li:hover > .sub-menu,
.atlante-primary-menu li:focus-within > .sub-menu {
	opacity: 1;
	pointer-events: auto;
	transform: translateY(0);
	visibility: visible;
}

.atlante-menu-toggle {
	align-items: center;
	background: transparent;
	border: 0;
	color: var(--atlante-header-ink);
	cursor: pointer;
	display: none;
	font-size: 1.55rem;
	height: 42px;
	justify-content: center;
	padding: 0;
	box-shadow: none;
	width: 42px;
}

.atlante-header-search {
	flex: 0 0 48px;
	margin-left: 18px;
	position: relative;
}

.atlante-header-search__toggle {
	align-items: center;
	background: transparent;
	border: 0;
	color: var(--atlante-header-ink);
	cursor: pointer;
	display: flex;
	font-size: 1.35rem;
	height: 44px;
	justify-content: flex-end;
	padding: 0;
	box-shadow: none;
	width: 48px;
}

.atlante-header-search__toggle:hover,
.atlante-header-search__toggle:focus-visible {
	color: var(--atlante-header-blue);
}

.atlante-header-search__panel {
	background: var(--atlante-header-white);
	border-top: 3px solid var(--atlante-header-blue);
	box-shadow: 0 8px 24px rgba(18, 22, 31, .18);
	padding: 14px;
	position: absolute;
	right: 0;
	top: calc(100% + 29px);
	width: min(390px, calc(100vw - 40px));
	z-index: 30;
}

.atlante-header-search__form {
	display: flex;
	margin: 0;
}

.atlante-header-search__form input[type='search'] {
	background: #fff;
	border: 1px solid var(--atlante-header-line);
	border-radius: 0;
	color: var(--atlante-header-ink);
	font-size: .92rem;
	height: 42px;
	margin: 0;
	min-width: 0;
	padding: 0 12px;
	width: 100%;
}

.atlante-header-search__form button {
	background: var(--atlante-header-blue);
	border: 1px solid var(--atlante-header-blue);
	border-radius: 0;
	color: #fff;
	cursor: pointer;
	font-size: .85rem;
	font-weight: 700;
	height: 42px;
	padding: 0 15px;
}

@media (max-width: 1180px) {
	.atlante-branding {
		flex-basis: 24%;
	}

	.atlante-primary-menu {
		gap: 15px;
	}

	.atlante-primary-menu a {
		font-size: .92rem;
	}

	.atlante-header-search {
		margin-left: 11px;
	}
}

@media (max-width: 1024px) {
	.atlante-main-header__inner {
		flex-wrap: wrap;
		min-height: 88px;
		padding: 10px 0;
	}

	.atlante-branding {
		flex: 1 1 auto;
		min-width: 0;
	}

	.atlante-branding__logo {
		max-height: 64px;
		max-width: 200px;
	}

	.atlante-menu-toggle {
		display: inline-flex;
		order: 2;
	}

	.atlante-header-search {
		flex-basis: 42px;
		margin-left: 2px;
		order: 3;
	}

	.atlante-header-search__toggle {
		justify-content: center;
		width: 42px;
	}

	.atlante-primary-nav {
		flex: 0 0 100%;
		max-height: 0;
		opacity: 0;
		order: 4;
		overflow: hidden;
		transition: max-height .3s ease, opacity .2s ease;
		visibility: hidden;
		width: 100%;
	}

	.atlante-site-header.is-menu-open .atlante-primary-nav {
		max-height: 75vh;
		opacity: 1;
		overflow-y: auto;
		visibility: visible;
	}

	.atlante-primary-menu {
		align-items: stretch;
		border-top: 1px solid var(--atlante-header-line);
		display: block;
		margin-top: 10px;
		padding: 8px 0 2px;
	}

	.atlante-primary-menu > li {
		border-bottom: 1px solid var(--atlante-header-line);
	}

	.atlante-primary-menu a {
		font-size: 1rem;
		padding: 12px 4px;
	}

	.atlante-primary-menu .sub-menu {
		box-shadow: none;
		left: auto;
		min-width: 0;
		opacity: 1;
		padding: 0 0 8px 18px;
		pointer-events: auto;
		position: static;
		transform: none;
		visibility: visible;
	}

	.atlante-primary-menu .sub-menu a {
		font-size: .93rem;
	}

	.atlante-header-search__panel {
		top: calc(100% + 22px);
	}
}

@media (max-width: 700px) {
	.atlante-site-header {
		margin-top: 0;
		max-width: 100%;
		width: 100%;
	}

	.atlante-header-container {
		width: calc(100% - 24px);
	}

	.atlante-topbar__inner {
		grid-template-columns: 1fr auto;
		height: 38px;
	}

	.atlante-topbar__clock {
		display: none;
	}

	.atlante-socials {
		gap: 8px;
		justify-content: flex-start;
	}

	.atlante-socials a,
	.atlante-topbar__actions a {
		font-size: .98rem;
		width: 20px;
	}

	.atlante-topbar__actions {
		gap: 9px;
	}

	.atlante-main-header__inner {
		min-height: 76px;
	}

	.atlante-branding__logo {
		max-height: 56px;
		max-width: 185px;
	}

	.atlante-branding__name {
		font-size: 2rem;
	}

	.atlante-menu-toggle {
		font-size: 1.4rem;
		height: 38px;
		width: 38px;
	}

	.atlante-header-search {
		flex-basis: 38px;
	}

	.atlante-header-search__toggle {
		font-size: 1.2rem;
		height: 38px;
		width: 38px;
	}

	.atlante-header-search__panel {
		right: -1px;
		top: calc(100% + 18px);
	}
}

@media (max-width: 390px) {
	.atlante-branding__logo {
		max-width: 155px;
	}

	.atlante-branding__name {
		font-size: 1.7rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.atlante-primary-nav,
	.atlante-socials a,
	.atlante-topbar__actions a {
		transition: none;
	}
}
