/**
 * 123Apartment Tours frontend styles.
 * Mobile-first safety with explicit PC / tablet / mobile layouts.
 */

.a123-tour-list,
.a123-tour-list * {
	box-sizing: border-box;
}

.a123-tour-list {
	display: flex;
	flex-direction: column;
	width: 100%;
	min-width: 0;
	gap: 28px;
}

.a123-tour-card {
	--a123-tour-card-gap: 20px;
	--a123-tour-side-width: 150px;
	display: flex;
	flex-direction: row;
	align-items: stretch;
	width: 100%;
	min-width: 0;
	padding: 16px;
	gap: var(--a123-tour-card-gap);
	background: #fff;
	border: 1px solid #e7ebf2;
	border-radius: 16px;
	box-shadow: 0 8px 24px rgba(17, 24, 39, .05);
	transition:
		background-color .2s ease,
		border-color .2s ease,
		box-shadow .2s ease,
		transform .2s ease;
}

.a123-tour-card:hover {
	transform: translateY(-2px);
}

.a123-tour-card__media {
	flex: 0 0 26%;
	width: 26%;
	max-width: 26%;
	min-width: 0;
	overflow: hidden;
}

.a123-tour-card__image {
	width: 100%;
	height: 220px;
	overflow: hidden;
	border-radius: 12px;
	background: #fff;
	box-shadow: none;
}

.a123-tour-card--image-contain .a123-tour-card__image {
	height: auto !important;
	aspect-ratio: 16 / 9;
}

.a123-tour-card__image img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: contain;
	object-position: center;
	transition: transform .35s ease;
}

.a123-tour-card__body {
	display: grid;
	grid-template-columns: minmax(110px, var(--a123-tour-side-width)) minmax(0, 1fr);
	gap: var(--a123-tour-card-gap);
	flex: 1 1 auto;
	min-width: 0;
}

.a123-tour-card__side {
	display: flex;
	flex-direction: column;
	min-width: 0;
	gap: 12px;
	padding-right: var(--a123-tour-card-gap);
	border-right: 1px solid #e5e7eb;
}

.a123-tour-card__main {
	min-width: 0;
	padding-block: 4px;
}

.a123-tour-card__meta {
	display: flex;
	flex-direction: column;
	min-width: 0;
	gap: 3px;
	font-size: 14px;
	line-height: 1.4;
	color: #374151;
	text-align: center;
}

.a123-tour-card__duration,
.a123-tour-card__type {
	overflow-wrap: anywhere;
}

.a123-tour-card__duration {
	font-weight: 400;
}

.a123-tour-card__type {
	font-weight: 700;
	color: #111827;
}

.a123-tour-card__actions {
	display: flex;
	flex-direction: column;
	min-width: 0;
	gap: 8px;
}

.a123-tour-card__detail-button,
.a123-tour-card__booking {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-width: 0;
	min-height: 38px;
	padding: 8px 16px;
	border: 1px solid transparent;
	border-radius: 6px;
	font: inherit;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	white-space: normal;
	transition:
		color .2s ease,
		background-color .2s ease,
		border-color .2s ease;
}

.a123-tour-card__detail-button {
	color: #374151;
	background: #e5e7eb;
	cursor: pointer;
}

.a123-tour-card__detail-button:hover,
.a123-tour-card__detail-button:focus-visible {
	color: #111827;
	background: #d1d5db;
}

.a123-tour-card__detail-button:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.a123-tour-card__booking {
	color: #fff;
	background: #333;
	cursor: pointer;
}

.a123-tour-card__booking:hover,
.a123-tour-card__booking:focus-visible {
	color: #fff;
	background: #111;
}

.a123-tour-card__booking:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.a123-tour-card__price {
	margin-top: auto;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	color: #e63b4f;
	text-align: center;
	overflow-wrap: anywhere;
}

.a123-tour-card__title {
	margin: 0 0 12px;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.35;
	color: #4878d0;
	overflow-wrap: anywhere;
	transition: color .2s ease;
}

.a123-tour-card__title a {
	color: inherit;
	text-decoration: none;
}

.a123-tour-card__image {
	display: block;
	text-decoration: none;
}

.a123-tour-card__info {
	display: flex;
	flex-direction: column;
	min-width: 0;
	gap: 5px;
}

.a123-tour-card__line,
.a123-tour-card__description {
	min-width: 0;
	font-size: 14px;
	line-height: 1.55;
	color: #2f3540;
	overflow-wrap: anywhere;
}

.a123-tour-card__label {
	font-weight: 700;
	color: #111827;
}

.a123-tour-empty {
	width: 100%;
	padding: 24px;
	border: 1px dashed #d1d5db;
	border-radius: 12px;
	color: #6b7280;
	text-align: center;
}

.a123-tour-pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	width: 100%;
	gap: 8px;
	margin-top: 28px;
}

.a123-tour-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	min-height: 40px;
	padding: 8px 12px;
	border: 1px solid transparent;
	border-radius: 6px;
	background: #f3f4f6;
	color: #374151;
	line-height: 1;
	text-align: center;
	text-decoration: none;
	transition:
		color .2s ease,
		background-color .2s ease,
		border-color .2s ease;
}

