/* ==========================================================================
   12 Square Gallery Lightbox — grid
   ========================================================================== */

.tsg { --tsg-accent: #e0242f; --tsg-navy: #1b1b3a; box-sizing: border-box; width: 100%; }
.tsg *, .tsg *::before, .tsg *::after { box-sizing: border-box; }

/* Header ------------------------------------------------------------------ */
.tsg__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 32px;
}
.tsg__titles { position: relative; min-width: 0; padding-left: 62px; }
.tsg__eyebrow {
	display: block;
	position: relative;
	font-size: 22px;
	line-height: 1.2;
	font-weight: 600;
	color: #6b6b7b;
}
.tsg__eyebrow::before {
	content: "";
	position: absolute;
	left: -62px;
	top: 50%;
	width: 52px;
	height: 2px;
	background: var(--tsg-accent);
}
.tsg__heading {
	margin: 0;
	font-size: 56px;
	line-height: 1.1;
	font-weight: 800;
	color: var(--tsg-navy);
}
.tsg__more {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	flex: none;
	margin-top: 22px;
	padding-bottom: 6px;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--tsg-navy);
	text-decoration: none;
	border-bottom: 3px solid var(--tsg-accent);
	transition: opacity .2s ease;
}
.tsg__more:hover { opacity: .75; }
.tsg__more-icon { transition: transform .2s ease; }
.tsg__more:hover .tsg__more-icon { transform: translateX(4px); }

/* Grid -------------------------------------------------------------------- */
.tsg__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	column-gap: 36px;
	row-gap: 28px;
	align-items: stretch;
}
.tsg__card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	background: #fff;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 10px 30px rgba(20, 20, 60, .10);
	transition: transform .35s ease, box-shadow .35s ease;
}
.tsg--lift .tsg__card:hover {
	transform: translateY(-6px);
	box-shadow: 0 18px 40px rgba(20, 20, 60, .18);
}
.tsg__media {
	position: relative;
	display: block;
	width: 100%;
	height: 268px;
	overflow: hidden;
	background: #e8e8ee;
	color: #fff;
	text-decoration: none;
}
.tsg__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .6s ease;
}
.tsg--zoom .tsg__card:hover .tsg__img { transform: scale(1.06); }

/* hover overlay */
.tsg__overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 20px;
	text-align: center;
	background: rgba(35, 25, 15, .62);
	opacity: 0;
	transition: opacity .35s ease;
	pointer-events: none;
}
a.tsg__media:hover .tsg__overlay,
a.tsg__media:focus-visible .tsg__overlay { opacity: 1; }
a.tsg__media:focus-visible { outline: 3px solid var(--tsg-accent); outline-offset: -3px; }

.tsg__overlay > * {
	transform: translateY(14px);
	transition: transform .4s ease;
}
a.tsg__media:hover .tsg__overlay > *,
a.tsg__media:focus-visible .tsg__overlay > * { transform: translateY(0); }
a.tsg__media:hover .tsg__overlay > :nth-child(2) { transition-delay: .04s; }
a.tsg__media:hover .tsg__overlay > :nth-child(3) { transition-delay: .08s; }
a.tsg__media:hover .tsg__overlay > :nth-child(4) { transition-delay: .12s; }

.tsg__ov-icon {
	display: flex;
	width: 40px;
	height: 40px;
	margin-bottom: 14px;
	align-items: center;
	justify-content: center;
	border: 2px solid #fff;
	border-radius: 50%;
	color: #fff;
}
.tsg__ov-title { font-size: 24px; line-height: 1.25; font-weight: 700; color: #fff; }
.tsg__ov-sub { font-size: 16px; line-height: 1.3; color: rgba(255, 255, 255, .75); }
.tsg__ov-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 14px;
	padding: 12px 28px;
	border: 2px solid #fff;
	border-radius: 999px;
	font-size: 15px;
	font-weight: 700;
	line-height: 1;
	color: #fff;
}

/* body */
.tsg__body {
	flex: 1 1 auto;
	min-height: 92px;
	padding: 20px 24px;
}
.tsg__title {
	margin: 0 0 10px;
	font-size: 21px;
	line-height: 1.3;
	font-weight: 700;
	color: var(--tsg-navy);
}
.tsg__title a {
	color: inherit;
	text-decoration: none;
	transition: color .2s ease;
}
.tsg__sub {
	display: flex;
	align-items: center;
	gap: 14px;
	font-size: 16px;
	line-height: 1.4;
	color: #7a7a85;
}
.tsg__sub::before {
	content: "";
	flex: none;
	width: 46px;
	height: 2px;
	background: var(--tsg-accent);
}

