/*
Theme Name: The Bridge Saundersfoot
Theme URI: https://thebridgesaundersfoot.org
Author: Gareth Mac
Author URI: https://g-mac.uk
Description: Bespoke WordPress block theme for The Bridge Saundersfoot community church.
Version: 1.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: the-bridge-saundersfoot
Tags: full-site-editing, block-theme
Tested up to: 6.7
Requires PHP: 7.4

Copyright (C) 2026 The Bridge Saundersfoot
*/


/* ============================================================
   HEADER — sticky + frosted glass
   ============================================================ */

header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 999;
}

/* Pseudo-element carries backdrop-filter so it doesn't clip the fixed nav overlay */
header.wp-block-template-part::before {
	content: '';
	position: absolute;
	inset: 0;
	background: rgba(255, 255, 255, 0.72);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border-bottom: 1px solid rgba(238, 238, 238, 0.6);
	z-index: -1;
}

header.wp-block-group {
	padding-left: 2rem !important;
	padding-right: 2rem !important;
}


/* ============================================================
   NAVIGATION
   ============================================================ */

.wp-block-navigation .wp-block-navigation__container {
	gap: 2.5rem;
}

.wp-block-navigation a {
	color: #333333 !important;
	text-decoration: none;
	font-size: 0.9375rem;
	font-weight: 500;
	transition: color 0.2s;
}

