:root {
	--BODY-LINK-HOVER: #ff69b477;
	--BLOCK-COLOR: #ebe4cd;
	--BODY-BG: url("https://static.igem.wiki/teams/5645/wiki-images/body/body-lightmode-bg.webp");
}

:root[data-theme="dark"] {
	--BLOCK-COLOR: #3f342e;
	--BODY-BG: url("https://static.igem.wiki/teams/5645/wiki-images/body/body-darkmode-bg.webp");
}

body {
	background-image: var(--BODY-BG);
	color: var(--BODY-COLOR);
	overflow-x: hidden;
}

.ihp-page-container {
	display: flex;
	font-family: "Nunito", Calibri, sans-serif;
	justify-content: center;
	position: relative;
}

.nodes {
	position: absolute;
	left: -9vw;
	top: 50%;
	transform: translate(-50%, -50%);
	width: clamp(55px, 8vw, 80px);
	height: clamp(55px, 8vw, 80px);
	display: flex;
	justify-content: center;
	align-items: center;
	background-color: var(--BODY-BGCOLOR);
	border-radius: 50%;
	padding: 0.2rem;
	border: 3px solid #a956cd;
	z-index: 2;
}

.node-lines {
	width: 3px;
	height: 100%;
	background-color: var(--ACCENT-COLOR);
	z-index: 1;
	position: absolute;
	left: -9vw;
}

.nodes img {
	max-width: 100%;
}

.ihp-block {
	padding: 0 5vw;
	margin-bottom: 5vw;
	margin-left: max(9vw, 60px);
}

.meeting {
	display: flex;
	position: relative;
}

.ihp-contact-details {
	display: flex;
}

.date {
	text-align: center;
	font-size: min(2.4rem, 10vw);
	border-bottom: 3px solid var(--ACCENT-COLOR);
	max-width: fit-content;
	margin: 0 auto 4vh;
}

.meeting-summary {
	background-color: var(--BLOCK-COLOR);
	width: 100%;
	height: fit-content;
	/* display: flex; */
	flex-direction: row;
	justify-content: space-between;
	padding: 2vh 2vw;
	align-items: center;
	margin: 1vh 0;
	transition: all 0.2s ease-in-out;
	border-radius: 4px;
}

.ihp-contact {
	display: flex;
	justify-content: center;
	flex-direction: column;
	align-content: center;
	text-align: center;
	justify-items: center;
}

.ihp-contact img {
	border-radius: 0.5rem;
	border: 1px solid var(--BODY-COLOR2);
	height: max(12vw, 130px);
	width: max(18vw, 200px);
	align-self: center;
}

.summary-block {
	justify-content: space-between;
	align-items: flex-end;
	display: flex;
	/* min-height: 30vh; */
	position: relative;
	flex-direction: column;
	margin: 2rem;
}

.summary-block h4 {
	align-self: flex-start;
	font-size: min(1.5rem, 7vw);
	/* font-weight: 800;
	font-family: "Nimbu"; */
	font-weight: 700;
	padding: 0.5rem 0;
}

.summary-block h5 {
	align-self: flex-start;
	font-size: min(1.2rem, 5vw);
	margin: 0.5rem 0;
}

.summary-block p {
	text-indent: 2rem;
	padding-bottom: 1rem;
	font-size: min(1.2rem, 5vw);
	text-align: justify;
}

.summary-block .read-more {
	/* position: absolute; */
	/* text-align: right; */
	/* top: 10px; */
	font-size: min(1.2rem, 6vw);
	border-radius: 0.3rem;
	padding: 0.6rem 2rem;
	width: fit-content;
	background-color: #f8f3e2;
	color: #26211f;
	cursor: pointer;
	border: none;
	transition: all 0.2s ease-in-out;
	/* margin-right: 2rem; */
}

.read-more:hover {
	transform: scale(1.07);
}

.meeting-bg {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background-color: rgba(0, 0, 0, 0.1);
	z-index: 5;
	display: none;
}

.meeting-details {
	position: fixed;
	top: 15%;
	left: 50%;
	transform: translateX(-50%);
	width: 65vw;
	max-height: 80vh;
	padding: 3vw;
	background-color: var(--BODY-BGCOLOR);
	border-radius: 8px;
	box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
	z-index: 100;
	display: none;
	overflow-y: auto;
	scrollbar-width: none;
}

.meeting-details.active {
	display: block;
}

.close-btn {
	position: absolute;
	top: 10px;
	right: 10px;
	font-size: 1.5rem;
	background: none;
	border: none;
	cursor: pointer;
	color: #555555;
}

.right-container {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	position: sticky;
	top: 15vh;
	width: 15vw;
}

.timeline-container {
	position: sticky;
	top: 15vh;
	align-self: flex-start;
	width: 100%;
	transition: all 0.4s ease-in-out;
	margin-bottom: 2rem;
	height: 80vh;
}

.timeline ul {
	list-style-type: none;
}

.timeline li {
	transition: all 0.2s ease;
	font-family: "Nimbu";
	font-size: min(2.5rem, 6vw);
	border-left: 4px solid #7f3e9b7f;
	padding: 0.5vh 1vw;
}

