/**
 * @file
 * Visual styles for menu.
 */

/* Toggle */

#masthead a#menu-toggle {
	width: 60px;
	height: 40px;
	display: block;
	text-indent: -999em;
	background: url(../../img/ico_hamburguer.svg) no-repeat right center;
	z-index: 98;
}

#masthead a#menu-toggle.menu-opened {
	width: 50px;
	height: 50px;
	background: url(../../img/ico_close.svg) no-repeat center center;
	position: fixed;
	top: 0.5vw;
	right: 0.5vw;
	z-index: 100;
}

#masthead a#menu-toggle:hover {
	cursor: pointer;
}

/* Overlay general */

#masthead .menu-container {
	margin: 0;
	padding: var(--gapL) 0;
	list-style: none outside;
	background-color: #fff;
	position: fixed;
	right: 0;
	bottom: 0;
	left: 0;
	top: 0;
	width: 100%;
	height: 100vh;
	overflow: auto;
	overscroll-behavior: none;
	scrollbar-width: none; /* For Firefox */
	-ms-overflow-style: none; /* For Internet Explorer and Edge */
	z-index: 99;
	font-size: var(--font36);
	font-weight: 500;
}

#masthead .menu-container::-webkit-scrollbar {
	display: none; /* For Chrome, Safari, and Opera */
}

/* Menú + cercador */

#masthead .region-primary-menu {
	display: flex;
	flex-direction: column;
}

#masthead .region-primary-menu .block-menu {
	order: 1;
}

#masthead .region-primary-menu .search-block-form {
	order: 2;
}

#masthead ul.menu {
	margin: 0;
	padding: 0;
	column-width: 500px;
	column-gap: var(--gapXL);
	list-style-type: none;
}

#masthead .menu-item {
	margin: 0;
	padding-top: 0.2em;
}

#masthead ul.menu a {
	display: flex;
	align-items: center;
}

#masthead ul.menu a.is-active {
	font-weight: 900;
}

/* Cercador dins menu */

#search-block-form {
	margin: var(--gapM) 0;
	display: flex;
	align-items: center;
}

#search-block-form .form-item {
	margin: 0;
	padding: 0;
	background-color: transparent;
	flex: none;
}

#search-block-form input[type="search"] {
	appearance: none;
	border: none;
	border-bottom: 2px solid #000;
	width: 250px;
	padding: 10px;
	font-size: var(--font22);
}

#search-block-form input[type="submit"] {
	width: var(--font36);
	height: var(--font36);
	display: block;
	text-indent: -999em;
	background: url(../../img/ico_lupa.svg) no-repeat center center;
	border: none;
	padding: 0;
	background-size: var(--font24) auto;
}

/* idioma */

.language-switcher-language-url ul.links {
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: var(--gapXS);
	font-size: var(--font22);
	font-weight: 400;
	list-style-type: none;
}

.language-switcher-language-url ul.links li a {
	border: var(--border);
	padding: 0.25em 1em;
	border-radius: 50px;
	display: flex;
}

ul.links li.is-active {
	font-weight: 900;
}

/* Language dropdown styles */

ul.links,
ul.links li {
	display: none;
}

.language-dropdown {
	position: relative;
	display: inline-block;
}

.language-dropdown-button {
	border: none;
	padding: 0 1em;
	text-transform: none;
	font-weight: 600;
	background: white;
	cursor: pointer;
	font-size: var(--font18);
	display: flex;
	align-items: center;
	gap: 0.5em;
}

.dropdown-arrow {
	transition: transform 0.2s ease;
}

.language-dropdown.open .dropdown-arrow {
	transform: rotate(180deg);
}

.language-dropdown-menu {
	position: absolute;
	top: 100%;
	left: 0;
	background: white;
	min-width: 100%;
	z-index: 1000;
	margin: 0;
	padding: 1em 0;
	list-style: none;
	display: none;
}

.language-dropdown.open .language-dropdown-menu {
	display: block;
}

.language-dropdown-menu li {
	margin: 0;
}

.language-dropdown-menu a {
	display: block;
	padding: 0.25em 1em;
	text-decoration: none;
	color: inherit;
	border-radius: 0;
	border: none;
}

.language-dropdown-menu a:hover {
	background: #f5f5f5;
}

.language-dropdown-menu li:first-child a {
	border-radius: 8px 8px 0 0;
}

.language-dropdown-menu li:last-child a {
	border-radius: 0 0 8px 8px;
}

@media screen and (min-width: 768px) {
	#masthead a#menu-toggle {
		background-position: center center;
		height: 50px;
		/*	position: fixed;
		top: 0;
		right: 20px;*/
		z-index: 9999;
	}

	.language-switcher-language-url ul.links {
		gap: var(--gapS);
	}

	.language-switcher-language-url ul.links li a {
		border: none;
		padding: 0;
		border-radius: 0;
	}
}

@media screen and (min-width: 1200px) {
	/*#masthead ul.menu a::before{
content: url(../../img/ico_fletxa_right.svg);
margin-right: 20px;
display: flex;
opacity: 0;
transition: opacity: 0.2;
}

#masthead ul.menu a:hover::before {
opacity: 0.5;
transition: opacity: 0.2;
}

#masthead ul.menu a.is-active::before,
#masthead ul.menu li:hover a:active::before {
opacity: 1;
}

#masthead .region-primary-menu .search-block-form,
.language-switcher-language-url ul.links {
padding: 0 60px;
}*/
}