.a123-tour-pagination a.page-numbers:hover,
.a123-tour-pagination a.page-numbers:focus-visible,
.a123-tour-pagination .page-numbers.current {
	background: #333;
	color: #fff;
}

.a123-tour-pagination a.page-numbers:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.a123-tour-pagination .page-numbers.dots {
	min-width: auto;
	padding-inline: 4px;
	background: transparent;
}

/* Tablet: image stays left, action/meta block becomes a horizontal strip. */
@media (min-width: 768px) and (max-width: 1024px) {
	.a123-tour-card {
		--a123-tour-card-gap: 16px;
	}

	.a123-tour-card__media {
		flex-basis: 34%;
		width: 34%;
		max-width: 34%;
	}

	.a123-tour-card__image {
		height: 210px;
	}

	.a123-tour-card__body {
		grid-template-columns: minmax(0, 1fr) !important;
		align-content: start;
	}

	.a123-tour-card__side {
		display: grid;
		grid-template-columns: minmax(100px, 1fr) minmax(190px, auto) auto;
		align-items: center;
		gap: 12px;
		padding-right: 0;
		padding-bottom: 12px;
		border-right: 0;
		border-bottom: 1px solid #e5e7eb;
	}

	.a123-tour-card__meta,
	.a123-tour-card__price {
		text-align: left;
	}

	.a123-tour-card__actions {
		flex-direction: row;
		align-items: stretch;
	}

	.a123-tour-card__detail-button,
	.a123-tour-card__booking {
		width: auto;
		min-width: 92px;
	}

	.a123-tour-card__price {
		margin-top: 0;
		white-space: nowrap;
	}
}

/* Narrow tablet: let the action strip wrap without horizontal overflow. */
@media (min-width: 768px) and (max-width: 880px) {
	.a123-tour-card__side {
		grid-template-columns: minmax(0, 1fr) minmax(180px, auto);
	}

	.a123-tour-card__price {
		grid-column: 1 / -1;
	}
}

/* Mobile: complete one-column layout. */
@media (max-width: 767px) {
	.a123-tour-list {
		gap: 18px;
	}

	.a123-tour-card {
		--a123-tour-card-gap: 14px;
		flex-direction: column !important;
		padding: 12px;
	}

	.a123-tour-card__media {
		flex: 0 0 auto !important;
		flex-basis: auto !important;
		width: 100% !important;
		max-width: 100% !important;
	}

	.a123-tour-card__image {
		height: 230px;
	}

	.a123-tour-card__body {
		display: grid;
		grid-template-columns: minmax(0, 1fr) !important;
		gap: 14px;
		width: 100%;
	}

	.a123-tour-card__main {
		order: 1;
		padding-block: 0;
	}

	.a123-tour-card__side {
		order: 2;
		display: grid;
		grid-template-columns: minmax(0, 1fr);
		gap: 12px;
		padding: 14px 0 0;
		border-right: 0;
		border-top: 1px solid #e5e7eb;
	}

	.a123-tour-card__meta,
	.a123-tour-card__price {
		text-align: left;
	}

	.a123-tour-card__actions {
		flex-direction: row;
		width: 100%;
	}

	.a123-tour-card__detail-button,
	.a123-tour-card__booking {
		flex: 1 1 0;
		width: auto;
		min-width: 0;
	}

	.a123-tour-card__price {
		margin-top: 0;
	}

	.a123-tour-card__title {
		font-size: 17px;
	}

	.a123-tour-card__line,
	.a123-tour-card__description {
		font-size: 13.5px;
	}

	.a123-tour-pagination {
		gap: 6px;
		margin-top: 20px;
	}

	.a123-tour-pagination .page-numbers {
		min-width: 36px;
		min-height: 36px;
		padding: 7px 9px;
	}
}

@media (max-width: 420px) {
	.a123-tour-card__image {
		height: 210px;
	}

	.a123-tour-card__actions {
		flex-direction: column;
	}

	.a123-tour-card__detail-button,
	.a123-tour-card__booking {
		width: 100%;
	}

}

@media (prefers-reduced-motion: reduce) {
	.a123-tour-card,
	.a123-tour-card__image img,
	.a123-tour-card__detail-button,
	.a123-tour-card__booking,
	.a123-tour-detail__booking,
	.a123-tour-pagination .page-numbers {
		transition: none !important;
	}

	.a123-tour-card:hover {
		transform: none;
	}
}


/* ==============================
 * Single Tour detail
 * ============================== */

.a123-tour-detail,
.a123-tour-detail * {
	box-sizing: border-box;
}

.a123-tour-detail {
	--a123-tour-detail-section-gap: 32px;
	display: flex;
	flex-direction: column;
	width: 100%;
	min-width: 0;
	gap: var(--a123-tour-detail-section-gap);
}

.a123-tour-detail__title {
	margin: 0;
	font-size: clamp(24px, 3vw, 42px);
	font-weight: 700;
	line-height: 1.25;
	color: #111827;
	overflow-wrap: anywhere;
}

