/*
Theme Name: FearHeart
Theme URI: https://www.fearheart.org
Author: FearHeart Team
Author URI: https://www.fearheart.org
Description: A custom WordPress theme for FearHeart, supporting the haunted arts community. Dark, moody, haunt-themed design with orange and purple accents.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fearheart
Tags: blog, custom-background, custom-colors, custom-menu, editor-style, featured-images, full-site-editing, rtl-language-support, sticky-post, threaded-comments, translation-ready, one-column, custom-logo
*/

/* ============================================
   CSS Custom Properties (Design System)
   ============================================ */
:root {
	/* Brand Colors */
	--accent: #ff7518;
	--accent-purple: #800080;
	--bg-dark: #111111;
	--bg-card: #1a1a1a;
	--text-white: #ffffff;
	--text-gray: #cccccc;
	--black: 0, 0, 0;

	/* Typography */
	--font-heading: 'Pirata One', cursive;
	--font-body: 'Crimson Text', serif;

	/* Spacing */
	--max-width: 960px;
	--content-width: 800px;

	/* Transitions */
	--transition-speed: 0.2s;
}

/* ============================================
   Reset & Base Styles
   ============================================ */
*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	padding: 0;
	background-color: var(--bg-dark);
	color: var(--text-white);
	font-family: var(--font-body);
	font-size: 18px;
	line-height: 1.6;
}

a {
	color: var(--accent);
	text-decoration: none;
	transition: color var(--transition-speed) ease;
}

a:hover {
	color: var(--accent-purple);
}

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

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-heading);
	color: var(--accent);
	margin-top: 0;
	line-height: 1.2;
}

h1 {
	font-size: 3.5rem;
}

h2 {
	font-size: 2.5rem;
}

h3 {
	font-size: 1.75rem;
}

p {
	margin-bottom: 1.5em;
}

/* ============================================
   Layout
   ============================================ */
main {
	width: 100%;
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 2em 1em;
}

.container {
	width: 100%;
	max-width: var(--content-width);
	margin: 0 auto;
}

/* ============================================
   Header & Navigation
   ============================================ */
.site-header {
	background: rgb(var(--black));
	border-bottom: 1px solid var(--accent-purple);
	padding: 1em 0;
	position: sticky;
	top: 0;
	z-index: 100;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.nav-wrapper {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 0 1em;
}

.site-header nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5em;
}

.nav-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex: 0 0 auto;
	gap: 1em;
}

.site-branding {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	text-decoration: none;
	padding: 0;
	border: 0;
}

.site-logo {
	height: 60px;
	width: auto;
}

.site-title {
	font-size: 1.5em;
	font-family: var(--font-heading);
	color: var(--text-white);
	white-space: nowrap;
}

/* Mobile Menu Toggle */
.menu-toggle {
	display: none;
	background: none;
	border: none;
	color: var(--text-white);
	cursor: pointer;
	padding: 0.5em;
}

.menu-toggle svg {
	width: 24px;
	height: 24px;
	stroke: currentColor;
	stroke-width: 2;
	fill: none;
}

/* Navigation Links */
.nav-links {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	overflow: visible;
}

#main-navigation {
	display: flex;
	align-items: center;
	gap: 0.5em;
	list-style: none;
	margin: 0;
	padding: 0;
}

#main-navigation li {
	position: relative;
	list-style: none;
}

