/*
 * The blog (/tinklarastis/ and its posts) in the kit's look: brand.css tokens (--primary red, --tbInk, --tbPhone),
 * Boldonse capitals for headings at the kit's Lithuanian line-heights (brand.css: 1.7em, 1.8em on small ones),
 * Overpass for text, square corners, the warm grey of the home page's boxes (#F1EEEC), the kit's FAQ accordion
 * (nav.js toggles .cs-faq-item) and its skewed button. Loaded before brand.css (styles.ts STYLES.blog).
 * Structure ported from the GustMedia blog (2026-09-29).
 */

/* ---------- shared bits ---------- */
.tb-sep {
	margin: 0 0.5rem;
	color: #b9b9c2;
}
.tb-more {
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.5em;
	text-decoration: none;
	color: var(--primary);
	display: inline-flex;
	align-items: center;
	gap: 0.125rem;
}
.tb-more .cs-icon {
	width: 1.5rem;
	height: auto;
	flex: none;
	transition: transform 0.3s;
}
.tb-more .cs-icon path,
.tb-aside-card .cs-button-solid .cs-icon path {
	fill: currentColor;
}
.tb-more:hover .cs-icon {
	transform: translateX(0.25rem);
}

/* ---------- /tinklarastis/: intro, topic chips, newest post ---------- */
#tb-blog {
	padding: var(--sectionPadding);
	background-color: #fff;
}
#tb-blog .cs-container,
.tb-blog-topic .cs-container {
	width: 100%;
	max-width: 80rem;
	margin: auto;
	display: flex;
	flex-direction: column;
	gap: clamp(2rem, 4vw, 3rem);
}
#tb-blog .cs-content {
	max-width: 50rem;
}
#tb-blog .cs-text {
	max-width: 46rem;
}
.tb-topics ul {
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.625rem;
}
.tb-topics li {
	list-style: none;
}
.tb-topics a {
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1.2em;
	text-decoration: none;
	padding: 0.625rem 0.75rem 0.625rem 1rem;
	color: var(--headerColor);
	background-color: #fff;
	border: 1px solid #e3e1df;
	display: inline-flex;
	align-items: center;
	gap: 0.625rem;
	transition: border-color 0.3s, color 0.3s;
}
.tb-topics a:hover {
	color: var(--primary);
	border-color: var(--primary);
}
.tb-topics-n {
	font-size: 0.8125rem;
	min-width: 1.625rem;
	height: 1.625rem;
	padding: 0 0.375rem;
	color: var(--tbOnAccent);
	background-color: var(--primary);
	display: inline-grid;
	place-items: center;
}
.tb-newest-label {
	font-size: var(--topperFontSize);
	font-weight: 700;
	line-height: 1.2em;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	margin: 0 0 1rem;
	color: var(--primary);
}

/* ---------- topic sections ---------- */
.tb-blog-topic {
	padding: var(--sectionPadding);
	background-color: #fff;
	scroll-margin-top: 5rem;
}
.tb-blog-topic-alt {
	background-color: #f1eeec;
}
.tb-topic-head {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}
.tb-topic-head .cs-content {
	max-width: 46rem;
}
.tb-topic-head .cs-title {
	margin-bottom: 0.75rem;
}
.tb-topic-links {
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.375rem;
}
.tb-topic-links li {
	list-style: none;
}
@media only screen and (min-width: 64rem) {
	.tb-topic-head {
		flex-direction: row;
		justify-content: space-between;
		align-items: flex-end;
		gap: 3rem;
	}
	.tb-topic-links {
		align-items: flex-end;
		flex: none;
		padding-bottom: 0.25rem;
	}
}