.a123-tour-detail__hero {
	display: flex;
	align-items: flex-start;
	width: 100%;
	min-width: 0;
	gap: 24px;
}

.a123-tour-detail__media {
	flex: 0 0 70%;
	width: 70%;
	height: 460px;
	min-width: 0;
	overflow: hidden;
	border-radius: 16px;
	background: #fff;
	box-shadow: none;
}

.a123-tour-detail--image-contain .a123-tour-detail__media {
	height: auto !important;
	aspect-ratio: 16 / 9;
}

.a123-tour-detail__media img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: contain;
	object-position: center;
}

.a123-tour-detail__summary {
	position: sticky;
	top: 24px;
	display: flex;
	flex: 1 1 0;
	flex-direction: column;
	min-width: 240px;
	padding: 20px;
	gap: 18px;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 16px;
	box-shadow: 0 10px 28px rgba(17, 24, 39, .08);
}

.a123-tour-detail__price {
	padding: 14px 16px;
	background: #333;
	border-radius: 10px;
	color: #fff;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.35;
	text-align: center;
}

.a123-tour-detail__facts {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.a123-tour-detail__fact {
	display: grid;
	grid-template-columns: minmax(92px, auto) minmax(0, 1fr);
	gap: 8px;
	padding: 10px 0;
	border-bottom: 1px dashed #d1d5db;
	font-size: 14px;
	line-height: 1.45;
	color: #374151;
}

.a123-tour-detail__fact:last-child {
	border-bottom: 0;
}

.a123-tour-detail__fact strong {
	font-weight: 700;
	color: #111827;
}

.a123-tour-detail__fact span {
	min-width: 0;
	overflow-wrap: anywhere;
}

.a123-tour-detail__booking {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 44px;
	padding: 11px 18px;
	border: 1px solid #333;
	border-radius: 7px;
	background: #333;
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	transition: color .2s ease, background-color .2s ease, border-color .2s ease;
}

.a123-tour-detail__booking:hover,
.a123-tour-detail__booking:focus-visible {
	border-color: #111;
	background: #111;
	color: #fff;
}

.a123-tour-detail__booking:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.a123-tour-detail__section {
	min-width: 0;
}

.a123-tour-detail__section-title {
	margin: 0 0 18px;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
	color: #111827;
}

.a123-tour-detail__content {
	font-size: 15px;
	line-height: 1.7;
	color: #2f3540;
}

.a123-tour-detail__content > :first-child {
	margin-top: 0;
}

.a123-tour-detail__content > :last-child {
	margin-bottom: 0;
}

.a123-tour-detail__content h2,
.a123-tour-detail__content h3,
.a123-tour-detail__content h4 {
	margin: 1.5em 0 .55em;
	color: #111827;
	line-height: 1.35;
}

.a123-tour-detail__content p,
.a123-tour-detail__content ul,
.a123-tour-detail__content ol {
	margin: 0 0 1em;
}

.a123-tour-detail__content ul,
.a123-tour-detail__content ol {
	padding-left: 1.25em;
}

.a123-tour-detail__content img {
	max-width: 100%;
	height: auto;
}

/* Related Tours */
.a123-tour-related {
	width: 100%;
	min-width: 0;
}

.a123-tour-related__heading {
	margin: 0 0 22px;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.3;
	color: #111827;
}

/* Fallback template when no Elementor Single Tour template exists. */
.a123-tour-single-fallback {
	width: 100%;
	padding: 48px 20px 72px;
}

.a123-tour-single-fallback__inner {
	width: min(100%, 1280px);
	margin: 0 auto;
}

.a123-tour-related--fallback {
	margin-top: 56px;
}

@media (max-width: 1024px) {
	.a123-tour-detail__media {
		flex-basis: 64%;
		width: 64%;
		height: 360px;
	}

	.a123-tour-detail__summary {
		position: static;
		min-width: 220px;
	}

	.a123-tour-detail__fact {
		grid-template-columns: minmax(0, 1fr);
		gap: 3px;
	}
}

@media (max-width: 767px) {
	.a123-tour-detail {
		--a123-tour-detail-section-gap: 24px;
	}

	.a123-tour-detail__hero {
		flex-direction: column;
		gap: 16px;
	}

	.a123-tour-detail__media {
		flex: 0 0 auto !important;
		width: 100% !important;
		height: 260px;
	}

	.a123-tour-detail__summary {
		width: 100%;
		min-width: 0;
		padding: 16px;
	}

	.a123-tour-detail__fact {
		grid-template-columns: minmax(100px, auto) minmax(0, 1fr);
	}

	.a123-tour-detail__content {
		font-size: 14px;
		line-height: 1.65;
	}

	.a123-tour-single-fallback {
		padding: 28px 12px 48px;
	}

	.a123-tour-related--fallback {
		margin-top: 40px;
	}
}

@media (max-width: 480px) {
	.a123-tour-detail__media {
		height: 230px;
	}

	.a123-tour-detail__fact {
		grid-template-columns: minmax(0, 1fr);
		gap: 3px;
	}
}
