/* comparisons.css */
/* Root tokens */
:root {
	--tc-bg: #ffffff;
	--tc-text: #000;
	--tc-muted: #6b6b6b;
	--tc-line: #E6E6E6;
	--tc-accent: #FBF6E7;
	--tc-cream: #faf6eb;
}

/* Screen reader only utility */
.sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

#compare-maui-boat-tours {
	scroll-margin-top: 50px;
}

/* Table wrapper with horizontal scroll on small screens */
.tour-compare-wrap {
	font-size: 15px;
}

.tc-scroll {
	overflow: auto;
	-webkit-overflow-scrolling: touch;
}

.pom-cols--prices {
	flex-direction: row;
}

.pom-cols--col {
	display: flex;
	flex-direction: column;
	gap: 15px;
	text-align: center;
	font-size: 15px;
	position: relative;
}

.pom-cols--fig {
	margin: auto;
	position: relative;
}

.col-btn {
	position: relative;
	left: 0;
	right: 0;
	padding-bottom: 15px;

	display: flex;
	width: 100%;
	align-items: center;
	justify-content: space-evenly;
	gap: 5px;

	flex-wrap: wrap;
}

.col-btn {
	opacity: 0;
	pointer-events: none;
	transition: all .3s;
}

.pom-cols--col:hover .col-btn {
	opacity: 1;
	pointer-events: all;
}

@media (max-width: 914px) {
	.pom-cols--prices {
		flex-direction: row;
		flex-wrap: wrap;
		gap: 10px;
	}

	.col-btn {
		opacity: 1;
		pointer-events: all;
	}
}

.pom-cols--col p {
	margin-top: 0;
	margin-bottom: 0;
}

.pom-cols--col img {
	margin-bottom: 0;
}

/* Table base */
.tour-compare {
	width: 100%;
	border-collapse: collapse;
	border-spacing: 0;
	min-width: 880px;
}

/* Corner and headers */
.tc-corner {
	width: 100px;
	min-width: 100px;
	border-right: 1px solid var(--tc-line);
	padding-top: 0.9rem;
	padding-right: 0.2rem;
	padding-bottom: 0.9rem;
	padding-left: 0.2rem;
	font-weight: 600;
	text-align: left;
}

.tc-colhead {
	padding: 0;
	width: 220px;
	min-width: 220px;
	border-left: 1px solid var(--tc-line);
}

.tc-colhead--featured {
	background: var(--tc-cream);
}

.tc-hero {
	position: relative;
	display: grid;
	grid-template-rows: auto auto auto;
}

.tc-hero img {
	width: 100%;
	object-fit: cover;
	display: block;
	margin: auto;
}

.tc-hero p {
	margin-top: 0;
	margin-bottom: 0;
}

.tc-title {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 10px;
	color: #fff;
}

.tc-title p {
	margin-top: 0;
	margin-bottom: 0;
}

.tc-title__price {
	font-weight: normal;
}

.tc-title__text {
	margin: 0;
	font-size: 20px;
	line-height: 1.25;
}

/* Subheader strip */
.tc-subhead .tc-subnote {
	text-align: center;
	padding: 1rem .75rem;
	border-top: 1px solid var(--tc-line);
	border-bottom: 1px solid var(--tc-line);
	border-right: 1px solid var(--tc-line);
}

.tc-subhead .tc-corner {
	/* border-bottom: 1px solid var(--tc-line); */
}

/* Row headers on the left */
.tc-rowhead {
	position: sticky;
	left: 0;
	background: var(--tc-bg);
	padding-top: 0.9rem;
	padding-right: 0.2rem;
	padding-bottom: 0.9rem;
	padding-left: 0.2rem;
	font-weight: 600;
	text-align: left;
	/* border-top: 1px solid var(--tc-line); */
	border-right: 1px solid var(--tc-line);
}

tbody tr:first-child .tc-rowhead {
	border-top: none;
}

