/*
Theme Name: Cabanglasan
Theme URI: https://example.org
Author: Dominic A. Del Puerto
Description: The Municipality of Cabanglasan, Bukidnon, on the Ivosea theme. Colors and details follow the town's Ear of Corn Landmark: field green, corn gold and husk cream. Activating it sets up the branding, issuance types (ordinances, resolutions, executive orders, Ugnayan sa Cabanglasan, financial aid to barangays) and the About, Resources and Contact pages.
Template: ivosea
Requires at least: 7.0
Requires PHP: 8.1
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cabanglasan
*/

/*
 * Loaded after Ivosea's style.css. Colors come from theme.json and
 * Appearance → Branding; this file adds the corn details.
 */

:root {
	--cab-corn: #f2b51d;
	--cab-corn-deep: #d99a00;
	--cab-kernel: #ffd95a;
	--cab-husk: #efe4c8;
	--cab-husk-deep: #cdbb8e;
	/* A row of corn kernels, for bars and stripes. */
	--cab-kernels: radial-gradient(circle at 50% 50%, var(--cab-kernel) 0 1.7px, transparent 2.2px) 0 0 / 6px 6px, var(--cab-corn-deep);
	/* Ear of corn in its husk. */
	--cab-ear: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 64'%3E%3Cdefs%3E%3CclipPath id='c'%3E%3Cellipse cx='20' cy='24' rx='8.5' ry='21'/%3E%3C/clipPath%3E%3C/defs%3E%3Cellipse cx='20' cy='24' rx='8.5' ry='21' fill='%23F2B51D'/%3E%3Cg clip-path='url(%23c)' stroke='%23C98A00' stroke-width='1'%3E%3Cpath d='M15 0v48M20 0v48M25 0v48'/%3E%3Cpath d='M0 7h40M0 11h40M0 15h40M0 19h40M0 23h40M0 27h40M0 31h40M0 35h40M0 39h40M0 43h40'/%3E%3C/g%3E%3Cpath d='M20 62C10 58 4 46 4 30c4 9 8 16 13 22z' fill='%23E9DDB8' stroke='%23B9A36E'/%3E%3Cpath d='M20 62c10-4 16-16 16-32-4 9-8 16-13 22z' fill='%23E9DDB8' stroke='%23B9A36E'/%3E%3C/svg%3E");
}

/* Section titles: an ear of corn and a kernel bar instead of the plain bar. */
.is-style-section-title::after {
	width: 3.5rem;
	height: 8px;
	border-radius: 999px;
	background: var(--cab-kernels);
}

/* Top bar: a faint field of kernels. */
.ivo-topbar {
	background-image: radial-gradient(circle at 50% 50%, rgba(255, 199, 44, 0.12) 0 1.5px, transparent 2px);
	background-size: 9px 9px;
}

/* Masthead: husk cream fading in on the right, like the landmark's husk. */
.ivo-masthead {
	background-image: linear-gradient(100deg, transparent 55%, rgba(239, 228, 200, 0.55));
}

/* Menu bar: a band of corn gold underneath. */
.ivo-navbar {
	box-shadow: inset 0 -4px 0 var(--cab-corn), 0 2px 6px rgba(15, 61, 30, 0.2);
}

.ivo-main-menu .wp-block-navigation__submenu-container {
	border-top: 3px solid var(--cab-corn) !important;
}

/* Buttons turn corn gold on hover. */
.wp-element-button:hover,
.wp-block-button__link:hover {
	background-color: var(--cab-corn) !important;
	color: var(--wp--preset--color--night) !important;
}

/* Footer: kernel stripe on top, a faint ear of corn in the corner. */
.ivo-site-footer {
	position: relative;
	overflow: hidden;
	background-image: radial-gradient(circle at 50% 50%, rgba(255, 199, 44, 0.06) 0 1.5px, transparent 2px);
	background-size: 12px 12px;
}

.ivo-site-footer::before {
	content: "";
	position: absolute;
	inset: 0 0 auto;
	height: 6px;
	background: var(--cab-kernels);
}

