/*
Theme Name: FastingClock
Theme URI: https://vk3um.com/
Author: FastingClock
Description: Calm, modern block theme for practical intermittent fasting 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: fasting-clock
*/

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; }
h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover { color: var(--wp--preset--color--primary); }
a { text-underline-offset: .18em; }

/* Header: clock logo + pill navigation */
.fcl-header .wp-block-site-title a { display: inline-flex; align-items: center; gap: .5em; }
.fcl-header .wp-block-site-title a::before { content: ""; width: 1.05em; height: 1.05em; border-radius: 50%; border: .14em solid var(--wp--preset--color--contrast); background: conic-gradient(var(--wp--preset--color--primary) 0 33%, transparent 33% 100%); box-sizing: border-box; flex: none; }
.fcl-header .wp-block-navigation-item__content { padding: .45rem .9rem; border-radius: 999px; transition: background-color .2s ease; }
.fcl-header .wp-block-navigation-item__content:hover { background: var(--wp--preset--color--lilac); }

/* 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(-3px); }
.is-style-note { background: var(--wp--preset--color--lilac); border-radius: var(--wp--custom--radius); 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: .5rem; }
ul.is-style-checklist li::before { content: ""; position: absolute; left: 0; top: .42em; width: 1.05rem; height: 1.05rem; border-radius: 50%; border: 2px solid var(--wp--preset--color--primary); background: conic-gradient(var(--wp--preset--color--primary) 0 66%, transparent 66% 100%); box-sizing: border-box; }
p.is-style-kicker { font-size: .78rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--wp--preset--color--primary-dark); }
.has-night-background-color p.is-style-kicker, .has-night-2-background-color p.is-style-kicker, .wp-block-cover p.is-style-kicker { color: #FFB892; }
.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__link { transition: transform .2s ease, background-color .2s ease; }
.wp-block-button__link:hover { transform: translateY(-2px); }

/* Fasting window bar */
.fcl-window { border-radius: 999px; overflow: hidden; box-shadow: var(--wp--custom--shadow); }
.fcl-window .wp-block-column { padding: 1.1rem 1.6rem; }
.fcl-window p { margin: 0; }
@media (max-width: 781px) { .fcl-window { border-radius: 22px; } }

/* Big numbers */
.fcl-num { font-family: var(--wp--preset--font-family--heading); font-weight: 700; line-height: 1; letter-spacing: -.03em; }

/* Horizontal cards in loops */
.wp-block-post-template .is-style-card { height: 100%; }
.fcl-hcard .wp-block-columns { margin: 0; }
.fcl-hcard .wp-block-post-featured-image { margin: 0; height: 100%; }
.fcl-hcard .wp-block-post-featured-image img { height: 100%; }
.wp-block-post-template .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-featured-image { overflow: hidden; }

/* Content */
.wp-block-image img { border-radius: var(--wp--custom--radius); }
.entry-content .wp-block-image img { max-height: 560px; width: 100%; object-fit: cover; }
.wp-block-table table { border-collapse: separate; border-spacing: 0; width: 100%; background: var(--wp--preset--color--surface); border: 1px solid var(--wp--preset--color--border); border-radius: 14px; overflow: hidden; }
.wp-block-table th { background: var(--wp--preset--color--night); color: #fff; text-align: left; font-weight: 700; }
.wp-block-table th, .wp-block-table td { padding: .75rem .95rem; border-bottom: 1px solid var(--wp--preset--color--border); }
.wp-block-table tr:last-child td { border-bottom: 0; }
.wp-block-table tbody tr:nth-child(even) { background: #FBF8F4; }
.fcl-toc ul { margin: 0; padding-left: 1.1rem; }
.fcl-toc li { margin: .25rem 0; }
.fcl-toc li::marker { color: var(--wp--preset--color--primary); }
.fcl-toc a { text-decoration: none; color: var(--wp--preset--color--contrast); }
.fcl-toc a:hover { color: var(--wp--preset--color--primary); }

/* FAQ accordion */
.wp-block-details { background: var(--wp--preset--color--surface); border: 1px solid var(--wp--preset--color--border); border-radius: 14px; padding: 1rem 1.2rem; margin-top: .7rem; }
.wp-block-details summary { cursor: pointer; font-family: var(--wp--preset--font-family--heading); font-weight: 600; 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: .1rem; 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: .7rem; }

/* Footer */
.fcl-footer a { color: inherit; text-decoration: none; }
.fcl-footer a:hover { color: #FFB892; }

.wp-block-query-pagination a, .wp-block-query-pagination .page-numbers { text-decoration: none; padding: .35rem .75rem; border-radius: 10px; }
.wp-block-query-pagination .page-numbers.current { background: var(--wp--preset--color--night); color: #fff; }
.fluentform .ff-btn-submit { background: var(--wp--preset--color--primary) !important; border-radius: 12px !important; }

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

/* v3 fixes: horizontal cards, window bar on mobile, header button, footer gap */
.fcl-hcard > .wp-block-columns { height: 100%; }
.fcl-hcard .wp-block-column:first-child { overflow: hidden; align-self: stretch; }
.fcl-hcard .wp-block-post-featured-image,
.fcl-hcard .wp-block-post-featured-image a { aspect-ratio: auto !important; height: 100%; display: block; }
.fcl-hcard .wp-block-post-featured-image img { width: 100% !important; height: 100% !important; min-height: 190px; aspect-ratio: auto !important; object-fit: cover; }
@media (max-width: 781px) {
	.fcl-hcard .wp-block-post-featured-image img { min-height: 0; aspect-ratio: 16/9 !important; }
	.fcl-window.wp-block-columns, .fcl-hcard > .wp-block-columns { row-gap: 0; }
}
.fcl-header .wp-block-button__link { white-space: nowrap; }
@media (max-width: 600px) { .fcl-header .wp-block-buttons { display: none; } }
.wp-site-blocks > footer { margin-block-start: 0; }
