/* =========================================================
   TRIP EXPERIENCE CARDS WIDGET STYLES
   ========================================================= */

.abx-cards-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
	width: 100%;
	box-sizing: border-box;
}

/* Desktop Grid Column Classes */
.abx-cards-cols-desktop-1 .abx-cards-grid { grid-template-columns: 1fr; }
.abx-cards-cols-desktop-2 .abx-cards-grid { grid-template-columns: repeat(2, 1fr); }
.abx-cards-cols-desktop-3 .abx-cards-grid { grid-template-columns: repeat(3, 1fr); }
.abx-cards-cols-desktop-4 .abx-cards-grid { grid-template-columns: repeat(4, 1fr); }
.abx-cards-cols-desktop-5 .abx-cards-grid { grid-template-columns: repeat(5, 1fr); }
.abx-cards-cols-desktop-6 .abx-cards-grid { grid-template-columns: repeat(6, 1fr); }

/* Tablet Grid Column Classes */
@media (max-width: 1024px) {
	.abx-cards-cols-tablet-1 .abx-cards-grid { grid-template-columns: 1fr; }
	.abx-cards-cols-tablet-2 .abx-cards-grid { grid-template-columns: repeat(2, 1fr); }
	.abx-cards-cols-tablet-3 .abx-cards-grid { grid-template-columns: repeat(3, 1fr); }
	.abx-cards-cols-tablet-4 .abx-cards-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Mobile Grid Column Classes (Vertical Stack: 1 Image per column) */
@media (max-width: 767px) {
	.abx-cards-grid,
	.abx-cards-cols-mobile-1 .abx-cards-grid {
		grid-template-columns: 1fr !important;
	}
	.abx-cards-cols-mobile-2 .abx-cards-grid {
		grid-template-columns: repeat(2, 1fr) !important;
	}
}

/* Card Item */
.abx-cards-item {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	overflow: hidden;
	min-height: 480px;
	border-radius: 14px;
	box-sizing: border-box;
	isolation: isolate;
	transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s ease;
}

/* Card Background Image */
.abx-cards-bg {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	z-index: 1;
	transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
	will-change: transform;
}

/* Card Background Overlay */
.abx-cards-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 2;
	pointer-events: none;
	background: linear-gradient(to top, rgba(12, 22, 18, 0.92) 0%, rgba(12, 22, 18, 0.45) 45%, rgba(0, 0, 0, 0) 100%);
	transition: background 0.4s ease, opacity 0.4s ease;
}

/* Full Card Clickable Overlay Link */
.abx-cards-full-link {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 10;
	cursor: pointer;
}

/* Card Content Container */
.abx-cards-content {
	position: relative;
	z-index: 3;
	display: flex;
	flex-direction: column;
	padding: 32px 28px;
	width: 100%;
	box-sizing: border-box;
	pointer-events: none;
}

/* Badge / Tag */
.abx-cards-badge {
	display: inline-block;
	align-self: flex-start;
	background-color: #D36135;
	color: #ffffff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	padding: 5px 10px;
	border-radius: 4px;
	margin-bottom: 14px;
	line-height: 1.2;
}

/* Card Title */
.abx-cards-title {
	margin: 0 0 12px 0;
	color: #ffffff;
	font-family: "Playfair Display", Georgia, "Times New Roman", serif;
	font-size: 26px;
	font-weight: 500;
	line-height: 1.25;
	transition: color 0.3s ease;
}

/* Description Hover Behavior Modes */

/* Mode 1: Reveal on Hover (Default) */
.abx-cards-desc-mode-hover-reveal .abx-cards-desc {
	max-height: 0;
	opacity: 0;
	transform: translateY(12px);
	overflow: hidden;
	margin-bottom: 0;
	transition: max-height 0.4s cubic-bezier(0.25, 1, 0.5, 1),
	            opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1),
	            transform 0.4s cubic-bezier(0.25, 1, 0.5, 1),
	            margin-bottom 0.4s ease;
	color: rgba(255, 255, 255, 0.88);
	font-size: 14px;
	line-height: 1.55;
}

.abx-cards-desc-mode-hover-reveal .abx-cards-item:hover .abx-cards-desc,
.abx-cards-desc-mode-hover-reveal .abx-cards-item:focus-within .abx-cards-desc {
	max-height: 240px;
	opacity: 1;
	transform: translateY(0);
	margin-bottom: 20px;
}

/* Mode 2: Slide Up & Fade on Hover */
.abx-cards-desc-mode-hover-slide .abx-cards-desc {
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.35s ease, transform 0.35s ease, margin-bottom 0.35s ease;
	color: rgba(255, 255, 255, 0.88);
	font-size: 14px;
	line-height: 1.55;
	margin-bottom: 0;
}

.abx-cards-desc-mode-hover-slide .abx-cards-item:hover .abx-cards-desc {
	opacity: 1;
	transform: translateY(0);
	margin-bottom: 20px;
}

/* Mode 3: Always Visible */
.abx-cards-desc-mode-always-visible .abx-cards-desc,
.abx-cards-desc {
	color: rgba(255, 255, 255, 0.88);
	font-size: 14px;
	line-height: 1.55;
	margin-bottom: 20px;
}

/* Mobile Screen Fallback for Hover Reveal (so description can be read easily on touch) */
@media (max-width: 767px) {
	.abx-cards-desc-mode-hover-reveal .abx-cards-item:active .abx-cards-desc,
	.abx-cards-desc-mode-hover-reveal .abx-cards-item:focus .abx-cards-desc {
		max-height: 240px;
		opacity: 1;
		transform: translateY(0);
		margin-bottom: 20px;
	}
}

/* Link & Arrow Button */
.abx-cards-link-wrap {
	margin-top: 4px;
}

.abx-cards-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #ffffff;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	text-decoration: none;
	pointer-events: auto;
	transition: color 0.3s ease;
}

.abx-cards-arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	stroke: currentColor;
	fill: currentColor;
	stroke-width: 2.5px;
	transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), stroke 0.3s ease, fill 0.3s ease, color 0.3s ease;
	will-change: transform;
}

.abx-cards-arrow svg {
	width: 100%;
	height: 100%;
	fill: currentColor;
}

.abx-cards-arrow i {
	font-size: inherit;
	color: currentColor;
}

.abx-cards-item:hover .abx-cards-arrow {
	transform: translateX(6px);
}
