/**
 * Activities — home page grid (and the Activities page once it exists).
 *
 * Loaded on the front page and on any page with the slug "activities" (see
 * bananchal_assets()). Depends on the tokens in assets/css/style.css, which is
 * always enqueued first.
 *
 * Nothing in these rows carries a link, so they deliberately drop any
 * lift-on-hover — a raised block reads as a target. The slow image zoom is kept
 * as ambient polish only.
 *
 * 1. Section head
 * 2. Alternating rows
 * 3. Action
 * 4. Responsive
 * 5. Reduced motion
 */

/* ==========================================================================
   1. Section head
   ========================================================================== */

.bf-activities__lead {
	margin-bottom: 0;
}

/* ==========================================================================
   2. Alternating rows — a photograph beside its text, sides swapping down the page
   ========================================================================== */

/*
 * The swap is done with Bootstrap's order-lg-* utilities in the template, so
 * below lg the columns simply stack and every entry reads picture-then-words.
 */
.bf-activities__row + .bf-activities__row {
	margin-top: clamp(2.5rem, 5vw, 4.5rem);
}

.bf-activities__media {
	position: relative;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: var(--bf-radius-lg);
	/* Holds the frame's shape while the lazy image is still on the wire. */
	background-color: var(--bf-sand);
	box-shadow: var(--bf-shadow);
}

.bf-activities__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.9s var(--bf-ease);
}

/*
 * Nothing here is clickable — the client asked for no per-activity link — so
 * this is not a hover affordance, only the same slow drift the site's other
 * photographs have.
 */
.bf-activities__media:hover img {
	transform: scale(1.05);
}

.bf-activities__body {
	max-width: 34rem;
}

.bf-activities__title {
	margin-bottom: 0.9rem;
	font-size: clamp(1.45rem, 2.4vw, 1.9rem);
	line-height: 1.2;
	color: var(--bf-green-dark);
}

/* Short gold rule instead of the numeral disc the linked cards carry. */
.bf-activities__title::after {
	content: '';
	display: block;
	width: 3rem;
	height: 2px;
	margin-top: 0.9rem;
	background-color: var(--bf-amber);
}

.bf-activities__text {
	margin: 0;
	font-size: 1.02rem;
	line-height: 1.8;
	color: var(--bf-ink);
}

@media (min-width: 992px) {

	.bf-activities__body {
		padding-left: 1.25rem;
	}

	/* Text on the left of a flipped row: the inset belongs on the other side. */
	.order-lg-1 .bf-activities__body {
		padding-right: 1.25rem;
		padding-left: 0;
		margin-left: auto;
	}
}

/* ==========================================================================
   3. Action — the single button under the whole grid
   ========================================================================== */

.bf-activities__actions {
	margin-top: 3rem;
	text-align: center;
}

/* ==========================================================================
   4. Responsive
   ========================================================================== */

@media (max-width: 575.98px) {
	.bf-activities__actions {
		margin-top: 2.25rem;
	}
}

/* ==========================================================================
   5. Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
	.bf-activities__media img,
	.bf-activities__media:hover img {
		transition: none;
		transform: none;
	}
}

/* ==========================================================================
   6. Activities PAGE — namespaced .bf-actpage* so nothing above is affected
   --------------------------------------------------------------------------
   The teaser rules (1-5) style the home grid. Everything below styles
   page-activities.php, which loads the same stylesheet. Separate root on
   purpose: the two surfaces must never share a selector.
   ========================================================================== */

/* ---------- Hero ---------- */

.bf-actpage-hero {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: 320px;
	padding: 2rem 0 2.5rem;
	background-color: var(--bf-green-darker);
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
	color: var(--bf-white);
}

@media (min-width: 768px) {
	.bf-actpage-hero {
		min-height: 380px;
		padding: 2.5rem 0 3rem;
	}
}

.bf-actpage-hero__inner {
	width: 100%;
}

.bf-actpage-hero__scrim { display: none; }

.bf-actpage-hero__title {
	margin: 0;
	color: var(--bf-white);
	font-size: clamp(2rem, 5vw, 3.25rem);
	font-weight: 500;
	line-height: 1.1;
	max-width: 720px;
	text-shadow: 0 2px 26px rgba(18, 48, 27, 0.42);
}

/* ---------- Alternating rows ---------- */

