/*
 * Siaya County Municipalities Portal - public styles.
 * Everything is scoped to .smp-app / .smp-directory so the plugin never
 * restyles the surrounding theme.
 */

.smp-app,
.smp-app *,
.smp-app *::before,
.smp-app *::after,
.smp-directory,
.smp-directory *,
.smp-directory *::before,
.smp-directory *::after { box-sizing: border-box; }

.smp-app [hidden],
.smp-directory [hidden] { display: none !important; }

.smp-app .screen-reader-text,
.smp-directory .screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
	white-space: nowrap; border: 0;
}

.smp-app {
	font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	color: #17231d;
	background: #f7f8f5;
	line-height: 1.6;
}

.smp-nav-inner, .smp-main { max-width: 1180px; margin: auto; }

/* Tabs ------------------------------------------------------------------ */
.smp-nav { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid #dfe4df; box-shadow: 0 2px 10px #0000000a; }
.smp-nav-inner { display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.smp-tab {
	border: 0; background: none; padding: 16px 14px; white-space: nowrap;
	font-family: inherit; font-size: 14px; line-height: 1.4; font-weight: 700;
	color: #526158; cursor: pointer; border-bottom: 3px solid transparent;
}
.smp-tab:hover { color: #4A9236; }
.smp-tab.active { color: #4A9236; border-bottom-color: #D4AE67; }
.smp-tab:focus-visible,
.smp-app a:focus-visible,
.smp-app button:focus-visible,
.smp-app input:focus-visible,
.smp-app select:focus-visible,
.smp-app textarea:focus-visible,
.smp-directory a:focus-visible { outline: 3px solid #D4AE67; outline-offset: 2px; }
.smp-panel:focus { outline: none; }

.smp-main { padding: 42px 24px 80px; background: #f7f8f5; }
.smp-panel { display: none; }
.smp-panel.active { display: block; }

/* Section headings ------------------------------------------------------ */
.smp-section-head { margin-bottom: 28px; }
.smp-section-head > span { color: #8F6F35; text-transform: uppercase; letter-spacing: .13em; font-size: var(--smp-caption-size, 11px); font-weight: 800; }
.smp-section-head h2 { font-family: Georgia, "Times New Roman", serif; font-size: var(--smp-title-size, 36px); margin: 5px 0 8px; color: #2F6124; }
.smp-section-head p { margin: 0; color: #5c6a63; }
.smp-section-head.compact { margin-top: 48px; }

.smp-about-grid, .smp-service-grid, .smp-doc-grid, .smp-project-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.smp-card { background: #fff; border: 1px solid #e1e6e1; border-radius: 12px; padding: 26px; box-shadow: 0 5px 20px #2F612408; }
.smp-lead { font-size: 20px; margin-top: 0; }
.smp-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-top: 28px; }
.smp-facts div { padding: 16px; background: #F3F7F0; border-radius: 8px; }
.smp-facts small, .smp-person span { display: block; text-transform: uppercase; letter-spacing: .08em; font-size: 10px; font-weight: 800; color: #5f6d66; }
.smp-facts strong { display: block; margin-top: 4px; }
.smp-highlight { background: #EDF5EA; color: #2F6124; border: 1px solid #C9DDBF; border-left: 5px solid #D4AE67; box-shadow: 0 8px 24px #2F612412; }
.smp-highlight span { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: #8F6F35; font-weight: 800; }
.smp-highlight h3 { font-family: Georgia, "Times New Roman", serif; font-size: 27px; font-weight: 600; margin: 10px 0; }

.smp-operation-list { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 42px; }
.smp-operation-list li { position: relative; break-inside: avoid; padding: 17px 0 17px 25px; border-bottom: 1px solid #dfe5df; font-size: 16px; font-weight: 600; color: #24352c; }
.smp-operation-list li::before { content: "•"; position: absolute; left: 2px; top: 13px; color: #8F6F35; font-size: 24px; line-height: 1; }

.smp-service-grid { grid-template-columns: repeat(3, 1fr); }
.smp-chip { display: inline-block; background: #EDF5EA; color: #4A9236; border-radius: 20px; padding: 4px 9px; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.smp-card h3 { margin: 10px 0 7px; }
.smp-card p { color: #5c6a63; }


/* Citizen feedback footer and modal ----------------------------------- */
.smp-citizen-footer { margin: 46px auto 0; max-width: 1180px; padding: 28px; background: #2F6124; color: #fff; border-radius: 14px; display: flex; align-items: stretch; justify-content: space-between; gap: 30px; box-shadow: 0 10px 28px #2F612418; border-top: 4px solid #D4AE67; }
.smp-footer-main { flex: 1 1 auto; display: grid; gap: 18px; }
.smp-footer-brand { display: grid; gap: 3px; }
.smp-footer-brand strong { font-size: 19px; }
.smp-footer-brand span, .smp-footer-action > span { color: #dce9e1; font-size: 13px; }
.smp-footer-contact { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; }
.smp-footer-contact span { display: grid; gap: 1px; color: #f1f5f1; font-size: 13px; }
.smp-footer-contact b { color: #D4AE67; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.smp-footer-contact a { color: #fff; text-decoration: none; }
.smp-footer-contact a:hover { color: #D4AE67; text-decoration: underline; }
.smp-footer-action { min-width: 285px; padding-left: 28px; border-left: 1px solid #ffffff2b; display: grid; align-content: center; gap: 5px; }
.smp-footer-action strong { font-size: 16px; }
.smp-feedback-trigger { border: 1px solid #D4AE67; background: #D4AE67; color: #17231d; border-radius: 7px; padding: 11px 17px; font: 700 14px/1.3 inherit; cursor: pointer; white-space: nowrap; }
.smp-feedback-trigger:hover { filter: brightness(.96); }
.smp-grievance-modal { position: fixed; inset: 0; z-index: 100000; display: grid; place-items: center; padding: 24px; background: #102018b8; overflow-y: auto; }
.smp-grievance-modal[hidden] { display: none !important; }
.smp-grievance-dialog { position: relative; width: min(1080px, 100%); max-height: calc(100vh - 48px); overflow-y: auto; background: #f7f8f5; border-radius: 16px; padding: 34px; box-shadow: 0 25px 70px #00000035; }
.smp-modal-close { position: sticky; float: right; top: 0; z-index: 2; width: 40px; height: 40px; border: 1px solid #dfe4df; border-radius: 50%; background: #fff; color: #2F6124; font-size: 27px; line-height: 1; cursor: pointer; }
.smp-grievance-dialog .smp-section-head { padding-right: 50px; }
.smp-grievance-dialog .smp-section-head h2 { margin-top: 4px; }
body.smp-modal-open { overflow: hidden; }
.smp-admin-settings { margin: 8px 0 24px; padding: 18px 20px; background: #f7f8f5; border: 1px solid #dfe5df; border-radius: 10px; }
.smp-admin-settings h3 { margin: 0 0 4px; }

/* People ---------------------------------------------------------------- */
.smp-people-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }
.smp-person { background: #fff; border: 1px solid #e1e6e1; border-radius: 12px; overflow: hidden; }
.smp-person > div { padding: 18px 20px; }
.smp-person h3 { margin: 4px 0; font-size: 18px; }
.smp-avatar { width: 100%; aspect-ratio: 3 / 4; height: auto; object-fit: cover; object-position: center top; display: block; background: #F3F7F0; }
.smp-placeholder { background: linear-gradient(135deg, #E3ECDD, #B8CBAF); display: grid; place-items: center; color: #46603B; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }

/* Documents ------------------------------------------------------------- */
.smp-doc-grid { grid-template-columns: repeat(2, 1fr); }
.smp-doc-cat ul { list-style: none; margin: 10px 0 0; padding: 0; }
.smp-doc-cat li { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0; border-top: 1px solid #e5e9e5; }
.smp-doc-cat li span:first-child { display: flex; flex-direction: column; }
.smp-doc-cat small { color: #6b766f; }
.smp-doc-cat a { color: #4A9236; font-weight: 800; }
.smp-unavailable { font-size: 12px; color: #7A6645; white-space: nowrap; }

/* Projects -------------------------------------------------------------- */
.smp-project-grid { grid-template-columns: repeat(3, 1fr); }
.smp-project { background: #fff; border: 1px solid #e1e6e1; border-radius: 12px; padding: 24px; }
.smp-project h3 { margin: 12px 0 6px; }
.smp-status { font-size: 10px; font-weight: 800; text-transform: uppercase; padding: 5px 9px; border-radius: 20px; background: #F1F4EF; }
.smp-status.ongoing { color: #4A9236; }
.smp-status.completed { color: #45584c; }
.smp-status.planned { color: #8F6F35; }
.smp-progress { height: 6px; background: #e5e9e5; border-radius: 6px; margin-top: 18px; overflow: hidden; }
.smp-progress i { display: block; height: 100%; background: #D4AE67; }
.smp-progress-label { display: block; margin-top: 6px; color: #5c6a63; font-size: 12px; }

.smp-empty { background: #fff; border: 1px dashed #cbd5cd; padding: 40px; border-radius: 12px; text-align: center; }

/* Announcements --------------------------------------------------------- */
.smp-news { display: grid; gap: 0; }
.smp-news article { background: #fff; border: 1px solid #e1e6e1; border-bottom: 0; padding: 24px; }
.smp-news article:last-child { border-bottom: 1px solid #e1e6e1; border-radius: 0 0 12px 12px; }
.smp-news article:first-child { border-radius: 12px 12px 0 0; }
.smp-news time { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: #8F6F35; }
.smp-news h3 { margin: 6px 0; }
.smp-news a { font-weight: 800; color: #4A9236; }

/* Grievances ------------------------------------------------------------ */
.smp-feedback-grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: 22px; align-items: start; }
.smp-feedback-form label, .smp-feedback-side label { display: block; font-weight: 700; font-size: 14px; color: #26362d; }
.smp-feedback-form input:not([type=checkbox]),
.smp-feedback-form select,
.smp-feedback-form textarea,
.smp-feedback-side input {
	width: 100%; margin-top: 7px; border: 1px solid #b9c5bd; border-radius: 8px;
	padding: 12px 13px; font: inherit; color: #17231d; background: #fff;
}
.smp-feedback-form textarea { resize: vertical; }
.smp-feedback-form p { margin: 0 0 14px; }
.smp-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.smp-optional { font-weight: 400; color: #6b766f; font-size: 11px; }
.smp-check { display: flex !important; gap: 9px; align-items: flex-start; margin: 14px 0; color: #3f4d45 !important; font-weight: 600 !important; }
.smp-check input { margin-top: 4px; }
.smp-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.smp-submit { border: 0; border-radius: 8px; background: #4A9236; color: #fff; padding: 12px 18px; font: inherit; font-weight: 800; cursor: pointer; }
.smp-submit:hover { background: #0a4a30; }
.smp-submit.secondary { margin-top: 10px; background: #2F6124; }
.smp-feedback-result { margin-top: 18px; padding: 16px 18px; border: 1px solid #C9DDBF; border-left: 4px solid #D4AE67; border-radius: 8px; background: #eef5ef; color: #2F6124; }
.smp-feedback-result.success { border-left-color: #4A9236; }
.smp-feedback-result.error { background: #fff4f2; border-color: #ead1cc; border-left-color: #a33b2b; }
.smp-feedback-result > div { margin-bottom: 10px; }
.smp-feedback-result span { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; color: #5f6d66; }
.smp-feedback-result strong { display: block; margin-top: 3px; }
.smp-feedback-result p { margin: 4px 0 0; }
.smp-response { padding-top: 10px; border-top: 1px solid #d7e2da; }
.smp-feedback-side hr { border: 0; border-top: 1px solid #e1e6e1; margin: 28px 0; }
.smp-feedback-side ol { padding-left: 20px; color: #5c6a63; }
.smp-feedback-side li { margin: 9px 0; }

/* Directory ------------------------------------------------------------- */
.smp-directory { max-width: 1180px; margin: 40px auto; padding: 0 24px; font-family: Inter, system-ui, -apple-system, sans-serif; }
.smp-directory-head { padding: 45px 0; }
.smp-directory-head span { font-size: 11px; text-transform: uppercase; letter-spacing: .13em; color: #8F6F35; font-weight: 800; }
.smp-directory-head h1 { font: 600 50px Georgia, "Times New Roman", serif; margin: 8px 0; color: #2F6124; }
.smp-directory-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.smp-directory-card { display: block; text-decoration: none; background: #fff; border: 1px solid #e1e6e1; border-radius: 12px; padding: 28px; color: #2F6124; transition: transform .2s, box-shadow .2s; }
.smp-directory-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px #2F612412; }
.smp-directory-accent { height: 5px; background: linear-gradient(90deg, #4A9236, #D4AE67); border-radius: 5px; }
.smp-mini-label { margin-top: 22px; font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: #5f6d66; font-weight: 800; }
.smp-directory-card h2 { font: 600 29px Georgia, "Times New Roman", serif; margin: 7px 0; }
.smp-directory-card p { color: #5c6a63; }
.smp-directory-card > span { font-weight: 800; color: #4A9236; }

/* Responsive ------------------------------------------------------------ */
@media (max-width: 900px) {
	.smp-service-grid, .smp-project-grid, .smp-people-grid, .smp-directory-grid { grid-template-columns: 1fr 1fr; }
	.smp-about-grid, .smp-doc-grid { grid-template-columns: 1fr; }
	
}

@media (max-width: 850px) {
	.smp-feedback-grid, .smp-form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 650px) {
	.smp-main { padding: 32px 16px 60px; }
	.smp-operation-grid, .smp-service-grid, .smp-project-grid, .smp-people-grid, .smp-directory-grid { grid-template-columns: 1fr; }
	.smp-section-head h2 { font-size: 28px; }
	.smp-avatar { aspect-ratio: 3 / 4; }
	.smp-doc-cat li { flex-direction: column; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
	.smp-directory-card { transition: none; }
	.smp-directory-card:hover { transform: none; }
}

/* Print: show every section, not just the open tab. */
@media print {
	.smp-nav { display: none; }
	.smp-panel { display: block !important; page-break-inside: avoid; }
	.smp-panel[hidden] { display: block !important; }
	.smp-feedback-form, .smp-feedback-side form { display: none; }
	.smp-app { background: #fff; }
	.smp-card, .smp-person, .smp-project { box-shadow: none; }
}

@media (max-width: 760px) {
	.smp-operation-list { columns: 1; }
	.smp-citizen-footer { align-items: flex-start; flex-direction: column; }
	.smp-footer-contact { grid-template-columns: 1fr; }
	.smp-footer-action { min-width: 0; padding-left: 0; padding-top: 20px; border-left: 0; border-top: 1px solid #ffffff2b; }
	.smp-feedback-trigger { width: 100%; }
	.smp-grievance-dialog { padding: 24px 18px; max-height: calc(100vh - 24px); }
}


/* Siaya brand refresh: green #4A9236 + gold #D4AE67 --------------------- */
.smp-nav {
	background: rgba(255,255,255,.97);
	border-bottom: 1px solid #D9E2D5;
	box-shadow: 0 8px 24px rgba(47,97,36,.08);
	backdrop-filter: blur(10px);
}
.smp-nav-inner {
	gap: 8px;
	padding: 10px 8px;
	align-items: stretch;
}
.smp-tab {
	position: relative;
	border: 1px solid transparent;
	border-radius: 10px;
	padding: 12px 16px;
	color: #52634D;
	background: transparent;
	transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.smp-tab::after {
	content: "";
	position: absolute;
	left: 16px;
	right: 16px;
	bottom: 5px;
	height: 3px;
	border-radius: 3px;
	background: #D4AE67;
	transform: scaleX(0);
	transform-origin: center;
	transition: transform .18s ease;
}
.smp-tab:hover {
	color: #2F6124;
	background: #F1F6EE;
	border-color: #DCE8D7;
	transform: translateY(-1px);
}
.smp-tab.active {
	color: #2F6124;
	background: linear-gradient(180deg, #F4F8F1 0%, #EAF3E6 100%);
	border-color: #CFE0C9;
	box-shadow: 0 4px 12px rgba(47,97,36,.08);
}
.smp-tab.active::after { transform: scaleX(1); }
.smp-tab:focus-visible { outline: 3px solid rgba(212,174,103,.55); outline-offset: 2px; }

.smp-section-head > span { color: #8F6F35; }
.smp-section-head h2 { color: #2F6124; }
.smp-card,
.smp-person,
.smp-project,
.smp-news article,
.smp-directory-card {
	border-color: #DCE5D8;
	box-shadow: 0 6px 22px rgba(47,97,36,.06);
}
.smp-card h3,
.smp-project h3,
.smp-news h3 { color: #2F6124; }
.smp-highlight {
	background: linear-gradient(135deg, #EDF5EA 0%, #F7F9F5 100%);
	border-left-color: #D4AE67;
}
.smp-citizen-footer {
	background: linear-gradient(135deg, #2F6124 0%, #4A9236 100%);
	border: 1px solid rgba(212,174,103,.42);
}
.smp-feedback-trigger {
	background: #D4AE67;
	border-color: #D4AE67;
	color: #24331F;
	box-shadow: 0 5px 14px rgba(0,0,0,.12);
}
.smp-feedback-trigger:hover { background: #DFC080; border-color: #DFC080; filter: none; }
.smp-submit { background: #4A9236; }
.smp-submit:hover { background: #3E7D2E; }
.smp-submit.secondary { background: #2F6124; }
.smp-progress i { background: #D4AE67; }
.smp-directory-accent { background: linear-gradient(90deg, #4A9236, #D4AE67); }
.smp-directory-card:hover { box-shadow: 0 14px 34px rgba(47,97,36,.12); }
.smp-directory-card > span,
.smp-directory-card h2 { color: #2F6124; }
.smp-service-grid .smp-card,
.smp-project-grid .smp-project { position: relative; overflow: hidden; }
.smp-service-grid .smp-card::before,
.smp-project-grid .smp-project::before {
	content: "";
	position: absolute;
	top: 0; left: 0; right: 0;
	height: 4px;
	background: linear-gradient(90deg, #4A9236 0 68%, #D4AE67 68% 100%);
}
@media (max-width: 760px) {
	.smp-nav-inner { padding: 8px; gap: 6px; }
	.smp-tab { padding: 11px 13px; font-size: 13px; }
	.smp-tab::after { left: 13px; right: 13px; }
}
