/* =================================================================
   Tools Hub  (Template Name: Tools Hub)
   Dark page: hero video, filterable tools grid, blog slider, CTA.
   All rules scoped under .th-* so nothing leaks into shared styles.
   ================================================================= */

.th-page {
    --th-dark: #031d3d;
    --th-panel: #04203f;
    --th-blue: #077dfd;
    --th-yellow: #ffc93c;
    --th-line: rgba(255, 255, 255, 0.10);
    --th-muted: rgba(255, 255, 255, 0.66);
    background: var(--th-dark);
}

.th-wrap {
    width: 100%;
    padding: 0 140px;
    box-sizing: border-box;
}

/* The theme's .pill style is defined in page-specific stylesheets that this
   template does not load, so define a scoped copy here. */
.th-page .pill {
    display: inline-block;
    padding: 7px 16px;
    border-radius: 200px;
    background-color: #10335f;
    color: #fff;
    font-size: 15px;
    line-height: 1.1;
    font-weight: 600;
    width: max-content;
}

/* ===================== HERO ===================== */
.th-hero {
    background: var(--th-dark);
    padding: 64px 0 72px;
}

.th-hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 48px;
    align-items: center;
}

.th-hero__copy {
    max-width: 560px;
}

.th-hero__title {
    color: #fff;
    font-size: 58px;
    font-weight: 700;
    line-height: 1.05;
    margin: 0 0 22px;
}

.th-hero__text {
    color: var(--th-muted);
    font-size: 19px;
    font-weight: 400;
    line-height: 1.6;
    margin: 0;
}

/* Plain media like the other pages: the video is transparent/dark and sits
   directly on the hero, contained (not cropped), with no card chrome. */
.th-hero__media {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.th-hero__media video,
.th-hero__media img {
    width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: contain;
    display: block;
}

/* ===================== SECTION HEAD ===================== */
.th-section {
    padding: 24px 0 72px;
}

.th-section-head {
    margin-bottom: 28px;
}

.th-section-head--center {
    text-align: center;
}

.th-section-head .pill {
    margin-bottom: 16px;
}

.th-section-title {
    color: #fff;
    font-size: 42px;
    font-weight: 700;
    line-height: 1.1;
    margin: 0;
}

/* ===================== FILTER PILLS ===================== */
.th-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 32px;
}

.th-filter__btn {
    padding: 10px 20px;
    border-radius: 999px;
    border: 1px solid var(--th-line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--th-muted);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.th-filter__btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.22);
}

.th-filter__btn.is-active {
    background: var(--th-blue);
    color: #fff;
    border-color: var(--th-blue);
}

.th-filter__count {
    display: inline-block;
    min-width: 20px;
    padding: 1px 7px;
    margin-left: 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.10);
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

.th-filter__btn.is-active .th-filter__count {
    background: rgba(0, 0, 0, 0.18);
    color: #fff;
}

/* ===================== TOOLS GRID ===================== */
.th-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.th-tool {
    display: flex;
    flex-direction: column;
    min-height: 232px;
    padding: 28px 26px 24px;
    background: #fff;
    border: 1px solid transparent;
    border-radius: 22px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.th-tool:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.32);
}

.th-tool[hidden] {
    display: none;
}

.th-tool__icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}

.th-tool__icon svg {
    width: 25px;
    height: 25px;
}

