/**
 * WShowcase Frontend Styles
 *
 * Responsive grid, kort, filter og lightbox/modal.
 *
 * @package WShowcase
 */

:root {
	--wshowcase-accent: #1a1a1a;
	--wshowcase-border: #e5e5e5;
	--wshowcase-bg: #fff;
	--wshowcase-text: #1a1a1a;
	--wshowcase-text-muted: #6b7280;
	--wshowcase-radius: 8px;
}

/* Container */
.wshowcase-container {
	max-width: 1200px;
	margin: 0 auto;
}

/* Filters */
.wshowcase-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 40px;
}

.wshowcase-filter {
	padding: 6px 16px;
	border: none;
	border-radius: 100px;
	background: transparent;
	color: var(--wshowcase-text-muted);
	font-size: 13px;
	line-height: 1.5;
	cursor: pointer;
	transition: color 0.2s, background-color 0.2s;
}

.wshowcase-filter:hover {
	color: var(--wshowcase-text);
	background: #f5f5f5;
}

.wshowcase-filter.is-active {
	background: var(--wshowcase-accent);
	color: #fff;
}

/* Grid */
.wshowcase-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 40px 28px;
}

@media (max-width: 768px) {
	.wshowcase-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 32px 20px;
	}
}

@media (max-width: 480px) {
	.wshowcase-grid {
		grid-template-columns: 1fr;
		gap: 36px;
	}
}

/* Card */
.wshowcase-card {
	background: transparent;
	border: none;
	border-radius: 0;
	cursor: pointer;
}

.wshowcase-card[data-hidden="true"] {
	display: none;
}

.wshowcase-card__image {
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #f0f0f0;
	border-radius: 6px;
}

.wshowcase-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}

.wshowcase-card:hover .wshowcase-card__image img {
	transform: scale(1.03);
}

.wshowcase-card__placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #ddd;
	font-size: 48px;
}

.wshowcase-card__content {
	padding: 16px 2px 0;
}

.wshowcase-card__category {
	display: block;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--wshowcase-text-muted);
	margin: 0 0 4px;
}

.wshowcase-card__title {
	font-size: 22px !important;
	font-weight: 700 !important;
	margin: 0 0 10px !important;
	padding: 0 !important;
	color: var(--wshowcase-text);
	line-height: 1.3 !important;
}

.wshowcase-card__social {
	display: flex;
	gap: 8px;
	margin-bottom: 10px;
}

.wshowcase-card__social-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	color: var(--wshowcase-text-muted);
	transition: color 0.2s;
}

.wshowcase-card__social-link:hover {
	color: var(--wshowcase-text);
}

.wshowcase-card__social-link svg {
	display: block;
}

.wshowcase-card__desc {
	font-size: 14px;
	color: var(--wshowcase-text-muted);
	margin: 0 0 14px;
	line-height: 1.6;
}

.wshowcase-card__link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--wshowcase-text);
	transition: opacity 0.2s;
}

.wshowcase-card:hover .wshowcase-card__link {
	opacity: 0.7;
}

/* Modal */
.wshowcase-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
}

.wshowcase-modal__overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.85);
}

.wshowcase-modal__container {
	position: relative;
	display: flex;
	flex-direction: column;
	max-height: 90vh;
	max-width: 900px;
	width: 100%;
	padding: 24px;
	box-sizing: border-box;
}

.wshowcase-modal__close {
	position: absolute;
	top: 8px;
	right: 8px;
	background: none;
	border: none;
	color: #fff;
	font-size: 32px;
	line-height: 1;
	cursor: pointer;
	z-index: 10;
	padding: 8px;
	opacity: 0.7;
	transition: opacity 0.2s;
}

.wshowcase-modal__close:hover {
	opacity: 1;
}

/* Main image area */
.wshowcase-modal__main {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 0;
	position: relative;
}

.wshowcase-modal__image-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
}

.wshowcase-modal__image {
	max-width: 100%;
	max-height: 65vh;
	width: auto;
	height: auto;
	border-radius: 4px;
}

.wshowcase-modal__prev,
.wshowcase-modal__next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	color: #fff;
	font-size: 48px;
	cursor: pointer;
	padding: 16px;
	opacity: 0.6;
	transition: opacity 0.2s;
	z-index: 5;
}

.wshowcase-modal__prev:hover,
.wshowcase-modal__next:hover {
	opacity: 1;
}

.wshowcase-modal__prev {
	left: -16px;
}

.wshowcase-modal__next {
	right: -16px;
}

/* Info */
.wshowcase-modal__info {
	text-align: center;
	padding: 12px 0 8px;
	flex-shrink: 0;
}

.wshowcase-modal__title {
	font-size: 18px;
	font-weight: 600;
	color: #fff;
	margin: 0 0 4px;
}

.wshowcase-modal__desc {
	font-size: 14px;
	color: rgba(255, 255, 255, 0.7);
	margin: 0;
	line-height: 1.5;
}

/* Links */
.wshowcase-modal__links {
	display: flex;
	gap: 12px;
	justify-content: center;
	flex-wrap: wrap;
	margin-top: 8px;
}

.wshowcase-modal__link {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: rgba(255, 255, 255, 0.8);
	font-size: 13px;
	text-decoration: none;
	padding: 4px 12px;
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: 100px;
	transition: border-color 0.2s, color 0.2s;
}

.wshowcase-modal__link:hover {
	color: #fff;
	border-color: rgba(255, 255, 255, 0.6);
}

.wshowcase-modal__link--website::before { content: "\1F310"; }
.wshowcase-modal__link--instagram::before { content: "\1F4F7"; }
.wshowcase-modal__link--linkedin::before { content: "\1F4BC"; }
.wshowcase-modal__link--facebook::before { content: "\1F465"; }

/* Thumbnails */
.wshowcase-modal__thumbs {
	display: flex;
	gap: 6px;
	justify-content: center;
	overflow-x: auto;
	padding: 8px 0;
	flex-shrink: 0;
}

.wshowcase-modal__thumb {
	height: 48px;
	border-radius: 3px;
	overflow: hidden;
	cursor: pointer;
	opacity: 0.5;
	transition: opacity 0.2s;
	flex-shrink: 0;
	border: 2px solid transparent;
}

.wshowcase-modal__thumb:hover {
	opacity: 0.8;
}

.wshowcase-modal__thumb.is-active {
	opacity: 1;
	border-color: #fff;
}

.wshowcase-modal__thumb img {
	height: 100%;
	width: auto;
	display: block;
}

/* Mobile adjustments */
@media (max-width: 768px) {
	.wshowcase-modal__container {
		padding: 16px;
	}

	.wshowcase-modal__prev,
	.wshowcase-modal__next {
		font-size: 32px;
		padding: 8px;
	}

	.wshowcase-modal__prev {
		left: -8px;
	}

	.wshowcase-modal__next {
		right: -8px;
	}

	.wshowcase-modal__image {
		max-height: 50vh;
	}

	.wshowcase-modal__thumb {
		width: 44px;
		height: 29px;
	}
}
