/* Home page — category listing, sticky, featured, recent posts */
/* Matches legacy index.aspx responsive category layout */

/* Sticky posts */
.sd-sticky-posts {
    margin-bottom: 1rem;
}

.sd-sticky-list {
    list-style: none;
    padding: 0;
}

    .sd-sticky-list .sd-post-item {
        padding: .5rem .75rem;
        border-bottom: 1px solid var(--border-color);
        display: flex;
        flex-wrap: wrap;
        align-items: baseline;
        gap: .35rem;
    }

    .sd-sticky-list .sd-post-title {
        color: var(--link-color);
        font-weight: 500;
        text-decoration: none;
    }

        .sd-sticky-list .sd-post-title:hover {
            text-decoration: underline;
        }

        .sd-sticky-list .sd-post-title .sd-icon-pin {
            margin-right: .25rem;
            font-size: .75rem;
        }

    .sd-sticky-list .sd-post-meta {
        color: var(--secondary-text-color);
        font-size: .8rem;
    }

/* Featured posts — card grid */
.sd-featured-posts {
    margin-bottom: 1.5rem;
}

.sd-post-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(250px,1fr));
    gap: 1rem;
    padding: 0 .75rem;
}

    .sd-post-cards .sd-post-summary-card {
        border: 1px solid var(--border-color);
        border-radius: 4px;
        overflow: hidden;
        background: var(--background);
        transition: box-shadow .15s;
    }

        .sd-post-cards .sd-post-summary-card:hover {
            box-shadow: 0 2px 8px rgba(0,0,0,.1);
        }

/* Category listing */
.sd-category-listing {
}

/* Category group */
.sd-category-group {
    margin-bottom: 0;
}

.sd-category-group-header {
    background: var(--accent-color);
    padding: 1.25rem 2rem;
    display: flex;
    align-items: center;
}

.sd-category-group-title {
    color: var(--accent-color-text);
    font-size: 1.5rem;
    font-weight: normal;
    margin: 0;
}

/* Category table */
.sd-category-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    color: var(--table-text-color);
}

    .sd-category-table thead th {
        background-color: transparent;
        color: var(--secondary-text-color);
        border-bottom: 1px solid var(--border-color);
        font-size: .7rem;
        font-weight: bold;
        line-height: 1em;
        height: 20px;
        padding: 16px 10px 16px 2rem;
        text-transform: uppercase;
    }

    .sd-category-table tbody tr:nth-child(even) {
        background: var(--alternate-background);
    }

        .sd-category-table tbody tr:nth-child(even):hover {
            background: var(--section-header-background-2);
        }

    .sd-category-table tbody td {
        font-size: .8125rem;
        line-height: 1.5em;
        padding: 1rem .5rem .6rem 2rem;
        vertical-align: top;
    }

/* Category columns */
.sd-cat-name-col {
    text-align: left;
}
    .sd-cat-name-col .sd-category-name {
        font-size: 1.05rem;
        color: var(--link-color);
        text-decoration: none;
    }

        .sd-cat-name-col .sd-category-name:hover {
            text-decoration: underline;
        }

.sd-cat-count-col {
    text-align: center;
    width: 90px;
}

    .sd-cat-count-col .sd-count {
        color: var(--table-text-color);
    }

.sd-cat-lastpost-col {
    text-align: left;
    width: 255px;
}

    .sd-cat-lastpost-col .sd-last-post {
        overflow: hidden;
    }

    .sd-cat-lastpost-col .sd-last-post-title {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 235px;
    }

    .sd-cat-lastpost-col .sd-last-post-meta {
        display: flex;
        align-items: center;
        justify-content: space-between;
        overflow: hidden;
        font-size: .8rem;
        color: var(--secondary-text-color);
    }

    .sd-cat-lastpost-col .sd-last-post-author {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 110px;
        margin-right: auto;
    }

    .sd-cat-lastpost-col .sd-last-post-date {
        white-space: nowrap;
        margin-right: 4px;
    }


/* Recent discussions */
.sd-recent-posts {
}

/* Category group collapse */
.sd-category-group__toggle {
    cursor: pointer;
    background: rgba(0,0,0,.15);
    border: none;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--accent-color-text);
    width: 26px;
    height: 26px;
    line-height: 24px;
    text-align: center;
    padding: 0;
    margin-left: auto;
    flex-shrink: 0;
}

    .sd-category-group__toggle:hover {
        background: rgba(0,0,0,.25);
    }

.sd-category-group--collapsed .sd-category-table {
    display: none;
}
/* Thread status icons (SVG-based) — inherits base styles from forum.css */
.sd-thread-icon {
    flex-shrink: 0;
}
/* Category row hover */
.sd-category-row:hover {
    background: var(--section-header-background-2);
}
/* RSS links */
.sd-rss-link {
    font-size: .8rem;
    color: var(--color-rss);
    text-decoration: none;
}

    .sd-rss-link:hover {
        text-decoration: underline;
    }
/* Home footer menu */
.sd-home-footer {
}

.sd-home-footer__heading {
    display: block;
    padding: .75rem .75rem 0 2rem;
    font-size: .85rem;
    color: var(--link-color);
    text-decoration: none;
}

.sd-home-footer__heading:hover {
    text-decoration: underline;
}

.sd-home-footer__menu {
    list-style: disc;
    display: flex;
    flex-wrap: wrap;
    gap: .25rem 2rem;
    padding: .75rem .75rem .75rem 2rem;
    margin: 0;
    font-size: .85rem;
}

.sd-home-footer__menu a {
    color: var(--link-color);
    text-decoration: none;
}

.sd-home-footer__menu a:hover {
    text-decoration: underline;
}
/* Stardock reply indicator */
.sd-stardock-reply {
    width: 16px;
    height: 16px;
    display: inline-block;
    vertical-align: middle;
    margin-left: .25rem;
}

/* Mobile: hide count columns and last post column */
@media(max-width:767px) {
    .sd-cat-count-col {
        display: none;
    }

    .sd-cat-lastpost-col {
        display: none;
    }

    .sd-category-table thead {
        display: none;
    }

    .sd-cat-name-col .sd-category-name {
        font-size: 1rem;
    }

}
/* Tablet: show counts, narrower last post */
@media(min-width:768px) and (max-width:1024px) {
    .sd-cat-lastpost-col {
        width: 180px;
    }
}
