/*
Theme Name: Crowdfunding Platform
Description: A clean and minimal WordPress block theme designed specifically for crowdfunding websites. Features accessibility compliance, responsive design, and compatibility with crowdfunding plugins.
Version: 0.13.5
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
Author: IgnitionDeck
Author URI: https://www.ignitiondeck.com
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: crowdfunding-platform
Tags: blog, one-column, two-columns, custom-colors, custom-logo, custom-menu, editor-style, featured-images, full-site-editing, block-patterns, rtl-language-support, sticky-post, threaded-comments, translation-ready, wide-blocks

Crowdfunding Platform is a modern, accessible WordPress block theme built specifically for creators, entrepreneurs, and organizations running crowdfunding campaigns. It provides essential tools while maintaining simplicity for non-technical users.
*/

/* ============================================
   TABLE OF CONTENTS
   ============================================
   1. CSS Custom Properties
   2. Base Styles & Resets
   3. Typography & Links
   4. Layout Components
      4.1 Header & Navigation
      4.2 Footer
      4.3 Columns & Grids
   5. Content Components
      5.1 Campaign Sections
      5.2 Progress Bars
      5.3 Cards & Rewards
   6. Utility Classes
      6.1 Spacing Classes
      6.2 Shadow & Border Classes
   7. Responsive Styles
      7.1 Mobile/Tablet (0-1023px)
      7.2 Desktop (1024px+)
      7.3 WordPress Overrides
   8. Block Style Variations
      8.1 Button Styles
      8.2 Group Styles
      8.3 Quote Styles
   ============================================ */

/* ============================================
   1. CSS CUSTOM PROPERTIES
   ============================================ */
:root {
	/* Breakpoints - System Constants */
	--constant-breakpoint-desktop: 1024px;

	/* Header Heights - System Constants */
	--constant-header-height-mobile: 82px;
	--constant-header-height-desktop: 75px;

	/* Admin Bar Heights - System Constants */
	--constant-admin-bar-desktop: 32px;
	--constant-admin-bar-mobile: 46px;

	/* Pattern Spacing Aliases - semantic alternatives to !important utility classes */
	--alias-pattern-spacing-small: var(--wp--preset--spacing--30);
	--alias-pattern-spacing-medium: var(--wp--preset--spacing--40);
	--alias-pattern-spacing-large: var(--wp--preset--spacing--50);
	--alias-pattern-spacing-xlarge: var(--wp--preset--spacing--60);
	--alias-pattern-spacing-xxlarge: var(--wp--preset--spacing--70);
}

/* ============================================
   2. BASE STYLES & RESETS
   ============================================ */

/* Keyboard Focus Styles - Enhanced for accessibility */
:where(.wp-site-blocks *:focus) {
	outline-width: var(--wp--custom--crowdfunding-platform--outline--width--medium);
	outline-style: solid;
	outline-offset: var(--wp--custom--crowdfunding-platform--outline--offset--positive);
}

/* Skip link styles (visible when focused) */
#wp-skip-link.skip-link.screen-reader-text:focus {
	background-color: var(--wp--preset--color--contrast) !important;
	border-radius: var(--wp--custom--crowdfunding-platform--spacing--xs) !important;
	box-shadow: var(--wp--custom--crowdfunding-platform--shadow--strong) !important;
	clip-path: none !important;
	color: var(--wp--preset--color--base) !important;
	display: block !important;
	font-size: 1rem !important;
	font-weight: 500 !important;
	height: auto !important;
	left: var(--wp--custom--crowdfunding-platform--spacing--sm) !important;
	line-height: normal !important;
	padding: var(--wp--custom--crowdfunding-platform--spacing--lg) var(--wp--custom--crowdfunding-platform--spacing--xl) !important;
	position: absolute !important;
	text-decoration: none !important;
	top: var(--wp--custom--crowdfunding-platform--spacing--md) !important;
	width: auto !important;
	z-index: var(--wp--custom--crowdfunding-platform--z-index--skip-link) !important;
}

/* ============================================
   3. TYPOGRAPHY & LINKS
   ============================================ */

/* Link underline styles for better visibility */
a {
	text-decoration-thickness: 1px;
	text-underline-offset: .15em;
}

/* Better focus visibility for buttons */
.wp-block-button__link:focus-visible {
	outline-width: var(--wp--custom--crowdfunding-platform--outline--width--medium);
	outline-style: solid;
	outline-offset: var(--wp--custom--crowdfunding-platform--outline--offset--medium);
}

/* Canonical button border-radius - Issue #131: Override WordPress default pill shape */
.wp-block-button__link {
	border-radius: var(--wp--custom--crowdfunding-platform--border--radius--small) !important;
	font-weight: var(--wp--custom--crowdfunding-platform--button--font-weight) !important;
	text-transform: none !important;
	transition: background-color var(--wp--custom--crowdfunding-platform--transition--medium),
	            transform var(--wp--custom--crowdfunding-platform--transition--medium),
	            box-shadow var(--wp--custom--crowdfunding-platform--transition--medium);
}

