/*
Theme Name: VinegarWise
Theme URI: https://annaadamsauthor.com/
Author: VinegarWise
Description: Calm, editorial block theme for evidence-minded guides about apple cider vinegar. 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: vinegarwise
*/

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: .18em; text-decoration-thickness: 1px; }

/* Header */
.vwg-header .wp-block-site-title a::before { content: ""; display: inline-block; width: .62em; height: .62em; margin-right: .45em; border-radius: 50% 50% 50% 0; background: var(--wp--preset--color--primary); transform: rotate(-45deg) translateY(-.08em); }
.vwg-header .wp-block-navigation a { position: relative; }
.vwg-header .wp-block-navigation a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -4px; height: 2px; background: var(--wp--preset--color--primary); transition: right .25s ease; }
.vwg-header .wp-block-navigation a:hover::after { right: 0; }

/* Block styles */
.is-style-card { background: var(--wp--preset--color--surface); border: 1px solid var(--wp--preset--color--border); border-radius: var(--wp--custom--radius); box-shadow: var(--wp--custom--shadow); }
.is-style-note { background: var(--wp--preset--color--soft); border-radius: var(--wp--custom--radius); padding: 1.4rem 1.6rem; border-top: 3px solid var(--wp--preset--color--primary); }
.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.8rem; margin-bottom: .5rem; }
ul.is-style-checklist li::before { content: "✓"; position: absolute; left: 0; top: 0; font-weight: 800; color: var(--wp--preset--color--secondary); }
p.is-style-kicker { font-size: .8rem; font-weight: 700; letter-spacing: .16em; 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--contrast); box-shadow: inset 0 0 0 2px var(--wp--preset--color--contrast); }
.wp-block-button.is-style-ghost .wp-block-button__link:hover { background: var(--wp--preset--color--contrast); color: var(--wp--preset--color--surface); }
.wp-block-button__link { transition: background-color .2s ease, color .2s ease; }

/* Editorial list (home + blog) */
.vwg-list > li { padding-bottom: var(--wp--preset--spacing--50); border-bottom: 1px solid var(--wp--preset--color--border); }
.vwg-list > li:last-child { border-bottom: 0; }
.vwg-list .wp-block-post-featured-image img { border-radius: var(--wp--custom--radius); transition: opacity .3s ease; }
.vwg-list .wp-block-post-featured-image a:hover img { opacity: .88; }
.vwg-more a { font-weight: 700; text-decoration: none; }
.vwg-more a:hover { text-decoration: underline; }

/* Content */
.entry-content > p:first-of-type { font-size: 1.28rem; line-height: 1.65; color: var(--wp--preset--color--contrast); }
.wp-block-image img { border-radius: var(--wp--custom--radius); }
.wp-block-table table { border-collapse: collapse; width: 100%; font-size: 1rem; }
.wp-block-table thead { border-bottom: 2px solid var(--wp--preset--color--contrast); }
.wp-block-table th { text-align: left; font-weight: 700; }
.wp-block-table th, .wp-block-table td { border: 0; border-bottom: 1px solid var(--wp--preset--color--border); padding: .7rem .6rem; }
.vwg-toc ul { margin: 0; padding-left: 1.1rem; columns: 2; column-gap: 2rem; }
.vwg-toc li { margin: .2rem 0; break-inside: avoid; }
.vwg-toc a { text-decoration: none; }
@media (max-width: 640px) { .vwg-toc ul { columns: 1; } }

/* FAQ */
.wp-block-details summary { cursor: pointer; font-family: var(--wp--preset--font-family--heading); font-weight: 700; font-size: 1.1rem; 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: -.1rem; 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; }

/* Footer */
.vwg-footer a { color: inherit; text-decoration: none; }
.vwg-footer a:hover { color: var(--wp--preset--color--primary); }

.wp-block-query-pagination a, .wp-block-query-pagination .page-numbers { text-decoration: none; padding: .3rem .65rem; }
.wp-block-query-pagination .page-numbers.current { border-bottom: 2px solid var(--wp--preset--color--primary); }
.fluentform .ff-btn-submit { background: var(--wp--preset--color--primary) !important; border-radius: 6px !important; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

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