/*
 Theme Name:   GeneratePress Child
 Theme URI:    https://generatepress.com
 Description:  Burleson Cowboy Ministries blog child theme
 Author:       Tom Usborne
 Author URI:   https://tomusborne.com
 Template:     generatepress
 Version:      1.0
*/

/* ============================================
   BRAND TOKENS + GP VARIABLE OVERRIDES
   ============================================ */

:root {
	/* Brand palette */
	--bcm-bg:          #332212;
	--bcm-dark:        #3D1A04;
	--bcm-brown:       #643917;
	--bcm-stone:       #57534C;
	--bcm-cream:       #F7EADA;
	--bcm-parchment:   #FCEACF;
	--bcm-gold:        #EBC98F;
	--bcm-gold-border: rgba(230, 179, 90, 0.569);
	--bcm-link:        #BF5C00;
	--bcm-link-hover:  #FF5C00;

	/* Map to GeneratePress variables so GP components inherit brand colors */
	--contrast:   #3D1A04;
	--contrast-2: #643917;
	--accent:     #BF5C00;
	--base:       #F7EADA;
	--base-2:     #FCEACF;
	--base-3:     rgba(230, 179, 90, 0.569);
}

/* ============================================
   GLOBAL RESET / BASE
   ============================================ */

html {
	font-size: 14pt;
}

@media (max-width: 1680px) { html { font-size: 10pt; } }
@media (max-width: 1280px) { html { font-size: 10pt; } }
@media (max-width: 980px)  { html { font-size: 9pt;  } }
@media (max-width: 736px)  { html { font-size: 11pt; } }

body {
	background-color: var(--bcm-bg);
	font-family: 'Inter', sans-serif;
	color: var(--bcm-brown);
}

/* ============================================
   BACKGROUND — noise + gradient + image
   ============================================ */

body::before {
	content: '';
	position: fixed;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	background-image:
		url('noise-texture.svg'),
		linear-gradient(to top, rgba(79, 46, 28, 0.42), rgba(79, 46, 28, 0.42)),
		url('bg.jpg');
	background-size: 512px, auto, cover;
	background-position: center, 0% 0%, center;
	background-repeat: repeat, repeat, no-repeat;
}

/* Ensure all content layers sit above the fixed background */
.site-header,
.bcm-header,
#page,
.site-content,
.bcm-footer {
	position: relative;
	z-index: 1;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, .h1 {
	font-family: 'Young Serif', serif;
	font-size: 3.5em;
	line-height: 1.25;
	color: var(--bcm-dark);
}

h2, .h2 {
	font-family: 'Young Serif', serif;
	font-size: 3em;
	line-height: 1.5;
	color: var(--bcm-stone);
}

h3, .h3 {
	font-family: 'Young Serif', serif;
	font-size: 1.75em;
	line-height: 1.5;
	color: var(--bcm-stone);
}

h4, h5, h6 {
	font-family: 'Young Serif', serif;
	color: var(--bcm-dark);
}

p {
	font-family: 'Inter', sans-serif;
	font-size: 1em;
	line-height: 1.875;
	color: var(--bcm-brown);
}

a {
	color: var(--bcm-link);
}

a:hover {
	color: var(--bcm-link-hover);
}

/* Eyebrow / meta labels */
.eyebrow,
.bcm-eyebrow {
	font-family: 'Inter', sans-serif;
	font-size: 0.875em;
	line-height: 1.75;
	color: var(--bcm-brown);
	text-transform: uppercase;
	letter-spacing: 0.375rem;
}

@media (max-width: 736px) {
	h1, .h1 { font-size: 2.75em; }
	h2, .h2 { font-size: 2em; }
	h3, .h3 { font-size: 2em; }
}

/* ============================================
   LAYOUT — no sidebar, 48rem max-width
   ============================================ */

.content-area,
.site-main {
	width: 100%;
	max-width: 48rem;
	margin-left: auto;
	margin-right: auto;
}

/* Remove GP sidebar-specific width constraints */
.sidebar-no-content .site-main,
body:not(.sidebar-right):not(.sidebar-left) .site-main {
	width: 100%;
}

/* GP content container padding */
.grid-container {
	max-width: 48rem;
	padding-left: 4rem;
	padding-right: 4rem;
}

.inside-article,
.entry-content,
.entry-header {
	padding-left: 0;
	padding-right: 0;
}

/* Top/bottom spacing */
.content-area { padding-top: 6rem; padding-bottom: 6rem; }

@media (max-width: 736px) {
	.grid-container { padding-left: 1rem; padding-right: 1rem; }
	.content-area   { padding-top: 3rem; padding-bottom: 3rem; }
}

@media (max-width: 360px) {
	.grid-container { padding-left: 0.75rem; padding-right: 0.75rem; }
}

/* ============================================
   HEADER
   ============================================ */

.bcm-header {
	background-color: var(--bcm-bg);
	padding: 1.25rem 2rem;
	position: sticky;
	top: 0;
	z-index: 100;
	border-bottom: 1px solid var(--bcm-gold-border);
}

.bcm-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	max-width: 48rem;
	margin: 0 auto;
	gap: 1rem;
}

