:root {
	--font-size: 1rem;
}

/* Black background for pages */
body {
	background-color: #000 !important;
	color: #fff;
}

::marker {
	color: var(--contrast);
}
h1,h2,h3,h4,h5 {
	margin-bottom: 0.5rem;
}
@media(max-width:1200px) {
	.hide-mobile {
		display: none !important;
	}
}
@media(min-width:1200px) {
	.hide-desktop {
		display: none !important;
	}
}
/*header */
.header {
	background: black;
	padding: 1rem 0;
	border-bottom: solid 1px var(--muted-border-color);
	box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.2);
}
.header-home {
	background: black;
	padding: 1rem 0;
	position: sticky;
	top: 0;
	z-index: 1000;
}
.header-mobile-btn {
	width: 50px;
	height: 50px;
	padding: 0.4rem;
	margin: 0;
}
.header-mobile-btn img {
	width: 100%;
	height: 100%;
	filter: invert(100%)
}
.header-logo {
	margin: 0;
	padding: 0;
	font-size: 1.5rem;
	font-style: italic;
}
.header-grid {
	align-items: center;
}
/* Navigation links - white text, transparent borders to prevent layout shift */
.header-nav a {
	color: #fff;
	/* Reset Pico button styles that cause layout shift */
	--box-shadow: none !important;
	box-shadow: none !important;
	/* Add consistent border to prevent layout shift */
	border: 2px solid transparent;
	border-radius: 4px;
	padding: 4px 8px;
	transition: border-color 0.2s ease;
	/* Lock down properties that could cause movement */
	position: relative;
	transform: none !important;
	margin: 0;
	text-decoration: none !important;
	display: inline-block;
}

/* Active/current menu item - primary color border, NO background */
.header-nav .current a,
.header-nav a[aria-current] {
	color: #fff;
	border-color: var(--primary);
	/* Keep box-shadow disabled */
	--box-shadow: none !important;
	box-shadow: none !important;
}

/* Hover state - primary color border, NO background */
.header-nav a:hover {
	border-color: var(--primary);
}

/* Active/click state - primary color border, NO background, NO movement */
.header-nav a:active {
	border-color: var(--primary);
	background-color: transparent !important;
	--background-color: transparent !important;
	/* Lock down positioning explicitly for active state */
	transform: none !important;
	margin: 0 !important;
	padding: 4px 8px !important;
	text-decoration: none !important;
	position: relative !important;
}

/* Focus state - primary border, NO outline/shadow to prevent movement */
.header-nav a:focus,
.header-nav a:focus-visible {
	border-color: var(--primary);
	outline: none !important;
	--box-shadow: none !important;
	box-shadow: none !important;
}
/*added dropdown */
.header-nav li {
	padding: 10px;
}
.header-nav .subMenu {
	position: absolute;
	background: var(--primary-hover);
	max-width: 200px;
	animation: fadeIn 250ms linear;
	border-radius: var(--border-radius);
	display: none;
	flex-direction: column;
	text-align: left;
	padding: 0 !important;
	margin-top: 10px;
	margin-left: 0 !important;
	color:#fff;
}
.header-nav .subMenu li {
	width: 100%;
	margin: 0;
}
.header-nav .subMenu li a {
	width: 100%;
	text-align: left;
	margin: 0;
	padding: 10px;
	color:#fff;
}
.subMenu a:hover {
	background: rgba(0, 0, 0, 0.2)
}
.subMenu li {
	margin: 0;
	padding: 0;
}
.subMenu a {
	margin: 0;
}
@media(max-width:1200px) {
	.header-nav .subMenu {
		position: relative;
		max-width: unset;
		width: 100% !important;
	}
}
@media(min-width:1200px) {
	.header-nav li:hover .subMenu {
		display: flex;
	}
}
@keyframesfadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}
/*end edit */
@media(min-width:1200px) {
	.header {
		padding: 3rem 0;
	}
}
@media(max-width:1200px) {
	.header-grid {
		flex-wrap: wrap;
	}
	.header-nav {
		display: flex;
		flex-direction: column;
		width: 100%;
		padding: 0;
		margin-right: 0 !important;
		margin-left: 0 !important;
		margin-top: 20px;
	}
	.header-nav li {
		width: 100%;
		padding: 8px 0;
		margin: 0;
		display: flex;
		align-items: center;
		flex-wrap: wrap;
	}
	.header-nav a {
		width: 100%;
		text-align: left;
		padding: 15px;
		margin: 0;
	}
	.header-nav .wSub {
		display: flex;
		padding: 0;
	}
	.header-nav .wSub a {
		width: calc(90% - 12px);
	}
	.header-nav .wSub .showDropdown {
		width: 10%;
		display: flex;
		align-self: center;
		justify-content: center;
		align-items: stretch;
		padding: 14px;
		margin-left: 12px;
	}
	.header-nav a {
		padding: 8px;
	}
	.header-nav .wSub a[role="button"] {
		padding: 8px;
	}
	.header-nav a[role="button"] {
		margin-left: 0;
		margin-right: 0;
		padding: inherit;
		padding: 8px;
	}
}
/*content and aside */
.content {
	padding: 2rem 0;
	padding-bottom: 0;
}

/* Main content text size */
.content-main p {
	font-size: 24px;
}
.content-grid {
	display: grid;
	grid-column: 1fr;
	margin: 2rem 0;
	gap: 1.3rem;
}
@media(min-width:1200px) {
	.content-grid {
		grid-template-columns: 9fr 3fr;
	}
}
.content-sidebar ul::marker {
	color: #000;
}
.content-sidebar h2 {
	margin-bottom: 10px;
}
.content-title {
	padding-bottom: 1rem;
	border-bottom: solid 1px var(--muted-border-color);
}

