/* ==========================================
   HOMEPAGE
   Tokens come from custom.css (:root). --cat is set per element inline to the
   tool's category colour.
========================================== */

.home-hero,
.home-cats,
.home-tools,
.home-features,
.home-steps,
.home-cta-wrap {
    --home-radius: 16px;
    --home-border: #e8edf5;
}

/* ---------- Hero ---------- */
.home-hero {
    position: relative;
    overflow: hidden;
    padding: 72px 0 112px;
    background:
        radial-gradient(1200px 500px at 50% -10%, rgba(37, 99, 235, 0.10), transparent 60%),
        linear-gradient(180deg, #f5f8ff 0%, #ffffff 100%);
}

.home-hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.55;
    pointer-events: none;
}

.home-hero-glow-1 {
    width: 380px;
    height: 380px;
    background: rgba(37, 99, 235, 0.18);
    top: -120px;
    left: -100px;
}

.home-hero-glow-2 {
    width: 340px;
    height: 340px;
    background: rgba(249, 115, 22, 0.16);
    bottom: -80px;
    right: -80px;
}

.home-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--home-border);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-dark, #1e40af);
}

.home-pill .bi {
    color: var(--secondary-color, #f97316);
}

.home-hero-title {
    font-size: 3.25rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--dark-color, #1f2937);
    margin: 22px 0 16px;
}

.home-hero-title .text-gradient {
    display: block;
}

.home-hero-subtitle {
    font-size: 1.15rem;
    color: var(--gray-color, #6b7280);
    max-width: 640px;
    margin: 0 auto 32px;
}

/* Search */
.home-search {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 680px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--home-border);
    border-radius: 999px;
    padding: 6px 6px 6px 52px;
    box-shadow: 0 12px 40px rgba(37, 99, 235, 0.12);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.home-search:focus-within {
    border-color: var(--primary-light, #60a5fa);
    box-shadow: 0 12px 40px rgba(37, 99, 235, 0.20), 0 0 0 4px rgba(37, 99, 235, 0.10);
}

.home-search-icon {
    position: absolute;
    left: 22px;
    font-size: 1.15rem;
    color: var(--gray-color, #6b7280);
}

.home-search-input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    font-size: 1.05rem;
    padding: 12px 8px;
    color: var(--dark-color, #1f2937);
}

.home-search-input::-webkit-search-cancel-button {
    cursor: pointer;
}

.home-search-btn {
    border-radius: 999px;
    padding: 12px 28px;
    font-weight: 600;
}

/* Suggestions */
.home-suggest {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 50;
    background: #fff;
    border: 1px solid var(--home-border);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.15);
    padding: 6px;
    text-align: left;
}

.home-suggest a,
.home-suggest .home-suggest-empty {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--dark-color, #1f2937);
    text-decoration: none;
    font-weight: 500;
}

.home-suggest a small {
    margin-left: auto;
    color: var(--gray-color, #6b7280);
    font-weight: 500;
}

.home-suggest a.is-active,
.home-suggest a:hover {
    background: rgba(37, 99, 235, 0.07);
}

.home-suggest .home-suggest-empty {
    color: var(--gray-color, #6b7280);
}

.home-suggest-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--cat, #2563eb) 12%, transparent);
    color: var(--cat, #2563eb);
}

/* Popular chips */
.home-popular {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 22px;
}

.home-popular-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-color, #6b7280);
}

.home-chip-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--home-border);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--dark-color, #1f2937);
    text-decoration: none;
    transition: all 0.2s ease;
}

.home-chip-link .bi {
    color: var(--primary-color, #2563eb);
}

.home-chip-link:hover {
    border-color: var(--primary-color, #2563eb);
    color: var(--primary-color, #2563eb);
    transform: translateY(-1px);
}

/* Trust row */
.home-trust {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px 40px;
    margin-top: 40px;
}

.home-trust div {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.home-trust strong {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary-color, #2563eb);
    line-height: 1.2;
}

.home-trust span {
    font-size: 0.82rem;
    color: var(--gray-color, #6b7280);
}

/* ---------- Two-column hero (desktop) ---------- */
.home-hero-content {
    text-align: center;
}

/* Split layout from 1200px (col-xl-6); below that the hero is centred and the preview hidden */
@media (min-width: 1200px) {
    .home-hero-content {
        text-align: left;
    }

    .home-hero-content .home-hero-title {
        font-size: 2.4rem;
    }

    .home-hero-content .home-hero-subtitle {
        margin-left: 0;
        margin-right: 0;
    }

    .home-hero-content .home-search {
        margin: 0;
        max-width: none;
    }

    .home-hero-content .home-popular,
    .home-hero-content .home-trust {
        justify-content: flex-start;
    }

    .home-hero-content .home-trust div {
        align-items: flex-start;
    }
}

@media (min-width: 1400px) {
    .home-hero-content .home-hero-title {
        font-size: 2.75rem;
    }
}

/* ---------- Live tool preview (right side of the hero) ---------- */
.home-showcase {
    position: relative;
    padding: 28px 8px 28px 28px;
}

.hs-window {
    position: relative;
    z-index: 1;
    background: #fff;
    border: 1px solid var(--home-border);
    border-radius: 20px;
    box-shadow: 0 30px 70px rgba(30, 64, 175, 0.18), 0 8px 20px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    transform: perspective(1400px) rotateY(-4deg) rotateX(2deg);
    transition: transform 0.4s ease;
}

.home-showcase:hover .hs-window {
    transform: perspective(1400px) rotateY(0) rotateX(0);
}

.hs-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: #f8fafc;
    border-bottom: 1px solid var(--home-border);
}

.hs-dots {
    display: inline-flex;
    gap: 6px;
}

.hs-dots i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #f87171;
}

.hs-dots i:nth-child(2) {
    background: #fbbf24;
}

.hs-dots i:nth-child(3) {
    background: #34d399;
}

.hs-url {
    flex: 1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--home-border);
    font-size: 0.78rem;
    color: var(--gray-color, #6b7280);
}

.hs-url .bi {
    color: #16a34a;
    font-size: 0.7rem;
}

.hs-tabs {
    display: flex;
    gap: 6px;
    padding: 12px 16px 0;
}

.hs-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gray-color, #6b7280);
    cursor: pointer;
    position: relative;
    transition: background 0.2s ease, color 0.2s ease;
}

.hs-tab:hover {
    color: var(--cat);
}

.hs-tab.is-active {
    background: color-mix(in srgb, var(--cat) 10%, transparent);
    color: var(--cat);
}

/* Autoplay timer line under the active tab */
.hs-tab.is-active::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 2px;
    height: 2px;
    border-radius: 2px;
    background: var(--cat);
    transform-origin: left;
    animation: hsTimer var(--hs-delay, 5s) linear forwards;
}

.home-showcase.is-paused .hs-tab.is-active::after {
    animation-play-state: paused;
}

@keyframes hsTimer {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

.hs-panes {
    padding: 18px 20px 20px;
    min-height: 318px;
}

.hs-pane[hidden] {
    display: none;
}

/* No fill mode: if the animation never runs (background tab), the pane is simply visible */
.hs-pane.is-active {
    animation: hsIn 0.45s ease;
}

@keyframes hsIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

.hs-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 14px;
    color: var(--dark-color, #1f2937);
}

.hs-accent {
    color: var(--cat);
}

.hs-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--cat);
    text-decoration: none;
}

.hs-link .bi {
    transition: transform 0.2s ease;
}

.hs-link:hover {
    color: var(--cat);
}

.hs-link:hover .bi {
    transform: translateX(3px);
}

.hs-meter {
    height: 8px;
    border-radius: 999px;
    background: #eef2f7;
    overflow: hidden;
}

.hs-meter span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--cat);
}