/* Cells */
.tc-cell {
	text-align: center;
	padding: 1rem .75rem;
	/* border-top: 1px solid var(--tc-line); */
	border-left: 1px solid var(--tc-line);
	border-right: 1px solid var(--tc-line);
	vertical-align: middle;
}

tfoot .tc-cell {
	border-left-color: #fff;
	border-right-color: #fff;
}

.tc-colhead+.tc-colhead,
.tc-cell+.tc-cell {}

/* Featured column subtle background */
.tc-colhead--featured+td,
.tc-colhead--featured {
	background: var(--tc-cream);
}

/* Small meta blocks inside cells */
.tc-meta {
	line-height: 1.2;
}

.tc-mute {
	color: var(--tc-muted);
}

/* Yes/No/Maybe icons with pure CSS */
.tc-cell.yes::before,
.tc-cell.no::before,
.tc-cell.maybe::before {
	content: "";
	display: inline-block;
	width: 16px;
	height: 14px;
	vertical-align: middle;
	margin: 0 auto;
	background-color: currentColor;
	-webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="14" viewBox="0 0 16 14"><path d="M16,1.025q-3.393,3.108-8.143,10.5L6.3,14.031a92.912,92.912,0,0,0-6.3-7l1.452-1.5,3.881,3.5q2.036-2.1,3.786-3.8t2.789-2.625q1.038-.924,1.784-1.554T14.738.227l.285-.2a.568.568,0,0,1,.149.028,1.272,1.272,0,0,1,.353.273A2.382,2.382,0,0,1,16,1.025Z"/></svg>') no-repeat center / contain;
	mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="14" viewBox="0 0 16 14"><path d="M16,1.025q-3.393,3.108-8.143,10.5L6.3,14.031a92.912,92.912,0,0,0-6.3-7l1.452-1.5,3.881,3.5q2.036-2.1,3.786-3.8t2.789-2.625q1.038-.924,1.784-1.554T14.738.227l.285-.2a.568.568,0,0,1,.149.028,1.272,1.272,0,0,1,.353.273A2.382,2.382,0,0,1,16,1.025Z"/></svg>') no-repeat center / contain;
}

/* Checkmark (gold) */
.tc-cell.yes::before {
	color: #c29716;
}

/* Maybe (gray) */
.tc-cell.maybe::before {
	color: #e6e6e6;
	opacity: 0.9;
}

.tc-cell.no::before {
	color: #e6e6e6;
	opacity: 0.9;
}

/* CTA buttons */
.tc-cta-row .tc-cell {
	padding: 1.25rem .75rem 1.5rem;
}

.tc-cell .btn--arrow {
	margin-bottom: 10px;
}

/* Make first column sticky over featured background as we scroll horizontally */
tbody .tc-rowhead {
	z-index: 2;
}

/* Mobile tweaks */
@media (max-width: 920px) {
	.tc-corner {
		position: sticky;
		left: 0;
		z-index: 3;
		background: var(--tc-bg);
	}

	.tc-subhead .tc-subnote {
		font-size: .85rem;
	}
}

/* Highlight entire column on hover */
.tour-compare td.is-hover {
	background-color: #FBF6E7;
	/* ista nijansa kao featured */
	transition: background-color 0.2s ease;
}

@media (min-width: 800px) {

	/* Hide the Details button by default */
	.btn--details,
	.sort-item__arrows {
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.25s ease, visibility 0.25s ease;
	}

	/* When the column is hovered, show it */
	.tour-compare td.is-hover .btn--details,
	.tour-compare th.is-hover .btn--details,
	.sort-item:hover .btn--details,
	.sort-item:hover .sort-item__arrows {
		opacity: 1;
		visibility: visible;
	}
}

.tour-compare .tc-subnote.is-hover {
	background-color: #fff !important;
}

/* Row highlight (tbody only) */
.tour-compare tbody .tc-rowhead:hover,
.tour-compare tbody tr.is-row-hover {
	background-color: #FBF6E7;
	transition: background-color 0.2s ease;
}


