/*
 * ChurchEZ — Main Stylesheet
 * All values driven by CSS custom properties set by the Customizer.
 * Defaults match Church Plus + common site customizations out of the box.
 */

/* ── Reset & Box Sizing ──────────────────────────────────────────────────────── */
*, *::before, *::after {
	box-sizing: border-box;
}

html {
	-ms-text-size-adjust: 100%;
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	padding: 0;
}

article, aside, details, figcaption, figure,
footer, header, main, nav, section, summary {
	display: block;
}

img, embed, iframe, object, video {
	max-width: 100%;
	height: auto;
}

/* ── CSS Variable Defaults ───────────────────────────────────────────────────── */
/* These are overridden by the inline style block generated from the Customizer. */
:root {
	--cz-primary:      #211b1a;
	--cz-secondary:    #050505;
	--cz-link:         #9aa32c;
	--cz-heading:      #000000;
	--cz-text:         #555555;
	--cz-content-bg:   #ffffff;
	--cz-nav-text:     #ffffff;
	--cz-footer-text:  #ffffff;
	--cz-body-font:    'Helvetica Neue', Helvetica, Arial, sans-serif;
	--cz-heading-font: 'Oswald', sans-serif;
	--cz-body-size:    16pt;
	--cz-body-lh:      1.1;
	--cz-heading-lh:   1.1;
	--cz-heading-wt:   800;
	--cz-para-margin:  10px;
	--cz-list-spacing: 8px;
	--cz-max-width:    1140px;
	--cz-content-w:    65.33%;
	--cz-sidebar-w:    30.67%;
	--cz-title-size:   28px;

	/* Header spacing */
	--cz-header-pad-top: 10px; --cz-header-pad-right: 30px; --cz-header-pad-bottom: 10px; --cz-header-pad-left: 30px;
	--cz-header-margin-top: 0; --cz-header-margin-right: 0; --cz-header-margin-bottom: 0; --cz-header-margin-left: 0;

	/* Content spacing */
	--cz-content-pad-top: 40px; --cz-content-pad-right: 30px; --cz-content-pad-bottom: 40px; --cz-content-pad-left: 30px;
	--cz-content-margin-top: 0; --cz-content-margin-right: 0; --cz-content-margin-bottom: 0; --cz-content-margin-left: 0;

	/* Top widget spacing */
	--cz-top-widget-pad-top: 30px; --cz-top-widget-pad-right: 30px; --cz-top-widget-pad-bottom: 30px; --cz-top-widget-pad-left: 30px;
	--cz-top-widget-margin-top: 0; --cz-top-widget-margin-right: 0; --cz-top-widget-margin-bottom: 0; --cz-top-widget-margin-left: 0;

	/* Bottom widget spacing */
	--cz-bottom-widget-pad-top: 30px; --cz-bottom-widget-pad-right: 30px; --cz-bottom-widget-pad-bottom: 30px; --cz-bottom-widget-pad-left: 30px;
	--cz-bottom-widget-margin-top: 0; --cz-bottom-widget-margin-right: 0; --cz-bottom-widget-margin-bottom: 0; --cz-bottom-widget-margin-left: 0;

	/* Footer widget spacing */
	--cz-footer-widget-pad-top: 20px; --cz-footer-widget-pad-right: 30px; --cz-footer-widget-pad-bottom: 20px; --cz-footer-widget-pad-left: 30px;
	--cz-footer-widget-margin-top: 0; --cz-footer-widget-margin-right: 0; --cz-footer-widget-margin-bottom: 0; --cz-footer-widget-margin-left: 0;

	/* Footer bar spacing */
	--cz-footer-pad-top: 10px; --cz-footer-pad-right: 30px; --cz-footer-pad-bottom: 10px; --cz-footer-pad-left: 30px;
	--cz-footer-margin-top: 0; --cz-footer-margin-right: 0; --cz-footer-margin-bottom: 0; --cz-footer-margin-left: 0;

	/* Nav link padding */
	--cz-nav-pad-top: 10px; --cz-nav-pad-bottom: 10px; --cz-nav-pad-sides: 16px;
	--cz-nav-margin-top: 0px; --cz-nav-margin-right: 0px; --cz-nav-margin-bottom: 0px; --cz-nav-margin-left: 0px;
	--cz-entry-margin-top: 0px; --cz-entry-margin-bottom: 40px;
	--cz-img-pad-top: 0px; --cz-img-pad-right: 0px; --cz-img-pad-bottom: 12px; --cz-img-pad-left: 0px;
	--cz-img-align-mg: 24px;
	--cz-feat-pad-top: 0px; --cz-feat-pad-right: 0px; --cz-feat-pad-bottom: 0px; --cz-feat-pad-left: 0px;
	--cz-feat-margin-top: 0px; --cz-feat-margin-right: 0px; --cz-feat-margin-bottom: 0px; --cz-feat-margin-left: 0px;
	--cz-banner-pad-top: 0px; --cz-banner-pad-right: 0px; --cz-banner-pad-bottom: 0px; --cz-banner-pad-left: 0px;
	--cz-banner-mar-top: 0px; --cz-banner-mar-right: 0px; --cz-banner-mar-bottom: 0px; --cz-banner-mar-left: 0px;
	--cz-banner-max-h: none;
}