/* Canonical button hover effect - Issue #131: Consolidate button styles */
.wp-block-button__link:hover {
	background: color-mix(in srgb, var(--wp--preset--color--primary) var(--wp--custom--crowdfunding-platform--button--hover-opacity), transparent) !important;
	transform: var(--wp--custom--crowdfunding-platform--transform--lift-small);
	box-shadow: var(--wp--preset--shadow--medium);
}

/* Respect reduced motion preference - WCAG 2.1 Level AA */
@media (prefers-reduced-motion: reduce) {
	.wp-block-button__link,
	.wp-block-button__link:hover {
		transition: none;
		transform: none;
	}
}

/* ============================================
   4. LAYOUT COMPONENTS
   ============================================ */

/* --------------------------------------------
   4.1 Header & Navigation
   -------------------------------------------- */

/* Sticky header implementation */
.site-header-sticky {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: var(--wp--custom--crowdfunding-platform--z-index--header);
	box-shadow: var(--wp--custom--crowdfunding-platform--shadow--subtle) var(--wp--preset--color--accent-6);
	transition: box-shadow var(--wp--custom--crowdfunding-platform--transition--slow), top var(--wp--custom--crowdfunding-platform--transition--slow);
}

/* Add shadow when scrolled */
body.scrolled .site-header-sticky {
	box-shadow: var(--wp--custom--crowdfunding-platform--shadow--medium);
}

/* Body padding to account for fixed header */
body {
	padding-top: var(--constant-header-height-desktop);
}

/* Admin bar adjustments */
.admin-bar .site-header-sticky {
	top: var(--constant-admin-bar-desktop);
}

.admin-bar {
	padding-top: calc(var(--constant-header-height-desktop) + var(--constant-admin-bar-desktop));
}

/* Navigation spacing */
.wp-block-navigation .wp-block-navigation-item {
	margin: 0 0.25rem;
}

/* Navigation focus improvements */
.wp-block-navigation .wp-block-navigation-item .wp-block-navigation-item__content {
	outline-offset: var(--wp--custom--crowdfunding-platform--outline--offset--positive);
}

.wp-block-navigation .wp-block-navigation-submenu .wp-block-navigation-item:not(:last-child) {
	margin-bottom: var(--wp--custom--crowdfunding-platform--spacing--micro);
}

.wp-block-navigation .wp-block-navigation-item ul.wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	outline-offset: 0;
}


/* Logo stays fixed size - no shrinking */
.site-header-sticky .wp-block-site-logo {
	flex-shrink: 0;
}

