/* Structural layout only. Visual styling belongs to the site template. */

.tc-category-directory {
    width: 100%;
}

.tc-category-section {
    margin: 0 0 3rem;
}

.tc-category-section:last-child {
    margin-bottom: 0;
}

.tc-category-section__heading {
    margin: 0 0 1.25rem;
}

.tc-category-section__heading-link {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
}

.tc-category-section__icon {
    flex: 0 0 auto;
    width: 2.5rem;
    height: 2.5rem;
    object-fit: contain;
}

.tc-category-section__icon--font {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
}

.tc-category-section__grid {
    width: 100%;
}

.tc-category-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 2.5rem;
    row-gap: .85rem;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tc-category-list__item {
    min-width: 0;
    margin: 0;
    padding: 0;
}

/* A category that owns another level becomes a full-width row so its child
   <ul> starts underneath it and can use the full grid width. */
.tc-category-list__item--parent {
    grid-column: 1 / -1;
}

.tc-category-list__item > .tc-category-list {
    margin-top: .85rem;
}

.tc-category-section__item {
    min-width: 0;
}

.tc-category-directory__message {
    margin: 0;
}

@media (max-width: 900px) {
    .tc-category-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .tc-category-section {
        margin-bottom: 2.25rem;
    }

    .tc-category-list {
        grid-template-columns: 1fr;
        row-gap: .7rem;
    }

    .tc-category-list__item > .tc-category-list {
        margin-top: .7rem;
    }
}
