/* ========================================================================
   Office of the County Secretary | County Government of Siaya
   Brand palette sampled from the supplied Siaya website header artwork.
   Primary Green: #4A9236 | Gold Accent: #D4AE67
   ======================================================================== */

.cso-wrap {
	--cso-green: #4A9236;
	--cso-green-dark: #367226;
	--cso-green-deep: #2F6522;
	--cso-green-pale: #F0F7ED;
	--cso-gold: #D4AE67;
	--cso-gold-dark: #B88F45;
	--cso-gold-pale: #FBF6EC;
	--cso-ink: #233021;
	--cso-text: #39443A;
	--cso-muted: #667066;
	--cso-bg: #F7F9F6;
	--cso-border: #DDE7D9;
	--cso-white: #FFFFFF;
	--cso-radius: 12px;
	--cso-radius-sm: 8px;
	--cso-shadow: 0 2px 5px rgba(47, 101, 34, .07), 0 10px 28px rgba(47, 101, 34, .09);

	max-width: 1040px;
	margin: 0 auto;
	font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
	color: var(--cso-text);
	-webkit-font-smoothing: antialiased;
}

.cso-wrap *,
.cso-wrap *::before,
.cso-wrap *::after { box-sizing: border-box; }

/* Profile banner */
.cso-header {
	position: relative;
	display: flex;
	align-items: center;
	gap: 34px;
	background: linear-gradient(135deg, var(--cso-green) 0%, var(--cso-green-dark) 100%);
	color: #fff;
	border-radius: var(--cso-radius);
	padding: 34px 38px 38px;
	box-shadow: var(--cso-shadow);
	flex-wrap: wrap;
	overflow: hidden;
	border-bottom: 5px solid var(--cso-gold);
}

.cso-header::before {
	content: "";
	position: absolute;
	width: 310px;
	height: 310px;
	right: -130px;
	top: -170px;
	border-radius: 50%;
	border: 1px solid rgba(212,174,103,.28);
	box-shadow: 0 0 0 24px rgba(255,255,255,.025), 0 0 0 48px rgba(255,255,255,.018);
	pointer-events: none;
}

.cso-header::after {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 5px;
	width: 5px;
	background: var(--cso-gold);
}

.cso-photo { position: relative; z-index: 2; }

.cso-photo img,
.cso-photo-placeholder {
	position: relative;
	width: 205px;
	height: 245px;
	border-radius: 8px;
	object-fit: cover;
	border: 4px solid rgba(255,255,255,.96);
	outline: 2px solid var(--cso-gold);
	outline-offset: 3px;
	box-shadow: 0 14px 30px rgba(0,0,0,.26);
	flex-shrink: 0;
	display: block;
	z-index: 1;
}

.cso-photo-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255,255,255,.08);
	color: var(--cso-gold);
	font-size: 52px;
	font-weight: 800;
}

.cso-header-text {
	position: relative;
	flex: 1;
	min-width: 280px;
	z-index: 2;
}

.cso-wrap .cso-kicker {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	margin: 0 0 10px;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: #F3D79E !important;
}

.cso-kicker::before {
	content: "";
	width: 22px;
	height: 2px;
	background: var(--cso-gold);
	display: inline-block;
	border-radius: 2px;
}

.cso-wrap .cso-office-title {
	margin: 0 0 8px;
	font-size: clamp(22px, 3vw, 30px);
	line-height: 1.2;
	font-weight: 750;
	letter-spacing: -.2px;
	color: #fff !important;
	text-shadow: 0 1px 3px rgba(0,0,0,.22);
}

.cso-wrap .cso-holder-name {
	margin: 0;
	font-size: clamp(27px, 4vw, 36px);
	line-height: 1.12;
	font-weight: 800;
	letter-spacing: -.4px;
	color: #fff !important;
	text-shadow: 0 1px 3px rgba(0,0,0,.22);
}

.cso-wrap .cso-holder-title {
	display: inline-block;
	margin: 12px 0 17px;
	padding: 6px 13px;
	font-size: 11.5px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: var(--cso-green-deep) !important;
	background: var(--cso-gold);
	border-radius: 999px;
}