.bf-actpage__media {
	position: relative;
	margin: 0;
	overflow: hidden;
	border-radius: var(--bf-radius-lg);
	box-shadow: var(--bf-shadow-lg);
}

/* Offset gold rule, echoing the About block's media stack. */
.bf-actpage__media::after {
	content: '';
	position: absolute;
	inset: 14px;
	border: 1px solid rgba(245, 183, 21, 0.45);
	border-radius: var(--bf-radius);
	pointer-events: none;
}

.bf-actpage__media img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	transition: transform 0.9s var(--bf-ease);
}

.bf-actpage__media:hover img {
	transform: scale(1.06);
}

/* The disc repeats the Bandhavgarh visit-card chip, sized and coloured the same. */
.bf-actpage__num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin-bottom: 1.15rem;
	border-radius: 50%;
	background-color: var(--bf-amber);
	color: var(--bf-charcoal);
	font-size: 1.15rem;
	line-height: 1;
	box-shadow: var(--bf-shadow-sm);
}

.bf-actpage__title {
	margin-bottom: 1rem;
}

.bf-actpage__text p {
	margin-bottom: 1rem;
	color: var(--bf-ink);
	line-height: 1.85;
}

.bf-actpage__text p:last-child {
	margin-bottom: 0;
}

/* ---------- Per-activity detail list ---------- */

.bf-actpage__details {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	margin: 1.75rem 0 0;
}

.bf-actpage__detail {
	padding: 0.85rem 0;
	border-top: 1px solid var(--bf-line);
}

.bf-actpage__detail dt {
	margin-bottom: 0.15rem;
	color: var(--bf-muted);
	font-size: 0.76rem;
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.bf-actpage__detail dd {
	margin: 0;
	color: var(--bf-green-dark);
	font-family: var(--bf-font-display);
	font-size: 1.15rem;
	line-height: 1.3;
}

/* ---------- Planning panel ---------- */

.bf-actpage-plan__panel {
	padding: clamp(1.6rem, 4vw, 3rem);
	border: 1px solid var(--bf-line);
	border-radius: var(--bf-radius-lg);
	background-color: var(--bf-sand);
	box-shadow: var(--bf-shadow);
}

.bf-actpage-plan__title {
	margin-bottom: 1rem;
}

.bf-actpage-plan__text {
	margin: 0;
	color: var(--bf-ink);
	line-height: 1.85;
}

.bf-actpage-plan__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	margin: 0;
}

.bf-actpage-plan__row {
	display: flex;
	gap: 1rem;
	padding: 0.95rem 0;
	border-top: 1px solid rgba(28, 66, 39, 0.14);
}

.bf-actpage-plan__icon {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background-color: var(--bf-amber);
	color: var(--bf-charcoal);
	font-size: 1.05rem;
	line-height: 1;
}

.bf-actpage-plan__row dt {
	margin-bottom: 0.1rem;
	color: var(--bf-muted);
	font-size: 0.76rem;
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.bf-actpage-plan__row dd {
	margin: 0;
	color: var(--bf-green-dark);
	font-family: var(--bf-font-display);
	font-size: 1.15rem;
	line-height: 1.3;
}

/* ---------- Closing CTA ---------- */

.bf-actpage-cta__title {
	margin-bottom: 0.85rem;
}

.bf-actpage-cta__text {
	max-width: 46rem;
	margin: 0 auto 1.9rem;
	color: rgba(255, 255, 255, 0.82);
	line-height: 1.8;
}

.bf-actpage-cta__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.9rem;
	justify-content: center;
}

/* ---------- Responsive ---------- */

@media (min-width: 768px) {
	.bf-actpage__details {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: 2rem;
	}

	.bf-actpage-plan__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: 2.25rem;
	}

	/*
	 * Anchored to the FIRST row of each column, never the last: with an odd number
	 * of items the final grid row holds one item, and an :nth-last-child rule would
	 * strip the rule from its row-mate too.
	 */
	.bf-actpage__detail:nth-child(-n + 2),
	.bf-actpage-plan__row:nth-child(-n + 2) {
		border-top: 0;
		padding-top: 0;
	}
}

@media (max-width: 767.98px) {
	.bf-actpage__detail:first-child,
	.bf-actpage-plan__row:first-child {
		border-top: 0;
		padding-top: 0;
	}
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
	.bf-actpage__media img,
	.bf-actpage__media:hover img {
		transition: none;
		transform: none;
	}
}
