/*
Theme Name: Little SEO Marketer
Theme URI: https://littleseomarketer.com
Author: Rachel Owen
Author URI: https://littleseomarketer.com
Description: Block theme for Little SEO Marketer — local SEO services, blog, and course landing page. Fully editable in the Site Editor.
Version: 2.1.0
Requires at least: 6.5
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: little-seo-marketer
Tags: blog, one-column, block-patterns, full-site-editing
*/

/* Colours, typography and spacing live in theme.json. This file only covers
   what theme.json can't express. */

/* --------------------------------------------------------------------------
   Full-width sections butt against each other
   --------------------------------------------------------------------------
   theme.json's blockGap puts a 1.5rem top margin on every top-level block,
   which shows the page background as a stripe between coloured sections.
   Each section carries its own padding, so full-width ones sit flush
   instead. Two classes to outrank core's
   `:root :where(.is-layout-constrained) > *`. */
.wp-block-post-content > .alignfull {
	margin-block-start: 0;
}

/* --------------------------------------------------------------------------
   Framed images — an image with a fixed aspect ratio fills its column, so a
   replaced photo keeps the frame's shape whatever its original size.
   -------------------------------------------------------------------------- */
.wp-block-image img[style*="aspect-ratio"] {
	width: 100%;
}

/* --------------------------------------------------------------------------
   Site header
   -------------------------------------------------------------------------- */
.lsm-site-header {
	position: sticky;
	top: 0;
	z-index: 100;
}

.wp-block-site-title a {
	text-decoration: none;
}

/* --------------------------------------------------------------------------
   Contact form (rendered by the [lsm_contact_form] shortcode)
   -------------------------------------------------------------------------- */
.lsm-form-field {
	margin-bottom: 20px;
}

.lsm-form-field label {
	display: block;
	font-weight: 700;
	margin-bottom: 6px;
	font-size: 0.9rem;
}

.lsm-form-field input,
.lsm-form-field textarea {
	width: 100%;
	padding: 14px 18px;
	border: 2px solid var(--wp--preset--color--contrast);
	border-radius: 16px;
	font-family: var(--wp--preset--font-family--body);
	font-size: 1rem;
	background: var(--wp--preset--color--base-2);
	color: var(--wp--preset--color--contrast);
}

.lsm-form-field textarea {
	min-height: 160px;
	resize: vertical;
}

.lsm-form-note {
	padding: 14px 18px;
	border-radius: 10px;
	margin-bottom: 20px;
	font-weight: 600;
}

.lsm-form-note--success {
	background: var(--wp--preset--color--secondary);
	border: 2px solid var(--wp--preset--color--primary);
}

.lsm-form-note--error {
	background: #fbdada;
	border: 2px solid #c0392b;
}

.lsm-hp-field {
	position: absolute;
	left: -9999px;
	top: -9999px;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.lsm-footer-wordmark a {
	text-decoration: none;
}

.lsm-footer-links {
	list-style: none;
	padding-left: 0;
	margin: 0;
}

.lsm-footer-links li {
	margin-bottom: 0.6em;
}

/* Links inherit the global ink colour, which is unreadable on the plum
   footer, so every link in here takes the cream instead. */
.lsm-site-footer a {
	color: var(--wp--preset--color--base);
}

.lsm-footer-links a,
.lsm-footer-legal a {
	text-decoration: none;
}

.lsm-footer-links a:hover,
.lsm-footer-legal a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* The embedded form sits on cream, so give it room to breathe. */
.lsm-footer-signup iframe {
	margin-top: 1rem !important;
}

/* --------------------------------------------------------------------------
   Blog listing: category pills, search, post cards
   -------------------------------------------------------------------------- */
.lsm-category-pills .wp-block-categories { margin: 0; }

.lsm-category-pills ul {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
}

.lsm-category-pills .lsm-pill,
.lsm-category-pills li a {
	display: inline-block;
	padding: 8px 18px;
	border: 2px solid var(--wp--preset--color--contrast);
	border-radius: 999px;
	text-decoration: none;
	font-size: 0.85rem;
	font-weight: 600;
	background: var(--wp--preset--color--base-2);
}

.lsm-category-pills .lsm-pill:hover,
.lsm-category-pills li a:hover,
.lsm-category-pills .current-cat a {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base-2);
}

.lsm-blog-search .wp-block-search__inside-wrapper {
	border: 2px solid var(--wp--preset--color--contrast);
	border-radius: 999px;
	padding: 4px 4px 4px 8px;
	background: var(--wp--preset--color--base-2);
}

.lsm-blog-search .wp-block-search__input {
	border: none;
	background: transparent;
	padding: 8px 12px;
	font-family: var(--wp--preset--font-family--body);
}

.lsm-blog-search .wp-block-search__input:focus {
	outline: none;
}

.lsm-blog-search .wp-block-search__button {
	border: 2px solid var(--wp--preset--color--contrast);
	border-radius: 999px;
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--contrast);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-size: 0.8rem;
	padding: 10px 22px;
}

/* Cards clip the featured image to the rounded corner, and the whole card
   is the same height in its grid row so the rows line up. */
.lsm-post-card {
	overflow: hidden;
	height: 100%;
}

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

.lsm-post-card .wp-block-post-featured-image img {
	display: block;
	width: 100%;
	border-bottom: 2px solid var(--wp--preset--color--contrast);
}

.lsm-post-card .wp-block-post-title {
	line-height: 1.2;
}

.lsm-post-card .wp-block-read-more {
	text-decoration: underline;
	text-underline-offset: 4px;
}

/* --------------------------------------------------------------------------
   Article typography: headings a step smaller than on landing pages, so long
   reading does not feel shouty.
   -------------------------------------------------------------------------- */
.single-post .wp-block-post-content h2 {
	font-size: clamp(1.5rem, 2.6vw, 1.9rem);
	margin-top: 1.8em;
}

.single-post .wp-block-post-content h3 {
	font-size: clamp(1.25rem, 2vw, 1.4rem);
	margin-top: 1.5em;
}

/* --------------------------------------------------------------------------
   Curriculum accordion (core/details block)
   -------------------------------------------------------------------------- */
.wp-block-details {
	background: var(--wp--preset--color--base-2);
	border-radius: 30px;
	padding: 24px 30px;
	margin-bottom: 16px;
}

.wp-block-details summary {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	cursor: pointer;
}

/* --------------------------------------------------------------------------
   Checklist — a core list block with the "Checklist" style applied
   -------------------------------------------------------------------------- */
.is-style-lsm-checklist {
	list-style: none;
	padding-left: 0;
}

.is-style-lsm-checklist li {
	padding-left: 32px;
	position: relative;
	margin-bottom: 14px;
}

.is-style-lsm-checklist li::before {
	content: "\2713";
	position: absolute;
	left: 0;
	top: 2px;
	width: 22px;
	height: 22px;
	background: var(--wp--preset--color--accent);
	border: 2px solid var(--wp--preset--color--contrast);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.75rem;
}

/* --------------------------------------------------------------------------
   Numbered service rows
   -------------------------------------------------------------------------- */
.lsm-service-num {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 2.2rem;
	color: var(--wp--preset--color--primary);
	line-height: 1;
}
