/**
 * Homepage stories hero carousel — full-width, one slide at a time (CamelX hero style).
 */

/* Beat theme globals: :is(.btn,.button,button,[type=submit],[type=button]) { padding: … } */
.camelx-home-stories--hero :is(.btn, .button, button, [type='submit'], [type='button']) {
	padding: 0 !important;
	min-height: 0;
	min-width: 0;
	line-height: 1;
}

.camelx-home-stories--hero {
	--camelx-home-ink: #1e2d2d;
	--camelx-home-muted: #5c6565;
	--camelx-home-teal: #1a4d4d;
	--camelx-home-teal-dark: #123838;
	--camelx-home-gold: #c5a059;
	--camelx-home-hero-height: 85vh;
	position: relative;
	left: 50%;
	right: 50%;
	width: 100vw;
	max-width: 100vw;
	margin-left: -50vw;
	margin-right: -50vw;
	padding: 0;
	box-sizing: border-box;
}

.camelx-home-stories__header {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.75rem 1.5rem;
	max-width: 1200px;
	margin: 0 auto;
	padding: clamp(1rem, 3vw, 1.5rem) clamp(1rem, 3vw, 1.5rem) 0.75rem;
}

.camelx-home-stories__title {
	margin: 0;
	font-family: Georgia, "Times New Roman", "Noto Naskh Arabic", serif;
	font-size: clamp(1.5rem, 3vw, 2rem);
	font-weight: 700;
	color: var(--camelx-home-ink);
}

.camelx-home-stories__view-all {
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--camelx-home-teal);
	text-decoration: none;
}

.camelx-home-stories__view-all:hover,
.camelx-home-stories__view-all:focus-visible {
	color: var(--camelx-home-gold);
}

/* Hero shell */
.camelx-home-stories__hero {
	position: relative;
	width: 100%;
	height: var(--camelx-home-hero-height);
	min-height: clamp(420px, 70vh, 520px);
	max-height: 100vh;
	overflow: hidden;
	background: #2a3a3a;
}

.camelx-home-stories__slides {
	position: relative;
	width: 100%;
	height: 100%;
}

.camelx-home-stories__slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.55s ease, visibility 0.55s ease;
	pointer-events: none;
}

.camelx-home-stories__slide.is-active {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	z-index: 1;
}

.camelx-home-stories__slide[hidden] {
	display: block;
}

.camelx-home-stories__slide-bg {
	position: absolute;
	inset: 0;
	background-color: #2a3a3a;
	background-size: cover;
	background-position: center;
	transform-origin: center center;
}

.camelx-home-stories__slide-bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		90deg,
		rgba(18, 56, 56, 0.35) 0%,
		rgba(18, 56, 56, 0.08) 45%,
		transparent 70%
	);
	pointer-events: none;
}

[dir="rtl"] .camelx-home-stories__slide-bg::after {
	background: linear-gradient(
		270deg,
		rgba(18, 56, 56, 0.35) 0%,
		rgba(18, 56, 56, 0.08) 45%,
		transparent 70%
	);
}

.camelx-home-stories__slide-placeholder {
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, #dfe8e8, #a8b8b8);
}

.camelx-home-stories__slide-inner {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: center;
	height: 100%;
	padding: clamp(1.25rem, 4vw, 3rem) clamp(1rem, 6vw, 5rem);
	box-sizing: border-box;
}

.camelx-home-stories__slide-panel {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	max-width: min(540px, 46vw);
	padding: clamp(1.25rem, 3vw, 2rem) clamp(1.25rem, 3vw, 2rem) clamp(1.25rem, 3vw, 2rem)
		calc(clamp(1.25rem, 3vw, 2rem) + 6px);
	background: rgba(255, 255, 255, 0.94);
	border-inline-start: 6px solid var(--camelx-home-teal);
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
	text-decoration: none;
	color: var(--camelx-home-ink);
	opacity: 0;
	transform: translate3d(0, 32px, 0);
	transition: box-shadow 0.2s ease;
}

