/*
Theme Name: Project Zero Drowning
Theme URI: https://projectzerodrowning.org
Author: Project Zero Drowning
Author URI: https://projectzerodrowning.org
Description: A clean, mission-driven full-site-editing (block) theme built for Project Zero Drowning, a non-profit dedicated to drowning prevention through free swim lessons, water-safety education, and community resources. Brand colors are drawn directly from the organization's logo: lifeguard green, ocean blue, sky blue, and alert red on deep navy. Includes a logo-left header with dropdown navigation, social links and a Donate button on the right, plus ready-to-use page patterns for The Crisis, About Us, Lessons Sign-up, Events, Contact, and Resources.
Requires at least: 6.5
Tested up to: 6.7
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: project-zero-drowning
Tags: full-site-editing, block-patterns, non-profit, charity, education, one-column, custom-colors, custom-logo, custom-menu, block-styles, wide-blocks, accessibility-ready
*/

/*
 * The visual design lives in theme.json. The rules below cover behaviour that
 * theme.json cannot express on its own: navigation dropdown polish, the social
 * bar / Donate button in the header, sticky header behaviour, and small-screen
 * adjustments.
 */

/* ---------- Skip link (accessibility) ---------- */
.skip-link.screen-reader-text {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 999999;
	padding: 0.75em 1.25em;
	background: var(--wp--preset--color--red);
	color: #fff !important;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	text-decoration: none;
	border-radius: 0 0 8px 0;
}
.skip-link.screen-reader-text:focus {
	left: 0;
}

/* ---------- Sticky site header ---------- */
.pzd-site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	box-shadow: 0 2px 16px rgba(12, 42, 68, 0.18);
	backdrop-filter: saturate(140%);
}

/* ---------- Primary navigation ---------- */
.wp-block-navigation {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
}
.pzd-site-header .wp-block-navigation a:where(:not(.wp-element-button)) {
	text-decoration: none;
}
.pzd-site-header .wp-block-navigation .wp-block-navigation-item__content {
	padding-block: 0.4rem;
	border-bottom: 2px solid transparent;
	transition: border-color 0.15s ease, color 0.15s ease;
}
.pzd-site-header .wp-block-navigation .wp-block-navigation-item:hover > .wp-block-navigation-item__content,
.pzd-site-header .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content {
	border-bottom-color: var(--wp--preset--color--sky);
}

/* Dropdown submenu styling */
.wp-block-navigation .wp-block-navigation-submenu .wp-block-navigation__submenu-container {
	border: none;
	border-top: 3px solid var(--wp--preset--color--red);
	border-radius: 0 0 10px 10px;
	box-shadow: 0 14px 32px rgba(12, 42, 68, 0.28);
	padding: 0.4rem 0;
	min-width: 16rem;
}
.wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: 0.55rem 1.1rem !important;
	border-bottom: none !important;
}
.wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item:hover {
	background: var(--wp--preset--color--surface);
}

/* ---------- Header social links + donate ---------- */
.pzd-header-actions {
	gap: 0.85rem;
}
.pzd-header-actions .wp-block-social-links {
	gap: 0.35rem;
}
.pzd-header-actions .wp-block-social-link {
	transition: transform 0.15s ease, opacity 0.15s ease;
}
.pzd-header-actions .wp-block-social-link:hover {
	transform: translateY(-2px);
	opacity: 0.85;
}

/* Donate button: alert-red, used via the "is-style-donate" / .pzd-donate class */
.wp-block-button.is-style-donate > .wp-block-button__link,
.pzd-donate .wp-block-button__link {
	background-color: var(--wp--preset--color--red) !important;
	color: #fff !important;
	border-radius: 999px !important;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	font-size: 0.85rem;
	box-shadow: 0 6px 18px rgba(151, 15, 17, 0.35);
}
.wp-block-button.is-style-donate > .wp-block-button__link:hover,
.pzd-donate .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--red-bright) !important;
}

/* Outline button variant for use on dark backgrounds */
.wp-block-button.is-style-outline-light > .wp-block-button__link {
	background: transparent !important;
	color: #fff !important;
	border: 2px solid rgba(255, 255, 255, 0.65) !important;
}
.wp-block-button.is-style-outline-light > .wp-block-button__link:hover {
	background: #fff !important;
	color: var(--wp--preset--color--navy) !important;
}

/* ---------- Cards / feature boxes ---------- */
.pzd-card {
	background: #fff;
	border: 1px solid rgba(12, 42, 68, 0.1);
	border-radius: 14px;
	box-shadow: 0 8px 24px rgba(12, 42, 68, 0.07);
	height: 100%;
}

/* Top accent rule used on section headings */
.pzd-eyebrow {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	font-size: 0.8rem;
	color: var(--wp--preset--color--ocean);
}

/* ---------- Footer ---------- */
.pzd-site-footer a {
	color: #dceaf4;
}
.pzd-site-footer a:hover {
	color: #fff;
}

/* ---------- Small screens ---------- */
@media (max-width: 781px) {
	.pzd-header-actions {
		width: 100%;
		justify-content: center;
	}
	.pzd-site-header {
		position: static;
	}
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; }
}
