/*
Theme Name: LowCarb Kitchen
Theme URI: https://pearstreetbooks.com/
Author: LowCarb Kitchen
Description: Fresh, food-magazine block theme for low-carb recipes and guides. Fully editable in the Site Editor.
Version: 1.0.0
Requires at least: 6.6
Tested up to: 6.9
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: lowcarb-kitchen
*/

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
:where(h2, h3)[id] { scroll-margin-top: 1.5rem; }
img { height: auto; }
h1 a, h2 a, h3 a, h4 a { text-decoration: none; }
:where(h1, h2, h3, h4) a:hover { text-decoration: underline; text-underline-offset: .15em; }
::selection { background: var(--wp--preset--color--soft); }

/* ---------- Header ---------- */
.lck-topbar a { color: inherit; }
.lck-header .wp-block-site-tagline { margin-top: .15rem; }
.lck-header .wp-block-navigation a { padding: .35rem .2rem; border-bottom: 2px solid transparent; transition: border-color .2s ease, color .2s ease; }
.lck-header .wp-block-navigation a:hover,
.lck-header .wp-block-navigation .current-menu-item a { border-color: var(--wp--preset--color--secondary); color: var(--wp--preset--color--primary); }

/* ---------- Block styles ---------- */
.is-style-card {
	background: var(--wp--preset--color--surface);
	border-radius: var(--wp--custom--radius);
	box-shadow: var(--wp--custom--shadow);
	overflow: hidden;
	transition: transform .25s ease, box-shadow .25s ease;
}
.is-style-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -16px rgba(30, 42, 34, .3); }

.is-style-note {
	background: var(--wp--preset--color--soft);
	border-left: 4px solid var(--wp--preset--color--primary);
	border-radius: 0 var(--wp--custom--radius) var(--wp--custom--radius) 0;
	padding: 1.4rem 1.6rem;
}
.is-style-note > :first-child { margin-top: 0; }
.is-style-note > :last-child { margin-bottom: 0; }

ul.is-style-checklist { list-style: none; padding-left: 0; }
ul.is-style-checklist li { position: relative; padding-left: 1.9rem; margin-bottom: .45rem; }
ul.is-style-checklist li::before {
	content: ""; position: absolute; left: 0; top: .45em; width: 1.1rem; height: 1.1rem; border-radius: 50%;
	background: var(--wp--preset--color--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.2 4.2L19 7'/%3E%3C/svg%3E") center / 70% no-repeat;
}

p.is-style-kicker {
	font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
	color: var(--wp--preset--color--secondary);
}

.wp-block-button.is-style-ghost .wp-block-button__link {
	background: transparent; color: currentColor; box-shadow: inset 0 0 0 2px currentColor;
}
.wp-block-button.is-style-ghost .wp-block-button__link:hover { background: rgba(255, 255, 255, .12); }
.wp-block-button__link { transition: background-color .2s ease, transform .2s ease; }
.wp-block-button__link:hover { transform: translateY(-1px); }

/* ---------- Cards in query loops ---------- */
.wp-block-post-template .is-style-card { height: 100%; display: flex; flex-direction: column; }
.wp-block-post-template .is-style-card .wp-block-post-featured-image { margin: 0; overflow: hidden; }
.wp-block-post-template .is-style-card .wp-block-post-featured-image img { transition: transform .5s ease; }
.wp-block-post-template .is-style-card:hover .wp-block-post-featured-image img { transform: scale(1.04); }
.wp-block-post-template .wp-block-post-title a:hover { color: var(--wp--preset--color--primary); }

/* ---------- Content ---------- */
.wp-block-table table { border-collapse: collapse; width: 100%; background: var(--wp--preset--color--surface); border-radius: 10px; overflow: hidden; }
.wp-block-table th { background: var(--wp--preset--color--primary); color: #fff; text-align: left; font-weight: 600; }
.wp-block-table th, .wp-block-table td { border: 1px solid var(--wp--preset--color--border); padding: .7rem .9rem; }
.wp-block-table tbody tr:nth-child(even) { background: var(--wp--preset--color--base); }
.wp-block-image img { border-radius: var(--wp--custom--radius); }
.wp-block-post-featured-image img { border-radius: 0; }
.entry-content .wp-block-image figcaption { text-align: center; }

.lck-toc ul { margin: 0; padding-left: 1.1rem; }
.lck-toc li { margin: .25rem 0; }
.lck-toc a { text-decoration: none; }
.lck-toc a:hover { text-decoration: underline; }

/* ---------- Footer ---------- */
.lck-footer a { color: inherit; text-decoration: none; }
.lck-footer a:hover { text-decoration: underline; }
.lck-footer .wp-block-navigation { gap: .45rem; }

/* ---------- Pagination ---------- */
.wp-block-query-pagination a, .wp-block-query-pagination .page-numbers { text-decoration: none; padding: .35rem .7rem; border-radius: 8px; }
.wp-block-query-pagination .page-numbers.current { background: var(--wp--preset--color--primary); color: #fff; }

/* ---------- Forms (Fluent Forms) ---------- */
.fluentform .ff-btn-submit { border-radius: 999px !important; background: var(--wp--preset--color--primary) !important; }
.fluentform .ff-el-form-control { border-radius: 10px; }

@media (max-width: 781px) {
	.lck-hero h1 { font-size: 2.4rem !important; }
}
@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; scroll-behavior: auto !important; }
}

/* FAQ accordion (core/details) */
.wp-block-details { border-bottom: 1px solid var(--wp--preset--color--border); padding: 1rem 0; }
.wp-block-details summary { cursor: pointer; font-family: var(--wp--preset--font-family--heading); font-weight: 700; font-size: 1.08rem; list-style: none; position: relative; padding-right: 2rem; }
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after { content: "+"; position: absolute; right: .2rem; top: -.15rem; font-size: 1.5rem; color: var(--wp--preset--color--primary); transition: transform .2s ease; }
.wp-block-details[open] summary::after { transform: rotate(45deg); }
.wp-block-details > :not(summary) { margin-top: .75rem; }

/* Cap tall portrait photos inside articles */
.entry-content .wp-block-image img { max-height: 560px; width: 100%; object-fit: cover; }
