/* Feature cards container */
.feature-cards {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
	box-sizing: border-box;
}

/* Grid layout - force 3 columns */
.grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	/* Force 3 equal columns */
	gap: 24px;
	width: 100%;
	margin: 20px 0;
}

/* Feature card styling */
.feature-card {
	border: 1px solid #16293F;
	border-radius: 8px;
	padding: 24px;
	margin: 0;
	transition: all 0.3s ease;
	background-color: white;
	text-align: center;
	cursor: pointer;
	height: 100%;
	display: flex;
	flex-direction: column;
	position: relative;
	box-sizing: border-box;
}

.feature-card:hover {
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
	transform: translateY(-2px);
	border-color: #16293F;
}

.feature-card a.card-link {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 1;
	text-decoration: none;
	opacity: 0;
	overflow: hidden;
	text-indent: -9999px;
}

.feature-card h3 {
	color: #16293F;
	margin-top: 16px;
	position: relative;
	z-index: 0;
}

.feature-card p {
	color: #555;
	font-size: 0.9rem;
	flex-grow: 1;
	position: relative;
	z-index: 0;
}

.feature-icon {
	width: 64px;
	height: 64px;
	margin: 0 auto;
	display: block;
	position: relative;
	z-index: 0;
}

/* Make sure buttons in feature cards are clickable */
.feature-card .md-button {
	position: relative;
	z-index: 2;
}

.feature-card .feature-icon img {
	max-width: 64px;
	max-height: 64px;
	object-fit: contain;
}

/* Feature cards on dark mode - create proper SVG handling */
[data-md-color-scheme="slate"] .feature-card .feature-icon img[src$=".svg"] {
	filter: brightness(0) invert(1);
}

/* Ensure feature cards have proper spacing */
.feature-cards {
	display: block;
	width: 100%;
	margin: 2rem 0;
}

.card-row {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	margin-bottom: 24px;
}

.card-col {
	flex: 1 1 300px;
	min-width: 0;
}

/* Ensure proper image sizing in different contexts */
.feature-icon {
	display: flex !important;
	justify-content: center !important;
	align-items: center !important;
	height: 64px !important;
	margin-bottom: 16px !important;
}

/* Responsive adjustments for grid - maintain clear specificity */
@media screen and (max-width: 1024px) {
	.grid {
		grid-template-columns: repeat(2, 1fr);
		/* 2 columns on medium screens */
	}
}

@media screen and (max-width: 768px) {
	.grid {
		grid-template-columns: 1fr;
		/* 1 column on mobile */
	}
}

/* Updated CSS for narrower description section */
/* Image map container improvements */
.image-map-container {
	position: relative;
	border: 1px solid #ddd;
	border-radius: 4px;
	overflow: hidden;
}

.image-map {
	width: 100%;
	display: block;
}

/* Enhanced tooltip styling */
.custom-tooltip {
	position: absolute;
	background-color: rgba(50, 50, 50, 0.9);
	color: white;
	padding: 8px 12px;
	border-radius: 4px;
	font-size: 14px;
	z-index: 1000;
	max-width: 250px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.2s ease;
}

/* Description section improvements */
.description-section {
	padding: 8px;
	margin-bottom: 10px;
	border-radius: 4px;
	transition: all 0.2s ease;
	border-left: 3px solid transparent;
}

.section-creation {
	border-left-color: #e63946;
}

.section-import {
	border-left-color: #457b9d;
}

.section-projects {
	border-left-color: #8338ec;
}

.section-toolbar {
	border-left-color: #2a9d8f;
}

/* Highlighted state for description sections */
.description-section.highlighted {
	background-color: rgba(249, 249, 249, 0.9);
	box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

/* Color-coded headings matching the map areas */
.section-creation h3 {
	color: #e63946;
}

.section-import h3 {
	color: #457b9d;
}

.section-projects h3 {
	color: #8338ec;
}

.section-toolbar h3 {
	color: #2a9d8f;
}
/* Area highlighting styles */
.area-highlight {
  position: absolute;
  background-color: rgba(255, 255, 255, 0.1);
  border: 2px solid;
  border-radius: 3px;
  transition: all 0.2s ease;
  cursor: pointer;
  z-index: 10;
  pointer-events: none;
}

.area-highlight.area-active {
  background-color: rgba(255, 255, 255, 0.3);
}

/* Style for active description sections */
.description-section.section-active {
  background-color: rgba(249, 249, 249, 0.9);
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

/* Tooltip styling */
.image-map-tooltip {
  position: absolute;
  background-color: rgba(50, 50, 50, 0.9);
  color: white;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 14px;
  z-index: 1000;
  max-width: 250px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  pointer-events: none;
  display: none;
}


/* Modern section styling with enhanced interaction */
.description-section {
	padding: 12px;
	margin-bottom: 12px;
	border-radius: 6px;
	border-left: 4px solid transparent;
	transition: all 0.25s ease;
	position: relative;
	overflow: hidden;
}

/* Section color coding */
.section-creation {
	border-left-color: #e63946;
}

.section-import {
	border-left-color: #457b9d;
}

.section-projects {
	border-left-color: #8338ec;
}

.section-toolbar {
	border-left-color: #2a9d8f;
}

/* Heading color coding */
.section-creation h3 {
	color: #e63946;
}

.section-import h3 {
	color: #457b9d;
}

.section-projects h3 {
	color: #8338ec;
}

.section-toolbar h3 {
	color: #2a9d8f;
}

/* Section headers styling */
.description-section h3 {
	font-weight: 600;
	margin-top: 0;
	margin-bottom: 8px;
	transition: transform 0.2s ease;
}

/* Modern highlighted state with animations */
.description-section.highlighted {
	transform: translateX(-5px);
	background-color: rgba(255, 255, 255, 0.9);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	border-left-width: 8px;
}

/* Header animation on highlight */
.description-section.highlighted h3 {
	transform: scale(1.05);
}

/* List styling in sections */
.description-section ul {
	padding-left: 15px;
	margin-top: 5px;
	margin-bottom: 5px;
}

.description-section li {
	margin-bottom: 4px;
	font-size: 0.85em;
}

/* Add subtle glow effect on highlight */
.description-section::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(45deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.5) 50%, rgba(255, 255, 255, 0) 100%);
	opacity: 0;
	transition: opacity 0.3s ease;
	pointer-events: none;
}

.description-section.highlighted::before {
	opacity: 1;
}

/* Responsive handling */
@media (max-width: 768px) {
	.playground-container {
		grid-template-columns: 1fr;
	}

	.descriptions-container {
		border-left: none;
		border-top: 1px solid #eee;
		padding-left: 0;
		padding-top: 15px;
		margin-top: 15px;
	}

	.description-section.highlighted {
		transform: translateY(-2px);
	}
}