/* Bars that fill when their pane becomes active */
.hs-pane.is-active .hs-grow {
    animation: hsGrow 1.1s ease-out 0.25s both;
}

.hs-grow {
    width: var(--w);
}

@keyframes hsGrow {
    from { width: 0; }
    to { width: var(--w); }
}

.hs-progress {
    height: 6px;
    margin-top: 16px;
    border-radius: 999px;
    background: #eef2f7;
    overflow: hidden;
}

.hs-progress span {
    display: block;
    height: 100%;
    width: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--cat), color-mix(in srgb, var(--cat) 55%, white));
}

.hs-pane.is-active .hs-progress span {
    animation: hsGrowFull 1.6s ease-out both;
}

@keyframes hsGrowFull {
    from { width: 0; }
    to { width: 100%; }
}

/* Image pane */
.hs-file {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px dashed color-mix(in srgb, var(--cat) 40%, white);
    border-radius: 14px;
    background: color-mix(in srgb, var(--cat) 4%, white);
}

.hs-thumb {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.hs-thumb-photo {
    background: linear-gradient(135deg, #38bdf8 0%, #6366f1 55%, #f97316 100%);
}

.hs-file-name {
    display: flex;
    flex-direction: column;
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.3;
}

.hs-file-name small,
.hs-doc small {
    font-weight: 500;
    color: var(--gray-color, #6b7280);
    font-size: 0.75rem;
}

.hs-badge {
    margin-left: auto;
    padding: 4px 10px;
    border-radius: 999px;
    background: #dcfce7;
    color: #15803d;
    font-weight: 700;
    font-size: 0.82rem;
}

.hs-compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 16px;
}

.hs-compare span {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-color, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.hs-compare strong {
    display: block;
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 6px;
}

/* SEO pane */
.hs-serp {
    padding: 14px;
    border: 1px solid var(--home-border);
    border-radius: 12px;
    font-family: Arial, sans-serif;
}

.hs-serp-url {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: #202124;
}

.hs-fav {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color, #2563eb), var(--secondary-color, #f97316));
}

.hs-serp-title {
    margin: 6px 0 4px;
    font-size: 1.05rem;
    color: #1a0dab;
    line-height: 1.3;
}

.hs-serp-desc {
    font-size: 0.82rem;
    color: #4d5156;
    line-height: 1.5;
}

.hs-seo-row {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 14px;
}

.hs-ring {
    --p: 0;
    width: 66px;
    height: 66px;
    flex-shrink: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: conic-gradient(#16a34a calc(var(--p) * 1%), #eef2f7 0);
}

.hs-ring span {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #15803d;
}

.hs-seo-bars {
    flex: 1;
    display: grid;
    gap: 10px;
}

.hs-seo-bars span {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.hs-seo-bars em {
    font-style: normal;
    color: var(--gray-color, #6b7280);
    font-weight: 500;
}

/* PDF pane */
.hs-merge {
    display: flex;
    align-items: center;
    gap: 14px;
}

.hs-docs {
    flex: 1;
    display: grid;
    gap: 8px;
}

.hs-doc {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--home-border);
    border-radius: 12px;
    background: #fff;
    font-weight: 600;
    font-size: 0.85rem;
}

.hs-doc > span {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.hs-doc .bi {
    font-size: 1.4rem;
    color: var(--cat);
}

.hs-pane.is-active .hs-docs .hs-doc {
    animation: hsSlide 0.5s ease both;
}

.hs-pane.is-active .hs-docs .hs-doc:nth-child(2) {
    animation-delay: 0.12s;
}

.hs-pane.is-active .hs-docs .hs-doc:nth-child(3) {
    animation-delay: 0.24s;
}

@keyframes hsSlide {
    from { opacity: 0; transform: translateX(-12px); }
    to { opacity: 1; transform: none; }
}

.hs-merge-arrow {
    font-size: 1.6rem;
    color: var(--cat);
}

.hs-doc-out {
    flex: 1;
    padding: 18px 14px;
    border-color: color-mix(in srgb, var(--cat) 45%, white);
    background: color-mix(in srgb, var(--cat) 5%, white);
    box-shadow: 0 10px 24px color-mix(in srgb, var(--cat) 18%, transparent);
}

.hs-pane.is-active .hs-doc-out {
    animation: hsPop 0.5s ease 0.55s both;
}

@keyframes hsPop {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: none; }
}

/* Calculator pane */
.hs-calc-hero {
    padding: 16px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #16a34a, #15803d);
}

.hs-calc-hero span {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.9;
}

.hs-calc-hero strong {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
}

.hs-calc-hero small {
    font-size: 0.9rem;
    font-weight: 600;
}

.hs-calc-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 12px 0;
}

.hs-calc-stats div {
    padding: 8px 10px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid var(--home-border);
}

.hs-calc-stats span {
    display: block;
    font-size: 0.68rem;
    color: var(--gray-color, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.hs-calc-stats strong {
    font-size: 1.05rem;
}

.hs-macros {
    display: flex;
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
}

.hs-macro-legend {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--gray-color, #6b7280);
}

.hs-macro-legend i {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    margin-right: 5px;
}

/* Floating badges around the window */
.hs-float {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--home-border);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    animation: hsFloat 6s ease-in-out infinite;
}

.hs-float .bi {
    font-size: 1rem;
}

.hs-float-1 {
    top: 0;
    right: 6%;
}

.hs-float-1 .bi {
    color: #16a34a;
}

.hs-float-2 {
    bottom: -4px;
    left: 8%;
    animation-delay: -2s;
}

.hs-float-2 .bi {
    color: #f59e0b;
}

.hs-float-3 {
    bottom: -2px;
    right: 10%;
    animation-delay: -4s;
}

.hs-float-3 .bi {
    color: var(--primary-color, #2563eb);
}

@keyframes hsFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@media (prefers-reduced-motion: reduce) {
    .hs-window,
    .hs-float,
    .hs-pane.is-active,
    .hs-pane.is-active .hs-grow,
    .hs-pane.is-active .hs-progress span,
    .hs-pane.is-active .hs-doc,
    .hs-pane.is-active .hs-doc-out,
    .hs-tab.is-active::after {
        animation: none !important;
        transform: none !important;
    }
}

/* ---------- Category cards (overlap the hero) ---------- */
.home-cats {
    position: relative;
    z-index: 2;
    margin-top: -56px;
}

.home-cats-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
}

.home-cat {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    background: #fff;
    border: 1px solid var(--home-border);
    border-radius: var(--home-radius);
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
    text-decoration: none;
    color: var(--dark-color, #1f2937);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.home-cat:hover {
    transform: translateY(-4px);
    border-color: var(--cat);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.10);
    color: var(--dark-color, #1f2937);
}

.home-cat-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    background: color-mix(in srgb, var(--cat) 12%, transparent);
    color: var(--cat);
}

.home-cat-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.home-cat-text strong {
    font-size: 1rem;
}

.home-cat-text small {
    color: var(--gray-color, #6b7280);
}

/* ---------- Tools directory ---------- */
.home-tools {
    padding: 72px 0 48px;
    scroll-margin-top: 80px;
}

.home-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.home-section-title {
    font-size: 2.1rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--dark-color, #1f2937);
    margin-bottom: 6px;
}

.home-section-sub {
    color: var(--gray-color, #6b7280);
    max-width: 620px;
}

.home-tools-search {
    position: relative;
    width: 280px;
    max-width: 100%;
}

.home-tools-search .bi {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-color, #6b7280);
}

.home-tools-search .form-control {
    padding-left: 40px;
    border-radius: 999px;
    border-color: var(--home-border);
}

/* Filter chips */
.home-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.home-filter {
    --cat: var(--primary-color, #2563eb);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--home-border);
    background: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark-color, #1f2937);
    cursor: pointer;
    transition: all 0.2s ease;
}

.home-filter .bi {
    color: var(--cat);
}

.home-filter span {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 1px 8px;
    border-radius: 999px;
    background: #f1f5f9;
    color: var(--gray-color, #6b7280);
}

.home-filter:hover {
    border-color: var(--cat);
}

.home-filter.active {
    background: var(--cat);
    border-color: var(--cat);
    color: #fff;
}

.home-filter.active .bi {
    color: #fff;
}

.home-filter.active span {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

/* Grid of compact cards */
.home-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.home-tool {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 40px 16px 16px;
    background: #fff;
    border: 1px solid var(--home-border);
    border-radius: 14px;
    text-decoration: none;
    color: var(--dark-color, #1f2937);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

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

.home-tool:hover,
.home-tool:focus-visible {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--cat) 55%, white);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    color: var(--dark-color, #1f2937);
}

.home-tool-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    background: color-mix(in srgb, var(--cat) 11%, transparent);
    color: var(--cat);
    transition: background 0.2s ease, color 0.2s ease;
}

.home-tool:hover .home-tool-icon {
    background: var(--cat);
    color: #fff;
}

.home-tool-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.home-tool-title {
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 2px 0 4px;
    color: inherit;
}

.home-tool-desc {
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--gray-color, #6b7280);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-tool-arrow {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translate(-4px, -50%);
    opacity: 0;
    color: var(--cat);
    transition: all 0.2s ease;
}

.home-tool:hover .home-tool-arrow {
    opacity: 1;
    transform: translate(0, -50%);
}

.home-show-all {
    border-radius: 999px;
    padding: 10px 24px;
    font-weight: 600;
}

.home-empty {
    text-align: center;
    padding: 56px 16px;
    color: var(--gray-color, #6b7280);
}

.home-empty > .bi {
    font-size: 2.5rem;
    opacity: 0.4;
}

.home-empty h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark-color, #1f2937);
    margin: 12px 0 6px;
}

/* ---------- Features ---------- */
.home-features {
    padding: 72px 0;
    background: #f8fafc;
}

.home-feature {
    height: 100%;
    padding: 26px 22px;
    background: #fff;
    border: 1px solid var(--home-border);
    border-radius: var(--home-radius);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-feature:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.home-feature-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    margin-bottom: 16px;
    background: color-mix(in srgb, var(--cat) 12%, transparent);
    color: var(--cat);
}

.home-feature h3,
.home-step h3 {
    font-size: 1.08rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.home-feature p,
.home-step p {
    font-size: 0.92rem;
    color: var(--gray-color, #6b7280);
    margin: 0;
}

/* ---------- How it works ---------- */
.home-steps {
    padding: 72px 0 24px;
}

.home-step {
    text-align: center;
    padding: 8px 16px;
}

.home-step-num {
    width: 52px;
    height: 52px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-color, #2563eb), var(--primary-dark, #1e40af));
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
}

/* Dashed connector between the steps on wide screens */
@media (min-width: 768px) {
    .home-steps-row {
        position: relative;
    }

    .home-steps-row::before {
        content: "";
        position: absolute;
        top: 34px;
        left: 20%;
        right: 20%;
        border-top: 2px dashed #cbd5e1;
        z-index: 0;
    }

    .home-step {
        position: relative;
        z-index: 1;
    }
}

/* ---------- CTA ---------- */
.home-cta-wrap {
    padding: 56px 0 24px;
}

.home-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    padding: 40px 44px;
    border-radius: 22px;
    color: #fff;
    background:
        radial-gradient(500px 220px at 100% 0%, rgba(249, 115, 22, 0.35), transparent 70%),
        linear-gradient(135deg, var(--primary-color, #2563eb) 0%, var(--primary-dark, #1e40af) 100%);
    box-shadow: 0 20px 50px rgba(37, 99, 235, 0.25);
}

.home-cta h2 {
    font-size: 1.85rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.home-cta p {
    margin: 0;
    opacity: 0.9;
}

.home-cta-btn {
    font-weight: 700;
    border-radius: 999px;
    padding: 12px 28px;
    color: var(--primary-dark, #1e40af);
}

/* ---------- Responsive ---------- */
/* 4 columns only on wide screens; below that titles would wrap */
@media (max-width: 1399.98px) {
    .home-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .home-hero-title {
        font-size: 2.6rem;
    }

    .home-cats-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .home-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .home-hero {
        padding: 48px 0 96px;
    }

    .home-hero-title {
        font-size: 2rem;
    }

    .home-hero-subtitle {
        font-size: 1rem;
    }

    .home-search {
        padding-left: 44px;
    }

    .home-search-icon {
        left: 18px;
    }

    .home-search-btn {
        padding: 10px 18px;
    }

    /* Popular tools: one swipeable row instead of a tall stack */
    .home-popular {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        margin-left: -12px;
        margin-right: -12px;
        padding: 0 12px 4px;
        scrollbar-width: none;
    }

    .home-popular::-webkit-scrollbar {
        display: none;
    }

    .home-popular > * {
        flex-shrink: 0;
    }

    .home-trust {
        gap: 12px 28px;
    }

    .home-trust strong {
        font-size: 1.3rem;
    }

    .home-cats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .home-cat {
        padding: 12px;
        gap: 10px;
    }

    .home-cat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.15rem;
    }

    .home-section-title {
        font-size: 1.65rem;
    }

    .home-tools-search {
        width: 100%;
    }

    .home-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 6px;
        margin-left: -12px;
        margin-right: -12px;
        padding-left: 12px;
        padding-right: 12px;
        scrollbar-width: none;
    }

    .home-filters::-webkit-scrollbar {
        display: none;
    }

    .home-filter {
        flex-shrink: 0;
    }

    .home-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .home-cta {
        padding: 28px 24px;
        text-align: center;
        justify-content: center;
    }

    .home-cta h2 {
        font-size: 1.45rem;
    }
}

@media (max-width: 400px) {
    .home-search-btn {
        display: none;
    }

    .home-search {
        padding-right: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-tool,
    .home-cat,
    .home-feature,
    .home-chip-link {
        transition: none;
    }
}
