/* =========================================================
   Hido Experiences — UX/UI (hido-experience-ux skill)
   Brand: #37b268 · #13153e · Arabic / RTL first
========================================================= */

:root {
	--hido-green: #37b268;
	--hido-green-dark: #0d7a38;
	--hido-navy: #13153e;
	--hido-muted: #5f6674;
	--hido-line: #e5ebe7;
	--hido-bg: #f4f8f5;
	--hido-radius: 18px;
	--hido-shadow: 0 10px 28px rgba(19, 21, 62, .08);
	--hido-font: Tajawal, "HTRakik", system-ui, sans-serif;
}

.hido-exp-wrap,
.hido-single-wrap,
.hido-exp-hero__inner {
	max-width: 1120px;
	margin-inline: auto;
	padding-inline: 20px;
}

.hido-exp-wrap {
	padding-block: 36px 88px;
}

.hido-single-wrap {
	padding-block: 28px 100px;
	display: flex;
	flex-direction: column;
	gap: 24px;
}

/* ---- Listing hero ---- */

.hido-exp-hero {
	background:
		radial-gradient(1200px 320px at 80% -10%, rgba(55, 178, 104, .18), transparent 60%),
		linear-gradient(180deg, #eef7f1 0%, #ffffff 100%);
	border-bottom: 1px solid var(--hido-line);
	padding-block: 56px 40px;
}

.hido-exp-hero__inner {
	text-align: center;
}

.hido-exp-hero__eyebrow {
	display: inline-block;
	margin: 0 0 10px;
	padding: 6px 14px;
	border-radius: 999px;
	background: rgba(55, 178, 104, .12);
	color: var(--hido-green-dark);
	font-size: .85rem;
	font-weight: 700;
}

.hido-exp-hero h1 {
	font-size: clamp(1.9rem, 4.5vw, 2.6rem);
	color: var(--hido-navy);
	margin: 0 0 12px;
	font-weight: 800;
	letter-spacing: -.02em;
}

.hido-exp-hero__lead {
	color: var(--hido-muted);
	max-width: 560px;
	margin: 0 auto;
	line-height: 1.75;
	font-size: 1.05rem;
}

.hido-exp-hero__count {
	margin: 18px 0 0;
	color: var(--hido-navy);
	font-weight: 700;
	font-size: .95rem;
}

/* ---- Cards (compact, skill anatomy) ---- */

.hido-exp-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 24px;
	align-items: stretch;
}

.hido-exp-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--hido-line);
	border-radius: 20px;
	overflow: hidden;
	height: 100%;
	box-shadow: 0 1px 2px rgba(19, 21, 62, .04);
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.hido-exp-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 14px 32px rgba(19, 21, 62, .1);
	border-color: #c6dfd0;
}

.hido-exp-card__media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 11;
	overflow: hidden;
	background: #dfeae3;
}

.hido-exp-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .45s ease;
}

.hido-exp-card:hover .hido-exp-card__media img {
	transform: scale(1.05);
}

.hido-exp-card__shade {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(19, 21, 62, .08) 0%, transparent 42%, rgba(19, 21, 62, .45) 100%);
	pointer-events: none;
}

.hido-exp-card__badge {
	position: absolute;
	inset-block-start: 12px;
	inset-inline-end: 12px;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 5px 10px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .96);
	color: var(--hido-navy);
	font-size: .8rem;
	font-weight: 800;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
	line-height: 1;
}

.hido-exp-card__badge .bi {
	color: #f0a818;
	font-size: .75rem;
}

.hido-exp-card__badge-count {
	color: var(--hido-muted);
	font-weight: 600;
	font-size: .72rem;
	margin-inline-start: 2px;
}

.hido-exp-card__price {
	position: absolute;
	inset-block-end: 12px;
	inset-inline-start: 12px;
	z-index: 1;
	background: var(--hido-green);
	color: #fff;
	font-weight: 800;
	font-size: .82rem;
	padding: 7px 12px;
	border-radius: 999px;
	box-shadow: 0 4px 12px rgba(13, 122, 56, .28);
}

.hido-exp-card__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	padding: 14px 14px 14px;
	gap: 0;
}