/* Title can shrink and truncate naturally */
.site-header-sticky .wp-block-site-title {
	flex-shrink: 1;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Allow focus outline to be visible (overflow: hidden clips the outline otherwise) */
.site-header-sticky .wp-block-site-title:focus-within {
	overflow: visible;
}

/* Force header flex container to stay on one line - WordPress override needed */
.site-header-sticky .wp-block-group.alignwide {
	flex-wrap: nowrap !important;
	min-height: auto;
}

/* Navigation stays fixed size - no shrinking */
.site-header-sticky .wp-block-navigation {
	flex-shrink: 0;
	flex-wrap: nowrap;
	white-space: nowrap;
}

/* Ensure navigation links stay on one line - WordPress override needed */
.site-header-sticky .wp-block-navigation .wp-block-navigation__container {
	flex-wrap: nowrap !important;
}


/* --------------------------------------------
   4.2 Footer
   -------------------------------------------- */

/* Footer navigation - remove default indentation */
.footer-columns-70-30 .wp-block-navigation {
	padding-left: 0 !important;
	margin-left: 0 !important;
}

.footer-columns-70-30 .wp-block-navigation ul {
	padding-left: 0 !important;
	margin-left: 0 !important;
}

.footer-columns-70-30 .wp-block-navigation-item {
	margin-left: 0 !important;
}

/* --------------------------------------------
   4.3 Columns & Grids
   -------------------------------------------- */

/* Three equal columns layout - increased specificity instead of !important */
.wp-block-columns.three-column-equal > .wp-block-column {
	flex-basis: 33.33%;
	max-width: 33.33%;
}

/* ============================================
   5. CONTENT COMPONENTS
   ============================================ */

/* --------------------------------------------
   5.1 Campaign Sections
   -------------------------------------------- */

/* Campaign sections - apply margin to first section */
.campaign-description {
	margin-top: var(--wp--preset--spacing--50);
}

/* --------------------------------------------
   5.2 Shadow Preset Classes
   -------------------------------------------- */

/* Generate CSS classes for all shadow presets from theme.json */
.has-subtle-shadow {
	box-shadow: var(--wp--preset--shadow--subtle);
}

.has-small-shadow {
	box-shadow: var(--wp--preset--shadow--small);
}

.has-medium-shadow {
	box-shadow: var(--wp--preset--shadow--medium);
}

.has-large-shadow {
	box-shadow: var(--wp--preset--shadow--large);
}

.has-x-large-shadow {
	box-shadow: var(--wp--preset--shadow--x-large);
}

.has-card-shadow {
	box-shadow: var(--wp--preset--shadow--card);
}

.has-floating-shadow {
	box-shadow: var(--wp--preset--shadow--floating);
}

/* --------------------------------------------
   5.3 Blog Post Cards (PR #69 horizontal cards)
   -------------------------------------------- */

/* Blog and search template cards - consistent with campaign cards */
.wp-block-query .wp-block-group.has-card-shadow {
	transition: transform var(--wp--custom--crowdfunding-platform--transition--medium), box-shadow var(--wp--custom--crowdfunding-platform--transition--medium);
}

.wp-block-query .wp-block-group.has-card-shadow:hover {
	transform: var(--wp--custom--crowdfunding-platform--transform--lift);
	box-shadow: var(--wp--custom--crowdfunding-platform--shadow--elevated);
}

/* Post card horizontal layout - specific styling for PR #69 pattern */
.post-card-horizontal .wp-block-columns {
	align-items: stretch;
}

.post-card-image-column {
	flex-shrink: 0;
}

/* Enhanced hover effects for post cards */
.post-card-horizontal {
	transition: transform var(--wp--custom--crowdfunding-platform--transition--medium), box-shadow var(--wp--custom--crowdfunding-platform--transition--medium);
}

.post-card-horizontal:hover {
	transform: var(--wp--custom--crowdfunding-platform--transform--lift);
	box-shadow: var(--wp--custom--crowdfunding-platform--shadow--elevated);
}

/* Content column - uses flexbox for optimal content distribution */
.post-card-content-column {
	display: flex; /* Enables flexbox layout for content stacking */
	flex-direction: column; /* Stack content vertically */
	justify-content: space-between; /* Distributes content evenly in available height */
}

/* Metadata group styling for better visual hierarchy */
.post-card-meta-row {
	margin-bottom: var(--wp--preset--spacing--30); /* Consistent spacing below metadata */
}

/* Footer group pushes to bottom of card */
.post-card-footer {
	margin-top: auto; /* Pushes footer to bottom of flex container */
}

/* Mobile responsive improvements for blog cards - WordPress override needed */
@media (max-width: 767px) {
	.wp-block-columns.is-not-stacked-on-mobile {
		flex-direction: column !important;
	}
	
	.wp-block-columns.is-not-stacked-on-mobile .wp-block-column {
		flex-basis: 100% !important;
		margin-bottom: var(--alias-pattern-spacing-small);
	}
}

/* Post card horizontal - enhance WordPress defaults */
.post-card-horizontal .wp-block-post-featured-image {
	overflow: hidden;
	background: var(--wp--preset--color--accent-5);
}

.post-card-horizontal .wp-block-post-featured-image img {
	object-fit: cover;
}


/* Post card horizontal metadata styling - clean selectors without !important */
.post-card-horizontal .wp-block-post-date,
.post-card-horizontal .wp-block-post-author,
.post-card-horizontal .wp-block-post-terms {
	margin-block-start: var(--wp--preset--spacing--20);
	margin-block-end: 0;
}

/* Prevent author name wrapping in post cards */
.post-card-horizontal .wp-block-post-author {
	flex-shrink: 0;
	min-width: max-content;
}

/* Remove margins from elements inside flex containers in post cards */
.post-card-horizontal .is-layout-flex .wp-block-post-date,
.post-card-horizontal .is-layout-flex .wp-block-post-author,
.post-card-horizontal .is-layout-flex .wp-block-post-terms {
	margin-block-start: 0;
	margin-block-end: 0;
}

/* Category bullet separator for post cards */
.post-card-horizontal .wp-block-post-terms.taxonomy-category::before {
	content: "•";
	margin-right: 0.5rem;
	color: var(--wp--preset--color--secondary);
	font-size: var(--wp--preset--font-size--small);
}

/* Handle long category lists with ellipsis in post cards */
.post-card-horizontal .taxonomy-category.wp-block-post-terms.has-small-font-size {
	flex: 1;
	max-height: 1.2em;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	line-height: 1.2;
	min-width: 0;
	display: block;
}

/* Allow focus outline to be visible on category links */
.post-card-horizontal .taxonomy-category.wp-block-post-terms:focus-within {
	overflow: visible;
}

/* Handle long tag lists with ellipsis in post cards */
.post-card-horizontal .wp-block-post-terms.taxonomy-post_tag {
	max-height: 1.2em;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	line-height: 1.2;
	min-width: 0;
	flex-shrink: 1;
}

/* Allow focus outline to be visible on tag links */
.post-card-horizontal .wp-block-post-terms.taxonomy-post_tag:focus-within {
	overflow: visible;
}

/* Excerpt line-clamp for consistent 2-line descriptions - apply to inner paragraph */
.post-card-horizontal .wp-block-post-excerpt .wp-block-post-excerpt__excerpt {
	display: -webkit-box !important; /* !important needed to override WordPress core block display */
	-webkit-line-clamp: 2 !important;
	-webkit-box-orient: vertical !important;
	overflow: hidden !important;
	line-height: var(--wp--custom--crowdfunding-platform--typography--line-height--body) !important;
	min-height: calc(var(--wp--custom--crowdfunding-platform--typography--line-height--body) * 1em * 2) !important; /* Always reserve space for 2 lines */
	margin: 0 !important;
}

/* Allow focus outline to be visible on Read more links */
.post-card-horizontal .wp-block-post-excerpt .wp-block-post-excerpt__excerpt:focus-within {
	overflow: visible !important;
}

/* Content column fills full card height - specific to post-card-horizontal pattern */
.post-card-horizontal .wp-block-columns {
	min-height: var(--wp--custom--crowdfunding-platform--min-dimensions--card); /* Matches pattern's minHeight */
}

.post-card-content-column {
	display: flex;
	flex-direction: column;
	min-height: var(--wp--custom--crowdfunding-platform--min-dimensions--card);
}

/* Push footer content to bottom of card */
.post-card-footer {
	margin-top: auto;
}




/* Individual campaign sections */
.campaign-section {
	margin-bottom: var(--wp--preset--spacing--60);
	padding-bottom: var(--wp--preset--spacing--40);
}

/* Add subtle border between sections (except last) */
.campaign-section:not(:last-child) {
	border-bottom: 1px solid var(--wp--preset--color--accent-6);
}

/* Section headings */
.campaign-section h2 {
	color: var(--wp--preset--color--contrast);
}

/* FAQ question headings */
.campaign-faq h3 {
	margin-bottom: var(--wp--preset--spacing--20);
}

/* --------------------------------------------
   5.2 Progress Bars
   -------------------------------------------- */

.theme-progress-bar {
	background: var(--wp--custom--crowdfunding-platform--progress-bar--background);
	border: var(--wp--custom--crowdfunding-platform--border--width--thin) solid var(--wp--custom--crowdfunding-platform--progress-bar--border-color);
	border-radius: var(--wp--custom--crowdfunding-platform--progress-bar--border-radius);
	height: var(--wp--custom--crowdfunding-platform--progress-bar--height);
	margin-top: var(--wp--preset--spacing--20);
	overflow: hidden;
	position: relative;
	box-shadow: var(--wp--custom--crowdfunding-platform--shadow--inset);
}

.theme-progress-fill {
	position: relative;
	height: 100%;
	border-radius: var(--wp--custom--crowdfunding-platform--progress-bar--border-radius);
	transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
	background: linear-gradient(135deg, var(--wp--custom--crowdfunding-platform--progress-bar--fill, #2563eb) 0%, var(--wp--preset--color--accent, #10b981) 100%);
	background-size: calc(100% * 100 / max(1, var(--progress-value, 1))) 100%;
	background-position: 0 0;
	background-repeat: no-repeat;
	width: min(100%, calc(clamp(0, var(--progress-value, 0), 100) * 1%));
}

.theme-progress-fill::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 50%;
	background: linear-gradient(to bottom, rgba(255, 255, 255, var(--wp--custom--crowdfunding-platform--opacity--highlight)), transparent);
	border-radius: var(--wp--custom--crowdfunding-platform--progress-bar--border-radius) var(--wp--custom--crowdfunding-platform--progress-bar--border-radius) 0 0;
}

/* --------------------------------------------
   5.3 Cards & Rewards
   -------------------------------------------- */

/* Reward Card System */
.pattern-reward-card {
	border: var(--wp--custom--crowdfunding-platform--border--width--thin) solid var(--wp--preset--color--secondary);
	border-radius: var(--wp--custom--crowdfunding-platform--border--radius--card);
	padding: var(--wp--preset--spacing--40);
	margin-bottom: var(--alias-pattern-spacing-small);
	box-shadow: var(--wp--preset--shadow--card);
	background-color: var(--wp--preset--color--accent-5);
	transition: var(--wp--custom--crowdfunding-platform--transition--medium);
}

/* Featured reward card */
.pattern-reward-card.pattern-reward-card-featured {
	border-width: 2px;
	border-color: var(--wp--preset--color--primary);
}

/* WordPress sticky posts - enhanced color-only distinction */
.sticky > .wp-block-group {
	border: var(--wp--custom--crowdfunding-platform--border--width--thick) solid var(--wp--preset--color--primary) !important;
	background-color: var(--wp--preset--color--accent-5) !important;
	box-shadow: var(--wp--preset--shadow--card) !important;
}

/* Custom amount card */
.pattern-reward-card-custom {
	border: var(--wp--custom--crowdfunding-platform--border--width--thin) dashed var(--wp--preset--color--secondary);
	border-radius: var(--wp--custom--crowdfunding-platform--border--radius--card);
	padding: var(--wp--preset--spacing--40);
	margin-bottom: var(--alias-pattern-spacing-small);
	box-shadow: var(--wp--preset--shadow--card);
	background-color: var(--wp--preset--color--accent-5);
	transition: var(--wp--custom--crowdfunding-platform--transition--medium);
}

/* Campaign grid cards */
.pattern-campaign-card {
	border: var(--wp--custom--crowdfunding-platform--border--width--thin) solid var(--wp--preset--color--accent-6);
	border-radius: var(--wp--custom--crowdfunding-platform--border--radius--card);
	padding: var(--wp--preset--spacing--40);
	box-shadow: var(--wp--preset--shadow--card);
	background-color: var(--wp--preset--color--base);
	display: flex;
	flex-direction: column;
	transition: transform var(--wp--custom--crowdfunding-platform--transition--medium), box-shadow var(--wp--custom--crowdfunding-platform--transition--medium);
}

/* Card hover effect - Issue #117: Match IDCF block lift effect */
.pattern-campaign-card:hover {
	transform: var(--wp--custom--crowdfunding-platform--transform--lift);
	box-shadow: var(--wp--custom--crowdfunding-platform--shadow--elevated);
}

/* Campaign card title links - Issue #136: WCAG 2.1 AA compliance - links must be underlined */
.pattern-campaign-card h3 a,
.pattern-campaign-card .wp-block-heading a {
	color: var(--wp--preset--color--primary);
	text-decoration: underline;
	transition: color var(--wp--custom--crowdfunding-platform--transition--medium);
}

.pattern-campaign-card h3 a:hover,
.pattern-campaign-card .wp-block-heading a:hover {
	color: var(--wp--preset--color--accent);
	text-decoration: underline;
}

/* Campaign card button hover - removed special effect, now uses canonical hover (Issue #131) */

/* Masonry grid layout using CSS columns (widely supported) */
.campaign-masonry-grid {
	columns: 3;
	column-gap: var(--wp--preset--spacing--40);
	column-fill: balance;
}

.campaign-masonry-grid .pattern-campaign-card {
	-webkit-column-break-inside: avoid;
	-moz-column-break-inside: avoid;
	break-inside: avoid;
	margin-bottom: var(--wp--preset--spacing--40);
	width: 100%;
}

/* Regular grid layout with fixed-height cards (row-first ordering) */
.campaign-grid-layout {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(var(--wp--custom--crowdfunding-platform--min-dimensions--grid-column-desktop), 1fr));
	gap: var(--wp--preset--spacing--40);
	align-items: stretch; /* Ensure all grid items stretch to same height */
}

.campaign-grid-layout .pattern-campaign-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	margin-top: 0 !important; /* Override WordPress group block margins */
}

