/*
Theme Name: Abundance For All
Theme URI: https://abundanceforallinc.com
Author: Abundance For All Inc.
Author URI: https://abundanceforallinc.com
Description: A warm, professional charity theme for Abundance For All — a foundation providing shelter, food, and assistance to Americans facing hardship. Built for Elementor (free or Pro) with a one-click demo importer that creates every page, menu and image. Go to Appearance → Abundance Setup after activating.
Version: 1.2.0
Requires at least: 6.0
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: abundance-for-all
Tags: charity, nonprofit, elementor, one-column, custom-logo, custom-menu, featured-images, full-width-template, translation-ready
*/

/* ==========================================================================
   1. Design tokens
   ========================================================================== */
:root {
	--aff-primary: #0f4c5c;      /* deep teal */
	--aff-primary-dark: #0a3540;
	--aff-accent: #e9a23b;       /* harvest gold */
	--aff-accent-dark: #c9831f;
	--aff-coral: #d9644a;
	--aff-cream: #fbf7f0;
	--aff-sand: #f3ebdd;
	--aff-text: #1f2a2e;
	--aff-muted: #5b6b70;
	--aff-border: #e6ddd0;
	--aff-white: #ffffff;
	--aff-radius: 14px;
	--aff-shadow: 0 12px 34px rgba(15, 76, 92, 0.09);
	--aff-container: 1200px;
	--aff-font-head: "Fraunces", Georgia, "Times New Roman", serif;
	--aff-font-body: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ==========================================================================
   2. Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: var(--aff-font-body);
	font-size: 17px;
	line-height: 1.7;
	color: var(--aff-text);
	background: var(--aff-white);
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--aff-primary); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color .2s ease; }
a:hover, a:focus { color: var(--aff-accent-dark); }
h1, h2, h3, h4, h5, h6 {
	font-family: var(--aff-font-head);
	font-weight: 600;
	line-height: 1.2;
	color: var(--aff-primary-dark);
	margin: 0 0 .6em;
	letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.2rem, 4.5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.4rem; }
p { margin: 0 0 1.2em; }
ul, ol { padding-left: 1.3em; }
blockquote {
	margin: 1.5em 0; padding: 1em 1.5em;
	border-left: 4px solid var(--aff-accent);
	background: var(--aff-cream); font-family: var(--aff-font-head); font-size: 1.2rem;
}
:focus-visible { outline: 3px solid var(--aff-accent); outline-offset: 2px; }
.screen-reader-text {
	border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
	height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important;
}
.screen-reader-text:focus {
	background: #fff; clip: auto !important; clip-path: none; color: var(--aff-primary);
	display: block; font-weight: 700; height: auto; left: 8px; padding: 12px 20px; top: 8px; width: auto; z-index: 100000;
}
.aff-container { width: 100%; max-width: var(--aff-container); margin: 0 auto; padding: 0 20px; }

