/*
 * Blog landing page + category archives (template-parts/blog-index.php).
 * Everything is scoped to .tt-blog so the rest of the theme is untouched.
 */
.tt-blog {
	--tt-green: #1d6e0c;
	--tt-green-btn: #248a0f;
	--tt-ink: #212529;
	--tt-head: #3a3a3a;
	--tt-muted: #58595b;
	--tt-line: #e9e9e9;
	--tt-grey: #f2f2f2;
	--tt-ph: #ececec;
	--tt-slab: 'Arbutus Slab', Georgia, serif;
	color: var(--tt-ink);
	font-size: 15px;
	line-height: 1.5;
}
.tt-blog a { color: #000; }
.tt-blog a:hover { color: var(--tt-green); }
.tt-blog h1, .tt-blog h2, .tt-blog h3 { margin: 0; font-family: var(--tt-slab); font-weight: 400; color: var(--tt-head); }
.tt-blog p { margin: 0; line-height: inherit; }

.tt-blog .screen-reader-text { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.tt-blog-wrap { max-width: 1140px; margin: 0 auto; }
.tt-blog-section { padding: 56px 16px; }
.tt-blog-section--flush { padding-top: 0; }
.tt-blog-section--grey { background: var(--tt-grey); }
.tt-blog-h2 { font-size: 27px; line-height: 1.4; margin-bottom: 24px !important; }
.tt-blog-h2--sm { font-size: 25px; line-height: 1.3; margin-bottom: 0 !important; }
.tt-blog-h2--tight { margin-bottom: 6px !important; }
.tt-blog-lead { color: var(--tt-muted); margin-bottom: 24px !important; }

.tt-blog-kicker { display: block; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--tt-green); }
.tt-blog-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13.5px; color: var(--tt-muted); }