/* ── Base Typography ─────────────────────────────────────────────────────────── */
body {
	color: var(--cz-text);
	font-family: var(--cz-body-font);
	font-size: var(--cz-body-size);
	font-weight: 300;
	line-height: var(--cz-body-lh);
}

h1, h2, h3, h4, h5, h6 {
	color: var(--cz-heading);
	font-family: var(--cz-heading-font);
	font-weight: var(--cz-heading-wt);
	line-height: var(--cz-heading-lh);
	margin: 0 0 15px;
	padding: 0;
}

h1 { font-size: 26px; }
h2 { font-size: 24px; }
h3 { font-size: 22px; }
h4 { font-size: 20px; }
h5 { font-size: 18px; }
h6 { font-size: 16px; }

p {
	margin: 0 0 var(--cz-para-margin);
	padding: 0;
}

a {
	color: var(--cz-link);
	text-decoration: none;
}

a:hover, a:focus {
	color: #000;
	text-decoration: none;
}

strong, b { font-weight: 700; }
em, i     { font-style: italic; }

/* Lists */
ul {
	list-style: disc outside;
	margin: 0 0 25px 48px;
	padding: 0;
}

ol {
	list-style-type: decimal;
	margin: 0 0 25px 20px;
	padding: 0;
}

ul li, ol li {
	margin-bottom: var(--cz-list-spacing);
	line-height: var(--cz-body-lh);
}

ul ul, ol ol, ul ol, ol ul {
	margin-bottom: 0;
}

/* Definition lists */
dl { margin: 0 0 25px 5px; }
dl dt { font-weight: bold; margin: 10px 0 0; }
dl dd { margin: 5px 0 0 24px; }

/* Blockquote */
blockquote {
	margin: 0;
	padding: 24px 40px;
	border-left: 4px solid var(--cz-primary);
	font-style: italic;
}

/* Code */
pre {
	background: #f9f9f9;
	overflow: auto;
	padding: 20px;
	white-space: pre-wrap;
	font-size: 14px;
}

code, kbd, samp {
	font-family: monospace, monospace;
	font-size: 0.9em;
}

/* Tables */
table {
	border: 1px solid #e5e5e5;
	border-collapse: collapse;
	border-spacing: 0;
	margin-bottom: 25px;
	width: 100%;
}

th, td {
	border-bottom: 1px solid #e5e5e5;
	border-right: 1px solid #e5e5e5;
	padding: 10px;
	text-align: left;
}

th {
	font-weight: 600;
}