/* Description truncation with line-clamp for consistent card heights */
.campaign-grid-layout .pattern-campaign-card > p.has-text-color {
	display: -webkit-box !important; /* !important needed to override WordPress core flow-root */
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	line-height: var(--wp--custom--crowdfunding-platform--typography--line-height--body);
	min-height: calc(var(--wp--custom--crowdfunding-platform--typography--line-height--body) * 1em * 3); /* Always reserve space for 3 lines (line-height * 3) */
}


/* Campaign image container for badge overlay */
.campaign-image-container {
	position: relative;
}

/* Badge overlay positioning */
.badge-overlay {
	position: absolute;
	z-index: 10;
}

.badge-top-right {
	top: var(--wp--preset--spacing--20);
	right: var(--wp--preset--spacing--20);
}

.badge-bottom-left {
	bottom: var(--wp--preset--spacing--20);
	left: var(--wp--preset--spacing--20);
}

/* Campaign category badges */
.campaign-category-badge {
	background-color: var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--base);
	padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
	border-radius: var(--wp--custom--crowdfunding-platform--border--radius--pill);
	display: inline-block;
	font-weight: 500;
	font-size: var(--wp--preset--font-size--tiny);
	margin: 0;
	box-shadow: var(--wp--preset--shadow--small);
}

