/* Hlavní stránka: úvodní panel a dlaždice kategorií. */
#content.home {
    width: auto;
    padding: 4px 8px 22px;
    float: none;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#content.home .home-heading-panel {
    box-sizing: border-box;
    width: 100%;
    margin: 4px 0 12px;
    padding: 9px 14px;
    border: 1px solid var(--pb-border);
    border-radius: 11px;
    background: var(--pb-surface);
    box-shadow: 0 2px 8px var(--pb-shadow);
}

#content.home .home-main-heading {
    margin: 0;
    color: var(--pb-text);
    font-size: clamp(20px, 1.7vw, 24px);
    line-height: 1.25;
    letter-spacing: -.015em;
    text-align: center;
}

#categories {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    text-align: left;
}

.home-ad-label {
    width: 100px;
    padding: 2px 4px;
    border: 1px solid var(--pb-border);
    border-radius: 4px;
    background: var(--pb-primary);
    color: var(--pb-text);
    text-decoration: none;
}

#categories .item,
#categories .item.first {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    align-items: center;
    width: auto;
    min-width: 0;
    height: 126px;
    padding: 12px;
    float: none;
    border: 1px solid var(--pb-border);
    border-radius: 13px;
    background: var(--pb-canvas);
    box-shadow: 0 3px 12px var(--pb-shadow);
    overflow: hidden;
    cursor: pointer;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

#categories .item:hover,
#categories .item.first:hover {
    border-color: var(--pb-primary);
    box-shadow: 0 7px 20px var(--pb-shadow);
    transform: translateY(-2px);
}

#categories .item > a {
    display: block;
    min-width: 0;
}

#categories .item .hokus {
    position: static;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 92px;
    float: none;
}

#categories .item img {
    position: static;
    display: block;
    width: auto;
    max-width: 96px;
    height: auto;
    max-height: 86px;
    object-fit: contain;
}

#categories .item .hokusprava {
    box-sizing: border-box;
    width: auto;
    min-width: 0;
    padding: 0 0 0 4px;
    float: none;
}

#content.home #categories .item h2 {
    margin: 0 0 7px;
    padding: 0;
    font-size: 16px;
    line-height: 1.25;
    text-align: left;
}

#content.home #categories .item h2 a {
    color: var(--pb-text);
}

#content.home #categories .item:focus-visible {
    outline: 3px solid var(--pb-focus);
    outline-offset: 2px;
}

#content.home #categories .item h3 {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 0;
    color: var(--pb-muted);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
}

#content.home #categories .item h3 a {
    display: inline-block;
    padding: 3px 7px;
    border: 1px solid var(--pb-border);
    border-radius: 7px;
    background: var(--pb-surface);
    color: var(--pb-muted);
    line-height: 1.25;
    text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

#content.home #categories .item h3 a:hover,
#content.home #categories .item h3 a:focus-visible {
    border-color: var(--pb-border);
    background: var(--pb-surface);
    color: var(--pb-text);
    outline: none;
}

@media screen and (max-width: 1120px) {
    #categories {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media screen and (max-width: 720px) {
    #content.home {
        padding: 8px 10px 20px;
    }

    #content.home .home-heading-panel {
        margin: 4px 0 10px;
        padding: 8px 10px;
    }

    #content.home .home-main-heading {
        max-width: 430px;
        margin: 0 auto;
        padding: 0;
        font-size: 21px;
    }

    #categories {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    #categories .item,
    #categories .item.first {
        grid-template-columns: 112px minmax(0, 1fr);
        width: 100%;
        min-width: 0;
        height: 118px;
        padding: 10px 13px;
    }

    #categories .item .hokus {
        width: 100px;
        height: 94px;
    }

    #categories .item img {
        max-width: 100px;
        max-height: 88px;
    }
}

@media screen and (max-width: 700px) {
    #content.home .home-heading-panel {
        display: none;
    }
}