.ivo-site-footer::after {
	content: "";
	position: absolute;
	right: max(1vw, 0.5rem);
	bottom: -3rem;
	width: 11rem;
	aspect-ratio: 40 / 64;
	background: var(--cab-ear) no-repeat center / contain;
	opacity: 0.12;
	transform: rotate(-14deg);
	pointer-events: none;
}

.ivo-site-footer > * {
	position: relative;
	z-index: 1;
}

@media (max-width: 781px) {
	.ivo-site-footer::after {
		width: 7rem;
	}
}

/* Pages: images with rounded corners, captions in muted text. */
.wp-block-image.alignwide img {
	border-radius: 12px;
}

/* Lists shown in columns (barangays, offices). */
.cab-columns {
	columns: 3 14rem;
	column-gap: 2rem;
}

.cab-columns > li {
	break-inside: avoid;
}

/* Organizational chart: the Mayor and Vice Mayor as cards, their offices under them. */
.cab-org-chart {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
	gap: var(--wp--preset--spacing--50);
	padding: 0;
	list-style: none;
}

.cab-org-chart > li {
	padding: var(--wp--preset--spacing--40);
	border-top: 6px solid var(--wp--preset--color--primary);
	border-radius: 10px;
	background: var(--wp--preset--color--surface);
}

.cab-org-chart > li > strong {
	display: block;
	margin-bottom: 0.75rem;
	font-size: 1.15em;
	color: var(--wp--preset--color--primary-dark);
}

.cab-org-chart > li > ul {
	margin: 0;
	padding-left: 1.1rem;
	border-left: 3px solid var(--cab-corn);
	list-style: none;
}

.cab-org-chart > li > ul > li {
	position: relative;
	padding: 0.2rem 0;
}

.cab-org-chart > li > ul > li::before {
	content: "";
	position: absolute;
	top: 0.85em;
	left: -1.1rem;
	width: 0.8rem;
	border-top: 2px solid var(--cab-corn);
}

/* Homepage welcome band (patterns/welcome.php). */
.cab-welcome {
	position: relative;
	min-height: clamp(22rem, 42vw, 32rem);
	border-radius: 0;
}

.cab-welcome .cab-welcome__eyebrow {
	margin: 0;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--cab-kernel);
}

.cab-welcome h2 {
	margin-top: 0.25rem;
	text-wrap: balance;
}

.cab-welcome h2::after {
	content: "";
	display: block;
	width: 4.5rem;
	height: 8px;
	margin-top: 0.6rem;
	border-radius: 999px;
	background: var(--cab-kernels);
}

.cab-welcome .wp-block-button__link {
	background: var(--cab-corn);
	color: var(--wp--preset--color--night);
}

.cab-welcome .is-style-outline .wp-block-button__link {
	border-color: currentColor;
	background: transparent;
	color: #fff;
}

.cab-welcome__credit {
	position: absolute;
	right: 0.75rem;
	bottom: 0.6rem;
	margin: 0;
	padding: 0.15rem 0.5rem;
	border-radius: 4px;
	background: rgba(11, 38, 20, 0.6);
	color: #fff;
	font-size: 0.7rem;
}

.cab-welcome__credit a {
	color: inherit;
}

/* At-a-glance figures under the welcome band. */
.cab-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
	gap: var(--wp--preset--spacing--40);
	margin: 0;
	padding: 0;
	list-style: none;
}

.cab-stats > li {
	padding: var(--wp--preset--spacing--40);
	border-radius: 10px;
	background: var(--wp--preset--color--surface);
	box-shadow: inset 0 -5px 0 var(--cab-corn);
}

.cab-stats strong {
	display: block;
	font-size: clamp(1.5rem, 2.6vw, 1.9rem);
	white-space: nowrap;
	line-height: 1.1;
	color: var(--wp--preset--color--primary-dark);
}

.cab-stats span {
	font-size: 0.9rem;
	color: var(--wp--preset--color--muted);
}

@media (max-width: 781px) {
	.cab-welcome__credit {
		position: static;
		display: inline-block;
		margin-top: var(--wp--preset--spacing--40);
	}
}