.cso-wrap .cso-intro {
	margin: 0;
	font-size: 15px;
	line-height: 1.75;
	color: #fff !important;
	opacity: .96;
	max-width: 680px;
	text-shadow: 0 1px 2px rgba(0,0,0,.18);
}

/* Section heading */
.cso-functions { margin-top: 42px; }

.cso-wrap .cso-functions-heading {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 20px;
	line-height: 1.3;
	font-weight: 800;
	color: var(--cso-ink) !important;
	padding-bottom: 13px;
	margin: 0 0 20px;
	border-bottom: 1px solid var(--cso-border);
}

.cso-functions-heading::after {
	content: "";
	flex: 1;
	height: 3px;
	background: linear-gradient(90deg, var(--cso-gold), transparent);
	border-radius: 3px;
}

.cso-accordion { display: flex; flex-direction: column; gap: 10px; }

.cso-function-item {
	background: var(--cso-white);
	border: 1px solid var(--cso-border);
	border-left: 4px solid transparent;
	border-radius: var(--cso-radius-sm);
	overflow: hidden;
	transition: box-shadow .18s ease, border-color .18s ease, transform .18s ease;
}

.cso-function-item:hover {
	border-color: #C9D9C3;
	border-left-color: var(--cso-gold);
	box-shadow: 0 4px 15px rgba(47,101,34,.07);
}

.cso-function-item[open] {
	border-color: #BFD4B8;
	border-left-color: var(--cso-green);
	box-shadow: 0 6px 20px rgba(47,101,34,.10);
}

.cso-function-item summary {
	list-style: none;
	cursor: pointer;
	padding: 15px 20px 15px 17px;
	display: flex;
	align-items: center;
	gap: 15px;
	font-weight: 650;
	font-size: 15px;
	line-height: 1.4;
	color: var(--cso-ink) !important;
	user-select: none;
	transition: background .15s ease;
}

.cso-function-item summary:hover { background: var(--cso-green-pale); }
.cso-function-item summary::-webkit-details-marker { display: none; }

.cso-function-item summary::after {
	content: "";
	margin-left: auto;
	width: 9px;
	height: 9px;
	flex-shrink: 0;
	border-right: 2px solid var(--cso-gold-dark);
	border-bottom: 2px solid var(--cso-gold-dark);
	transform: rotate(45deg) translateY(-2px);
	transition: transform .2s ease;
}

.cso-function-item[open] summary::after { transform: rotate(-135deg) translate(-1px,-1px); }

.cso-function-number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--cso-green);
	color: #fff;
	font-size: 12px;
	font-weight: 800;
	flex-shrink: 0;
	box-shadow: 0 0 0 3px var(--cso-green-pale);
}

.cso-function-list {
	margin: 0;
	padding: 4px 24px 20px 65px;
	list-style: none;
	color: var(--cso-text);
}

.cso-function-list li {
	position: relative;
	margin: 0 0 9px;
	padding-left: 18px;
	font-size: 14.5px;
	line-height: 1.65;
	color: var(--cso-muted) !important;
}

.cso-function-list li:last-child { margin-bottom: 0; }

.cso-function-list li::before {
	content: "";
	position: absolute;
	left: 0;
	top: .72em;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--cso-gold);
	box-shadow: 0 0 0 2px var(--cso-gold-pale);
}

/* WordPress/admin preview safety */
.cso-wrap a { color: var(--cso-green-dark); }
.cso-wrap p:last-child { margin-bottom: 0; }

@media (max-width: 720px) {
	.cso-header { gap: 25px; padding: 29px 24px 32px; }
	.cso-photo { margin: 0 auto; }
	.cso-header-text { min-width: 100%; text-align: center; }
	.cso-kicker { justify-content: center; }
	.cso-intro { max-width: none; }
}

@media (max-width: 640px) {
	.cso-header { flex-direction: column; text-align: center; }
	.cso-header::after { width: 100%; height: 5px; top: auto; bottom: 0; }
	.cso-photo img, .cso-photo-placeholder { width: 165px; height: 200px; }
	.cso-wrap .cso-functions-heading { font-size: 18px; }
	.cso-function-list { padding: 3px 18px 18px 20px; }
	.cso-function-number { min-width: 27px; height: 27px; }
	.cso-function-item summary { padding: 13px 15px; gap: 12px; }
}