/* HR */
hr {
	border: 0;
	border-top: 1px solid #e5e5e5;
	margin: 24px 0;
}

/* ── Structure ───────────────────────────────────────────────────────────────── */

.site-container {
	overflow: hidden;
}

.wrap {
	margin: 0 auto;
	max-width: var(--cz-max-width);
	position: relative;
}

/* Clearfix */
.wrap::after,
.site-header::after,
.site-inner .wrap::after,
.nav-primary::after {
	content: '';
	display: table;
	clear: both;
}

/* ── Site Header ─────────────────────────────────────────────────────────────── */
.site-header {
	padding:  var(--cz-header-pad-top)    var(--cz-header-pad-right)
	          var(--cz-header-pad-bottom) var(--cz-header-pad-left);
	margin:   var(--cz-header-margin-top)    var(--cz-header-margin-right)
	          var(--cz-header-margin-bottom) var(--cz-header-margin-left);
}

.site-header .wrap {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
}

/* ── Header column layout ─────────────────────────────────────────────────── */
/* The header .wrap is a flex row; each .header-col takes equal space.         */

.site-header .wrap {
	display:     flex;
	align-items: center;
	flex-wrap:   wrap;
	gap:         16px;
}

.header-col {
	flex:      1;
	min-width: 0; /* prevent overflow */
}

/* Logo column: left-aligned */
.header-col--logo {
	text-align: left;
}

/* Non-logo columns: right-aligned (mirrors Church Plus header-right behaviour) */
.header-col:not(.header-col--logo) {
	text-align: right;
}

/* Widgets inside a header column */
.header-col-widgets .widget {
	display:       inline-block;
	margin-bottom: 6px;
	text-align:    inherit;
}

.header-col-widgets .widget-title {
	font-size:     14px;
	margin-bottom: 4px;
}

.header-col-widgets .widget_search input.search-field {
	max-width: 260px;
}

/* Title area (logo / site name) */
.title-area {
	display: inline-block;
}

.site-title {
	font-family:    var(--cz-heading-font);
	font-size:      var(--cz-title-size);
	font-weight:    800;
	letter-spacing: -1px;
	line-height:    1;
	margin:         0;
}

.site-title a,
.site-title a:hover {
	color: var(--cz-primary);
}

.site-description {
	color:          var(--cz-primary);
	font-size:      14px;
	letter-spacing: 1px;
	margin:         2px 0 0;
}

/* Custom logo */
.custom-logo-link img {
	max-height: 100px;
	width:      auto;
	display:    block;
}

/* ── Navigation ──────────────────────────────────────────────────────────────── */
.nav-primary {
	background: var(--cz-primary);
	position: relative;
	z-index: 100;
	margin: var(--cz-nav-margin-top) var(--cz-nav-margin-right) var(--cz-nav-margin-bottom) var(--cz-nav-margin-left);
}

.nav-primary .wrap {
	position: relative;
}

/* Primary menu */
.churchez-nav-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
}

.churchez-nav-menu li {
	position: relative;
	margin: 0;
}

.churchez-nav-menu a {
	display: block;
	color: var(--cz-nav-text);
	padding: var(--cz-nav-pad-top) var(--cz-nav-pad-sides) var(--cz-nav-pad-bottom);
	font-family: var(--cz-heading-font);
	font-size: 14px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1px;
	white-space: nowrap;
	transition: background 0.15s;
}

.churchez-nav-menu a:hover,
.churchez-nav-menu .current-menu-item > a,
.churchez-nav-menu .current-menu-ancestor > a {
	background: var(--cz-secondary);
	color: var(--cz-nav-text);
}

/* Dropdown sub-menus */
.churchez-nav-menu .sub-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	background: var(--cz-primary);
	min-width: 200px;
	list-style: none;
	margin: 0;
	padding: 0;
	z-index: 200;
	box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.churchez-nav-menu li:hover > .sub-menu,
.churchez-nav-menu li.churchez-focus > .sub-menu {
	display: block;
}

