/* Copia de public/css/navbar.css de offs.es (ver offs_navbar.php).
 *
 * La única diferencia es el reset del principio: en offs.es es global (*, body)
 * y aquí se limita al menú para no tocar los estilos de Silicio. El resto debe
 * seguir siendo idéntico al original: si cambia allí, se copia aquí. */

/* Alto del menú (.oe-navbar). Los layouts de Silicio lo restan del suyo. */
:root {
	--offs-navbar-h: 120px;
}

:where(.oe-navbar, .oe-navbar *, .oe-mobile-menu, .oe-mobile-menu *) {
	margin: 0;
	padding: 0;
	font-family: 'Exo', 'Roboto', 'Courier New', sans-serif;
	box-sizing: border-box;
}

/* Lo que en offs.es aporta theme.css / critical-css a los elementos del menú.
   :where() deja la especificidad en 0, como el * y el a de offs.es, para que
   las reglas de abajo ganen igual que allí. */
:where(.oe-navbar, .oe-mobile-menu) a {
	color: #beefbe;
	text-decoration: none;
}

:where(.oe-navbar, .oe-mobile-menu) {
	-webkit-font-smoothing: antialiased;
	line-height: normal;
	font-size: 16px;
}

/* ============================================================
   Navbar sticky con efecto cristal
   ============================================================ */

.oe-navbar {
	position: sticky;
	top: 0;
	z-index: 2000;
	width: 100%;
	height: 120px;
	padding: 0 40px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: rgba(35, 35, 35, 0.78);
	-webkit-backdrop-filter: blur(14px);
	backdrop-filter: blur(14px);
	border-bottom: 1px solid rgba(190, 239, 190, 0.12);
	transition: background 0.35s ease, box-shadow 0.35s ease, height 0.35s ease;
}

