/* ===== Hero ===== */
.home-hero { background: linear-gradient(135deg, var(--site-dark) 0%, var(--site-dark-2) 60%, var(--site-light) 100%); border-radius: 14px; padding: 48px 32px; text-align: center; margin-bottom: 28px; color: #fff; }
.home-hero h1 { font-size: 2em; font-weight: 800; margin: 0 0 12px; }
.home-hero p { font-size: 1.05em; color: rgba(255,255,255,.9); max-width: 640px; margin: 0 auto; }

/* ===== Tool search box ===== */
.tool-search-wrap { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid #e2e4e9; border-radius: 10px; padding: 12px 18px; margin-bottom: 20px; box-shadow: 0 2px 10px rgba(20, 22, 31, .05); }
.tool-search-wrap i { color: #9aa0aa; }
.tool-search-wrap input { border: none; outline: none; flex: 1; font-size: .95em; background: transparent; color: #23272f; }
.tool-search-empty { text-align: center; color: #6b7280; padding: 24px 0; font-size: .95em; }

/* ===== Category sections (group the service grid by tool category) ===== */
.category-section { margin-bottom: 36px; }
.category-section:last-child { margin-bottom: 0; }
.category-heading { display: flex; align-items: center; gap: 10px; font-size: 1.15em; font-weight: 800; color: #23272f; margin: 0 0 16px; }
.category-heading .category-heading-icon { width: 34px; height: 34px; border-radius: 10px; background: var(--site-dark); color: #fff; display: flex; align-items: center; justify-content: center; font-size: .85em; flex: none; }

/* Each category's grid shows as many cards as fit in two rows at the current viewport
   width (measured in content/assets/common.js's tool-search section) - whatever doesn't
   fit is hidden. A fixed flex-basis (instead of the auto-fit grid columns other pages use)
   keeps every card the same width so that measurement is reliable. The rest is reachable
   via "View all" below. */
/* Six cards per row whenever the grid is wide enough: each card takes one sixth of the
   row after the five 18px gaps, but never narrower than 150px (so below ~990px the row
   simply holds fewer cards). common.js reads the first card's real width, so the
   two-row limit still works. */
.category-section .service-grid { display: flex; flex-wrap: wrap; gap: 18px; }
.category-section .service-grid > .service-card { flex: 0 0 max(120px, calc((100% - 90px) / 6)); padding: 14px 10px; }
/* Shorter home cards: smaller icon, description clamped to two lines, no "Open tool" line. */
.category-section .service-card-icon { width: 44px; height: 44px; margin: 0 auto 10px; border-radius: 12px; font-size: 1.2em; }
.category-section .service-card h3 { margin: 0 0 4px; font-size: 1em; line-height: 1.3; }
.category-section .service-card p { margin: 0; font-size: .8em; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.category-section .service-card-cta { display: none; }
/* Heading row: category title on the left, its "View all" link on the right (request 2026-10-10). */
.category-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 16px; }
.category-head .category-heading { margin: 0; }
.category-head .category-view-all { margin-top: 0; white-space: nowrap; flex: none; }
/* "View all" as a light pill button: pale teal fill, dark text, soft border; it deepens on hover. */
.category-view-all { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 9px 18px; border-radius: 999px; font-size: .88em; font-weight: 700; letter-spacing: .01em; color: var(--site-dark); text-decoration: none; background: #e6fbf7; border: 1px solid #99f6e4; box-shadow: 0 2px 8px rgba(15, 118, 110, .10); transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease; }
.category-view-all:hover { color: var(--site-dark); background: #ccfbf1; border-color: #5eead4; transform: translateY(-2px); box-shadow: 0 8px 18px rgba(15, 118, 110, .18); }
.category-view-all:focus-visible { outline: 3px solid rgba(15, 118, 110, .35); outline-offset: 3px; }
.category-view-all i { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: #fff; color: var(--site-dark); font-size: .8em; box-shadow: 0 1px 3px rgba(15, 118, 110, .18); transition: transform .2s ease; }
.category-view-all:hover i { transform: translateX(3px); }

/* ===== Service widget grid ===== */
.service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }

.service-card { display: block; background: #fff; border: 1px solid #eee; border-radius: 14px; padding: 24px 20px; text-align: center; text-decoration: none; color: inherit; box-shadow: 0 2px 10px rgba(20, 22, 31, .06); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.service-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(15, 118, 110, .16); border-color: var(--site-light); }

.service-card-icon { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.5em; color: #fff; }

.service-card h3 { font-size: 1.08em; font-weight: 700; margin: 0 0 6px; color: #23272f; }
.service-card p { font-size: .86em; color: #6b7280; margin: 0 0 14px; line-height: 1.55; }
.service-card-cta { display: inline-flex; align-items: center; gap: 6px; font-size: .85em; font-weight: 700; color: var(--site-dark); }
.service-card:hover .service-card-cta { color: var(--site-light); }
.service-card-cta i { transition: transform .2s ease; }
.service-card:hover .service-card-cta i { transform: translateX(3px); }

@media (max-width: 500px) {
    .home-hero { padding: 34px 20px; }
    .home-hero h1 { font-size: 1.5em; }
}
