/* AEC Uganda — theme styles. Mobile first; layout and colours come from theme.json. */

:root {
	--aec-radius: 14px;
	--aec-shadow: 0 10px 30px -12px rgba(2, 0, 49, 0.18);
	--aec-header-h: 84px;
}

html { scroll-behavior: smooth; }
[id] { scroll-margin-top: calc(var(--aec-header-h) + 12px); }
img { height: auto; }

/* ---------- Header ---------- */
.aec-site-header {
	--aec-topbar-h: 40px;
	--aec-adminbar: 0px;
	position: sticky;
	top: calc(var(--aec-adminbar) - var(--aec-topbar-h)); /* top bar scrolls away; logo bar stays */
	z-index: 50;
	background: var(--wp--preset--color--base);
	box-shadow: 0 1px 0 var(--wp--preset--color--accent-6), 0 6px 18px -14px rgba(2, 0, 49, 0.35);
}
.admin-bar .aec-site-header { --aec-adminbar: 46px; }
@media (min-width: 783px) { .admin-bar .aec-site-header { --aec-adminbar: 32px; } }
@media (max-width: 600px) { .admin-bar .aec-site-header { --aec-adminbar: 0px; } } /* admin bar is not fixed on small screens */

.aec-topbar { padding-top: 0 !important; padding-bottom: 0 !important; }
.aec-topbar > .wp-block-group { height: var(--aec-topbar-h); align-items: center; flex-wrap: nowrap !important; }
.aec-topbar p { white-space: nowrap; }
@media (max-width: 360px) { .aec-topbar { font-size: 0.78rem !important; } }
.aec-topbar p { margin: 0; }
.aec-topbar a { text-decoration: none; }
.aec-topbar a:hover { text-decoration: underline; }
.aec-topbar__meeting a { color: var(--wp--preset--color--accent-1) !important; }

.aec-header .aec-logo img { width: 72px; }
@media (min-width: 782px) { .aec-header .aec-logo img { width: 96px; } }

.aec-nav .wp-block-navigation-item__content { text-decoration: none; padding: 0.35rem 0; }
.aec-nav .wp-block-navigation-item__content:hover { color: var(--wp--preset--color--accent-2); }
.aec-nav .wp-block-navigation__submenu-container {
	border: 1px solid var(--wp--preset--color--accent-6) !important;
	border-radius: 10px;
	padding: 0.4rem !important;
	box-shadow: var(--aec-shadow);
}
.aec-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: 0.5rem 0.8rem; }
.aec-nav .wp-block-navigation__responsive-container-open svg { width: 30px; height: 30px; }
.aec-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	padding-top: 2rem;
	font-size: 1.35rem;
}
.aec-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { gap: 1.1rem; }

.aec-header-cta .wp-block-button__link { white-space: nowrap; }
@media (max-width: 380px) {
	.aec-header-cta .wp-block-button__link { padding: 0.55rem 0.85rem !important; font-size: 0.8rem !important; }
}
@media (max-width: 599px) { .aec-hide-mobile { display: none; } }

/* ---------- Buttons ---------- */
.wp-block-button.is-style-outline > .wp-block-button__link {
	border: 2px solid currentColor;
	background: transparent;
	color: var(--wp--preset--color--accent-2);
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--accent-3);
	border-color: var(--wp--preset--color--accent-3);
	color: var(--wp--preset--color--base) !important;
}
.aec-on-dark .wp-block-button.is-style-outline > .wp-block-button__link { color: var(--wp--preset--color--base); }
.aec-on-dark .wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--base);
	border-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--accent-3) !important;
}
.wp-element-button { transition: background-color .15s ease, color .15s ease, transform .15s ease; }
.wp-element-button:active { transform: translateY(1px); }

/* ---------- Small pieces ---------- */
.aec-eyebrow {
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-weight: 700;
	margin: 0;
}
.aec-page-hero h1 { text-wrap: balance; }
.aec-page-hero .wp-block-post-title { margin-bottom: 0; }

