/*
Theme Name: QRA Minimal
Theme URI: https://qracs.com
Author: Seth Howell
Author URI: https://qracs.com
Description: A dark, high-contrast block theme for QRA Computer Services. Fast, accessible, and locally focused.
Version: 1.0.0
Requires at least: 6.2
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: qra-minimal
Domain Path: /languages
Tags: block-theme, dark-mode, high-contrast, responsive, fast

QRA Minimal - The Neighborhood Expert. Dark. Fast. Locally Rooted.
*/

/* ========================================
   ROOT & GLOBAL RESETS
   ======================================== */

html {
	scroll-behavior: smooth;
	box-sizing: border-box;
	overflow-x: hidden;
}

body,
html {
	overflow-x: hidden;
	max-width: 100vw;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

/* ========================================
   BASE COLOR & TYPOGRAPHY
   ======================================== */

body {
	background-color: #1a1a1a;
	color: #ffffff;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	font-size: 1rem;
	line-height: 1.6;
	margin: 0;
	padding: 0;
}

h1, h2, h3, h4, h5, h6 {
	line-height: 1.2;
	font-weight: 600;
	margin-top: 1.5rem;
	margin-bottom: 1rem;
	color: #ffffff;
}

h1 {
	font-size: 3rem;
}

h2 {
	font-size: 2.5rem;
}

h3 {
	font-size: 1.5rem;
}

h4 {
	font-size: 1.25rem;
}

p {
	margin: 0 0 1rem 0;
}

a {
	color: #0066cc;
	text-decoration: none;
	transition: color 0.3s ease;
}

a:hover,
a:focus {
	color: #0084ff;
	text-decoration: underline;
	outline: none;
}

a:focus {
	outline: 2px solid #0066cc;
	outline-offset: 2px;
}

/* ========================================
   MAIN CONTAINER & LAYOUT CONSTRAINTS
   ======================================== */

.wp-site-blocks {
	max-width: 100%;
	overflow-x: hidden;
}

.wp-block {
	max-width: 100%;
	overflow-x: hidden;
}

main {
	max-width: 100%;
	overflow-x: hidden;
}

/* ========================================
   HERO SECTION & TOPOGRAPHIC MAP
   ======================================== */

.hero-topo-map {
	position: relative;
	background-color: #0d0d0d;
	padding: 4rem 2rem;
	min-height: 500px;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	overflow: hidden;
	z-index: 1;
}

/* SVG Topographic Background - Digital Circuitry Map */
.hero-topo-map::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 600'%3E%3Crect width='1200' height='600' fill='%230d0d0d'/%3E%3C/svg%3E");
	background-size: cover;
	background-position: center;
	z-index: 0;
	opacity: 0.6;
}

.hero-topo-map > * {
	position: relative;
	z-index: 2;
}

.hero-content {
	position: relative;
	z-index: 2;
	max-width: 800px;
	margin: 0 auto;
}