.wp-block-navigation a:hover {
	color: #4A5DB0 !important;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.wp-block-navigation .current-menu-item a,
.wp-block-navigation .current-page-ancestor a {
	color: #4A5DB0 !important;
	font-weight: 600;
}

/* Responsive nav — single breakpoint at 768px */
@media (max-width: 768px) {
	.wp-block-navigation__responsive-container-open {
		display: flex !important;
		z-index: 100000;
	}
	.wp-block-navigation > ul.wp-block-navigation__container {
		display: none !important;
	}
}

@media (min-width: 769px) {
	.wp-block-navigation__responsive-container-open {
		display: none !important;
	}
}

.wp-block-navigation__responsive-container.is-menu-open {
	z-index: 100000;
	background: rgba(255, 255, 255, 0.75) !important;
	backdrop-filter: blur(12px) !important;
	-webkit-backdrop-filter: blur(12px) !important;
}

.wp-block-navigation__responsive-dialog {
	padding: 1.5rem 2rem;
}


/* ============================================================
   HERO SECTION — cover block + circular overlay
   ============================================================ */

/* Pull hero behind sticky header so frosted glass shows on load */
main.wp-block-group > .wp-block-cover {
	margin-top: -110px;
}

.wp-block-cover__inner-container {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	padding-top: 110px;
}

.bridge-hero-circle {
	position: static !important;
	transform: none !important;
	width: 340px;
	height: 340px;
	background: rgba(74, 93, 176, 0.92);
	border-radius: 50%;
	display: flex !important;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 2rem;
	box-sizing: border-box;
	flex-shrink: 0;
}

.bridge-hero-circle .wp-block-heading,
.bridge-hero-circle h1 {
	font-size: 2rem;
	font-weight: 700;
	line-height: 1.2;
	margin: 0 0 0.75rem;
	color: #ffffff !important;
}

.bridge-hero-circle p {
	font-size: 0.9rem;
	margin: 0 0 1.25rem;
	color: rgba(255, 255, 255, 0.9) !important;
}

@media (max-width: 600px) {
	.bridge-hero-circle {
		width: 260px;
		height: 260px;
	}
	.bridge-hero-circle .wp-block-heading,
	.bridge-hero-circle h1 {
		font-size: 1.4rem;
	}
}


/* ============================================================
   BUTTONS
   ============================================================ */

.bridge-btn,
.wp-block-button__link {
	background: #4A5DB0;
	color: #ffffff;
	border-radius: 2rem;
	border: none;
	padding: 0.6rem 1.75rem;
	font-weight: 600;
	font-size: 0.9375rem;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.bridge-btn:hover,
.wp-block-button__link:hover {
	background: #2c3e7a;
	color: #ffffff;
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

/* Hero circle button — solid white at rest, inverts on hover */
.bridge-hero-circle .wp-block-button__link {
	background: #ffffff !important;
	border: 2px solid #ffffff !important;
	border-radius: 2rem;
	color: #4A5DB0 !important;
	padding: 0.5rem 1.5rem;
	font-size: 0.875rem;
	font-weight: 600;
}

.bridge-hero-circle .wp-block-button__link:hover {
	background: transparent !important;
	color: #ffffff !important;
	box-shadow: none !important;
}


/* ============================================================
   DECORATIVE SECTION HEADINGS  (—— Heading ——)
   ============================================================ */

.bridge-section-heading {
	display: flex;
	align-items: center;
	gap: 1rem;
	justify-content: center;
	text-align: center;
}

.bridge-section-heading::before,
.bridge-section-heading::after {
	content: "";
	flex: 1;
	height: 1px;
	background: #cccccc;
	max-width: 200px;
}


/* ============================================================
   CONTENT LAYOUT — breathing room inside alignfull sections
   ============================================================ */

.wp-block-group.alignfull > .wp-block-heading,
.wp-block-group.alignfull > .wp-block-paragraph,
.wp-block-group.alignfull > .wp-block-columns,
.wp-block-group.alignfull > .wp-block-buttons,
.wp-block-group.alignfull > .wp-block-image,
.wp-block-group.alignfull > .wp-block-list {
	padding-left: 1.5rem;
	padding-right: 1.5rem;
	box-sizing: border-box;
}

/* Reset inside columns — the columns container provides the padding */
.wp-block-column .wp-block-heading,
.wp-block-column .wp-block-paragraph,
.wp-block-column .wp-block-list,
.wp-block-column .wp-block-buttons {
	padding-left: 0 !important;
	padding-right: 0 !important;
}

/* Mobile — map full-width, stack columns, breathing room */
@media (max-width: 768px) {
	.bridge-map-section iframe {
		width: 100%;
	}
	.wp-block-columns {
		flex-direction: column !important;
		padding-left: 1rem !important;
		padding-right: 1rem !important;
		box-sizing: border-box;
	}
	.wp-block-column {
		flex-basis: 100% !important;
		width: 100% !important;
		max-width: 100% !important;
	}
	.wp-block-paragraph,
	.wp-block-heading,
	.wp-block-list,
	.wp-block-buttons {
		padding-left: 1rem !important;
		padding-right: 1rem !important;
		box-sizing: border-box;
	}
	.wp-block-column .wp-block-paragraph,
	.wp-block-column .wp-block-heading,
	.wp-block-column .wp-block-list,
	.wp-block-column .wp-block-buttons,
	.bridge-hero-circle .wp-block-paragraph,
	.bridge-hero-circle .wp-block-heading {
		padding-left: 0 !important;
		padding-right: 0 !important;
	}
}


/* ============================================================
   MAP SECTION
   ============================================================ */

.bridge-map-section iframe {
	width: 90%;
	margin: 0 auto;
	display: block;
}


/* ============================================================
   MARQUEE — scrolling banner
   ============================================================ */

.bridge-marquee-wrap {
	background: #2c3e7a;
	padding: 1rem 0;
	overflow: hidden;
	white-space: nowrap;
}

.bridge-marquee-track {
	display: inline-block;
	animation: bridge-marquee 20s linear infinite;
}

.bridge-marquee-track span {
	color: #ffffff;
	font-size: 1.125rem;
	font-weight: 600;
	padding: 0 3rem;
}

@keyframes bridge-marquee {
	0%   { transform: translateX(0); }
	100% { transform: translateX(-50%); }
}


/* ============================================================
   IMAGE CARDS WITH TEXT OVERLAY (Generosity page)
   ============================================================ */

.bridge-card {
	position: relative;
	overflow: hidden;
	border-radius: 4px;
}

.bridge-card img {
	width: 100%;
	display: block;
	object-fit: cover;
}

.bridge-card-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: 1.5rem;
	color: #ffffff;
}

.bridge-card-overlay h3 {
	font-size: 1.25rem;
	font-weight: 700;
	margin: 0 0 0.5rem;
	color: #ffffff;
}

.bridge-card-overlay p {
	font-size: 0.875rem;
	margin: 0;
	color: rgba(255, 255, 255, 0.9);
}
