/*
Theme Name: QAFYS
Theme URI: https://qafysjamaica.org
Description: Quran Academy for Young Scholars (QAFYS): the build appeal page with the Fundraise Up donation window, and the Donate page. Activating it makes the Home and Donate pages; the words and photos are edited in Pages.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: qafys
*/

/* ---------- base ---------- */
html { scroll-behavior: smooth; }
body { margin: 0; -webkit-font-smoothing: antialiased; }
.qafys-page { margin: 0; }
.qafys-page :where(p, h1, h2, h3, h4, ul) { margin-top: 0; }

/* ---------- buttons: "Donate now" with the hand icon ---------- */
.qafys-btn .wp-block-button__link {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	padding: 6px 30px; min-height: 56px; box-sizing: border-box;
	border-radius: 4px; border: 0;
	font-family: Poppins, sans-serif; font-size: 14px; font-weight: 600; letter-spacing: .56px; line-height: 1.75;
	text-transform: uppercase; text-decoration: none;
}
.qafys-btn .wp-block-button__link::before {
	content: ""; width: 24px; height: 44px; flex: none;
	background: center / contain no-repeat;
}
.qafys-btn--orange .wp-block-button__link { background: #FF6200; color: #fff; }
.qafys-btn--orange .wp-block-button__link::before { background-image: url(assets/images/hand-white.svg); }
.qafys-btn--orange .wp-block-button__link:hover { background: #e55800; color: #fff; }
.qafys-btn--white .wp-block-button__link { background: #fff; color: #FFA600; min-height: 54px; }
.qafys-btn--white .wp-block-button__link::before { background-image: url(assets/images/hand-color.svg); }
.qafys-btn--white .wp-block-button__link:hover { color: #CD8500; }

/* ---------- header (sticky, as on build.qafys.org) ---------- */
header.wp-block-template-part { position: sticky; top: 0; z-index: 100; }
body.admin-bar header.wp-block-template-part { top: var(--wp-admin--admin-bar--height, 32px); }
.qafys-header { background: #fff; padding-top: 15px !important; padding-bottom: 15px !important; box-shadow: 0 4px 2px -2px #0000000f; }
.qafys-header-inner { align-items: center; gap: 16px; }
.qafys-btn { display: flex; } /* no gap under the button, so the header is exactly 86px like the original */
.qafys-header .wp-block-site-logo img { height: 50px; width: auto !important; display: block; }
.qafys-header .wp-block-site-logo a { display: block; }

/* ---------- appeal ---------- */
.qafys-hero { background: #FCFCFC; padding-top: 40px !important; padding-bottom: 40px !important; }
.qafys-eyebrow { color: #292974; text-transform: uppercase; font-size: 14px; font-weight: 500; text-align: center; margin: 0 auto 16px !important; }
.qafys-hero-title { color: #0B132B; font-size: 48px; line-height: 56px; font-weight: 600; text-align: center; max-width: 900px !important; margin: 0 auto 40px !important; }
.qafys-banner, .qafys-photo { margin: 0; }
.qafys-banner img, .qafys-photo img { width: 100%; height: auto; display: block; }

/* ---------- orange bar: Description and Donate now (sticky under the header) ---------- */
.qafys-bar { background: #FFA600; border-top: 1px solid #FFA600; border-bottom: 1px solid #FFA600; position: sticky; top: 86px; z-index: 90; }
body.admin-bar .qafys-bar { top: calc(86px + var(--wp-admin--admin-bar--height, 32px)); }
.qafys-bar-inner { min-height: 60px; align-items: center; gap: 12px; }
.qafys-tab { margin: 0 !important; align-self: stretch; display: flex; }
.qafys-tab a { display: flex; align-items: center; padding: 0 16px; background: #CD8500; color: #fff; text-decoration: none; text-transform: uppercase; font-size: 14px; font-weight: 500; letter-spacing: .4px; }
.qafys-bar-buttons { margin: 2px 0; }

/* ---------- description and the side boxes ---------- */
.qafys-cols { gap: 24px !important; margin: 40px auto 0 !important; padding-bottom: 40px; }
.qafys-lead-title { font-size: 34px; line-height: 42px; font-weight: 700; color: #0B132B; max-width: 730px; margin: 0 0 20px; scroll-margin-top: 160px; }
.qafys-text { color: #676C7B; font-size: 20px; line-height: 30px; max-width: 730px; margin: 0 0 20px; }
.qafys-center { text-align: center; margin-left: auto !important; margin-right: auto !important; }
.qafys-quote { border-left: 2px solid #005AFF; padding-left: 20px; color: #0B132B; font-size: 20px; line-height: 26px; font-weight: 600; margin: 0 0 32px; }
.qafys-photo { margin-bottom: 32px; }
.qafys-video { margin: 0; }
.qafys-video iframe { width: 100%; }

.qafys-fu { display: flex; justify-content: center; margin-bottom: 24px; }
.qafys-fu:empty, .qafys-fu:has(> a[style*="none"]:only-child) { margin-bottom: 0; }
.qafys-box { margin-bottom: 38px; }
.qafys-box-title { margin: 0 !important; padding: 8px; background: #FFA600; color: #fff; font-weight: 400; font-size: 20px; line-height: 34px; text-transform: uppercase; text-align: center; border-radius: 4px 4px 0 0; }
.qafys-box-body { background: #FCFCFC; border: 1px solid #E4E8EC; border-top: 0; padding: 18px 20px !important; border-radius: 0 0 4px 4px; margin: 0 !important; }
.qafys-list { list-style: none; }
.qafys-list li { display: flex; align-items: baseline; margin-bottom: 20px; color: #0B132B; font-size: 16px; line-height: 24px; }
.qafys-list li:last-child { margin-bottom: 0; }
.qafys-list li::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: #A4A7B0; margin-right: 14px; position: relative; top: -2px; }
.qafys-contact { gap: 12px !important; align-items: center; }
.qafys-contact + .qafys-contact { margin-top: 18px; }
.qafys-contact-photo { margin: 0; flex: none; }
.qafys-contact-photo img { width: 80px; height: 80px; object-fit: cover; border-radius: 50%; display: block; }
.qafys-contact-info h4 { font-size: 18px; color: #0B132B; font-weight: 700; margin: 0; line-height: 1.4; }
.qafys-contact-info p, .qafys-contact-info p a { font-size: 14px; color: #676C7B; margin: 0; line-height: 24px; text-decoration: none; }
.qafys-contact-info p a:hover { color: #292974; }

/* ---------- Donate page ---------- */
.qafys-donate-hero { padding-bottom: 60px !important; min-height: 50vh; }
.qafys-donate-hero .qafys-fu { margin-top: 24px; }

/* ---------- footer ---------- */
.qafys-footer { background: #FCFCFC; padding-top: 40px !important; padding-bottom: 30px !important; border-bottom: 1px solid #E5E8EC; }
.qafys-footer-cols { gap: 24px !important; margin: 0 auto !important; }
.qafys-footer h3 { font-size: 20px; color: #444; font-weight: 600; margin: 0 0 16px; line-height: 1.5; }
.qafys-footer p { font-size: 14px; color: #444; margin: 0; line-height: 1.6; }
.qafys-footer p a { color: #444; text-decoration: none; }
.qafys-footer p a:hover { color: #292974; }
.qafys-taxid::after { content: ""; display: inline-block; width: 18px; height: 18px; margin-left: 4px; vertical-align: -4px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='11' fill='%2319a15f'/%3E%3Cpath d='M7 12.5l3.2 3.2L17 9' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.qafys-phone a::before, .qafys-email a::before { content: ""; display: inline-block; width: 17px; height: 17px; margin-right: 8px; vertical-align: -3px; background: center / contain no-repeat; }
.qafys-phone a::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%237f91a2' d='M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2c.3-.3.7-.4 1-.2 1.1.4 2.3.6 3.6.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1A17 17 0 0 1 3 4c0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.3.2 2.5.6 3.6.1.3 0 .7-.2 1l-2.3 2.2z'/%3E%3C/svg%3E"); }
.qafys-email a::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%237f91a2' d='M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4-8 5-8-5V6l8 5 8-5v2z'/%3E%3C/svg%3E"); }
.qafys-footer-bottom { background: #F7F8FA; padding-top: 15px !important; padding-bottom: 15px !important; }
.qafys-footer-bottom p { margin: 0; color: #7F91A2; font-size: 12px; text-transform: uppercase; }

/* in the editor nothing sticks, so the header and the orange bar never cover the text being edited */
.editor-styles-wrapper header.wp-block-template-part, .editor-styles-wrapper .qafys-bar { position: relative !important; top: auto !important; }

/* plain pages (anything not made from the two pages) */
.qafys-plain { padding-top: 40px !important; padding-bottom: 40px !important; min-height: 50vh; }

/* ---------- tablet and phone ---------- */
@media (max-width: 899px) {
	header.wp-block-template-part { position: static; }
	.qafys-header-inner { flex-direction: column; justify-content: center !important; }
	.qafys-header .wp-block-site-logo img { height: auto; max-width: 270px; }
	.qafys-header-buttons, .qafys-header-buttons .wp-block-button, .qafys-header-buttons .wp-block-button__link { width: 100%; }
	.qafys-hero-title { font-size: 30px; line-height: 35px; }
	.qafys-bar, body.admin-bar .qafys-bar { top: 0; }
	.qafys-bar-inner { flex-direction: column-reverse; align-items: stretch !important; gap: 0; padding: 8px 0 0; }
	.qafys-bar-buttons, .qafys-bar-buttons .wp-block-button, .qafys-bar-buttons .wp-block-button__link { width: 100%; }
	.qafys-tab { align-self: flex-start; }
	.qafys-tab a { min-height: 47px; }
	.qafys-lead-title { font-size: 28px; line-height: 36px; }
	.qafys-text { font-size: 17px; line-height: 27px; }
	.qafys-quote { font-size: 17px; line-height: 24px; }
	.qafys-footer, .qafys-footer-bottom { text-align: center; }
}