.hero-content h1 {
	font-size: 2.5rem;
	font-weight: 700;
	margin-bottom: 1.5rem;
	color: #ffffff;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-content p {
	font-size: 1.25rem;
	margin-bottom: 2rem;
	color: #e0e0e0;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* ========================================
   HEADER & NAVIGATION
   ======================================== */

header {
	background-color: #1a1a1a;
	border-bottom: 1px solid #333333;
	padding: 1rem 2rem;
	position: sticky;
	top: 0;
	z-index: 100;
	overflow-x: hidden;
	max-width: 100vw;
}

.header-container {
	display: flex;
	justify-content: space-between;
	align-items: center;
	max-width: 1200px;
	margin: 0 auto;
	gap: 2rem;
}

.logo {
	font-size: 1.5rem;
	font-weight: 700;
	color: #0066cc;
	text-decoration: none;
	white-space: nowrap;
}

.logo:hover {
	color: #0084ff;
}

nav {
	flex: 1;
	display: flex;
	justify-content: center;
	gap: 2rem;
}

nav a {
	color: #ffffff;
	font-size: 0.95rem;
	font-weight: 500;
	transition: color 0.3s ease;
}

nav a:hover {
	color: #0066cc;
}

/* ========================================
   PANIC BUTTON (CALL NOW)
   ======================================== */

.panic-button {
	background-color: #ff6b35;
	color: #ffffff;
	border: 3px solid #ff6b35;
	padding: 0.75rem 1.5rem;
	font-size: 0.95rem;
	font-weight: 700;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	border-radius: 4px;
	transition: all 0.3s ease;
	white-space: nowrap;
	display: inline-block;
	box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.panic-button:hover {
	background-color: #ff8a52;
	border-color: #ff8a52;
	box-shadow: 0 4px 12px rgba(255, 107, 53, 0.5);
	transform: translateY(-2px);
	color: #ffffff;
	text-decoration: none;
}

.panic-button:focus {
	outline: 2px solid #ff6b35;
	outline-offset: 2px;
}

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

footer {
	background-color: #0d0d0d;
	border-top: 1px solid #333333;
	padding: 3rem 2rem 1rem;
	color: #cccccc;
	overflow-x: hidden;
	max-width: 100vw;
}

.footer-container {
	max-width: 1200px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 2rem;
	margin-bottom: 2rem;
}

.footer-section h3 {
	font-size: 1.15rem;
	margin-top: 0;
	margin-bottom: 1.5rem;
	color: #ffffff;
}

.footer-section ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.footer-section li {
	margin-bottom: 0.5rem;
}

.footer-section a {
	color: #0066cc;
}

.footer-section a:hover {
	color: #0084ff;
}

.footer-bottom {
	max-width: 1200px;
	margin: 0 auto;
	text-align: center;
	padding-top: 2rem;
	border-top: 1px solid #333333;
	color: #888888;
	font-size: 0.9rem;
}

/* ========================================
   SERVICES GRID
   ======================================== */

.services-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 2rem;
	padding: 2rem;
}

.service-card {
	background-color: #252525;
	border: 1px solid #333333;
	border-radius: 4px;
	padding: 2rem;
	transition: all 0.3s ease;
}

.service-card:hover {
	border-color: #0066cc;
	background-color: #2a2a2a;
	box-shadow: 0 4px 12px rgba(0, 102, 204, 0.2);
	transform: translateY(-2px);
}

.service-card h3 {
	margin-top: 0;
	color: #0066cc;
}

.service-card p {
	margin-bottom: 1.5rem;
	color: #e0e0e0;
}

.service-badge {
	display: inline-block;
	background-color: #0066cc;
	color: #ffffff;
	padding: 0.5rem 1rem;
	border-radius: 4px;
	font-size: 0.85rem;
	font-weight: 600;
	margin-right: 0.5rem;
	margin-bottom: 0.5rem;
	text-transform: uppercase;
}

.service-badge.discount {
	background-color: #ff6b35;
}

.service-badge.free {
	background-color: #00cc88;
}

/* ========================================
   NOTICE BAR (ALERT)
   ======================================== */

.notice-bar {
	background-color: #004488;
	color: #ffffff;
	padding: 1rem 2rem;
	border-bottom: 3px solid #ff6b35;
	font-weight: 500;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
	overflow-x: hidden;
	max-width: 100vw;
	transition: opacity 0.3s ease, max-height 0.3s ease;
}

/* Hide notice bar when there are no active alerts */
.notice-bar[data-has-alert="false"] {
	display: none;
}

.notice-bar-text {
	flex: 1;
	min-width: 250px;
}

.notice-bar-close {
	background: none;
	border: none;
	color: #ffffff;
	font-size: 1.5rem;
	cursor: pointer;
	padding: 0;
	transition: color 0.3s ease;
	flex-shrink: 0;
}

.notice-bar-close:hover {
	color: #ff6b35;
}

/* ========================================
   BLOG / TIPS & GUIDES STYLING
   ======================================== */

.blog-feed {
	background-color: #0d0d0d;
	min-height: 400px;
}

.post-item {
	transition: all 0.3s ease;
	padding-top: 2rem;
}

.post-item:hover {
	padding-left: 1rem;
	border-left: 3px solid #0066cc;
}

.post-item h2 {
	margin-top: 0;
	margin-bottom: 0.5rem;
	color: #0066cc;
}

.post-item h2 a {
	color: #0066cc;
	transition: color 0.3s ease;
}

.post-item h2 a:hover {
	color: #0084ff;
	text-decoration: underline;
}

.post-meta {
	display: flex;
	gap: 1rem;
	margin-bottom: 1rem;
	color: #888888;
	font-size: 0.9rem;
	flex-wrap: wrap;
}

.post-meta a {
	color: #888888;
	text-decoration: none;
	border: 1px solid #444444;
	padding: 0.25rem 0.5rem;
	border-radius: 3px;
	transition: all 0.3s ease;
}

.post-meta a:hover {
	color: #0066cc;
	border-color: #0066cc;
}

.wp-block-post-excerpt__excerpt {
	color: #cccccc;
	margin-bottom: 1rem;
	line-height: 1.6;
}

/* Pagination styling */
.wp-block-query-pagination {
	display: flex;
	justify-content: center;
	gap: 1rem;
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 1px solid #333333;
}

.wp-block-query-pagination a,
.wp-block-query-pagination span {
	padding: 0.5rem 1rem;
	border: 1px solid #333333;
	color: #0066cc;
	text-decoration: none;
	border-radius: 4px;
	transition: all 0.3s ease;
}

.wp-block-query-pagination a:hover {
	background-color: #0066cc;
	color: #ffffff;
	border-color: #0066cc;
}

.wp-block-query-pagination .wp-element-button {
	background-color: #004488;
	color: #ffffff;
	border: 1px solid #004488;
}

/* Blog sidebar */
.blog-sidebar {
	background-color: #252525;
	border-top: 3px solid #0066cc;
	margin-top: 2rem;
}

.blog-sidebar h2 {
	margin-top: 0;
	color: #0066cc;
}

/* ========================================
   REMOTE HELP FUNNEL PAGE STYLING
   ======================================== */

.funnel-hero {
	background: linear-gradient(135deg, #0d0d0d 0%, #252525 100%);
	border-bottom: 3px solid #ff6b35;
	text-align: center;
}

.funnel-hero h1 {
	margin: 0 0 1rem 0;
	color: #ffffff;
	font-size: 2.5rem;
}

.funnel-hero p {
	font-size: 1.1rem;
	color: #e0e0e0;
	margin: 0;
}

.funnel-container {
	max-width: 700px;
	margin: 3rem auto;
}

.funnel-step {
	background-color: #252525;
	padding: 2rem;
	border-radius: 4px;
	border: 1px solid #333333;
	margin-bottom: 2rem;
	transition: all 0.3s ease;
}

.funnel-step:hover {
	border-color: #0066cc;
	box-shadow: 0 4px 12px rgba(0, 102, 204, 0.1);
}

.funnel-step h2 {
	margin-top: 0;
	margin-bottom: 1rem;
	color: #0066cc;
	font-size: 1.5rem;
}

.funnel-step h3 {
	margin-top: 0;
	color: #0066cc;
}

.funnel-step ul {
	list-style: none;
	padding: 0;
	margin: 0 0 1.5rem 0;
}

.funnel-step li {
	margin-bottom: 1rem;
	padding-left: 1rem;
	line-height: 1.6;
	color: #e0e0e0;
}

#remote-code {
	font-size: 1.5rem;
	letter-spacing: 2px;
	text-align: center;
	font-weight: 600;
	text-transform: uppercase;
	padding: 1rem;
	background-color: #1a1a1a;
	border: 2px solid #0066cc;
	color: #0066cc;
}

#remote-code:focus {
	outline: none;
	border-color: #0084ff;
	box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.2);
}

