.ws-grid {
	display: grid;
	grid-template-columns: repeat(var(--ws-columns, 2), 1fr);
	gap: 24px;
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px;
}

@media (max-width: 900px) {
	.ws-grid {
		grid-template-columns: repeat(var(--ws-cols-tablet, 2), 1fr);
		gap: 14px;
	}
}

@media (max-width: 480px) {
	.ws-grid {
		grid-template-columns: repeat(var(--ws-cols-mobile, 1), 1fr);
	}
}

/* Note: the height overrides for tablet/mobile (--ws-height) are printed
   dynamically in <head> based on Web Projects > Settings, since they need
   "!important" to reliably beat the base height set inline by the
   shortcode itself. See includes/settings.php -> ws_print_color_vars(). */

.ws-item {
	display: block;
	text-decoration: none;
	color: inherit;
}

.ws-title {
	margin-top: 10px;
	text-align: center;
	font-weight: 700;
	font-size: var(--ws-title-size, 15px);
	color: var(--ws-title-color, #222222);
}

/* This is your snippet, with "selector" turned into a real class name,
   and the fixed height replaced by the --ws-height variable set from the
   shortcode attributes. */
.ws-viewport {
	width: 100%;
	height: var(--ws-height, 500px);
	overflow: hidden !important;
	border-radius: 8px;
	box-shadow: 0px 10px 30px rgba(0,0,0,0.1);
}

/* The actual per-image transition-duration is calculated in JS (ws-frontend.js)
   from the real screenshot height and the --ws-speed (px/sec) variable above,
   so every image scrolls at the same speed no matter how tall it is. The 6s
   below is only a fallback in case JS hasn't run yet. */
.ws-viewport img {
	transition: transform 6s linear;
	transform: translateY(0);
	width: 100% !important;
	height: auto !important;
	display: block;
}

.ws-item:hover .ws-viewport img {
	transform: translateY(calc(-100% + var(--ws-height, 500px))) !important;
}

/* The colors and the 3 breakpoint sizes for this button are all controlled
   from Web Projects > Settings (--ws-more-bg / --ws-more-color / --ws-more-size,
   printed dynamically in <head>). Padding uses "em" on purpose so the whole
   button scales up/down together with the font-size setting. */
.ws-more-wrap {
	text-align: center;
	margin-top: 30px;
}

.ws-more-btn {
	display: inline-block;
	font-size: var(--ws-more-size, 16px);
	font-weight: 700;
	line-height: 1;
	padding: 0.9em 1.8em;
	border-radius: 6px;
	background-color: var(--ws-more-bg, #222222);
	color: var(--ws-more-color, #ffffff);
	text-decoration: none;
	transition: opacity 0.2s ease;
}

.ws-more-btn:hover {
	opacity: 0.85;
	color: var(--ws-more-color, #ffffff);
}