/* Campaign status badges */
.campaign-status-badge {
	background-color: var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--base);
	padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
	border-radius: var(--wp--custom--crowdfunding-platform--border--radius--pill);
	display: inline-block;
	font-weight: 500;
	font-size: var(--wp--preset--font-size--tiny);
	margin: 0;
	box-shadow: var(--wp--preset--shadow--small);
}

.campaign-status-badge.badge-staff-pick {
	background: var(--wp--preset--gradient--success-gradient);
	color: var(--wp--preset--color--base);
}

.campaign-status-badge.badge-successful {
	background: var(--wp--preset--gradient--success-gradient);
	color: var(--wp--preset--color--base);
}

/* Responsive: Desktop (1024px+), Tablet (768-1023px), Mobile (<768px) */
@media (min-width: 768px) and (max-width: 1023px) {
	.campaign-masonry-grid {
		columns: 2;
		column-gap: var(--wp--preset--spacing--50);
	}

	.campaign-grid-layout {
		grid-template-columns: repeat(auto-fill, minmax(var(--wp--custom--crowdfunding-platform--min-dimensions--grid-column-tablet), 1fr));
	}
}

@media (max-width: 767px) {
	.campaign-masonry-grid {
		columns: 1;
	}

	.campaign-grid-layout {
		grid-template-columns: 1fr;
	}

	/* Removed mobile gradient/rounded corners/centering for visual consistency
	 * Issue #117: Campaign images should match archive and IDCF grid styling
	 * on mobile - no decorative gradient overlay, no rounded corners, no centering */
}

