/*
Theme Name: WOH Caloocan
Theme URI: https://wohcaloocan.org
Author: Word of Hope Caloocan
Author URI: https://wohcaloocan.org
Description: A minimalistic Full Site Editing block theme for Word of Hope Caloocan church. Built with core WordPress blocks, compatible with Kadence Blocks and Gutenberg.
Requires at least: 6.7
Tested up to: 6.9
Requires PHP: 7.4
Version: 1.0.5
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: woh-caloocan
Tags: full-site-editing, block-patterns, custom-colors, custom-menu, custom-logo, one-column, wide-blocks, accessibility-ready
*/

/* Remove the 24px block-gap margin WordPress injects between full-width homepage sections */
main.wp-block-group.is-layout-flow > * + * {
	margin-block-start: 0;
}

/* === V2 Dark Template Styles === */

/* "— ABOUT THE CHURCH —" decorative heading with flanking lines */
.woh-v2-divider-heading {
	display: flex !important;
	align-items: center;
	gap: 2rem;
	width: 100%;
}
.woh-v2-divider-heading::before,
.woh-v2-divider-heading::after {
	content: '';
	flex: 1;
	height: 1px;
	background: rgba(255, 255, 255, 0.15);
	min-width: 40px;
}

/* "OUR MINISTRIES ——" heading with right-side line */
.woh-v2-section-title {
	display: flex !important;
	align-items: center;
	gap: 2rem;
	width: 100%;
}
.woh-v2-section-title::after {
	content: '';
	flex: 1;
	height: 2px;
	background: rgba(255, 255, 255, 0.1);
}

/* Ministry cards hover highlight */
.woh-v2-card {
	transition: border-color 0.25s ease;
}
.woh-v2-card:hover {
	border-color: rgba(201, 168, 76, 0.4) !important;
}

/* === V2 Design Enhancements === */

