/**
 * AP Hero — scoped styles.
 * Reproduces the Ali Publications (Lovable) editorial hero.
 * All colors/fonts fall back here but are overridden by Elementor controls,
 * which set CSS custom properties inline on .ap-hero.
 * Breakpoints 640 / 768 / 1024 match the source design (Tailwind sm/md/lg).
 *
 * Text/link rules are defensive (compound selector + !important) so host
 * themes cannot override the widget's colors, spacing or underlines.
 */

.ap-hero {
	--ap-ink: #111111;
	--ap-paper: #ffffff;
	--ap-paper-warm: #fafaf7;
	--ap-red: #de1c1c;
	--ap-muted: #6b6b6b;
	--ap-border: #e7e7e4;
	--ap-font-display: "Fraunces";
	--ap-font-body: "Inter";

	background-color: var(--ap-paper);
	border-bottom: 1px solid var(--ap-border);
	position: relative;
	overflow: hidden;
	box-sizing: border-box;
}

/* ---------------- Urdu watermark behind the hero ---------------- */
.ap-hero__watermark {
	position: absolute;
	top: 50%;
	right: -0.08em;
	transform: translateY(-50%);
	margin: 0;
	font-family: var(--ap-font-display), Georgia, serif;
	font-weight: 600;
	line-height: 0.8;
	font-size: clamp(10rem, 30vw, 30rem);
	letter-spacing: -0.02em;
	color: var(--ap-ink);
	opacity: 0.04;
	pointer-events: none;
	user-select: none;
	white-space: nowrap;
	z-index: 0;
}

.ap-hero *,
.ap-hero *::before,
.ap-hero *::after {
	box-sizing: border-box;
}

.ap-hero__inner {
	width: 100%;
	max-width: 80rem;
	margin-inline: auto;
	padding: 4rem 1.25rem;
	display: grid;
	grid-template-columns: 1fr;
	gap: 3rem;
	align-items: center;
	position: relative;
	z-index: 1;
}

/* ---------------- Left column ---------------- */
.ap-hero .ap-hero__eyebrow {
	margin: 0 !important;
	padding: 0 !important;
	font-family: var(--ap-font-body), ui-sans-serif, system-ui, sans-serif !important;
	font-size: 0.6875rem !important;
	letter-spacing: 0.18em !important;
	text-transform: uppercase !important;
	font-weight: 500 !important;
	color: var(--ap-muted) !important;
	line-height: 1.4 !important;
}

.ap-hero .ap-hero__heading {
	margin: 1.5rem 0 0 !important;
	padding: 0 !important;
	font-family: var(--ap-font-display), Georgia, serif !important;
	font-weight: 400 !important;
	letter-spacing: -0.015em !important;
	line-height: 1.02 !important;
	font-size: 3rem !important;
	color: var(--ap-ink) !important;
}

.ap-hero .ap-hero__em {
	font-style: italic !important;
	font-weight: 300 !important;
}

.ap-hero .ap-hero__subline {
	margin: 1.5rem 0 0 !important;
	padding: 0 !important;
	max-width: 32rem;
	font-family: var(--ap-font-body), ui-sans-serif, system-ui, sans-serif !important;
	font-weight: 400 !important;
	font-size: 1.125rem !important;
	line-height: 1.625 !important;
	color: var(--ap-muted) !important;
}

.ap-hero__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1.5rem;
	margin-top: 2.5rem;
}

.ap-hero .ap-hero__btn {
	font-family: var(--ap-font-body), ui-sans-serif, system-ui, sans-serif !important;
	font-size: 0.875rem !important;
	font-weight: 500 !important;
	line-height: 1 !important;
	text-decoration: none !important;
	cursor: pointer;
}

.ap-hero .ap-hero__btn--primary {
	display: inline-flex;
	align-items: center;
	height: 3rem;
	padding: 0 1.75rem;
	background-color: var(--ap-red);
	color: var(--ap-paper) !important;
	transition: background-color 0.3s ease;
}

.ap-hero .ap-hero__btn--primary:hover {
	background-color: var(--ap-ink);
	color: var(--ap-paper) !important;
}

.ap-hero .ap-hero__btn--text {
	position: relative;
	color: var(--ap-ink) !important;
}

.ap-hero .ap-hero__btn--text::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -2px;
	height: 1px;
	width: 100%;
	background: currentColor;
	transform: scaleX(0);
	transform-origin: right;
	transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.ap-hero .ap-hero__btn--text:hover::after {
	transform: scaleX(1);
	transform-origin: left;
}

.ap-hero__also {
	margin-top: 3.5rem;
	border-top: 1px solid var(--ap-border);
	padding-top: 1.5rem;
}

