/*
Theme Name: Our Pets Tales
Theme URI: https://ourpetstales.com
Author: OurPetsTales
Description: Warm editorial magazine block theme for ourpetstales.com — Fraunces + Nunito Sans on the Warm & Welcoming palette, with the adoption finder as a first-class citizen.
Version: 0.1.2
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ourpetstales
*/

/* ---- Header ---- */

.opt-header {
	border-bottom: 1px solid var(--wp--preset--color--line);
}

.opt-header .wp-block-navigation a {
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--ink);
}

.opt-header .wp-block-navigation a:hover,
.opt-header .wp-block-navigation .current-menu-item > a {
	color: var(--wp--preset--color--accent);
}

.opt-adopt-pill .wp-block-button__link {
	border-radius: 999px;
	padding: 9px 20px;
	font-size: 12.5px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

/* ---- Cards ---- */

.opt-card {
	background: var(--wp--preset--color--panel);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 12px;
	overflow: hidden;
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.opt-card:hover {
	box-shadow: 0 4px 16px rgba(43, 29, 22, 0.14);
	transform: translateY(-2px);
}

.opt-card .wp-block-post-featured-image,
.opt-card .wp-block-post-featured-image img {
	margin: 0;
	width: 100%;
}

.opt-card .wp-block-post-title {
	font-size: 1.05rem;
	line-height: 1.3;
}

.opt-card .wp-block-post-title a {
	color: var(--wp--preset--color--ink);
}

.opt-card .wp-block-post-title a:hover {
	color: var(--wp--preset--color--accent);
}

/* ---- Overlay (hero) cards ---- */

.opt-card-overlay {
	position: relative;
	border-radius: 14px;
	overflow: hidden;
	/* Posts without a featured image (6 Wayback images were unrecoverable)
	   must not collapse the card: keep the slot's height and give the
	   overlay text a warm ground to sit on. */
	background: linear-gradient(160deg, #a52a2a 0%, #2b1d16 90%);
}

.opt-hero-main.opt-card-overlay {
	min-height: 470px;
}

.opt-hero-secondary.opt-card-overlay {
	min-height: 225px;
}

.opt-card-overlay .wp-block-post-featured-image {
	margin: 0;
	height: 100%;
}

.opt-card-overlay .wp-block-post-featured-image img {
	height: 100%;
	width: 100%;
	object-fit: cover;
}

.opt-overlay-body {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 26px 28px;
	background: linear-gradient(180deg, rgba(43, 29, 22, 0) 0%, rgba(43, 29, 22, 0.88) 100%);
	padding-top: 90px;
}

.opt-overlay-body .wp-block-post-title,
.opt-overlay-body .wp-block-post-title a,
.opt-overlay-body .wp-block-post-excerpt,
.opt-overlay-body .wp-block-post-date {
	color: #ffffff;
}

.opt-overlay-body .wp-block-post-date {
	opacity: 0.75;
	font-size: 12.5px;
	font-weight: 600;
}

.opt-hero-secondary .opt-overlay-body {
	padding: 18px 20px;
	padding-top: 60px;
}

.opt-hero-secondary .wp-block-post-title {
	font-size: 1.15rem;
}

/* ---- Category chips (post-terms) ---- */

.opt-chip-terms a {
	display: inline-block;
	background: var(--wp--preset--color--wheat);
	color: var(--wp--preset--color--brown);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	border-radius: 999px;
	padding: 3px 11px;
}

.opt-chip-terms a:hover {
	background: var(--wp--preset--color--brown);
	color: #ffffff;
}

.opt-chip-terms .wp-block-post-terms__separator {
	display: none;
}

.opt-eyebrow-terms a {
	color: var(--wp--preset--color--accent);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.opt-eyebrow-terms .wp-block-post-terms__separator {
	color: var(--wp--preset--color--muted);
}

/* ---- Section heads ---- */

.opt-section-head {
	border-bottom: 3px solid var(--wp--preset--color--coral);
	padding-bottom: 8px;
}

.opt-section-head h2 {
	font-size: 1.5rem;
	margin: 0;
}

.opt-section-head a {
	font-size: 13px;
	font-weight: 700;
}

/* ---- List rows (small thumb + title) ---- */

.opt-row .wp-block-post-featured-image {
	flex-shrink: 0;
	margin: 0;
}

.opt-row .wp-block-post-title {
	font-size: 0.95rem;
	line-height: 1.3;
	font-weight: 600;
}

.opt-row .wp-block-post-title a {
	color: var(--wp--preset--color--ink);
}

.opt-row .wp-block-post-title a:hover {
	color: var(--wp--preset--color--accent);
}

/* ---- Latest Tales (numbered) ---- */

.opt-latest .wp-block-post-template {
	counter-reset: opt-latest;
	list-style: none;
	padding: 0;
}

.opt-latest .wp-block-post-template > li {
	counter-increment: opt-latest;
	display: grid;
	grid-template-columns: 32px minmax(0, 1fr);
	gap: 10px;
	align-items: baseline;
	margin-bottom: 15px;
}

.opt-latest .wp-block-post-template > li::before {
	content: counter(opt-latest);
	font-family: var(--wp--preset--font-family--display);
	font-weight: 900;
	font-size: 26px;
	color: var(--wp--preset--color--coral);
	line-height: 1;
}

.opt-latest .wp-block-post-title {
	font-size: 0.95rem;
	line-height: 1.3;
	font-weight: 600;
	margin: 0;
}

.opt-latest .wp-block-post-title a {
	color: var(--wp--preset--color--ink);
}

.opt-latest .wp-block-post-date {
	font-size: 12px;
	color: var(--wp--preset--color--muted);
}

/* ---- Sidebar panels ---- */

.opt-panel {
	background: var(--wp--preset--color--panel);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 14px;
}

/* ---- Adopt band ---- */

.opt-adopt-band {
	background: var(--wp--preset--color--wheat);
	border-radius: 16px;
}

/* ---- Explore chips ---- */

.opt-chips a {
	display: inline-block;
	background: var(--wp--preset--color--wheat);
	color: var(--wp--preset--color--brown);
	font-size: 12.5px;
	font-weight: 700;
	border-radius: 999px;
	padding: 6px 14px;
	margin: 0 6px 8px 0;
}

.opt-chips a:hover {
	background: var(--wp--preset--color--brown);
	color: #ffffff;
}

/* ---- Archive hero band ---- */

.opt-archive-band {
	background: var(--wp--preset--color--wheat);
	border-bottom: 1px solid var(--wp--preset--color--line);
}

.opt-archive-band h1 {
	font-size: clamp(2rem, 4vw, 2.75rem);
	margin: 0;
}

/* ---- Single post ---- */

.opt-single-title h1 {
	font-size: clamp(2rem, 4.5vw, 2.625rem);
	font-weight: 900;
	line-height: 1.12;
	text-wrap: balance;
}

.opt-single-meta {
	border-top: 1px solid var(--wp--preset--color--line);
	border-bottom: 1px solid var(--wp--preset--color--line);
	font-size: 13.5px;
	color: var(--wp--preset--color--muted);
}

.opt-single-content blockquote {
	border-top: 3px solid var(--wp--preset--color--coral);
	border-bottom: 3px solid var(--wp--preset--color--coral);
	border-left: none;
	margin: 28px 0;
	padding: 22px 10px;
	text-align: center;
	font-family: var(--wp--preset--font-family--display);
	font-style: italic;
	font-size: 1.35rem;
	color: var(--wp--preset--color--brown);
}

/* ---- Footer ---- */

.opt-footer {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--cream-ink);
}

.opt-footer a {
	color: var(--wp--preset--color--cream-ink);
}

.opt-footer a:hover {
	color: var(--wp--preset--color--coral);
}

.opt-footer .opt-footer-label {
	font-weight: 800;
	font-size: 12px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--coral);
}

.opt-footer-bottom {
	border-top: 1px solid rgba(242, 233, 220, 0.15);
	font-size: 12.5px;
	color: #b3a493;
}

/* ---- Pagination ---- */

.wp-block-query-pagination a,
.wp-block-query-pagination-numbers .page-numbers {
	font-weight: 700;
}

.wp-block-query-pagination-numbers .current {
	background: var(--wp--preset--color--accent);
	color: #ffffff;
	border-radius: 10px;
	padding: 6px 12px;
}

/* ---- Mobile ---- */

@media (max-width: 781px) {
	.opt-hero-main .wp-block-post-featured-image,
	.opt-hero-main .wp-block-post-featured-image img {
		min-height: 300px;
	}
	.opt-overlay-body {
		padding: 18px;
		padding-top: 70px;
	}
}