/* ---------- post cards ---------- */
.tb-cards {
	width: 100%;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: clamp(1.25rem, 2.5vw, 2rem);
}
.tb-card {
	list-style: none;
	background-color: #fff;
	border: 1px solid #e3e1df;
	display: flex;
	flex-direction: column;
	min-width: 0;
}
.tb-card-photo {
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background-color: var(--tbInk);
	display: block;
}
.tb-card-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.6s, opacity 0.3s;
}
.tb-card:hover .tb-card-photo img {
	transform: scale(1.06);
	opacity: 0.85;
}
.tb-card-text {
	padding: clamp(1.25rem, 2.5vw, 1.75rem);
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.75rem;
	flex: 1;
}
.tb-card-meta {
	font-size: 0.8125rem;
	font-weight: 700;
	line-height: 1.4em;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin: 0;
	color: var(--primary);
}
.tb-card-title {
	font-family: "Overpass", Arial, sans-serif;
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.35em;
	text-transform: none;
	margin: 0;
	color: var(--headerColor);
}
.tb-card-title a {
	font-size: inherit;
	line-height: inherit;
	text-decoration: none;
	color: inherit;
	transition: color 0.3s;
}
.tb-card-title a:hover {
	color: var(--primary);
}
.tb-card-excerpt {
	font-size: 1rem;
	line-height: 1.6em;
	margin: 0;
	color: var(--bodyTextColor);
	flex: 1;
}
/* Rows of three; a last row of two or one is centred (as the home page's seven service cards) */
@media only screen and (min-width: 40rem) {
	.tb-cards-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
	.tb-cards-grid > .tb-card {
		grid-column: span 2;
	}
	.tb-cards-grid > .tb-card:last-child:nth-child(2n + 1) {
		grid-column: 2 / span 2;
	}
}
@media only screen and (min-width: 64rem) {
	.tb-cards-grid {
		grid-template-columns: repeat(6, minmax(0, 1fr));
	}
	.tb-cards-grid > .tb-card:last-child:nth-child(2n + 1) {
		grid-column: span 2;
	}
	.tb-cards-grid > .tb-card:nth-last-child(2):nth-child(3n + 1) {
		grid-column: 2 / span 2;
	}
	.tb-cards-grid > .tb-card:last-child:nth-child(3n + 1) {
		grid-column: 3 / span 2;
	}
}
/* The newest post: one wide card, photo left */
@media only screen and (min-width: 48rem) {
	.tb-card-wide {
		flex-direction: row;
	}
	.tb-card-wide .tb-card-photo {
		width: 55%;
		aspect-ratio: auto;
		min-height: 22rem;
		flex: none;
	}
	.tb-card-wide .tb-card-text {
		padding: clamp(1.5rem, 4vw, 3rem);
		justify-content: center;
	}
	.tb-card-wide .tb-card-title {
		font-size: clamp(1.5rem, 2.4vw, 2rem);
		line-height: 1.3em;
	}
	.tb-card-wide .tb-card-excerpt {
		flex: none;
	}
}

/* ---------- post banner (#banner-558, PostBanner.astro) ---------- */
/* Smaller than a service banner's two words, and never wider than the longest word allows on a phone
   (--fit-chars, Boldonse capitals ~0.7em). Beats brand.css's #banner-558 .cs-int-title[style*="--fit-chars"]. */
#banner-558.tb-post-banner .cs-int-title[style] {
	font-size: min(clamp(1.75rem, 3.4vw, 2.75rem), calc((100vw - 2rem) / (var(--fit-chars) * 0.72)));
	max-width: 64rem;
	text-wrap: balance;
}
#banner-558.tb-post-banner .tb-line {
	display: inline;
}
@media only screen and (min-width: 48rem) {
	#banner-558.tb-post-banner .tb-line {
		display: block;
	}
}
.tb-post-eyebrow {
	font-size: 1rem;
	line-height: 1.5em;
	margin: 0;
	color: #d9d9d9;
}
.tb-post-eyebrow .tb-sep {
	color: #8a8a94;
}