.nav-links a {
	padding: 0.5em 0.8em;
	border-radius: 4px;
	color: var(--text-white);
	text-decoration: none;
	white-space: nowrap;
	transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

.nav-links a:hover,
.nav-links a.active {
	background-color: var(--accent);
	color: black;
}

/* Dropdown Menu */
.menu-item-has-children > a::after {
	content: " ▾";
	font-size: 0.8em;
}

.sub-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	background: var(--bg-card);
	border: 1px solid var(--accent-purple);
	border-radius: 4px;
	list-style: none;
	padding: 0.5em 0;
	min-width: 200px;
	z-index: 1000;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.menu-item-has-children:hover .sub-menu,
.sub-menu:hover {
	display: block;
}

.sub-menu li a {
	padding: 0.5em 1em;
	display: block;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
	text-align: center;
	padding: 4em 1em;
}

.hero img {
	margin: 0 auto 1em;
}

.hero h1 {
	font-size: 4rem;
	color: var(--accent);
}

.slogan {
	font-family: var(--font-heading);
	font-size: 1.5rem;
	color: var(--accent-purple);
	margin-top: 0.5em;
}

/* ============================================
   Content Sections
   ============================================ */
.intro {
	font-size: 1.25rem;
	line-height: 1.6;
	max-width: var(--content-width);
	margin: 0 auto 3em;
	text-align: center;
}

.intro::before,
.intro::after {
	content: "";
	display: block;
	border-top: 1px solid var(--accent-purple);
	width: 50%;
	margin: 2em auto;
}

/* ============================================
   Cards (Program, Blog Post, etc.)
   ============================================ */
.card-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2em;
	margin: 2em 0;
}

@media (min-width: 720px) {
	.card-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

.card {
	background: var(--bg-card);
	padding: 2em;
	border-radius: 8px;
	border: 1px solid #333;
	text-align: center;
	transition: transform var(--transition-speed) ease, border-color var(--transition-speed) ease;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	align-items: center;
}

.card:hover {
	transform: translateY(-5px);
	border-color: var(--accent);
}

.card h3 {
	color: var(--accent);
	margin: 0 0 1em 0;
	font-size: 1.5rem;
}

.card p {
	margin-bottom: 2em;
	flex-grow: 1;
}

.card-image {
	margin-bottom: 1em;
}

.card-image img {
	border-radius: 4px;
}

/* ============================================
   Call-to-Action Section
   ============================================ */
.cta-section {
	text-align: center;
	margin: 4em 1em 1em;
	padding: 3em;
	background: linear-gradient(
		rgba(128, 0, 128, 0.1),
		rgba(255, 117, 24, 0.1)
	);
	border-radius: 12px;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
	display: inline-block;
	padding: 0.8em 1.5em;
	background: var(--accent-purple);
	color: white;
	text-decoration: none;
	border-radius: 4px;
	font-weight: bold;
	transition: background var(--transition-speed) ease, transform var(--transition-speed) ease;
	border: none;
	cursor: pointer;
}

.btn:hover {
	background: var(--accent);
	color: black;
	transform: translateY(-2px);
}

.btn-primary {
	background: var(--accent);
	color: black;
}

.btn-primary:hover {
	background: var(--accent-purple);
	color: white;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
	background: rgb(var(--black));
	border-top: 1px solid var(--accent-purple);
	padding: 2em 1em;
	text-align: center;
	margin-top: 4em;
}

.footer-content {
	max-width: var(--max-width);
	margin: 0 auto;
}

.social-links {
	display: flex;
	justify-content: center;
	gap: 1em;
	margin-bottom: 1em;
}

.social-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--bg-card);
	border: 1px solid var(--accent-purple);
	transition: transform var(--transition-speed) ease, border-color var(--transition-speed) ease;
}

.social-icon:hover {
	transform: scale(1.1);
	border-color: var(--accent);
}

.social-icon img {
	width: 24px;
	height: 24px;
}

.copyright {
	color: var(--text-gray);
	font-size: 0.9em;
}

.hosting-credit {
	color: var(--text-gray);
	font-size: 0.8em;
	margin-top: 1.5em;
	opacity: 0.75;
}

.hosting-credit a {
	color: inherit;
	text-decoration: underline;
}

/* ============================================
   Blog Archive
   ============================================ */
.archive-header {
	text-align: center;
	margin-bottom: 2em;
}

.archive-filters {
	display: flex;
	justify-content: center;
	gap: 1em;
	margin-bottom: 2em;
	flex-wrap: wrap;
}

