/*
Theme Name: Septima Widget demo
Template: twentytwentyfive
Description: Septima branding for the local Septima Widget for WordPress demo site. Child theme of Twenty Twenty-Five. Only used by testsite/, not part of the plugin.
Author: Septima P/S
Version: 1.0.0
Requires at least: 6.8
License: MIT
Text Domain: septima-widget-demo
*/

/* Colours and fonts are in theme.json; these rules mirror the Umbraco demo site. */
:root {
	--sw-brand: #107e65;
	--sw-brand-dark: #234a5d;
	--sw-brand-light: #f0f5ef;
	--sw-brand-grey: #c9d5c8;
	--sw-heading: #1d1e1f;
	--sw-muted: #5f6b66;
	--sw-bg: #f3f3f3;
	--sw-radius: 4px;
	--sw-shadow: 0 1px 4px rgba(29, 30, 31, 0.08);
}

.wp-site-blocks {
	padding: 0;
}

.wp-site-blocks > * {
	margin-block-start: 0;
}

img {
	max-width: 100%;
	height: auto;
}

/* Header */
.demo-banner {
	background: var(--sw-brand-dark);
	color: #fff;
	font-size: 0.9rem;
	padding: 0.45rem 1.25rem;
}

.demo-banner p {
	margin: 0;
}

.demo-banner a,
.demo-banner a:hover {
	color: #fff;
}

.site-header {
	background: var(--sw-brand);
	color: #fff;
	padding: 0 1.25rem;
}

.site-header .header-inner {
	min-height: 72px;
	gap: 1rem;
}

.site-header .logo {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	color: #fff;
	text-decoration: none;
}

.site-header .logo img {
	display: block;
	width: auto;
	height: 34px;
}

.site-header .logo-text {
	border-left: 1px solid rgba(255, 255, 255, 0.45);
	padding-left: 0.75rem;
	font-size: 1rem;
}

.site-header .main-nav {
	gap: 0.1rem;
	font-size: 0.95rem;
}

.site-header .main-nav .wp-block-navigation-item__content {
	display: block;
	padding: 0.5rem 0.7rem;
	color: #fff;
	text-decoration: none;
	border-bottom: 3px solid transparent;
}

.site-header .main-nav .wp-block-navigation-item__content:hover,
.site-header .main-nav .current-menu-item > .wp-block-navigation-item__content,
.site-header .main-nav .current-menu-ancestor > .wp-block-navigation-item__content {
	border-bottom-color: #fff;
	text-decoration: none;
}

.site-header .wp-block-navigation__responsive-container-open {
	color: #fff;
}

.site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	color: #fff;
}

/* Hero (front page) */
.hero {
	background: var(--sw-brand-light);
	border-bottom: 1px solid var(--sw-brand-grey);
	padding: 4.5rem 1.25rem 5.5rem;
}

.hero .hero-inner > :first-child {
	margin-top: 0;
}

.hero h1 {
	max-width: 20ch;
	margin: 0 0 1rem;
	font-size: clamp(2rem, 4vw, 3rem);
	line-height: 1.15;
}

.hero .lead {
	max-width: 60ch;
	font-size: 1.2rem;
}

/* Page header */
.page-header {
	background: var(--sw-brand-light);
	border-bottom: 1px solid var(--sw-brand-grey);
	padding: 2.5rem 1.25rem 2rem;
}

.page-header .wp-block-post-title {
	margin: 0.25rem 0 0.5rem;
}

.lead {
	margin: 0;
	color: var(--sw-muted);
	font-size: 1.15rem;
}

.breadcrumb {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	color: var(--sw-muted);
	font-size: 0.9rem;
}

.breadcrumb a {
	text-decoration: none;
}

.site-main {
	padding: 2.5rem 1.25rem 4rem;
}

/* Cards */
.cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 1.25rem;
	margin: 0 0 2.5rem;
}