.th-tool__icon--blue { background: rgba(7, 125, 253, 0.12); color: #077dfd; }
.th-tool__icon--green { background: rgba(22, 179, 100, 0.12); color: #16b364; }
.th-tool__icon--orange { background: rgba(245, 158, 11, 0.13); color: #f59e0b; }
.th-tool__icon--purple { background: rgba(124, 92, 246, 0.13); color: #7c5cf6; }
.th-tool__icon--yellow { background: rgba(240, 180, 20, 0.16); color: #d99a00; }
.th-tool__icon--red { background: rgba(239, 68, 68, 0.12); color: #ef4444; }
.th-tool__icon--pink { background: rgba(236, 72, 153, 0.12); color: #ec4899; }
.th-tool__icon--cyan { background: rgba(8, 145, 178, 0.12); color: #0891b2; }

.th-tool__title {
    color: var(--th-dark);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 8px;
}

.th-tool__text {
    color: #51607a;
    font-size: 14.5px;
    line-height: 1.55;
    margin: 0 0 18px;
    flex: 1;
}

.th-tool__cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--th-dark);
    font-size: 14px;
    font-weight: 700;
}

.th-tool__cta-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: var(--th-dark);
    color: #fff;
    transition: transform 0.18s ease, background 0.18s ease;
}

.th-tool:hover .th-tool__cta-arrow {
    background: var(--th-blue);
    transform: translateX(3px);
}

.th-tool__cta-arrow svg {
    width: 14px;
    height: 14px;
}

.th-empty {
    display: none;
    text-align: center;
    padding: 56px 20px;
    color: var(--th-muted);
    font-size: 16px;
}

.th-empty.is-visible {
    display: block;
}

/* ===================== READ OUR BLOG ===================== */
/* The blog card part (template-parts/blog_article) is styled by blogpage.css
   for a 3-up grid of wide cards: 410px images, 32px titles, space-between
   layout. Those sizes break inside a narrow carousel slide, so retarget them
   here for this context only. */
.th-blog {
    padding: 24px 0 80px;
}

.th-blog .articles_wrapper {
    display: block;
    margin: 0;
}

.th-blog-swiper {
    overflow: hidden;
    padding-bottom: 8px;
}

.th-blog-swiper .swiper-wrapper {
    align-items: stretch;
}

.th-blog-swiper .swiper-slide {
    height: auto;
    box-sizing: border-box;
}

.th-blog-swiper .swiper-slide .blog_post {
    height: 100%;
}

/* Card: top-align content, pin the author row to the bottom so every card
   lines up regardless of whether it has tags or a thumbnail. */
.th-blog .articles_wrapper .blog_post a {
    height: 100%;
    padding: 18px 18px 20px;
    justify-content: flex-start;
}

.th-blog .articles_wrapper .post_image {
    height: auto;
    aspect-ratio: 16 / 11;
    margin-bottom: 0;
    padding: 18px;
    border-radius: 16px;
}

.th-blog .articles_wrapper .blog_post .post_details {
    margin: 16px 0 14px;
}

.th-blog .articles_wrapper .blog_post .post_tags {
    margin-bottom: 12px;
}

.th-blog .articles_wrapper .blog_post .post_tag {
    font-size: 13px;
    padding: 4px 12px 3px;
}

.th-blog .articles_wrapper .blog_post .post_time {
    margin-bottom: 8px;
    gap: 10px;
}

.th-blog .articles_wrapper .blog_post .post_time_read {
    font-size: 14px;
}

.th-blog .articles_wrapper .blog_post .post_title {
    font-size: 20px;
}

/* Author row pinned to the bottom edge of the card. */
.th-blog .articles_wrapper .blog_post .post_info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 6px;
}

.th-blog .author_name {
    font-size: 15px;
    line-height: 1.3;
}

.th-blog .author_image {
    width: 26px;
    height: 26px;
}

.th-blog .articles_wrapper .blog_post .post_link img {
    width: 18px;
    height: 18px;
}

.th-blog-nav {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 34px;
}

.th-blog-nav__btn {
    width: 46px;
    height: 46px;
    border-radius: 999px;
    border: 1px solid var(--th-line);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

.th-blog-nav__btn:hover {
    background: var(--th-blue);
    border-color: var(--th-blue);
}

.th-blog-nav__btn.swiper-button-disabled {
    opacity: 0.35;
    cursor: default;
}

.th-blog-nav__btn.swiper-button-disabled:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--th-line);
}

.th-blog-nav__btn svg {
    width: 18px;
    height: 18px;
}

/* ===================== WHY THESE TOOLS ===================== */
.th-why-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.th-why-card {
    padding: 30px 28px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--th-line);
}

.th-why-card__icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    background: rgba(7, 125, 253, 0.14);
    color: var(--th-blue);
}

.th-why-card__icon svg {
    width: 26px;
    height: 26px;
}

.th-why-card h3 {
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 10px;
}

.th-why-card p {
    color: var(--th-muted);
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1460px) {
    .th-wrap { padding: 0 100px; }
}

@media (max-width: 1280px) {
    .th-wrap { padding: 0 70px; }
    .th-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1024px) {
    .th-wrap { padding: 0 40px; }
    .th-why-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 960px) {
    .th-hero__inner { grid-template-columns: 1fr; gap: 36px; }
    .th-hero__copy { max-width: none; }
    .th-hero__title { font-size: 46px; }
    .th-section-title { font-size: 34px; }
}

@media (max-width: 820px) {
    .th-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .th-wrap { padding: 0 24px; }
    .th-hero { padding: 40px 0 48px; }
    .th-hero__title { font-size: 36px; }
    .th-hero__text { font-size: 17px; }
    .th-section-title { font-size: 28px; }
}

@media (max-width: 520px) {
    .th-grid { grid-template-columns: 1fr; }
    .th-why-grid { grid-template-columns: 1fr; }
}
