/*
Theme Name: PetslovelyMore
Theme URI: https://petslovelymore.com
Author: PetslovelyMore Team
Author URI: https://petslovelymore.com
Description: A modern, SEO-optimized WordPress Block Theme (FSE) for the PetslovelyMore blog. Zero external dependencies, pure Vanilla JavaScript, Schema.org structured data, and a clean card-based design system.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: petslovelymore
Tags: blog, full-site-editing, block-patterns, one-column, custom-colors, custom-logo, featured-images, wide-blocks, accessibility-ready
*/

/* =========================================
   Base
   ========================================= */
html {
	scroll-behavior: smooth;
}

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

img {
	height: auto;
	max-width: 100%;
}

:focus-visible {
	outline: 3px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

/* =========================================
   Sticky Header
   ========================================= */
.site-header {
	backdrop-filter: saturate(180%) blur(8px);
	-webkit-backdrop-filter: saturate(180%) blur(8px);
	background-color: rgba(255, 255, 255, 0.92) !important;
	border-bottom: 1px solid var(--wp--preset--color--border);
	z-index: 100;
}

.site-header.is-scrolled {
	box-shadow: 0 4px 20px rgba(26, 26, 46, 0.08);
}

/* =========================================
   Card System
   ========================================= */
.pl-card {
	background-color: var(--wp--preset--color--card);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 16px;
	box-shadow: 0 2px 8px rgba(26, 26, 46, 0.05);
	transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.pl-card:hover {
	box-shadow: 0 12px 28px rgba(26, 26, 46, 0.12);
	transform: translateY(-4px);
}

/* =========================================
   Hero Section
   ========================================= */
.hero-section {
	background-image:
		linear-gradient(rgba(26, 26, 46, 0.55), rgba(26, 26, 46, 0.55)),
		url('assets/hero-section.png');
	background-color: var(--wp--preset--color--contrast);
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
	min-height: 78vh;
	display: flex;
	align-items: center;
	justify-content: center;
}

.hero-card {
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	background-color: rgba(255, 255, 255, 0.94) !important;
	border-radius: 24px;
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
	max-width: 680px;
}

/* =========================================
   FAQ Accordion (native <details>)
   ========================================= */
.faq-section details {
	background-color: var(--wp--preset--color--card);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 14px;
	box-shadow: 0 2px 6px rgba(26, 26, 46, 0.04);
	margin-bottom: var(--wp--preset--spacing--30);
	overflow: hidden;
	transition: box-shadow 0.2s ease;
}

.faq-section details[open] {
	box-shadow: 0 8px 24px rgba(26, 26, 46, 0.1);
}

.faq-section summary {
	align-items: center;
	cursor: pointer;
	display: flex;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 700;
	justify-content: space-between;
	list-style: none;
	padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50);
}

.faq-section summary::-webkit-details-marker {
	display: none;
}

.faq-section summary::after {
	color: var(--wp--preset--color--primary);
	content: '+';
	flex-shrink: 0;
	font-size: 1.5em;
	line-height: 1;
	margin-left: 1rem;
	transition: transform 0.25s ease;
}

.faq-section details[open] summary::after {
	transform: rotate(45deg);
}

.faq-section details p {
	color: var(--wp--preset--color--muted);
	margin: 0;
	padding: 0 var(--wp--preset--spacing--50) var(--wp--preset--spacing--40);
}

/* =========================================
   Latest Posts Card Grid
   ========================================= */
.posts-grid .wp-block-post {
	background-color: var(--wp--preset--color--card);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 16px;
	box-shadow: 0 2px 8px rgba(26, 26, 46, 0.05);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.posts-grid .wp-block-post:hover {
	box-shadow: 0 12px 28px rgba(26, 26, 46, 0.12);
	transform: translateY(-4px);
}

.posts-grid .wp-block-post-featured-image {
	margin: 0;
}

.posts-grid .wp-block-post-featured-image img {
	aspect-ratio: 16 / 10;
	object-fit: cover;
	width: 100%;
}

.posts-grid .wp-block-post-title a {
	text-decoration: none;
}

.posts-grid .wp-block-post-title a:hover {
	color: var(--wp--preset--color--primary);
}

/* Category badge */
.category-badge a,
.category-badge {
	background-color: var(--wp--preset--color--primary-soft);
	border-radius: 999px;
	color: var(--wp--preset--color--primary-dark) !important;
	display: inline-block;
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	letter-spacing: 0.04em;
	padding: 0.3em 0.9em;
	text-decoration: none;
	text-transform: uppercase;
}

.category-badge a:hover {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base) !important;
}

/* =========================================
   Single Post
   ========================================= */
.single-featured-image img {
	border-radius: 20px;
	box-shadow: 0 16px 40px rgba(26, 26, 46, 0.15);
}

.post-sidebar {
	position: sticky;
	top: 96px;
}

.post-sidebar .wp-block-post-title {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	line-height: 1.4;
	margin: 0;
}

.post-sidebar .wp-block-post-title a {
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}

.post-sidebar .wp-block-post-title a:hover {
	color: var(--wp--preset--color--primary);
}

.post-sidebar .wp-block-post {
	border-bottom: 1px solid var(--wp--preset--color--border);
	padding: var(--wp--preset--spacing--30) 0;
}

.post-sidebar .wp-block-post:last-child {
	border-bottom: none;
}

/* Prev / Next navigation cards */
.post-nav-cards {
	display: grid;
	gap: var(--wp--preset--spacing--40);
	grid-template-columns: 1fr 1fr;
}

.post-nav-card {
	background-color: var(--wp--preset--color--card);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 16px;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	text-decoration: none;
	transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.post-nav-card:hover {
	box-shadow: 0 12px 28px rgba(26, 26, 46, 0.12);
	transform: translateY(-4px);
}

.post-nav-card--next {
	text-align: right;
}

.post-nav-card__image img {
	aspect-ratio: 16 / 9;
	display: block;
	object-fit: cover;
	width: 100%;
}

.post-nav-card__body {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding: var(--wp--preset--spacing--40);
}

.post-nav-card__label {
	color: var(--wp--preset--color--primary);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.post-nav-card__title {
	color: var(--wp--preset--color--contrast);
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 700;
	line-height: 1.3;
	margin: 0;
}

.post-nav-card__excerpt {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.55;
	margin: 0;
}

/* =========================================
   Footer
   ========================================= */
.site-footer {
	border-top: 1px solid var(--wp--preset--color--border);
}

.footer-card {
	background-color: var(--wp--preset--color--card);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 16px;
}

.site-footer a {
	text-decoration: none;
}

.site-footer a:hover {
	color: var(--wp--preset--color--primary);
	text-decoration: underline;
}

/* =========================================
   Buttons
   ========================================= */
.wp-block-button__link {
	transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.wp-block-button__link:hover {
	box-shadow: 0 8px 20px rgba(13, 122, 95, 0.35);
	transform: translateY(-2px);
}

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 781px) {
	.hero-section {
		min-height: 64vh;
	}

	.post-nav-cards {
		grid-template-columns: 1fr;
	}

	.post-sidebar {
		position: static;
	}
}

/* =========================================
   Reduced Motion (Accessibility)
   ========================================= */
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}