.archive-filters select {
	padding: 0.5em 1em;
	background: var(--bg-card);
	color: var(--text-white);
	border: 1px solid var(--accent-purple);
	border-radius: 4px;
}

.post-card {
	margin-bottom: 2em;
	padding: 1.5em;
	background: var(--bg-card);
	border-radius: 8px;
	border: 1px solid #333;
}

.post-card:hover {
	border-color: var(--accent);
}

.post-card img {
	margin-bottom: 1em;
	border-radius: 4px;
}

.post-meta {
	color: var(--text-gray);
	font-size: 0.9em;
	margin-bottom: 0.5em;
}

.post-category {
	display: inline-block;
	padding: 0.2em 0.8em;
	background: rgba(128, 0, 128, 0.3);
	border-radius: 4px;
	font-size: 0.8em;
	margin-right: 0.5em;
}

.post-tags {
	margin-top: 1em;
}

.tag-pill {
	display: inline-block;
	padding: 0.1em 0.6em;
	background: rgba(255, 117, 24, 0.2);
	border-radius: 12px;
	font-size: 0.8em;
	margin-right: 0.3em;
	margin-bottom: 0.3em;
}

/* ============================================
   Single Post
   ============================================ */
.single-post {
	max-width: var(--content-width);
	margin: 0 auto;
}

.single-post .hero-image {
	width: 100%;
	margin-bottom: 2em;
}

.single-post .hero-image img {
	border-radius: 12px;
}

.post-title {
	text-align: center;
	margin-bottom: 1em;
}

.post-navigation {
	display: flex;
	justify-content: space-between;
	gap: 1em;
	margin-top: 3em;
	padding-top: 2em;
	border-top: 1px solid var(--accent-purple);
}

.post-nav-link {
	padding: 0.8em 1.5em;
	border: 1px solid var(--accent-purple);
	border-radius: 4px;
}

/* ============================================
   Page Content (Marketing Pages)
   ============================================ */
.page-content {
	max-width: var(--content-width);
	margin: 0 auto;
}

.page-content h2 {
	color: var(--accent);
	margin-top: 2em;
	text-align: center;
}

.page-content h2::after {
	content: "";
	display: block;
	border-top: 1px solid var(--accent-purple);
	width: 50%;
	margin: 0.5em auto 1em auto;
}

.page-content ul {
	list-style-type: none;
	padding: 0;
}

.page-content li {
	background: rgba(128, 0, 128, 0.1);
	margin-bottom: 0.8em;
	padding: 1em;
	border-radius: 6px;
	border-left: 4px solid var(--accent-purple);
}

/* ============================================
   About Page Specific
   ============================================ */
.about-hero {
	text-align: center;
	margin-bottom: 3em;
}

.about-hero h1 {
	font-size: 3.5rem;
}

.founder-section {
	background: var(--bg-card);
	padding: 2em;
	border-radius: 8px;
	margin: 2em 0;
	border-left: 4px solid var(--accent);
}

/* ============================================
   Donate Page Specific
   ============================================ */
.donate-tiers {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2em;
	margin: 2em 0;
}

@media (min-width: 720px) {
	.donate-tiers {
		grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	}
}

.donate-tier {
	border: 1px solid var(--accent-purple);
	padding: 1.5em;
	border-radius: 8px;
	background-color: var(--bg-card);
	transition: transform var(--transition-speed) ease;
}

.donate-tier:hover {
	transform: translateY(-5px);
	border-color: var(--accent);
}

.custom-donate-container {
	text-align: center;
	margin: 2em 0;
}

.custom-donate-container input[type="number"] {
	padding: 0.8em;
	background: var(--bg-card);
	color: var(--text-white);
	border: 1px solid var(--accent-purple);
	border-radius: 4px;
	width: 200px;
	margin-right: 1em;
}