.hido-exp-card__top {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 14px;
}

.hido-exp-card__title {
	font-size: 1.15rem;
	font-weight: 800;
	color: var(--hido-navy);
	margin: 0;
	line-height: 1.35;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.hido-exp-card__title a {
	color: inherit !important;
	text-decoration: none;
}

.hido-exp-card__title a:hover {
	color: var(--hido-green-dark) !important;
}

.hido-exp-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.hido-exp-card__meta li {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--hido-bg);
	color: #3f4654;
	font-size: .78rem;
	font-weight: 600;
	line-height: 1.3;
	max-width: 100%;
}

.hido-exp-card__meta li span {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.hido-exp-card__meta .bi {
	color: var(--hido-green);
	font-size: .72rem;
	flex: 0 0 auto;
}

.hido-exp-card__desc {
	/* Always reserve exactly 2 lines (even if text is shorter). */
	--hido-desc-size: .9rem;
	--hido-desc-lh: 1.55;
	color: #667085;
	font-size: var(--hido-desc-size);
	line-height: var(--hido-desc-lh);
	min-height: calc(var(--hido-desc-size) * var(--hido-desc-lh) * 2);
	height: calc(var(--hido-desc-size) * var(--hido-desc-lh) * 2);
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	word-break: break-word;
}

.hido-exp-card__actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin-top: auto;
	padding-top: 4px;
	align-items: stretch;
}

.hido-exp-card__actions .hido-btn {
	box-sizing: border-box;
	height: 48px;
	min-height: 48px;
	max-height: 48px;
	padding: 0 12px;
	font-size: .92rem;
	font-weight: 800;
	line-height: 1;
	border-radius: 12px;
	border-width: 1.5px;
	border-style: solid;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	margin: 0;
	appearance: none;
	-webkit-appearance: none;
}

/* Kill theme/bootstrap size differences between <a> and <button> */
.hido-exp-card__actions a.hido-btn,
.hido-exp-card__actions button.hido-btn {
	height: 48px !important;
	min-height: 48px !important;
	max-height: 48px !important;
	padding-block: 0 !important;
	line-height: 1 !important;
}

.hido-exp-card__actions .hido-btn--primary {
	order: 0;
}

.hido-exp-card__actions .hido-btn--ghost {
	order: 1;
}

@media (max-width: 420px) {
	.hido-exp-card__actions {
		grid-template-columns: 1fr;
	}

	.hido-exp-card__actions .hido-btn--primary {
		order: -1;
	}
}

/* ---- Buttons ---- */

.hido-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	border-radius: 12px;
	font-weight: 800;
	font-size: .92rem;
	padding: 12px 14px;
	line-height: 1.2;
	border: 1.5px solid transparent;
	cursor: pointer;
	text-decoration: none;
	transition: background .15s ease, color .15s ease, border-color .15s ease, transform .1s ease;
	font-family: inherit;
}

.hido-btn:active {
	transform: translateY(1px);
}

.hido-btn:focus-visible {
	outline: 3px solid rgba(55, 178, 104, .4);
	outline-offset: 2px;
}

.hido-btn--primary {
	background: var(--hido-green);
	color: #fff !important;
	border-color: var(--hido-green);
}

.hido-btn--primary:hover {
	background: var(--hido-green-dark);
	border-color: var(--hido-green-dark);
	color: #fff !important;
}

.hido-btn--ghost {
	background: #fff;
	color: var(--hido-navy) !important;
	border-color: #c9d2cc;
}

.hido-btn--ghost:hover {
	border-color: var(--hido-navy);
}

.hido-btn--lg {
	padding: 14px 20px;
	font-size: 1rem;
}

/* ---- Stars ---- */

.hido-stars {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	color: #f0a818;
	font-size: .95rem;
}

.hido-stars-value {
	color: var(--hido-navy);
	font-size: .85em;
	margin-inline-start: 6px;
	font-weight: 800;
}

.hido-stars-count {
	color: var(--hido-muted);
	font-size: .8em;
	margin-inline-start: 4px;
	font-weight: 500;
}

/* ---- Single ---- */