.churchez-nav-menu .sub-menu a {
	padding: 12px 16px;
	font-size: 13px;
	white-space: normal;
}

.churchez-nav-menu .sub-menu .sub-menu {
	top: 0;
	left: 100%;
}

/* Mobile menu toggle */
.churchez-menu-toggle {
	display: none;
	background: var(--cz-primary);
	border: none;
	color: var(--cz-nav-text);
	cursor: pointer;
	font-family: var(--cz-heading-font);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 1px;
	padding: 12px 20px;
	text-transform: uppercase;
	width: 100%;
	text-align: left;
}

.churchez-menu-toggle::after {
	content: ' ☰';
	float: right;
}

/* ── Banner ───────────────────────────────────────────────────────────────────── */
.banner {
	clear:    both;
	position: relative;
	line-height: 1;
	padding:  var(--cz-banner-pad-top)    var(--cz-banner-pad-right)
	          var(--cz-banner-pad-bottom) var(--cz-banner-pad-left);
	margin:   var(--cz-banner-mar-top)    var(--cz-banner-mar-right)
	          var(--cz-banner-mar-bottom) var(--cz-banner-mar-left);
}

.banner .wrap {
	position: relative;
}

/* Full-width mode (default): image spans entire banner width */
.banner img.header-image,
.banner img.wp-post-image,
.banner img.churchez-featured-banner {
	display:   block;
	width:     100%;
	height:    auto;
	max-height: var(--cz-banner-max-h);
	object-fit: cover;
}

/* Contained mode: image constrained inside .wrap — set via Customizer */
.banner.churchez-banner-contained img.header-image,
.banner.churchez-banner-contained img.wp-post-image,
.banner.churchez-banner-contained img.churchez-featured-banner {
	max-width: 100%;
	width:     auto;
}

.banner-title {
	display:        block;
	color:          var(--cz-heading);
	font-family:    var(--cz-heading-font);
	font-size:      24px;
	font-weight:    800;
	line-height:    var(--cz-heading-lh);
	margin:         0;
	padding:        10px 0;
	text-transform: uppercase;
	background:     transparent;
}

/* ── Flexible Widget Areas (Top & Bottom Content, Footer) ────────────────────── */
.churchez-widget-area {
	clear: both;
}

/* Widget area padding is set per-area below */
.churchez-widget-area .wrap {
	padding: 30px;
}

.top-content-area {
	margin:  var(--cz-top-widget-margin-top)    var(--cz-top-widget-margin-right)
	         var(--cz-top-widget-margin-bottom) var(--cz-top-widget-margin-left);
}
.top-content-area .wrap {
	/* Background set by Widget Area Styles in Customizer */
	padding: var(--cz-top-widget-pad-top)    var(--cz-top-widget-pad-right)
	         var(--cz-top-widget-pad-bottom) var(--cz-top-widget-pad-left);
}

.bottom-content-area {
	margin:  var(--cz-bottom-widget-margin-top)    var(--cz-bottom-widget-margin-right)
	         var(--cz-bottom-widget-margin-bottom) var(--cz-bottom-widget-margin-left);
}
.bottom-content-area .wrap {
	/* Background set by Widget Area Styles in Customizer */
	padding: var(--cz-bottom-widget-pad-top)    var(--cz-bottom-widget-pad-right)
	         var(--cz-bottom-widget-pad-bottom) var(--cz-bottom-widget-pad-left);
}

.footer-widgets-area {
	margin:  var(--cz-footer-widget-margin-top)    var(--cz-footer-widget-margin-right)
	         var(--cz-footer-widget-margin-bottom) var(--cz-footer-widget-margin-left);
}
.footer-widgets-area .wrap {
	/* Background and color set by Widget Area Styles in Customizer */
	padding: var(--cz-footer-widget-pad-top)    var(--cz-footer-widget-pad-right)
	         var(--cz-footer-widget-pad-bottom) var(--cz-footer-widget-pad-left);
}

