/*
Theme Name: Almost Home Pet Foundation
Description: Custom theme for almosthomepf.org. Reproduces the Astra + Spectra design without either.
Author: Infinite Web Consulting
Version: 1.0.0
Requires PHP: 7.4
Text Domain: almosthome-modern
*/

:root {
	--blue: #4175fc;
	--blue-dark: #084af3;
	--ink: #101218;
	--text: #494b51;
	--page: #f3f5f5;
	--panel-text: #f3f5f5;
	--font-body: "Lato", system-ui, -apple-system, "Segoe UI", sans-serif;
	--font-head: "Montserrat", "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--text); font: 400 17px/1.5 var(--font-body); }
img { max-width: 100%; height: auto; }
a { color: var(--blue); }
a:hover, a:focus { color: var(--blue-dark); }
h1, h2, h3, h4, h5, h6 { margin: 0 0 20px; font-family: var(--font-head); font-weight: 700; color: var(--ink); }
h1 { font-size: 60px; line-height: 1.4; }
h2 { font-size: 40px; line-height: 1.3; }
h3 { font-size: 32px; line-height: 1.3; }
h4 { font-size: 36px; line-height: 1.2; }
p { margin: 0 0 1.6em; }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; padding: 10px 16px; background: #fff; color: var(--ink); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ah-wrap { width: min(1240px, 100%); margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.ah-header { position: relative; z-index: 20; background: #fff; }
.ah-header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 107px; }
.ah-logo img { display: block; width: 120px; height: auto; }
.ah-button { display: inline-block; padding: 15px 28.5px; border-radius: 30px; background: var(--blue); color: #fff; font: 600 15px/1 var(--font-body); text-decoration: none; transition: background 0.2s; }
.ah-button:hover, .ah-button:focus { background: var(--blue-dark); color: #fff; }
.ah-toggle { display: none; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 2px; background: var(--blue); color: #fff; cursor: pointer; }
.ah-toggle svg { display: block; width: 20px; height: 20px; margin: 0 auto; }
.ah-toggle .ah-close { display: none; }
.ah-toggle[aria-expanded="true"] .ah-open { display: none; }
.ah-toggle[aria-expanded="true"] .ah-close { display: block; }
.ah-dropdown { display: none; padding: 10px 20px 24px; border-top: 1px solid #eaeaea; background: #fff; }
.ah-dropdown a.ah-menu-link { display: block; padding: 12px 0; border-bottom: 1px solid #eaeaea; color: var(--text); text-decoration: none; }
.ah-dropdown .ah-button { margin-top: 18px; }

/* ---------- Homepage ---------- */
.ah-hero { display: flex; align-items: center; justify-content: center; min-height: 650px; padding: 15px; background: #555 url("assets/img/hero-dog.webp") 50% 50% / cover no-repeat fixed; }
.ah-hero-inner { width: min(100%, 1200px); }
.ah-panel { width: 50%; padding: 30px; background: var(--blue); color: var(--panel-text); }
.ah-panel h1 { margin: 0; color: #fff; }
.ah-panel p { margin: 0 0 1.6em; }
.ah-focus { padding: 60px 0; text-align: center; }
.ah-focus-inner { width: min(100%, 1200px); margin: 0 auto; }
.ah-focus h2 { margin: 0 0 0; }
.ah-focus .ah-lead { margin: 0 0 91px; font-size: 20px; line-height: 1.275; } /* 32px paragraph margin + the old 59px spacer */
.ah-focus h4 { margin: 0 0 20px; }
.ah-partners { display: flex; align-items: center; gap: 24px; }
.ah-partners figure { flex: 0 0 calc(25% - 18px); margin: 0; }
.ah-partners img { display: block; width: 100%; }
.ah-partners .ah-a4a { width: 199px; margin: 0 auto; }

/* ---------- Pages and posts ---------- */
.ah-main { width: min(1240px, 100%); margin: 0 auto; padding: 68px 20px; }
.ah-article { padding: 90.78px 113.4px; background: #fff; } /* Astra's boxed article: 5.34em 6.67em */
.ah-article .entry-content > h2:first-child { margin-top: 0; }
.ah-article .entry-title { font-size: 40px; line-height: 1.3; }
.ah-article .entry-meta { margin: -10px 0 24px; font-size: 15px; color: #777; }
.ah-article .wp-block-image img { height: auto; }
.ah-list .ah-article + .ah-article { margin-top: 30px; }
.ah-list .entry-title a { color: var(--ink); text-decoration: none; }

/* Form fields, as the old theme styled them (Forminator inherits these) */
input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="number"], input[type="password"], input[type="search"], input[type="date"], textarea,
.forminator-ui input.forminator-input, .forminator-ui textarea.forminator-textarea {
	color: #666; border: 1px solid #ddd; border-radius: 2px; background: #fafafa; box-shadow: none;
}
input:focus, textarea:focus, .forminator-ui input.forminator-input:focus { border-color: var(--blue); outline: none; }
.forminator-ui .forminator-button, .forminator-ui .forminator-button:hover { color: #fff; }

/* ---------- Footer ---------- */
.ah-footer { background: var(--blue); color: #fff; }
.ah-footer a { color: #fff; text-decoration: none; }
.ah-footer-main { padding: 45px 0 92px; }
.ah-donate { width: min(660px, 100%); margin: 0 auto; text-align: center; }
.ah-donate h2 { margin: 0 0 48px; font-size: 24px; line-height: 1.3; color: #fff; }
.ah-donate p { margin: 0; }
.ah-donate img { display: block; width: 150px; margin: 0 auto; }
.ah-footer-bar { padding: 20px 0 74px; border-top: 1px solid rgba(255, 255, 255, 0.2); }
.ah-footer-bar .ah-wrap { display: flex; justify-content: space-between; gap: 20px; }
.ah-footer-bar p { margin: 0; }

/* ---------- Tablet (Astra's 921px / Spectra's 976px breakpoints) ---------- */
@media (max-width: 976px) {
	.ah-hero { padding: 14px; }
	.ah-hero-inner { width: min(100%, 1024px); }
	.ah-panel { width: 100%; padding: 41px; }
	.ah-focus { padding: 41px; }
}
@media (max-width: 921px) {
	h1 { font-size: 40px; }
	h2 { font-size: 32px; }
	h4 { font-size: 30px; }
	.ah-header-inner { min-height: 70px; }
	.ah-header-inner > .ah-button { display: none; }
	.ah-toggle { display: block; }
	.ah-header.is-open .ah-dropdown { display: block; }
	.ah-article { padding: 40px; }
	.ah-main { padding: 40px 20px; }
	.ah-footer-bar .ah-wrap { flex-direction: column; align-items: center; text-align: center; }
}

/* ---------- Phone ---------- */
@media (max-width: 767px) {
	h1 { font-size: 30px; line-height: 1.4; }
	h2 { font-size: 25px; }
	h4 { font-size: 34px; }
	.ah-hero { background-attachment: scroll; }
	.ah-panel { padding: 27px; }
	.ah-focus { padding: 27px; }
	.ah-partners { flex-direction: column; gap: 40px; }
	.ah-partners figure { flex: none; }
	.ah-partners img { width: auto; max-width: 100%; margin: 0 auto; }
	.ah-article { padding: 1.5em 1em; }
	.ah-main { padding: 30px 14px; }
	.ah-footer-main { padding: 45px 20px 60px; }
}
