/*
 * Widget sy-nav-menu. Medidas del header en design/components.md (pill e
 * ítems); footer y panel mobile, de las referencias y del plan ("Lo que el
 * Figma no define": el panel abierto no está diseñado).
 */

.sy-nav {
	font-family: var(--sy-font);
}

.sy-nav a {
	text-decoration: none;
}

.sy-nav__empty {
	padding: 12px;
	border: 1px dashed currentColor;
	font-size: 13px;
}

/* =============================================================================
   Pill (header)
   ========================================================================== */

.sy-nav--pill {
	display: flex;
	align-items: center;
}

.sy-nav--pill > .sy-nav__list {
	display: none;
}

.sy-nav--pill .sy-nav__link {
	display: block;
	padding: 10px 16px;
	border-radius: var(--sy-r-pill);
	color: var(--sy-on-dark-strong);
	font-size: 14px;
	font-weight: 500;
	line-height: normal;
	white-space: nowrap;
	transition: background-color var(--sy-fast) var(--sy-ease), color var(--sy-fast) var(--sy-ease);
}

.sy-nav--pill .sy-nav__link:hover {
	background: rgba(255, 255, 255, 0.08);
	color: var(--sy-white);
}

.sy-nav--pill .is-current > .sy-nav__link {
	padding-inline: 18px;
	background: var(--sy-white);
	color: var(--sy-deep);
	font-weight: 600;
}

/* Botón que abre el panel, y el que lo cierra (en el mismo lugar). */
.sy-nav__toggle,
.sy-nav__close {
	display: inline-grid;
	place-items: center;
	flex: none;
	width: 46px;
	height: 46px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 13px;
	background: rgba(255, 255, 255, 0.06);
	color: var(--sy-white);
	font-size: 22px;
	line-height: 0;
}

@media (min-width: 1024px) {
	.sy-nav--pill > .sy-nav__list {
		display: flex;
		align-items: center;
		gap: 6px;
		padding: 6px;
		border: 1px solid rgba(255, 255, 255, 0.12);
		border-radius: var(--sy-r-pill);
		background: rgba(255, 255, 255, 0.06);
		-webkit-backdrop-filter: blur(6px);
		backdrop-filter: blur(6px);
	}

	.sy-nav__toggle {
		display: none;
	}
}

/* --- Panel mobile ------------------------------------------------------------ */

.sy-nav__panel {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 13px var(--sy-gutter) 32px;
	border: 0;
	background:
		linear-gradient(180deg, rgba(3, 6, 40, 0.55), rgba(3, 6, 40, 0.92)),
		url("../../img/bg-waves.webp") center / cover no-repeat,
		var(--sy-night);
	color: var(--sy-white);
	flex-direction: column;
	gap: 24px;
	overflow-y: auto;
}

.sy-nav__panel[open] {
	display: flex;
	animation: sy-panel-in 240ms var(--sy-ease);
}

.sy-nav__panel::backdrop {
	background: rgba(3, 6, 40, 0.6);
}

@keyframes sy-panel-in {
	from { transform: translateX(100%); }
	to { transform: none; }
}

.sy-nav__panel-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.sy-nav__panel-logo {
	color: var(--sy-white);
	font-weight: 700;
}

.sy-nav__panel-logo img {
	width: 106px;
	height: auto;
}

.sy-nav__panel-list {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
	margin-top: 16px;
}

.sy-nav__panel-list .sy-nav__link {
	display: inline-block;
	padding: 10px 20px;
	border-radius: var(--sy-r-pill);
	color: var(--sy-white);
	font-size: 24px;
	font-weight: 600;
	line-height: 1.3;
}

.sy-nav__panel-list .is-current > .sy-nav__link {
	background: var(--sy-white);
	color: var(--sy-deep);
}

.sy-nav__panel-cta {
	margin-top: auto;
	width: 100%;
}

/* =============================================================================
   Columnas (footer) y enlaces en fila (legales)
   ========================================================================== */

.sy-nav--columns {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 40px 20px;
}

@media (min-width: 1024px) {
	.sy-nav--columns {
		display: flex;
		justify-content: space-between;
		gap: 40px;
	}
}

.sy-nav__title {
	margin: 0 0 18px;
	color: var(--sy-lime);
	font-size: 12px;
	font-weight: 600;
	line-height: normal;
	letter-spacing: 1.44px;
}

/*
 * Interlineado "normal" (~18px) y 14px entre enlaces: paso de 32px en una
 * línea y los que parten en dos ("Risk-Bearing / Organizations") quedan juntos,
 * como en el Figma. Sin esto el <li> hereda el 1.6 del body.
 */
.sy-nav--columns .sy-nav__list {
	display: flex;
	flex-direction: column;
	gap: 14px;
	line-height: normal;
}

.sy-nav--columns .sy-nav__link,
.sy-nav--inline .sy-nav__link {
	font-size: 15px;
	line-height: normal;
	transition: color var(--sy-fast) var(--sy-ease);
}

.sy-nav--inline .sy-nav__list,
.sy-nav--inline .sy-nav__link {
	font-size: 14px;
	line-height: normal;
}

.sy-nav--columns .sy-nav__link {
	color: var(--sy-on-dark-strong);
}

.sy-nav--columns .sy-nav__link:hover,
.sy-nav--inline .sy-nav__link:hover {
	color: var(--sy-white);
	text-decoration: underline;
}

.sy-nav--inline .sy-nav__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
}

.sy-nav--inline .sy-nav__item + .sy-nav__item::before {
	content: "|";
	margin: 0 14px;
	color: var(--sy-periwinkle);
}

.sy-nav--inline .sy-nav__link {
	color: var(--sy-periwinkle);
}