.aec-card { box-shadow: var(--aec-shadow); }
@media (min-width: 782px) {
	.aec-sticky { position: sticky; top: calc(var(--aec-header-h) + 20px); }
}

.aec-prose > * + h2 { margin-top: 2.2rem; }
.aec-prose h2 { font-size: var(--wp--preset--font-size--x-large); }
.aec-prose h3 { margin-top: 1.6rem; }
.aec-prose > .wp-block-details { margin-top: 0.75rem; }
.aec-prose ul li::marker { color: var(--wp--preset--color--accent-2); }

/* Feature / info cards on the home page */
.aec-feature {
	height: 100%;
	border: 1px solid var(--wp--preset--color--accent-6);
	border-radius: var(--aec-radius);
	transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.aec-feature:hover { box-shadow: var(--aec-shadow); transform: translateY(-2px); border-color: transparent; }
.aec-feature h3 { margin-top: 0.3rem; }
.aec-feature .aec-feature__icon {
	display: inline-grid;
	place-items: center;
	width: 44px; height: 44px;
	border-radius: 12px;
	background: var(--wp--preset--color--accent-5);
	color: var(--wp--preset--color--accent-2);
	font-size: 1.3rem;
	font-weight: 800;
	margin: 0;
}
.aec-feature a { text-decoration: none; font-weight: 700; }
@media (max-width: 599px) {
	/* Compact cards on phones: number badge beside the text. */
	.aec-feature { display: grid; grid-template-columns: 40px 1fr; column-gap: 14px; padding: 1.1rem !important; }
	.aec-feature > * { grid-column: 2; margin-top: 0 !important; margin-bottom: 0.35rem; }
	.aec-feature > .aec-feature__icon { grid-column: 1; grid-row: 1 / span 3; width: 40px; height: 40px; font-size: 1rem; }
	.aec-feature h3 { margin-top: 0; }
}

.aec-info-strip .wp-block-column {
	border-left: 4px solid var(--wp--preset--color--accent-1);
	padding-left: 1rem;
}
.aec-info-strip h3 { margin-bottom: 0.3rem; }
.aec-info-strip p { margin: 0; }

.aec-stat strong { display: block; font-size: var(--wp--preset--font-size--xx-large); color: var(--wp--preset--color--accent-1); line-height: 1; }

/* Hero cover */
.aec-hero.wp-block-cover { min-height: min(86vh, 640px) !important; }
.aec-hero .wp-block-cover__inner-container > h1,
.aec-hero .wp-block-cover__inner-container > p {
	/* Keep narrow text left-aligned with the 1200px content edge instead of centring it. */
	margin-left: max(0px, calc((100% - 1200px) / 2)) !important;
	margin-right: auto !important;
}
.aec-hero h1 { max-width: 15ch; }
.aec-hero .wp-block-cover__inner-container > p:not(.aec-eyebrow) { max-width: 40rem; }
.aec-hero .wp-block-cover__inner-container { width: 100%; }

/* Testimonial */
.aec-testimonial img { border-radius: 50%; }
.aec-testimonial blockquote, .aec-testimonial .wp-block-quote { border: 0; padding: 0; margin: 0; }
.aec-testimonial .wp-block-quote p { font-size: var(--wp--preset--font-size--large); font-weight: 600; line-height: 1.5; }

/* University grid */
.aec-uni-state {
	border: 1px solid var(--wp--preset--color--accent-6);
	border-radius: var(--aec-radius);
	background: var(--wp--preset--color--base);
	height: 100%;
}
.aec-uni-state h3 { color: var(--wp--preset--color--accent-2); font-size: var(--wp--preset--font-size--medium); text-transform: uppercase; letter-spacing: 0.06em; }
.aec-uni-state ul { list-style: none; padding: 0; margin: 0; }
.aec-uni-state li { padding: 0.55rem 0; border-top: 1px solid var(--wp--preset--color--accent-6); }
.aec-uni-state li:first-child { border-top: 0; }
.aec-uni-state a { text-decoration: none; font-weight: 600; color: var(--wp--preset--color--accent-3); }
.aec-uni-state a::after { content: " ↗"; color: var(--wp--preset--color--accent-2); font-size: 0.85em; }
.aec-uni-state a:hover { color: var(--wp--preset--color--accent-2); }

.aec-logos img { max-height: 90px; width: auto; object-fit: contain; filter: grayscale(0.2); }

/* FAQ accordions */
.wp-block-details { background: var(--wp--preset--color--base); }
.wp-block-details + .wp-block-details { margin-top: 0.75rem; }
.wp-block-details summary {
	cursor: pointer;
	font-weight: 700;
	color: var(--wp--preset--color--accent-3);
	list-style: none;
	position: relative;
	padding-right: 2rem;
}
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after {
	content: "+";
	position: absolute; right: 0; top: 50%;
	transform: translateY(-50%);
	font-size: 1.4rem; line-height: 1;
	color: var(--wp--preset--color--accent-2);
}
.wp-block-details[open] summary::after { content: "–"; }
.wp-block-details[open] summary { margin-bottom: 0.8rem; }
.aec-disclaimer { background: transparent !important; }
.aec-disclaimer summary { color: inherit; font-weight: 600; display: inline-block; }
.aec-disclaimer summary::after { position: static; transform: none; margin-left: 0.4rem; font-size: 1rem; color: var(--wp--preset--color--accent-1); }

/* Steps */
.aec-steps { padding-left: 0; list-style: none; counter-reset: aec-step; }
.aec-steps li { counter-increment: aec-step; position: relative; padding-left: 2.6rem; margin-bottom: 1rem; }
.aec-steps li::before {
	content: counter(aec-step);
	position: absolute; left: 0; top: 0;
	width: 1.9rem; height: 1.9rem;
	border-radius: 50%;
	display: grid; place-items: center;
	background: var(--wp--preset--color--accent-1);
	color: var(--wp--preset--color--accent-3);
	font-weight: 800;
}

/* Post cards */
.aec-post-card {
	height: 100%;
	overflow: hidden;
	border: 1px solid var(--wp--preset--color--accent-6);
	transition: box-shadow .2s ease;
}
.aec-post-card:hover { box-shadow: var(--aec-shadow); }
.aec-post-card .wp-block-post-featured-image { margin-top: 0; }
.aec-post-card .wp-block-post-featured-image img { border-radius: 0; }
.aec-post-card .wp-block-post-title a { text-decoration: none; color: var(--wp--preset--color--accent-3); }
.aec-post-card .wp-block-post-title a:hover { color: var(--wp--preset--color--accent-2); }
.aec-post-card .wp-block-post-excerpt__more-text { display: none; }

/* Gallery */
.aec-gallery img { border-radius: 10px; }

/* Map */
.aec-map iframe { width: 100%; min-height: 320px; border: 0; border-radius: var(--aec-radius); }

/* Contact details with icons (phone, email, address, hours, WhatsApp).
   Give any paragraph the classes "aec-ci aec-ci--phone" (or --mail, --pin, --clock, --chat) to show an icon on its left. */
:root {
	--aec-i-pin: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 5-5.5 10.2-7.4 11.8a1 1 0 0 1-1.2 0C9.5 20.2 4 15 4 10a8 8 0 0 1 16 0'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
	--aec-i-phone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7c.1 1 .4 1.9.7 2.8a2 2 0 0 1-.5 2.1L8.1 9.9a16 16 0 0 0 6 6l1.3-1.3a2 2 0 0 1 2.1-.4c.9.3 1.8.6 2.8.7a2 2 0 0 1 1.7 2z'/%3E%3C/svg%3E");
	--aec-i-mail: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='20' height='16' x='2' y='4' rx='2'/%3E%3Cpath d='m22 7-9 5.7a2 2 0 0 1-2 0L2 7'/%3E%3C/svg%3E");
	--aec-i-clock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 6v6l4 2'/%3E%3C/svg%3E");
	--aec-i-chat: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7.9 20A9 9 0 1 0 4 16.1L2 22z'/%3E%3Cpath d='M9 9.5c0 3 2.5 5.5 5.5 5.5l1.2-1.4-2-1-1 .9c-1-.4-1.8-1.2-2.2-2.2l.9-1-1-2z' stroke-width='1.4'/%3E%3C/svg%3E");
}
.aec-ci { position: relative; padding-left: 1.75em; }
.aec-ci::before {
	content: ""; position: absolute; left: 0; top: 0.3em; width: 1.1em; height: 1.1em;
	background-color: var(--aec-ci-color, var(--wp--preset--color--accent-2));
	-webkit-mask: var(--aec-ci-icon) center / contain no-repeat; mask: var(--aec-ci-icon) center / contain no-repeat;
}
.aec-ci--pin { --aec-ci-icon: var(--aec-i-pin); }
.aec-ci--phone { --aec-ci-icon: var(--aec-i-phone); }
.aec-ci--mail { --aec-ci-icon: var(--aec-i-mail); }
.aec-ci--clock { --aec-ci-icon: var(--aec-i-clock); }
.aec-ci--chat { --aec-ci-icon: var(--aec-i-chat); }
.aec-ci-list > * { margin-block: 0 !important; }
.aec-ci-list > * + * { margin-block-start: 0.6rem !important; }
.aec-topbar, .aec-footer { --aec-ci-color: var(--wp--preset--color--accent-1); }
.aec-topbar .aec-ci { padding-left: 1.5em; }
.aec-topbar .aec-ci::before { top: 50%; transform: translateY(-50%); width: 1em; height: 1em; }
.aec-topbar .aec-ci.aec-hide-mobile { display: none; }
@media (min-width: 600px) { .aec-topbar .aec-ci.aec-hide-mobile { display: block; } }

/* Call / email buttons get the matching icon. */
.wp-block-button__link[href^="tel:"], .wp-block-button__link[href^="mailto:"] { display: inline-flex; align-items: center; justify-content: center; gap: 0.5em; }
.wp-block-button__link[href^="tel:"]::before, .wp-block-button__link[href^="mailto:"]::before {
	content: ""; flex: none; width: 1.05em; height: 1.05em; background-color: currentColor;
	-webkit-mask: var(--aec-i-phone) center / contain no-repeat; mask: var(--aec-i-phone) center / contain no-repeat;
}
.wp-block-button__link[href^="mailto:"]::before { -webkit-mask-image: var(--aec-i-mail); mask-image: var(--aec-i-mail); }

/* Footer */
@media (max-width: 781px) {
	/* Two link lists side by side on phones. */
	.aec-footer > .wp-block-columns { display: grid !important; grid-template-columns: 1fr 1fr; gap: 2rem 1.25rem; }
	.aec-footer > .wp-block-columns > .wp-block-column:first-child,
	.aec-footer > .wp-block-columns > .wp-block-column:last-child { grid-column: 1 / -1; }
}
.aec-footer .aec-footer-list { list-style: none; padding: 0; }
.aec-footer .aec-footer-list li { margin-bottom: 0.45rem; }
.aec-footer a { text-decoration: none; }
.aec-footer a:hover { text-decoration: underline; }
.aec-footer p { margin-top: 0.6rem; }

/* Accessibility */
:where(a, button, input, select, textarea, summary):focus-visible {
	outline: 3px solid var(--wp--preset--color--accent-1);
	outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	* { transition: none !important; }
}

/* Copyright line: keep clear of the floating WhatsApp button on phones. */
.aec-copyright { line-height: 1.8; }
@media (max-width: 781px) { .aec-footer { padding-bottom: 96px !important; } }

/* Full-width sections sit flush — no white strips between coloured bands, or above the footer. */
.wp-site-blocks > * + * { margin-block-start: 0; }
.wp-block-post-content > .alignfull,
.wp-block-post-content > .alignfull + * { margin-block-start: 0; }
.wp-block-post-content > .alignfull:last-child { margin-block-end: 0; }
.wp-site-blocks main > * + * { margin-block-start: 0; }