/* Buttons */
.aff-btn, .wp-block-button__link, button, input[type="submit"] {
	display: inline-flex; align-items: center; justify-content: center; gap: .5em;
	padding: .85em 1.7em; border-radius: 999px; border: 2px solid transparent;
	font-family: var(--aff-font-body); font-weight: 700; font-size: 1rem; line-height: 1.2;
	text-decoration: none; cursor: pointer; transition: all .2s ease;
	background: var(--aff-accent); color: var(--aff-primary-dark);
}
.aff-btn:hover, button:hover, input[type="submit"]:hover { background: var(--aff-accent-dark); color: #fff; }
.aff-btn--primary { background: var(--aff-primary); color: #fff; }
.aff-btn--primary:hover { background: var(--aff-primary-dark); color: #fff; }
.aff-btn--outline { background: transparent; border-color: currentColor; color: #fff; }
.aff-btn--outline:hover { background: #fff; color: var(--aff-primary-dark); }

/* ==========================================================================
   3. Header
   ========================================================================== */
.aff-topbar { background: var(--aff-primary-dark); color: #d7e6e9; font-size: .88rem; }
.aff-topbar .aff-container { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap; }
.aff-topbar a { color: #fff; text-decoration: none; }
.aff-topbar a:hover { color: var(--aff-accent); }
.aff-topbar__info { display: flex; gap: 22px; flex-wrap: wrap; }
.aff-topbar__info i { color: var(--aff-accent); margin-right: 6px; }
.aff-topbar__help strong { color: var(--aff-accent); }

.aff-header { position: sticky; top: 0; z-index: 999; background: #fff; border-bottom: 1px solid var(--aff-border); }
.admin-bar .aff-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .aff-header { top: 0; } }
.aff-header .aff-container { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 84px; }

.aff-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--aff-primary-dark); }
.aff-brand img.custom-logo { max-height: 60px; width: auto; }
.aff-brand__mark { width: 46px; height: 46px; flex: 0 0 46px; }
.aff-brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.aff-brand__name { font-family: var(--aff-font-head); font-weight: 700; font-size: 1.35rem; color: var(--aff-primary-dark); }
.aff-brand__tag { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--aff-muted); margin-top: 3px; }

.aff-nav { display: flex; align-items: center; gap: 28px; }
.aff-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.aff-nav li { position: relative; }
.aff-nav a { display: block; padding: 10px 12px; font-weight: 600; font-size: .98rem; color: var(--aff-text); text-decoration: none; border-radius: 8px; }
.aff-nav a:hover, .aff-nav .current-menu-item > a, .aff-nav .current_page_item > a { color: var(--aff-primary); background: var(--aff-cream); }
.aff-nav ul ul { position: absolute; top: 100%; left: 0; min-width: 220px; flex-direction: column; background: #fff; box-shadow: var(--aff-shadow); border-radius: 10px; padding: 8px; opacity: 0; visibility: hidden; transform: translateY(8px); transition: all .2s ease; }
.aff-nav li:hover > ul, .aff-nav li:focus-within > ul { opacity: 1; visibility: visible; transform: none; }
.aff-header__cta { padding: .7em 1.4em; }
.aff-menu-toggle { display: none; background: transparent; color: var(--aff-primary-dark); border: 2px solid var(--aff-border); border-radius: 10px; padding: 10px 12px; }
.aff-menu-toggle:hover { background: var(--aff-cream); color: var(--aff-primary-dark); }
.aff-menu-toggle span { display: block; width: 22px; height: 2px; background: currentColor; margin: 4px 0; transition: .2s; }

@media (max-width: 1024px) {
	.aff-menu-toggle { display: inline-block; }
	.aff-nav { position: fixed; inset: var(--aff-nav-top, 84px) 0 auto 0; background: #fff; flex-direction: column; align-items: stretch; padding: 20px; gap: 16px; box-shadow: 0 20px 30px rgba(0,0,0,.08); transform: translateY(-140%); transition: transform .3s ease; max-height: calc(100vh - var(--aff-nav-top, 84px)); overflow-y: auto; z-index: 998; }
	.aff-nav.is-open { transform: none; }
	.aff-nav ul { flex-direction: column; }
	.aff-nav ul ul { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; padding-left: 14px; }
	.aff-topbar__info span.aff-hide-sm { display: none; }
}

/* Nav wrapper (shared by built-in header and the Elementor header template) */
.aff-nav-wrap { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.aff-nav-wrap .aff-menu-toggle { order: 2; }

/* Elementor "Site Header" template */
.aff-header--builder, .aff-header--builder > .elementor, .aff-header--builder > .elementor > .elementor-section-wrap { display: contents; }
.aff-header--builder .aff-sticky { position: sticky; top: 0; z-index: 999; }
.admin-bar .aff-header--builder .aff-sticky { top: 32px; }
@media (max-width: 782px) { .admin-bar .aff-header--builder .aff-sticky { top: 0; } }
.aff-header--builder p, .aff-footer--builder p { margin: 0; }
.aff-header--builder a { text-decoration: none; }
.aff-header--builder .elementor-widget-text-editor a { color: #fff; }
.aff-header--builder .elementor-widget-text-editor a:hover { color: var(--aff-accent); }

/* Elementor "Site Footer" template */
.aff-footer--builder .elementor-widget-text-editor p + p { margin-top: .8em; }
.aff-footer--builder .elementor-widget-shortcode .aff-brand { margin-bottom: 4px; }
.aff-brand--light .aff-brand__name { color: #fff; }
.aff-brand--light .aff-brand__tag { color: #9fb9be; }
.aff-footer-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.aff-footer-nav a { color: #fff; text-decoration: none; }
.aff-footer-nav a:hover { color: var(--aff-accent); }

/* ==========================================================================
   4. Page hero (non-Elementor pages)
   ========================================================================== */
.aff-page-hero { position: relative; background: var(--aff-primary) center/cover no-repeat; color: #fff; padding: 110px 0 90px; text-align: center; }
.aff-page-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,53,64,.75), rgba(10,53,64,.88)); }
.aff-page-hero .aff-container { position: relative; }
.aff-page-hero h1 { color: #fff; margin: 0; }
.aff-page-hero p { color: #dfeaec; margin: 12px auto 0; max-width: 640px; }
.aff-eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--aff-accent); margin-bottom: 12px; }

/* ==========================================================================
   5. Content
   ========================================================================== */
.aff-main { min-height: 50vh; }
.aff-content { padding: 70px 0; }
.aff-content--narrow .aff-container { max-width: 820px; }
.entry-content > * + * { margin-top: 1.1em; }
.entry-content .alignwide { max-width: 1100px; margin-left: auto; margin-right: auto; }
.entry-content .alignfull { width: 100vw; position: relative; left: 50%; right: 50%; margin-left: -50vw; margin-right: -50vw; }
.entry-meta { color: var(--aff-muted); font-size: .92rem; margin-bottom: 1.5em; }

.aff-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 32px; }
.aff-card { background: #fff; border: 1px solid var(--aff-border); border-radius: var(--aff-radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .25s ease, box-shadow .25s ease; }
.aff-card:hover { transform: translateY(-4px); box-shadow: var(--aff-shadow); }
.aff-card__img { aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.aff-card__body { padding: 24px 26px 28px; display: flex; flex-direction: column; flex: 1; }
.aff-card__body h2 { font-size: 1.35rem; margin-bottom: .4em; }
.aff-card__body h2 a { text-decoration: none; color: var(--aff-primary-dark); }
.aff-card__more { margin-top: auto; font-weight: 700; text-decoration: none; }

.pagination, .nav-links { display: flex; gap: 8px; justify-content: center; margin-top: 50px; flex-wrap: wrap; }
.page-numbers { padding: 8px 15px; border-radius: 8px; border: 1px solid var(--aff-border); text-decoration: none; }
.page-numbers.current { background: var(--aff-primary); color: #fff; border-color: var(--aff-primary); }

/* Forms */
input[type="text"], input[type="email"], input[type="tel"], input[type="search"], input[type="url"], textarea, select {
	width: 100%; padding: 14px 16px; font: inherit; font-size: 1rem; color: var(--aff-text);
	background: #fff; border: 1.5px solid var(--aff-border); border-radius: 10px; transition: border-color .2s;
}
input:focus, textarea:focus, select:focus { border-color: var(--aff-primary); outline: none; box-shadow: 0 0 0 3px rgba(15,76,92,.12); }
label { font-weight: 600; font-size: .95rem; display: block; margin-bottom: 6px; }
.aff-form { display: grid; gap: 18px; }
.aff-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .aff-form__row { grid-template-columns: 1fr; } }
.aff-form__hp { position: absolute !important; left: -9999px !important; }
.aff-notice { padding: 14px 18px; border-radius: 10px; font-weight: 600; }
.aff-notice--ok { background: #e5f4ec; color: #1d6b43; }
.aff-notice--err { background: #fbe9e5; color: #a1381f; }

.search-form { display: flex; gap: 10px; }

/* Comments */
.comments-area { margin-top: 60px; padding-top: 40px; border-top: 1px solid var(--aff-border); }
.comment-list { list-style: none; padding: 0; }
.comment-body { padding: 20px 0; border-bottom: 1px solid var(--aff-border); }

/* ==========================================================================
   6. Footer
   ========================================================================== */
.aff-footer { background: var(--aff-primary-dark); color: #c9d9dc; font-size: .96rem; }
.aff-footer a { color: #fff; text-decoration: none; }
.aff-footer a:hover { color: var(--aff-accent); }
.aff-footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1.2fr 1.2fr; gap: 44px; padding-top: 70px; padding-bottom: 50px; }
.aff-footer h3 { color: #fff; font-size: 1.15rem; margin-bottom: 1em; }
.aff-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.aff-footer__brand .aff-brand__name { color: #fff; }
.aff-footer__brand .aff-brand__tag { color: #9fb9be; }
.aff-footer__brand p { margin-top: 18px; }
.aff-footer__contact li { display: flex; gap: 10px; }
.aff-footer__contact i { color: var(--aff-accent); margin-top: 6px; width: 16px; }
.aff-social { display: flex; gap: 10px; margin-top: 18px; }
.aff-social a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); }
.aff-social a:hover { background: var(--aff-accent); color: var(--aff-primary-dark); }
.aff-footer__help { background: rgba(255,255,255,.06); border-radius: var(--aff-radius); padding: 22px; }
.aff-footer__help strong { color: var(--aff-accent); font-size: 1.15rem; }
.aff-footer__bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 22px 0; font-size: .86rem; }
.aff-footer__bottom .aff-container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
@media (max-width: 960px) { .aff-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .aff-footer__grid { grid-template-columns: 1fr; gap: 34px; } }

/* ==========================================================================
   7. Elementor harmony
   ========================================================================== */
.elementor-page .aff-main { padding: 0; }
.elementor-widget-heading .elementor-heading-title { font-family: var(--aff-font-head); }
.elementor-widget-text-editor { line-height: 1.75; }
.elementor-widget-icon-box .elementor-icon-box-title { font-family: var(--aff-font-head); margin-bottom: 10px; }
.elementor-widget-counter .elementor-counter-number-wrapper { font-family: var(--aff-font-head); font-weight: 700; }
.elementor-widget-image img { border-radius: var(--aff-radius); }
.aff-card-col > .elementor-widget-wrap, .aff-card-col > .elementor-column-wrap { transition: transform .25s ease, box-shadow .25s ease; }
.aff-card-col:hover > .elementor-widget-wrap { transform: translateY(-5px); }
.aff-tier .elementor-widget-wrap { border-top: 5px solid var(--aff-accent); }

/* ==========================================================================
   8. Fallback layout (used only when Elementor is not active)
   ========================================================================== */
.aff-sec { position: relative; padding: 80px 0; background-size: cover; background-position: center; }
.aff-sec--overlay::before { content: ""; position: absolute; inset: 0; background: var(--aff-overlay, rgba(10,53,64,.7)); }
.aff-sec > .aff-container { position: relative; }
.aff-row { display: flex; gap: 32px; flex-wrap: wrap; align-items: stretch; }
.aff-col { flex: 1 1 260px; min-width: 0; }
.aff-col--card { background: #fff; border-radius: var(--aff-radius); box-shadow: var(--aff-shadow); padding: 34px; }
.aff-sec--dark, .aff-sec--dark h1, .aff-sec--dark h2, .aff-sec--dark h3 { color: #fff; }
.aff-sec .aff-img { border-radius: var(--aff-radius); width: 100%; object-fit: cover; }
.aff-iconbox i { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--aff-accent); color: #fff; font-size: 24px; margin-bottom: 18px; }
.aff-counter { font-family: var(--aff-font-head); font-size: 3rem; font-weight: 700; color: var(--aff-accent); line-height: 1; }
.aff-iconlist { list-style: none; padding: 0; }
.aff-iconlist li { padding: 6px 0; }
.aff-iconlist i { color: var(--aff-accent); margin-right: 10px; }
.aff-btnrow { display: inline-block; margin: 6px 8px 6px 0; }
.has-text-center { text-align: center; }

/* ==========================================================================
   9. Responsive
   ========================================================================== */
@media (max-width: 1024px) {
	/* Fallback layout (no Elementor): two columns on tablets */
	.aff-row > .aff-col { flex-basis: calc(50% - 16px) !important; }
	.aff-sec { padding-top: 70px !important; padding-bottom: 70px !important; }

	/* Elementor footer: breathing room between stacked columns */
	.aff-footer--builder .elementor-section:not(:last-child) .elementor-column { margin-bottom: 28px; }
}

@media (max-width: 767px) {
	body { font-size: 16px; }

	/* Built-in header */
	.aff-topbar .aff-container { justify-content: center; text-align: center; padding-top: 6px; padding-bottom: 6px; }
	.aff-topbar__info { justify-content: center; gap: 14px; }
	.aff-topbar__help { display: none; }
	.aff-header .aff-container { min-height: 70px; gap: 12px; }
	.aff-brand__mark { width: 40px; height: 40px; flex-basis: 40px; }
	.aff-brand__name { font-size: 1.15rem; }
	.aff-brand__tag { font-size: .64rem; letter-spacing: .1em; }
	.aff-brand img.custom-logo { max-height: 48px; }

	/* Fallback layout: single column on phones */
	.aff-row { gap: 24px; }
	.aff-row > .aff-col { flex-basis: 100% !important; }
	.aff-sec { padding-top: 56px !important; padding-bottom: 56px !important; }
	.aff-col--card { padding: 26px; }
	.aff-sec .aff-img { max-height: 280px; }
	.aff-counter { font-size: 2.3rem; }

	/* Inner pages */
	.aff-page-hero { padding: 80px 0 60px; }
	.aff-content { padding: 48px 0; }
	.aff-posts { grid-template-columns: 1fr; gap: 24px; }

	/* Buttons: comfortable tap targets, wrap neatly */
	.aff-btn { padding: .85em 1.4em; }
	.elementor-widget-button.elementor-widget__width-auto { margin-right: 10px !important; }

	/* Elementor sections: never allow sideways scrolling */
	.elementor-section .elementor-container { flex-wrap: wrap; }
	.aff-footer--builder { text-align: left; }
	.aff-footer--builder .elementor-section:not(:last-child) .elementor-column { margin-bottom: 22px; }
	.aff-footer--builder .elementor-section:last-child .elementor-column { margin-bottom: 4px; }
	.aff-footer__bottom .aff-container { justify-content: center; text-align: center; }
}

@media (max-width: 380px) {
	.aff-brand__tag { display: none; }
	.aff-brand__name { font-size: 1.05rem; }
}

/* clip (not hidden) so the sticky header keeps working */
body { overflow-x: clip; }

/* ==========================================================================
   10. Motion preferences
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