.ap-hero__also-label {
	margin-bottom: 1rem !important;
}

.ap-hero .ap-hero__also-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	column-gap: 2rem;
	row-gap: 0.5rem;
}

.ap-hero .ap-hero__also-list a {
	font-family: var(--ap-font-display), Georgia, serif !important;
	font-style: italic !important;
	font-size: 1rem !important;
	color: var(--ap-ink) !important;
	text-decoration: none !important;
	transition: color 0.25s ease;
}

.ap-hero .ap-hero__also-list a:hover {
	color: var(--ap-red) !important;
}

/* ---------------- Right column (featured) ---------------- */
.ap-hero__feature {
	position: relative;
	width: 100%;
	max-width: 24rem;
	margin-inline: auto;
}

.ap-hero__feature-bg {
	position: absolute;
	left: -3rem;
	right: -3rem;
	top: -2rem;
	bottom: -2rem;
	z-index: 0;
	background: var(--ap-paper-warm);
}

.ap-hero__cover-link {
	position: relative;
	z-index: 1;
	display: block;
	box-shadow:
		0 18px 40px -18px rgba(17, 17, 17, 0.45),
		0 2px 6px -2px rgba(17, 17, 17, 0.2);
	transition:
		transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
		box-shadow 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.ap-hero__cover-link:hover {
	transform: translateY(-6px);
	box-shadow:
		0 28px 56px -20px rgba(17, 17, 17, 0.55),
		0 4px 10px -4px rgba(17, 17, 17, 0.25);
}

/* Real cover image: drop the shadow, hover lift and warm backdrop panel. */
.ap-hero__cover-link:has(.ap-cover--image) { box-shadow: none; }
.ap-hero__cover-link:has(.ap-cover--image):hover { box-shadow: none; transform: none; }
.ap-hero__feature:has(.ap-cover--image) .ap-hero__feature-bg { display: none; }

/* Typographic placeholder cover */
.ap-cover {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	aspect-ratio: 2 / 3;
	width: 100%;
	overflow: hidden;
	padding: 2rem;
}

.ap-cover--ink { background: var(--ap-ink); color: var(--ap-paper); }
.ap-cover--red { background: var(--ap-red); color: var(--ap-paper); }
.ap-cover--warm { background: var(--ap-paper-warm); color: var(--ap-ink); border: 1px solid var(--ap-border); }
.ap-cover--paper { background: var(--ap-paper); color: var(--ap-ink); border: 1px solid var(--ap-border); }

.ap-cover--image { padding: 0; }
.ap-cover--image img { width: 100%; height: 100%; object-fit: cover; display: block; }

.ap-cover__spine {
	pointer-events: none;
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: 6px;
	background: linear-gradient(to right, rgba(17, 17, 17, 0.25), transparent);
}

.ap-cover__top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
}

.ap-cover .ap-cover__label {
	font-family: var(--ap-font-body), ui-sans-serif, system-ui, sans-serif !important;
	font-size: 10px !important;
	letter-spacing: 0.2em !important;
	text-transform: uppercase !important;
	opacity: 0.7;
}

.ap-cover__rule { height: 1px; width: 1.5rem; background: var(--ap-red); }
.ap-cover--red .ap-cover__rule { background: var(--ap-paper); }

.ap-cover .ap-cover__title {
	margin: 0 !important;
	padding: 0 !important;
	font-family: var(--ap-font-display), Georgia, serif !important;
	font-weight: 400 !important;
	line-height: 1.05 !important;
	letter-spacing: -0.015em !important;
	font-size: 1.875rem !important;
	color: inherit !important;
}

.ap-cover .ap-cover__subtitle {
	margin: 0.5rem 0 0 !important;
	padding: 0 !important;
	font-family: var(--ap-font-display), Georgia, serif !important;
	font-style: italic !important;
	font-size: 11px !important;
	line-height: 1.35 !important;
	opacity: 0.75;
}

.ap-cover__bottom {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
}

.ap-cover .ap-cover__author {
	font-family: var(--ap-font-body), ui-sans-serif, system-ui, sans-serif !important;
	font-size: 10px !important;
	font-weight: 500 !important;
	letter-spacing: 0.02em !important;
}

.ap-cover__dot { height: 0.375rem; width: 0.375rem; border-radius: 9999px; background: var(--ap-red); }
.ap-cover--red .ap-cover__dot { background: var(--ap-paper); }

/* Featured caption */
.ap-hero__meta {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin-top: 1.5rem;
}

.ap-hero .ap-hero__meta-title {
	margin: 0.25rem 0 0 !important;
	padding: 0 !important;
	font-family: var(--ap-font-display), Georgia, serif !important;
	font-weight: 400 !important;
	font-size: 1.125rem !important;
	color: var(--ap-ink) !important;
}

