/*
 * Homepage-only rules (spec §5.1).
 *
 * Everything the homepage shares with the rest of the site — tokens, base type,
 * header, `.bi-row`, `.section-heading`, `.btn`, the ad slots, the sponsor rows
 * and the footer — already lives in `public.css` and is not repeated here. What
 * remains is the hero and the six-button quick grid, both of which appear on this
 * page and nowhere else.
 *
 * Metrics are taken value-for-value from the approved prototype
 * (`/home/claude/work/proto/index.html`), including both of its quick-grid
 * breakpoints. The only substitutions are raw hex for the semantic tokens, so an
 * admin palette change flows through, and physical properties for logical ones,
 * so the whole page mirrors in Arabic without a second stylesheet.
 */

/* ==========================================================================
   1. Hero slider
   ==========================================================================
   The markup is emitted by Modules\Sliders\SliderRenderer and the motion by
   public.js, so these rules bind to the class names *that renderer* produces
   (`.hero-slider`, `.slides-track`, `.slide-inner`, `.slider-arrow`, `.dot`)
   and dress them as the prototype's `.hero` / `.slides` / `.slide-content`.
   The state class is `.is-active`, which is what public.js toggles — the
   prototype's bare `.active` would never match.
   ========================================================================== */

/*
 * The height cap is a direct client requirement (spec §5.1): it exists so all
 * six quick buttons are on screen on a phone without scrolling. Do not enlarge
 * it, and do not add vertical padding to the section either — the constraint is
 * the total height, not the image.
 */
.hero-slider {
	position: relative;
	width: 100%;
	height: 32vh;
	min-height: 230px;
	max-height: 320px;
	overflow: hidden;
	background: var(--magenta-deep);
}

.slides-track {
	position: relative;
	width: 100%;
	height: 100%;
}

/*
 * Slides are stacked and cross-faded rather than translated, so a slide that is
 * mid-transition cannot leave a horizontal scrollbar behind on a narrow screen.
 * The renderer emits the logo lockup and the text block as siblings, so the
 * slide itself is the content column: a flex column, vertically centred, inset
 * from the start edge exactly as the prototype's `.slide-content` was.
 */
.slide {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	gap: 0;
	padding-inline: 8vw;
	opacity: 0;
	transition: opacity 0.7s ease;
}

.slide.is-active {
	opacity: 1;
}

/*
 * The overlay that keeps white text legible over any photograph an
 * administrator uploads. public-rtl.css re-angles this gradient for Arabic, so
 * the dark end always sits under the text rather than under the empty side.
 */
.slide::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(
		100deg,
		rgba(58, 15, 38, 0.94) 8%,
		rgba(126, 23, 71, 0.65) 52%,
		rgba(126, 23, 71, 0.2) 100%
	);
}

.slide-media {
	position: absolute;
	inset: 0;
}

.slide-media picture,
.slide-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Both in-flow children sit above the overlay; without the positioning context
   they would render underneath it and the headline would disappear. */
.slide-logo,
.slide-inner {
	position: relative;
	z-index: 2;
}

.slide-logo {
	margin-bottom: 12px;
}

.slide-logo img {
	width: 46px;
	height: auto;
	filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.35));
}

.slide-inner {
	max-width: 640px;
	color: var(--white);
}

.slide-inner .eyebrow {
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--magenta-100);
}

.slide-inner h2 {
	margin: 8px 0 5px;
	font-size: clamp(18px, 2.6vw, 28px);
	font-weight: 800;
	line-height: 1.14;
	color: var(--white);
}

.slide-sub {
	margin: 0 0 6px;
	font-size: 12.5px;
	line-height: 1.5;
	color: var(--magenta-100);
}

/*
 * The white pill CTA. It restates `.btn`/`.btn-solid` rather than reusing them
 * because the shared renderer owns this element's class list and emits
 * `.slide-cta` alone — the alternative would be editing a component every other
 * page also renders. The tight top margin is deliberate: the button was moved up
 * against the subtitle at the client's request.
 */
.slide-cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 4px;
	padding: 9px 20px;
	border: 1px solid transparent;
	border-radius: 999px;
	background: var(--white);
	color: var(--magenta-deep);
	font-size: 12.5px;
	font-weight: 700;
	transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.slide-cta:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.slider-arrow {
	position: absolute;
	z-index: 3;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border: 1px solid rgba(255, 255, 255, 0.4);
	border-radius: 50%;
	background: rgba(58, 15, 38, 0.35);
	color: var(--white);
	font-size: 16px;
	cursor: pointer;
	backdrop-filter: blur(4px);
}

