/* Header institucional FCJyS */

/* Ocultar franja de título "Inicio" en portada */
body.home .entry-hero.page-hero-section,
body.home .page-hero-section {
	display: none !important;
}

#masthead,
.site-header,
.site-main-header-wrap,
.site-main-header-wrap .site-header-row-container-inner {
	background: #fff !important;
}

#masthead,
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	backdrop-filter: none;
	box-shadow: 0 1px 0 rgba(0, 51, 102, 0.08);
	transition: box-shadow 0.3s ease;
}

.site-header.is-scrolled {
	box-shadow: 0 4px 24px rgba(0, 33, 71, 0.1);
}

/* Ancho alineado al contenido del sitio */
.site-main-header-wrap .site-header-row-container-inner {
	max-width: none;
	width: 100%;
	margin-left: auto;
	margin-right: auto;
	padding-left: clamp(1rem, 2.5vw, 2.5rem);
	padding-right: clamp(1rem, 2.5vw, 2.5rem);
}

/* Fila principal: logo izquierda, menú derecha (una sola línea) */
.site-main-header-inner-wrap.site-header-row {
	justify-content: space-between !important;
	align-items: center;
	flex-wrap: nowrap !important;
	gap: 1rem;
}

.site-header-main-section-right .primary-menu-container > ul {
	display: flex;
	flex-wrap: nowrap !important;
	justify-content: flex-end;
}

.site-header-main-section-left {
	flex: 0 1 auto;
	display: flex;
	justify-content: flex-start;
	align-items: center;
}

.site-header-main-section-right {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	justify-content: flex-end;
	align-items: center;
	margin-left: auto;
	background: transparent !important;
}

.site-header-main-section-right .main-navigation,
.site-header-main-section-right .primary-menu-container,
.jursoc-claustros-nav {
	background: transparent !important;
}

.site-header-main-section-right .site-header-item {
	margin-left: 0;
}

.site-branding {
	text-align: left;
}

.site-branding .site-title,
.site-branding .site-description {
	display: none !important;
}

.site-branding .custom-logo,
.site-branding .jursoc-brand-logo {
	display: block;
	height: auto;
	max-height: 56px;
	width: auto;
	max-width: min(420px, 42vw);
}

.site-branding a.brand {
	display: inline-flex;
	align-items: center;
	justify-content: flex-start;
}

/* —— Menú de claustros: enlaces sutiles (sin botones) —— */
.site-header-main-section-right .main-navigation {
	display: flex;
	justify-content: flex-end;
}

.jursoc-claustros-nav .jursoc-claustros-menu,
#primary-menu.jursoc-claustros-menu,
#mobile-menu.jursoc-claustros-menu {
	display: flex;
	align-items: center;
	margin: 0;
	padding: 0;
	list-style: none;
	gap: 0;
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
}

#primary-menu.jursoc-claustros-menu,
.main-navigation .primary-menu-container > ul.jursoc-claustros-menu {
	flex-wrap: nowrap !important;
	justify-content: flex-end;
	gap: 0;
	padding: 0 !important;
}

.jursoc-claustros-item {
	margin: 0;
	position: relative;
	flex: 0 0 auto;
}

.jursoc-claustros-item + .jursoc-claustros-item::before {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	width: 1px;
	height: 1rem;
	background: #d4dde8;
	transform: translateY(-50%);
	pointer-events: none;
}

.jursoc-claustros-nav__anchor {
	display: inline-flex !important;
	align-items: center;
	padding: 0.35rem 0.85rem !important;
	border: none !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	text-decoration: none !important;
	color: #3d5166 !important;
	font-family: inherit;
	cursor: pointer;
	transition: color 0.2s ease;
	position: relative;
}

.jursoc-claustros-nav__anchor::before,
.jursoc-claustros-nav__anchor::after {
	display: none !important;
}

.jursoc-claustros-link {
	display: inline-flex;
	align-items: center;
	gap: 0.42rem;
	line-height: 1.2;
	white-space: nowrap;
}

.jursoc-claustros-link__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	color: var(--claustro-color, #003366);
	opacity: 0.9;
	transition: opacity 0.2s ease, color 0.2s ease;
}

.jursoc-claustros-link__icon .jursoc-svg-icon {
	width: 1.05rem;
	height: 1.05rem;
	stroke: currentColor;
	stroke-width: 1.75;
}

.jursoc-claustros-link__label {
	font-size: 0.84rem;
	font-weight: 550;
	letter-spacing: 0.01em;
	color: inherit;
}

