/*
Theme Name: NCoC
Theme URI: https://ncoc.org
Author: National Conference on Citizenship
Description: Clean, accessible block theme for the National Conference on Citizenship. Design tokens live in theme.json.
Requires at least: 6.6
Requires PHP: 8.1
Version: 0.1.0
License: GPL-2.0-or-later
Text Domain: ncoc
*/

/* Keep this file small: prefer theme.json. Only things theme.json can't express go here. */

.wp-site-blocks { min-height: 100vh; display: flex; flex-direction: column; }
.wp-site-blocks > main { flex: 1; }

.site-header { border-bottom: 1px solid var(--wp--preset--color--line); }
.site-header .wp-block-site-logo img { height: auto; }

:where(.wp-block-post-content) img { max-width: 100%; height: auto; }
:where(.wp-block-post-content) iframe { max-width: 100%; }

.wp-block-post-template .wp-block-post-featured-image img { aspect-ratio: 3 / 2; object-fit: cover; }

/* Visible keyboard focus everywhere. */
:focus-visible { outline: 2px solid var(--wp--preset--color--coral); outline-offset: 2px; }

.ncoc-plain-list { list-style: none; padding-left: 0; line-height: 2; }

/* Person / feature cards produced by the content migration (Staff, Board). */
.ncoc-card { gap: 0.4rem; }
.ncoc-card .wp-block-image img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.ncoc-card h3 { margin-block: 0.5rem 0; }
.ncoc-card h3 a { text-decoration: none; }
.ncoc-card p { margin-block: 0; }

/* Latest Posts grid used on Home / News. */
.wp-block-latest-posts.is-grid li { margin-bottom: var(--wp--preset--spacing--40); }
.wp-block-latest-posts__featured-image img { aspect-ratio: 3 / 2; object-fit: cover; border-radius: 4px; }
.wp-block-latest-posts__post-title { font-family: var(--wp--preset--font-family--heading); font-weight: 600; text-decoration: none; }

/* Home page sections. */
.ncoc-feature { background: var(--wp--preset--color--mist); border-top: 4px solid var(--wp--preset--color--coral); padding: var(--wp--preset--spacing--40); border-radius: 4px; }
.ncoc-feature h2 { margin-top: 0.25rem; }
.ncoc-program { border-top: 1px solid var(--wp--preset--color--line); padding-top: var(--wp--preset--spacing--30); }
.wp-block-button.is-style-outline > .wp-block-button__link { background: transparent; color: currentColor; border: 2px solid currentColor; }
.home .wp-site-blocks > footer > .wp-block-group { margin-top: 0 !important; }

/* Newsletter signup (posts to the existing Mailchimp list). */
.ncoc-signup { display: flex; flex-wrap: wrap; gap: var(--wp--preset--spacing--30); align-items: flex-end; }
.ncoc-signup label { display: flex; flex-direction: column; gap: 0.25rem; flex: 1 1 12rem; font-size: var(--wp--preset--font-size--small); font-weight: 600; }
.ncoc-signup input[type="text"], .ncoc-signup input[type="email"] { font: inherit; font-weight: 400; font-size: 1rem; padding: 0.7rem 0.8rem; border: 0; border-radius: 4px; color: var(--wp--preset--color--ink); }
.ncoc-signup button { font: inherit; font-weight: 600; padding: 0.75rem 1.5rem; border: 0; border-radius: 4px; background: var(--wp--preset--color--navy); color: var(--wp--preset--color--white); cursor: pointer; }
.ncoc-signup button:hover { background: var(--wp--preset--color--navy-dark); }

/* Stacked full-width bands sit flush against each other. */
.wp-block-post-content > .alignfull + .alignfull { margin-block-start: 0; }
.wp-block-post-content > .alignfull:first-child { margin-block-start: 0; }
.alignfull .wp-block-image img { max-height: 30rem; width: auto; margin-inline: auto; display: block; }

/* Floated images carried over from classic posts. */
@media (max-width: 600px) {
	.wp-block-image.alignleft, .wp-block-image.alignright { float: none; margin-inline: 0; }
	.wp-block-image.is-resized img { width: 100% !important; }
}
