/*
 * The Worship Arena — baseline theme stylesheet.
 *
 * IMPORTANT: the project this theme was rebuilt from did not include
 * this file — assets/css/style.css was referenced by functions.php's
 * enqueue call but never actually present in the uploaded files. This
 * is a clean, functional baseline covering every CSS class the theme's
 * templates use, styled using the same --ink/--ember/--gold custom
 * properties functions.php already injects per-church — NOT a
 * recreation of whatever original visual design existed before. Treat
 * this as a working starting point to refine, not a finished design.
 */

:root {
	--ink: #101B33;
	--ember: #E2792E;
	--gold: #C9922B;
	--bg: #ffffff;
	--bg-dim: #f7f5f2;
	--text: #23262f;
	--text-muted: #6b7280;
	--border: #e5e1da;
	--radius: 10px;
	--font-display: 'Fraunces', Georgia, serif;
	--font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }

body {
	margin: 0;
	font-family: var(--font-body);
	color: var(--text);
	background: var(--bg);
	line-height: 1.6;
}

h1, h2, h3, h4, .twa-eyebrow, blockquote {
	font-family: var(--font-display);
	color: var(--ink);
	margin: 0 0 0.5em;
}

a { color: var(--ember); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

.twa-container {
	max-width: 1160px;
	margin: 0 auto;
	padding: 0 1.5rem;
}

/* ---------- Site header ---------- */

.twa-site-header {
	border-bottom: 1px solid var(--border);
	background: var(--bg);
	position: sticky;
	top: 0;
	z-index: 50;
}
.twa-site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1rem 1.5rem;
}
.twa-site-header__name { font-family: var(--font-display); font-size: 1.25rem; color: var(--ink); }
.twa-site-header__brand { display: flex; align-items: center; gap: 0.6rem; color: var(--ink); }
.twa-site-header__brand:hover { text-decoration: none; }
.twa-site-header__logo-img { border-radius: 50%; object-fit: cover; }
.twa-site-header__nav .twa-nav__list { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.twa-site-header__nav a { color: var(--ink); font-weight: 500; }
.twa-site-header__toggle { display: none; background: none; border: 0; cursor: pointer; }
.twa-site-header__toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 4px 0; }

@media (max-width: 800px) {
	.twa-site-header__nav {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: #fff;
		border-bottom: 1px solid var(--border);
		box-shadow: 0 8px 16px -8px rgba(16, 27, 51, 0.15);
		padding: 1rem 1.5rem;
	}
	/* The bug: this state was never defined, so toggling the 'is-open'
	   class via main.js had no visible effect — display stayed 'none'
	   regardless of the class, making the button appear to do nothing. */
	.twa-site-header__nav.is-open {
		display: block;
	}
	.twa-site-header__nav .twa-nav__list {
		flex-direction: column;
		gap: 1rem;
	}
	.twa-site-header__toggle { display: block; }
}

/* ---------- Buttons ---------- */

