/*
 * Cabecera estilo eventos.stmpro.es: barra flotante redondeada de cristal
 * oscuro con el logo a la izquierda y botones rojos en forma de píldora.
 * Se aplica sobre la cabecera de Blocksy (la estructura, los desplegables y
 * los permisos del menú no cambian; solo el aspecto).
 */

@font-face {
	font-family: 'Raleway';
	font-style: normal;
	font-weight: 800;
	font-display: swap;
	src: url(../fonts/raleway-800.woff2) format('woff2');
}

body {
	--stm-hd-top: 14px;
	--stm-hd-red: #ff3b55;
	--stm-hd-red-dark: #8c0c20;
	--stm-hd-red-mid: #d91633;
	--stm-hd-glass: rgba(5, 3, 1, 0.82);
	--stm-hd-line: rgba(255, 255, 255, 0.14);
	--stm-hd-head: 'Raleway', system-ui, sans-serif;
	--stm-hd-admin: 0px;
}
body.admin-bar { --stm-hd-admin: 32px; }
@media (max-width: 782px) {
	body.admin-bar { --stm-hd-admin: 46px; }
}

/* ---------- Barra flotante ---------- */
body #header.ct-header {
	position: fixed;
	top: calc(var(--stm-hd-top) + var(--stm-hd-admin));
	left: 50%;
	transform: translateX(-50%);
	z-index: 60;
	width: min(1240px, calc(100% - 28px));
	border: 1px solid var(--stm-hd-line);
	border-radius: 16px;
	background: var(--stm-hd-glass);
	-webkit-backdrop-filter: blur(14px);
	backdrop-filter: blur(14px);
	box-shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.7);
}

body #header.ct-header [data-row] {
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	height: auto !important;
	min-height: 0 !important;
}

body #header.ct-header [data-row] > .ct-container {
	width: 100%;
	max-width: none;
	min-height: 0 !important;
	height: auto !important;
	padding: 10px 18px;
	gap: 12px;
}

/* La barra es flotante (fuera del flujo): una franja oscura reserva su hueco
   y se funde con el banner de las páginas (mismo color), sin saltos al cargar. */
body #main-container::before {
	content: "";
	display: block;
	flex: 0 0 auto;
	height: var(--stm-hd-strip, 80px);
	background: #121214;
}
body.stm-portal .stm-page-hero {
	padding-top: clamp(40px, 5vw, 64px);
}

/* ---------- Logo ---------- */
body #header.ct-header .site-branding {
	padding: 0;
}
body #header.ct-header .site-logo-container img {
	height: 27px;
	width: auto;
	max-height: none !important;
}

/* ---------- Menú principal (escritorio) ---------- */
body #header.ct-header nav[data-id="menu"] {
	--theme-link-initial-color: rgba(255, 255, 255, 0.88);
	--theme-link-hover-color: #ffffff;
	--theme-link-active-color: #ffffff;
}
body #header.ct-header nav[data-id="menu"] > ul {
	gap: 2px;
}
body #header.ct-header nav[data-id="menu"] > ul > li > a.ct-menu-link {
	--menu-item-height: auto;
	height: auto;
	padding: 12px 10px;
	border-radius: 60px;
	font: 800 12px/1 var(--stm-hd-head);
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.88);
	transition: background 0.25s, color 0.25s, box-shadow 0.25s;
}
body #header.ct-header nav[data-id="menu"] > ul > li > a.ct-menu-link:hover,
body #header.ct-header nav[data-id="menu"] > ul > li:hover > a.ct-menu-link,
body #header.ct-header nav[data-id="menu"] > ul > li:focus-within > a.ct-menu-link {
	background: rgba(255, 255, 255, 0.1);
	color: #ffffff;
}
body #header.ct-header nav[data-id="menu"] > ul > li.current-menu-item > a.ct-menu-link,
body #header.ct-header nav[data-id="menu"] > ul > li.current-menu-ancestor > a.ct-menu-link {
	background: rgba(255, 59, 85, 0.14);
	box-shadow: inset 0 0 0 1.5px var(--stm-hd-red);
	color: #ffffff;
}