.hido-gallery {
	display: grid;
	gap: 10px;
}

.hido-gallery__main {
	aspect-ratio: 16 / 10;
	border-radius: var(--hido-radius);
	overflow: hidden;
	background: var(--hido-bg);
	box-shadow: var(--hido-shadow);
}

.hido-gallery__main img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hido-gallery__thumbs {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.hido-gallery__thumbs button {
	width: 76px;
	height: 56px;
	border-radius: 10px;
	overflow: hidden;
	border: 2px solid transparent;
	padding: 0;
	cursor: pointer;
	background: var(--hido-bg);
}

.hido-gallery__thumbs button:focus-visible {
	outline: 3px solid rgba(55, 178, 104, .4);
}

.hido-gallery__thumbs button.is-active {
	border-color: var(--hido-green);
}

.hido-gallery__thumbs img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.hido-single-head h1 {
	font-size: clamp(1.65rem, 4vw, 2.35rem);
	color: var(--hido-navy);
	margin: 0 0 8px;
	font-weight: 800;
}

.hido-single-price {
	font-size: 1.4rem;
	font-weight: 800;
	color: var(--hido-green);
	margin: 6px 0 4px;
}

.hido-single-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 18px;
	list-style: none;
	margin: 12px 0 0;
	padding: 0;
	color: var(--hido-muted);
}

.hido-single-meta .bi {
	color: var(--hido-green);
	margin-inline-end: 4px;
}

.hido-single-cta-top,
.hido-cta {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 10px;
}

.hido-single-cta-top .hido-btn,
.hido-cta .hido-btn {
	flex: 1 1 200px;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: 52px;
	margin: 0;
	line-height: 1.25;
	padding: 14px 20px;
}

.hido-cta {
	padding: 18px;
	border: 1px solid var(--hido-line);
	border-radius: var(--hido-radius);
	background: #fff;
	box-shadow: var(--hido-shadow);
}

.hido-single-body {
	font-size: 1.05rem;
	line-height: 1.85;
	color: #333;
}

.hido-section-title {
	font-size: 1.28rem;
	font-weight: 800;
	color: var(--hido-navy);
	margin: 0 0 14px;
}

.hido-reviews {
	display: grid;
	gap: 12px;
}

.hido-review {
	border: 1px solid var(--hido-line);
	border-radius: 14px;
	padding: 16px 18px;
	background: var(--hido-bg);
}

.hido-review__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 6px;
	flex-wrap: wrap;
}

.hido-review__name {
	font-weight: 800;
	color: var(--hido-navy);
}

.hido-review__text {
	color: #555;
	margin: 0;
	line-height: 1.65;
}

.hido-related .hido-exp-grid {
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

/* Sticky mobile book bar */
.hido-sticky-book {
	position: fixed;
	inset-inline: 0;
	inset-block-end: 0;
	z-index: 40;
	display: none;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
	background: rgba(255, 255, 255, .96);
	backdrop-filter: blur(10px);
	border-top: 1px solid var(--hido-line);
	box-shadow: 0 -8px 24px rgba(19, 21, 62, .08);
}

.hido-sticky-book__info {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.hido-sticky-book__price {
	font-weight: 800;
	color: var(--hido-green);
	font-size: .95rem;
}

.hido-sticky-book__title {
	color: var(--hido-navy);
	font-size: .82rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 52vw;
}

.hido-sticky-book .hido-btn {
	flex: 0 0 auto;
	min-width: 120px;
}

/* ---- Booking modal ---- */

.hido-booking-modal {
	border: 0;
	border-radius: 20px;
	overflow: hidden;
	box-shadow: 0 24px 60px rgba(19, 21, 62, .22);
	max-height: min(88vh, 760px);
	display: flex;
	flex-direction: column;
}

#hidoBookingModal .modal-dialog,
#hidoBookingModal .hido-booking-dialog {
	margin: 16px auto;
	max-width: min(520px, calc(100% - 32px));
	max-height: 90vh;
	width: calc(100% - 32px);
}

#hidoBookingModal .modal-content.hido-booking-modal {
	max-height: min(88vh, 760px);
}

