/* ========================================================================
   Office of the County Attorney | County Government of Siaya
   Brand palette sampled from the supplied Siaya website header reference.
   ======================================================================== */

.cao-wrap {
	--cao-green: #4A9236;
	--cao-green-dark: #39752A;
	--cao-green-deep: #2F6324;
	--cao-green-soft: #EEF6EB;
	--cao-gold: #D4AE67;
	--cao-gold-dark: #B88E47;
	--cao-gold-soft: #F7F0E3;
	--cao-ink: #263126;
	--cao-text: #39443A;
	--cao-muted: #667166;
	--cao-bg: #F7F9F6;
	--cao-border: #DCE5D9;
	--cao-white: #FFFFFF;
	--cao-radius: 14px;
	--cao-radius-sm: 9px;
	--cao-shadow: 0 8px 28px rgba(47, 99, 36, .10);
	--cao-shadow-hover: 0 12px 34px rgba(47, 99, 36, .15);

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

.cao-wrap * { box-sizing: border-box; }

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

.cao-header::before {
	content: "";
	position: absolute;
	top: -90px;
	right: -80px;
	width: 300px;
	height: 300px;
	border-radius: 50%;
	border: 1px solid rgba(255,255,255,.10);
	box-shadow: 0 0 0 35px rgba(255,255,255,.025), 0 0 0 70px rgba(255,255,255,.02);
	pointer-events: none;
}

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

.cao-photo { position: relative; z-index: 1; flex: 0 0 auto; }

.cao-photo img,
.cao-photo-placeholder {
	width: 190px;
	height: 225px;
	object-fit: cover;
	display: block;
	border-radius: 10px;
	border: 4px solid rgba(255,255,255,.96);
	outline: 2px solid var(--cao-gold);
	outline-offset: 4px;
	box-shadow: 0 12px 30px rgba(0,0,0,.25);
}

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

.cao-header-text { position: relative; z-index: 1; flex: 1; min-width: 260px; }

.cao-wrap .cao-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: var(--cao-gold) !important;
}

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

.cao-wrap .cao-office-title {
	margin: 0 0 8px;
	font-size: clamp(21px, 3vw, 27px);
	line-height: 1.2;
	font-weight: 750;
	letter-spacing: -.2px;
	color: #fff !important;
}

.cao-wrap .cao-holder-name {
	margin: 0;
	font-size: clamp(28px, 4vw, 36px);
	line-height: 1.15;
	font-weight: 800;
	letter-spacing: -.5px;
	color: #fff !important;
}

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

.cao-wrap .cao-intro {
	max-width: 700px;
	margin: 0;
	font-size: 15px;
	line-height: 1.75;
	color: #fff !important;
	opacity: .96;
}

/* Functions */
.cao-functions { margin-top: 42px; }

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

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

.cao-accordion { display: grid; grid-template-columns: 1fr 1fr; gap: 11px 14px; }

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

.cao-function-item:hover {
	border-color: #C8D8C3;
	transform: translateY(-1px);
	box-shadow: 0 5px 18px rgba(47,99,36,.07);
}

.cao-function-item[open] {
	border-left-color: var(--cao-gold);
	box-shadow: 0 7px 22px rgba(47,99,36,.10);
}

.cao-function-item summary {
	list-style: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 62px;
	padding: 14px 16px;
	font-size: 14.5px;
	font-weight: 700;
	line-height: 1.35;
	color: var(--cao-ink) !important;
	user-select: none;
	transition: background .15s ease;
}

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

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

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

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

.cao-function-title { font-size: 14.5px; }

.cao-function-list {
	margin: 0;
	padding: 3px 18px 19px 58px;
	list-style: none;
	background: #FCFDFC;
}

.cao-function-list li {
	position: relative;
	margin: 0 0 8px;
	padding-left: 16px;
	font-size: 14px;
	line-height: 1.62;
	color: var(--cao-muted) !important;
}

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

.cao-function-list li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 9px;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--cao-gold);
}

/* Admin preview and forms */
.cao-wrap input[type="text"],
.cao-wrap textarea {
	border-color: var(--cao-border);
}

/* Responsive */
@media (max-width: 780px) {
	.cao-accordion { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
	.cao-header {
		flex-direction: column;
		text-align: center;
		padding: 30px 22px 32px;
	}

	.cao-header::after {
		left: 0;
		right: 0;
		bottom: auto;
		width: 100%;
		height: 5px;
	}

	.cao-kicker { justify-content: center; }
	.cao-header-text { min-width: 0; }
	.cao-intro { max-width: none; }

	.cao-photo img,
	.cao-photo-placeholder {
		width: 165px;
		height: 195px;
	}

	.cao-functions { margin-top: 32px; }
	.cao-wrap .cao-functions-heading { font-size: 18px; }

	.cao-function-number { display: none; }
	.cao-function-list { padding-left: 24px; padding-right: 16px; }
}
