/*
Theme Name: StudentBursaries
Theme URI: https://studentbursaries.co.za
Description: Coral Campus child theme for StudentBursaries.co.za, built on Twenty Twenty-Five.
Author: StudentBursaries.co.za
Template: twentytwentyfive
Version: 1.0.2
Requires at least: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: studentbursaries
*/

/* Template parts sit flush; sections manage their own spacing. */
.wp-site-blocks > main,
.wp-site-blocks > footer { margin-block-start: 0; }

/* ---------- Header ---------- */
.sb-site-header {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 50;
	padding-top: 12px;
	padding-bottom: 12px;
	background: rgba(255, 249, 245, 0.94);
	-webkit-backdrop-filter: saturate(140%) blur(8px);
	backdrop-filter: saturate(140%) blur(8px);
	border-bottom: 1px solid var(--wp--preset--color--accent-6);
}
@media (max-width: 600px) { .sb-site-header { top: 0; } }
.sb-site-header__inner { gap: 16px; }
.wp-block-site-title a { display: inline-flex; align-items: center; gap: 10px; color: var(--wp--preset--color--contrast); text-decoration: none; }
.wp-block-site-title a::before {
	content: "";
	flex: 0 0 36px;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--wp--preset--color--accent-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 9.5l10-5 10 5-10 5z'/%3E%3Cpath d='M6 11.5v4.5c3 2 9 2 12 0v-4.5'/%3E%3C/svg%3E") center / 21px no-repeat;
}
.sb-site-header .wp-block-navigation a { color: var(--wp--preset--color--contrast); text-decoration: none; }
.sb-site-header .wp-block-navigation a:hover { color: var(--wp--preset--color--accent-3); }
.sb-site-header .wp-block-navigation .current-menu-item > a { color: var(--wp--preset--color--accent-3); }
.sb-site-header .wp-block-navigation__container { gap: 24px; }
.sb-site-header__nav { gap: 24px; }
.sb-header-cta .wp-block-button__link { padding: 0.6rem 1.15rem; font-size: 0.95rem; }
@media (max-width: 781px) { .wp-block-buttons.sb-header-cta { display: none; } }
.wp-block-navigation__responsive-container.is-menu-open { background: var(--wp--preset--color--base) !important; color: var(--wp--preset--color--contrast) !important; padding: 28px; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { gap: 20px; font-family: var(--wp--preset--font-family--familjen-grotesk); font-size: 1.5rem; font-weight: 700; }

/* ---------- Footer ---------- */
.sb-site-footer {
	margin-top: clamp(56px, 8vw, 96px);
	padding-top: clamp(44px, 6vw, 64px);
	padding-bottom: 32px;
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--ink-soft);
}
.wp-site-blocks:has(.sb-band-cta) .sb-site-footer { margin-top: 0; }
.sb-site-footer .wp-block-site-title a { color: #fff; }
.sb-site-footer a { color: var(--wp--preset--color--ink-soft); text-decoration: none; }
.sb-site-footer a:hover { color: #fff; text-decoration: underline; }
.sb-site-footer__cols { gap: 32px; }
.sb-site-footer__heading { margin: 0 0 14px; color: #fff; font-size: 1rem; letter-spacing: 0.02em; }
.sb-site-footer__about { max-width: 36ch; opacity: 0.8; }
.sb-site-footer .wp-block-navigation { gap: 10px; font-size: 0.95rem; }
.sb-site-footer__legal { margin-top: 44px; padding-top: 20px; border-top: 1px solid rgba(243, 238, 234, 0.16); font-size: 0.85rem; opacity: 0.75; }
.sb-site-footer__legal p { margin: 0; }

/* ---------- Pages ---------- */
.sb-page-hero {
	padding-top: clamp(36px, 6vw, 72px);
	padding-bottom: clamp(18px, 3vw, 32px);
	background: linear-gradient(180deg, var(--wp--preset--color--accent-2) 0%, var(--wp--preset--color--base) 100%);
}
.sb-page-hero .wp-block-post-title { margin: 0; font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3.4rem); }
.sb-page-content { padding-bottom: 8px; }
.sb-page-content > :is(p, ul, ol, h2, h3, h4, .wp-block-table, .wp-block-quote) { max-width: 760px; }
.sb-page-content > p:first-child { font-size: 1.15rem; }
.sb-page-content > h2 { margin-top: 48px; }
.sb-article { padding-bottom: 16px; }
.sb-article > p:first-child { font-size: 1.18rem; }
.sb-article h2 { margin-top: 2.2em; }
.sb-article li { margin: 0.4em 0; }
.sb-article .wp-block-table table { border-collapse: collapse; width: 100%; background: #fff; border-radius: 16px; overflow: hidden; }
.sb-article .wp-block-table th, .sb-article .wp-block-table td { border: 1px solid var(--wp--preset--color--accent-6); padding: 10px 12px; text-align: left; }
.sb-article .wp-block-table thead th { background: var(--wp--preset--color--ink-soft); }

/* ---------- Homepage ---------- */
.sb-home { margin-top: 0; }
.sb-home-hero {
	position: relative;
	overflow: hidden;
	padding-top: clamp(36px, 7vw, 92px);
	padding-bottom: clamp(44px, 7vw, 100px);
	background: var(--wp--preset--color--accent-2);
}
.sb-home-hero::before,
.sb-home-hero::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.sb-home-hero::before { width: 560px; height: 560px; left: -200px; bottom: -300px; background: radial-gradient(circle, rgba(232, 85, 61, 0.24), rgba(232, 85, 61, 0) 68%); }
.sb-home-hero::after { width: 480px; height: 480px; right: -160px; top: -220px; background: radial-gradient(circle, rgba(255, 241, 204, 0.95), rgba(255, 241, 204, 0) 70%); }
.sb-home-hero > * { position: relative; z-index: 1; }
.sb-home-hero__cols { gap: clamp(28px, 4vw, 56px); }
.sb-kicker {
	display: inline-block;
	margin: 0 0 16px;
	padding: 6px 14px;
	border: 1px solid var(--wp--preset--color--accent-6);
	border-radius: 999px;
	background: #fff;
	color: var(--wp--preset--color--accent-3);
	font-size: 0.85rem;
	font-weight: 600;
}
.sb-home-title { margin: 0 0 18px; font-size: clamp(2.7rem, 1.5rem + 4.4vw, 4.8rem) !important; line-height: 1.02 !important; letter-spacing: -0.025em !important; }
.sb-home-lead { max-width: 34em; margin: 0; font-size: clamp(1.08rem, 1rem + 0.4vw, 1.28rem); }
.sb-home-meta { margin: 10px 0 0; color: var(--wp--preset--color--accent-4); font-size: 0.95rem; }
.sb-home-meta strong { color: var(--wp--preset--color--contrast); }

.sb-home-section { margin-top: clamp(52px, 7vw, 96px) !important; }
.sb-home-section > h2 { margin: 0 0 6px; }
.sb-home-section > p { max-width: 640px; margin: 0; color: var(--wp--preset--color--accent-4); }
.sb-section-head { gap: 8px 24px; margin-bottom: 0; }
.sb-section-head h2 { margin: 0; }
.sb-section-head p { margin: 0; }
.sb-section-head a { font-family: var(--wp--preset--font-family--familjen-grotesk); font-weight: 600; text-decoration: none; }
.sb-section-head a::after { content: " \2192"; }
.sb-section-head a:hover { text-decoration: underline; }

.sb-audience { gap: 10px; margin-top: 18px; }
.sb-audience .wp-block-button__link { font-size: 0.98rem; }

.sb-guides { gap: clamp(20px, 3vw, 40px); margin-top: 18px; }
.sb-guide-feature {
	position: relative;
	overflow: hidden;
	padding: clamp(26px, 4vw, 44px);
	border-radius: 24px;
	background: var(--wp--preset--color--tint-sun);
}
.sb-guide-feature::after { content: ""; position: absolute; right: -60px; bottom: -80px; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(circle, rgba(232, 85, 61, 0.18), rgba(232, 85, 61, 0) 70%); }
.sb-guide-feature > * { position: relative; z-index: 1; }
.sb-guide-feature h3 { margin-top: 0; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); }
.sb-guide-feature p { max-width: 36em; }
.sb-guide-list { margin: 0; padding: 0; list-style: none; }
.sb-guide-list li { margin: 0; border-bottom: 1px solid var(--wp--preset--color--accent-6); }
.sb-guide-list li:first-child { border-top: 1px solid var(--wp--preset--color--accent-6); }
.sb-guide-list a { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 17px 4px; color: var(--wp--preset--color--contrast); font-family: var(--wp--preset--font-family--familjen-grotesk); font-weight: 600; font-size: 1.05rem; text-decoration: none; }
.sb-guide-list a::after { content: "\2192"; color: var(--wp--preset--color--accent-3); transition: transform 0.15s; }
.sb-guide-list a:hover { color: var(--wp--preset--color--accent-3); }
.sb-guide-list a:hover::after { transform: translateX(4px); }

.sb-band-cta {
	margin-top: clamp(56px, 8vw, 104px) !important;
	padding-top: clamp(40px, 6vw, 72px);
	padding-bottom: clamp(40px, 6vw, 72px);
	background: var(--wp--preset--color--accent-3);
	color: #fff;
}
.sb-band-cta h2 { margin-top: 0; color: #fff; }
.sb-band-cta p { color: #fff; opacity: 0.92; max-width: 40em; }
.sb-band-cta .wp-block-button__link { background: #fff; color: var(--wp--preset--color--contrast); }
.sb-band-cta .wp-block-button__link:hover { background: var(--wp--preset--color--contrast); color: #fff; }
.sb-band-cta .is-style-outline .wp-block-button__link { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.6); }
.sb-band-cta .is-style-outline .wp-block-button__link:hover { background: #fff; color: var(--wp--preset--color--contrast); border-color: #fff; }

@media (max-width: 781px) {
	.sb-home-hero__cols { flex-direction: column; }
	.sb-section-head { flex-direction: column; align-items: flex-start !important; }
}
@media (prefers-reduced-motion: reduce) {
	.sb-guide-list a::after { transition: none; }
}

/* Long article titles stay within three comfortable lines. */
.sb-page--article .sb-page-hero .wp-block-post-title { font-size: clamp(2rem, 1.5rem + 2vw, 2.9rem); }
