 @import url('https://fonts.googleapis.com/css2?family=PT+Sans:ital,wght@0,400;0,700;1,400;1,700&family=PT+Serif:ital,wght@0,400;0,700;1,400;1,700&display=swap');

* {
	box-sizing: border-box;
	font-family: 'PT Sans', sans-serif;
	margin: 0;
	padding: 0;
}

:root {
    font-size: 16px;
	--fs-large: 2rem;
	--fs-heading: 1.1rem;
	--fs-text: 1rem;
	--fs-small: 0.8rem;

	--dark-bg: hsl(195, 6.67%, 11.76%);
	--dark-hf-bg: hsl(100, 12%, 20%);
	--dark-card-bg: hsl(56.13, 72.09%, 8.43%);
	--dark-fc: hsl(120, 61.9%, 91.76%);
	--dark-hover-fc: hsl(120, 21.43%, 78.04%);
	--dark-text: hsl(34.29, 7.87%, 82.55%);
	--dark-heading: hsl(151.76, 41.46%, 91.96%);
	--dark-hamburger-menu: hsl(100 31.03% 17.06% / 0.8);

	--light-bg: hsl(120, 60%, 99.02%);
	--light-hf-bg: hsl(100, 100%, 90%);
	--light-hf-bg: hsl(99, 100%, 96.08%);
	--light-card-bg: hsl(56, 48.39%, 93.92%);
	--light-fc: hsl(119.35, 92.08%, 19.8%);
	--light-hover-fc: hsl(120, 22.71%, 50.78%);
	--light-text: hsl(120, 45%, 27%);
	--light-heading: hsl(120, 89.19%, 21.76%);
	--light-hambuger-menu: hsl(100 100% 90% / 0.8);
}

body {
	margin: auto;
    transition: background-color 0.3s, color 0.3s;
}

.light-theme h1, .light-theme h2, .light-theme h3, .light-theme h4 {
	color: var(--light-heading);
}

.dark-theme h1, .dark-theme h2, .dark-theme h3, .dark-theme h4 {
	color: var(--dark-heading);
}

body.dark-theme {
  --pagefind-ui-primary: #eeeeee;
  --pagefind-ui-text: #eeeeee;
  --pagefind-ui-background: #152028;
  --pagefind-ui-border: #152028;
  --pagefind-ui-tag: #152028;
}

h1 {
	text-align: center;
	padding: 2rem 0 2rem 0;
	line-height: 2rem;
}

h2 {
	line-height: 2rem;
	margin: 1rem 0 1rem 0;
}

h3 {
	line-height: 2rem;
	margin: 0.5rem 0 0.5rem 0;
}

h4 {
	line-height: 2rem;
	padding: 0.2rem 0 0.2rem 0;
}

li {
	margin-left: 2rem;
	line-height: 1.8rem;
}

p {
	line-height: 1.8rem;
	margin: 0.5rem 0 0.5rem 0;
}

.header-container {
	width: 80%;
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	flex-wrap: nowrap;
	padding: 9px 32px 9px 32px;
	margin: auto;
}

footer {
	text-align: center;
	font-size: var(--fs-text);
	margin-top: 2rem;
}

footer > p {
	padding-top: 1rem;
	margin: 0;
}

footer > a {
	font-size: 0.8rem;
	margin-left: 1rem;
}

.header-right {
	display: flex;
	flex-direction: row;
	justify-content: flex-end;
	align-items: center;
	gap: 24px;
}

.logo a {
	font-size: var(--fs-large);
	font-weight: bold;
	text-decoration: none;
}

.header-menu {
	display: flex;
	flex-direction: row;
	align-self: center;
	justify-content: flex-start;
	gap: 1.5rem;
}

.header-menu li {
	list-style-type: none;
}

.header-menu a {
	text-decoration: none;
	font-weight: 800;
	font-size: var(--fs-heading);
}

p img {
	display: block;
	margin: auto;
	width: 90%;
	padding-top: 2rem;
	padding-bottom: 2rem;
}

#theme_svg {
	pointer-events: fill;
}

.language-button {
	border: 0px;
	pointer-events: fill;
	display: flex;
	align-items: flex-start;
	gap: 4px;
}

#globe_svg {
	align-self: flex-start;
}

#language-button-text {
	font-size: var(--fs-heading);
	align-self: center;
}

#hamburger_svg {
	width: 32px;
	height: 32px;
}

#search {
	width: 60%;
	margin: auto;
}

