/*
Theme Name: Dow Bucks County FCU
Theme URI: https://www.dowbucksfcu.com
Author: Kahnnect IT
Author URI: https://kahnnect.com
Description: Block theme port of the Dow Bucks County Federal Credit Union website. Preserves the existing Bootstrap-based appearance with editable templates and parts.
Version: 1.0.4
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dowbucksfcu
Tags: block-themes, full-site-editing, custom-menu, custom-logo, translation-ready
*/

/* Theme stylesheet is intentionally thin; visual styles load from assets/css/style.css. */

/* Kill WordPress block-theme spacing that creates gaps around chrome + hero. */
.wp-site-blocks {
	padding: 0 !important;
	margin: 0;
}

.wp-site-blocks > * {
	margin-block-start: 0 !important;
	margin-block-end: 0 !important;
}

.wp-block-template-part,
.wp-block-group:not(.section-padding),
.wp-block-post-content,
main#content,
main.wp-block-group {
	margin: 0 !important;
	padding-block: 0 !important;
}

/* Keep design-system rhythm: 70px above/below page content (banner → content → footer). */
.wp-block-group.section-padding {
	padding-top: 70px !important;
	padding-bottom: 70px !important;
}

/* Flow/constrained layouts still inject sibling gaps via blockGap. */
.is-layout-flow > * + *,
.is-layout-constrained > * + *,
.wp-block-post-content.is-layout-flow > * + *,
.wp-block-post-content.is-layout-constrained > * + * {
	margin-block-start: 0 !important;
}

.alignfull {
	max-width: none;
	margin-left: 0;
	margin-right: 0;
}

/*
 * Bootstrap grid repair: WordPress wraps page HTML in .wp-block-post-content,
 * which sits between .row and the seeded col-* wrappers. Without column classes
 * on post-content, full-width pages shrink-wrap and sidebar pages double-apply
 * col-lg-8 max-width (~44% of the container). Templates put col-12 / col-lg-8
 * on post-content; neutralize nested column wrappers from seeded HTML.
 */
.section-padding > .container > .row > .wp-block-post-content {
	min-width: 0;
	box-sizing: border-box;
}

/* Fallback when templates lack Bootstrap column classes. */
.section-padding > .container > .row > .wp-block-post-content:not([class*="col-"]) {
	flex: 0 0 100%;
	max-width: 100%;
	width: 100%;
	padding-left: 15px;
	padding-right: 15px;
}

@media (min-width: 992px) {
	.section-padding > .container > .row > #sidebar + .wp-block-post-content:not([class*="col-"]) {
		flex: 0 0 66.666667%;
		max-width: 66.666667%;
	}
}

.wp-block-post-content > .col-12,
.wp-block-post-content > .col-lg-8,
.wp-block-post-content > #main-content,
.wp-block-post-content > [class*="col-"] {
	flex: none;
	max-width: 100%;
	width: 100%;
	padding-left: 0;
	padding-right: 0;
}

/* Nested Bootstrap containers inside page content lose the extra inset. */
.wp-block-post-content > .col-12 > .container,
.wp-block-post-content > .container,
.wp-block-post-content .ser-page-into > .container {
	max-width: none;
	width: 100%;
	padding-left: 0;
	padding-right: 0;
}

/* Keep header/footer chrome tight if a stray empty paragraph slips through. */
.wp-block-template-part > p:empty {
	display: none;
}

.main-header {
	margin: 0;
	padding: 0;
}

.main-header .top-area .routing-copy-link {
	line-height: 1;
	height: auto;
	vertical-align: middle;
}

/* Homepage hero should sit flush under the orange nav. */
.home .slider-section,
.home .wp-block-post-content > .slider-section:first-child,
.home .wp-block-post-content > *:first-child {
	margin-top: 0 !important;
}