.twa-btn {
	display: inline-block;
	padding: 0.75rem 1.5rem;
	border-radius: 999px;
	font-weight: 600;
	border: 2px solid transparent;
	cursor: pointer;
	text-align: center;
}
.twa-btn--ember { background: var(--ember); color: #fff; }
.twa-btn--ember:hover { background: #c9631c; text-decoration: none; }
.twa-btn--ghost-light { border-color: rgba(255,255,255,0.6); color: #fff; }
.twa-btn--ghost-light:hover { background: rgba(255,255,255,0.12); text-decoration: none; }
.twa-btn--ghost { border-color: var(--border); color: var(--ink); }
.twa-btn--ghost:hover { background: var(--bg-dim); text-decoration: none; }

/* ---------- Hero / page hero ---------- */

.twa-hero, .twa-page-hero {
	background: var(--ink);
	color: #fff;
	padding: 5rem 0;
	background-size: cover;
	background-position: center;
	position: relative;
}
.twa-hero::before, .twa-page-hero::before {
	content: '';
	position: absolute; inset: 0;
	background: rgba(16, 27, 51, 0.55);
}
.twa-hero--has-image .twa-hero__inner,
.twa-page-hero--has-image .twa-container { position: relative; z-index: 1; }
.twa-hero__inner { max-width: 720px; margin: 0 auto; text-align: center; padding: 0 1.5rem; }
.twa-eyebrow { display: block; font-family: var(--font-body); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ember); font-weight: 700; margin-bottom: 0.75rem; }
.twa-eyebrow--light { color: var(--gold); }
.twa-hero__verse { font-size: 1.75rem; font-style: italic; color: #fff; margin: 0 0 1rem; }
.twa-hero__verse cite { display: block; font-size: 1rem; font-style: normal; color: var(--gold); margin-top: 0.5rem; }
.twa-hero__sub { color: rgba(255,255,255,0.85); margin-bottom: 2rem; }
.twa-hero__actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 2rem; }

/* ---------- Noticeboard ---------- */

.twa-noticeboard { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; margin: 1.5rem 0; }
.twa-noticeboard__panel { text-align: center; }
.twa-noticeboard__label { display: block; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.4rem; }
.twa-noticeboard__tiles { display: flex; gap: 3px; }
.twa-tile { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 36px; background: #1b2a4d; border: 1px solid rgba(255,255,255,0.15); border-radius: 4px; font-family: var(--font-display); font-weight: 600; color: #fff; }
.twa-noticeboard__sub { display: block; font-size: 0.8rem; color: rgba(255,255,255,0.7); margin-top: 0.4rem; }
.twa-noticeboard-frame { display: inline-block; }

/* ---------- Sections ---------- */

.twa-section { padding: 4rem 0; }
.twa-section--dim { background: var(--bg-dim); }
.twa-section__header { text-align: center; max-width: 600px; margin: 0 auto 2.5rem; }

/* ---------- Cards / grids ---------- */

.twa-card-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.twa-card-grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 800px) { .twa-card-grid--3 { grid-template-columns: 1fr; } }

.twa-card {
	background: #fff;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
}
.twa-card__image { aspect-ratio: 16/10; object-fit: cover; width: 100%; background: var(--bg-dim); }
.twa-card__media { display: block; position: relative; aspect-ratio: 16/10; background: var(--bg-dim); overflow: hidden; }
.twa-card__media img { width: 100%; height: 100%; object-fit: cover; }
.twa-card__media-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 2rem; color: var(--border); }
.twa-card__play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 44px; height: 44px; border-radius: 50%; background: rgba(16,27,51,0.75); color: #fff; display: flex; align-items: center; justify-content: center; }
.twa-card--event__thumb { display: block; aspect-ratio: 16/9; overflow: hidden; }
.twa-card--event__thumb img { width: 100%; height: 100%; object-fit: cover; }
.twa-card--event__body-row { display: flex; gap: 1rem; padding: 1.1rem; }
.twa-card__date { text-align: center; min-width: 52px; }
.twa-card__date-day { display: block; font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; color: var(--ember); line-height: 1; }
.twa-card__date-mon { display: block; font-size: 0.75rem; letter-spacing: 0.06em; color: var(--text-muted); }
.twa-card--event .twa-card__body { padding: 0; }
.twa-card__body { padding: 1.25rem; }
.twa-card__title { font-size: 1.1rem; margin-bottom: 0.4rem; }
.twa-card__meta { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 0.6rem; }

.twa-link-arrow { color: var(--ember); font-weight: 600; }
.twa-link-arrow--light { color: var(--gold); }

/* ---------- About teaser ---------- */

.twa-about-teaser__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.twa-about-teaser__grid--no-photo { grid-template-columns: 1fr; }
.twa-about-teaser__photo img { border-radius: var(--radius); }
.twa-about-teaser__stats { display: grid; gap: 1.25rem; grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); margin-top: 2rem; }
@media (max-width: 800px) {
	.twa-about-teaser__grid { grid-template-columns: 1fr; }
	.twa-about-teaser__stats { grid-template-columns: 1fr; }
}
.twa-about-teaser__stat h3 { font-size: 1rem; }
.twa-about-teaser__stat p { color: var(--text-muted); margin: 0; }

/* ---------- Devotional strip / visit ---------- */

.twa-devotional-strip, .twa-visit {
	background: var(--ink);
	color: #fff;
	padding: 5rem 0;
	text-align: center;
	background-size: cover;
	background-position: center;
	position: relative;
}
/* Stronger, slightly uneven overlay (darker at top/bottom, a touch
   lighter through the middle) keeps text legible over any photo —
   bright skies, busy crowds, whatever gets uploaded — without fully
   flattening the image into a solid color. */
.twa-devotional-strip::before, .twa-visit::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(16,27,51,0.82) 0%, rgba(16,27,51,0.68) 50%, rgba(16,27,51,0.82) 100%);
}
.twa-devotional-strip .twa-container, .twa-visit .twa-container { position: relative; z-index: 1; }

/* h2's global color (--ink, a dark navy) is a direct rule on the
   element and otherwise wins over the lighter color these sections
   inherit from their parent — without this, headings here go
   near-invisible against a photo background. Same for body text. */
.twa-devotional-strip h2, .twa-devotional-strip h2 a,
.twa-visit h2 {
	color: #fff;
}
.twa-devotional-strip p, .twa-visit p { color: rgba(255,255,255,0.88); }

.twa-visit { text-align: center; }
.twa-visit__grid { display: flex; flex-direction: column; align-items: center; }
.twa-visit__address { font-size: 1.15rem; max-width: 480px; }

/* A visible seam between the two stacked full-bleed photo sections so
   they read as two distinct blocks rather than blurring into one long
   collage when both have images set. */
.twa-visit { border-top: 3px solid var(--gold); }

/* ---------- Contact ---------- */

