/*
Theme Name: Rotary for Business
Theme URI: https://rotary4business.co.za
Author: Rotary for Business, District 9370
Description: Theme for Rotary for Business (Rotary District 9370) built on the Rotary brand palette. Designed to work with the "Rotary for Business – Core" plugin.
Version: 1.0.1
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: r4b-theme
*/

:root {
	--blue: #17458F; --gold: #F7A81B; --azure: #0067C8; --sky: #00A2E0; --cranberry: #D41367;
	--turquoise: #00ADBB; --violet: #901F93; --orange: #FF7600; --grass: #009739;
	--navy: #0c2a5b; --ink: #1c2b3a; --muted: #5a6b7d; --line: #d9e1ec; --tint: #f3f6fb;
	--wrap: 1180px;
	--font: "Open Sans", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 1.0625rem; line-height: 1.65; color: var(--ink); background: #fff; }
img { max-width: 100%; height: auto; }
a { color: var(--azure); text-underline-offset: 2px; }
a:hover { color: var(--blue); }
h1, h2, h3, h4 { color: var(--blue); line-height: 1.15; margin: 2rem 0 .75rem; }
h1, h2, .display { font-stretch: 75%; font-weight: 800; text-transform: uppercase; letter-spacing: .005em; }
h1 { font-size: clamp(2.1rem, 4.5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1.1rem; }
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.screen-reader-text, .skip-link:not(:focus) { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed; top: .5rem; left: .5rem; z-index: 999; padding: .6rem 1rem; background: var(--gold); color: var(--navy); font-weight: 700; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }

/* Header */
.topbar { background: var(--blue); color: #dbe6f7; font-size: .8rem; letter-spacing: .03em; }
.topbar .wrap { display: flex; justify-content: space-between; gap: 1rem; padding: .4rem 0; }
.topbar a { color: #fff; text-decoration: none; font-weight: 600; }
.topbar a:hover { color: var(--gold); }
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); }
.admin-bar .site-header { top: 32px; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 84px; }
.site-logo { display: flex; align-items: center; flex: 0 0 auto; }
.site-logo img { display: block; height: 60px; width: auto; }
.nav-toggle { display: none; align-items: center; gap: .5rem; padding: .55rem .8rem; background: none; border: 2px solid var(--blue); border-radius: 4px; color: var(--blue); font: inherit; font-weight: 700; cursor: pointer; }
.nav-toggle__bars { width: 18px; height: 2px; background: currentColor; box-shadow: 0 6px 0 currentColor, 0 -6px 0 currentColor; }
.site-nav ul { display: flex; align-items: center; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.site-nav a { display: block; padding: .6rem .8rem; color: var(--navy); font-size: .95rem; font-weight: 600; text-decoration: none; border-radius: 4px; }
.site-nav a:hover, .site-nav .current-menu-item > a { color: var(--azure); }
.site-nav .current-menu-item > a { box-shadow: inset 0 -3px 0 var(--gold); border-radius: 0; }
.site-nav li.menu-cta > a, .site-nav li.is-join > a { margin-left: .5rem; padding: .6rem 1.1rem; background: var(--gold); color: var(--navy); font-weight: 700; box-shadow: none; border-radius: 4px; }
.site-nav li.is-join > a:hover { background: #ffbd3d; color: var(--navy); }
.site-nav li.is-portal > a { border: 2px solid var(--blue); color: var(--blue); padding: .5rem 1rem; margin-left: .35rem; box-shadow: none; border-radius: 4px; }
.site-nav li.is-portal > a:hover { background: var(--blue); color: #fff; }

/* Hero */
.hero { position: relative; isolation: isolate; color: #fff; background: var(--navy); overflow: hidden; }
.hero__img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(95deg, rgba(12, 42, 91, .96) 0%, rgba(23, 69, 143, .88) 42%, rgba(23, 69, 143, .35) 100%); }
.hero .wrap { padding: clamp(4rem, 10vw, 7.5rem) 0 clamp(4rem, 9vw, 6.5rem); }
.hero__eyebrow { display: inline-flex; align-items: center; gap: .6rem; margin: 0 0 1.1rem; font-size: .85rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.hero__eyebrow::before { content: ""; width: 2.5rem; height: 3px; background: var(--gold); }
.hero h1 { max-width: 15ch; margin: 0 0 1.25rem; color: #fff; font-size: clamp(2.5rem, 6.2vw, 4.6rem); line-height: 1.02; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero__lead { max-width: 36rem; margin: 0 0 2rem; font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: #e6edf9; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .9rem; }
.btn-light { background: transparent !important; border-color: #fff !important; color: #fff !important; }
.btn-light:hover { background: #fff !important; color: var(--blue) !important; }

.stats { background: var(--gold); color: var(--navy); }
.stats .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.stats div { padding: 1.4rem 1rem; text-align: center; border-right: 1px solid rgba(12, 42, 91, .18); }
.stats div:last-child { border-right: 0; }
.stats strong { display: block; font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 800; font-stretch: 75%; line-height: 1; }
.stats span { font-size: .85rem; font-weight: 600; }

/* Sections */
.section { padding: clamp(3.25rem, 7vw, 5.5rem) 0; }
.section--tint { background: var(--tint); }
.section--blue { background: var(--blue); color: #e6edf9; }
.section--blue h2, .section--blue h3 { color: #fff; }
.section__head { max-width: 46rem; margin-bottom: 2.5rem; }
.section__head--center { margin-inline: auto; text-align: center; }
.section__head h2 { margin: 0 0 .75rem; }
.section__head p { margin: 0; font-size: 1.1rem; color: var(--muted); }
.section--blue .section__head p { color: #c9d8f0; }
.eyebrow { display: block; margin-bottom: .6rem; font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--azure); }
.section--blue .eyebrow { color: var(--gold); }
.section__foot { margin-top: 2rem; }

.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.pillar { padding: 1.6rem 1.4rem; background: #fff; border: 1px solid var(--line); border-top: 5px solid var(--c, var(--blue)); border-radius: 6px; }
.pillar h3 { margin: 0 0 .6rem; color: var(--navy); }
.pillar ul { margin: 0; padding-left: 1.1rem; color: var(--muted); }
.pillar li { margin-bottom: .25rem; }
.pillar__num { display: block; margin-bottom: .9rem; font-size: 2.2rem; font-weight: 800; font-stretch: 75%; line-height: 1; color: var(--c, var(--blue)); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split__media { position: relative; isolation: isolate; }
.split__media img { display: block; width: 100%; border-radius: 6px; }
.split__media::after { content: ""; position: absolute; right: -14px; bottom: -14px; z-index: -1; width: 55%; height: 55%; background: var(--gold); border-radius: 6px; }
.split h2 { margin-top: 0; }
.ticks { list-style: none; margin: 1.25rem 0 1.75rem; padding: 0; }
.ticks li { position: relative; margin-bottom: .7rem; padding-left: 1.9rem; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .4em; width: 1rem; height: .5rem; border-left: 3px solid var(--gold); border-bottom: 3px solid var(--gold); transform: rotate(-45deg); }
.ticks strong { color: var(--navy); }
.section--blue .ticks strong { color: #fff; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; counter-reset: step; }
.step { position: relative; padding-top: 3.6rem; }
.step::before { counter-increment: step; content: counter(step); position: absolute; top: 0; left: 0; display: flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; background: var(--blue); color: var(--gold); font-weight: 800; font-size: 1.2rem; }
.step h3 { margin: 0 0 .4rem; color: var(--navy); }
.step p { margin: 0; color: var(--muted); }

.fourway { list-style: none; margin: 1.5rem 0 0; padding: 0; counter-reset: fw; }
.fourway li { counter-increment: fw; display: flex; gap: 1rem; padding: .85rem 0; border-top: 1px solid rgba(255, 255, 255, .2); font-size: 1.15rem; color: #fff; }
.fourway li::before { content: counter(fw); font-weight: 800; color: var(--gold); }
.fourway b { color: var(--gold); font-weight: 800; }

.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; list-style: none; margin: 0; padding: 0; }
.chips li { padding: .55rem 1.2rem; background: #fff; border: 1px solid var(--line); border-radius: 99px; font-weight: 600; color: var(--navy); }

.home-search { display: flex; flex-wrap: wrap; gap: .75rem; max-width: 720px; margin: 0 auto; }
.home-search input { flex: 1 1 260px; padding: .85rem 1rem; border: 1px solid #b7c3d4; border-radius: 4px; font: inherit; }

.cta { background: var(--gold); color: var(--navy); }
.cta .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; padding: clamp(2.5rem, 5vw, 3.75rem) 0; }
.cta h2 { margin: 0 0 .35rem; color: var(--navy); }
.cta p { margin: 0; font-size: 1.1rem; }
.btn-navy { background: var(--blue) !important; border-color: var(--blue) !important; color: #fff !important; }
.btn-navy:hover { background: var(--navy) !important; border-color: var(--navy) !important; }

/* Inner pages */
.page-hero { background: var(--blue); color: #fff; border-bottom: 5px solid var(--gold); }
.page-hero .wrap { padding: clamp(2.25rem, 5vw, 3.5rem) 0; }
.page-hero h1 { margin: 0; color: #fff; }
.page-hero p { margin: .6rem 0 0; max-width: 44rem; color: #dbe6f7; font-size: 1.1rem; }
.crumb { display: inline-block; margin-bottom: .75rem; color: var(--gold); font-size: .85rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; }
.crumb:hover { color: #fff; }
.content { padding: clamp(2.25rem, 5vw, 3.75rem) 0 clamp(3rem, 6vw, 5rem); }
.content--narrow > .wrap > .entry { max-width: 780px; }
.entry > :first-child { margin-top: 0; }
.entry .lead { font-size: 1.2rem; color: var(--navy); }
.entry blockquote { margin: 1.75rem 0; padding: .25rem 0 .25rem 1.25rem; border-left: 4px solid var(--gold); font-size: 1.2rem; font-style: italic; color: var(--navy); }

/* Footer */
.site-footer { background: var(--navy); color: #c9d8f0; font-size: .95rem; }
.site-footer .wrap { padding: 3.25rem 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2.5rem; }
.site-footer h2 { margin: 0 0 .9rem; font-size: .85rem; font-stretch: 100%; letter-spacing: .12em; color: var(--gold); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .45rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--gold); text-decoration: underline; }
.footer-logo { display: inline-block; margin-bottom: 1rem; padding: .7rem 1rem; background: #fff; border-radius: 6px; }
.footer-logo img { display: block; height: 48px; width: auto; }
.footer-motto { font-style: italic; color: #fff; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, .15); font-size: .8rem; }

@media (max-width: 1020px) {
	.pillars { grid-template-columns: repeat(2, 1fr); }
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.nav-toggle { display: inline-flex; }
	.site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; padding: .75rem 1.25rem 1.25rem; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 16px 30px rgba(12, 42, 91, .12); }
	.site-nav.is-open { display: block; }
	.site-nav ul { flex-direction: column; align-items: stretch; gap: .15rem; }
	.site-nav li.is-join > a, .site-nav li.is-portal > a { margin: .4rem 0 0; text-align: center; }
	.site-header .wrap { position: static; min-height: 72px; }
	.site-header { position: sticky; }
	.site-logo img { height: 50px; }
}
@media (max-width: 760px) {
	.split, .steps { grid-template-columns: 1fr; }
	.split__media { order: -1; margin-right: 14px; }
	.stats .wrap { grid-template-columns: repeat(2, 1fr); }
	.stats div:nth-child(2) { border-right: 0; }
	.stats div:nth-child(-n+2) { border-bottom: 1px solid rgba(12, 42, 91, .18); }
	.hero::before { background: linear-gradient(180deg, rgba(12, 42, 91, .93), rgba(23, 69, 143, .86)); }
	.topbar span { display: none; }
	.topbar .wrap { justify-content: flex-end; }
	.admin-bar .site-header { top: 46px; }
}
@media (max-width: 520px) {
	.pillars, .footer-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