.final-cta-funnel {
	background-color: #252525;
	border-top: 3px solid #0066cc;
	text-align: center;
	padding: 2rem;
}

.final-cta-funnel p {
	margin: 0;
	color: #888888;
	font-size: 0.95rem;
}

/* ========================================
   CONTACT PAGE STYLING
   ======================================== */

.page-header {
	border-bottom: 3px solid #0066cc;
}

.page-header h1 {
	margin-top: 0;
	margin-bottom: 1rem;
}

.page-header p {
	font-size: 1.1rem;
	color: #e0e0e0;
}

/* Contact columns layout */
.wp-block-columns {
	gap: 2rem;
}

.wp-block-column {
	background-color: #1a1a1a;
	border-radius: 4px;
	border: 1px solid #333333;
}

.wp-block-column h2 {
	margin-top: 0;
	padding-bottom: 1rem;
	border-bottom: 2px solid #0066cc;
	color: #0066cc;
}

.wp-block-column h3 {
	margin-top: 2rem;
	margin-bottom: 1rem;
	color: #0066cc;
}

.wp-block-column ul {
	list-style: none;
	padding: 0;
	margin: 0 0 1.5rem 0;
}

.wp-block-column li {
	margin-bottom: 0.75rem;
	line-height: 1.6;
}

