/* Tools landing page at /tools/ (page-tools-hub.php, BugHerd #288). Built on
   the firm profile page's wrap, title and section styles (firm-profile.css). */

.th-page .spf-breadcrumbs { padding: 24px 0 8px; }

/* Hero: title, intro and three facts, with phones of three tools beside it. */
.th-hero {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 48px; align-items: center;
    padding: 8px 0 56px;
}
.th-hero__text { display: flex; flex-direction: column; gap: 20px; }
.th-hero .pf-title { margin: 0; }
.th-hero .pf-summary { margin: 0; }
.th-hero__facts { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 0; padding: 0; list-style: none; }
.th-hero__facts li {
    display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 10px;
    border-radius: var(--radius-pill); background: var(--surface-card);
    font-size: 15px; font-weight: 600; line-height: 20px; color: var(--ink);
}
.th-hero__facts li::before {
    content: ""; width: 18px; height: 18px; flex-shrink: 0; border-radius: 50%;
    background: var(--orange) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.2l2.6 2.6L13 6.4' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat;
}
.th-hero__image { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-20); }

/* Tool cards: the title is the card's one link, stretched over the card. */
.th-grid {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px;
    margin: 0; padding: 0; list-style: none;
}
.th-card {
    position: relative; display: flex; flex-direction: column; overflow: hidden;
    border: 1px solid var(--hairline); border-radius: var(--radius-16); background: var(--page);
    transition: box-shadow .25s ease, transform .25s ease;
}
.th-card:hover { box-shadow: var(--shadow-shot-hover); transform: translateY(-3px); }
.th-card__media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--orange); }
.th-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.th-card:hover .th-card__media img { transform: scale(1.04); }
.th-card__body { display: flex; flex: 1; flex-direction: column; align-items: flex-start; gap: 10px; padding: 22px 24px 24px; }
.th-card__title { margin: 0; font-family: var(--font-display); font-size: 24px; font-weight: 700; line-height: 28px; letter-spacing: -0.48px; color: var(--ink); }
.th-card__link { color: inherit; text-decoration: none; }
.th-card__link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.th-card__link:focus-visible { outline: none; }
.th-card:focus-within { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
.th-card__text { margin: 0 0 6px; font-size: 16px; font-weight: 500; line-height: 24px; color: var(--ink-2); }
.th-card__button { margin-top: auto; gap: 8px; padding: 12px 18px; font-size: 15px; }
.th-card__button svg { transition: transform .2s ease; }
.th-card:hover .th-card__button { background: var(--orange-hover); }
.th-card:hover .th-card__button svg { transform: translateX(3px); }

/* More ways to choose a firm */
.th-more { padding-bottom: 96px; }
.th-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.th-link {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 100%;
    padding: 18px 20px; border-radius: var(--radius-12); background: var(--surface-card);
    color: var(--ink); font-size: 16px; font-weight: 600; line-height: 22px; text-decoration: none;
    transition: background-color .2s ease, color .2s ease;
}
.th-link svg { flex-shrink: 0; color: var(--orange); transition: transform .2s ease; }
.th-link:hover { background: var(--surface-hover); color: var(--ink); }
.th-link:hover svg { transform: translateX(3px); }

@media (max-width: 1199px) {
    .th-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1023px) {
    .th-hero { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-bottom: 40px; }
    .th-hero__image { max-width: 560px; }
}
@media (max-width: 767px) {
    .th-hero .pf-title { font-size: 40px; line-height: 44px; letter-spacing: -0.8px; }
    .th-hero .pf-summary { font-size: 17px; line-height: 25px; }
    .th-hero__facts li { font-size: 14px; }
    .th-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .th-card__body { padding: 18px 18px 20px; }
    .th-card__title { font-size: 22px; line-height: 26px; }
    .th-card__button { width: 100%; justify-content: center; }
    .th-more { padding-bottom: 64px; }
}
@media (prefers-reduced-motion: reduce) {
    .th-card, .th-card__media img, .th-card__button svg, .th-link svg { transition: none; }
    .th-card:hover, .th-card:hover .th-card__media img, .th-card:hover .th-card__button svg, .th-link:hover svg { transform: none; }
}
