:root {
	--theme-hue: 127;
	/* overriding bootstrap vars (doing it here because we don't build it with SCSS, but that would be better) */
	--theme-color-bg-light: hsl(104, 14%, 92%);
	--theme-color-bg-dark: hsl(var(--theme-hue), 25%, 52%);
	--theme-color-bg-darker: hsl(var(--theme-hue), 25%, 42%);
	--theme-color-bg-darkest: hsl(var(--theme-hue), 25%, 32%);
	--bs-body-bg: hsl(48, 70%, 96%);
	--bs-body-bg-rgb: 255, 253, 245;
	--bs-link-color: hsl(var(--theme-hue), 75%, 32%);
	--bs-link-color-rgb: 54, 161, 66;
	--bs-form-control-bg: hsl(48, 100%, 99%);
	--card-color-light-sage: #e9edc9;
	--card-color-cream: #fefae0;
	--card-color-beige: #faedcd;
	--card-color-tan: #e6dcc8;
	--card-border-radius: 8px;
	/* custom vars */
	--bs-body-bg-transparent-1: rgba(255, 253, 245, 0.5);
	--bs-body-bg-transparent-2: rgba(255, 253, 245, 0.6);
	--bs-body-bg-transparent-3: rgba(255, 253, 245, 0.7);
	--bs-body-bg-transparent-4: rgba(255, 253, 245, 0.8);
}

@font-face {
	font-family: 'DM Serif Display';
	src: url('/fonts/DMSerifDisplay-Regular.ttf');
}

html {
	height: 100%;
}

body {
	min-height: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6,
.heading {
	font-family: 'DM Serif Display';
	font-weight: normal;
}

a {
	text-decoration: none;
	color: var(--bs-body-color-rgb);
}
a:hover {
	text-decoration: underline;
}

small {
	color: rgb(var(--bs-secondary-rgb));
}

.prose a {
	font-weight: 600;
	color: var(--bs-link-color);
}
.prose a:active {
	color: hsl(var(--theme-hue), 75%, 25%);
}

.text-light :is(a, a:hover) {
	color: var(--bs-body-bg);
}

.text-danger {
	font-weight: 600;
}

nav {
	font-weight: 400;
	font-style: normal;
}

.navbar {
	--bs-navbar-nav-link-padding-x: 1rem !important;
}

.navbar-nav {
	display: flex;
	justify-content: center;
	align-items: center;
	position: relative;
	min-width: 235px;
}

.nav-item,
.navbar-nav > li.navbar-nav {
	margin: 5px;
}

a.nav-item,
.nav-item > a,
.nav-item > .nav-link,
li.navbar-nav > .nav-link {
	padding: 15px 15px 20px;
}

.nav-link {
	background-color: transparent;
	font-weight: normal;
	transition: none;
	color: var(--bs-body-color);
}
.nav-link:focus,
.nav-link:hover,
.nav-link:active {
	color: var(--bs-body-color);
}

.nav-item > ul {
	visibility: hidden;
	position: absolute;
	align-items: center;
	z-index: 1001;
	list-style-type: none;
	padding: 0;
	background-color: var(--bs-body-bg);
	border-radius: 8px;
	border-color: black;
	margin-top: -3px; /* give some breathing room to make sure the mouse stays overlapping as it moves over to it */
	min-width: 180px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25), 0 2px 2px rgba(0, 0, 0, 0.25); /* Shadow for depth */
	opacity: 0;
	transition: opacity 0.2s ease;
}

.nav-item > ul a {
	text-align: center; /* Center text horizontally */
	display: block; /* Ensure the link takes full width */
	box-sizing: border-box;
	width: 100%;
}

.nav-item:hover > ul {
	visibility: visible;
	opacity: 1;
}

.btn {
	background-color: whitesmoke;
	color: black;
}

.btn:hover {
	background-color: whitesmoke;
	color: black;
}

.btn.tool-toggle:hover {
	border: 1.5px solid black;
}

.btn.toolbox {
	background-color: transparent;
}

.fa-xmark {
	color: black;
}

.fa-xmark.img {
	color: #fffee8;
}

.sidebar-content.rounded-rect.flex-center {
	background-color: #fffee8;
	color: black;
}

.mapboxgl-popup-content {
	text-align: center;
	background-color: #5680e9;
}

.sidebar-content.right.rounded-rect {
	background-color: #fffee8;
	color: black;
}

.centered-link {
	text-align: center;
}

.centered-link a {
	display: inline-block;
	margin-top: 2.5vw;
}

.row {
	width: 100%;
	padding: 20px;
}

#article-list {
	display: grid; /* Enables CSS Grid */
	grid-template-columns: repeat(3, 1fr); /* Defines 3 columns of equal width */
	gap: 1vw; /* Optional space between grid items */
	background-color: var(--bs-body-bg);
}

.article {
	padding: 1vh 1vw 1vh 1vw;
	box-sizing: border-box; /* Ensures padding/margin are included in the width */
	transition: background-color 0.3s ease;
	margin-top: 45px;
}

.article:hover {
	background-color: gray; /* Changes background on hover */
}

.article img {
	max-width: 500px;
	height: auto;
	display: block;
}

/* FontAwesome Menu Icon */
.menu-toggle {
	display: none; /* Hidden by default */
	font-size: 24px;
	cursor: pointer;
	padding: 20px;
	transform-origin: center;
}
.menu-toggle:hover {
	transform: scale(1.1);
}
.menu-toggle:active {
	transform: scale(1.15);
}