/* ---------- post: article and sidebar ---------- */
#tb-post {
	padding: clamp(2.5rem, 5vw, 4.5rem) 1rem clamp(3.75rem, 7.82vw, 6.25rem);
	background-color: #fff;
}
#tb-post .cs-container {
	width: 100%;
	max-width: 80rem;
	margin: auto;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: clamp(3rem, 5vw, 4rem);
}
@media only screen and (min-width: 64rem) {
	#tb-post .cs-container {
		grid-template-columns: minmax(0, 1fr) 20rem;
	}
}
@media only screen and (min-width: 80rem) {
	#tb-post .cs-container {
		grid-template-columns: minmax(0, 48rem) 22rem;
		justify-content: space-between;
	}
}
.tb-post-main {
	min-width: 0;
}
.tb-post-lead {
	margin: 0 0 2rem;
}
.tb-post-lead img {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	display: block;
}
.tb-toc {
	margin: 0 0 2.5rem;
	padding: 1.25rem 1.5rem;
	background-color: #f1eeec;
	border-left: 4px solid var(--primary);
}
.tb-toc-title {
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1.2em;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	margin: 0 0 0.75rem;
	color: var(--primary);
}
.tb-toc ol {
	margin: 0;
	padding-left: 1.25rem;
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
}
.tb-toc li {
	font-size: 1rem;
	line-height: 1.45em;
	color: var(--headerColor);
}
.tb-toc li::marker {
	font-weight: 700;
	color: var(--primary);
}
.tb-toc a {
	text-decoration: none;
	color: var(--headerColor);
}
.tb-toc a:hover {
	text-decoration: underline;
	color: var(--primary);
}

/* The text (Markdown): the service pages' article, a touch larger for reading */
.tb-prose > :first-child {
	margin-top: 0;
}
.tb-prose h2,
.tb-section-title {
	font-size: min(1.75rem, 7.5vw);
	line-height: 1.7em;
	margin: 2.75rem 0 1rem;
	color: var(--headerColor);
	scroll-margin-top: 8rem;
}
.tb-prose h3 {
	font-size: 1.25rem;
	line-height: 1.8em;
	margin: 2rem 0 0.75rem;
	color: var(--primary);
	scroll-margin-top: 8rem;
}
.tb-prose p,
.tb-prose li {
	font-size: 1.0625rem;
	line-height: 1.7em;
	color: var(--bodyTextColor);
}
.tb-prose p {
	margin: 0 0 1.25rem;
}
.tb-prose ul,
.tb-prose ol {
	margin: 0 0 1.5rem;
	padding-left: 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}
.tb-prose ul li {
	list-style: none;
	position: relative;
}
.tb-prose ul li::before {
	content: "";
	width: 0.375rem;
	height: 0.375rem;
	background-color: var(--primary);
	position: absolute;
	top: 0.72em;
	left: -1.125rem;
}
.tb-prose ol li::marker {
	font-weight: 700;
	color: var(--primary);
}
.tb-prose strong {
	font-weight: 700;
	color: var(--headerColor);
}
.tb-prose a {
	font-size: inherit;
	line-height: inherit;
	text-decoration: underline;
	text-underline-offset: 0.15em;
	color: var(--primary);
}

/* Photos under the text */
.tb-post-photos ul {
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.75rem;
}
.tb-post-photos li {
	list-style: none;
}
.tb-post-photos img {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	display: block;
}

/* FAQ: the kit's accordion (#faq-2294's rules, on the article's white ground) */
.tb-post-faq .cs-faq {
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}
.tb-post-faq .cs-faq-item {
	list-style: none;
	background-color: #f7f4ef;
	overflow: hidden;
	position: relative;
}
.tb-post-faq .cs-faq-item::after {
	content: "";
	width: 0;
	height: 0.25rem;
	background-color: var(--primary);
	position: absolute;
	bottom: 0;
	left: 0;
	transition: width 0.3s ease;
}
.tb-post-faq .cs-faq-item:hover::after,
.tb-post-faq .cs-faq-item.active::after {
	width: 100%;
}
.tb-post-faq .cs-faq-item.active {
	background-color: #fdf0ea;
}
.tb-post-faq .cs-button {
	font-family: "Overpass", Arial, sans-serif;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.4em;
	text-align: left;
	width: 100%;
	padding: clamp(1.125rem, 2vw, 1.375rem) 3.25rem clamp(1.125rem, 2vw, 1.375rem) clamp(1.125rem, 2vw, 1.5rem);
	background-color: transparent;
	color: var(--headerColor);
	border: none;
	display: block;
	position: relative;
}
.tb-post-faq .cs-button::before,
.tb-post-faq .cs-button::after {
	content: "";
	width: 0.75rem;
	height: 0.125rem;
	background-color: var(--primary);
	border-radius: 0.125rem;
	display: block;
	position: absolute;
	top: 50%;
	right: 1.3125rem;
	transition: transform 0.3s;
	transform-origin: center center;
}
.tb-post-faq .cs-button::before {
	transform: rotate(270deg);
}
.tb-post-faq .cs-button::after {
	transform: rotate(180deg);
}
.tb-post-faq .cs-faq-item.active .cs-button::before,
.tb-post-faq .cs-faq-item.active .cs-button::after {
	transform: rotate(0deg);
}
.tb-post-faq .cs-button-text {
	display: block;
}
.tb-post-faq .cs-item-p {
	font-size: 1rem;
	line-height: 1.6em;
	height: 0;
	margin: 0;
	padding: 0 clamp(1.125rem, 2vw, 1.5rem);
	overflow: hidden;
	opacity: 0;
	color: var(--bodyTextColor);
	transition: opacity 0.3s, padding-bottom 0.3s;
}
.tb-post-faq .cs-faq-item.active .cs-item-p {
	height: auto;
	padding-bottom: 1.25rem;
	opacity: 1;
}
.tb-post-date {
	font-size: 0.9375rem;
	line-height: 1.5em;
	margin: 2.5rem 0 0;
	padding-top: 1.25rem;
	border-top: 1px solid #e8e8e8;
	color: #6b6b7b;
}