/* View More ---------------------------------------------------------------- */
.tsg__card[hidden] { display: none; }
.tsg__card--reveal { animation: tsg-reveal .55s ease both; }
@keyframes tsg-reveal {
	from { opacity: 0; transform: translateY(24px); }
	to   { opacity: 1; transform: none; }
}
.tsg__more-wrap { margin-top: 48px; text-align: center; }
.tsg__more-wrap[hidden] { display: none; }
.tsg__loadmore {
	-webkit-appearance: none;
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin: 0;
	padding: 16px 44px;
	border: 0;
	border-radius: 999px;
	background: var(--tsg-accent);
	color: #fff;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: .01em;
	cursor: pointer;
	box-shadow: 0 8px 20px rgba(224, 36, 47, .25);
	transition: background-color .25s ease, color .25s ease, transform .25s ease, box-shadow .25s ease;
}
.tsg__loadmore:hover,
.tsg__loadmore:focus-visible { background: var(--tsg-navy); color: #fff; transform: translateY(-2px); }
.tsg__loadmore:focus-visible { outline: 3px solid var(--tsg-accent); outline-offset: 3px; }
.tsg__loadmore:active { transform: translateY(0); }

@media (max-width: 1024px) {
	.tsg__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.tsg__heading { font-size: 46px; }
}
@media (max-width: 767px) {
	.tsg__grid { grid-template-columns: minmax(0, 1fr); }
	.tsg__header { flex-wrap: wrap; }
	.tsg__titles { padding-left: 46px; }
	.tsg__eyebrow::before { left: -46px; width: 36px; }
	.tsg__heading { font-size: 36px; }
	.tsg__eyebrow { font-size: 18px; }
	.tsg__more { font-size: 17px; margin-top: 4px; }
	.tsg__media { height: 230px; }
}
/* touch devices have no hover: keep the overlay hidden so the photo stays clean */
@media (hover: none) { .tsg__overlay { display: none; } }

/* ==========================================================================
   Lightbox
   ========================================================================== */

html.tsg-lb-open, html.tsg-lb-open body { overflow: hidden !important; }

.tsg-lb {
	--tsg-lb-bg: #000;
	--tsg-lb-bar: rgba(0, 0, 0, .45);
	--tsg-lb-icon: #999;
	--tsg-lb-icon-h: #fff;
	--tsg-lb-counter: #999;
	--tsg-lb-accent: #c0504d;

	position: fixed;
	inset: 0;
	z-index: 2147483000;
	background: var(--tsg-lb-bg);
	color: #fff;
	opacity: 0;
	visibility: hidden;
	transition: opacity .25s ease, visibility 0s linear .25s;
	font-family: inherit;
	-webkit-tap-highlight-color: transparent;
	outline: none;
}
.tsg-lb.is-open {
	opacity: 1;
	visibility: visible;
	transition: opacity .25s ease;
}
.tsg-lb[hidden] { display: none; }
.tsg-lb *, .tsg-lb *::before, .tsg-lb *::after { box-sizing: border-box; }

/* top bar */
.tsg-lb__bar {
	position: absolute;
	z-index: 5;
	top: 0;
	left: 0;
	right: 0;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: var(--tsg-lb-bar);
}
.tsg-lb__counter {
	padding: 0 20px;
	font-size: 14px;
	line-height: 1;
	letter-spacing: .02em;
	color: var(--tsg-lb-counter);
	font-variant-numeric: tabular-nums;
}
.tsg-lb__tools { display: flex; align-items: center; height: 100%; }

.tsg-lb button,
.tsg-lb a.tsg-lb__btn {
	-webkit-appearance: none;
	appearance: none;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	text-transform: none;
	cursor: pointer;
	color: var(--tsg-lb-icon);
}
.tsg-lb__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 55px;
	height: 48px;
	transition: color .2s ease, opacity .2s ease;
}
.tsg-lb__btn svg { width: 24px; height: 24px; fill: currentColor; display: block; pointer-events: none; }
.tsg-lb__btn:hover, .tsg-lb__btn:focus-visible { color: var(--tsg-lb-icon-h); background: transparent; }
.tsg-lb__btn:focus-visible { outline: 2px solid var(--tsg-lb-icon-h); outline-offset: -4px; }
.tsg-lb__btn[disabled] { opacity: .35; cursor: default; pointer-events: none; }
.tsg-lb__btn[hidden] { display: none; }