.ap-hero .ap-hero__meta-author {
	margin: 0 !important;
	padding: 0 !important;
	font-family: var(--ap-font-body), ui-sans-serif, system-ui, sans-serif !important;
	font-size: 0.875rem !important;
	color: var(--ap-muted) !important;
}

.ap-hero .ap-hero__meta-price {
	margin: 0 !important;
	padding: 0 !important;
	font-family: var(--ap-font-body), ui-sans-serif, system-ui, sans-serif !important;
	font-weight: 500 !important;
	font-size: 1rem !important;
	color: var(--ap-red) !important;
}

/* ---------------- Offer / campaign strip ---------------- */
.ap-hero__offer {
	position: relative;
	z-index: 1;
	margin-top: 1.25rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--ap-border);
}

.ap-hero .ap-hero__offer-badge {
	display: inline-block;
	background: var(--ap-red);
	color: var(--ap-paper) !important;
	font-family: var(--ap-font-body), ui-sans-serif, system-ui, sans-serif !important;
	font-size: 0.6875rem !important;
	font-weight: 600 !important;
	letter-spacing: 0.16em !important;
	text-transform: uppercase !important;
	padding: 0.3rem 0.6rem;
}

.ap-hero .ap-hero__offer-points {
	list-style: none;
	margin: 0.85rem 0 0 !important;
	padding: 0 !important;
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 1rem;
}

.ap-hero .ap-hero__offer-points li {
	position: relative;
	padding-left: 1rem;
	font-family: var(--ap-font-body), ui-sans-serif, system-ui, sans-serif !important;
	font-size: 0.875rem !important;
	color: var(--ap-ink) !important;
}

.ap-hero .ap-hero__offer-points li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.55em;
	width: 0.375rem;
	height: 0.375rem;
	border-radius: 9999px;
	background: var(--ap-red);
}

/* Above-the-heading variant: compact inline row, no divider */
.ap-hero__offer--top {
	margin: 0 0 1.75rem !important;
	padding-top: 0 !important;
	border-top: 0 !important;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
}

.ap-hero__offer--top .ap-hero__offer-points { margin: 0 !important; }

/* ---------------- Entrance animation ---------------- */
@keyframes ap-fade-up {
	from { opacity: 0; transform: translateY(14px); }
	to { opacity: 1; transform: translateY(0); }
}

.ap-fade-up { animation: ap-fade-up 0.8s cubic-bezier(0.22, 1, 0.36, 1) both; }
.ap-fade-up--delay { animation-delay: 150ms; }

@media (prefers-reduced-motion: reduce) {
	.ap-fade-up { animation: none; }
}

/* ---------------- Responsive ---------------- */
@media (min-width: 640px) {
	.ap-hero__inner { padding-left: 2rem; padding-right: 2rem; }
	.ap-cover { padding: 2.5rem; }
}

@media (min-width: 768px) {
	.ap-hero__inner { padding-top: 6rem; padding-bottom: 6rem; }
	.ap-hero .ap-hero__heading { font-size: 3.75rem !important; }
	.ap-cover .ap-cover__title { font-size: 2.25rem !important; }
	.ap-cover .ap-cover__subtitle { font-size: 0.75rem !important; }
}

@media (min-width: 1024px) {
	.ap-hero__inner {
		grid-template-columns: 1.1fr 0.9fr;
		gap: 4rem;
		padding: 7rem 3rem;
	}
	.ap-hero .ap-hero__heading { font-size: 4.5rem !important; }
	.ap-cover .ap-cover__title { font-size: 2.75rem !important; }
}

/* ----------------------------------------------------------------
   Mobile and tablet (< 1024px): single column, but lift the featured
   book cover up to sit directly under the headline so the product is
   visible without scrolling past the full block of text. display:contents
   on the lead promotes its children into the same flex flow as the cover
   so they can be ordered: eyebrow, heading, subline, COVER, button, also.
   ---------------------------------------------------------------- */
@media (max-width: 1023.98px) {
	.ap-hero__inner {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}
	.ap-hero__lead { display: contents; }

	.ap-hero__offer--top { order: 1; }
	.ap-hero .ap-hero__eyebrow { order: 2; }
	.ap-hero .ap-hero__heading { order: 3; }
	.ap-hero .ap-hero__subline { order: 4; }
	.ap-hero__feature {
		order: 5;
		align-self: center;
		max-width: 18rem;
		margin-top: 2.5rem;
	}
	.ap-hero__actions { order: 6; }
	.ap-hero__also { order: 7; }
}
