/*
Theme Name: Charlotte Brooke
Theme URI: https://charlottebrooke.co.zw
Author: Aventus Business Solutions
Author URI: https://aventus.co.zw
Description: The website theme for the Charlotte Brooke Property Owners Association, Harare. Built around the Charlotte Brooke roof-and-brook logo: forest green, river blue and warm cream, set in Manrope. Includes a Notices section, a homepage with quick links, and Customizer settings for gate, WhatsApp, email and levy details.
Version: 1.0.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: charlotte-brooke
*/

/* ---------- Brand tokens (from the logo) ---------- */
:root {
	--cb-green: #1E4D3A;
	--cb-green-dark: #163A2C;
	--cb-green-soft: #E4EDE7;
	--cb-blue: #2B6CA3;
	--cb-blue-dark: #21557F;
	--cb-sky: #8CC4EC;
	--cb-cream: #F6F4EE;
	--cb-paper: #FFFFFF;
	--cb-ink: #1F2A26;
	--cb-muted: #4A5752;
	--cb-line: #DDD8CC;
	--cb-radius: 14px;
	--cb-shadow: 0 1px 2px rgba(22, 58, 44, .06), 0 8px 24px rgba(22, 58, 44, .08);
	--cb-font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
	--cb-max: 1200px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
	margin: 0;
	background: var(--cb-cream);
	color: var(--cb-ink);
	font-family: var(--cb-font);
	font-size: 1rem;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}
body.cb-menu-open { overflow: hidden; }
main { flex: 1 0 auto; }
img, svg { max-width: 100%; height: auto; }
a { color: var(--cb-blue); text-underline-offset: 3px; }
a:hover { color: var(--cb-blue-dark); }
h1, h2, h3, h4 { line-height: 1.2; color: var(--cb-green); margin: 0 0 .5em; font-weight: 800; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--cb-sky); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--cb-sky); color: var(--cb-ink); }

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; word-wrap: normal !important;
}
.cb-skip {
	position: absolute; left: 12px; top: -60px; z-index: 100;
	background: var(--cb-green); color: #fff; padding: 10px 16px; border-radius: 8px; font-weight: 700; text-decoration: none;
}
.cb-skip:focus { top: 12px; color: #fff; }

.cb-container { width: 100%; max-width: var(--cb-max); margin: 0 auto; padding: 0 20px; }
.cb-container--narrow { max-width: 780px; }
.cb-icon { width: 1.25em; height: 1.25em; flex: none; }

/* ---------- Buttons & links ---------- */
.cb-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5em;
	min-height: 48px; padding: 12px 22px; border-radius: 999px;
	font-weight: 700; font-size: .975rem; text-decoration: none; border: 2px solid transparent;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}
