@layer base {
	:root {
		color-scheme: light dark;
		/* Base Fonts */
		--default-bold-font: "et-book-bold-line-figures" Tahoma sans-serif;
		--default-italic-font: "et-book-display-italic-old-style-figures" Tahoma
			sans-serif;
		--default-font: "et-book-roman-line-figures" Tahoma sans-serif;
		--default-old-style-font: "et-book-roman-old-style-figures" serif;
		--default-semi-bold-font: "et-book-semi-bold-old-style-figures" Tahoma
			sans-serif;

		--font-size-default: 1rem;
		--font-size-h1: 1.8rem;

		/* Base Light colours */
		--default-color-light: #333;
		--highlight-color-light: purple;
		--background-color-light: #fff9e3;
		--alternate-background-color-light: #fbc95c;
		/* Base Dark colours */
		--highlight-color-dark: magenta;
		--default-color-dark: #fff;
		--background-color-dark: #333;
		--alternate-background-color-dark: #111;

		/* Default colors (Light and Dark) */
		--default-color: light-dark(
			var(--default-color-light),
			var(--default-color-dark)
		);
		--highlight-color: light-dark(
			var(--highlight-color-light),
			var(--highlight-color-dark)
		);
		--background-color: light-dark(
			var(--background-color-light),
			var(--background-color-dark)
		);

		--alternate-background-color: light-dark(
			var(--alternate-background-color-light),
			var(--alternate-background-color-dark)
		);
	}

	body {
		font-family: var(--default-font);
		background-color: var(--background-color);
		color: var(--default-color);
	}
	html,
	body {
		height: 100%;
	}
	/**********/
	/* Header */
	/**********/
	header.site-header {
		width: 100%;
		background-color: var(--alternate-background-color);
		box-shadow: 0 2px 5px #333;
		position: sticky;
		top: 0;
		font-size: var(--font-size-h1);
	}

	header-wrapper {
		padding: 0.2rem 1rem;
		/* 		max-width: 1200px;
 */ min-height: 3.5rem;
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin-inline: auto;
		background-color: var(--alternate-background-color);
		& > div {
			line-height: 2rem;
			max-width: fit-content;
			display: flex;
			flex-direction: row;
			gap: 1rem;
			justify-content: space-between;
			@media (width >= 64rem) {
				flex-direction: row;
			}
		}

		hamburger-menu {
			display: none;
			flex-direction: column;
			cursor: pointer;
			gap: 0.5rem;
			span {
				width: 25px;
				height: 3px;
				background-color: var(--highlight-color);
				border-radius: 2px;
				transition: all 0.3s ease;
			}
		}
		nav#main-menu {
			max-width: max-content;
			align-items: center;
			margin-inline: auto;
			background-color: var(--alternate-background-color);
			display: flex;
			flex: 1;
			justify-content: space-between;
			ul {
				list-style: none;
				display: flex;
				flex-direction: column;
				gap: 2rem;
				margin: 3px;
				@media (width >= 64rem) {
					flex-direction: row;
					li {
						line-height: 2rem;
						transition: 0.3s ease;
					}
					li:hover {
						border-bottom: var(--highlight-color) dashed 1px;
						transform: scale(1.2);
					}
				}
			}
		}

		/***************************/
		/* Hamburger Menu (Mobile) */
		/***************************/
		@media (max-width: 768px) {
			header-wrapper {
				flex-direction: column;
				align-items: center;
			}
			hamburger-menu {
				display: flex;
				&.active {
					span:nth-child(1) {
						transform: rotate(45deg) translate(10px, 10px);
					}
					span:nth-child(2) {
						opacity: 0;
					}
					span:nth-child(3) {
						transform: rotate(-45deg) translate(7px, -7px);
					}
				}
			}

			nav#main-menu {
				position: absolute;
				top: 100%;
				left: 0;
				right: 0;
				max-height: 0;
				max-width: 100%;
				margin: 0;
				overflow: scroll;
				transition: max-height 0.3s ease;
				border-bottom: 1px solid var(--background-color);
				flex-direction: column;
				&.active {
					max-height: 300px;
				}
				ul {
					flex-direction: column;
					gap: 0;
					padding: 1rem;
					width: 100%;
					li {
						width: 100%;
						padding: 0.2rem 0;
						&:last-child {
							border-bottom: none;
						}
						&:hover,
						&:active {
							background-color: var(--highlight-color);
							a {
								color: var(--default-color);
							}
						}
					}
				}
			}
		}
	}

	/********/
	/* Main */
	/********/

	main {
		max-height: fit-content;
		margin-bottom: 2rem 1rem;
	}

	footer.site-footer {
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
		gap: 1rem;
		padding: 0 1rem;
		div.copyrigth {
			display: flex;
			flex-direction: row;
			gap: 0.5rem;
		}
	}

	/**************/
	/* Taxonomies */
	/**************/

	taxonomy-term {
		taxonomy-name {
			font-size: larger;
			sup {
				opacity: 60%;
			}
			&::after {
				content: ":";
			}
		}
	}
	taxonomy-name {
		padding: 0 0.8rem;
		/*  
		border: 1px solid var(--highlight-color);
		background-color: var(--alternate-background-color);
		clip-path: polygon(5% 0, 100% 0, 95% 100%, 0 100%); 
		*/
		/* background-image: url(../images/eitiqueta.svg);
		background-repeat: no-repeat;
		background-size: 100% 100%;
		 */
		font-family: "Cooper Regular Italic", monospace;
		margin-right: 0.8rem;
		white-space: nowrap;
		/*&::before {
			content: "#";
			color: var(--highlight-color);
						background-color: var(--highlight-color);
 			width: 10px;
			height: 10px;
			box-sizing: border-box;
			display: inline-block;
			border-radius: 10px;
			border: 1px solid;
			vertical-align: middle;
			margin-right: 5px; 
		}*/
	}

	pages-list {
		a.taxonomy-term-page-link {
			margin-left: 0.5rem;
			&::after {
				content: ",";
			}
		}
		a:first-child {
			margin-left: 0;
		}
		a:last-child {
			&::after {
				content: "";
			}
		}
		item-footer {
			border-bottom: 1px solid var(--highlight-color);
		}
	}
}

@layer utilities {
	small {
		font-size: 80%;
	}
	/* Links */
	nav#main-menu {
		li:hover a {
			color: var(--default-color);
		}
	}
	a {
		color: var(--highlight-color);
		text-decoration: none;
		&:hover {
			border-bottom: 1px solid var(--highlight-color);
		}
	}

	.paginator-active {
		font-weight: bold;
		font-size: larger;
		color: var(--highlight-color);
	}
	/* Anchor links */
	main a.anchor-link {
		/* 		display: none;
 */ opacity: 0.6;
		font-size: 80%;
		margin-left: 0.5rem;
		svg {
			max-width: 2rem;
			vertical-align: middle;
		}
	}

	h1:hover,
	h2:hover,
	h3:hover {
		a.anchor-link {
			display: inline;
			border-bottom: none;
		}
	}

	hr {
		border-color: var(--highlight-color);
	}

	/* audio */
	div.session-audio {
		figure.audio-player {
			audio {
				border: 2px solid var(--highlight-color);
				border-radius: 50px;
			}
		}
	}
}