/* Form wraps header/body/footer — flex must live on the form */
.hido-booking-modal > .hido-booking-form {
	display: flex;
	flex-direction: column;
	min-height: 0;
	max-height: inherit;
	flex: 1 1 auto;
}

.hido-booking-modal .modal-header {
	align-items: flex-start;
	border-bottom: 1px solid var(--hido-line);
	padding: 16px 18px 12px;
	gap: 12px;
	flex: 0 0 auto;
}

.hido-booking-modal__heading {
	flex: 1;
	min-width: 0;
}

.hido-booking-modal__eyebrow {
	margin: 0 0 4px;
	font-size: .78rem;
	font-weight: 700;
	color: var(--hido-green-dark);
	letter-spacing: .02em;
}

.hido-booking-modal .modal-title {
	color: var(--hido-navy);
	font-weight: 800;
	font-size: 1.2rem;
	margin: 0;
	line-height: 1.3;
}

.hido-booking-modal .modal-body {
	padding: 14px 18px 10px;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	flex: 1 1 auto;
	min-height: 0;
	overscroll-behavior: contain;
}

.hido-booking-modal .modal-footer {
	border-top: 1px solid var(--hido-line);
	padding: 12px 18px 16px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 0 0 auto;
	background: #fff;
	box-shadow: 0 -6px 16px rgba(19, 21, 62, .06);
	position: relative;
	z-index: 2;
}

.hido-booking-modal .modal-footer .hido-btn {
	width: 100%;
}

/* Experience chip — NOT a form field */
.hido-booking-exp {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin-bottom: 12px;
	padding: 10px 12px;
	border-radius: 12px;
	background: linear-gradient(135deg, rgba(55, 178, 104, .1), rgba(55, 178, 104, .04));
	border: 1px solid rgba(55, 178, 104, .22);
}

.hido-booking-exp.is-empty,
.hido-booking-exp[hidden] {
	display: none !important;
}

.hido-booking-exp__label {
	font-size: .75rem;
	font-weight: 700;
	color: var(--hido-green-dark);
	text-transform: none;
}

.hido-booking-exp__name {
	font-size: 1.05rem;
	font-weight: 800;
	color: var(--hido-navy);
	line-height: 1.35;
	word-break: break-word;
}

.hido-field {
	margin-bottom: 10px;
}

.hido-field--last {
	margin-bottom: 2px;
}

.hido-field .form-label {
	font-weight: 700;
	color: var(--hido-navy);
	margin-bottom: 4px;
	font-size: .88rem;
}

.hido-req {
	color: #d64545;
	margin-inline-start: 2px;
}

.hido-field-row {
	display: grid;
	grid-template-columns: 1.2fr .8fr;
	gap: 12px;
}

.hido-phone-row {
	display: grid;
	grid-template-columns: minmax(140px, 42%) 1fr;
	gap: 8px;
	align-items: stretch;
}

.hido-phone-code {
	border-radius: 12px;
	border: 1px solid #d5ddd8;
	min-height: 46px;
	padding: 8px 10px;
	font-size: .82rem;
	color: var(--hido-navy);
	background: #fff;
	width: 100%;
	max-width: 100%;
}

.hido-field-error {
	margin: 4px 0 0;
	font-size: .78rem;
	font-weight: 700;
	color: #b42318;
	line-height: 1.35;
}

.hido-field.is-invalid .form-control,
.hido-field.is-invalid .form-select,
.hido-booking-modal .form-control.is-invalid,
.hido-booking-modal .form-select.is-invalid {
	border-color: #f04438 !important;
	background-color: #fff8f7;
	box-shadow: none !important;
}

/* Phone error: highlight number only — country code is already selected */
.hido-field[data-field="phone"].is-invalid .hido-phone-code,
.hido-field[data-field="phone"].is-invalid .hido-phone-code.is-invalid {
	border-color: #d5ddd8 !important;
	background-color: #fff !important;
	box-shadow: none !important;
}

.hido-field[data-field="phone"].is-invalid #hido-phone-local,
.hido-field[data-field="phone"].is-invalid #hido-phone-local.is-invalid {
	border-color: #f04438 !important;
	background-color: #fff8f7 !important;
	box-shadow: none !important;
}

