/*
Theme Name: NordÄng Agronomy
Description: Custom block theme for NordÄng Agronomy. Header, Gutenberg-built homepage, footer.
Author: Anas Nagati
Version: 1.4.1
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nordang
*/

/* Area outside the page (iPhone home-swipe bar, overscroll) matches header/footer */
html {
	background-color: var(--wp--preset--color--night-field, #1f2b38);
}

/* Full-height page: main grows, footer always sits at the bottom */
.wp-site-blocks {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: calc(100dvh - var(--wp-admin--admin-bar--height, 0px));
}

.wp-site-blocks > main {
	flex: 1 0 auto;
}

/* No gap between header, main and footer, nothing after the footer */
.wp-site-blocks > main,
.wp-site-blocks > footer {
	margin-block-start: 0;
}

.wp-site-blocks > footer,
.site-footer {
	margin-block-end: 0;
}

/* ---------- Header (Night Field, white logo) ---------- */
.site-header .site-logo img {
	display: block;
	height: auto;
}

.site-header .wp-block-navigation a {
	color: #fff;
}

/* Mobile menu overlay stays dark like the header */
.site-header .wp-block-navigation__responsive-container.is-menu-open {
	background-color: var(--wp--preset--color--night-field);
	color: #fff;
}

@media (max-width: 600px) {
	.site-header .site-logo img {
		width: 150px !important;
	}
}

/* ---------- Content ---------- */

/* Service cards: thin gold top rule */
.service-card {
	border-top: 3px solid var(--wp--preset--color--harvest-gold);
}

/* Partner logo: keep SWAT MAPS artwork untouched, only scale */
.partner-logo img {
	height: auto;
	max-width: 100%;
}

/* Contact details labels */
.contact-label {
	color: var(--wp--preset--color--slate-grey);
}

/* ---------- Home hero ---------- */

/* Single-section home page: the hero fills the space between header and footer */
.wp-site-blocks > main:has(.home-hero) {
	display: flex;
	flex-direction: column;
}

main:has(.home-hero) > .wp-block-post-content:has(> .home-hero) {
	flex: 1 0 auto;
	display: flex;
	flex-direction: column;
}

.wp-block-post-content > .home-hero {
	flex: 1 0 auto;
}

/* Gold button: on the dark photo, hover turns white instead of dark */
.home-hero .wp-block-button__link:hover,
.home-hero .wp-block-button__link:focus-visible {
	background-color: var(--wp--preset--color--white) !important;
	color: var(--wp--preset--color--night-field) !important;
}

/* SWAT MAPS badge: small and quiet under the button */
.partner-badge .partner-logo {
	margin: 0;
}

.partner-badge p {
	margin: 0;
	padding-left: 0.75rem;
	border-left: 1px solid rgba(255, 255, 255, 0.4);
	opacity: 0.85;
	letter-spacing: 0.04em;
}

@media (max-width: 600px) {
	.home-hero {
		min-height: 70vh !important;
	}

	/* Phones: logo above the label, no divider */
	.partner-badge {
		flex-direction: column;
		align-items: flex-start !important;
		gap: 0.5rem !important;
	}

	.partner-badge p {
		padding-left: 0;
		border-left: 0;
	}

	.partner-badge .partner-logo img {
		width: 120px !important;
	}
}

/* ---------- About page ---------- */

/* Small label above the page title */
.eyebrow {
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-weight: 700;
}

/* Portrait photo: same shape whatever image is uploaded */
.about-photo img {
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	border-radius: 6px;
}

/* Quick facts under the intro: thin gold top rule */
.about-fact {
	border-top: 3px solid var(--wp--preset--color--harvest-gold);
	padding-top: 1rem;
}

.about-fact p {
	margin: 0;
}

/* "How I work" step numbers */
.step-number {
	margin-bottom: 0;
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 900;
	line-height: 1;
	color: var(--wp--preset--color--deep-gold);
}

/* Dark call-to-action band: visible hover states on dark background */
.cta-band .wp-block-button__link:hover,
.cta-band .wp-block-button__link:focus-visible {
	background-color: var(--wp--preset--color--white) !important;
	color: var(--wp--preset--color--night-field) !important;
	border-color: var(--wp--preset--color--white);
}

/* ---------- Footer (Night Field) ---------- */
.site-footer a,
.site-footer .wp-block-site-title a {
	color: inherit;
	text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
	color: var(--wp--preset--color--harvest-gold);
}

@media (max-width: 600px) {
	.site-footer .footer-bottom {
		flex-direction: column;
		align-items: center;
		gap: 0.5rem;
		text-align: center;
		font-size: 0.9375rem;
	}

	.site-footer .footer-bottom .footer-links {
		justify-content: center;
		gap: 0.25rem 1rem;
	}
}

/* ---------- Accessibility ---------- */
a:focus-visible,
.wp-element-button:focus-visible {
	outline: 2px solid var(--wp--preset--color--harvest-gold);
	outline-offset: 2px;
}