.slider-arrow:hover {
	background: rgba(255, 255, 255, 0.15);
}

.arrow-prev {
	inset-inline-start: 22px;
}

.arrow-next {
	inset-inline-end: 22px;
}

/*
 * The renderer's arrows carry no `.arrow-glyph`, so public-rtl.css does not
 * reach them: without this the chevrons keep pointing at the slide they came
 * from on the Arabic site, while public.js has already swapped what they do.
 */
[dir='rtl'] .slider-arrow {
	transform: translateY(-50%) scaleX(-1);
}

.slider-dots {
	position: absolute;
	z-index: 3;
	bottom: 16px;
	inset-inline: 0;
	display: flex;
	justify-content: center;
	gap: 9px;
}

.slider-dots .dot {
	width: 8px;
	height: 8px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.35);
	cursor: pointer;
	transition: width var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.slider-dots .dot.is-active {
	width: 24px;
	border-radius: 5px;
	background: var(--white);
}

@media (max-width: 639px) {
	.slide {
		padding-inline: 6vw;
	}

	/* At 42px the arrows cover the headline on a phone; the dots and the swipe
	   gesture both still work, and public.js binds the swipe unconditionally. */
	.slider-arrow {
		display: none;
	}
}

/* ==========================================================================
   2. "What would you like to do today?" + the six-button grid
   ========================================================================== */

.quick-section {
	padding: 36px 6vw 44px;
	text-align: center;
}

/* The heading row is capped narrower than the section so the English and the
   Arabic end up at the two ends of the *grid*, not the two ends of the screen. */
.quick-heading {
	max-width: 980px;
	margin-inline: auto;
}

/*
 * Three columns at every breakpoint. Spec §5.1: an initial 2×3 mobile layout
 * pushed the last two buttons below the fold and was corrected to this — never
 * let the shared `.pcfa-grid` mobile rule (which drops to two) near this grid.
 */
.quick-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
	max-width: 640px;
	margin-inline: auto;
}

@media (max-width: 800px) {
	.quick-grid {
		gap: 8px;
		max-width: 460px;
	}
}

@media (max-width: 480px) {
	.quick-grid {
		gap: 7px;
		max-width: 380px;
	}
}

/*
 * The 4px border is the one place on the site that overrides the standard 1.5px
 * card weight (spec §2.8). It was thickened twice at the client's request —
 * treat it as final and do not reduce it to match the other cards.
 */
.quick-card {
	display: block;
	padding: 12px 6px;
	border: 4px solid var(--magenta-100);
	border-radius: 12px;
	background: var(--white);
	text-align: center;
	cursor: pointer;
	transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
		border-color var(--dur) var(--ease);
}

.quick-card:hover {
	transform: translateY(-3px);
	border-color: var(--magenta);
	box-shadow: var(--shadow);
}

.quick-card .icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	margin: 0 auto 8px;
	border-radius: 9px;
	background: var(--magenta-50);
	color: var(--magenta-deep);
}

.quick-card .icon svg {
	width: 16px;
	height: 16px;
}

/*
 * The two label lines are centred and stacked rather than sitting at opposite
 * ends of a row: at three columns a card is roughly 110px wide on a phone, and
 * a §2.5 row there would put one word on each side with the middle of both
 * labels missing. What §2.5 is actually protecting — identical size and weight
 * for the two languages — is honoured exactly.
 */
.quick-card h3 {
	margin: 0 0 3px;
	font-size: 11.5px;
	font-weight: 800;
	line-height: 1.25;
	color: var(--ink);
}

.quick-card .ar {
	display: block;
	font-size: 11.5px;
	font-weight: 800;
	/* Arabic leading: 1.35 is a Latin figure and clips the diacritics above the
	   word. Size and weight are unchanged from the English half above. */
	line-height: 1.65;
	color: var(--magenta);
}

.quick-card.featured {
	background: var(--magenta-deep);
	border-color: var(--magenta-deep);
}

.quick-card.featured .icon {
	background: rgba(255, 255, 255, 0.16);
	color: var(--white);
}

.quick-card.featured h3 {
	color: var(--white);
}

.quick-card.featured .ar {
	color: var(--magenta-100);
}
