/*
 * Styles specific to custom page templates (page-templates/about.php,
 * page-templates/contact.php, and any future ones) - only enqueued when a
 * custom page template is actually active (see ap_enqueue_assets() in
 * functions.php), so the homepage/shop/product pages don't load CSS they
 * never use. Shares the same CSS custom properties (--ap-accent etc.) from
 * style.css, which always loads first.
 */

/* =========================================================
   Simple page hero (About, Contact) - lighter than the homepage
   hero, just enough to give the page a title band with some colour.
   ========================================================= */
.ap-page-hero {
	position: relative;
	background: var( --ap-surface-alt );
	padding: 56px 0;
	text-align: center;
	margin-bottom: 48px;
	overflow: hidden;
}
.ap-page-hero h1 {
	margin-bottom: 0.3em;
}
.ap-page-hero p {
	color: var( --ap-ink-muted );
	font-size: 1.05rem;
	margin: 0;
}

/* Featured image as a full-bleed background, title/tagline overlaid on top. */
.ap-page-hero--has-image {
	min-height: 420px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 32px 0;
}
.ap-page-hero__bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	z-index: 0;
}
.ap-page-hero__overlay {
	position: absolute;
	inset: 0;
	background: rgba( 0, 0, 0, 0.45 );
	z-index: 1;
}
.ap-page-hero__inner {
	position: relative;
	z-index: 2;
}
.ap-page-hero--has-image h1,
.ap-page-hero--has-image p {
	color: #fff;
}
.ap-page-content {
	margin-bottom: 48px;
}
.ap-page-content h2 {
	margin-top: 1.4em;
}

/* =========================================================
   About page - intro (optional photo + copy) and stats band
   ========================================================= */
.ap-about-intro {
	display: grid;
	grid-template-columns: minmax( 240px, 380px ) 1fr;
	gap: 48px;
	align-items: center;
	margin-bottom: 56px;
}
.ap-about-intro--no-photo {
	grid-template-columns: 1fr;
	max-width: 780px;
}
.ap-about-intro__photo img {
	border-radius: var( --ap-radius );
	box-shadow: 0 12px 32px rgba( 0, 0, 0, 0.1 );
}
.ap-about-intro__content h2 {
	color: var( --ap-accent );
}

.ap-stats {
	background: var( --ap-surface-alt );
	padding: 56px 0;
	margin-bottom: 56px;
}
.ap-stats__grid {
	display: grid;
	grid-template-columns: repeat( auto-fit, minmax( 180px, 1fr ) );
	gap: 32px;
	text-align: center;
}
.ap-stat__number {
	display: block;
	font-family: var( --ap-font-head );
	font-size: clamp( 2rem, 4vw, 2.6rem );
	font-weight: 700;
	color: var( --ap-accent );
}
.ap-stat__label {
	display: block;
	color: var( --ap-ink-muted );
	font-size: 0.9rem;
	margin-top: 0.3em;
}

@media ( max-width: 760px ) {
	.ap-about-intro {
		grid-template-columns: 1fr;
	}
}

/* =========================================================
   CTA band (About page, etc.)
   ========================================================= */
.ap-cta {
	background: var( --ap-ink );
	color: #fff;
	padding: 56px 0;
	text-align: center;
	margin-top: 48px;
}
.ap-cta h2 {
	color: #fff;
	margin-bottom: 0.8em;
}

/* =========================================================
   Contact page
   ========================================================= */
.ap-contact-grid {
	display: grid;
	grid-template-columns: 1fr 1.5fr;
	gap: 48px;
	margin-bottom: 64px;
}
.ap-contact-info h2 {
	margin-bottom: 0.8em;
}
.ap-contact-item {
	display: flex;
	align-items: center;
	gap: 12px;
	color: var( --ap-ink );
}
.ap-contact-item svg {
	color: var( --ap-accent );
	flex-shrink: 0;
}
.ap-contact-item a:hover {
	color: var( --ap-accent );
}

.ap-notice {
	padding: 14px 18px;
	border-radius: var( --ap-radius );
	margin-bottom: 24px;
	font-size: 0.95rem;
}
.ap-notice--success {
	background: #e7f6ec;
	color: #14532d;
}
.ap-notice--error {
	background: #fdecec;
	color: #7a1414;
}

.ap-contact-form .ap-field {
	margin-bottom: 18px;
}
.ap-contact-form label {
	display: block;
	font-weight: 600;
	font-size: 0.85rem;
	margin-bottom: 0.4em;
}
.ap-contact-form input,
.ap-contact-form textarea {
	width: 100%;
	font-family: inherit;
	font-size: 0.95rem;
	padding: 0.7em 0.9em;
	border: 1.5px solid var( --ap-border );
	border-radius: calc( var( --ap-radius ) - 4px );
	background: #fff;
	color: var( --ap-ink );
}
.ap-contact-form input:focus,
.ap-contact-form textarea:focus {
	outline: none;
	border-color: var( --ap-accent );
	box-shadow: 0 0 0 3px rgba( 68, 35, 107, 0.15 );
}
.ap-contact-form button {
	border: none;
}
/* Honeypot: off-screen rather than display:none, since some spam bots specifically
 * skip display:none/visibility:hidden fields to evade detection. */
.ap-contact-honeypot {
	position: absolute;
	left: -9999px;
	top: -9999px;
}

@media ( max-width: 760px ) {
	.ap-contact-grid {
		grid-template-columns: 1fr;
	}
}