.wp-block-column a {
	color: #0066cc;
	text-decoration: none;
	transition: color 0.3s ease;
}

.wp-block-column a:hover {
	color: #0084ff;
	text-decoration: underline;
}

.contact-form {
	background-color: #252525;
	border: 1px solid #333333;
	padding: 2rem;
	border-radius: 4px;
}

.form-group {
	margin-bottom: 1.5rem;
}

.form-group label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 500;
	color: #ffffff;
}

.form-group input,
.form-group textarea,
.form-group select {
	width: 100%;
	padding: 0.75rem;
	background-color: #1a1a1a;
	color: #ffffff;
	border: 1px solid #333333;
	border-radius: 4px;
	font-family: inherit;
	font-size: 1rem;
	transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
	outline: none;
	border-color: #0066cc;
	box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.form-group textarea {
	resize: vertical;
	min-height: 120px;
}

.form-submit {
	background-color: #0066cc;
	color: #ffffff;
	border: 2px solid #0066cc;
	padding: 0.75rem 2rem;
	font-size: 1rem;
	font-weight: 600;
	text-transform: uppercase;
	cursor: pointer;
	border-radius: 4px;
	transition: all 0.3s ease;
	width: 100%;
}

.form-submit:hover {
	background-color: #0084ff;
	border-color: #0084ff;
	box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.form-submit:focus {
	outline: 2px solid #0066cc;
	outline-offset: 2px;
}

/* ========================================
   BUTTON STYLES (GENERAL)
   ======================================== */

.wp-block-button__link,
.wp-block-button .wp-block-button__link {
	background-color: #0066cc;
	color: #ffffff;
	border: 2px solid #0066cc;
	padding: 0.75rem 1.5rem;
	font-weight: 600;
	text-transform: uppercase;
	border-radius: 4px;
	transition: all 0.3s ease;
	text-decoration: none;
}

.wp-block-button__link:hover,
.wp-block-button .wp-block-button__link:hover {
	background-color: #0084ff;
	border-color: #0084ff;
	text-decoration: none;
}

/* ========================================
   MOBILE RESPONSIVE CONSTRAINTS (< 600px)
   ======================================== */

@media (max-width: 599px) {
	html, body {
		overflow-x: hidden;
		max-width: 100vw;
	}

	.header-container {
		flex-direction: column;
		gap: 1rem;
	}

	nav {
		flex-direction: column;
		width: 100%;
		gap: 1rem;
	}

	nav a {
		width: 100%;
		text-align: center;
		padding: 0.75rem;
		background-color: #252525;
		border-radius: 4px;
	}

	.panic-button {
		width: 100%;
		padding: 1rem;
		font-size: 1rem;
		text-align: center;
	}

	.logo {
		width: 100%;
		text-align: center;
	}

	h1 {
		font-size: 2rem;
	}

	h2 {
		font-size: 1.75rem;
	}

	h3 {
		font-size: 1.25rem;
	}

	.hero-content h1 {
		font-size: 1.75rem;
	}

	.hero-content p {
		font-size: 1rem;
	}

	.hero-topo-map {
		padding: 2rem 1rem;
		min-height: 350px;
	}

	/* Trust section - stack vertically */
	.trust-section {
		padding: 2rem 1rem !important;
	}

	.trust-section h2 {
		margin-bottom: 1.5rem;
	}

	/* Services grid - single column */
	.services-grid {
		grid-template-columns: 1fr;
		gap: 1.5rem;
		padding: 1rem;
	}

	.service-card {
		padding: 1.5rem;
	}

	.service-card h3 {
		margin-top: 0;
		margin-bottom: 1rem;
	}

	.service-badge {
		display: block;
		width: 100%;
		text-align: center;
		margin-bottom: 0.75rem;
		margin-right: 0;
	}

	/* Footer - single column */
	.footer-container {
		grid-template-columns: 1fr;
		gap: 1.5rem;
		padding: 1rem;
	}

	.footer-section {
		text-align: center;
	}

	.footer-section ul {
		text-align: center;
	}

	/* Notice bar - stack vertically */
	.notice-bar {
		flex-direction: column;
		align-items: flex-start;
		gap: 1rem;
		padding: 1rem;
	}

	.notice-bar-text {
		width: 100%;
		min-width: auto;
	}

	.notice-bar-close {
		align-self: flex-end;
	}

	/* Contact form - full width */
	.contact-form {
		padding: 1.5rem;
	}

	.form-submit,
	.panic-button {
		padding: 1rem;
		font-size: 1rem;
	}

	.wp-block-buttons {
		flex-direction: column;
		gap: 0.75rem;
	}

	.wp-block-button {
		width: 100%;
	}

	.wp-block-button__link {
		display: block;
		width: 100%;
		text-align: center;
		padding: 1rem 0.75rem;
	}

	/* Paragraphs - tighter margins on mobile */
	p {
		margin-bottom: 0.75rem;
	}

	/* Contact page - columns stack on mobile */
	.wp-block-columns {
		flex-direction: column;
		gap: 1rem;
	}

	.wp-block-column {
		flex-basis: 100% !important;
		padding: 1.5rem !important;
	}

	.wp-block-column h2 {
		font-size: 1.5rem;
	}

	.wp-block-column h3 {
		font-size: 1.1rem;
		margin-top: 1.5rem;
	}

	.page-header {
		padding: 2rem 1rem !important;
	}

	.page-header h1 {
		font-size: 1.75rem;
	}
}

/* ========================================
   TABLET RESPONSIVE (600px - 900px)
   ======================================== */

@media (min-width: 600px) and (max-width: 899px) {
	.hero-content h1 {
		font-size: 2rem;
	}

	.services-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.footer-container {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* ========================================
   DESKTOP (> 900px)
   ======================================== */

@media (min-width: 900px) {
	.header-container {
		max-width: 1200px;
	}

	.services-grid {
		grid-template-columns: repeat(3, 1fr);
	}

	.footer-container {
		grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	}
}

/* ========================================
   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-width: 0;
}

:focus-visible {
	outline: 2px solid #0066cc;
	outline-offset: 2px;
}

/* Ensure proper color contrast for all text */
@media (prefers-contrast: more) {
	body {
		color: #ffffff;
	}

	a {
		color: #0066cc;
		text-decoration: underline;
	}

	.service-badge {
		border: 1px solid #ffffff;
	}
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
	header,
	footer,
	.notice-bar,
	.panic-button {
		display: none;
	}

	body {
		background-color: #ffffff;
		color: #000000;
	}

	a {
		color: #0000ee;
		text-decoration: underline;
	}
}

/* ========================================
   INTERNAL PAGE DEPTH & SPACING
   ======================================== */

body:not(.home) .wp-site-blocks,
body.blog .wp-site-blocks {
	padding: 2rem 5vw;
	background:
		radial-gradient(1200px 600px at 50% -10%, rgba(0, 86, 179, 0.18) 0%, rgba(0, 86, 179, 0.08) 35%, rgba(0, 86, 179, 0) 72%),
		#1a1a1a;
}

@media (max-width: 600px) {
	body:not(.home) .wp-site-blocks,
	body.blog .wp-site-blocks {
		padding: 1.5rem 5vw;
	}
}