#custom-donate-btn {
	padding: 0.8em 2em;
	background: var(--accent);
	color: black;
	border: none;
	border-radius: 4px;
	font-weight: bold;
	cursor: pointer;
	transition: all var(--transition-speed) ease;
}

#custom-donate-btn:hover {
	filter: brightness(1.2);
	transform: translateY(-2px);
}

/* ============================================
   Poster Page
   ============================================ */
body.poster-page {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	text-align: center;
}

.poster-container {
	max-width: 800px;
	margin: 0 auto;
	padding: 2rem;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2rem;
}

.poster-container .instructions {
	font-size: 1.8rem;
	margin-top: 0.5rem;
	color: var(--text-gray);
	font-weight: 500;
}

.poster-container .logo-container {
	max-width: 500px;
	margin: 0 auto 2rem;
}

.poster-container .message {
	font-size: 3.5rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 2px;
	color: white;
	text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.poster-container .message span {
	color: var(--accent);
}

.qr-container {
	padding: 2rem;
	background: white;
	border-radius: 12px;
	display: inline-block;
	margin: 2rem 0;
}

.qr-container img {
	width: 350px;
	height: 350px;
}

.print-button {
	display: block;
	margin: 2rem auto;
	padding: 1em 3em;
	background: var(--accent);
	color: black;
	border: none;
	border-radius: 8px;
	font-size: 1.2rem;
	font-weight: bold;
	cursor: pointer;
}

/* ============================================
   Program Pages
   ============================================ */
.program-detail {
	max-width: 800px;
	margin: 0 auto;
}

.program-detail h1 {
	font-size: 4rem;
	text-align: center;
}

.program-detail .subtitle {
	text-align: center;
	font-size: 1.5rem;
	color: var(--accent-purple);
	font-family: var(--font-heading);
	margin-bottom: 1em;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 720px) {
	h1 {
		font-size: 2.5rem;
	}

	h2 {
		font-size: 2rem;
	}

	.hero h1 {
		font-size: 3rem;
	}

	.menu-toggle {
		display: block;
	}

	.site-header nav {
		flex-direction: column;
		align-items: flex-start;
		gap: 1em;
	}

	.nav-header {
		width: 100%;
	}

	.nav-links {
		display: none;
		width: 100%;
	}

	.nav-links.open {
		display: flex;
	}

	#main-navigation {
		flex-direction: column;
		align-items: stretch;
		width: 100%;
	}

	.nav-links a {
		display: block;
		width: 100%;
		padding: 0.8em;
	}

	.sub-menu {
		position: static;
		box-shadow: none;
		border: none;
		background: rgba(255, 255, 255, 0.05);
	}

	.card-grid {
		grid-template-columns: 1fr;
	}

	.poster-container .message {
		font-size: 2rem;
	}

	.qr-container img {
		width: 250px;
		height: 250px;
	}

	.post-navigation {
		flex-direction: column;
	}
}

/* ============================================
   Print Styles (Poster Page)
   ============================================ */
@media print {
	@page {
		margin: 0;
		size: letter portrait;
	}

	html,
	body {
		background-color: var(--bg-dark) !important;
		color: var(--text-white) !important;
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
		margin: 0 !important;
		padding: 0 !important;
		height: 100% !important;
	}

	.site-header,
	.site-footer,
	.print-button {
		display: none !important;
	}

	.poster-container {
		max-width: 100%;
		height: 100% !important;
		justify-content: flex-start !important;
		padding: 5rem 2rem 2rem 2rem !important;
	}

	.poster-container .logo-container {
		max-width: 350px !important;
	}

	.poster-container .message {
		font-size: 2.5rem !important;
	}

	.qr-container {
		padding: 1.25rem;
	}

	.qr-container img {
		width: 250px;
		height: 250px;
	}
}

/* ============================================
   Accessibility
   ============================================ */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Focus styles */
a:focus,
button:focus,
input:focus,
select:focus {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.card,
.post-card {
	animation: fadeIn 0.3s ease-out;
}