.twa-contact-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); text-align: center; }
.twa-contact-card { padding: 2rem 1rem; border: 1px solid var(--border); border-radius: var(--radius); }
.twa-contact-card__icon { font-size: 1.75rem; }
.twa-map-embed { aspect-ratio: 16/7; border-radius: var(--radius); overflow: hidden; }

/* ---------- Leadership / About ---------- */

.twa-leader-grid { display: grid; grid-template-columns: 300px 1fr; gap: 2.5rem; align-items: start; }
.twa-leader-grid--no-photo { grid-template-columns: 1fr; }
.twa-leader-grid__photo img { border-radius: var(--radius); }
.twa-leader-grid__title { color: var(--text-muted); font-weight: 600; }
@media (max-width: 700px) { .twa-leader-grid { grid-template-columns: 1fr; } }

.twa-prose { max-width: 720px; margin: 0 auto; }
.twa-prose p { margin-bottom: 1.2em; }

/* ---------- Single content (Sermon / Event / Devotional) ---------- */

.twa-single { padding: 3rem 0 5rem; }
.twa-single__thumb img { border-radius: var(--radius); margin-bottom: 2rem; }
.twa-single__meta { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.5rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.twa-single__body { max-width: 800px; margin: 0 auto; }
.twa-single__body--narrow { max-width: 640px; }
.twa-video-embed, .twa-live-embed { aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; margin-bottom: 1.5rem; }
.twa-audio-embed audio { width: 100%; }
.twa-event-facts { list-style: none; padding: 0; margin: 0 0 2rem; display: grid; gap: 0.6rem; }
.twa-event-facts li { padding: 0.6rem 0; border-bottom: 1px solid var(--border); }

/* ---------- Devotional list / archive ---------- */

.twa-devotional-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.25rem; }
.twa-devotional-row { display: flex; gap: 1.5rem; align-items: baseline; padding-bottom: 1.25rem; border-bottom: 1px solid var(--border); }
.twa-devotional-row__date { color: var(--text-muted); font-size: 0.85rem; min-width: 90px; }
.twa-devotional-row__body h3 { margin: 0 0 0.3rem; font-size: 1.05rem; }

.twa-empty-state { text-align: center; color: var(--text-muted); padding: 3rem 0; }
.twa-pagination { display: flex; gap: 0.5rem; justify-content: center; margin-top: 2.5rem; }

/* ---------- Live page ---------- */

.twa-live-note { text-align: center; color: var(--text-muted); padding: 3rem 0; }

/* ---------- Give page ---------- */

.twa-give__wrap { max-width: 560px; margin: 0 auto; }
.twa-give-form { display: grid; gap: 1rem; }
.twa-give-form label { font-weight: 600; font-size: 0.9rem; }
.twa-give-form input, .twa-give-form select, .twa-give-form textarea {
	width: 100%; padding: 0.7rem 0.9rem; border: 1px solid var(--border); border-radius: 8px; font: inherit;
}
.twa-give-form__amounts { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.twa-give-form__amount-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.twa-amount-btn { padding: 0.6rem; border: 1px solid var(--border); border-radius: 8px; background: #fff; cursor: pointer; font-weight: 600; }
.twa-amount-btn.is-selected, .twa-amount-btn:hover { border-color: var(--ember); color: var(--ember); }
.twa-give-form__note { font-size: 0.8rem; color: var(--text-muted); }
.twa-give-summary { border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; margin: 1rem 0; }
.twa-give-summary__row { display: flex; justify-content: space-between; padding: 0.3rem 0; }
.twa-give-summary__row--total { font-weight: 700; border-top: 1px solid var(--border); margin-top: 0.4rem; padding-top: 0.6rem; }
.twa-give-submit { width: 100%; }
.twa-give-error { color: #b3261e; font-size: 0.85rem; }
.twa-give-result { text-align: center; padding: 3rem 1.5rem; border-radius: var(--radius); }
.twa-give-result--success { background: #eaf7ee; }
.twa-give-result--pending { background: #fff8e6; }

/* ---------- Alerts ---------- */

.twa-alert, .twa-alert-box { padding: 0.9rem 1.1rem; border-radius: 8px; margin-bottom: 1.25rem; font-size: 0.9rem; }
.twa-alert--error, .twa-alert-box--error { background: #fdecea; color: #b3261e; }
.twa-alert--info { background: #eef2ff; color: #33418a; }

/* ---------- Site footer ---------- */

.twa-site-footer { background: var(--ink); color: rgba(255,255,255,0.85); padding: 3.5rem 0 1.5rem; margin-top: 4rem; }
.twa-site-footer__inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2.5rem; }
@media (max-width: 600px) { .twa-site-footer__inner { grid-template-columns: 1fr; } }
.twa-site-footer h3, .twa-site-footer h4 { color: #fff; }
.twa-site-footer a { color: rgba(255,255,255,0.85); }
.twa-site-footer__nav { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.twa-site-footer__social { display: flex; gap: 1rem; flex-wrap: wrap; }
.twa-site-footer__bottom { text-align: center; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.15); font-size: 0.85rem; }