.camelx-home-stories__slide-panel.is-animated {
	animation: camelx-home-panel-in 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.camelx-home-stories__slide-panel.is-animated .camelx-home-stories__slide-tag {
	animation: camelx-home-panel-item 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.12s both;
}

.camelx-home-stories__slide-panel.is-animated .camelx-home-stories__slide-title {
	animation: camelx-home-panel-item 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.camelx-home-stories__slide-panel.is-animated .camelx-home-stories__slide-subtitle {
	animation: camelx-home-panel-item 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.28s both;
}

.camelx-home-stories__slide-panel.is-animated .camelx-home-stories__slide-excerpt {
	animation: camelx-home-panel-item 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.36s both;
}

.camelx-home-stories__slide-panel.is-animated .camelx-home-stories__slide-cta {
	animation: camelx-home-panel-item 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.44s both;
}

@keyframes camelx-home-panel-in {
	from {
		opacity: 0;
		transform: translate3d(0, 32px, 0);
	}
	to {
		opacity: 1;
		transform: translate3d(0, 0, 0);
	}
}

@keyframes camelx-home-panel-item {
	from {
		opacity: 0;
		transform: translate3d(0, 14px, 0);
	}
	to {
		opacity: 1;
		transform: translate3d(0, 0, 0);
	}
}

[dir="rtl"] .camelx-home-stories__slide-panel {
	transform: translate3d(0, 32px, 0);
}

.camelx-home-stories__slide.is-active .camelx-home-stories__slide-bg {
	animation: camelx-home-bg-in 1.1s ease-out both;
}

@keyframes camelx-home-bg-in {
	from {
		transform: scale(1.06);
	}
	to {
		transform: scale(1);
	}
}

.camelx-home-stories__slide-panel:hover,
.camelx-home-stories__slide-panel:focus-visible {
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
	outline: none;
}

.camelx-home-stories__slide-panel.is-animated:hover,
.camelx-home-stories__slide-panel.is-animated:focus-visible {
	transform: translate3d(0, -2px, 0);
}

.camelx-home-stories__slide-tag {
	margin: 0 0 0.5rem;
	padding: 0.2rem 0.55rem;
	font-size: 0.68rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	background: rgba(26, 77, 77, 0.12);
	color: var(--camelx-home-teal);
	font-weight: 700;
	border-radius: 2px;
}

.camelx-home-stories__slide-title {
	margin: 0 0 0.65rem;
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: clamp(1.25rem, 2.8vw, 2rem);
	font-weight: 700;
	line-height: 1.2;
	color: var(--camelx-home-teal);
}

.camelx-home-stories__slide-subtitle {
	margin: 0 0 0.5rem;
	font-size: clamp(0.95rem, 1.8vw, 1.1rem);
	line-height: 1.4;
	color: var(--camelx-home-muted);
	font-weight: 600;
}

.camelx-home-stories__slide-excerpt {
	margin: 0 0 1.15rem;
	font-size: clamp(0.875rem, 1.5vw, 1rem);
	line-height: 1.55;
	color: var(--camelx-home-ink);
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.camelx-home-stories__slide-cta {
	display: inline-block;
	padding: 0.65rem 1.35rem;
	background: var(--camelx-home-teal);
	color: #fff;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	border-radius: 2px;
	transition: background 0.2s ease, color 0.2s ease;
}

.camelx-home-stories__slide-panel:hover .camelx-home-stories__slide-cta,
.camelx-home-stories__slide-panel:focus-visible .camelx-home-stories__slide-cta {
	background: var(--camelx-home-gold);
	color: var(--camelx-home-ink);
}

.camelx-home-stories__slide-inner .camelx-story-photo-by {
	position: absolute;
	z-index: 3;
	inset-inline-end: clamp(1rem, 4vw, 2rem);
	bottom: clamp(4.5rem, 11vh, 5.75rem);
	margin: 0;
	color: rgba(255, 255, 255, 0.92);
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

/* Edge arrows (homepage hero style) */
.camelx-home-stories__arrow {
	position: absolute;
	top: 50%;
	z-index: 10;
	transform: translateY(-50%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 !important;
	border: none;
	background: none;
	box-shadow: none;
	color: #fff;
	opacity: 0.5;
	font-size: clamp(1.75rem, 4vw, 2.5rem);
	line-height: 1;
	cursor: pointer;
	transition: opacity 0.2s ease, color 0.2s ease;
}

.camelx-home-stories__arrow:hover,
.camelx-home-stories__arrow:focus-visible {
	opacity: 0.95;
	color: var(--camelx-home-gold);
	outline: none;
}

.camelx-home-stories__arrow--prev {
	inset-inline-start: clamp(0.35rem, 2vw, 1.25rem);
}

.camelx-home-stories__arrow--next {
	inset-inline-end: clamp(0.35rem, 2vw, 1.25rem);
}

/* Glass thumbnail strip */
.camelx-home-stories__thumbs {
	position: absolute;
	z-index: 12;
	bottom: clamp(0.75rem, 2.2vh, 1.35rem);
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	align-items: center;
	gap: 0.4rem;
	max-width: min(92vw, 520px);
	padding: 0.4rem 0.5rem;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.14);
	-webkit-backdrop-filter: blur(14px) saturate(1.2);
	backdrop-filter: blur(14px) saturate(1.2);
	border: 1px solid rgba(255, 255, 255, 0.28);
	box-shadow: 0 10px 36px rgba(0, 0, 0, 0.22);
	overflow-x: auto;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.camelx-home-stories__thumbs::-webkit-scrollbar {
	display: none;
}

.camelx-home-stories__thumb {
	flex: 0 0 auto;
	width: 52px;
	height: 36px;
	padding: 0 !important;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-radius: 5px;
	overflow: hidden;
	background: rgba(0, 0, 0, 0.25);
	cursor: pointer;
	opacity: 0.72;
	transition: opacity 0.25s ease, transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.camelx-home-stories__thumb:hover,
.camelx-home-stories__thumb:focus-visible {
	opacity: 1;
	border-color: rgba(255, 255, 255, 0.75);
	outline: none;
}

.camelx-home-stories__thumb.is-active {
	opacity: 1;
	border-color: var(--camelx-home-gold);
	box-shadow: 0 0 0 1px rgba(197, 160, 89, 0.45), 0 4px 12px rgba(0, 0, 0, 0.25);
	transform: scale(1.06);
}

.camelx-home-stories__thumb-img,
.camelx-home-stories__thumb-fallback {
	display: block;
	width: 100%;
	height: 100%;
	background-size: cover;
	background-position: center;
}

.camelx-home-stories__thumb-fallback {
	background: linear-gradient(135deg, rgba(255, 255, 255, 0.35), rgba(26, 77, 77, 0.5));
}

.camelx-home-stories__hero-view-all {
	position: absolute;
	z-index: 10;
	top: clamp(0.85rem, 2vh, 1.25rem);
	inset-inline-end: clamp(1rem, 4vw, 2rem);
	padding: 0.4rem 0.75rem;
	font-size: 0.85rem;
	font-weight: 600;
	color: #fff;
	text-decoration: none;
	background: rgba(18, 56, 56, 0.55);
	border-radius: 2px;
	backdrop-filter: blur(4px);
	transition: background 0.2s ease, color 0.2s ease;
}

.camelx-home-stories__hero-view-all:hover,
.camelx-home-stories__hero-view-all:focus-visible {
	background: rgba(197, 160, 89, 0.9);
	color: var(--camelx-home-ink);
	outline: none;
}

[dir="rtl"] .camelx-home-stories__view-all span[aria-hidden="true"] {
	display: inline-block;
	transform: scaleX(-1);
}

@media (max-width: 767px) {
	.camelx-home-stories--hero {
		--camelx-home-hero-height: 60vh !important;
	}

	.camelx-home-stories__hero {
		height: 60vh;
		min-height: 0;
		max-height: 60vh;
	}

	.camelx-home-stories__slide-panel {
		max-width: min(100%, 92vw);
	}

	.camelx-home-stories__slide-excerpt {
		-webkit-line-clamp: 3;
	}

	.camelx-home-stories__slide-inner {
		align-items: flex-end;
		padding: clamp(0.85rem, 3vw, 1.25rem) clamp(0.85rem, 4vw, 1.25rem) clamp(3.5rem, 11vh, 8rem);
	}

	.camelx-home-stories__slide-inner .camelx-story-photo-by {
		bottom: clamp(3.25rem, 9vh, 4rem);
	}

	.camelx-home-stories__thumb {
		width: 44px;
		height: 30px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.camelx-home-stories__slide {
		transition: none;
	}

	.camelx-home-stories__slide-panel,
	.camelx-home-stories__slide-panel.is-animated,
	.camelx-home-stories__slide-panel.is-animated .camelx-home-stories__slide-tag,
	.camelx-home-stories__slide-panel.is-animated .camelx-home-stories__slide-title,
	.camelx-home-stories__slide-panel.is-animated .camelx-home-stories__slide-subtitle,
	.camelx-home-stories__slide-panel.is-animated .camelx-home-stories__slide-excerpt,
	.camelx-home-stories__slide-panel.is-animated .camelx-home-stories__slide-cta,
	.camelx-home-stories__slide.is-active .camelx-home-stories__slide-bg {
		animation: none;
		opacity: 1;
		transform: none;
	}
}