/* Reward cards spacing */
.wp-site-blocks .wp-block-group.has-accent-5-background-color.has-background {
	margin-bottom: var(--alias-pattern-spacing-small);
}

/* ============================================
   6. UTILITY CLASSES
   ============================================ */

/* --------------------------------------------
   6.1 Spacing Classes
   -------------------------------------------- */

/* Heading Spacing - semantic alternatives to !important utilities */
.wp-block-heading.pattern-heading-spacing,
.pattern-heading-spacing {
	margin-bottom: var(--alias-pattern-spacing-large);
}

.wp-block-heading.pattern-heading-spacing-small,
.pattern-heading-spacing-small {
	margin-bottom: var(--alias-pattern-spacing-small);
}

.wp-block-heading.pattern-heading-spacing-large,
.pattern-heading-spacing-large {
	margin-bottom: var(--alias-pattern-spacing-xlarge);
}

/* Content Spacing - semantic alternatives to !important utilities */
.wp-block-paragraph.pattern-content-spacing,
.pattern-content-spacing {
	margin-bottom: var(--alias-pattern-spacing-medium);
}

.wp-block-paragraph.pattern-content-spacing-small,
.pattern-content-spacing-small {
	margin-bottom: var(--alias-pattern-spacing-small);
}

.wp-block-paragraph.pattern-content-spacing-large,
.pattern-content-spacing-large {
	margin-bottom: var(--alias-pattern-spacing-large);
}

/* Section/Group Spacing - semantic alternatives to !important utilities */
.wp-block-group.pattern-section-spacing,
.pattern-section-spacing {
	margin-bottom: var(--alias-pattern-spacing-large);
}

.wp-block-group.pattern-section-spacing-small,
.pattern-section-spacing-small {
	margin-bottom: var(--alias-pattern-spacing-small);
}

.wp-block-group.pattern-section-spacing-large,
.pattern-section-spacing-large {
	margin-bottom: var(--alias-pattern-spacing-xxlarge);
}

/* Card Spacing - semantic alternatives to !important utilities */
.wp-block-group.pattern-card-spacing,
.pattern-card-spacing {
	margin-bottom: var(--alias-pattern-spacing-medium);
}

.wp-block-group.pattern-card-spacing-small,
.pattern-card-spacing-small {
	margin-bottom: var(--alias-pattern-spacing-small);
}

/* List Spacing - semantic alternatives to !important utilities */
.wp-block-list.pattern-list-spacing,
.pattern-list-spacing {
	margin-bottom: var(--alias-pattern-spacing-medium);
}

/* Image Spacing - semantic alternatives to !important utilities */
.wp-block-image.pattern-content-spacing-small,
.pattern-content-spacing-small figure {
	margin-bottom: var(--alias-pattern-spacing-small);
}

/* --------------------------------------------
   6.2 Shadow & Border Classes
   -------------------------------------------- */

/* Shadow Enhancement - semantic alternatives to !important utilities */
.pattern-card-shadow {
	box-shadow: var(--wp--preset--shadow--card);
}

.pattern-medium-shadow {
	box-shadow: var(--wp--preset--shadow--medium);
}

/* Border Radius Enhancement - using custom properties for consistency */
.pattern-border-radius {
	border-radius: var(--wp--custom--crowdfunding-platform--border--radius--medium);
}

.pattern-border-radius-small {
	border-radius: var(--wp--custom--crowdfunding-platform--border--radius--small);
}

.pattern-border-radius-large {
	border-radius: var(--wp--custom--crowdfunding-platform--border--radius--large);
}

/* ============================================
   7. RESPONSIVE STYLES
   ============================================ */

/* --------------------------------------------
   7.1 Mobile/Tablet (0-1023px)
   -------------------------------------------- */