/* ---------- Desplegables (menú y cuenta) ---------- */
body #header.ct-header .sub-menu,
body #header.ct-header .ct-header-account-dropdown {
	background: rgba(8, 5, 4, 0.96) !important;
	-webkit-backdrop-filter: blur(14px);
	backdrop-filter: blur(14px);
	border: 1px solid var(--stm-hd-line);
	border-radius: 14px;
	box-shadow: 0 24px 50px -22px rgba(0, 0, 0, 0.85);
	padding: 8px;
}
body #header.ct-header .sub-menu a.ct-menu-link,
body #header.ct-header .ct-header-account-dropdown a.ct-menu-link {
	padding: 10px 14px;
	border-radius: 10px;
	font: 700 13px/1.2 var(--stm-hd-head);
	letter-spacing: 0.03em;
	text-transform: none;
	color: rgba(255, 255, 255, 0.88) !important;
	transition: background 0.2s, color 0.2s;
}
body #header.ct-header .sub-menu a.ct-menu-link:hover,
body #header.ct-header .ct-header-account-dropdown a.ct-menu-link:hover {
	background: rgba(255, 255, 255, 0.08);
	color: #ff8a9b !important;
}
body #header.ct-header .ct-header-account-dropdown .ct-header-account-user-info .ct-menu-link,
body #header.ct-header .ct-header-account-dropdown .ct-header-account-user-info span,
body #header.ct-header .ct-header-account-dropdown .ct-header-account-user-info b {
	color: #ffffff !important;
}
body #header.ct-header .ct-header-account-dropdown .ct-header-account-user-info small {
	color: rgba(255, 255, 255, 0.6) !important;
}
body #header.ct-header .ct-header-account-dropdown .ct-header-account-divider {
	background: var(--stm-hd-line) !important;
	opacity: 1;
}

/* ---------- Botones rojos en píldora / círculo (cuenta y menú móvil) ---------- */
body #header.ct-header .ct-header-account .ct-account-item,
body #header.ct-header .ct-header-trigger {
	display: inline-grid;
	place-items: center;
	width: 42px;
	height: 42px;
	min-height: 42px;
	padding: 0;
	border: 2px solid var(--stm-hd-red) !important;
	border-radius: 50% !important;
	background: linear-gradient(90deg, var(--stm-hd-red-dark) 0%, var(--stm-hd-red-mid) 100%) !important;
	color: #ffffff;
	box-shadow: 0 7px 30px rgba(255, 59, 85, 0.28);
	transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s, filter 0.2s;
}
body #header.ct-header .ct-header-account .ct-account-item:hover,
body #header.ct-header .ct-header-trigger:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 40px rgba(255, 59, 85, 0.5);
	filter: brightness(1.1);
}
body #header.ct-header .ct-header-account .ct-account-item svg,
body #header.ct-header .ct-header-trigger svg {
	width: 18px;
	height: 18px;
	fill: #ffffff;
}
body #header.ct-header .ct-header-trigger svg {
	height: 14px;
}
body #header.ct-header .ct-header-trigger .ct-label {
	display: none;
}

