/*
 * Homepage Browse by Type (views/home/browse-by-type.blade.php).
 * Plain CSS outside the Vite build; the link carries ?v=<filemtime>.
 * Logical properties and a grid keep the row mirrored in RTL unchanged.
 */
.hz-types {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hz-types > li {
    min-width: 0;
}

.hz-type {
    display: flex;
    height: 100%;
    min-height: 44px;
    box-sizing: border-box;
    flex-direction: column;
    align-items: center;
    padding: 22px 12px 20px;
    border: 1px solid var(--hz-line, #e7e9ee);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(18, 20, 26, 0.04), 0 4px 14px rgba(18, 20, 26, 0.05);
    color: var(--hz-ink, #12141a);
    text-align: center;
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.hz-type:hover {
    border-color: var(--hagzi-primary, #0745d9);
    box-shadow: 0 6px 18px rgba(7, 69, 217, 0.1);
}

.hz-type:focus-visible {
    outline: 2px solid var(--hagzi-primary, #0745d9);
    outline-offset: 2px;
}

.hz-type__icon {
    display: inline-flex;
    width: 52px;
    height: 52px;
    align-items: center;
    justify-content: center;
    margin-block-end: 12px;
    border-radius: 14px;
    background: rgba(7, 69, 217, 0.07);
    color: var(--hagzi-primary, #0745d9);
}

.hz-type__icon svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hz-type__name {
    display: block;
    max-width: 100%;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.hz-type__count {
    display: block;
    margin-block-start: 4px;
    color: var(--hz-muted, #6b7280);
    font-size: 13px;
    line-height: 1.35;
}

@media (max-width: 639px) {
    .hz-types {
        gap: 12px;
    }

    .hz-type {
        padding: 18px 10px 16px;
    }
}

@media (max-width: 299px) {
    .hz-types {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hz-type {
        transition: none;
    }
}