#search_svg{
	width: 24px;
	height: 24px;
}

.hamburger-menu {
	display: none;
	border: none;
	background: hsl(0 0% 100% / 0);
}

.single-page {
	width:50%;
	margin: auto;
	font-size: var(--fs-heading);
	line-height: 1.5rem;
	text-align: justify;
}

.single-page h1 {
	line-height: 3rem;
}

.single-page-container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin: 1rem 0 1rem 0;
}

.single-page-highlight {
	border-radius: 5px;
	margin: 1rem 1rem 1rem 0;
	padding: 5px;
}

.share-buttons {
	display: flex;
	align-items: center;
}

.social-link {
	margin: 0.3rem;
	text-decoration: none;
}

.social-icon {
	width: 36px;
	height: 36px;
}

.recent-posts {
	margin-top: 2.5rem;
}

.reddit-icon {
	width: 40px;
	height: 40px;
}

.dark-theme .single-page-highlight {
	background-color: var(--dark-hf-bg);
}

.light-theme .single-page-highlight {
	background-color: var(--light-hf-bg);
}

.dark-theme .pagefind-ui__search-input.svelte-e9gkc3 {
	background-color: var(--dark-hf-bg);
	border: 1px;
	color: var(--dark-fc);
}

.home-page, .latest {
	width: 70%;
	margin: auto;
}

.taxonomy {
	width: 70%;
	margin: auto;
	margin-top: 5rem;
}
.cards {
	width: 100%;
	margin: auto;
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	justify-content: space-evenly;
	gap: 0.8rem;
}

.card-item {
	padding: 1rem;
	border-radius: 10px;
	width: 24%;
	overflow: hidden;
	text-overflow: ellipsis;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	gap: 0.5rem;
}

.card-container {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	padding-top: 1rem;
	font-size: 0.8rem;
}

.card-title {
	font-size: var(--fs-heading);
	font-weight: bold;
}

.card-image {
	width: 100%;
	height: 70%;
}

.card-item a {
	text-decoration: none;
	text-align: center;
}

.card-category a {
	font-weight: bold;
	color: yellow;
	border-bottom: 2px solid brown;
}

.homepage-categories {
	margin: 0 1rem;
	text-align: left;
}

/* Color Theme Settings*/
.light-theme {
	background-color: var(--light-bg);
	color: var(--light-text);
}

.dark-theme {
	background-color: var(--dark-bg);
	color: var(--dark-text);
}

.light-theme header {
	background-color: var(--light-hf-bg);
	color: var(--light-fc);
}

.dark-theme header {
	background-color: var(--dark-hf-bg);
	color: var(--dark-fc);
}

.light-theme footer {
	background-color: var(--light-hf-bg);
	color: var(--light-fc);
}

.dark-theme footer {
	background-color: var(--dark-hf-bg);
	color: var(--dark-fc);
}

.dark-theme a {
	color: var(--dark-fc);
}

.light-theme a {
	color: var(--light-fc);
}

.dark-theme .card-item {
	background-color: var(--dark-hf-bg);
}

.light-theme .card-item {
	background-color: var(--light-hf-bg);
}

.light-theme #hamburger_svg, .light-theme #globe_svg, .light-theme #theme_svg_path, .light-theme .social-icon {
	fill: #056104;
}

.dark-theme #hamburger_svg, .dark-theme #globe_svg, .dark-theme #theme_svg_path, .dark-theme .social-icon {
	fill: #ddf7dd;
}

.light-theme #SVGRepo_iconCarrier_path {
	stroke: #056104;
}

.dark-theme #SVGRepo_iconCarrier_path {
	stroke: #ddf7dd;
}

/*Hover Effects */
.dark-theme a:hover {
	color: var(--dark-hover-fc);
}

.light-theme a:hover {
	color: var(--light-hover-fc);
}

/* Media Queries */
@media (min-width: 800px) and (max-width: 1400px) {
	.home-page, .latest {
		width: 90%;
		margin: auto;
	}

	.single-page {
		width: 80%;
		margin: auto;
	}

	.header-container {
		justify-content: flex-start;
		gap: 8rem;
		margin-left: 20%;
	}

	.hamburger-menu {
		display: block;
	    z-index: 9999;
	}

	.header-menu {
		position: fixed;
		inset: 0 0 0 65%;
		display: flex;
		flex-direction: column;
		padding: min(30vh, 10rem) 2rem;
		gap: 1.5rem;
		backdrop-filter: blur(1rem);
		overflow-y: scroll;
		overflow-x: hidden;
		align-items: center;
		transform: translateX(100%);
		transition: transform 350ms ease-in;
	}
    .header-menu[data-visible="true"] {
		height: 100%;
    	transform: translateX(0%);
		z-index: 9999;
    }

	.hamburger-menu[data-visible="true"] {
		margin: 0;
		position: absolute;
		right: 3rem;
		top: 4rem;
	}

    .header-right {
		gap: 3rem;
    }

	.dark-theme .header-menu {
		background: var(--dark-hamburger-menu);
	}

	.light-theme .header-menu {
		background: var(--light-hamburger-menu);
	}
}