.content-title h1 {
	font-size: 3.5rem;
	font-weight: 700;
	margin: 1rem 0 0.5rem 0;
	padding: 1rem 0 0 0;
	color: var(--primary);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

/* Subcard questions */
.subcard-question {
	font-size: 1.65rem !important;
	font-weight: 700;
	color: var(--primary);
	margin: 0.5rem 0 1rem 0;
	line-height: 1.6;
	text-align: center;
}

@media (max-width: 767px) {
	.content-title h1 {
		font-size: 2.5rem;
	}
}

/* Article images - float right with text wrap */
.article-image {
	float: right;
	max-width: 400px;
	width: 40%;
	margin: 0 0 20px 30px;
	border-radius: 8px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

@media (max-width: 767px) {
	.article-image {
		float: none;
		width: 100%;
		margin: 20px 0;
	}
}
.content-sidebar h2 {
	padding-bottom: 10px;
	border-bottom: solid 1px var(--muted-border-color);
	margin-bottom: 20px;
	display: block;
}
.content-sidebar ul {
	list-style-type: square !important;
	background: var(--primary);
	color: #fff;
	line-height: 1;
	border-radius: 5px;
	list-style-type: square;
}
@media(min-width:1200px) {
	.content-sidebar {
		margin-top: 2.7rem;
	}
}
.content-main img {
	margin-bottom: 1.3rem;
	border-radius: 0.2rem;
}
.content-main nav[aria-label="breadcrumb"] li {
	padding: 0 0.5rem;
}
.content-main nav[aria-label="breadcrumb"] a {
	color: var(--muted-color);
}
/*footer */
.footer-grid {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	align-items: center;
}
@media(max-width:1200px) {
	.footer-grid {
		flex-direction: column;
	}
}
/*grid variant */
@media(min-width:1200px) {
	.content-grid-left {
		grid-template-columns: 3fr 9fr;
	}
	.content-grid-left .content-sidebar {
		order: 1;
	}
	.content-grid-left .content-main {
		order: 2;
	}
	.content-grid-nosidebar {
		grid-template-columns: 1fr;
	}
}
.content-grid-nosidebar .content-sidebar {
	display: none;
}

/* Cards Section */
.cards-section {
	background-color: black;
	padding: 60px 0;
}

.subcards-section {
	padding-top: 80px;
}

.section-title {
	color: white;
	text-align: center;
	font-size: 2.5rem;
	margin-bottom: 40px;
	font-weight: 600;
}

.cards-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 30px;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

.problem-card {
	background: rgba(255, 255, 255, 0.05);
	border: 2px solid transparent;
	border-radius: 8px;
	overflow: hidden;
	text-decoration: none;
	color: white;
	transition: all 0.3s ease;
	display: flex;
	flex-direction: column;
}

.problem-card:hover {
	transform: translateY(-8px);
	border-color: var(--primary);
	box-shadow: 0 10px 30px rgba(115, 184, 222, 0.3);
}

.card-image {
	width: 100%;
	height: 250px;
	overflow: hidden;
	background: rgba(0, 0, 0, 0.3);
}

.card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.problem-card:hover .card-image img {
	transform: scale(1.05);
}

.problem-card h3 {
	padding: 20px;
	margin: 0;
	text-align: center;
	font-size: 1.5rem;
	font-weight: 600;
	color: white;
}

/* Ensure subcard titles appear beneath images */
.problem-card.subcard {
	display: flex !important;
	flex-direction: column !important;
}

.problem-card.subcard .card-image {
	width: 100%;
	flex-shrink: 0;
}

.problem-card.subcard h3 {
	width: 100%;
	display: block;
}

/* Responsive Design */
@media (max-width: 1199px) {
	.cards-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 25px;
	}
}

@media (max-width: 767px) {
	.cards-section {
		padding: 40px 0;
	}
	
	.cards-grid {
		grid-template-columns: 1fr;
		gap: 20px;
		padding: 0 15px;
	}
	
	.card-image {
		height: 200px;
	}
	
	.problem-card h3 {
		font-size: 1.3rem;
		padding: 15px;
	}
}

/* Glossary Definition System */
.def-term {
	color: var(--primary);
	cursor: pointer;
	position: relative;
	transition: opacity 0.2s ease;
	border-bottom: 1px dotted var(--primary);
}

.def-term:hover {
	opacity: 0.8;
}

/* Definition Panel */
.definition-panel {
	position: fixed;
	top: 0;
	left: -400px;
	width: 350px;
	height: 100%;
	background: rgba(0, 0, 0, 0.95);
	border-right: 2px solid var(--primary);
	padding: 2rem;
	z-index: 10000;
	transition: left 0.3s ease;
	overflow-y: auto;
	box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5);
}

.definition-panel.active {
	left: 0;
}

.definition-panel-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	z-index: 9999;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease;
}

.definition-panel-overlay.active {
	opacity: 1;
	pointer-events: all;
}

.definition-close {
	position: absolute;
	top: 0;
	right: 0;
	background: none;
	border: none;
	color: var(--primary);
	font-size: 2.5rem;
	cursor: pointer;
	line-height: 1;
	padding: 0.5rem;
	transition: opacity 0.2s ease;
	z-index: 1;
	width: 3rem;
	height: 3rem;
	display: flex;
	align-items: center;
	justify-content: center;
}

.definition-close:hover {
	opacity: 0.7;
}

.definition-term {
	color: var(--primary);
	font-size: 1.5rem;
	font-weight: 700;
	margin-bottom: 1rem;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid var(--primary);
}

.definition-content {
	color: #fff;
	font-size: 1.1rem;
	line-height: 1.6;
}

@media (max-width: 767px) {
	.definition-panel {
		width: 100%;
		right: -100%;
	}
}