.jursoc-claustros-nav__anchor:hover,
.jursoc-claustros-nav__anchor:focus-visible {
	color: var(--claustro-color-dark, #003366) !important;
	background: transparent !important;
	box-shadow: none !important;
	transform: none !important;
}

.jursoc-claustros-nav__anchor:hover .jursoc-claustros-link__icon,
.jursoc-claustros-nav__anchor:focus-visible .jursoc-claustros-link__icon {
	opacity: 1;
	color: var(--claustro-color, #003366);
}

.jursoc-claustros-nav__anchor:focus-visible {
	outline: 2px solid var(--claustro-color, #003366);
	outline-offset: 3px;
	border-radius: 4px;
}

.jursoc-claustros-nav__anchor.is-claustro-open,
.jursoc-claustros-item.current-menu-item > .jursoc-claustros-nav__anchor,
.jursoc-claustros-item.current_page_item > .jursoc-claustros-nav__anchor {
	color: var(--claustro-color-dark, #003366) !important;
	background: transparent !important;
}

.jursoc-claustros-nav__anchor.is-claustro-open .jursoc-claustros-link__label,
.jursoc-claustros-item.current-menu-item > .jursoc-claustros-nav__anchor .jursoc-claustros-link__label,
.jursoc-claustros-item.current_page_item > .jursoc-claustros-nav__anchor .jursoc-claustros-link__label {
	font-weight: 650;
}

.jursoc-claustros-nav__anchor.is-claustro-open::after,
.jursoc-claustros-item.current-menu-item > .jursoc-claustros-nav__anchor::after,
.jursoc-claustros-item.current_page_item > .jursoc-claustros-nav__anchor::after {
	content: "" !important;
	display: block !important;
	position: absolute;
	left: 0.85rem;
	right: 0.85rem;
	bottom: 0.15rem;
	height: 2px;
	border-radius: 999px;
	background: var(--claustro-color, #003366);
}

@media (min-width: 1025px) and (max-width: 1280px) {
	.jursoc-claustros-nav__anchor {
		padding: 0.3rem 0.55rem !important;
	}

	.jursoc-claustros-link__label {
		font-size: 0.8rem;
	}
}

#mobile-header,
#mobile-header .site-header-row-container-inner {
	background: #fff !important;
}

#mobile-header .site-header-row {
	justify-content: space-between !important;
	align-items: center;
}

#mobile-header .site-header-section-left {
	justify-content: flex-start;
}

#mobile-header .site-header-section-right {
	justify-content: flex-end;
	margin-left: auto;
}

#mobile-header .site-branding {
	text-align: left;
}

#mobile-header .site-branding .custom-logo,
#mobile-header .site-branding .jursoc-brand-logo {
	max-height: 48px;
	max-width: min(320px, 58vw);
}

#mobile-menu.jursoc-claustros-menu {
	flex-direction: column;
	align-items: stretch;
	gap: 0;
	padding: 0.5rem 0 !important;
}

#mobile-drawer .jursoc-claustros-item {
	width: 100%;
}

#mobile-drawer .jursoc-claustros-item + .jursoc-claustros-item::before {
	display: none;
}

#mobile-drawer .jursoc-claustros-nav__anchor {
	width: 100%;
	justify-content: flex-start;
	padding: 0.75rem 0.5rem !important;
	border-bottom: 1px solid #e8eef4 !important;
}

#mobile-drawer .jursoc-claustros-link__icon .jursoc-svg-icon {
	width: 1.2rem;
	height: 1.2rem;
}

#mobile-drawer .jursoc-claustros-link__label {
	font-size: 0.95rem;
}

@media (max-width: 1024px) {
	.site-branding .custom-logo,
	.site-branding .jursoc-brand-logo {
		max-height: 48px;
		max-width: min(280px, 55vw);
	}
}

.main-navigation .primary-menu-container > ul.jursoc-claustros-menu > li.menu-item > a.jursoc-claustros-nav__anchor {
	padding: 0.35rem 0.85rem !important;
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
}

.main-navigation .primary-menu-container > ul.jursoc-claustros-menu > li.menu-item.current-menu-item > a.jursoc-claustros-nav__anchor,
.main-navigation .primary-menu-container > ul.jursoc-claustros-menu > li.menu-item.current_page_item > a.jursoc-claustros-nav__anchor {
	background: transparent !important;
	color: var(--claustro-color-dark, #003366) !important;
	box-shadow: none !important;
}

.main-navigation .primary-menu-container > ul.jursoc-claustros-menu > li.menu-item.current-menu-item > a .jursoc-claustros-link__label,
.main-navigation .primary-menu-container > ul.jursoc-claustros-menu > li.menu-item.current_page_item > a .jursoc-claustros-link__label {
	color: inherit !important;
}

@media (prefers-reduced-motion: reduce) {
	.jursoc-claustros-nav__anchor,
	.jursoc-claustros-link__icon {
		transition: none;
	}
}