@media (max-width: 850px) {
	.header-container {
		justify-content: space-between;
		flex-wrap: nowrap;
		padding: 9px 0;
	}

	.hamburger-menu {
		display: block;
		z-index: 9999;
	}

	.header-menu {
		position: fixed;
		inset: 0 0 0 0;
		display: flex;
		flex-direction: column;
		padding: min(30vh, 10rem) 2rem;
		gap: 1.5rem;
		backdrop-filter: blur(1rem);
		overflow-y: scroll;
		align-items: center;
		transform: translateX(100%);
		transition: transform 350ms ease-in;
	}

	.header-right {
		position: fixed;
		top: 10%;
		left: 10%;
		right: 0%;
		justify-content: center;
		backdrop-filter: blur(1rem);
		gap: 4rem;
		transform: translateX(100%);
		transition: transform 350ms ease-in;
	}

    .header-menu[data-visible="true"] {
		width: 100%;
		height: 100%;
    	transform: translateX(0%);
    }

    .header-right[data-visible="true"] {
		right: 10%;
    	transform: translateX(0%);
    }

	.dark-theme .header-menu {
		background: var(--dark-hamburger-menu);
	}

	.light-theme .header-menu {
		background: var(--light-hamburger-menu);
	}

	.dark-theme .header-right {
		background: var(--dark-hamburger-menu);
	}

	.light-theme .header-right {
		background: var(--light-hamburger-menu);
	}

	h1 {
		font-size: 1.6rem;
		line-height: 0.2rem;
		text-align: center;
		padding: 1.5rem 0 1.5rem 0;
	}

	h2 {
		font-size: 1.4rem;
		line-height: 1.8rem;
		margin: 1rem 0 1rem 0;
	}

	h3 {
		font-size: 1.1rem;
		line-height: 1.8rem;
		margin: 0.5rem 0 0.5rem 0;
	}

	h4 {
		line-height: 1.8rem;
		padding: 0.2rem 0 0.2rem 0;
	}

	li {
		margin-left: 1.2rem;
		line-height: 1.8rem;
	}

	p {
		line-height: 1.8rem;
		margin: 0.5rem 0 0.5rem 0;
	}

	.home-page{
		width: 100%
	}

	.taxonomy, .cards {
		width: 95%;
		margin: auto;
		display: flex;
		flex-direction: column;
		flex-wrap: nowrap;
		gap: 0.5rem;
	}

	.card-item {
		padding: 1rem;
		border-radius: 15px;
		width: 100%;
		margin: auto;
		overflow: hidden;
		text-overflow: ellipsis;
		display: flex;
		flex-direction: column;
		justify-content: flex-start;
		gap: 1.5rem;
	}

	.card-item a {
		text-decoration: none;
		text-align: center;
	}

	.card-image {
		width: 100%;
		height: 80%;
	}

	.card-title {
		font-weight: bold;
	}

	.card-container {
		display: flex;
		flex-direction: column;
		margin-top: 0.5rem;
	}

	.single-page {
		width: 90%;
		margin: auto;
	}

	#search {
		width: 90%;
		margin: auto;
		margin-bottom: 1rem;
	}

	p img {
		display: block;
		margin: auto;
		width: 95%;
		padding-top: 2rem;
		padding-bottom: 2rem;
	}


	footer {
		text-align: center;
		font-size: 1rem;
		margin-top: 2rem;
		margin-bottom: 0;
	}

	footer > p {
		font-size: 0.8rem;
		padding: 0;
		margin: 0;
	}

	footer > a {
		font-size: 0.8rem;
		margin: 0;
	}

	.social-link {
		margin: 0.1rem;
		text-decoration: none;
	}

	.social-icon {
		width: 26px;
		height: 26px;
	}

	.reddit-icon {
		width: 30px;
		height: 30px;
	}

}