/* Sort Grid
--------------------------------------------- */
.sort-filter {
	display: flex;
	gap: 16px;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	margin-bottom: 40px;
}

.sort-filter br {
	display: none;
}

.sort-filter .is-active {
	pointer-events: none;
}

.sort-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 40px;
	contain: layout paint;
}

.sort-item {
	position: relative;
	width: 100%;
	padding-top: 67.44%;
	/* 580 / 860 * 100 = 67.44% visine, zadržava omjer */
	background-size: cover;
	background-position: center;
	overflow: hidden;
}

.sort-item::after {
	content: "";
	/* background: repeating-radial-gradient(ellipse farthest-corner at bottom left, #000000 0%, transparent 100%); */
	background: linear-gradient(to top right, #000000 0%, transparent 80%);
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	z-index: 2;
}


.sort-item__text {
	position: absolute;
	top: 0;
	left: 0;
	/* max-width: 400px; */
	height: 100%;
	padding-left: 50px;
	padding-right: 50px;
	padding-top: 40px;
	padding-bottom: 40px;
	display: flex;
	flex-direction: column;
	color: #fff;
	opacity: 1;
	transition: opacity 0.3s ease;
	width: 100%;
	z-index: 10;
}

.sort-item__text *:not(.btn-wrapper) {
	max-width: 400px;
}

.sort-item__text .btn-wrapper {
	display: flex;
	align-items: center;
	gap: 15px;
	flex-wrap: wrap;
	margin-top: auto;
	width: 100%;
}

.sort-item__text .btn-wrapper p {
	margin: 0;
}

.sort-item__arrows {
	display: flex;
	align-items: center;
	gap: 15px;
	margin-left: auto;
}

.sort-item__arrows .arrow--prev {
	transform: rotate(180deg);
}

/* layer za cross-fade */
.sort-item__fade {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	opacity: 0;
	transition: opacity .35s cubic-bezier(0.16, 1, 0.3, 1);
	pointer-events: none;
	z-index: 1;
}

@media (max-width: 1560px) {
	.sort-grid {
		gap: 20px;
	}

	.sort-item:after {
		content: "";
		display: block;
		inset: 0;
		background-color: rgba(0, 0, 0, .2);
		position: absolute;
		top: 0;
		bottom: 0;
		z-index: 1;
	}

	.sort-item {
		padding-top: 40px;
	}

	.sort-item__text {
		top: auto;
		left: 0;
		bottom: 0;
		max-width: 400px;
		padding-left: 20px;
		padding-right: 40px;
		z-index: 20;
		position: relative;
	}

	.sort-item__text p {
		font-size: 18px;
	}

	.sort-item__text h3 {
		font-size: 32px;
	}
}

@media (max-width: 760px) {
	.sort-grid {
		grid-template-columns: repeat(1, 1fr);
	}

	.sort-item__text {
		padding-right: 20px;
	}

	.content-wide.compare-filters {
		padding-left: 0;
		padding-right: 0;
	}

	.compare-filters .pom-section__inner {
		padding-left: 16px;
		padding-right: 16px;
	}

	.compare-table .pom-section__inner {
		padding-left: 0;
		padding-right: 0;
	}
}

.sort-item__text p {
	margin-top: 0;
	margin-bottom: 20px;
	line-height: 1.5;
}

.sort-item__text h3 {
	margin-top: 0;
	margin-bottom: 20px;
}

/* Smooth movement and slight fade */
.sort-item {
	transition: transform 0.32s ease, opacity 0.32s ease;
	will-change: transform, opacity;
}

/* Optional hover polishing */
.sort-item:hover .sort-item__text {
	opacity: 1;
}

/* Respect user preference for reduced motion */
@media (prefers-reduced-motion: reduce) {
	.sort-item {
		transition: none;
	}
}

@media (max-width: 1000px) {
	.tc-scroll {
		cursor: grab;
	}

	.tc-scroll.is-dragging {
		cursor: grabbing;
		user-select: none;
	}
}