.bcm-site-name {
	font-family: 'Young Serif', serif;
	font-size: 1.1em;
	color: var(--bcm-parchment);
	text-decoration: none;
	line-height: 1.3;
	flex-shrink: 1;
}

.bcm-site-name:hover {
	color: var(--bcm-gold);
}

@media (max-width: 736px) {
	.bcm-header { padding: 1rem; }
	.bcm-site-name { font-size: 0.95em; }
}

/* ============================================
   FOOTER
   ============================================ */

.bcm-footer {
	background-color: var(--bcm-bg);
	border-top: 1px solid var(--bcm-gold-border);
	padding: 3rem 2rem;
	text-align: center;
}

.bcm-footer__inner {
	max-width: 48rem;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.5rem;
}

.bcm-footer__tagline {
	font-family: 'Young Serif', serif;
	font-size: 1.1em;
	color: var(--bcm-parchment);
	margin: 0;
	font-style: italic;
}

.bcm-footer__ctas {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
	justify-content: center;
}

.bcm-footer__copy {
	font-family: 'Inter', sans-serif;
	font-size: 0.8em;
	color: var(--bcm-gold);
	margin: 0;
	opacity: 0.75;
}

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

.btn-primary {
	display: inline-flex;
	align-items: center;
	height: 4rem;
	padding: 0 2rem;
	font-family: 'Young Serif', serif;
	font-size: 1.25em;
	border-radius: 0.5rem;
	background-color: var(--bcm-dark);
	color: var(--bcm-parchment);
	text-decoration: none;
	transition: transform 0.25s ease;
	white-space: nowrap;
	flex-shrink: 0;
}

.btn-primary:hover {
	color: var(--bcm-parchment);
	transform: scale(1.0775);
}

.btn-secondary {
	display: inline-flex;
	align-items: center;
	height: 3.5rem;
	padding: 0 1.75rem;
	font-family: 'Young Serif', serif;
	font-size: 1em;
	border-radius: 0.5rem;
	color: var(--bcm-brown);
	border: 2px solid var(--bcm-brown);
	text-decoration: none;
	transition: transform 0.25s ease;
	white-space: nowrap;
}

.btn-secondary:hover {
	color: var(--bcm-brown);
	transform: scale(1.0775);
}

/* ============================================
   CHEVRON DIVIDER
   ============================================ */

.divider-chevron {
	width: 21rem;
	height: 1.5rem;
	background-repeat: repeat-x;
	background-size: auto 37.6%;
	background-position: center;
	background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20512%20512%22%20width%3D%22512%22%20height%3D%22512%22%3E%3Cstyle%3Eline%7Bstroke-linecap%3Asquare%3Bstroke-width%3A2px%3Bstroke%3A%23EBC98F%3Bvector-effect%3Anon-scaling-stroke%3B%7D%3C%2Fstyle%3E%3Cline%20x1%3D%22256%22%20y1%3D%220%22%20x2%3D%220%22%20y2%3D%22256%22%2F%3E%3Cline%20x1%3D%22256%22%20y1%3D%22512%22%20x2%3D%22512%22%20y2%3D%22256%22%2F%3E%3C%2Fsvg%3E");
	margin: 0.75rem 0;
}

/* ============================================
   CARD
   ============================================ */

.bcm-card {
	background-color: var(--bcm-cream);
	border: 2px dashed var(--bcm-gold-border);
	border-radius: 1.25rem;
	padding: 2.375rem 4rem;
}

@media (max-width: 736px) {
	.bcm-card { padding: 2.375rem 2rem; }
}

@media (max-width: 360px) {
	.bcm-card { padding: 1.78125rem 1.5rem; }
}