/* ---------- Panel móvil (offcanvas) ---------- */
#offcanvas .ct-panel-inner {
	background: #080504 !important;
	background-image: radial-gradient(ellipse at 100% 0%, rgba(200, 16, 46, 0.25), transparent 55%) !important;
	border-left: 1px solid var(--stm-hd-line);
}
#offcanvas .ct-toggle-close {
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	border: 2px solid var(--stm-hd-red) !important;
	border-radius: 50% !important;
	background: linear-gradient(90deg, var(--stm-hd-red-dark) 0%, var(--stm-hd-red-mid) 100%) !important;
	color: #ffffff;
	box-shadow: 0 7px 30px rgba(255, 59, 85, 0.28);
}
#offcanvas .ct-toggle-close svg {
	fill: #ffffff;
}
#offcanvas .site-logo-container img {
	height: 30px;
	width: auto;
	filter: brightness(0) invert(1);
}
#offcanvas .mobile-menu {
	--theme-link-initial-color: rgba(255, 255, 255, 0.9);
	--theme-link-hover-color: #ff8a9b;
	--theme-link-active-color: #ff8a9b;
}
#offcanvas .mobile-menu a.ct-menu-link {
	font: 800 15px/1.2 var(--stm-hd-head, 'Raleway', system-ui, sans-serif);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.9);
}
#offcanvas .mobile-menu .sub-menu a.ct-menu-link {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: none;
	color: rgba(255, 255, 255, 0.75);
}
#offcanvas .mobile-menu li.current-menu-item > a.ct-menu-link,
#offcanvas .mobile-menu li.current-menu-item > .ct-sub-menu-parent > a.ct-menu-link {
	color: var(--stm-hd-red);
}
#offcanvas .mobile-menu .ct-toggle-dropdown-mobile {
	color: #ffffff;
}
#offcanvas .mobile-menu li {
	border-color: var(--stm-hd-line) !important;
}
#offcanvas .ct-header-account {
	--theme-link-initial-color: #ffffff;
	color: #ffffff;
}
#offcanvas .ct-header-account .ct-account-item,
#offcanvas .ct-header-account a {
	color: #ffffff !important;
}

/* ---------- Móvil ---------- */
@media (max-width: 999px) {
	body #header.ct-header [data-row] > .ct-container {
		padding: 8px 12px;
		gap: 10px;
	}
	body #header.ct-header .site-logo-container img {
		height: 22px;
	}
	body {
		--stm-hd-strip: 72px;
	}
	body.stm-portal .stm-page-hero {
		padding-top: 28px;
	}
}
@media (max-width: 350px) {
	body #header.ct-header .site-logo-container img {
		height: 19px;
	}
}

@media print {
	body #header.ct-header {
		display: none !important;
	}
}

/* ---------- Botón de Chat (equivale al "Contacto" de eventos) ---------- */
body #header.ct-header .ct-header-cta .ct-button {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	padding: 0 20px;
	border: 2px solid var(--stm-hd-red);
	border-radius: 60px;
	background: linear-gradient(90deg, var(--stm-hd-red-dark) 0%, var(--stm-hd-red-mid) 100%);
	color: #ffffff;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
	font: 800 14px/1 var(--stm-hd-head);
	letter-spacing: 0;
	text-transform: uppercase;
	box-shadow: 0 7px 30px rgba(255, 59, 85, 0.28);
	transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s, filter 0.2s;
}
body #header.ct-header .ct-header-cta .ct-button::after {
	content: "";
	display: block !important;
	position: static;
	order: -1;
	opacity: 1;
	z-index: auto;
	inset: auto;
	margin: 0;
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	background-color: #ffffff;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2z'/%3E%3C/svg%3E") center / contain no-repeat;
}
body #header.ct-header .ct-header-cta .ct-button:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 40px rgba(255, 59, 85, 0.5);
	filter: brightness(1.1);
}

@media (max-width: 1240px) and (min-width: 1000px) {
	body #header.ct-header .ct-header-cta .ct-button {
		padding: 0 18px;
		font-size: 13px;
	}
}

/* En móvil queda solo el icono, como el botón de contacto de eventos */
@media (max-width: 999px) {
	body #header.ct-header [data-device="mobile"] .ct-header-cta .ct-button {
		width: 42px;
		min-height: 42px;
		height: 42px;
		padding: 0;
		justify-content: center;
		gap: 0;
		font-size: 0;
		text-shadow: none;
	}
	body #header.ct-header [data-device="mobile"] .ct-header-cta .ct-button::after {
		width: 22px;
		height: 22px;
	}
	body #header.ct-header [data-device="mobile"] [data-items] {
		gap: 10px;
	}
}
