/*
Theme Name: Fit After 40
Theme URI: https://chaight.com/
Author: Fit After 40
Description: Warm, encouraging block theme for midlife health and fitness guides for women. 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: fit-after-40
*/

html { scroll-behavior: smooth; }
:where(h2, h3)[id] { scroll-margin-top: 1.5rem; }
img { height: auto; }
::selection { background: var(--wp--preset--color--soft); }
h1 a, h2 a, h3 a, h4 a { text-decoration: none; color: inherit; }
:where(h1, h2, h3, h4) a:hover { color: var(--wp--preset--color--primary); }
a { text-underline-offset: .2em; text-decoration-thickness: 1.5px; }
em { font-family: var(--wp--preset--font-family--heading); }

/* Header */
.fa40-header .wp-block-navigation a { padding: .4rem .2rem; background: linear-gradient(var(--wp--preset--color--soft), var(--wp--preset--color--soft)) 0 88% / 0 .45em no-repeat; transition: background-size .25s ease; }
.fa40-header .wp-block-navigation a:hover { background-size: 100% .45em; }

/* 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; }
.is-style-card:hover { transform: translateY(-4px); }
.is-style-note { background: var(--wp--preset--color--sage-soft); border-radius: var(--wp--custom--radius); padding: 1.5rem 1.7rem; position: relative; }
.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: 2rem; margin-bottom: .55rem; }
ul.is-style-checklist li::before { content: ""; position: absolute; left: .2rem; top: .55em; width: .8rem; height: .8rem; border-radius: 50%; background: var(--wp--preset--color--primary); box-shadow: 0 0 0 4px var(--wp--preset--color--soft); }
p.is-style-kicker { font-size: .82rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--wp--preset--color--primary); }
.wp-block-button.is-style-ghost .wp-block-button__link { background: transparent; color: var(--wp--preset--color--primary-dark); box-shadow: inset 0 0 0 2px var(--wp--preset--color--primary); }
.wp-block-button.is-style-ghost .wp-block-button__link:hover { background: var(--wp--preset--color--soft); }
.wp-block-button__link { transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease; }
.wp-block-button__link:hover { transform: translateY(-2px); box-shadow: 0 10px 20px -10px rgba(142, 59, 65, .5); }

/* Decorative blob behind images */
.fa40-blob { position: relative; }
.fa40-blob::before { content: ""; position: absolute; inset: -6% -5% 8% 10%; background: var(--wp--preset--color--soft); border-radius: 46% 54% 42% 58% / 52% 40% 60% 48%; z-index: 0; }
.fa40-blob img { position: relative; z-index: 1; border-radius: var(--wp--custom--radius); }

/* Big quote */
.fa40-bigquote { font-family: var(--wp--preset--font-family--heading); font-style: italic; line-height: 1.25; }

/* Step pills */
.fa40-step { display: inline-block; padding: .3rem .8rem; border-radius: 999px; background: var(--wp--preset--color--soft); color: var(--wp--preset--color--primary-dark); font-weight: 800; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; }

/* Cards in 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 .6s ease; }
.wp-block-post-template .is-style-card:hover .wp-block-post-featured-image img { transform: scale(1.05); }

/* Content */
.wp-block-image img { border-radius: var(--wp--custom--radius); }
.wp-block-table table { border-collapse: separate; border-spacing: 0; width: 100%; background: var(--wp--preset--color--surface); border-radius: 16px; overflow: hidden; box-shadow: var(--wp--custom--shadow); }
.wp-block-table th { background: var(--wp--preset--color--soft); color: var(--wp--preset--color--primary-dark); text-align: left; font-weight: 800; }
.wp-block-table th, .wp-block-table td { padding: .8rem 1rem; border-bottom: 1px solid var(--wp--preset--color--border); }
.wp-block-table tr:last-child td { border-bottom: 0; }
.fa40-toc ul { margin: 0; padding-left: 1.2rem; }
.fa40-toc li { margin: .25rem 0; }
.fa40-toc li::marker { color: var(--wp--preset--color--primary); }
.fa40-toc a { text-decoration: none; }

/* Footer */
.fa40-footer a { color: inherit; text-decoration: none; }
.fa40-footer a:hover { text-decoration: underline; }

.wp-block-query-pagination a, .wp-block-query-pagination .page-numbers { text-decoration: none; padding: .35rem .75rem; border-radius: 999px; }
.wp-block-query-pagination .page-numbers.current { background: var(--wp--preset--color--primary); color: #fff; }
.fluentform .ff-btn-submit { background: var(--wp--preset--color--primary) !important; border-radius: 999px !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; }