.cb-btn:hover { transform: translateY(-1px); }
.cb-btn--primary { background: var(--cb-green); color: #fff; }
.cb-btn--primary:hover { background: var(--cb-green-dark); color: #fff; }
.cb-btn--sky { background: var(--cb-sky); color: var(--cb-green-dark); }
.cb-btn--sky:hover { background: #A9D4F2; color: var(--cb-green-dark); }
.cb-btn--ghost { border-color: rgba(246, 244, 238, .55); color: var(--cb-cream); }
.cb-btn--ghost:hover { background: rgba(246, 244, 238, .12); border-color: var(--cb-cream); color: #fff; }

.cb-link-arrow { display: inline-flex; align-items: center; gap: .4em; font-weight: 700; text-decoration: none; color: var(--cb-blue); }
.cb-link-arrow .cb-icon { transition: transform .15s ease; }
.cb-link-arrow:hover .cb-icon { transform: translateX(3px); }

.cb-eyebrow { margin: 0 0 .6em; font-size: .78rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--cb-blue); }
.cb-eyebrow--light { color: var(--cb-sky); }

/* ---------- Top bar ---------- */
.cb-topbar { background: var(--cb-green-dark); color: #D6E2DA; font-size: .85rem; }
.cb-topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 40px; }
.cb-topbar__info { display: flex; gap: 22px; flex-wrap: wrap; }
.cb-topbar a { color: #D6E2DA; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.cb-topbar a:hover { color: #fff; }
.cb-topbar .cb-icon { width: 1rem; height: 1rem; color: var(--cb-sky); }
.cb-topbar__cta { font-weight: 700; color: var(--cb-sky) !important; }

/* ---------- Header ---------- */
.cb-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(255, 255, 255, .96);
	-webkit-backdrop-filter: saturate(140%) blur(8px); backdrop-filter: saturate(140%) blur(8px);
	border-bottom: 1px solid var(--cb-line);
}
.cb-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 84px; }
.cb-logo, .custom-logo-link { display: inline-flex; align-items: center; }
.cb-logo img, .custom-logo { display: block; height: 52px; width: auto; }

.cb-nav__list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cb-nav__list a {
	display: inline-block; padding: 10px 14px; border-radius: 999px;
	color: var(--cb-ink); font-weight: 600; font-size: .95rem; text-decoration: none;
}
.cb-nav__list a:hover { background: var(--cb-green-soft); color: var(--cb-green); }
.cb-nav__list .current-menu-item:not(.menu-item-type-custom) > a,
.cb-nav__list .current_page_item:not(.menu-item-type-custom) > a { background: var(--cb-green); color: #fff; }

.cb-menu-toggle {
	display: none; align-items: center; justify-content: center;
	width: 48px; height: 48px; border-radius: 12px; border: 1px solid var(--cb-line);
	background: var(--cb-paper); color: var(--cb-green); cursor: pointer;
}
.cb-menu-toggle .cb-icon { width: 24px; height: 24px; }
.cb-menu-toggle__close { display: none; }
.cb-menu-toggle[aria-expanded="true"] .cb-menu-toggle__open { display: none; }
.cb-menu-toggle[aria-expanded="true"] .cb-menu-toggle__close { display: inline-flex; }

.cb-mobile-menu { border-top: 1px solid var(--cb-line); background: var(--cb-paper); padding: 12px 0 24px; max-height: calc(100vh - 84px); overflow-y: auto; }
.cb-mobile-menu__list, .cb-mobile-menu__list ul { list-style: none; margin: 0; padding: 0; }
.cb-mobile-menu__list ul { padding-left: 16px; }
.cb-mobile-menu__list a {
	display: block; padding: 14px 4px; border-bottom: 1px solid var(--cb-line);
	color: var(--cb-ink); font-weight: 600; font-size: 1.05rem; text-decoration: none;
}
.cb-mobile-menu__cta { margin-top: 18px; width: 100%; }

@media (max-width: 899px) {
	.cb-nav { display: none; }
	.cb-menu-toggle { display: inline-flex; }
	.cb-header__inner { min-height: 72px; }
	.cb-logo img, .custom-logo { height: 40px; }
	.cb-hide-sm { display: none !important; }
}
@media (min-width: 900px) { .cb-mobile-menu { display: none !important; } }

/* ---------- Hero ---------- */
.cb-hero {
	position: relative; overflow: hidden;
	background: var(--cb-green);
	color: var(--cb-cream);
	padding: 88px 0 140px;
}
.cb-hero--photo {
	background-image: linear-gradient(rgba(22, 58, 44, .82), rgba(22, 58, 44, .82)), var(--cb-hero-img);
	background-size: cover; background-position: center;
}
.cb-hero__motif {
	position: absolute; right: -40px; top: 50%; transform: translateY(-58%);
	width: min(560px, 60vw); height: auto; color: rgba(140, 196, 236, .14); pointer-events: none;
}
.cb-hero__inner { position: relative; max-width: var(--cb-max); }
.cb-hero__title { color: #fff; font-size: clamp(2.3rem, 5.5vw, 4rem); max-width: 14ch; margin-bottom: .35em; letter-spacing: -.02em; }
.cb-hero__text { font-size: clamp(1.05rem, 2vw, 1.25rem); max-width: 46ch; color: #DCE7E0; margin-bottom: 1.8em; }
.cb-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.cb-hero__wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 56px; color: var(--cb-cream); }

/* ---------- Quick-link cards ---------- */
.cb-cards {
	position: relative; z-index: 2; margin-top: -84px;
	display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px;
}
.cb-card {
	display: flex; gap: 14px; align-items: flex-start;
	background: var(--cb-paper); border: 1px solid var(--cb-line); border-radius: var(--cb-radius);
	padding: 22px; box-shadow: var(--cb-shadow); text-decoration: none; color: var(--cb-ink);
	transition: transform .15s ease, border-color .15s ease;
}
a.cb-card:hover { transform: translateY(-3px); border-color: var(--cb-sky); color: var(--cb-ink); }
.cb-card__icon {
	display: inline-flex; align-items: center; justify-content: center; flex: none;
	width: 46px; height: 46px; border-radius: 12px; background: var(--cb-green-soft); color: var(--cb-green);
}
.cb-card__icon .cb-icon { width: 24px; height: 24px; }
.cb-card__body { display: flex; flex-direction: column; gap: 4px; }
.cb-card__title { font-weight: 800; color: var(--cb-green); font-size: 1.05rem; }
.cb-card__text { color: var(--cb-muted); font-size: .92rem; line-height: 1.5; }
@media (max-width: 699px) {
	.cb-hero { padding: 64px 0 120px; }
	.cb-hero__motif { width: 220px; top: 20px; right: -50px; transform: none; color: rgba(140, 196, 236, .10); }
}
@media (max-width: 1023px) { .cb-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) { .cb-cards { grid-template-columns: 1fr; margin-top: -72px; } }

/* ---------- Sections ---------- */
.cb-section { padding-top: 72px; padding-bottom: 72px; }
.cb-section + .cb-section { padding-top: 0; }
.cb-section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.cb-section__title { font-size: clamp(1.7rem, 3vw, 2.3rem); margin: 0; }
.cb-intro { max-width: 760px; font-size: 1.1rem; }
.cb-empty { color: var(--cb-muted); background: var(--cb-paper); border: 1px dashed var(--cb-line); border-radius: var(--cb-radius); padding: 24px; }

.cb-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
@media (max-width: 1023px) { .cb-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { .cb-grid-3 { grid-template-columns: 1fr; } }

/* ---------- Post / notice cards ---------- */
.cb-post-card {
	display: flex; flex-direction: column; overflow: hidden;
	background: var(--cb-paper); border: 1px solid var(--cb-line); border-radius: var(--cb-radius);
	transition: box-shadow .15s ease, transform .15s ease;
}
.cb-post-card:hover { box-shadow: var(--cb-shadow); transform: translateY(-2px); }
.cb-post-card__media img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.cb-post-card__body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.cb-post-card__date { font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--cb-blue); }
.cb-post-card__title { font-size: 1.2rem; margin: 8px 0 10px; }
.cb-post-card__title a { color: var(--cb-green); text-decoration: none; }
.cb-post-card__title a:hover { color: var(--cb-blue); }
.cb-post-card__excerpt { color: var(--cb-muted); font-size: .95rem; flex: 1; }

/* ---------- Contact band ---------- */
.cb-contact { background: var(--cb-green-soft); border-top: 1px solid var(--cb-line); padding: 64px 0; }
.cb-contact__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 40px; align-items: center; }
.cb-contact__lead { color: var(--cb-muted); margin-top: 12px; max-width: 42ch; }
.cb-contact__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.cb-contact__list li {
	display: flex; gap: 14px; align-items: flex-start;
	background: var(--cb-paper); border: 1px solid var(--cb-line); border-radius: var(--cb-radius); padding: 18px;
}
.cb-contact__list strong { display: block; color: var(--cb-green); font-size: .9rem; }
.cb-contact__list a { font-weight: 600; overflow-wrap: anywhere; }
.cb-contact__list .cb-contact__wide { grid-column: 1 / -1; }
.cb-contact__icon { display: inline-flex; width: 42px; height: 42px; flex: none; align-items: center; justify-content: center; border-radius: 50%; background: var(--cb-green); color: var(--cb-sky); }
@media (max-width: 899px) { .cb-contact__inner { grid-template-columns: 1fr; } }
@media (max-width: 539px) { .cb-contact__list { grid-template-columns: 1fr; } }

/* ---------- Inner pages ---------- */
.cb-page-head { position: relative; background: var(--cb-green); color: var(--cb-cream); padding: 56px 0 60px; }
.cb-page-head__title { color: #fff; font-size: clamp(1.9rem, 4vw, 2.9rem); margin: 0; }
.cb-article { padding-top: 48px; padding-bottom: 72px; }
.cb-article__media { margin: 0 0 32px; }
.cb-article__media img { border-radius: var(--cb-radius); display: block; width: 100%; }
.cb-article__back { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--cb-line); }

.cb-entry-content { font-size: 1.05rem; }
.cb-entry-content > * + * { margin-top: 1.1em; }
.cb-entry-content h2 { font-size: 1.6rem; margin-top: 1.6em; }
.cb-entry-content h3 { font-size: 1.3rem; margin-top: 1.4em; }
.cb-entry-content ul, .cb-entry-content ol { padding-left: 1.3em; }
.cb-entry-content li + li { margin-top: .35em; }
.cb-entry-content blockquote { margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--cb-sky); color: var(--cb-muted); }
.cb-entry-content table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.cb-entry-content th, .cb-entry-content td { border: 1px solid var(--cb-line); padding: 10px 12px; text-align: left; }
.cb-entry-content th { background: var(--cb-green-soft); color: var(--cb-green); }
.cb-entry-content img { border-radius: 10px; }
.cb-entry-content .wp-block-button__link { background: var(--cb-green); color: #fff; border-radius: 999px; font-weight: 700; padding: 12px 22px; }
.cb-entry-content .wp-block-button__link:hover { background: var(--cb-green-dark); }
.alignwide { margin-left: auto; margin-right: auto; max-width: 1100px; }
.alignfull { width: 100vw; position: relative; left: 50%; right: 50%; margin-left: -50vw; margin-right: -50vw; max-width: none; }

/* Block editor palette helpers */
.has-cb-green-color { color: var(--cb-green); } .has-cb-green-background-color { background-color: var(--cb-green); }
.has-cb-blue-color { color: var(--cb-blue); } .has-cb-blue-background-color { background-color: var(--cb-blue); }
.has-cb-sky-color { color: var(--cb-sky); } .has-cb-sky-background-color { background-color: var(--cb-sky); }
.has-cb-cream-color { color: var(--cb-cream); } .has-cb-cream-background-color { background-color: var(--cb-cream); }
.has-cb-ink-color { color: var(--cb-ink); } .has-cb-ink-background-color { background-color: var(--cb-ink); }

/* ---------- Pagination ---------- */
.cb-pagination { margin-top: 40px; }
.cb-pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.cb-pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 14px;
	border-radius: 999px; border: 1px solid var(--cb-line); background: var(--cb-paper); color: var(--cb-green); font-weight: 700; text-decoration: none;
}
.cb-pagination .page-numbers.current { background: var(--cb-green); border-color: var(--cb-green); color: #fff; }

/* ---------- Footer ---------- */
.cb-footer { position: relative; background: var(--cb-green); color: #D6E2DA; margin-top: 0; padding-top: 64px; }
.cb-footer__wave { position: absolute; top: -47px; left: 0; right: 0; height: 48px; color: var(--cb-green); line-height: 0; }
.cb-footer__wave svg { width: 100%; height: 48px; }
.cb-footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; padding-bottom: 48px; }
.cb-footer__about .cb-logo img { height: 60px; width: auto; }
.cb-footer__about p { margin-top: 18px; max-width: 34ch; }
.cb-footer__title { color: #fff; font-size: 1rem; letter-spacing: .04em; margin-bottom: 14px; }
.cb-footer__links, .cb-footer__contact { list-style: none; margin: 0; padding: 0; }
.cb-footer__links li + li, .cb-footer__contact li + li { margin-top: 10px; }
.cb-footer a { color: #fff; text-decoration: none; }
.cb-footer a:hover { color: var(--cb-sky); text-decoration: underline; }
.cb-footer__contact li { display: flex; gap: 10px; align-items: flex-start; }
.cb-footer__contact .cb-icon { color: var(--cb-sky); margin-top: 3px; }
.cb-footer__bottom {
	display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
	border-top: 1px solid rgba(214, 226, 218, .2); padding-top: 20px; padding-bottom: 28px; font-size: .85rem;
}
.cb-footer__bottom p { margin: 0; }
.cb-footer__bottom a { color: var(--cb-sky); }
@media (max-width: 899px) { .cb-footer__grid { grid-template-columns: 1fr 1fr; } .cb-footer__about { grid-column: 1 / -1; } }
@media (max-width: 539px) { .cb-footer__grid { grid-template-columns: 1fr; } }

/* WordPress core classes */
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.wp-caption-text, figcaption { font-size: .88rem; color: var(--cb-muted); }
.sticky, .bypostauthor, .gallery-caption { }