#nav-item-login,
#nav-item-signup {
	margin: 0;
}
#nav-item-login {
	position: relative;
	margin: 0 0 0 calc(1rem + 5px) !important;
}
#nav-item-login a,
#nav-item-signup a {
	margin: 0;
}
#nav-item-login::after {
	content: '·';
	position: absolute;
	right: -1px;
	top: calc(50% - 1em);
}

#nav-resources-link {
	display: block;
}
#nav-resources-link-placeholder {
	display: none;
}

@media screen and (max-width: 768px) {
	.nav-link {
		font-size: 110%;
	}

	.article img {
		height: 200px;
		width: 200px;
	}

	.article {
		margin-top: 30px;
	}
}

/* Media query for very small screens (mobile) */
@media screen and (max-width: 1110px) {
	.navbar-nav {
		display: none; /* Hide full nav */
	}

	.menu-toggle {
		display: block; /* Show icon on small screens */
	}

	.navbar-nav.active {
		display: block;
		flex-direction: column;
		align-items: flex-start;
		opacity: 0.94;
		z-index: 1001;
		position: absolute; /* Ensure dropdown is absolute */
		top: 67px; /* Adjust top position based on your layout */
		right: 42px;
		width: 33%;
		border-radius: 8px;
		background-color: var(--bs-body-bg);
		box-shadow: 0 2px 2px rgba(0, 0, 0, 0.3), 0 6px 20px rgba(0, 0, 0, 0.3);
	}

	:is(.navbar-nav, #footer-content) #nav-item-login::after {
		right: -6px;
	}

	.navbar-nav .nav-item:not(:is(#nav-item-login, #nav-item-signup)) {
		border-bottom: 1px solid #ccc;
	}

	.navbar-nav .nav-item:last-child {
		border-bottom: none !important; /* Remove border for the last item */
	}

	/* override the login/signup-specific styles */
	#nav-item-login,
	#nav-item-signup {
		margin: 5px !important;
	}

	#nav-resources-link {
		display: none;
	}
	#nav-resources-link-placeholder {
		display: block;
	}
}

.content-column {
	max-width: 800px;
	margin: auto;
}

.content-section {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-around;
	padding: 6rem 2rem;
	gap: 3rem;
}
.content-section-padding {
	padding: 6rem 2rem;
}

.dropdown-toggle::after {
	content: none;
}

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

.clickable,
.clickable-animation {
	transform-origin: center;
}
.clickable:hover,
.clickable-wrapper:hover .clickable-animation {
	transform: scale(var(--clickable-scale-hover, 1.01));
}
.clickable:active,
.clickable-wrapper:active .clickable-animation {
	transform: scale(var(--clickable-scale-active, 0.99));
}
.clickable-animation {
	transition: transform 0.08s ease;
}

.inner-shadow {
	box-shadow: 0 3px 6px #0003 inset;
}

hr {
	margin: 2rem 0;
}

.primary-button {
	--bs-btn-disabled-bg: hsl(var(--theme-hue), 25%, 42%);
	text-transform: uppercase;
	color: #fff !important;
	font-weight: 700;
	font-size: 1rem;
	background-color: var(--theme-color-bg-dark);
	padding: 0.75rem 1.5rem;
	border-radius: 40px;
	display: inline-block;
	text-decoration: none !important;
	border: none !important;
	cursor: pointer;
	white-space: nowrap;
}
.primary-button:hover,
.primary-button.btn:focus-visible {
	--bs-btn-hover-bg: var(--theme-color-bg-darker);
	background-color: var(--theme-color-bg-darker) !important;
}
.primary-button:active {
	--bs-btn-active-bg: var(--theme-color-bg-darkest);
	background-color: var(--theme-color-bg-darkest) !important;
}
.primary-button-2 {
	background-color: #7d756b; /* Change button background color */
}

form {
	--form-margin: 1.5rem;
	max-width: 500px;
	width: 100%;
	flex-shrink: 1;
	margin: 0 auto;
}

.form-control {
	transition: box-shadow 120ms ease-in-out !important;
}

.form-info-placeholder {
	display: block;
	height: 25px;
}

.form-label {
	font-size: 1.25rem;
}

.form-section {
	margin-bottom: var(--form-margin);
}
.form-row {
	display: flex;
	flex-direction: row;
	align-items: start;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: var(--form-margin);
}

.form-control:focus {
	color: var(--bs-body-color);
	background-color: var(--bs-form-control-bg);
	border-color: hsl(var(--theme-hue), 48%, 36%);
	outline: 0;
	box-shadow: 0 0 0 0.25rem hsla(var(--theme-hue), 48%, 32%, 0.25);
}

.card {
	width: 100%;
	max-width: 800px;
	margin: 0 auto;
	border-radius: 25px;
}

/* Modal styles */
.modal-content {
	border-radius: 10px;
}

/* Feedback styling */
.feedback {
	width: 100%;
	margin-top: 0.25rem;
	font-weight: 600;
	visibility: hidden; /* Hidden by default */
	height: 21px; /* Ensure consistent height */
	min-height: 21px; /* Ensure consistent height */
	max-height: 21px; /* Ensure consistent height */
}

/* Feedback color states */
.feedback-valid {
	color: rgb(var(--bs-success-rgb));
}

.feedback-invalid {
	color: rgb(var(--bs-danger-rgb));
}

/* Visibility toggle - only one explicit way to control visibility */
.feedback-visible {
	visibility: visible !important; /* Force visibility */
}
