
/* Global Styles */
:root { 
	--primary: #2563eb; 
	--bg: #f8fafc; 
	--text: #1e293b; 
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { 
	font-family: system-ui, -apple-system, sans-serif; 
	background: var(--bg); 
	color: var(--text); 
	padding: 2rem; 
	text-align: center; 
}

/* Homepage Grid */
.grid { 
	display: grid; 
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
	gap: 1.5rem; 
	max-width: 800px; 
	margin: 2rem auto; 
}
.card { 
	background: white; 
	padding: 2rem; 
	border-radius: 8px; 
	text-decoration: none; 
	color: var(--text); 
	box-shadow: 0 4px 6px rgba(0,0,0,0.1); 
	transition: transform 0.2s;
}
.card:hover { transform: translateY(-5px); }

/* Interactive Image Hotspots */
.image-container { position: relative; max-width: 800px; margin: 1rem auto; }
.image-container img { width: 100%; height: auto; display: block; border-radius: 8px; }

.hotspot-container {
	position: absolute;
	z-index: 10;
	text-decoration: none;
	display: block;
}

.hotspot { 
	position: absolute; 
	width: 24px; 
	height: 24px; 
	background: white; 
	border: 2px solid var(--text); 
	border-radius: 50%; 
	transform: translate(-50%, -50%); 
	transition: 0.2s; 
}

.hotspot-container:hover .hotspot { 
	background: var(--primary); 
	border-color: white; 
	transform: translate(-50%, -50%) scale(1.3); 
}

.preview-card {
	position: absolute;
	bottom: 24px;
	left: 50%;
	transform: translateX(-50%) translateY(10px);
	background: white;
	padding: 0.5rem;
	border-radius: 8px;
	box-shadow: 0 10px 25px -5px rgba(0,0,0,0.2), 0 8px 10px -6px rgba(0,0,0,0.1);
	white-space: nowrap;
	opacity: 0;
	visibility: hidden;
	transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.25rem;
	width: 150px;
}

.preview-image {
	width: 100%;
	height: 90px;
	object-fit: cover;
	object-position: top;
	border-radius: 4px;
	background: #f1f5f9;
	border: 1px solid #e2e8f0;
	margin-bottom: 0.25rem;
}

/* Triangle pointer for the preview card */
.preview-card::after {
	content: '';
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	border-width: 8px;
	border-style: solid;
	border-color: white transparent transparent transparent;
}

/* Invisible bridge so hover doesn't drop when moving to the preview card */
.preview-card::before {
	content: '';
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	height: 24px;
	background: transparent;
}

.preview-url {
	font-size: 0.75rem;
	color: #64748b;
	margin: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;
	display: block;
}

/* Only show hover effects on devices with a mouse pointer */
@media (hover: hover) {
	.hotspot-container:hover .preview-card {
		opacity: 1;
		visibility: visible;
		transform: translateX(-50%) translateY(0);
	}
}