/* Footer widget text/link colors set by Widget Area Styles in Customizer */
.footer-widgets-area li {
	color: inherit;
}

/* Widget row — each .churchez-widget-col is one registered sidebar area.
   Columns are addressed individually in Appearance → Widgets. */
.churchez-widget-row {
	display:   flex;
	flex-wrap: wrap;
	gap:       2%;
}

/* Each column takes equal width by default */
.churchez-widget-col {
	flex:       1 1 0;
	min-width:  0;
}

/* Column count overrides — explicit widths prevent rounding drift */
.churchez-cols-1 .churchez-widget-col { flex: 0 0 100%;                   max-width: 100%;                  }
.churchez-cols-2 .churchez-widget-col { flex: 0 0 calc(50% - 1%);        max-width: calc(50% - 1%);       }
.churchez-cols-3 .churchez-widget-col { flex: 0 0 calc(33.33% - 1.34%);  max-width: calc(33.33% - 1.34%); }
.churchez-cols-4 .churchez-widget-col { flex: 0 0 calc(25% - 1.5%);      max-width: calc(25% - 1.5%);     }

/* Widgets inside a column */
.churchez-widget-col .widget {
	margin-bottom: 24px;
}

.churchez-widget-col .widget:last-child {
	margin-bottom: 0;
}

/* Widget titles */
.widget-title {
	font-family: var(--cz-heading-font);
	font-size: 18px;
	font-weight: 700;
	margin-bottom: 12px;
	word-wrap: break-word;
}

.widget ul {
	margin: 0;
	padding-left: 20px;
	list-style: disc;
}

.widget ul li {
	margin-bottom: var(--cz-list-spacing);
}

.widget p:last-child {
	margin-bottom: 0;
}

/* ── Site Inner (Content + Sidebar) ─────────────────────────────────────────── */
.site-inner {
	clear: both;
}

.site-inner .wrap {
	background: var(--cz-content-bg);
	padding:    var(--cz-content-pad-top)    var(--cz-content-pad-right)
	            var(--cz-content-pad-bottom) var(--cz-content-pad-left);
	margin:     var(--cz-content-margin-top)    var(--cz-content-margin-right)
	            var(--cz-content-margin-bottom) var(--cz-content-margin-left);
}

/* Default: content left, sidebar right */
.content {
	float: left;
	width: var(--cz-content-w);
}

.sidebar-primary {
	float: right;
	width: var(--cz-sidebar-w);
}

/* Left sidebar template */
.page-template-page-left-sidebar .content {
	float: right;
}

.page-template-page-left-sidebar .sidebar-primary {
	float: left;
}

/* Full width template */
.page-template-page-full-width .content {
	float: none;
	width: 100%;
}

/* ── Content / Entries ───────────────────────────────────────────────────────── */
.entry, .hentry {
	margin-top:    var(--cz-entry-margin-top);
	margin-bottom: var(--cz-entry-margin-bottom);
	background:    var(--cz-content-bg);
}

.entry-title {
	font-size: 26px;
	word-wrap: break-word;
	margin-bottom: 10px;
}

.entry-title a {
	color: var(--cz-heading);
}

.entry-title a:hover {
	color: var(--cz-link);
}

.entry-content {
	word-wrap: break-word;
}

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

/* ── Featured image (banner area) ───────────────────────────────────────────── */
/* Featured images use the churchez-banner size (full-width) in the banner area
   and churchez-content size (~740px) when shown inside content columns. */

.banner img.churchez-featured-banner,
.banner .wp-post-image {
	width:   100%;
	height:  auto;
	display: block;
	padding: var(--cz-feat-pad-top)    var(--cz-feat-pad-right)
	         var(--cz-feat-pad-bottom) var(--cz-feat-pad-left);
	margin:  var(--cz-feat-margin-top)    var(--cz-feat-margin-right)
	         var(--cz-feat-margin-bottom) var(--cz-feat-margin-left);
}