.hido-booking-modal .form-control {
	border-radius: 12px;
	border-color: #d5ddd8;
	padding: 11px 12px;
	min-height: 46px;
	color: var(--hido-navy);
	background: #fff;
}

.hido-booking-modal .form-control::placeholder {
	color: #9aa3ad;
}

.hido-booking-modal .form-control:focus,
.hido-booking-modal .form-select:focus {
	border-color: var(--hido-green);
	box-shadow: 0 0 0 .2rem rgba(55, 178, 104, .18);
}

.hido-booking-modal textarea.form-control {
	min-height: 44px;
	resize: vertical;
}

.hido-btn-loading[hidden],
.hido-btn-label[hidden] {
	display: none !important;
}

#hidoBookingSubmit:disabled {
	opacity: .75;
	cursor: wait;
}

/* Success / error toast (replaces Bootstrap orange alert) */
.hido-toast {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 14px 16px;
	border-radius: 14px;
	margin-bottom: 18px;
	text-align: start;
	border: 1px solid transparent;
}

.hido-toast__icon {
	flex: 0 0 auto;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	font-size: .95rem;
	color: #fff;
}

.hido-toast__text {
	font-weight: 700;
	line-height: 1.55;
	font-size: .95rem;
}

.hido-toast--ok {
	background: #ecfdf3;
	border-color: #abeFC6;
	color: #067647;
}

.hido-toast--ok .hido-toast__icon {
	background: #12b76a;
}

.hido-toast--err {
	background: #fef3f2;
	border-color: #fecdca;
	color: #b42318;
}

.hido-toast--err .hido-toast__icon {
	background: #f04438;
}

.hido-booking-alert {
	border-radius: 14px;
	margin-bottom: 16px;
}

.hido-exp-empty {
	text-align: center;
	color: var(--hido-muted);
	padding: 56px 20px;
	background: var(--hido-bg);
	border-radius: var(--hido-radius);
	border: 1px dashed #c9d8cf;
}

.hido-exp-empty strong {
	display: block;
	color: var(--hido-navy);
	font-size: 1.15rem;
	margin-bottom: 8px;
}

.hido-exp-empty p {
	margin: 0 auto;
	max-width: 420px;
	line-height: 1.7;
}

@media (max-width: 640px) {
	.hido-exp-card__actions {
		grid-template-columns: 1fr;
	}

	.hido-field-row,
	.hido-phone-row {
		grid-template-columns: 1fr;
	}

	.hido-sticky-book {
		display: flex;
	}

	.hido-single-cta-top {
		display: none; /* sticky bar replaces top CTA on small screens */
	}

	.hido-single-wrap {
		padding-bottom: 120px;
	}

	/* Booking modal → bottom sheet with 16px screen inset */
	#hidoBookingModal.modal.show {
		display: flex !important;
		flex-direction: column;
		justify-content: flex-end;
		align-items: stretch;
		padding: 0 !important;
	}

	#hidoBookingModal .modal-dialog,
	#hidoBookingModal .hido-booking-dialog {
		margin: 0 16px 16px;
		margin-inline: 16px;
		margin-block-end: 16px;
		margin-block-start: 0;
		width: calc(100% - 32px);
		max-width: none;
		max-height: calc(100dvh - 32px);
		min-height: 0;
		align-items: stretch;
		transform: none;
	}

	#hidoBookingModal .modal-dialog-centered {
		min-height: 0;
		align-items: stretch;
	}

	#hidoBookingModal .modal-content.hido-booking-modal {
		border-radius: 20px 20px 16px 16px;
		max-height: calc(100dvh - 32px);
		width: 100%;
	}

	.hido-booking-modal .modal-footer .hido-btn {
		min-height: 48px;
		box-sizing: border-box;
		display: flex;
		align-items: center;
		justify-content: center;
	}
}

@media (min-width: 641px) {
	.hido-booking-modal .modal-footer {
		flex-direction: row-reverse;
		justify-content: flex-start;
	}

	.hido-booking-modal .modal-footer .hido-btn {
		width: auto;
		min-width: 160px;
	}
}
