/*
Theme Name: Travel Niagara
Theme URI: https://travelniagara.com
Author: Travel Niagara
Author URI: https://travelniagara.com
Description: Lightweight custom block (FSE) theme for the Travel Niagara regional travel platform. Presentation only — all content types and business logic live in the Travel Niagara Core plugin, so switching themes never removes travel content.
Version: 0.1.0
Requires at least: 6.5
Tested up to: 7.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: travel-niagara
Tags: full-site-editing, block-patterns, custom-colors, custom-menu, editor-style, featured-images, threaded-comments, translation-ready
*/

/* Block theme styling lives in theme.json + assets/css. This file carries the
   theme header and a few progressive-enhancement rules only. */

/* Accessibility helpers */
.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: 8px; top: 8px; z-index: 1000; background: var(--wp--preset--color--navy); color: #fff; padding: 0.6rem 1rem; border-radius: 6px; text-decoration: none; }
.skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
#tn-content:focus { outline: none; }
/* Visible keyboard focus everywhere */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible,
select:focus-visible, summary:focus-visible, [tabindex]:focus-visible, .tn-card:focus-visible, .tn-season:focus-visible {
	outline: 3px solid var(--wp--preset--color--teal); outline-offset: 2px; border-radius: 3px;
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important; scroll-behavior: auto !important;
	}
}

/* Featured-image photo credit (attribution for Wikimedia; optional for stock) */
.tn-img-credit { font-size: 0.72rem; color: var(--wp--preset--color--forest); margin: 0.3rem 0 0; opacity: 0.75; text-align: right; }
.tn-img-credit a { color: inherit; text-decoration: none; }
.tn-img-credit a:hover { text-decoration: underline; }

/* Visitor-info: border waits */
.tn-bw { margin: 1.5rem 0; overflow-x: auto; }
.tn-bw table { border-collapse: collapse; width: 100%; max-width: 560px; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 3px rgba(11,37,51,.08); }
.tn-bw caption { text-align: left; font-weight: 700; color: var(--wp--preset--color--navy); padding: 0.6rem 0.9rem; caption-side: top; }
.tn-bw th, .tn-bw td { text-align: left; padding: 0.55rem 0.9rem; border-top: 1px solid rgba(11,37,51,.08); }
.tn-bw thead th { background: var(--wp--preset--color--mist); font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; border-top: 0; }
.tn-bw__na { color: var(--wp--preset--color--forest); font-size: .85rem; }
.tn-bw figcaption { font-size: .78rem; color: var(--wp--preset--color--forest); margin-top: .5rem; max-width: 560px; }