/* Featured image inside the content area (when feat_in_banner is off) */
.entry-content .churchez-featured-banner,
.entry-thumbnail img {
	max-width: 100%;
	height:    auto;
	display:   block;
	margin-bottom: var(--cz-feat-margin-bottom, 16px);
}

/* ── Content image padding ───────────────────────────────────────────────── */
.entry-content img,
.entry-content .wp-caption img {
	padding: var(--cz-img-pad-top) var(--cz-img-pad-right)
	         var(--cz-img-pad-bottom) var(--cz-img-pad-left);
}

.entry-content img.alignleft,
.entry-content .wp-caption.alignleft {
	float:  left;
	margin: 0 var(--cz-img-align-mg) var(--cz-img-align-mg) 0;
}

.entry-content img.alignright,
.entry-content .wp-caption.alignright {
	float:  right;
	margin: 0 0 var(--cz-img-align-mg) var(--cz-img-align-mg);
}

.entry-content img.aligncenter,
.aligncenter {
	display: block;
	margin:  0 auto var(--cz-img-align-mg);
}

.wp-caption-text {
	font-size: 13px;
	font-style: italic;
	text-align: center;
	margin: 4px 0 0;
}

.entry-meta {
	clear: both;
	font-size: 13px;
	color: #888;
	margin-bottom: 16px;
}

.entry-footer .entry-meta {
	margin-top: 16px;
	padding-top: 8px;
	border-top: 1px solid #f0f0f0;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────────── */
.sidebar .widget {
	margin-bottom: 10px;
}

.sidebar .widget-title {
	font-size: 18px;
}

.sidebar ul {
	padding-left: 20px;
	margin: 0;
	list-style: disc;
}

.sidebar ul li {
	list-style-type: square;
	margin-bottom: var(--cz-list-spacing);
	font-size: var(--cz-body-size);
	line-height: var(--cz-body-lh);
	word-wrap: break-word;
}

.sidebar .widget p {
	font-size: var(--cz-body-size);
	line-height: var(--cz-body-lh);
}

/* ── Navigation / Pagination ─────────────────────────────────────────────────── */
.navigation {
	clear: both;
	overflow: hidden;
	margin: 32px 0;
}

.nav-links {
	display: flex;
	justify-content: space-between;
	gap: 12px;
}

.nav-links a {
	background: var(--cz-primary);
	color: #fff;
	padding: 8px 16px;
	border-radius: 3px;
	font-size: 14px;
}

.nav-links a:hover {
	background: var(--cz-secondary);
	color: #fff;
}

.pagination {
	text-align: center;
	margin: 32px 0;
}

.pagination .page-numbers {
	display: inline-block;
	padding: 8px 12px;
	border: 1px solid #e5e5e5;
	margin: 0 2px;
	font-size: 14px;
}

.pagination .current {
	background: var(--cz-primary);
	color: #fff;
	border-color: var(--cz-primary);
}

.pagination a.page-numbers:hover {
	background: var(--cz-secondary);
	color: #fff;
	border-color: var(--cz-secondary);
}

/* ── Comments ────────────────────────────────────────────────────────────────── */
.entry-comments,
#respond {
	margin-bottom: 40px;
}

.comment-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.comment-list li {
	list-style: none;
}

.comment-item {
	background: #f9f9f9;
	margin: 12px 0;
	padding: 24px;
}

.comment-author {
	margin-bottom: 8px;
	font-weight: 700;
}

.comment-metadata {
	font-size: 13px;
	color: #888;
	margin-bottom: 12px;
}

.comment-content p:last-child {
	margin-bottom: 0;
}

.comment .reply {
	margin-top: 8px;
}

.comment .reply a {
	font-size: 13px;
	font-weight: 700;
}

.children {
	list-style: none;
	margin-left: 40px;
	padding: 0;
}

