/*
Theme Name: SPS
Theme URI: https://example.org/sps
Author: SPS
Author URI: https://example.org
Description: SPS is a versatile, ready-to-go WordPress block theme built for non-profits and NGOs in India. It is a full Site Editor (FSE) theme with a modern teal & coral design, an automatic starter setup that creates every page an NGO needs (About, Programs, Causes, Impact, Get Involved, Volunteer, Donate, Events, Gallery, Blog, Contact, plus India-specific 80G/12A, FCRA, CSR and Transparency pages), a configured navigation menu, header, footer, and a fully block-editable homepage. Includes an Annual Reports content type and logo placeholders you can swap for your own brand.
Requires at least: 6.5
Tested up to: 7.0
Requires PHP: 7.4
Version: 2.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sps
Tags: full-site-editing, block-patterns, non-profit, blog, one-column, two-columns, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, accessibility-ready, wide-blocks, block-styles, editor-style
*/

/* -------------------------------------------------------------------------
 * SPS — supplementary front-end styles.
 * The bulk of design tokens live in theme.json. This file adds polish that
 * is awkward to express purely through block settings: sticky header,
 * card shadows, hover motion, list check-marks, and footer link colours.
 * ---------------------------------------------------------------------- */

:root {
	--sps-shadow-sm: 0 6px 16px rgba(22, 48, 46, 0.06);
	--sps-shadow-md: 0 18px 40px rgba(22, 48, 46, 0.10);
	--sps-shadow-lg: 0 30px 70px rgba(22, 48, 46, 0.14);
	--sps-ring: 0 0 0 3px rgba(241, 95, 76, 0.4);
}

body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

a:focus-visible,
button:focus-visible,
.wp-block-button__link:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	outline: none;
	box-shadow: var(--sps-ring);
}

/* Sticky, frosted site header ------------------------------------------- */
.sps-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(247, 245, 241, 0.86);
	-webkit-backdrop-filter: saturate(160%) blur(12px);
	backdrop-filter: saturate(160%) blur(12px);
	border-bottom: 1px solid rgba(22, 48, 46, 0.08);
}

.admin-bar .sps-header {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .sps-header {
		top: 46px;
	}
}

.sps-header .wp-block-navigation a:where(:not(.wp-element-button)) {
	text-decoration: none;
	font-weight: 600;
}

.sps-header .wp-block-navigation a:where(:not(.wp-element-button)):hover {
	color: var(--wp--preset--color--accent-dark);
}

/* Cards ----------------------------------------------------------------- */
.sps-card {
	background: var(--wp--preset--color--white);
	border: 1px solid rgba(22, 48, 46, 0.08);
	border-radius: 20px;
	box-shadow: var(--sps-shadow-sm);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
	height: 100%;
}

.sps-card.is-hoverable:hover {
	transform: translateY(-4px);
	box-shadow: var(--sps-shadow-md);
}

.sps-shadow {
	box-shadow: var(--sps-shadow-md);
}

.sps-shadow-lg {
	box-shadow: var(--sps-shadow-lg);
}

/* Eyebrow / pill label -------------------------------------------------- */
.sps-eyebrow {
	display: inline-block;
	font-size: 0.8rem;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.wp-block-button.is-style-pill .wp-block-button__link {
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-size: 0.8rem;
}

/* Icon / number badge --------------------------------------------------- */
.sps-icon-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3.25rem;
	height: 3.25rem;
	border-radius: 16px;
	font-size: 1.5rem;
	line-height: 1;
}

/* Hover lift on buttons ------------------------------------------------- */
.wp-block-button__link {
	transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.wp-block-button__link:hover {
	transform: translateY(-2px);
	box-shadow: var(--sps-shadow-sm);
}

/* Outline button style -------------------------------------------------- */
.wp-block-button.is-style-outline .wp-block-button__link {
	border-width: 2px;
	font-weight: 700;
}

/* Check-mark lists (used in cause / volunteer pages) -------------------- */
.sps-checklist ul,
ul.sps-checklist {
	list-style: none;
	margin: 0;
	padding: 0;
}

.sps-checklist ul li,
ul.sps-checklist li {
	position: relative;
	padding-left: 1.9rem;
	margin-bottom: 0.7rem;
}

.sps-checklist ul li::before,
ul.sps-checklist li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.15em;
	width: 1.25rem;
	height: 1.25rem;
	border-radius: 50%;
	background: var(--wp--preset--color--primary-light);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f766e' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 0.8rem;
}

/* Logo placeholder sizing ---------------------------------------------- */
.wp-block-site-logo img {
	border-radius: 12px;
}

.wp-block-site-logo.is-default-size img {
	width: 168px;
	height: auto;
}

/* Posts / query loop cards --------------------------------------------- */
.wp-block-post-template.is-layout-grid {
	gap: 1.5rem;
}

.sps-post-card .wp-block-post-featured-image {
	margin-bottom: 0;
}

.sps-post-card .wp-block-post-featured-image img {
	border-radius: 16px 16px 0 0;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	width: 100%;
}

/* Annual report shortcode grid ----------------------------------------- */
.sps-reports-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.5rem;
}

.sps-report-card {
	background: var(--wp--preset--color--white);
	border: 1px solid rgba(22, 48, 46, 0.08);
	border-radius: 18px;
	box-shadow: var(--sps-shadow-sm);
	padding: 1.6rem;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.sps-report-card .sps-report-year {
	display: inline-flex;
	align-self: flex-start;
	align-items: center;
	border-radius: 999px;
	background: var(--wp--preset--color--accent-light);
	color: var(--wp--preset--color--accent-dark);
	font-size: 0.8rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	padding: 0.3rem 0.7rem;
}

.sps-report-card h3 {
	margin: 0;
	font-size: 1.4rem;
}

.sps-report-card p {
	color: var(--wp--preset--color--slate);
	margin: 0;
	flex: 1 0 auto;
}

.sps-report-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
}

.sps-report-actions a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.7rem;
	padding: 0.6rem 1.2rem;
	border-radius: 999px;
	font-weight: 700;
	text-decoration: none;
}

.sps-report-actions .sps-btn-primary {
	background: var(--wp--preset--color--primary);
	color: #fff;
}

.sps-report-actions .sps-btn-secondary {
	background: var(--wp--preset--color--primary-light);
	color: var(--wp--preset--color--primary-dark);
}

.sps-empty-state {
	padding: 1.5rem;
	border-radius: 16px;
	background: var(--wp--preset--color--sand);
	color: var(--wp--preset--color--slate);
}

@media (max-width: 980px) {
	.sps-reports-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 620px) {
	.sps-reports-grid {
		grid-template-columns: 1fr;
	}
}

/* Footer ---------------------------------------------------------------- */
.sps-footer {
	color: rgba(255, 255, 255, 0.82);
}

.sps-footer h1,
.sps-footer h2,
.sps-footer h3,
.sps-footer h4,
.sps-footer .wp-block-site-title a {
	color: #fff;
}

.sps-footer a {
	color: rgba(255, 255, 255, 0.82);
	text-decoration: none;
}

.sps-footer a:hover {
	color: #fff;
	text-decoration: underline;
}

.sps-footer .wp-block-navigation a,
.sps-footer ul.wp-block-list a {
	color: rgba(255, 255, 255, 0.82);
	text-decoration: none;
}

.sps-footer ul.wp-block-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.sps-footer ul.wp-block-list li {
	margin-bottom: 0.55rem;
}

/* Reduced motion -------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	* {
		scroll-behavior: auto !important;
	}

	.sps-card,
	.wp-block-button__link {
		transition: none;
	}
}

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