/*
Theme Name: OTS-Hub
Author: WordPress Telex
Description: A warm, accessible block theme for the OTS-Hub digital safety resources site. Built with WCAG 2.2 AA compliance, optimized for low-bandwidth environments, featuring the Watchtower Warmth design direction.
Version: 0.1.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: ots-hub
Tags: block-theme, full-site-editing, accessibility-ready

OTS-Hub - Digital Safety Resources Theme
*/

/* Equal-height card layout */
.equal-cards > .wp-block-column {
	display: flex;
	flex-direction: column;
	flex-grow: 0;
}

.equal-cards > .wp-block-column > .wp-block-group {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

.equal-cards .cta-bottom {
	margin-top: auto;
	justify-content: center;
}

/* Remove default footer margin */
.wp-site-blocks > footer {
	margin-block-start: 0;
}

/* Audience pills row */
.audience-pills .wp-block-button .wp-block-button__link {
	padding: 0.4rem 1rem;
	border-radius: 100px;
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.audience-pills .wp-block-button.is-style-outline .wp-block-button__link {
	border-width: 1.5px;
}

/* Threat alert bar styling */
.threat-alert-bar {
	border-top: 3px solid #D25238;
}

.threat-alert-bar .wp-block-group {
	gap: 0.5rem;
}

/* Guide card hover effects */
.guide-card-link:hover,
.guide-card-link:focus-within {
	transform: translateY(-4px);
	box-shadow: 0 12px 32px rgba(12, 28, 44, 0.18);
}

.guide-card-link {
	transition: transform 0.25s ease, box-shadow 0.25s ease;
	text-decoration: none;
	display: block;
}

/* Header navigation links */
.header-nav a {
	transition: opacity 0.15s ease;
}

.header-nav a:hover,
.header-nav a:focus {
	opacity: 0.85;
}

/* Prominent navigation buttons in action bar */
.prominent-nav-btn .wp-block-button__link {
	transition: transform 0.15s ease, box-shadow 0.15s ease;
	min-height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.prominent-nav-btn .wp-block-button__link:hover,
.prominent-nav-btn .wp-block-button__link:focus {
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(12, 28, 44, 0.25);
}

/* Hero section kicker line */
.hero-kicker::before {
	content: '';
	display: inline-block;
	width: 28px;
	height: 2px;
	background-color: #40B2A4;
	margin-right: 0.75rem;
	vertical-align: middle;
}

/* Skip link styling */
.skip-to-content {
	position: absolute;
	top: -100%;
	left: 1rem;
	background: #EECA4A;
	color: #0C1C2C;
	padding: 0.75rem 1.25rem;
	font-weight: 700;
	text-decoration: none;
	border-radius: 0 0 6px 6px;
	z-index: 9999;
	font-size: 0.875rem;
}

.skip-to-content:focus {
	top: 0;
}

/* Focus visible styles for accessibility */
*:focus-visible {
	outline: 3px solid #EECA4A;
	outline-offset: 2px;
}

/* Card icon containers */
.card-icon-circle {
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Stat number styling */
.stat-number {
	line-height: 1;
}

/* Low-bandwidth: no unnecessary background images, minimal shadows */
@media (prefers-reduced-data: reduce) {
	.guide-card-link {
		box-shadow: none;
		border: 1px solid rgba(12, 28, 44, 0.15);
	}
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
	.guide-card-link {
		transition: none;
	}

	.audience-pills .wp-block-button .wp-block-button__link {
		transition: none;
	}
}

/* Mobile-first responsive adjustments */
@media (max-width: 781px) {
	.audience-pills .wp-block-buttons {
		justify-content: flex-start;
	}

	/* Stack hero columns on mobile */
	.wp-block-columns {
		flex-wrap: wrap;
	}

	/* Ensure touch targets are at least 44x44 */
	.wp-block-button__link,
	.wp-block-navigation-item__content {
		min-height: 44px;
		min-width: 44px;
	}

	/* Better spacing for mobile cards */
	.equal-cards > .wp-block-column {
		flex-basis: 100% !important;
	}

	/* Stat grid on mobile: 2 columns */
	.stat-number {
		font-size: 2rem !important;
	}
}

@media (max-width: 600px) {
	/* Prominent nav buttons wrap nicely on small screens */
	.prominent-nav-btn {
		flex: 1 1 calc(50% - 0.25rem);
	}

	.prominent-nav-btn .wp-block-button__link {
		width: 100%;
		text-align: center;
		justify-content: center;
	}
}