#respond {
	background: #f9f9f9;
	padding: 24px;
}

#respond label {
	display: block;
	font-weight: 700;
	margin-bottom: 4px;
}

#respond input[type="text"],
#respond input[type="email"],
#respond input[type="url"] {
	width: 50%;
}

#respond textarea {
	width: 100%;
}

/* ── Forms ───────────────────────────────────────────────────────────────────── */
input,
select,
textarea {
	border: 1px solid #ccc;
	font-family: var(--cz-body-font);
	font-size: 14px;
	padding: 10px 12px;
	max-width: 100%;
	border-radius: 0;
}

input:focus,
textarea:focus,
select:focus {
	border-color: var(--cz-primary);
	outline: none;
}

button,
input[type="button"],
input[type="reset"],
input[type="submit"] {
	background: var(--cz-primary);
	border: none;
	color: #fff;
	cursor: pointer;
	font-family: var(--cz-heading-font);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 1px;
	padding: 12px 24px;
	text-transform: uppercase;
	transition: opacity 0.15s;
}

button:hover,
input[type="button"]:hover,
input[type="reset"]:hover,
input[type="submit"]:hover {
	opacity: 0.88;
}

/* Search form */
.search-form {
	display: flex;
	gap: 0;
}

.search-form input[type="search"] {
	flex: 1;
}

.search-form input[type="submit"] {
	flex-shrink: 0;
}

/* ── Site Footer ──────────────────────────────────────────────────────────────── */
.site-footer {
	background: var(--cz-secondary);
	color: #eaeaea;
	font-size: 14px;
	text-align: center;
}

.site-footer {
	margin:  var(--cz-footer-margin-top)    var(--cz-footer-margin-right)
	         var(--cz-footer-margin-bottom) var(--cz-footer-margin-left);
}
.site-footer .wrap {
	padding: var(--cz-footer-pad-top)    var(--cz-footer-pad-right)
	         var(--cz-footer-pad-bottom) var(--cz-footer-pad-left);
}

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

.site-footer p {
	margin: 0;
	display: inline-block;
	color: #eaeaea;
}

/* ── WordPress Image Alignment ───────────────────────────────────────────────── */
.alignleft  { float: left;  text-align: left;  }
.alignright { float: right; text-align: right; }
.alignnone  { display: block; }

img.alignleft  { margin: 0 var(--cz-img-align-mg) var(--cz-img-align-mg) 0; }
img.alignright { margin: 0 0 var(--cz-img-align-mg) var(--cz-img-align-mg); }

/* ── Archive / Search ────────────────────────────────────────────────────────── */
.archive-title,
.search-title {
	font-size: 20px;
	margin-bottom: 24px;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--cz-primary);
}

/* ── 404 ─────────────────────────────────────────────────────────────────────── */
.error404 .entry-content {
	text-align: center;
	padding: 40px 0;
}

/* ── Sticky Posts ────────────────────────────────────────────────────────────── */
.sticky {
	padding: 24px;
	background: #fafafa;
	border-left: 4px solid var(--cz-primary);
}

/* ── Accessibility ───────────────────────────────────────────────────────────── */
.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	height: 1px;
	overflow: hidden;
	position: absolute !important;
	width: 1px;
}

.skip-link {
	background: var(--cz-primary);
	color: #fff;
	left: -999px;
	padding: 8px 16px;
	position: absolute;
	top: 8px;
	z-index: 9999;
}

.skip-link:focus {
	left: 8px;
}

/* ── Responsive ──────────────────────────────────────────────────────────────── */

/* Tablet */
@media only screen and (max-width: 1200px) {
	/* The .wrap max-width handles containment — no padding overrides needed.
	   Horizontal padding is controlled exclusively by the Customizer spacing settings. */
	.wrap {
		max-width: 100%;
	}
}