/* Buttons */
.tt-blog .tt-blog-btn { display: inline-block; background: var(--tt-green-btn); color: #fff; font-weight: 700; font-size: 18px; line-height: 27px; padding: 10px 22px; border-radius: 4px; border: 1px solid transparent; }
.tt-blog .tt-blog-btn:hover { background: var(--tt-green); color: #fff; }
.tt-blog .tt-blog-btn--white { background: #fff; color: var(--tt-green); }
.tt-blog .tt-blog-btn--white:hover { background: var(--tt-grey); color: var(--tt-green); }
.tt-blog .tt-blog-btn--outline { background: transparent; color: var(--tt-ink); border-color: var(--tt-head); }
.tt-blog .tt-blog-btn--outline:hover { background: var(--tt-head); color: #fff; }

/* Hero */
.tt-blog-hero { position: relative; background: #4b5a46 center / cover no-repeat; color: #fff; padding: 72px 16px 64px; }
.tt-blog-hero::before { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .5); }
.tt-blog-hero__inner { position: relative; display: flex; flex-direction: column; gap: 18px; }
.tt-blog-crumbs { font-size: 14px; color: #f2f2f2; }
.tt-blog .tt-blog-crumbs a { color: #fff; }
.tt-blog .tt-blog-hero__title { font-size: 42px; line-height: 1.2; max-width: 760px; color: #fff; }
.tt-blog-hero__intro { font-size: 18px; line-height: 28px !important; max-width: 680px; }
.tt-blog-search { display: flex; flex-wrap: wrap; gap: 8px; max-width: 620px; margin-top: 8px; }
.tt-blog-search input[type="search"] { flex: 1 1 320px; min-width: 0; width: auto; height: 48px; padding: 0 16px; font-family: Lato, Arial, sans-serif; font-size: 16px; color: var(--tt-ink); }
.tt-blog-search button { height: 48px; padding: 0 24px; background: var(--tt-green-btn); color: #fff; border: 0; border-radius: 4px; font-weight: 700; font-size: 18px; cursor: pointer; }
.tt-blog-search button:hover { background: var(--tt-green); }

/* Category chips */
.tt-blog-cats { border-bottom: 1px solid var(--tt-line); padding: 16px; }
.tt-blog-cats__list { display: flex; flex-wrap: wrap; gap: 10px; }
.tt-blog .tt-blog-chip { background: var(--tt-grey); padding: 10px 16px; border-radius: 4px; font-size: 15px; }
.tt-blog .tt-blog-chip.is-active { background: var(--tt-green); color: #fff; font-weight: 700; }

/* Image frame */
.tt-blog-thumb { display: block; aspect-ratio: 7 / 4; background: var(--tt-ph); overflow: hidden; }
.tt-blog-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.tt-blog-thumb:hover img { transform: scale(1.03); }

/* Featured */
.tt-blog-featured { display: flex; flex-wrap: wrap; gap: 30px; }
.tt-blog-featured__main { flex: 2 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.tt-blog-featured__side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.tt-blog-featured__item { display: flex; flex-direction: column; gap: 10px; }
.tt-blog .tt-blog-featured__title { font-size: 30px; line-height: 38px; }
.tt-blog .tt-blog-featured__subtitle { font-size: 21px; line-height: 27px; }
.tt-blog .tt-blog-featured__title a, .tt-blog .tt-blog-featured__subtitle a, .tt-blog .tt-blog-card__title a { color: var(--tt-head); }
.tt-blog .tt-blog-featured__title a:hover, .tt-blog .tt-blog-featured__subtitle a:hover, .tt-blog .tt-blog-card__title a:hover { color: var(--tt-green); }
.tt-blog-featured__excerpt { font-size: 16px; line-height: 25.6px !important; }

/* Updates */
.tt-blog-updates { background: var(--tt-grey); padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.tt-blog-updates__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 24px; }
.tt-blog .tt-blog-more { font-weight: 700; color: var(--tt-green); }
.tt-blog-updates__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.tt-blog .tt-blog-update { background: #fff; padding: 18px; display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--tt-line); }
.tt-blog .tt-blog-update:hover { border-color: var(--tt-green); }
.tt-blog-update__title { font-family: var(--tt-slab); font-size: 18px; line-height: 25px; color: var(--tt-head); }

/* Latest grid */
.tt-blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 32px 30px; }
.tt-blog-card { border: 1px solid var(--tt-line); display: flex; flex-direction: column; }
.tt-blog-card__body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex-grow: 1; }
.tt-blog .tt-blog-card__title { font-size: 22px; line-height: 28px; }
.tt-blog-card__meta { margin-top: auto; }
.tt-blog-empty { background: var(--tt-grey); padding: 32px; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; font-size: 16px; }

/* Pagination (paginate_links output) */
.tt-blog-pages { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 40px; }
.tt-blog-pages .page-numbers { min-width: 44px; height: 44px; padding: 0 14px; display: flex; align-items: center; justify-content: center; border: 1px solid #a5a1a1; border-radius: 4px; }
.tt-blog-pages .page-numbers.current { background: var(--tt-green); border-color: var(--tt-green); color: #fff; font-weight: 700; }
.tt-blog-pages .page-numbers.dots { border: 0; }

/* States */
.tt-blog-states { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.tt-blog .tt-blog-state { background: #fff; display: flex; flex-direction: column; }
.tt-blog-state__img { display: block; aspect-ratio: 7 / 4; background: var(--tt-line) center / cover no-repeat; }
.tt-blog-state__name { padding: 12px 14px; font-family: var(--tt-slab); font-size: 18px; color: var(--tt-head); }
.tt-blog .tt-blog-state:hover .tt-blog-state__name { color: var(--tt-green); }

/* Dual CTA */
.tt-blog-cta { display: flex; flex-wrap: wrap; }
.tt-blog-cta__b2b, .tt-blog-cta__d2c { flex: 1 1 480px; min-width: 0; padding: 56px 32px; display: flex; flex-direction: column; gap: 16px; }
.tt-blog-cta__b2b { background: var(--tt-green); color: #fff; }
.tt-blog-cta__d2c { background: var(--tt-ph); }
.tt-blog .tt-blog-cta h2 { font-size: 30px; line-height: 38px; }
.tt-blog .tt-blog-cta__b2b h2 { color: #fff; }
.tt-blog-cta ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 16px; line-height: 24px; }
.tt-blog-cta ul li { padding: 0; }
.tt-blog-cta p { font-size: 16px; line-height: 25.6px !important; }
.tt-blog-cta__btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.tt-blog-eyebrow { font-size: 13.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.tt-blog-eyebrow--green { color: var(--tt-green); }

/* Sticky quick contact */
.tt-blog-quick { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 10px; z-index: 50; }
.tt-blog .tt-blog-quick a { display: flex; align-items: center; gap: 8px; font-weight: 700; padding: 12px 18px; border-radius: 4px; box-shadow: 0 2px 8px rgba(0, 0, 0, .2); }
.tt-blog .tt-blog-quick__wa { background: var(--tt-green); color: #fff; }
.tt-blog .tt-blog-quick__wa:hover { background: var(--tt-green-btn); color: #fff; }
.tt-blog .tt-blog-quick__call { background: #fff; color: var(--tt-ink); border: 1px solid #a5a1a1; }

/* ============ Article page (single-post.php) ============ */
.tt-blog .tt-blog-btn--line { background: transparent; color: var(--tt-green); border-color: var(--tt-green); }
.tt-blog .tt-blog-btn--line:hover { background: var(--tt-green); color: #fff; }
.tt-blog-card--white { background: #fff; }

.tt-article__head { padding: 32px 16px 24px; }
.tt-article__head-inner { display: flex; flex-direction: column; gap: 16px; }
.tt-article__crumbs { color: var(--tt-muted); }
.tt-blog .tt-article__crumbs a { color: #000; }
.tt-blog .tt-article__crumbs a:hover { color: var(--tt-green); }
.tt-article__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tt-blog .tt-article__chips a { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--tt-green); background: var(--tt-grey); padding: 6px 10px; }
.tt-blog .tt-article__title { font-size: 40px; line-height: 48px; max-width: 860px; }
.tt-article__standfirst { font-size: 19px; line-height: 30px !important; color: var(--tt-head); max-width: 780px; }
.tt-article__bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; border-top: 1px solid var(--tt-line); border-bottom: 1px solid var(--tt-line); padding: 14px 0; }
.tt-article__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; font-size: 14px; color: var(--tt-muted); }
.tt-article__meta strong { color: var(--tt-ink); }
.tt-article__by { display: flex; align-items: center; gap: 10px; }
.tt-article__by img, .tt-article__author img { border-radius: 50%; background: var(--tt-line); }
.tt-article__share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13.5px; color: var(--tt-muted); }
.tt-blog .tt-share { color: #fff; padding: 6px 10px; font-weight: 700; }
.tt-blog .tt-share:hover { color: #fff; opacity: .85; }
.tt-share--facebook { background: #3b5998; }
.tt-share--x { background: #212529; }
.tt-share--linkedin { background: #007bb6; }
.tt-share--whatsapp { background: #1d6e0c; }

.tt-article__hero { margin: 0 auto; padding: 0 16px; }
.tt-article__hero-img { aspect-ratio: 16 / 7; background: var(--tt-ph); overflow: hidden; }
.tt-article__hero-img img { width: 100%; height: 100%; object-fit: cover; }
.tt-article__hero figcaption { font-size: 13.5px; color: var(--tt-muted); margin-top: 8px; }

.tt-article__main { padding: 40px 16px 56px; }
.tt-article__layout { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.tt-article__body { flex: 999 1 560px; min-width: 0; max-width: 740px; display: flex; flex-direction: column; gap: 22px; }
.tt-article__side { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }

/* Post content typography (Classic editor HTML) */
.tt-article__content { font-size: 17px; line-height: 27.2px; display: flex; flex-direction: column; gap: 22px; }
.tt-article__content > * { margin: 0; }
.tt-article__content p { line-height: inherit; }
.tt-blog .tt-article__content h2 { font-size: 27px; line-height: 37.8px; margin-top: 14px; scroll-margin-top: 20px; }
.tt-blog .tt-article__content h3 { font-size: 21px; line-height: 28px; margin-top: 6px; }
.tt-article__content a { color: var(--tt-green); text-decoration: underline; }
.tt-article__content ul, .tt-article__content ol { padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.tt-article__content li { padding: 0; }
.tt-article__content img { max-width: 100%; height: auto; }
.tt-article__content .wp-caption { max-width: 100%; }
.tt-article__content .wp-caption-text, .tt-article__content figcaption { font-size: 13.5px; color: var(--tt-muted); margin-top: 8px; }
.tt-article__content blockquote { border-left: 4px solid var(--tt-green-btn); background: var(--tt-grey); padding: 16px 20px; font-style: italic; }
.tt-article__table { overflow-x: auto; border: 1px solid var(--tt-line); }
.tt-article__table table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 15px; line-height: 22.5px; }
.tt-article__table th, .tt-article__table td { padding: 12px 14px; text-align: left; vertical-align: top; border: 0; }
.tt-article__table thead th, .tt-article__table tr:first-child th { background: var(--tt-green); color: #fff; }
.tt-article__table tbody tr { border-top: 1px solid var(--tt-line); }
.tt-article__table tbody tr:nth-child(even) { background: var(--tt-grey); }
.tt-article__table td:first-child { font-weight: 700; }

/* Shortcode blocks */
.tt-glance { background: var(--tt-grey); padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.tt-glance__title { font-family: var(--tt-slab); font-weight: 400; font-size: 22px; line-height: 28px; color: var(--tt-head); }
.tt-glance dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 24px; font-size: 16px; line-height: 24px; }
.tt-glance dt { font-weight: 700; }
.tt-glance dd { margin: 0; }
.tt-cta { border: 1px solid var(--tt-line); border-top: 4px solid var(--tt-green-btn); padding: 22px 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; }
.tt-cta__text { flex: 1 1 320px; display: flex; flex-direction: column; gap: 4px; font-size: 16px; line-height: 24px; }
.tt-cta__text strong { font-family: var(--tt-slab); font-weight: 400; font-size: 21px; line-height: 27px; color: var(--tt-head); }
.tt-cta--partner { background: var(--tt-green); color: #fff; border: 0; padding: 24px; }
.tt-cta--partner .tt-cta__text strong { color: #fff; font-size: 22px; line-height: 28px; }
.tt-blog .tt-article__content .tt-blog-btn { text-decoration: none; }
.tt-route { background: var(--tt-grey); padding: 24px; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.tt-blog .tt-article__content .tt-route ol { margin: 0; padding: 0; list-style: none; gap: 14px; }
.tt-route li { display: flex; gap: 14px; }
.tt-route__num { flex: 0 0 32px; height: 32px; border-radius: 50%; background: var(--tt-green); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.tt-route__note { font-size: 15px; line-height: 23px !important; color: var(--tt-muted); }
/* FAQs (ACF relationship "post_faqs" → faq posts) */
.tt-article__faqs { display: flex; flex-direction: column; gap: 22px; font-size: 17px; line-height: 27.2px; }
.tt-blog .tt-article__faqs h2 { font-size: 27px; line-height: 37.8px; margin-top: 14px; scroll-margin-top: 20px; }
.tt-faq-list { border-top: 1px solid var(--tt-line); }
.tt-faq { border-bottom: 1px solid var(--tt-line); padding: 16px 0; }
.tt-faq summary { cursor: pointer; font-weight: 700; font-size: 18px; line-height: 26px; }
.tt-faq summary:hover { color: var(--tt-green); }
.tt-faq__answer p { margin: 10px 0 0; line-height: inherit; }
.tt-faq__answer a { color: var(--tt-green); text-decoration: underline; }

.tt-article__updated { font-size: 14px; line-height: 21px !important; color: var(--tt-muted); border-top: 1px solid var(--tt-line); padding-top: 14px; }
.tt-article__updated strong { color: var(--tt-ink); }
.tt-article__author { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; background: var(--tt-grey); padding: 22px; }
.tt-article__author img { flex: 0 0 72px; border: 1px solid #a5a1a1; }
.tt-article__author > div { flex: 1 1 280px; display: flex; flex-direction: column; gap: 4px; }
.tt-article__author strong { font-family: var(--tt-slab); font-weight: 400; font-size: 20px; color: var(--tt-head); }
.tt-article__author span { font-size: 14px; color: var(--tt-muted); }
.tt-article__author p { margin-top: 4px; font-size: 15px; line-height: 23px !important; }

/* Sidebar */
.tt-article__toc { border: 1px solid var(--tt-line); padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.tt-article__toc strong, .tt-article__box strong, .tt-article__guide strong { font-family: var(--tt-slab); font-weight: 400; font-size: 20px; color: var(--tt-head); }
.tt-article__box { background: var(--tt-grey); padding: 22px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.tt-article__box strong { font-size: 21px; }
.tt-article__box .tt-blog-btn { padding: 8px 20px; }
.tt-article__box--partner { background: #fff; border: 2px solid var(--tt-green); }
.tt-blog .tt-article__guide { border: 1px solid var(--tt-line); padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.tt-article__guide span { color: var(--tt-green); font-weight: 700; }
.tt-blog .tt-article__guide:hover { border-color: var(--tt-green); }
@media screen and (min-width: 992px) {
	.tt-article__side { position: sticky; top: 20px; }
}

@media screen and (max-width: 767px) {
	.tt-blog .tt-article__title { font-size: 30px; line-height: 38px; }
	.tt-article__standfirst { font-size: 17px; line-height: 26px !important; }
	.tt-article__main { padding: 28px 16px 40px; }
	.tt-article__layout { gap: 32px; }
	.tt-article__content { font-size: 16px; line-height: 26px; }
	.tt-blog .tt-article__content h2 { font-size: 24px; line-height: 32px; }
	body.single-post { padding-bottom: 48px; }
	.tt-blog-hero { padding: 48px 16px 40px; }
	.tt-blog .tt-blog-hero__title { font-size: 32px; }
	.tt-blog-hero__intro { font-size: 16px; line-height: 25px !important; }
	.tt-blog-section { padding: 40px 16px; }
	.tt-blog-section--flush { padding-top: 0; }
	.tt-blog-featured__main, .tt-blog-featured__side, .tt-blog-cta__b2b, .tt-blog-cta__d2c { flex-basis: 100%; }
	.tt-blog .tt-blog-featured__title { font-size: 25px; line-height: 32px; }
	.tt-blog-grid { grid-template-columns: 1fr; }
	.tt-blog-states { grid-template-columns: repeat(2, 1fr); gap: 12px; }
	.tt-blog-updates { padding: 20px; }
	.tt-blog-cta__b2b, .tt-blog-cta__d2c { padding: 40px 16px; }
	/* Quick contact becomes a slim bar so it doesn't cover content */
	.tt-blog-quick { left: 0; right: 0; bottom: 0; flex-direction: row; gap: 0; }
	.tt-blog .tt-blog-quick a { flex: 1; justify-content: center; border-radius: 0; box-shadow: none; padding: 12px 8px; }
	body.blog, body.category { padding-bottom: 48px; }
}