/* 1. Gradient H1 text: gold → white → gold */
.woh-v2-hero-title {
	background: linear-gradient(90deg, #c9a84c 0%, #ffffff 45%, #c9a84c 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	color: transparent !important;
}

/* 2. Radial spotlight glow behind hero content */
.woh-v2-hero-content {
	position: relative;
}
.woh-v2-hero-content::before {
	content: '';
	position: absolute;
	top: 40%; left: 10%;
	width: 600px; height: 400px;
	background: radial-gradient(ellipse, rgba(201, 168, 76, 0.07) 0%, transparent 70%);
	pointer-events: none;
	z-index: 0;
}

/* 3. Glassmorphism service highlight strip */
.woh-v2-glass-strip {
	background: linear-gradient(to right, #0a0e17, #111521) !important;
	border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
}
.woh-v2-glass-card {
	background: rgba(255, 255, 255, 0.04) !important;
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 1px solid rgba(255, 255, 255, 0.08) !important;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.woh-v2-glass-card.woh-v2-gold-card {
	background: #c9a84c !important;
	box-shadow: 0 4px 24px rgba(201, 168, 76, 0.3);
}

/* 4. Gold gradient flanking lines on divider heading */
.woh-v2-divider-heading::before,
.woh-v2-divider-heading::after {
	background: linear-gradient(to right, transparent, rgba(201, 168, 76, 0.4), transparent) !important;
}

/* 5. About section: gradient bg + timeline gold accent bars */
.woh-v2-about-section {
	background: linear-gradient(180deg, #0d1117 0%, #0d1a2e 100%) !important;
}
.woh-v2-timeline-row {
	border-left: 3px solid rgba(201, 168, 76, 0.25) !important;
	padding-left: 1.25rem !important;
	transition: border-left-color 0.2s;
}
.woh-v2-timeline-row:hover {
	border-left-color: rgba(201, 168, 76, 0.65) !important;
}

/* 6. Ministry cards: gradient bg + top gold border line + hover lift */
.woh-v2-ministries-section {
	background-color: #111521;
}
.woh-v2-ministries-section > .wp-block-group,
.woh-v2-ministries-section > .wp-block-columns {
	position: relative;
	z-index: 3;
}
.woh-v2-gradient-card {
	background: linear-gradient(160deg, #1e2438 0%, #1a1f2e 100%) !important;
	position: relative;
	transition: box-shadow 0.25s ease, transform 0.25s ease !important;
}
.woh-v2-gradient-card::before {
	content: '';
	position: absolute;
	top: 0; left: 0; right: 0;
	height: 2px;
	background: linear-gradient(90deg, #c9a84c, rgba(201, 168, 76, 0.1) 60%, transparent);
	border-radius: inherit;
	pointer-events: none;
	z-index: 2;
}
.woh-v2-gradient-card:hover {
	box-shadow: 0 8px 32px rgba(201, 168, 76, 0.12) !important;
	transform: translateY(-3px);
}
.woh-v2-ministries-section .wp-block-columns {
	align-items: stretch;
}
.woh-v2-ministries-section .wp-block-column {
	display: flex;
}
.woh-v2-ministries-section .woh-v2-card {
	box-sizing: border-box;
	height: 100%;
	overflow: hidden;
	width: 100%;
}
.woh-v2-card--worship {
	--woh-v2-card-image: url("https://wohcaloocan.org/wp-content/uploads/2026/04/DSC_7773_Radiant-scaled.jpg");
}
.woh-v2-card--bible {
	--woh-v2-card-image: url("https://wohcaloocan.org/wp-content/uploads/2026/04/DSC_7013_Radiant-scaled-e1777298636104.jpg");
}
.woh-v2-card--serve {
	--woh-v2-card-image: url("https://wohcaloocan.org/wp-content/uploads/2026/04/DSC_7132_Radiant-scaled.jpg");
}
.woh-v2-card--prayer {
	--woh-v2-card-image: url("https://wohcaloocan.org/wp-content/uploads/2026/04/DSC_8058_Radiant-scaled.jpg");
}
.woh-v2-gradient-card.woh-v2-card--photo {
	--woh-v2-card-height: 445px;
	background:
		linear-gradient(180deg, rgba(10, 15, 30, 0.06) 0%, rgba(10, 15, 30, 0.42) 45%, rgba(10, 15, 30, 0.9) 76%, rgba(10, 15, 30, 0.98) 100%) center center / cover no-repeat,
		var(--woh-v2-card-image) center center / cover no-repeat !important;
	background-color: #111827 !important;
	background-position: center center, center center !important;
	background-repeat: no-repeat, no-repeat !important;
	background-size: cover, cover !important;
	border: 0 !important;
	height: var(--woh-v2-card-height);
	justify-content: flex-end;
	max-height: var(--woh-v2-card-height);
	min-height: var(--woh-v2-card-height);
	padding-top: calc(var(--woh-v2-card-height) * 0.3) !important;
}
.woh-v2-card--photo > * {
	position: relative;
	z-index: 1;
}
.woh-v2-card--photo .wp-block-heading,
.woh-v2-card--photo p {
	text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}
.woh-v2-card--photo p {
	color: rgba(255, 255, 255, 0.82) !important;
	font-size: 13px !important;
	line-height: 1.25 !important;
}
.woh-v2-card-icon {
	align-items: center;
	background: rgba(10,15,30,0.85);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border: 1px solid rgba(255,255,255,0.15);
	border-radius: 10px;
	display: flex;
	height: 46px;
	justify-content: center;
	position: relative;
	width: 46px;
}
.woh-v2-card-icon svg {
	fill: none;
	height: 24px;
	stroke: #c9a84c;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.8;
	width: 24px;
}

/* Icon pill container behind emoji */
.woh-v2-icon-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px; height: 52px;
	border-radius: 12px;
	background: linear-gradient(135deg, rgba(201, 168, 76, 0.18), rgba(201, 168, 76, 0.05));
	border: 1px solid rgba(201, 168, 76, 0.15);
	font-size: 1.5rem;
	margin-bottom: 0.25rem;
}

/* 7. Aurora gradient on CTA section */
.woh-v2-aurora .wp-block-cover__background {
	background: linear-gradient(135deg, #0d1a35 0%, #1a0d2e 50%, #0d1117 100%) !important;
}

/* 8. Frosted glassmorphism on CTA location card */
.woh-v2-frosted-card {
	background: rgba(255, 255, 255, 0.06) !important;
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border: 1px solid rgba(255, 255, 255, 0.12) !important;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* 9. Subtle grain texture overlay on dark sections */
.woh-v2-grain {
	position: relative;
	overflow: hidden;
}
.woh-v2-grain::after {
	content: '';
	position: absolute;
	inset: 0;
	background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
	background-repeat: repeat;
	background-size: 256px 256px;
	opacity: 0.45;
	pointer-events: none;
	z-index: 2;
}

/* 10. Scroll-fade animation for ministry cards */
@keyframes woh-fade-up {
	from { opacity: 0; transform: translateY(20px); }
	to   { opacity: 1; transform: translateY(0); }
}
.woh-v2-gradient-card {
	animation: woh-fade-up 0.5s ease both;
}
.woh-v2-gradient-card:nth-child(2) { animation-delay: 0.1s; }
.woh-v2-gradient-card:nth-child(3) { animation-delay: 0.2s; }
.woh-v2-gradient-card:nth-child(4) { animation-delay: 0.3s; }

/* LearnDash Compatibility
   ========================================================================== */

/* Font inheritance */
.learndash-wrapper {
	font-family: inherit;
	color: #222222;
}

/* Primary buttons — gold */
.learndash-wrapper .ld-button,
.learndash-wrapper .btn-blue,
.learndash-wrapper input[type="submit"],
#learndash_lessons .ld-button,
.ld-course-status-action a.ld-button {
	background-color: #c9a84c;
	border-color: #c9a84c;
	color: #ffffff;
}

.learndash-wrapper .ld-button:hover,
.learndash-wrapper .btn-blue:hover,
.learndash-wrapper input[type="submit"]:hover,
.ld-course-status-action a.ld-button:hover {
	background-color: #b8932e;
	border-color: #b8932e;
	color: #ffffff;
}

/* Progress bars */
.learndash-wrapper .ld-progress-bar .ld-progress-bar-percentage {
	background-color: #c9a84c;
}

/* Completion status */
.learndash-wrapper .ld-status-complete,
.learndash-wrapper .ld-status-complete .ld-icon {
	color: #c9a84c;
}

/* Links inside LearnDash content */
.learndash-wrapper a {
	color: #1a2744;
}
.learndash-wrapper a:hover {
	color: #c9a84c;
}

/* Enrolled course status badge */
.learndash-wrapper .ld-course-status-enrolled .ld-course-status-label {
	background-color: #1a2744;
	color: #ffffff;
}

/* Section/table heading weights */
.learndash-wrapper .ld-table-list-title,
.learndash-wrapper .ld-section-heading h2,
.learndash-wrapper .ld-section-heading h3 {
	font-weight: 600;
}

/* Course grid cards (archive template) */
.wp-block-post-template .wp-block-group:hover {
	border-color: #1a2744 !important;
	border-left: 3px solid #c9a84c !important;
}

/* Quiz result colors */
.learndash-wrapper .ld-quiz-result-percentage {
	color: #c9a84c;
}

/* Focus mode — hide theme header/footer when active */
body.learndash-focus-mode .wp-block-template-part[data-area="header"],
body.learndash-focus-mode .wp-block-template-part[data-area="footer"] {
	display: none;
}

/* Mobile Responsiveness
   ========================================================================== */

@media (max-width: 600px) {

	/* --- Ministry cards: reduce fixed height when stacked on mobile --- */
	.woh-v2-gradient-card.woh-v2-card--photo {
		--woh-v2-card-height: 280px !important;
	}

	/* --- CTA map: reduce iframe height on mobile --- */
	.woh-map-embed {
		height: 220px !important;
	}
	.woh-map-embed iframe {
		height: 220px !important;
	}

	/* --- Hero: prevent <br> creating orphaned words on narrow screens --- */
	.woh-v2-hero-content p br {
		display: none;
	}

	/* --- LearnDash: prevent horizontal table overflow --- */
	.learndash-wrapper .ld-table-list,
	.learndash-wrapper table {
		display: block;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	/* --- LearnDash: full-width buttons on mobile --- */
	.learndash-wrapper .ld-button,
	.learndash-wrapper .btn-blue,
	.learndash-wrapper input[type="submit"] {
		display: block;
		width: 100%;
		text-align: center;
		box-sizing: border-box;
	}

	/* --- LearnDash: course status bar stacks on mobile --- */
	.learndash-wrapper .ld-course-status {
		flex-direction: column;
		gap: 0.5rem;
	}

	/* --- LearnDash: quiz answer options readable on small screens --- */
	.learndash-wrapper .wpProQuiz_questionList {
		padding-left: 0;
	}

	/* --- Header: ensure logo + nav don't overlap on very small screens --- */
	.wp-block-group.alignwide > .wp-block-navigation {
		flex-shrink: 0;
	}
}
