/* Tietopankki: front-page section, blog archive and single article. */
.tp-main .container { padding-bottom: 3rem; }

/* Section head (front page + related) */
.tp-section { margin: 3rem 0 2rem; }
.tp-section__head { margin-bottom: 1.25rem; }
.tp-section__title { font-size: 1.75rem; line-height: 1.2; font-weight: 700; color: #06283d; margin: 0 0 .5rem; }
.tp-section__intro { font-size: 1rem; color: #444; max-width: 48rem; margin: 0; }
.tp-section__all { margin: 1.5rem 0 0; text-align: center; }

/* Card grid */
.tp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.tp-card { display: flex; flex-direction: column; background: #fff; border: 1px solid #e0e0e0; border-radius: 8px; padding: 1.25rem; box-sizing: border-box; transition: box-shadow .2s ease, transform .2s ease; }
.tp-card:hover { box-shadow: 0 6px 18px rgba(6, 40, 61, .10); transform: translateY(-2px); }
.tp-card__title { font-size: 1.05rem; line-height: 1.35; font-weight: 700; margin: 0 0 .6rem; }
.tp-card__title a { color: #06283d; text-decoration: none; }
.tp-card__title a:hover { color: #1363df; text-decoration: underline; }
.tp-card__snippet { font-size: .95rem; line-height: 1.5; color: #555; margin: 0 0 1rem; flex: 1 1 auto; }
.tp-card__more { color: #1363df; font-weight: 600; text-decoration: none !important; white-space: nowrap; }
.tp-card__more:hover { text-decoration: underline !important; }
.tp-card__button { display: inline-block; align-self: flex-start; background: #06283d; color: #fff !important; border: 2px solid #06283d; border-radius: 4px; padding: .5rem 1rem; font-size: .875rem; font-weight: 600; line-height: 1.2; text-decoration: none !important; transition: background .2s ease, color .2s ease; }
.tp-card__button:hover { background: #1363df; border-color: #1363df; color: #fff !important; }
.tp-card__button--outline { background: transparent; color: #06283d !important; }
.tp-card__button--outline:hover { background: #06283d; color: #fff !important; }

/* Card image */
.tp-card__media { display: block; margin: -1.25rem -1.25rem 1rem; border-radius: 8px 8px 0 0; overflow: hidden; aspect-ratio: 16 / 10; background: #f1f1f2; }
.tp-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Archive */
.tp-archive__head { margin: 1rem 0 1.5rem; }
.tp-archive__title { font-size: 2rem; line-height: 1.2; color: #06283d; margin: .5rem 0 .5rem; }
.tp-archive__desc { font-size: 1.05rem; color: #444; max-width: 48rem; }
.tp-pagination { margin: 2rem 0; }
.tp-pagination .nav-links { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.tp-pagination .page-numbers { display: inline-block; padding: .4rem .8rem; border: 1px solid #e0e0e0; border-radius: 4px; color: #06283d; text-decoration: none; }
.tp-pagination .page-numbers.current { background: #06283d; color: #fff; border-color: #06283d; }

/* Breadcrumb (Rank Math or fallback) */
.tp-main .rank-math-breadcrumb, .tp-breadcrumb { font-size: .875rem; color: #666; margin: 1rem 0 .5rem; }
.tp-main .rank-math-breadcrumb a, .tp-breadcrumb a { color: #06283d; text-decoration: none; }
.tp-main .rank-math-breadcrumb a:hover, .tp-breadcrumb a:hover { text-decoration: underline; }
.tp-main .rank-math-breadcrumb .separator { margin: 0 .35rem; }

/* Single article: hero, table of contents, FAQ, tables */
.tp-article__hero { margin: 0 0 1.5rem; border-radius: 8px; overflow: hidden; aspect-ratio: 16 / 9; background: #f1f1f2; }
.tp-article__hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tp-toc { background: #f5f5f5; border-left: 4px solid #06283d; border-radius: 4px; padding: 1rem 1.25rem; margin: 0 0 1.75rem; }
.tp-toc__title { font-weight: 700; color: #06283d; margin: 0 0 .5rem; }
.tp-toc ol { margin: 0; padding-left: 1.25rem; columns: 2; column-gap: 2rem; }
.tp-toc li { margin: 0 0 .3rem; break-inside: avoid; font-size: .95rem; }
.tp-toc a { color: #06283d; text-decoration: none; }
.tp-toc a:hover { color: #1363df; text-decoration: underline; }
.tp-article__content .tp-faq { margin: 2.5rem 0 0; padding: 1.5rem; background: #f5f5f5; border-radius: 8px; }
.tp-article__content .tp-faq h2 { margin-top: 0; }
.tp-article__content .tp-faq h3 { font-size: 1.05rem; margin: 1.25rem 0 .35rem; }
.tp-article__content .tp-faq h3:first-of-type { margin-top: 0; }
.tp-article__content .tp-faq p:last-child { margin-bottom: 0; }
.tp-article__content table { width: 100%; border-collapse: collapse; margin: 0 0 1.25rem; font-size: .95rem; }
.tp-article__content th, .tp-article__content td { border: 1px solid #e0e0e0; padding: .5rem .75rem; text-align: left; vertical-align: top; }
.tp-article__content th { background: #f5f5f5; color: #06283d; }
.tp-article__content h2 { scroll-margin-top: 140px; }

/* Guides box on hot tub product pages */
.tp-product-guides { clear: both; margin: 2.5rem 0; padding: 1.5rem; background: #f5f5f5; border-radius: 8px; }
.tp-product-guides__list { margin: 0 0 1rem; padding-left: 1.25rem; columns: 2; column-gap: 2rem; }
.tp-product-guides__list li { margin: 0 0 .4rem; break-inside: avoid; }
.tp-product-guides__list a { color: #06283d; font-weight: 600; text-decoration: none; }
.tp-product-guides__list a:hover { color: #1363df; text-decoration: underline; }

/* Single article */
.tp-single { max-width: 50rem; }
/* master.css caps .entry-content children at 45rem with side padding; keep the article as one aligned column instead */
.tp-article__content.entry-content > * { max-width: none; margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
.tp-article__content.entry-content > ul, .tp-article__content.entry-content > ol { padding-left: 1.5rem; }
.tp-article__content.entry-content > .tp-faq { padding: 1.5rem; }
.tp-article__content.entry-content > p { margin-bottom: 1rem; }
.tp-article__content.entry-content > h2 { margin-top: 2rem; margin-bottom: .75rem; }
.tp-article__head { margin: .5rem 0 1.5rem; }
.tp-article__title { font-size: 2rem; line-height: 1.2; color: #06283d; margin: 0 0 .5rem; }
.tp-article__meta { font-size: .875rem; color: #666; margin: 0; }
.tp-article__meta a { color: #06283d; font-weight: 600; text-decoration: none; }
.tp-article__meta a:hover { text-decoration: underline; }
.tp-article__content { font-size: 1.05rem; line-height: 1.7; color: #222; }
.tp-article__content h2 { font-size: 1.5rem; margin: 2rem 0 .75rem; color: #06283d; }
.tp-article__content h3 { font-size: 1.2rem; margin: 1.5rem 0 .5rem; color: #06283d; }
.tp-article__content p, .tp-article__content ul, .tp-article__content ol { margin: 0 0 1rem; }
.tp-article__content ul, .tp-article__content ol { padding-left: 1.5rem; }
.tp-article__content a { color: #1363df; }
.tp-article__foot { margin: 2rem 0 0; }
.tp-related { margin: 3rem 0 0; padding-top: 2rem; border-top: 1px solid #e0e0e0; }

@media (max-width: 767px) {
    .tp-section { margin: 2rem 0 1.5rem; }
    .tp-section__title, .tp-archive__title, .tp-article__title { font-size: 1.5rem; }
    .tp-grid { grid-template-columns: 1fr; }
    .tp-card { padding: 1rem; }
    .tp-article__content { font-size: 1rem; }
    .tp-toc ol, .tp-product-guides__list { columns: 1; }
    .tp-article__content table { display: block; overflow-x: auto; }
    .tp-article__content h2 { scroll-margin-top: 100px; }
}
