/**
 * 9-home.css
 * Homepage — Ultra News drives the homepage via widget sidebars
 * (#sidebar-home_1 through #sidebar-home_10). We theme each section
 * editorial-style and give the first widget hero treatment.
 */

.adc-home #site-main {
    background: var(--adc-bg-alt);
}

/* Each home sidebar widget = editorial section */
[id^="sidebar-home"] {
    background: var(--adc-bg);
    margin-bottom: 2px; /* thin separator via bg-alt showing through */
}
[id^="sidebar-home"]:nth-child(even) {
    background: var(--adc-bg-alt);
}

/* First widget — hero treatment */
#sidebar-home_1 {
    padding-block: var(--adc-gap-6) var(--adc-gap-7);
}
#sidebar-home_1 .posts-loop.style-lg-column {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--adc-gap-5);
}
#sidebar-home_1 .posts-loop.style-lg-column .post:first-child {
    grid-column: 1 / -1;
}
@media (min-width: 992px) {
    #sidebar-home_1 .posts-loop.style-lg-column {
        grid-template-columns: repeat(3, 1fr);
    }
    #sidebar-home_1 .posts-loop.style-lg-column .post:first-child {
        grid-column: 1 / 3;
    }
    #sidebar-home_1 .posts-loop.style-lg-column .post:first-child .post-thumb img {
        aspect-ratio: 16 / 10;
        height: 380px;
    }
    #sidebar-home_1 .posts-loop.style-lg-column .post:first-child .post-title h3 {
        font-size: var(--adc-text-3xl);
        -webkit-line-clamp: 4;
    }
}

/* Secondary widgets */
[id^="sidebar-home_"]:not(#sidebar-home_1) {
    padding-block: var(--adc-gap-5) var(--adc-gap-7);
}
[id^="sidebar-home_"]:not(#sidebar-home_1) .posts-loop.style-lg-column {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--adc-gap-5);
}
@media (min-width: 992px) {
    [id^="sidebar-home_"]:not(#sidebar-home_1) .posts-loop.style-lg-column {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Editorial section headers */
.widget-title,
.widget-posts-title {
    font-size: var(--adc-text-3xl) !important;
    font-weight: 800 !important;
    color: var(--adc-text) !important;
    margin-bottom: var(--adc-gap-5) !important;
    padding-block-end: var(--adc-gap-3) !important;
    border-block-end: 2px solid var(--adc-brand) !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    line-height: var(--adc-lh-tight);
    background: none !important;
    border-top: none !important;
    padding-inline: 0 !important;
}
.widget-title a:last-child,
.widget-title .more-link {
    font-size: var(--adc-text-sm) !important;
    font-weight: 500 !important;
    color: var(--adc-text-muted) !important;
    background: none;
    border: none;
    padding: 0;
}
.widget-title a:last-child:hover {
    color: var(--adc-brand-dark) !important;
}

/* Home posts in row layout (mobile default) */
.adc-home .style-sm-row .post {
    border-bottom: 1px solid var(--adc-border);
    margin-bottom: 0;
    padding: var(--adc-gap-3) 0;
}
.adc-home .style-sm-row .post:last-child {
    border-bottom: none;
}
.adc-home .style-sm-row .post .post-content {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    transform: none !important;
}
.adc-home .style-sm-row .post .post-content:hover {
    box-shadow: none !important;
    transform: none !important;
}
.adc-home .style-sm-row .post .post-thumb {
    border: none !important;
    flex-shrink: 0;
    width: 100px !important;
    border-radius: var(--adc-radius);
    overflow: hidden;
}
.adc-home .style-sm-row .post .post-title {
    padding: 0 var(--adc-gap-3);
}
.adc-home .style-sm-row .post .post-title h3 {
    font-size: var(--adc-text-md) !important;
    -webkit-line-clamp: 2;
}
.adc-home .style-sm-row .post .post-meta {
    padding: 0 var(--adc-gap-3) 0;
}