/* share menu */
.tsg-lb__share { position: relative; height: 100%; }
.tsg-lb__menu {
	position: absolute;
	top: 100%;
	right: -8px;
	min-width: 170px;
	padding: 6px 0;
	background: #1d1d1d;
	border: 1px solid rgba(255, 255, 255, .1);
	box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
	z-index: 6;
}
.tsg-lb__menu[hidden] { display: none; }
.tsg-lb__menu a,
.tsg-lb__menu button {
	display: block;
	width: 100%;
	padding: 10px 16px;
	font-size: 14px;
	line-height: 1.3;
	text-align: left;
	color: #ddd;
	text-decoration: none;
	transition: background .15s ease, color .15s ease;
}
.tsg-lb__menu a:hover, .tsg-lb__menu button:hover,
.tsg-lb__menu a:focus-visible, .tsg-lb__menu button:focus-visible {
	background: rgba(255, 255, 255, .1);
	color: #fff;
	outline: none;
}

/* stage */
.tsg-lb__stage {
	position: absolute;
	inset: 0;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	touch-action: none;
	user-select: none;
	-webkit-user-select: none;
}
.tsg-lb__img {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	opacity: 0;
	transform-origin: center center;
	will-change: transform, opacity;
	transition: opacity .3s ease, transform .25s ease;
	-webkit-user-drag: none;
	cursor: zoom-in;
}
.tsg-lb.is-zoomed .tsg-lb__img { cursor: grab; }
.tsg-lb.is-dragging .tsg-lb__img { transition: opacity .3s ease; cursor: grabbing; }

.tsg-lb__spinner {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 42px;
	height: 42px;
	margin: -21px 0 0 -21px;
	border: 3px solid rgba(255, 255, 255, .2);
	border-top-color: #fff;
	border-radius: 50%;
	animation: tsg-spin .8s linear infinite;
	opacity: 0;
	pointer-events: none;
	transition: opacity .2s ease;
}
.tsg-lb.is-loading .tsg-lb__spinner { opacity: 1; }
@keyframes tsg-spin { to { transform: rotate(360deg); } }

.tsg-lb__error {
	position: absolute;
	left: 0; right: 0; top: 50%;
	text-align: center;
	color: #bbb;
	font-size: 15px;
}
.tsg-lb__error[hidden] { display: none; }

/* arrows */
.tsg-lb__nav {
	position: absolute;
	z-index: 4;
	top: 50%;
	width: 48px;
	height: 48px;
	margin-top: -24px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: color .2s ease, opacity .2s ease;
}
.tsg-lb__nav svg { width: 24px; height: 24px; fill: currentColor; pointer-events: none; }
.tsg-lb__nav:hover, .tsg-lb__nav:focus-visible { color: var(--tsg-lb-icon-h); background: transparent; }
.tsg-lb__nav:focus-visible { outline: 2px solid var(--tsg-lb-icon-h); outline-offset: -4px; }
.tsg-lb__nav--prev { left: 20px; }
.tsg-lb__nav--next { right: 20px; }
.tsg-lb__nav[disabled] { opacity: .3; cursor: default; pointer-events: none; }
.tsg-lb__nav[hidden] { display: none; }

/* floating whatsapp */
.tsg-lb__wa {
	position: absolute;
	z-index: 5;
	right: 32px;
	bottom: 32px;
	width: 66px;
	height: 66px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: var(--tsg-lb-accent);
	color: #fff !important;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
	transition: transform .2s ease, filter .2s ease;
}
.tsg-lb__wa:hover { transform: scale(1.07); filter: brightness(1.08); }
.tsg-lb__wa:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.tsg-lb__wa svg { width: 32px; height: 32px; fill: currentColor; }
.tsg-lb__wa[hidden] { display: none; }

/* toast */
.tsg-lb__toast {
	position: absolute;
	z-index: 7;
	left: 50%;
	bottom: 36px;
	transform: translate(-50%, 12px);
	padding: 10px 18px;
	border-radius: 4px;
	background: rgba(30, 30, 30, .95);
	color: #fff;
	font-size: 14px;
	line-height: 1.3;
	opacity: 0;
	pointer-events: none;
	transition: opacity .25s ease, transform .25s ease;
}
.tsg-lb__toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 767px) {
	.tsg-lb__btn { width: 42px; }
	.tsg-lb__counter { padding: 0 14px; }
	.tsg-lb__nav { width: 40px; }
	.tsg-lb__nav--prev { left: 6px; }
	.tsg-lb__nav--next { right: 6px; }
	.tsg-lb__wa { right: 18px; bottom: 18px; width: 56px; height: 56px; }
	.tsg-lb__wa svg { width: 28px; height: 28px; }
}

@media (prefers-reduced-motion: reduce) {
	.tsg__card--reveal, .tsg__loadmore, .tsg-lb, .tsg-lb__img, .tsg__img, .tsg__overlay, .tsg__overlay > *, .tsg__card { transition: none !important; }
	.tsg-lb__spinner { animation-duration: 1.6s; }
}