@media (max-width: 1023px) {
	/* Body padding adjustments */
	body {
		padding-top: var(--constant-header-height-mobile);
	}

	.admin-bar {
		padding-top: calc(var(--constant-header-height-mobile) + var(--constant-admin-bar-mobile));
	}

	.admin-bar .site-header-sticky {
		top: var(--constant-admin-bar-mobile);
	}
	
	/* WordPress flex justification classes */
	.is-content-justification-space-between {
		justify-content: space-between !important;
	}
	
	/* Header adjustments */
	.site-header-sticky .wp-block-group.alignwide {
		flex-wrap: nowrap;
		justify-content: space-between;
		align-items: center;
	}
	
	.site-header-sticky .wp-block-group.alignwide > .wp-block-group:first-child {
		flex: 0 1 auto;
		margin-bottom: 0;
	}
	
	.site-header-sticky .wp-block-site-title {
		font-size: var(--wp--preset--font-size--big) !important;
	}
	
	/* Force hamburger menu */
	.site-header-sticky .wp-block-navigation__responsive-container-open {
		display: block !important;
	}
	
	.site-header-sticky .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close {
		display: block !important;
	}
	
	.site-header-sticky .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-open {
		display: none !important;
	}
	
	.site-header-sticky .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) .wp-block-navigation__responsive-container-content .wp-block-navigation__container {
		display: none !important;
	}
	
	.site-header-sticky .wp-block-navigation .wp-block-navigation__responsive-container-open {
		display: flex !important;
	}
	
	.site-header-sticky .wp-block-navigation {
		flex: 0 0 auto;
		width: auto;
		margin-left: auto;
	}
	
	
	/* Mobile menu overlay styles */
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
		margin: 0;
		width: 100%;
	}
	
	.wp-block-navigation__responsive-container.is-menu-open {
		padding: 2rem;
	}
	
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
		align-items: flex-start;
	}
	
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
		display: block;
		padding: 1rem 0;
		width: 100%;
		border: none !important;
		outline: none !important;
		box-shadow: none !important;
		background: transparent !important;
		text-decoration: none;
		text-align: left;
	}
	
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:focus,
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:focus-visible {
		background: transparent !important;
		outline: var(--wp--custom--crowdfunding-platform--outline--width--medium) solid var(--wp--preset--color--primary) !important;
		outline-offset: var(--wp--custom--crowdfunding-platform--outline--offset--negative) !important;
	}

	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:hover {
		background: transparent !important;
	}
	
	/* Show mobile-only links in responsive overlay menu */
	.wp-block-navigation__responsive-container.is-menu-open .mobile-only-link {
		display: block !important;
	}
	
	.wp-block-navigation__responsive-container.is-menu-open .mobile-only-link:first-of-type {
		border-top: 1px solid var(--wp--preset--color--accent-6);
		margin-top: 1rem;
		padding-top: 2rem;
	}
	
	.wp-block-navigation__responsive-container.is-menu-open .mobile-primary .wp-block-navigation-item__content {
		font-weight: 500;
		color: var(--wp--preset--color--primary);
	}
	
	
	
	
	
	/* Footer columns stacked */
	.footer-columns-70-30 {
		display: flex !important;
		flex-direction: column !important;
	}
	
	.footer-columns-70-30 > .wp-block-column {
		flex-basis: 100% !important;
		max-width: 100% !important;
		margin-bottom: var(--wp--preset--spacing--40);
	}
	
	/* Reorder footer columns */
	.footer-columns-70-30 > .wp-block-column:first-child {
		order: 2;
		margin-bottom: 0;
	}
	
	.footer-columns-70-30 > .wp-block-column:nth-child(2) {
		order: 1;
	}
	
	/* Left align footer content */
	.footer-columns-70-30 .wp-block-column,
	.footer-columns-70-30 .wp-block-column > *,
	.footer-columns-70-30 .wp-block-group,
	.footer-columns-70-30 .wp-block-group > *,
	.footer-columns-70-30 .wp-block-site-logo,
	.footer-columns-70-30 .wp-block-site-title,
	.footer-columns-70-30 .wp-block-site-tagline,
	.footer-columns-70-30 .wp-block-paragraph,
	.footer-columns-70-30 .wp-block-heading,
	.footer-columns-70-30 .wp-block-social-links {
		text-align: left !important;
		align-items: flex-start !important;
	}
	
	.footer-columns-70-30 .wp-block-social-links {
		justify-content: flex-start !important;
	}
	
	.footer-columns-70-30 .wp-block-column .wp-block-group {
		align-items: flex-start !important;
	}
	
	.footer-columns-70-30 .wp-block-group.is-layout-constrained > * {
		margin-left: 0 !important;
		margin-right: 0 !important;
	}
	
	.footer-columns-70-30 .wp-block-site-logo {
		margin-left: 0 !important;
		margin-right: auto !important;
	}
}


/* --------------------------------------------
   7.2 Desktop (1024px+)
   -------------------------------------------- */
