/**
 * Portfolio widget.
 *
 * The DEFAULT look lives here, not in control defaults: every style control in
 * portfolio.php defaults to '' so a per-instance value can override this
 * stylesheet. Baking colours into control defaults instead would permanently
 * outspecify the theme and global styles with no way back.
 */

.ractro-pf__filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 24px;
}

.ractro-pf__filter {
	appearance: none;
	background: transparent;
	border: 1px solid rgba(15, 23, 42, 0.15);
	border-radius: 999px;
	padding: 7px 16px;
	font: inherit;
	font-size: 14px;
	line-height: 1.2;
	color: inherit;
	cursor: pointer;
	transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}

.ractro-pf__filter:hover { border-color: rgba(15, 23, 42, 0.35); }

.ractro-pf__filter.is-active {
	background: #4f46e5;
	border-color: #4f46e5;
	color: #fff;
}

.ractro-pf__filter:focus-visible {
	outline: 2px solid #4f46e5;
	outline-offset: 2px;
}

/* Masonry mode uses CSS columns, so each item must not be split across a column. */
.ractro-pf--masonry .ractro-pf__item {
	break-inside: avoid;
	-webkit-column-break-inside: avoid;
	margin-bottom: 24px;
}

.ractro-pf__item.is-hidden { display: none; }

.ractro-pf__inner {
	overflow: hidden;
	border-radius: 12px;
	background: transparent;
	height: 100%;
	display: flex;
	flex-direction: column;
}

.ractro-pf__img {
	position: relative;
	overflow: hidden;
	background: rgba(15, 23, 42, 0.04);
}

.ractro-pf__img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .4s ease;
}

.ractro-pf__item:hover .ractro-pf__img img { transform: scale(1.04); }

.ractro-pf__mask {
	position: absolute;
	inset: 0;
	background: transparent;
	transition: background-color .3s ease;
	pointer-events: none;
}

.ractro-pf__content {
	padding: 16px 4px 4px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.ractro-pf__tags {
	font-size: 12px;
	letter-spacing: .06em;
	text-transform: uppercase;
	opacity: .7;
}

.ractro-pf__title { margin: 0; font-size: 20px; line-height: 1.3; }
.ractro-pf__desc  { margin: 0; font-size: 15px; line-height: 1.6; opacity: .8; }

.ractro-pf__btn {
	align-self: flex-start;
	margin-top: 6px;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	color: #4f46e5;
}
.ractro-pf__btn:hover { text-decoration: underline; }

/* --- Card style: overlay ------------------------------------------------- */
.ractro-pf--card-overlay .ractro-pf__inner { position: relative; }

.ractro-pf--card-overlay .ractro-pf__content {
	position: absolute;
	inset: auto 0 0 0;
	padding: 18px;
	color: #fff;
	background: linear-gradient(to top, rgba(0, 0, 0, .75), rgba(0, 0, 0, 0));
	transform: translateY(12px);
	opacity: 0;
	transition: opacity .3s ease, transform .3s ease;
}

.ractro-pf--card-overlay .ractro-pf__item:hover .ractro-pf__content,
.ractro-pf--card-overlay .ractro-pf__item:focus-within .ractro-pf__content {
	opacity: 1;
	transform: translateY(0);
}

.ractro-pf--card-overlay .ractro-pf__btn { color: #fff; }

/* Overlay text is only readable once revealed; without a pointer (touch) there
   is no hover, so show it permanently rather than hiding content behind an
   interaction that device cannot perform. */
@media (hover: none) {
	.ractro-pf--card-overlay .ractro-pf__content {
		opacity: 1;
		transform: none;
	}
}

/* --- Card style: minimal ------------------------------------------------- */
.ractro-pf--card-minimal .ractro-pf__content { padding: 12px 0 0; }
.ractro-pf--card-minimal .ractro-pf__inner   { border-radius: 8px; }

/* --- Card style: card (boxed + shadow) ------------------------------------
   Ported from Tiger's "Card" preset — a raised, self-contained tile, as
   distinct from Standard's flush/borderless card. */
.ractro-pf--card-card .ractro-pf__inner {
	border-radius: 12px;
	box-shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 8px 24px rgba(15, 23, 42, .08);
	background: #fff;
	transition: box-shadow .25s ease, transform .25s ease;
}
.ractro-pf--card-card .ractro-pf__item:hover .ractro-pf__inner {
	box-shadow: 0 4px 8px rgba(15, 23, 42, .1), 0 16px 32px rgba(15, 23, 42, .12);
	transform: translateY(-4px);
}
.ractro-pf--card-card .ractro-pf__content { padding: 18px; }

/* --- Card style: zoom (image zoom emphasis) --------------------------------
   Ported from Tiger's "Zoom" preset — a stronger, dedicated image-zoom
   emphasis than Standard's subtle 1.04x (which stays active everywhere). */
.ractro-pf--card-zoom .ractro-pf__img { overflow: hidden; }
.ractro-pf--card-zoom .ractro-pf__img img { transition: transform .5s ease; }
.ractro-pf--card-zoom .ractro-pf__item:hover .ractro-pf__img img { transform: scale(1.15); }
.ractro-pf--card-zoom .ractro-pf__mask {
	transition: background-color .3s ease;
}
.ractro-pf--card-zoom .ractro-pf__item:hover .ractro-pf__mask {
	background-color: rgba(0, 0, 0, .12);
}

/* --- Empty state --------------------------------------------------------- */
.ractro-pf--empty {
	padding: 28px;
	text-align: center;
	opacity: .65;
	border: 1px dashed rgba(15, 23, 42, .2);
	border-radius: 10px;
}

/* --- Lightbox ------------------------------------------------------------ */
.ractro-pf__zoom { display: block; cursor: zoom-in; }

.ractro-pf-lb {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, .88);
	padding: 24px;
}

.ractro-pf-lb__img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	border-radius: 6px;
}

.ractro-pf-lb__close {
	position: absolute;
	top: 16px;
	right: 20px;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .12);
	color: #fff;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}
.ractro-pf-lb__close:hover { background: rgba(255, 255, 255, .22); }

@media (prefers-reduced-motion: reduce) {
	.ractro-pf__img img,
	.ractro-pf__mask,
	.ractro-pf--card-overlay .ractro-pf__content,
	.ractro-pf__filter {
		transition: none;
	}
	.ractro-pf__item:hover .ractro-pf__img img { transform: none; }
}