/* Visitor-info: weather */
.tn-wx { margin: 1.5rem 0; }
.tn-wx__now { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.tn-wx__temp { font-family: var(--wp--preset--font-family--heading); font-size: 2.4rem; color: var(--wp--preset--color--navy); line-height: 1; }
.tn-wx__desc { font-size: 1.1rem; }
.tn-wx__loc { color: var(--wp--preset--color--forest); font-size: .85rem; }
.tn-wx__days { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: .6rem; max-width: 640px; }
.tn-wx__day { background: #fff; border-radius: 10px; padding: .7rem .4rem; text-align: center; box-shadow: 0 1px 3px rgba(11,37,51,.08); display: flex; flex-direction: column; gap: .2rem; }
.tn-wx__dow { font-weight: 700; font-size: .8rem; }
.tn-wx__ico { font-size: .78rem; }
.tn-wx__hl { font-size: .9rem; }
.tn-wx__pop { font-size: .72rem; color: var(--wp--preset--color--teal); }
.tn-wx__src { font-size: .78rem; color: var(--wp--preset--color--forest); margin-top: .6rem; }

/* Visitor-info: FAQ accordion */
.tn-faq { margin: 1.5rem 0; max-width: 760px; }
.tn-faq__item { border: 1px solid var(--wp--preset--color--limestone); border-radius: 10px; margin-bottom: .6rem; background: #fff; overflow: hidden; }
.tn-faq__item summary { cursor: pointer; padding: .85rem 1.1rem; font-weight: 600; font-family: var(--wp--preset--font-family--heading); color: var(--wp--preset--color--navy); list-style: none; position: relative; padding-right: 2.4rem; }
.tn-faq__item summary::-webkit-details-marker { display: none; }
.tn-faq__item summary::after { content: "+"; position: absolute; right: 1.1rem; top: .8rem; color: var(--wp--preset--color--teal); font-size: 1.2rem; }
.tn-faq__item[open] summary::after { content: "\2013"; }
.tn-faq__a { padding: 0 1.1rem 1rem; }
.tn-faq__a p { margin: 0 0 .6rem; }
.tn-note { color: var(--wp--preset--color--forest); }

/* Comprehensive footer columns */
.tn-foot { gap: 2rem; align-items: flex-start; }
.tn-foot__brand { flex: 1 1 260px; }
.tn-foot__col { flex: 0 1 auto; min-width: 150px; }
.tn-foot__col h3 { margin: 0 0 0.7rem; }
.tn-foot__col ul.wp-block-list { list-style: none; margin: 0; padding: 0; }
.tn-foot__col ul.wp-block-list li { margin: 0 0 0.45rem; }
.tn-foot a { color: var(--wp--preset--color--mist); text-decoration: none; font-size: 0.92rem; }
.tn-foot a:hover { color: #fff; text-decoration: underline; }
@media (max-width: 600px) { .tn-foot { gap: 1.5rem; } .tn-foot__col { flex-basis: 42%; } }

/* Place facts card + hours */
.tn-facts { background: var(--wp--preset--color--mist); border-radius: 12px; padding: 1.25rem 1.4rem; margin: 1.25rem 0; }
.tn-facts__badges { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.9rem; }
.tn-facts__list { margin: 0; }
.tn-facts__row { display: grid; grid-template-columns: 150px 1fr; gap: 0.5rem 1rem; padding: 0.45rem 0; border-top: 1px solid rgba(11,37,51,0.08); }
.tn-facts__row:first-child { border-top: 0; }
.tn-facts__row dt { font-weight: 700; color: var(--wp--preset--color--navy); margin: 0; }
.tn-facts__row dd { margin: 0; }
.tn-facts__verified { margin: 0.9rem 0 0; font-size: 0.85rem; color: var(--wp--preset--color--forest); }
.tn-hours { border-collapse: collapse; font-size: 0.9rem; }
.tn-hours th { text-align: left; padding: 0.1rem 1rem 0.1rem 0; font-weight: 600; }
.tn-hours td { padding: 0.1rem 0; }
@media (max-width: 600px) { .tn-facts__row { grid-template-columns: 1fr; gap: 0.1rem; } }

/* Related content grids + itinerary stops */
.tn-rel__h { font-family: var(--wp--preset--font-family--heading); font-size: 1.5rem; margin: 2rem 0 1rem; }
.tn-relgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.tn-relgrid .tn-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 1px 3px rgba(11,37,51,0.08); }
.tn-relgrid .tn-card:hover { box-shadow: 0 8px 22px rgba(11,37,51,0.14); }
.tn-relgrid .tn-card__img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.tn-relgrid .tn-card__img--empty { aspect-ratio: 4 / 3; background: linear-gradient(135deg, var(--wp--preset--color--mist), var(--wp--preset--color--limestone)); }
.tn-relgrid .tn-card__body { padding: 0.7rem 0.85rem 0.9rem; display: flex; flex-direction: column; gap: 0.2rem; }
.tn-relgrid .tn-card__type { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--wp--preset--color--teal); font-weight: 700; }
.tn-relgrid .tn-card__title { font-family: var(--wp--preset--font-family--heading); font-size: 1.02rem; line-height: 1.25; }

/* Homepage region-overview map */
.tn-region-map { height: 460px; border-radius: 12px; overflow: hidden; margin: 1rem 0; background: var(--wp--preset--color--limestone); }
@media (max-width: 600px) { .tn-region-map { height: 340px; } }

/* Homepage seasonal cards */
.tn-seasons { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.tn-season { background: #fff; border-radius: 12px; padding: 1.1rem 1.2rem; box-shadow: 0 1px 3px rgba(11,37,51,0.08); text-decoration: none; color: inherit; display: block; transition: transform 0.15s, box-shadow 0.15s; }
.tn-season:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(11,37,51,0.14); }
.tn-season h3 { font-family: var(--wp--preset--font-family--heading); margin: 0 0 0.35rem; color: var(--wp--preset--color--navy); }
.tn-season p { margin: 0; font-size: 0.9rem; color: var(--wp--preset--color--ink); }
.tn-stops { padding-left: 1.2rem; }
.tn-stops__item { margin: 0.35rem 0; }
.tn-stops__item a { font-family: var(--wp--preset--font-family--heading); }

/* Query-loop card grids (homepage places / destinations / events / guides) */
.wp-block-query .wp-block-post-template.is-layout-grid { gap: 1.75rem; }
.wp-block-query .wp-block-post-template > li {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(11, 37, 51, 0.08);
	padding-bottom: 1.1rem;
	transition: transform 0.15s, box-shadow 0.15s;
}
.wp-block-query .wp-block-post-template > li:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(11, 37, 51, 0.14); }
.wp-block-query .wp-block-post-template .wp-block-post-featured-image { margin: 0 0 0.6rem; }
.wp-block-query .wp-block-post-template .wp-block-post-featured-image img { border-radius: 0; width: 100%; }
/* Placeholder band for cards with no photo yet */
.wp-block-query .wp-block-post-template > li:not(:has(.wp-block-post-featured-image img))::before {
	content: "";
	display: block;
	aspect-ratio: 4 / 3;
	margin-bottom: 0.6rem;
	background: linear-gradient(135deg, var(--wp--preset--color--mist), var(--wp--preset--color--limestone));
}
.wp-block-query .wp-block-post-template .wp-block-post-title,
.wp-block-query .wp-block-post-template .wp-block-post-terms,
.wp-block-query .wp-block-post-template .wp-block-post-excerpt {
	margin-left: 0.9rem;
	margin-right: 0.9rem;
}
.wp-block-query .wp-block-post-template .wp-block-post-terms {
	color: var(--wp--preset--color--teal);
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-top: 0.15rem;
}
.wp-block-query .wp-block-post-template .wp-block-post-title { font-size: 1.05rem; line-height: 1.25; margin-top: 0.15rem; }
.wp-block-query .wp-block-post-template .wp-block-post-excerpt { font-size: 0.9rem; color: var(--wp--preset--color--ink); margin-top: 0.35rem; }

/* Events calendar (month-grouped upcoming list) */
.tn-cal__month { font-family: var(--wp--preset--font-family--heading); font-size: 1.4rem; margin: 1.75rem 0 0.75rem; color: var(--wp--preset--color--navy); border-bottom: 2px solid var(--wp--preset--color--limestone); padding-bottom: 0.35rem; }
.tn-cal__event { display: flex; align-items: center; gap: 1rem; padding: 0.75rem 0.5rem; text-decoration: none; color: inherit; border-radius: 8px; }
.tn-cal__event:hover { background: var(--wp--preset--color--mist); }
.tn-cal__date { flex: 0 0 3.2rem; text-align: center; background: var(--wp--preset--color--teal); color: #fff; border-radius: 8px; padding: 0.35rem 0; line-height: 1.1; }
.tn-cal__wd { display: block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; }
.tn-cal__day { display: block; font-size: 1.4rem; font-weight: 700; }
.tn-cal__body { display: flex; flex-direction: column; gap: 0.15rem; }
.tn-cal__title { font-family: var(--wp--preset--font-family--heading); font-size: 1.1rem; }
.tn-cal__venue { font-size: 0.85rem; color: var(--wp--preset--color--forest); }
.tn-cal__empty { color: var(--wp--preset--color--forest); }

/* Forms (contact + newsletter) */
.tn-hp { position: absolute !important; left: -9999px !important; }
.tn-form__row { margin-bottom: 1rem; }
.tn-form input[type="text"], .tn-form input[type="email"], .tn-form textarea {
	width: 100%;
	max-width: 100%;
	padding: 0.6rem 0.7rem;
	border: 1px solid var(--wp--preset--color--limestone);
	border-radius: 8px;
	font: inherit;
}
.tn-form__submit {
	background: var(--wp--preset--color--teal);
	color: #fff;
	border: 0;
	padding: 0.65rem 1.4rem;
	border-radius: 999px;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}
.tn-form__submit:hover { background: var(--wp--preset--color--navy); }
.tn-form__submit[disabled] { opacity: 0.6; cursor: default; }
.tn-form__status { margin-top: 0.6rem; font-size: 0.9rem; }
.tn-form__status.is-ok { color: var(--wp--preset--color--forest); font-weight: 600; }
.tn-form__status.is-error { color: var(--wp--preset--color--sunset); }
/* Newsletter inline variant (on dark backgrounds) */
.tn-form--newsletter { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; justify-content: center; }
.tn-form--newsletter .tn-form__inline { flex: 1 1 260px; }
.tn-form--newsletter input[type="email"] { border: 0; }
.tn-form--newsletter .tn-form__submit { background: var(--wp--preset--color--sunset); color: var(--wp--preset--color--ink); }
.tn-form--newsletter .tn-form__status { flex-basis: 100%; text-align: center; color: var(--wp--preset--color--mist); }

/* Homepage hero background (bundled with the theme, domain-independent) */
.tn-hero-cover {
	background-image: url('assets/images/hero.jpg');
	background-size: cover;
	background-position: center 40%;
}

/* Live-info strip (dynamic tn/live-info block) */
.tn-strip {
	background: var(--wp--preset--color--forest);
	color: #fff;
	font-size: 0.9rem;
}
.tn-strip__inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0.55rem 1.5rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem 1.5rem;
	align-items: center;
	justify-content: center;
}
.tn-strip__item { white-space: nowrap; }
.tn-strip__link { color: var(--wp--preset--color--mist); text-decoration: none; font-weight: 600; }
.tn-strip__link:hover { color: #fff; text-decoration: underline; }
@media (max-width: 600px) {
	.tn-strip__inner { justify-content: flex-start; font-size: 0.82rem; }
}

/* Visible breadcrumbs (Yoast block) on single + page templates. */
.tn-breadcrumbs {
	margin-bottom: 1rem;
	font-size: 0.85rem;
	color: var(--wp--preset--color--slate, #5a6b73);
}
.tn-breadcrumbs a {
	color: var(--wp--preset--color--teal);
	text-decoration: none;
}
.tn-breadcrumbs a:hover { text-decoration: underline; }
.tn-breadcrumbs .breadcrumb_last { color: var(--wp--preset--color--ink); font-weight: 600; }

/* Blog byline: renders "By J.T. · Updated <date>" from post-author-name + modified date. */
.tn-byline { align-items: baseline; margin: 0.1rem 0 1.1rem; }
.tn-byline .wp-block-post-author-name,
.tn-byline .wp-block-post-date { color: var(--wp--preset--color--forest); }
.tn-byline .wp-block-post-author-name::before { content: "By "; }
.tn-byline .wp-block-post-date::before { content: "· Updated "; }

/* Header brand lockup: logo mark + site title. */
.tn-brand { gap: 0.6rem; }
.tn-brand__mark { display: inline-flex; line-height: 0; }
.tn-brand__mark img { display: block; width: 40px; height: 40px; border-radius: 9px; }

/* Internal-linking "Explore these places" block appended to guide posts. */
.tn-related-block {
	margin: 2.5rem 0 0.5rem;
	padding: 1.25rem 1.5rem;
	background: var(--wp--preset--color--mist);
	border-left: 4px solid var(--wp--preset--color--teal);
	border-radius: 6px;
}
.tn-related-block h2 {
	margin: 0 0 0.6rem;
	font-size: 1.15rem;
	color: var(--wp--preset--color--navy);
}
.tn-related-block ul {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 1.25rem;
}
.tn-related-block li { margin: 0; }
.tn-related-block a {
	color: var(--wp--preset--color--forest);
	font-weight: 600;
	text-decoration: none;
}
.tn-related-block a:hover { text-decoration: underline; }