@media (min-width: 1024px) {
	/* Hide mobile-only navigation links on desktop (but not in responsive overlay) */
	.wp-block-navigation:not(.wp-block-navigation__responsive-container) .mobile-only-link {
		display: none !important;
	}
	
	/* Footer 70-30 layout */
	.footer-columns-70-30 > .wp-block-column:first-child {
		flex-basis: 70% !important;
		max-width: 70% !important;
	}
	
	.footer-columns-70-30 > .wp-block-column:nth-child(2) {
		flex-basis: 30% !important;
		max-width: 30% !important;
	}
	
}

/* --------------------------------------------
   7.3 WordPress Overrides
   -------------------------------------------- */


/* Override WordPress 781px column stacking */
@media (min-width: 782px) and (max-width: 1023px) {
	.footer-columns-70-30 {
		flex-direction: column !important;
	}
}

/* ============================================
   8. BLOCK STYLE VARIATIONS
   ============================================ */

/* 8.1 Button Styles - Customizing Core's Outline Style - WordPress override needed */
.wp-block-button.is-style-outline .wp-block-button__link {
	background-color: transparent !important;
	border: var(--wp--custom--crowdfunding-platform--border--width--thick) solid currentColor;
	color: var(--wp--preset--color--primary);
	transition: background-color var(--wp--custom--crowdfunding-platform--transition--fast),
	            color var(--wp--custom--crowdfunding-platform--transition--fast),
	            transform var(--wp--custom--crowdfunding-platform--transition--medium),
	            box-shadow var(--wp--custom--crowdfunding-platform--transition--medium);
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: color-mix(in srgb, var(--wp--preset--color--primary) var(--wp--custom--crowdfunding-platform--button--hover-opacity), transparent) !important;
	color: var(--wp--preset--color--base) !important;
	transform: var(--wp--custom--crowdfunding-platform--transform--lift-small);
	box-shadow: var(--wp--preset--shadow--medium);
}


/* 8.2 Group Styles */
.wp-block-group.is-style-crowdfunding-platform-card {
	border: var(--wp--custom--crowdfunding-platform--border--width--thin) solid var(--wp--preset--color--accent-5);
	border-radius: var(--wp--preset--spacing--20);
	padding: var(--wp--preset--spacing--40);
	box-shadow: var(--wp--custom--crowdfunding-platform--shadow--card-combined);
}

/* 8.3 Quote Styles */
.wp-block-quote.is-style-crowdfunding-platform-testimonial {
	border: none;
	padding: var(--wp--preset--spacing--40);
	text-align: center;
}

.wp-block-quote.is-style-crowdfunding-platform-testimonial p {
	font-size: var(--wp--preset--font-size--big);
	font-style: italic;
	margin-bottom: var(--wp--preset--spacing--30);
}

.wp-block-quote.is-style-crowdfunding-platform-testimonial cite {
	font-style: normal;
	font-weight: 500;
	color: var(--wp--preset--color--contrast);
}

/* 8.4 Pagination Styles */
.wp-block-query-pagination {
	gap: var(--wp--preset--spacing--30) !important;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
	margin-top: var(--wp--preset--spacing--60) !important;
}

/* Current page styling */
.wp-block-query-pagination .wp-block-query-pagination-numbers .page-numbers.current {
	background-color: var(--wp--preset--color--primary) !important;
	color: var(--wp--preset--color--base) !important;
	font-weight: 500;
	text-decoration: none;
}

/* Pagination links */
.wp-block-query-pagination .wp-block-query-pagination-numbers .page-numbers {
	color: var(--wp--preset--color--contrast) !important;
	padding: var(--wp--preset--spacing--20) !important;
	text-decoration: none;
	font-size: var(--wp--preset--font-size--base);
	font-weight: 500;
	transition: all 0.15s ease;
	border-radius: var(--wp--custom--crowdfunding-platform--spacing--xs);
	min-width: var(--wp--custom--crowdfunding-platform--min-dimensions--button);
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.wp-block-query-pagination .wp-block-query-pagination-numbers .page-numbers:hover {
	background-color: var(--wp--preset--color--accent-5) !important;
	color: var(--wp--preset--color--primary) !important;
}

/* Previous/Next links */
.wp-block-query-pagination-previous a,
.wp-block-query-pagination-next a {
	color: var(--wp--preset--color--primary) !important;
	padding: var(--wp--preset--spacing--20) !important;
	text-decoration: none;
	font-size: var(--wp--preset--font-size--base);
	font-weight: 500;
	transition: all 0.15s ease;
	border-radius: var(--wp--custom--crowdfunding-platform--spacing--xs);
}

.wp-block-query-pagination-previous a:hover,
.wp-block-query-pagination-next a:hover {
	background-color: var(--wp--preset--color--accent-5) !important;
}

/* Responsive pagination */
@media (max-width: 767px) {
	.wp-block-query-pagination {
		gap: var(--wp--preset--spacing--30) !important;
	}
	
	/* Hide page numbers on mobile */
	.wp-block-query-pagination-numbers {
		display: none;
	}
}