/* ============================================
   POST LOOP (index)
   ============================================ */

.bcm-post-list {
	display: flex;
	flex-direction: column;
	gap: 2rem;
}

.bcm-post-card {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.bcm-post-card .bcm-eyebrow {
	margin: 0;
}

.bcm-post-card .entry-title {
	font-family: 'Young Serif', serif;
	font-size: 1.75em;
	line-height: 1.4;
	color: var(--bcm-stone);
	margin: 0;
}

.bcm-post-card .entry-title a {
	color: inherit;
	text-decoration: none;
}

.bcm-post-card .entry-title a:hover {
	color: var(--bcm-link);
}

.bcm-post-card .bcm-excerpt {
	font-family: 'Inter', sans-serif;
	font-size: 1em;
	line-height: 1.875;
	color: var(--bcm-brown);
	margin: 0;
}

.bcm-post-card .bcm-read-more {
	margin-top: 0.5rem;
}

/* Override GP article wrapper for our card style */
.bcm-post-card article {
	background: transparent;
	border: none;
	padding: 0;
	margin: 0;
}

/* ============================================
   SINGLE POST
   ============================================ */

.bcm-single-header {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin-bottom: 2.5rem;
}

.bcm-single-header .entry-title {
	font-family: 'Young Serif', serif;
	font-size: 3.5em;
	line-height: 1.25;
	color: var(--bcm-dark);
	margin: 0;
}

@media (max-width: 736px) {
	.bcm-single-header .entry-title { font-size: 2.75em; }
}

.entry-content {
	font-family: 'Inter', sans-serif;
	font-size: 1em;
	line-height: 1.875;
	color: var(--bcm-brown);
}

.entry-content h2 { margin-top: 2rem; }
.entry-content h3 { margin-top: 1.5rem; }

/* Single post content background */
body.single .inside-article {
	background-color: var(--bcm-cream);
	border: 2px dashed var(--bcm-gold-border);
	border-radius: 1.25rem;
	padding: 2.375rem 4rem;
}

@media (max-width: 736px) {
	body.single .inside-article { padding: 2.375rem 2rem; }
}

@media (max-width: 360px) {
	body.single .inside-article { padding: 1.78125rem 1.5rem; }
}

/* CTA card at post bottom */
.bcm-post-cta {
	margin-top: 3rem;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 1.25rem;
}

.bcm-post-cta p {
	font-family: 'Young Serif', serif;
	font-size: 1.25em;
	color: var(--bcm-dark);
	margin: 0;
}

/* ============================================
   SCROLL-TRIGGERED FADE ANIMATIONS
   Powered by js/scroll-animations.js (IntersectionObserver).
   Elements start hidden; JS adds .is-visible on scroll entry,
   which fires the CSS transition.
   ============================================ */

/* Fade Up */
.fade-in-up {
	opacity: 0;
	transform: translateY(30px);
	transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in-up.is-visible {
	opacity: 1;
	transform: translateY(0);
}

/* Fade Right */
.fade-in-right {
	opacity: 0;
	transform: translateX(40px);
	transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in-right.is-visible {
	opacity: 1;
	transform: translateX(0);
}

/* Fade Left */
.fade-in-left {
	opacity: 0;
	transform: translateX(-40px);
	transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in-left.is-visible {
	opacity: 1;
	transform: translateX(0);
}

/* Fade In (opacity only) */
.fade-in {
	opacity: 0;
	transition: opacity 0.7s ease;
}

.fade-in.is-visible {
	opacity: 1;
}

/* Manual delay utilities — combine with any fade class */
.delay-1 { transition-delay: 0.10s; }
.delay-2 { transition-delay: 0.20s; }
.delay-3 { transition-delay: 0.30s; }
.delay-4 { transition-delay: 0.45s; }
.delay-5 { transition-delay: 0.60s; }

/* Disable stagger delays on mobile — animations fire immediately */
@media (max-width: 768px) {
	.delay-1,
	.delay-2,
	.delay-3,
	.delay-4,
	.delay-5 { transition-delay: 0s; }
}

/* Respect user's reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
	.fade-in-up,
	.fade-in-right,
	.fade-in-left,
	.fade-in {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

/* ============================================
   TEXT HIGHLIGHT EFFECT
   ============================================ */

.text-highlight {
	color: var(--contrast);
	position: relative;
	display: inline-block;
}

.text-highlight::after {
	content: '';
	position: absolute;
	bottom: 4px;
	left: 0;
	right: 0;
	height: 12px;
	background: var(--base-3);
	z-index: -1;
	border-radius: 4px;
}

.text-highlight-bright {
	color: var(--accent);
	position: relative;
	display: inline-block;
}

.text-highlight-bright::after {
	content: '';
	position: absolute;
	bottom: 4px;
	left: 0;
	right: 0;
	height: 12px;
	background: color-mix(in srgb, var(--accent) 20%, transparent);
	z-index: -1;
	border-radius: 4px;
}

/* ============================================
   NAV — GeneratePress Menu Styling
   (kept for compatibility if a menu is ever added)
   ============================================ */

@media (min-width: 768px) {
	.gb-menu.gb-menu--base {
		display: flex;
		gap: 2.5rem;
		list-style: none;
	}

	.gb-menu--base .gb-menu-link {
		text-decoration: none;
		color: var(--contrast);
		font-size: 0.95rem;
		font-weight: 400;
		letter-spacing: 0.01em;
		transition: color 0.3s ease;
		position: relative;
		padding: 0.25em !important;
	}

	.gb-menu--base .gb-menu-link::after {
		content: '';
		position: absolute;
		bottom: -4px;
		left: 0;
		width: 0;
		height: 1px;
		background: var(--accent);
		transition: width 0.3s ease;
	}

	.gb-menu--base .gb-menu-link:hover {
		color: var(--accent) !important;
	}

	.gb-menu--base .gb-menu-link:hover::after {
		width: 100%;
	}

	.gb-menu--base .current-menu-item .gb-menu-link {
		color: var(--accent) !important;
		font-weight: 500;
	}

	.gb-menu--base .current-menu-item .gb-menu-link::after {
		width: 100%;
	}
}

/* ============================================
   FAQ ACCORDION
   ============================================ */

.gb-accordion {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}

.gb-accordion__item {
	border-radius: 12px;
	overflow: hidden;
	transition: box-shadow 0.3s ease;
}

.gbp-card--border {
	border: 1px solid var(--base-3) !important;
	background: var(--base);
}

.gbp-card--border:hover {
	box-shadow: 0 4px 20px color-mix(in srgb, var(--contrast) 6%, transparent);
}

.gb-accordion__toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1.25rem 1.5rem;
	gap: 1rem;
	cursor: pointer;
	user-select: none;
	transition: background 0.2s ease;
}

.gb-accordion__toggle:hover {
	background: var(--base-2);
}

.gb-accordion__toggle[aria-expanded="true"] {
	background: var(--base-2);
}

.gb-accordion .gbp-card__title {
	font-size: 1rem;
	font-weight: 500;
	color: var(--contrast);
	margin: 0;
	line-height: 1.4;
	transition: color 0.2s ease;
}

.gb-accordion__toggle:hover .gbp-card__title,
.gb-accordion__toggle[aria-expanded="true"] .gbp-card__title {
	color: var(--accent);
}

.gb-accordion__toggle-icon {
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	color: var(--contrast-2);
	transition: color 0.2s ease;
}

.gb-accordion__toggle:hover .gb-accordion__toggle-icon,
.gb-accordion__toggle[aria-expanded="true"] .gb-accordion__toggle-icon {
	color: var(--accent);
}

.gb-accordion__content {
	border-top: none;
}

.gb-accordion__toggle[aria-expanded="true"] + .gb-accordion__content {
	border-top: 1px solid var(--base-3);
}

.gb-accordion__content .gb-text {
	font-size: 0.95rem;
	color: var(--contrast-2);
	line-height: 1.75;
	margin: 0;
	padding: 1rem 1.5rem 1.25rem;
}

.gb-accordion__content .gb-text a {
	color: var(--accent);
	text-decoration: none;
	border-bottom: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
	transition: border-color 0.2s ease;
}

.gb-accordion__content .gb-text a:hover {
	border-color: var(--accent);
}

/* ============================================
   BUTTON STYLES (GP/GB overrides)
   ============================================ */

.gbp-button--primary:hover {
	filter: brightness(1.15);
}

/* ============================================
   STICKY RIGHT SIDEBAR (kept for compatibility)
   ============================================ */

@media (min-width: 769px) {
	.inside-right-sidebar {
		position: sticky;
		top: 1rem;
		transition: top 0.3s ease;
	}
}