/* Mobile */
@media only screen and (max-width: 768px) {

	/* Navigation */
	.churchez-menu-toggle {
		display: block;
	}

	.churchez-nav-menu {
		display: none;
		flex-direction: column;
	}

	.churchez-nav-menu.churchez-menu-open {
		display: flex;
	}

	.churchez-nav-menu li {
		width: 100%;
		border-top: 1px solid rgba(255,255,255,0.1);
	}

	.churchez-nav-menu a {
		white-space: normal;
	}

	.churchez-nav-menu .sub-menu {
		display: none;
		position: static;
		box-shadow: none;
		padding-left: 20px;
		background: var(--cz-secondary);
	}

	.churchez-nav-menu li.churchez-focus > .sub-menu,
	.churchez-nav-menu li:hover > .sub-menu {
		display: block;
	}

	/* Layout: stack content and sidebar */
	.content,
	.sidebar-primary,
	.page-template-page-left-sidebar .content,
	.page-template-page-left-sidebar .sidebar-primary {
		float: none;
		width: 100%;
	}

	.sidebar-primary {
		border-top: 1px solid #f0f0f0;
		padding-top: 30px;
		margin-top: 20px;
	}

	/* Header — stack all columns on mobile */
	.header-col {
		flex: 0 0 100%;
		max-width: 100%;
		text-align: left !important;
	}

	/* Widget areas: single column */
	.churchez-widget-col {
		flex: 0 0 100% !important;
		max-width: 100% !important;
	}

	/* Footer: on mobile the right/left padding halves if > 20px to prevent overflow */
	.site-footer .wrap {
		padding-top:    var(--cz-footer-pad-top);
		padding-bottom: var(--cz-footer-pad-bottom);
		padding-left:   max(12px, var(--cz-footer-pad-left));
		padding-right:  max(12px, var(--cz-footer-pad-right));
	}

	/* Banner title */
	.banner-title {
		font-size: 20px;
	}

	/* Wider inputs in comments */
	#respond input[type="text"],
	#respond input[type="email"],
	#respond input[type="url"] {
		width: 100%;
	}
}

/* Tablet mid-range: 2-col footer still makes sense */
@media only screen and (min-width: 481px) and (max-width: 768px) {
	.churchez-cols-3 .churchez-widget-col,
	.churchez-cols-4 .churchez-widget-col {
		flex: 0 0 calc(50% - 1%) !important;
		max-width: calc(50% - 1%) !important;
	}
}

/* ── WP Calendar Widget ──────────────────────────────────────────────────────── */
.widget_calendar table { width: 100%; }
.widget_calendar th    { text-align: center; font-weight: bold; }
.widget_calendar td    { text-align: center; }

/* ── Recent Posts date ───────────────────────────────────────────────────────── */
.widget_recent_entries .post-date {
	display: block;
	font-size: 12px;
	color: #888;
}

/* ── FitVids (responsive video) ──────────────────────────────────────────────── */
.fluid-width-video-wrapper {
	width: 100%;
	position: relative;
	padding: 0;
}

.fluid-width-video-wrapper iframe,
.fluid-width-video-wrapper object,
.fluid-width-video-wrapper embed {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

/* ── Author archive ──────────────────────────────────────────────────────────── */
.author-header {
	display:     flex;
	align-items: flex-start;
	gap:         20px;
	margin-bottom: 32px;
	padding-bottom: 24px;
	border-bottom: 2px solid var(--cz-primary);
}

.author-avatar img {
	border-radius: 50%;
	display: block;
}

.author-info .archive-title {
	margin-bottom: 8px;
	border: none;
	padding: 0;
}

.author-bio {
	font-size: 14px;
	color: #666;
	margin: 0;
}

/* ── Archive header shared styles ────────────────────────────────────────────── */
.archive-header {
	margin-bottom: 28px;
}

.archive-title {
	font-size:     22px;
	margin-bottom: 8px;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--cz-primary);
}

.archive-description {
	font-size: 15px;
	color: #666;
	margin-top: 8px;
}
