/**
 * Bananchal Farms — Accommodation page.
 *
 * Loaded only on the page with the slug "accommodation". Tokens come from
 * assets/css/style.css, which is always enqueued first.
 *
 * rgba() values repeat the RGB of --bf-green-darker (#12301b) and --bf-amber
 * (#f5b715); custom properties cannot be used inside rgba() without separate
 * channel tokens, which is how the sibling stylesheets handle it too.
 *
 * 1. Hero
 * 2. Media
 * 3. Prose
 * 4. Feature lists
 * 5. Panel
 * 6. Closing CTA
 * 7. Responsive
 * 8. Reduced motion
 */

/* ==========================================================================
   1. Hero
   ========================================================================== */

.bf-acc-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-acc-hero {
		min-height: 380px;
		padding: 2.5rem 0 3rem;
	}
}

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

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

.bf-acc-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);
}

/* ==========================================================================
   2. Media — same frame and offset gold rule as the About and Activities blocks
   ========================================================================== */

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

.bf-acc__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-acc__media img {
	display: block;
	width: 100%;
	height: auto;
	object-fit: cover;
	transition: transform 0.9s var(--bf-ease);
}

/*
 * No forced aspect-ratio on the frame: each uploaded photograph is shown in
 * its own proportions instead of being clipped to a uniform 4/3 or 4/5 box.
 * Combined with width:100% + height:auto the figure sizes to the image, so
 * object-fit: cover becomes a no-op (the box already matches the image) and
 * nothing is cropped. The client uploads whatever orientation they shot in.
 */
.bf-acc__media--main img {
	aspect-ratio: auto;
}

.bf-acc__media--tall img {
	aspect-ratio: auto;
}

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

/* ==========================================================================
   3. Prose
   ========================================================================== */

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

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

.bf-acc__lead {
	margin-bottom: 1.75rem;
	color: var(--bf-muted);
	font-size: 1.05rem;
	line-height: 1.85;
}

/* ==========================================================================
   4. Feature lists
   ========================================================================== */

.bf-acc__features {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0.15rem 2rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.bf-acc__features li {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	padding: 0.7rem 0;
	border-top: 1px solid var(--bf-line);
	color: var(--bf-green-dark);
	font-family: var(--bf-font-display);
	font-size: 1.1rem;
	line-height: 1.35;
}

/*
 * Same amber checkmark that the per-category lists on the Facilities and
 * Amenities pages use. The rule is duplicated here rather than loading
 * facilities.css on this page, because the rest of that stylesheet is for
 * panels and categories that do not exist on Accommodation.
 */
.bf-fac-cat__check {
	flex: 0 0 auto;
	color: var(--bf-amber-dark);
	font-size: 1rem;
	line-height: 1;
}

/* ==========================================================================
   5. Panel — the closing section carries no photograph, so the frame does the work
   ========================================================================== */

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

.bf-acc__panel-title {
	margin-bottom: 1rem;
}

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

/* ==========================================================================
   6. Closing CTA
   ========================================================================== */

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

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

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

/* ==========================================================================
   7. Responsive
   ========================================================================== */

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

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

	.bf-acc__features:not(.bf-acc__features--two) > li:first-child {
		border-top: 0;
		padding-top: 0;
	}
}

@media (max-width: 767.98px) {
	.bf-acc__features > li:first-child {
		border-top: 0;
		padding-top: 0;
	}
}

@media (max-width: 991.98px) {
	.bf-acc__media--tall img {
		aspect-ratio: auto;
	}
}

/* ==========================================================================
   8. Reduced motion
   ========================================================================== */

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