.oe-navbar.scrolled {
	height: 120px;
	background: rgba(29, 29, 29, 0.92);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

/* Logo */
.oe-logo {
	display: flex;
	align-items: center;
}

.oe-logo img {
	width: 120px;
	display: block;
	transition: transform 0.3s ease, filter 0.3s ease;
}

.oe-logo img:hover {
	transform: scale(1.04);
	filter: drop-shadow(0 0 10px rgba(152, 255, 152, 0.45));
}

/* Menú de escritorio */
.oe-menu {
	display: flex;
	align-items: center;
	gap: 26px;
}

.oe-menu-item {
	position: relative;
	color: #ceefce;
	text-decoration: none;
	font-size: 0.98rem;
	font-weight: 500;
	letter-spacing: 0.03em;
	padding: 6px 2px;
	transition: color 0.3s;
}

.oe-menu-item:hover {
	color: #ffffff;
	cursor: pointer;
}

/* Línea inferior con gradiente */
.oe-menu-item::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -2px;
	height: 2px;
	width: 100%;
	background: linear-gradient(90deg, #98ff98, rgba(152, 255, 152, 0));
	border-radius: 2px;
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.oe-menu-item:hover::after {
	transform: scaleX(1);
}

.oe-start-btn {
	padding: 11px 26px;
	display: inline-block;
	text-align: center;
	text-decoration: none;
	color: #1d1d1d;
	font-weight: 700;
	font-size: 0.95rem;
	letter-spacing: 0.02em;
	background: linear-gradient(120deg, #beefbe, #98ff98);
	border: none;
	border-radius: 50px;
	box-shadow: 0 0 0 rgba(152, 255, 152, 0);
	transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.oe-start-btn:hover {
	box-shadow: 0 0 22px rgba(152, 255, 152, 0.45);
	transform: translateY(-2px);
	cursor: pointer;
}

/* Elemento para el toggle en móvil */
.oe-mobile-navbar {
	display: none;
}

/* Estilos para móvil */
@media (max-width: 900px) {

	.oe-navbar {
		padding: 0 20px;
	}

	/* Ocultamos el menú de escritorio */
	.oe-menu {
		display: none;
	}

	/* Mostramos la barra móvil con toggle y botón Comenzar */
	.oe-mobile-navbar {
		display: flex;
		align-items: center;
		gap: 20px;
	}

	.oe-toggle-icon {
		background: none;
		border: none;
		font-size: 1.8rem;
		color: #beefbe;
		cursor: pointer;
		transition: color 0.3s;
	}

	.oe-toggle-icon:hover {
		color: #ffffff;
	}

	/* Menú lateral móvil */
	.oe-mobile-menu {
		position: fixed;
		top: 0;
		left: 0;
		width: 300px;
		height: 100vh;
		height: 100dvh;
		background: rgba(29, 29, 29, 0.97);
		-webkit-backdrop-filter: blur(10px);
		backdrop-filter: blur(10px);
		border-right: 1px solid rgba(190, 239, 190, 0.15);
		padding: 80px 28px 28px;
		transform: translateX(-100%);
		transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
		z-index: 3000;
	}

	.oe-mobile-menu.active {
		transform: translateX(0);
		box-shadow: 30px 0 60px rgba(0, 0, 0, 0.5);
	}

	/* Botón de cerrar ("X") en el menú móvil */
	.oe-close-menu {
		position: absolute;
		top: 20px;
		right: 20px;
		background: none;
		border: none;
		font-size: 2rem;
		color: #beefbe;
		cursor: pointer;
	}

	/* Estilos para las opciones del menú móvil */
	.oe-mobile-menu .oe-menu-item {
		display: block;
		margin-bottom: 8px;
		padding: 14px 12px;
		color: #ceefce;
		font-size: 1.05rem;
		text-decoration: none;
		border-radius: 10px;
		border-left: 2px solid transparent;
		transition: color 0.3s, background 0.3s, border-color 0.3s;
		position: static;
	}

	.oe-mobile-menu .oe-menu-item:hover {
		color: #ffffff;
		background: rgba(152, 255, 152, 0.08);
		border-left-color: #98ff98;
	}

	/* Se deshabilita el efecto de línea inferior en móvil */
	.oe-mobile-menu .oe-menu-item::after {
		display: none;
	}
}

/* Ocultar menú móvil en pantallas grandes */
@media (min-width: 901px) {
	.oe-mobile-menu {
		display: none;
	}
}

/* Ajustes para pantallas medianas (901px - 1024px) */
@media (min-width: 901px) and (max-width: 1024px) {
	.oe-menu {
		gap: 30px;
	}
	.oe-menu-item {
		font-size: 0.85rem;
	}
	.tutor-header-profile-name {
		max-width: 110px;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}
}

/* Contenedor relativo para posicionar el submenu */
.tutor-header-profile-menu-items {
	position: relative;
	display: inline-block;
}

/* Hidden by default */
.tutor-header-submenu {
	position: absolute;
	top: 100%;
	right: 0;
	visibility: hidden;
	opacity: 0;
	transition: opacity .2s ease, visibility .2s ease;
	z-index: 1000;
}

/* Pointer (triángulo) si quieres */
.tutor-header-submenu::before {
	content: "";
	position: absolute;
	top: -10px;
	right: 20px;
	border-width: 0 10px 10px 10px;
	border-style: solid;
	border-color: transparent transparent #f5f7fa transparent;
}

/* Cuando pases el ratón sobre el span o el contenedor, aparece */
.tutor-header-profile-menu-items:hover .tutor-header-submenu {
	visibility: visible;
	opacity: 1;
}

/* Asegúrate de que .tutor-header-submenu tenga tu estilo base */
.tutor-header-submenu {
	background-color: #f5f7fa;
	display: flex;
	padding: 20px;
	border-radius: 8px;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Ajustes adicionales (copiados y adaptados) */
.tutor-submenu-login-section {
	background: linear-gradient(318.61deg, #70d870, #3e7042 96.92%), #fff;
	padding: 15px;
	border-radius: 6px;
	display: flex;
	align-items: center;
}

/***************************************/
/* Estilos pertenecientes al user-menu */
/***************************************/

/* ─────────── 1) Contenedor que engloba usuario + sub‑menú ─────────── */
.user-menu {
	display: flex;
	align-items: center;
	cursor: pointer;
	position: relative;
	/* para que .submenu-content absolute quede relativo a este */
	z-index: 100;
	/* por encima de otros elementos */
	overflow: visible;
}

/* ─────────── 2) Avatar más pequeño ─────────── */
.user-profile-photo {
	width: 45px;
	height: 45px;
}

.avatar {
	border-radius: 50%;
	border: 2px solid #beefbe;
	width: 38px;
	height: 38px;
}

/* ─────────── 3) “Hola” + nombre ─────────── */
.tutor-header-profile-content-text {
	font-size: 13px;
	color: #819c81;
	font-weight: 500;
	line-height: 1.2;
	margin-right: 6px;
}

/* El nombre en negrita y verde claro */
.tutor-header-profile-name {
	font-size: 16px;
	font-weight: 700;
	/* negrita */
	color: #98ff98;
	/* tu verde */
	line-height: 1.2;
}

/* al hover sobre el .user-menu o sobre el menú en sí, se muestra */
.user-menu:hover+.submenu-content,
.submenu-content:hover {
	visibility: visible;
	opacity: 1;
	pointer-events: auto;
}

.submenu-content::before {
	content: "";
	position: absolute;
	top: -6px;
	/* 8px encima del contenedor */
	right: 32px;
	/* ubicas el triángulo apuntando al avatar */
	border-left: 8px solid transparent;
	border-right: 8px solid transparent;
	border-bottom: 8px solid #f5f7fa;
	/* mismo color de fondo */
	/* si quieres sombra: */
	box-shadow: -1px -1px 1px rgba(0, 0, 0, 0.1);
}


/* ─────────── Contenedor general del sub‑menú ─────────── */
.submenu-content {
	width: 655px;
	position: absolute;
	top: 64px;
	/* right: -35px; */
	right: 0;
	background-color: #f5f7fa;
	display: flex;
	transition: 0.3s;
	height: auto;
	visibility: hidden;
	opacity: 0;
	z-index: 1000;
	font-family: "Roboto", sans-serif;
	pointer-events: none;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* ─────────── Sección 1: login ─────────── */
.submenu-login-section {
	background: linear-gradient(318.61deg, #70d870, #3e7042 96.92%), #fff;
	width: 33.33%;
	min-height: 100%;
	padding-left: 35px;
	padding-top: 10px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	color: #fff;

}

.submenu-login-section-avatar img {
	width: 26px;
	height: 26px;
}

.submenu-login-section-content {
	font-size: 24px;
	padding-bottom: 30px;
}

.submenu-login-section-profile {
	margin-top: 10px;
	font-weight: 600;
}

.submenu-login-section-profile2 {
	line-height: 1.5em;
	font-size: 14px;
	margin-top: 10px;
}


.submenu-login-a {
	background-color: rgba(0, 0, 0, 0.2);
	height: 44px;
	width: 44px;
	font-size: 16px;
	color: #fff;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	transition: background-color 0.2s;
}

.submenu-login-a:hover {
	background-color: rgba(0, 0, 0, 0.35);
}

.submenu-links {
	width: 33.33%;
	position: relative;
	padding: 30px 10px;
}


.submenu-links ul {
	padding-left: 2rem;
	list-style: none;
}

.submenu-links ul li a {
	box-sizing: border-box;
	display: block;
	font-size: 16px;
	font-weight: 420;
	color: #000;
	line-height: 1.75em;
	padding: 8px;
	text-decoration: none;
}

.submenu-links ul li button {
	box-sizing: border-box;
	display: block;
	font-size: 16px;
	font-weight: 420;
	color: #000;
	line-height: 1.75em;
	padding: 8px;
	text-decoration: none;
	background: none;
	border: none;
	cursor: pointer;
	width: 100%;
	text-align: left;
}

.submenu-links button:hover {
  color: #039b03;
}

.submenu-links ul li form {
	display: inline;
}

.submenu-links ul li a:hover {
	color: #039b03;
}

.submenu-links a:hover {
	color: #3e7042;
}



.submenu-links a:hover {
	color: #3e7042;
}

.submenu-content.is-visible {
	visibility: visible;
	opacity: 1;
}

@media (max-width: 900px) {
	.tutor-header-profile-name {
		font-size: 14px;
		max-width: 110px;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}
	/* Hacer foco‑able el user‑menu para usar focus‑within */
	.user-menu {
	  /* Si no quieres tab‑navegación, usa sólo active */
	  cursor: pointer;
	  outline: none;       /* opcional: quita outline si no quieres verlo */
	}
	/* Al hacer “tap” (active) o al entrar en foco (focus‑within),
	   abrimos el submenu igual que en hover */
	.user-menu:active + .submenu-content,
	.user-menu:focus-within + .submenu-content {
	  visibility: visible;
	  opacity: 1;
	  pointer-events: auto;
	}
  }
  
/* ──────────────────────────────────────────
	 Layout “mobile”: < 767 px
	 ────────────────────────────────────────── */
@media (max-width: 767px) {

	/* contenedor pasa a GRID y apila sus hijos */
	.submenu-content {
		width: 300px;
		right: 0;
		/* que ocupe todo el ancho */
		display: grid;
		grid-template-columns: 1fr;
		grid-template-areas:
			"links‑1"
			"links‑2"
			"login";
	}

	.submenu-links {
		width: 100%;
		padding: 15px;
	}

	.submenu-content>.submenu-links:nth-child(2) {
		grid-area: links‑1;
		width: 100%;
		padding-bottom: 0px !important;
		margin-bottom: 0px !important;
	}

	.submenu-content>.submenu-links:nth-child(3) {
		grid-area: links‑2;
		width: 100%;
		padding-top: 0px !important;
		margin-top: 0px !important;
	}

	/* 3.º – sección de login (pasa al final) */
	.submenu-login-section {
		grid-area: login;
		width: 300px;
		min-height: auto;
		/* ya no necesitamos 100 % del alto padre */
		padding: 25px 35px;
	}

	/* Ajustes menores para listas */

	.submenu-links ul {
		width: 100%;
		padding-left: 0;
		/* elimina sangría sobrante */

	}

	.submenu-login-btn {
		display: none;
	}

	.submenu-login-section-content {
		font-size: 24px;
		padding-bottom: 0px;
	}

	.submenu-login-section-avatar {
		display: none;
	}


	.submenu-login-section-profile {
		margin-top: 10px;
		font-weight: 500;
		font-size: 20px;
	}

	.submenu-links ul li a {
		box-sizing: border-box;
		display: block;
		font-size: 16px;
		font-weight: 450;
		color: #000;
		line-height: 1.75em;
		padding: 6px;
		text-decoration: none;
	}

	.submenu-links ul li button {
		box-sizing: border-box;
		display: block;
		font-size: 16px;
		font-weight: 450;
		color: #000;
		line-height: 1.75em;
		padding: 6px;
		text-decoration: none;
		background: none;
		border: none;
		cursor: pointer;
		width: 100%;
		text-align: left;
	}
}

/* ============================================================
   Pestaña para ocultar/mostrar el menú (sólo Silicio)
   Cuelga del borde inferior del menú; al ocultarlo, --offs-navbar-h pasa a 0
   y los layouts que la restan recuperan ese alto. z-index justo por debajo
   del menú para que su desplegable de usuario quede por encima.
   ============================================================ */
.oe-nav-toggle {
	position: fixed;
	top: var(--offs-navbar-h);
	right: 2rem;
	z-index: 1999;
	display: grid;
	place-items: center;
	width: 2.75rem;
	height: 1.25rem;
	margin: 0;
	padding: 0;
	background: rgba(35, 35, 35, 0.78);
	-webkit-backdrop-filter: blur(14px);
	backdrop-filter: blur(14px);
	border: 1px solid rgba(190, 239, 190, 0.12);
	border-top: none;
	border-radius: 0 0 8px 8px;
	color: #beefbe;
	font-size: 0.7rem;
	line-height: 1;
	cursor: pointer;
	transition: color 0.2s ease, background 0.2s ease;
}

.oe-nav-toggle:hover {
	color: #ffffff;
	background: rgba(29, 29, 29, 0.92);
}

.oe-nav-toggle:focus-visible {
	outline: 1px solid #beefbe;
	outline-offset: 2px;
}

html.oe-nav-collapsed {
	--offs-navbar-h: 0px;
}

html.oe-nav-collapsed .oe-navbar,
html.oe-nav-collapsed .oe-mobile-menu {
	display: none;
}
