/*
Theme Name: Newcastle Trails
Theme URI: https://newcastletrails.org
Author: Newcastle Trails
Description: A block theme for Newcastle Trails. Carries the colours of the original newcastletrails.org — forest green, brick red, bark brown and gold — at modern type sizes and spacing. Built to be edited in the Site Editor without touching code.
Version: 0.2.0
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: newcastle-trails
Tags: block-theme, one-column, custom-colors, custom-menu, full-site-editing
*/

/*
 * Almost all styling lives in theme.json, so that it is editable in the Site
 * Editor. What is left here is the handful of custom classes the templates
 * use, which have no theme.json equivalent.
 */

/* --------------------------------------------------------------------------
   Header and footer
   -------------------------------------------------------------------------- */

.nt-header {
	border-bottom: 4px solid var(--wp--preset--color--brick);
}

/* Logo and site title read as one unit, so keep them tight together. */
.nt-brand {
	gap: 0.7rem;
}

.nt-brand .wp-block-site-logo img {
	display: block;
}

.nt-header .wp-block-navigation {
	font-weight: 600;
}

.nt-header .wp-block-navigation a {
	text-decoration: none;
}

.nt-header .wp-block-navigation a:hover,
.nt-header .wp-block-navigation .current-menu-item a {
	text-decoration: underline;
	text-underline-offset: 0.3em;
	text-decoration-thickness: 2px;
}

/*
 * The footer is a light mist band, so its links are brick rather than the
 * gold they were when the footer was dark bark. Gold on mist is unreadable.
 */
.nt-footer a {
	color: var(--wp--preset--color--brick);
}

/* --------------------------------------------------------------------------
   Front page hero
   -------------------------------------------------------------------------- */

/*
 * The background lives here rather than as a block attribute because a block
 * background stores an absolute URL to one site's media library, which breaks
 * the moment the theme is installed anywhere else. A relative URL in style.css
 * resolves against the theme directory and travels with it.
 *
 * Setting a background image on this group in the Site Editor still overrides
 * this, so the photo remains swappable without touching code.
 */
.nt-hero {
	background-image: url("assets/images/hero-trail.jpg");
	background-size: cover;
	background-position: center;
	background-attachment: scroll;
}

/* --------------------------------------------------------------------------
   Trail cards
   -------------------------------------------------------------------------- */

.nt-trail-card,
.is-style-nt-trail-card {
	height: 100%;
	background: #fff;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 8px;
	overflow: hidden;
}

.nt-trail-card:hover,
.is-style-nt-trail-card:hover {
	border-color: var(--wp--preset--color--sage);
	box-shadow: 0 2px 10px rgba(31, 59, 12, 0.08);
}

.nt-trail-card .wp-block-post-title,
.is-style-nt-trail-card .wp-block-post-title {
	font-size: var(--wp--preset--font-size--large);
	margin: 0 0 0.35rem;
}

.nt-trail-card .wp-block-post-title a,
.is-style-nt-trail-card .wp-block-post-title a {
	text-decoration: none;
}

.nt-trail-card .wp-block-post-excerpt,
.is-style-nt-trail-card .wp-block-post-excerpt {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}

/* --------------------------------------------------------------------------
   Section bands
   -------------------------------------------------------------------------- */

.nt-band {
	border-top: 1px solid var(--wp--preset--color--line);
	border-bottom: 1px solid var(--wp--preset--color--line);
}

/* The site's one deliberately loud element: the brick rule under a section
   heading, echoing the trail signs. */
.nt-rule,
.is-style-nt-rule {
	border-bottom: 3px solid var(--wp--preset--color--brick);
	display: inline-block;
	padding-bottom: 0.3rem;
}

/* --------------------------------------------------------------------------
   Focus states
   -------------------------------------------------------------------------- */


:where(a:focus-visible, button:focus-visible, input:focus-visible, .wp-block-navigation a:focus-visible) {
	outline: 3px solid var(--wp--preset--color--brick);
	outline-offset: 2px;
}