.is-front > .wp-block-post-content {
	padding: 0 1.25rem 4rem;
}

.is-front .hero {
	margin-inline: -1.25rem;
}

.is-front .hero + .cards {
	position: relative;
	margin-top: -4.5rem;
}

.card {
	background: #fff;
	border-top: 4px solid var(--sw-brand);
	border-radius: var(--sw-radius);
	box-shadow: var(--sw-shadow);
	padding: 1.5rem;
	color: inherit;
	text-decoration: none;
	transition: transform 0.15s;
}

a.card {
	display: block;
}

.card:hover {
	transform: translateY(-3px);
}

.card h3 {
	margin-top: 0;
}

.card .more {
	color: var(--sw-brand);
	font-weight: 600;
}

/* Content with an optional sidebar */
.content-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: 2.5rem;
	align-items: start;
}

.content-grid:not(:has(> .sidebar)) {
	grid-template-columns: minmax(0, 1fr);
}

@media (max-width: 860px) {

	.content-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

.content-grid > * {
	margin: 0;
}

.page-body,
.sidebar {
	background: #fff;
	border-radius: var(--sw-radius);
	box-shadow: var(--sw-shadow);
}

.page-body {
	padding: 2rem;
}

.page-body > .wp-block-post-content > :first-child {
	margin-top: 0;
}

.page-body .cards {
	margin: 2rem 0 0;
}

.sidebar {
	padding: 1.5rem;
}

.sidebar h3 {
	margin-top: 0;
}

.subnav {
	list-style: none;
	margin: 0 0 1rem;
	padding: 0;
}

.subnav li {
	border-bottom: 1px solid var(--sw-brand-light);
	padding: 0.5rem 0;
}

.subnav a {
	text-decoration: none;
}

.subnav a.active {
	font-weight: 700;
}

/* Rich text */
.wp-block-post-content h2 {
	margin-top: 2rem;
}

.wp-block-post-content img {
	border: 1px solid var(--sw-brand-grey);
	border-radius: var(--sw-radius);
	box-shadow: var(--sw-shadow);
}

.wp-block-post-content table {
	width: 100%;
	margin: 1rem 0;
	border-collapse: collapse;
	font-size: 0.95rem;
}

.wp-block-post-content th,
.wp-block-post-content td {
	border-bottom: 1px solid var(--sw-brand-grey);
	padding: 0.5rem 0.65rem;
	text-align: left;
	vertical-align: top;
}

.wp-block-post-content th {
	background: var(--sw-brand-light);
}

.wp-block-post-content code {
	background: var(--sw-bg);
	border-radius: 3px;
	padding: 0.1rem 0.3rem;
	font-size: 0.9em;
}

.wp-block-post-content pre {
	overflow-x: auto;
	background: var(--sw-heading);
	color: #f3f3f3;
	border-radius: var(--sw-radius);
	padding: 1rem;
}

.wp-block-post-content pre code {
	background: none;
	padding: 0;
}

.wp-block-post-content blockquote {
	margin: 1rem 0;
	background: var(--sw-brand-light);
	border-left: 4px solid var(--sw-brand);
	padding: 0.75rem 1rem;
}

.wp-block-post-content .septima-widget {
	margin: 1.5rem 0;
	border-radius: var(--sw-radius);
	overflow: hidden;
}

/* Footer */
.site-footer {
	background: var(--sw-brand-dark);
	color: #e2ebee;
	padding: 3rem 1.25rem;
}

.site-footer a {
	color: #fff;
}

.site-footer .footer-inner {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 2rem;
}

.site-footer .footer-inner > * {
	margin: 0;
}

.site-footer .footer-logo {
	display: block;
	width: auto;
	height: 30px;
	margin-bottom: 0.75rem;
}

.site-footer strong {
	color: #fff;
	font-weight: 700;
}

.site-footer ul {
	list-style: none;
	margin: 0.5rem 0 0;
	padding: 0;
}
