/* Menú, barra superior, pie y header fijo */
.main-header .login-btn {
		position: relative;
		float: left;
		margin-right: 14px;
	}
	.main-header .login-btn > a {
		display: block;
		color: #1c3545;
		font-size: 18px;
		line-height: 40px;
	}
	.main-header .login-btn > a.melo-aprendizaje {
		color: #f4718a;
		font-size: 22px;
	}
	/* Festón ondulado del menú (estilo tejido/crochet) sobre el slider.
	   Hecho con UN solo radial-gradient (sin archivo SVG ni máscaras multicapa),
	   porque Chrome ignora las máscaras con SVG externo y las multicapa en este equipo. */
	.main-header .menu_wave {
		position: absolute;
		left: 0;
		right: 0;
		bottom: 0;
		top: auto;
		width: 100%;
height: 30px;
    margin-bottom: -14px;
		padding-bottom: 0;
		background-color: #fff;
		/* Onda suave (sinusoidal) como la plantilla original: ciclo 90px, amplitud 24px */
		-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 90 30' preserveAspectRatio='none'%3E%3Cpath d='M0,0H90V3C67.5,3 67.5,27 45,27C22.5,27 22.5,3 0,3Z'/%3E%3C/svg%3E") bottom center / 60px 15px repeat-x;
		mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 90 30' preserveAspectRatio='none'%3E%3Cpath d='M0,0H90V3C67.5,3 67.5,27 45,27C22.5,27 22.5,3 0,3Z'/%3E%3C/svg%3E") bottom center / 60px 15px repeat-x;
		filter: drop-shadow(0 4px 3px rgba(60,55,54,0.30));
		z-index: 3;
		pointer-events: none;
	}
	.main-footer {
		background-color: #4b4342 !important;
		position: relative;
		z-index: 2;
	}
	.main-footer .shape_one,
	.main-footer .shape_wrapper,
	.main-footer .footer-bottom {
		-webkit-mask-image: none !important;
		mask-image: none !important;
	}
	.main-footer .shape_inner {
		background-color: #4b4342;
	}
	.main-footer .footer-bottom {
		background-color: #3e3837;
	}
	.melo-footer-legal {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 16px;
		flex-wrap: wrap;
	}
	.melo-footer-legal p {
		margin: 0;
		flex: 1 1 220px;
		text-align: center;
	}
	.melo-footer-legal a {
		color: #fff;
		font-size: 14px;
		text-decoration: none;
		white-space: nowrap;
	}
	.melo-footer-legal a:hover {
		text-decoration: underline;
	}
	.melo-footer-legal a:focus-visible {
		outline: 2px solid #fff;
		outline-offset: 2px;
	}

	/* ── Topbar Melodiossa (barra de contacto sobre el menú) ── */
	.melo-topbar {
		background: linear-gradient(90deg, #ff7d93 0%, #ff9fb0 55%, #ffb3a7 100%);
		color: #fff;
		font-size: 13.5px;
		position: relative;
		z-index: 1100;
		overflow: visible;
	}
	.melo-topbar .auto-container,
	.melo-topbar__inner,
	.melo-topbar__links {
		overflow: visible;
	}
	.melo-topbar__inner {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 16px;
		min-height: 40px;
		padding: 6px 0;
		flex-wrap: wrap;
	}
	.melo-topbar__tag {
		margin: 0;
		font-size: 14px;
		color: #fff;
		/* font-weight: 600; */
		letter-spacing: .2px;
		display: flex;
		align-items: center;
		gap: 8px;
	}
	.melo-topbar__tag i { color: #fff2d6; }
	.melo-topbar__links {
		list-style: none;
		margin: 0;
		padding: 0;
		display: flex;
		align-items: center;
		gap: 18px;
	}
	.melo-topbar__links > li { line-height: 1; }
	.melo-topbar__links a {
		color: #fff;
		font-weight: 600;
		display: inline-flex;
		align-items: center;
		gap: 7px;
		transition: opacity .2s ease, background .2s ease;
	}
	.melo-topbar__links a:hover { opacity: .82; text-decoration: none; color: #fff; }
	.melo-topbar__links i { font-size: 14px; }
	.melo-topbar__social {
		display: inline-flex;
		align-items: center;
		gap: 9px;
		padding-left: 16px;
		border-left: 1px solid rgba(255,255,255,.45);
	}
	.melo-topbar__social a {
		width: 27px;
		height: 27px;
		border-radius: 50%;
		background: rgba(255,255,255,.22);
		justify-content: center;
		gap: 0;
	}
	.melo-topbar__social a:hover { background: rgba(255,255,255,.4); opacity: 1; }
	.melo-topbar__inicio { display: none; }
	.melo-topbar__cuenta { position: relative; padding-left: 16px; border-left: 1px solid rgba(255,255,255,.45); }
	.melo-cuenta { position: relative; }
	.melo-cuenta summary {
		list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
		color: #fff; font-weight: 700; min-height: 32px;
	}
	.melo-cuenta summary::-webkit-details-marker { display: none; }
	.melo-cuenta summary:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
	.melo-cuenta__avatar {
		width: 26px; height: 26px; border-radius: 999px; display: grid; place-items: center;
		background: #fff; color: #f4718a; font-size: 12px; font-weight: 700;
	}
	.melo-cuenta__menu {
		position: absolute; right: 0; top: calc(100% + 8px); z-index: 2; min-width: 220px;
		display: flex; flex-direction: column; align-items: stretch; gap: 4px;
		background: #fff; color: #4b4342; border-radius: 12px; padding: 12px;
		box-shadow: 0 12px 28px rgba(75,67,66,.16);
	}
	.melo-cuenta__who { margin: 0; font-weight: 700; }
	.melo-cuenta__mail { margin: 2px 0 10px; color: #6f6563; font-size: 12px; word-break: break-all; }
	.melo-topbar .melo-cuenta__menu a {
		display: flex; color: #9a3b45; font-weight: 700;
		padding: 8px 10px; border-radius: 8px;
	}
	.melo-topbar .melo-cuenta__menu a:hover { color: #9a3b45; opacity: 1; background: #fff1f4; }
	@media (max-width: 767px) {
		.melo-topbar { font-size: 12.5px; }
		.melo-topbar__tag { display: none; }
		.melo-topbar__inner { justify-content: center; }
		.melo-topbar__links { gap: 12px; flex-wrap: wrap; justify-content: center; }
		.melo-topbar__links .melo-topbar__mail span { display: none; }
	}

	/* ── Header sticky al hacer scroll (escritorio + móvil) ── */
	/* Desactivamos el sticky-header duplicado de la plantilla: fijamos el propio header. */
	.main-header .sticky-header { display: none !important; }
	/* Ítem activo del menú: el mismo turquesa en todas las páginas */
	.main-header .main-menu .navigation > li.current > a,
	.main-header .main-menu .navigation > li.current > a:hover,
	.main-header .main-menu .navigation > li.current > a:focus,
	.main-header .main-menu .navigation > li.current > a:visited,
	.main-header .main-menu .navigation > li:hover > a,
	.main-header .main-menu .navigation > li:hover > a:visited {
		color: #5fcac7;
	}
	.main-header .main-menu .navigation > li.current > a:before,
	.main-header .main-menu .navigation > li:hover > a:before {
		opacity: 1;
		border-color: #ff91a4;
		transform: scale(1);
	}
	.main-header .main-menu .navigation > li.dropdown > a .melo-nav-caret {
		display: inline-block;
		margin-left: 6px;
		font-size: 11px;
		line-height: 1;
		vertical-align: 2px;
		color: inherit;
		transition: transform 0.2s ease;
	}
	.main-header .main-menu .navigation > li.dropdown:hover > a .melo-nav-caret,
	.main-header .main-menu .navigation > li.dropdown:focus-within > a .melo-nav-caret {
		transform: rotate(180deg);
	}
	.main-header.melo-fixed {
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
		z-index: 1001;
		box-shadow: 0 6px 22px rgba(75, 67, 66, 0.15);
		animation: meloHeaderDown 0.4s cubic-bezier(0.22, 1, 0.36, 1);
	}
	@keyframes meloHeaderDown {
		from { transform: translateY(-14px); opacity: 0.2; }
		to   { transform: translateY(0); opacity: 1; }
	}
	@media (prefers-reduced-motion: reduce) {
		.main-header.melo-fixed { animation: none; }
	}
/* Foto del festón del pie de página */
.melo-footer-photo {
	background-image: url("../images/inicio/ima_2.webp");
}

/* Logo del header en móvil: la plantilla lo deja al 90% del ancho. */
@media only screen and (max-width: 1023px) {
	.mobile-header {
		margin: 0 14px;
		padding: 8px 0;
	}
	.mobile-header .logo {
		float: left;
		max-width: 78px;
	}
	.mobile-header .logo img {
		width: 78px;
		max-width:45px;
		height: auto;
		display: block;
	}
	.mobile-menu .nav-logo img {
		max-width: 92px;
		width: 92px;
		height: auto;
	}
	.mobile-menu .melo-nav-caret {
		display: none;
	}
	.mobile-header .login-btn {
		display: none;
	}
	.melo-topbar__tag { display: none; }
	.melo-topbar__inner { justify-content: stretch; }
	.melo-topbar__links {
		width: 100%;
		flex-wrap: nowrap;
		justify-content: center;
		gap: 8px;
	}
	.melo-topbar__inicio {
		display: list-item;
		margin-right: auto;
		flex: 0 0 auto;
	}
	.melo-topbar__inicio a {
		font-weight: 700;
	}
	.melo-topbar__cuenta {
		display: list-item;
		margin-left: auto;
		padding-left: 0;
		border-left: 0;
		flex: 0 0 auto;
	}
	.melo-topbar__cuenta .melo-cuenta summary span:last-child {
		max-width: 88px;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}
	.melo-topbar__links .melo-topbar__mail span { display: none; }
}

/* El panel del menú móvil queda por encima de la barra de contacto. */
body.mobile-menu-visible .main-header {
	z-index: 1300;
}
body.mobile-menu-visible .mobile-menu {
	z-index: 40;
}