.timeline ul li a {
	text-decoration: none;
	color: inherit;
}

.timeline li.active-month {
	border-left: 4px solid var(--ACCENT-COLOR);
}
.timeline li.active-month a {
	opacity: 1;
}

.timeline li.inactive-month {
	border-left: 4px solid #7f3e9b77;
}

.timeline li.inactive-month a {
	opacity: 0;
}

.timeline li.inactive-month:hover a {
	opacity: 0.5;
}

.month {
	scroll-margin-top: 80px;
}

.button-group {
	position: sticky;
	top: 80vh;
	align-self: flex-start;
	right: -25%;
}

.filter-btn {
	width: max(50px, 7vw);
	height: max(50px, 7vw);
	border-radius: 50%;
	background-color: var(--BODY-BGCOLOR);
	border: 3px solid #a956cd;
	cursor: pointer;
	padding: 0.5rem;
	transition: transform 0.5s ease, box-shadow 0.3s;
	transform: rotate(0deg);
}

.btn:hover {
	box-shadow: 0 0 5px 4px blueviolet;
	transition: transform 0.5s ease, box-shadow 0.3s;
}

.btn-spin {
	transform: rotate(360deg);
}

.filter-popup {
	position: absolute;
	bottom: 110%;
	width: 10vw;
	left: 50%;
	transform: translateX(-50%) scaleY(0);
	transform-origin: bottom center;
	transition: transform 0.3s ease-out, opacity 0.3s ease-out;
	background-color: var(--BODY-BGCOLOR);
	padding: 1.5rem 2rem;
	border-radius: 0.2rem;
	box-shadow: 0 1px 20px rgba(0, 0, 0, 0.15);
	font-size: 1rem;
	min-width: 220px;
	z-index: 40;
	opacity: 0;
	flex-direction: column;
	pointer-events: none;
}

.filter-popup.popup-visible {
	display: flex;
	transform: translateX(-50%) scaleY(1);
	opacity: 1;
	pointer-events: auto;
}

.filter-popup .close-btn {
	margin-right: 10px;
}

.filter-popup label {
	display: flex;
	align-items: center;
	cursor: pointer;
	font-weight: 600;
	gap: 0.5rem;
	transition: all 0.1s ease;
}

.filter-popup label:hover {
	color: var(--ACCENT-COLOR);
}
.filter-popup input[type="radio"] {
	accent-color: var(--ACCENT-COLOR);
	transform: scale(1.1);
}

.clear-filter {
	width: 100%;
	padding: 0.5rem 1rem;
	border: none;
	border-radius: 0.4rem;
	background-color: var(--ACCENT-COLOR);
	color: whitesmoke;
	cursor: pointer;
	font-size: 0.95rem;
	transition: background-color 0.2s ease;
}

.clear-filter:hover {
	background-color: #a956cd;
}

.meeting-details h2 {
	font-size: min(2.8rem, 10vw);
	text-align: center;
	padding: 5px 15px;
}

.meeting-details p.meeting-subtitle {
	font-family: Nunito;
	font-size: min(1.4rem, 5vw);
	border-bottom: none;
	text-align: center;
}

.meeting-content {
	padding: 1vw 3vw;
	font-size: min(4.4vw, 1.2rem);
}

.meeting-content h3 {
	font-family: "Nimbu";
	font-size: min(2.4rem, 8vw);
	margin: 1vh 0;
}

.meeting-content p {
	padding: 1vw;
	text-indent: 2rem;
}

.meeting-content a {
	color: var(--BODY-COLOR);
	text-decoration: none;
	box-shadow: inset 0 -0.2rem 0 var(--ACCENT-COLOR);
	transition-property: box-shadow;
	transition-duration: 0.5s;
	padding: 0 0.2rem;
	border-radius: 0.2rem;
	overflow-wrap: break-word;
}

.meeting-content a:hover {
	box-shadow: inset 0 -1.7rem 0 var(--BODY-LINK-HOVER);
	transition-property: box-shadow;
	transition-duration: 0.5s;
}

.meeting-content ul,
.meeting-content ol {
	padding: 5vw;
}

figure {
	margin: 1vh 1vw;
}

.meeting-content img {
	display: block;
	padding: 0;
	margin: 2rem auto 0 auto;
	border: 2px solid white;
}

figcaption {
	text-align: center;
	color: gray;
}

@media screen and (max-width: 850px) {
	body {
		background-position: left;
	}

	.ihp-page-container {
		display: block;
	}

	.ihp-block {
		display: inline-block;
	}

	.meeting-details {
		width: 80vw;
	}

	.right-container {
		position: fixed;
		top: 85vh;
		right: 3vw;
		width: fit-content;
	}

	.buttons-invisible-mobile {
		display: none;
	}

	.filter-popup {
		transform: translateX(-85%) scaleY(0);
	}

	.filter-popup.popup-visible {
		transform: translateX(-85%) scaleY(1);
	}

	.ihp-contact-details {
		flex-direction: column;
	}

	.ihp-contact img {
		margin-bottom: 2vh;
	}

	.meeting-summary p {
		margin: 0;
		padding: 1rem;
	}

	.timeline-container {
		display: none;
	}
}