/* Sidebar: other posts, back to the list, the service box */
.tb-post-aside {
	display: flex;
	flex-direction: column;
	gap: 2rem;
	min-width: 0;
}
.tb-aside-title {
	font-family: "Overpass", Arial, sans-serif;
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1.2em;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	margin: 0 0 1.25rem;
	color: var(--primary);
}
.tb-postlist ul {
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 1.125rem;
}
.tb-postlist li {
	list-style: none;
}
.tb-postlist-link {
	text-decoration: none;
	display: grid;
	grid-template-columns: 4.5rem minmax(0, 1fr);
	gap: 0.875rem;
	align-items: start;
}
.tb-postlist-photo {
	width: 4.5rem;
	aspect-ratio: 1;
	overflow: hidden;
	display: block;
}
.tb-postlist-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.tb-postlist-name {
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1.35em;
	color: var(--headerColor);
	display: block;
	transition: color 0.3s;
}
.tb-postlist-link:hover .tb-postlist-name {
	color: var(--primary);
}
.tb-postlist-date {
	font-size: 0.8125rem;
	line-height: 1.4em;
	margin-top: 0.25rem;
	color: #6b6b7b;
	display: block;
}
.tb-back {
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.5em;
	text-decoration: none;
	color: var(--primary);
	display: inline-flex;
	align-items: center;
	gap: 0.625rem;
	align-self: flex-start;
}
.tb-back::before {
	content: "";
	width: 0.5rem;
	height: 0.5rem;
	border-left: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform 0.3s;
}
.tb-back:hover::before {
	transform: translateX(-0.25rem) rotate(45deg);
}
.tb-aside-card {
	padding: clamp(1.5rem, 3vw, 2rem);
	color: #fff;
	background-color: var(--tbInk);
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 1rem;
}
.tb-aside-topper {
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1.2em;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	margin: 0;
	color: var(--tbPhone);
}
.tb-aside-card-title {
	font-size: 1.125rem;
	line-height: 1.8em;
	margin: 0;
	color: #fff;
}
.tb-aside-text,
.tb-aside-phone {
	font-size: 0.9375rem;
	line-height: 1.6em;
	margin: 0;
	color: rgba(255, 255, 255, 0.82);
}
.tb-aside-card .cs-button-solid {
	margin: 0.5rem 0 0.25rem;
	padding: 0 1.5rem;
}
.tb-aside-card .cs-button-solid:hover {
	color: var(--tbInk);
	background-color: #fff;
}
.tb-aside-link {
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1.5em;
	text-decoration: underline;
	text-underline-offset: 0.15em;
	color: #fff;
}
.tb-aside-link:hover {
	color: var(--tbPhone);
}
.tb-aside-phone .tb-phone {
	font-size: inherit;
	white-space: nowrap;
}
@media only screen and (min-width: 64rem) {
	.tb-aside-card {
		position: sticky;
		top: 7.5rem;
	}
}
