/*
 * MultiPress Homepage
 * Homepage layout inspired by the supplied reference.
 */

.mp-home {
    --mp-home-gap: 24px;
    --mp-home-radius: 8px;
    background: var(--mp-bg, #fff);
    color: var(--mp-text, #111);
}

.mp-home a {
    color: inherit;
    text-decoration: none;
}

.mp-container {
    width: min(1240px, calc(100% - 32px));
    margin-inline: auto;
}

/* --------------------------------------------------
   TRENDING
-------------------------------------------------- */

.mp-trending {
    border-top: 1px solid var(--mp-border, #e5e7eb);
    border-bottom: 1px solid var(--mp-border, #e5e7eb);
    background: var(--mp-surface, #fff);
}

.mp-trending-inner {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 18px;
    overflow: hidden;
}

.mp-trending-label {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.mp-trending-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e11d48;
}

.mp-trending-list {
    min-width: 0;
    display: flex;
    gap: 26px;
    overflow: hidden;
    white-space: nowrap;
}

.mp-trending-item {
    font-size: 13px;
    color: var(--mp-muted, #6b7280);
    transition: color .2s ease;
}

.mp-trending-item:hover {
    color: var(--mp-primary, #0b63ce);
}

/* --------------------------------------------------
   HERO
-------------------------------------------------- */

.mp-home-hero {
    padding: 24px 0 0;
}

.mp-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(280px, .95fr);
    gap: var(--mp-home-gap);
}

.mp-hero-main {
    position: relative;
    min-height: 470px;
    overflow: hidden;
    border-radius: var(--mp-home-radius);
    background: #111827;
}

.mp-hero-image,
.mp-hero-image img {
    display: block;
    width: 100%;
    height: 100%;
}

.mp-hero-image img {
    object-fit: cover;
}

.mp-hero-main::after {
    content: "";
    position: absolute;
    inset: 35% 0 0;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(0, 0, 0, .88)
    );
    pointer-events: none;
}

.mp-hero-overlay {
    position: absolute;
    z-index: 2;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 30px;
    color: #fff;
}

.mp-category-label {
    display: inline-flex;
    margin-bottom: 9px;
    color: var(--mp-primary, #0b63ce);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.mp-hero-overlay .mp-category-label {
    color: #fff;
    background: var(--mp-primary, #0b63ce);
    padding: 7px 9px;
    border-radius: 3px;
}

.mp-hero-overlay h1 {
    max-width: 850px;
    margin: 0;
    font-size: clamp(28px, 4vw, 48px);
    line-height: 1.05;
    letter-spacing: -.025em;
}

.mp-hero-overlay h1 a {
    color: #fff;
}

.mp-meta {
    margin-top: 12px;
    font-size: 12px;
    opacity: .8;
}

.mp-hero-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--mp-home-gap);
}

.mp-hero-card {
    position: relative;
    min-height: 225px;
    overflow: hidden;
    border-radius: var(--mp-home-radius);
    background: #111827;
}

.mp-hero-card-image,
.mp-hero-card-image img {
    display: block;
    width: 100%;
    height: 100%;
}

.mp-hero-card-image img {
    object-fit: cover;
}

.mp-hero-card::after {
    content: "";
    position: absolute;
    inset: 35% 0 0;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(0, 0, 0, .88)
    );
}

.mp-hero-card-content {
    position: absolute;
    z-index: 2;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 17px;
    color: #fff;
}

.mp-hero-card-content .mp-category-label {
    color: #fff;
}

.mp-hero-card-content h2 {
    margin: 0;
    font-size: 17px;
    line-height: 1.2;
}

.mp-hero-card-content h2 a {
    color: #fff;
}

/* --------------------------------------------------
   SECTION HEADINGS
-------------------------------------------------- */

.mp-section-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--mp-text, #111);
}

.mp-section-kicker {
    display: block;
    margin-bottom: 3px;
    color: var(--mp-primary, #0b63ce);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.mp-section-heading h2 {
    margin: 0;
    font-size: 25px;
    line-height: 1.1;
}

.mp-section-more {
    flex: 0 0 auto;
    color: var(--mp-primary, #0b63ce) !important;
    font-size: 12px;
    font-weight: 700;
}

/* --------------------------------------------------
   LATEST
-------------------------------------------------- */

.mp-home-latest {
    padding: 30px 0 15px;
}

.mp-latest-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--mp-home-gap);
}

.mp-latest-card {
    display: grid;
    grid-template-columns: 125px 1fr;
    gap: 15px;
    min-width: 0;
}

.mp-latest-image,
.mp-latest-image img {
    width: 125px;
    height: 92px;
    display: block;
}

.mp-latest-image {
    overflow: hidden;
    border-radius: 6px;
}

.mp-latest-image img {
    object-fit: cover;
}

.mp-latest-content h3 {
    margin: 0 0 7px;
    font-size: 15px;
    line-height: 1.3;
}

.mp-latest-content time,
.mp-category-content time,
.mp-popular-content time,
.mp-more-content time {
    display: block;
    color: var(--mp-muted, #6b7280);
    font-size: 11px;
}

/* --------------------------------------------------
   MAIN CONTENT
-------------------------------------------------- */

.mp-home-main {
    padding: 25px 0 20px;
}

.mp-home-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 34px;
}

.mp-home-content {
    min-width: 0;
}

.mp-category-section {
    margin-bottom: 42px;
}

.mp-category-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: var(--mp-home-gap);
}

.mp-category-card {
    min-width: 0;
}

.mp-category-card.is-featured {
    grid-row: span 2;
}

.mp-category-image {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    border-radius: 7px;
    background: #eef2f7;
}

.mp-category-card.is-featured .mp-category-image {
    aspect-ratio: 16 / 12;
}

.mp-category-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.mp-category-card:hover .mp-category-image img,
.mp-more-card:hover .mp-more-image img {
    transform: scale(1.04);
}

.mp-category-content {
    padding-top: 10px;
}

.mp-category-content h3 {
    margin: 4px 0 0;
    font-size: 17px;
    line-height: 1.25;
}

.mp-category-card.is-featured .mp-category-content h3 {
    font-size: 23px;
}

/* --------------------------------------------------
   POPULAR
-------------------------------------------------- */

.mp-home-sidebar {
    min-width: 0;
}

.mp-popular {
    position: sticky;
    top: 20px;
}

.mp-popular-list {
    border-top: 1px solid var(--mp-border, #e5e7eb);
}

.mp-popular-item {
    display: grid;
    grid-template-columns: 34px 72px 1fr;
    align-items: center;
    gap: 11px;
    padding: 13px 0;
    border-bottom: 1px solid var(--mp-border, #e5e7eb);
}

.mp-popular-number {
    color: var(--mp-primary, #0b63ce);
    font-size: 17px;
    font-weight: 800;
}

.mp-popular-image,
.mp-popular-image img {
    display: block;
    width: 72px;
    height: 58px;
}

.mp-popular-image {
    overflow: hidden;
    border-radius: 5px;
}

.mp-popular-image img {
    object-fit: cover;
}

.mp-popular-content h3 {
    margin: 0 0 5px;
    font-size: 14px;
    line-height: 1.28;
}

/* --------------------------------------------------
   MORE STORIES
-------------------------------------------------- */

.mp-home-more {
    padding: 25px 0 60px;
}

.mp-more-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--mp-home-gap);
}

.mp-more-card {
    min-width: 0;
}

.mp-more-image {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    border-radius: 7px;
    background: #eef2f7;
}

.mp-more-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.mp-more-content {
    padding-top: 10px;
}

.mp-more-content h3 {
    margin: 2px 0 6px;
    font-size: 16px;
    line-height: 1.28;
}

/* --------------------------------------------------
   RESPONSIVE
-------------------------------------------------- */

@media (max-width: 1050px) {

    .mp-home-layout {
        grid-template-columns: minmax(0, 1fr) 290px;
        gap: 25px;
    }

    .mp-hero-grid {
        grid-template-columns: 1fr;
    }

    .mp-hero-main {
        min-height: 430px;
    }

    .mp-hero-side {
        grid-template-columns: repeat(4, 1fr);
    }

    .mp-hero-card {
        min-height: 190px;
    }

    .mp-latest-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .mp-more-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 780px) {

    .mp-container {
        width: min(100% - 24px, 1240px);
    }

    .mp-trending-inner {
        min-height: 40px;
    }

    .mp-trending-list {
        gap: 18px;
    }

    .mp-hero-side {
        grid-template-columns: repeat(2, 1fr);
    }

    .mp-hero-main {
        min-height: 380px;
    }

    .mp-hero-overlay {
        padding: 22px;
    }

    .mp-hero-overlay h1 {
        font-size: 30px;
    }

    .mp-home-layout {
        grid-template-columns: 1fr;
    }

    .mp-home-sidebar {
        order: 2;
    }

    .mp-popular {
        position: static;
    }

    .mp-category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .mp-category-card.is-featured {
        grid-column: 1 / -1;
        grid-row: auto;
    }

    .mp-category-card.is-featured .mp-category-image {
        aspect-ratio: 16 / 9;
    }

    .mp-latest-grid {
        grid-template-columns: 1fr;
    }

    .mp-more-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 520px) {

    .mp-home-hero {
        padding-top: 15px;
    }

    .mp-hero-main {
        min-height: 320px;
    }

    .mp-hero-side {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .mp-hero-card {
        min-height: 155px;
    }

    .mp-hero-card-content {
        padding: 11px;
    }

    .mp-hero-card-content h2 {
        font-size: 14px;
    }

    .mp-hero-overlay {
        padding: 18px;
    }

    .mp-hero-overlay h1 {
        font-size: 25px;
    }

    .mp-section-heading {
        align-items: center;
    }

    .mp-section-heading h2 {
        font-size: 21px;
    }

    .mp-category-grid {
        grid-template-columns: 1fr;
    }

    .mp-category-card.is-featured {
        grid-column: auto;
    }

    .mp-category-card.is-featured .mp-category-content h3 {
        font-size: 20px;
    }

    .mp-more-grid {
        grid-template-columns: 1fr;
    }

    .mp-latest-card {
        grid-template-columns: 105px 1fr;
    }

    .mp-latest-image,
    .mp-latest-image img {
        width: 105px;
        height: 80px;
    }
}

/* --------------------------------------------------
   HOMEPAGE CONTENT AREA
-------------------------------------------------- */

.mp-home-content-area {
    padding: 25px 0 60px;
}

.mp-home-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 34px;
    align-items: start;
}

.mp-home-main-column {
    min-width: 0;
}

.mp-home-sidebar {
    min-width: 0;
}

.mp-home-sidebar .mp-popular {
    position: sticky;
    top: 20px;
}

/* --------------------------------------------------
   HERO FALLBACK
-------------------------------------------------- */

.mp-hero-single {
    grid-template-columns: 1fr;
}

.mp-hero-single .mp-hero-main {
    width: 100%;
    min-height: 520px;
}

.mp-hero-no-image,
.mp-hero-card-no-image {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            135deg,
            #182235 0%,
            #0b101a 55%,
            #05070b 100%
        );
}

.mp-hero-no-image::after,
.mp-hero-card-no-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(
            circle at 75% 25%,
            rgba(11, 99, 206, .28),
            transparent 35%
        );
}

.mp-hero-single .mp-hero-overlay {
    padding: 38px;
}

.mp-hero-single .mp-hero-overlay h1 {
    font-size: clamp(34px, 5vw, 58px);
}

/* --------------------------------------------------
   EMPTY STATE
-------------------------------------------------- */

.mp-home-empty {
    min-height: 300px;
    display: grid;
    place-items: center;
    align-content: center;
    text-align: center;
    padding: 40px;
    border: 1px solid var(--mp-border, #e5e7eb);
    border-radius: 8px;
    background: var(--mp-surface, #fff);
}

.mp-home-empty h2 {
    margin: 0 0 8px;
    font-size: 25px;
}

.mp-home-empty p {
    margin: 0;
    color: var(--mp-muted, #6b7280);
}

/* --------------------------------------------------
   CATEGORY EMPTY PROTECTION
-------------------------------------------------- */

.mp-category-section {
    margin-bottom: 42px;
}

/* --------------------------------------------------
   RESPONSIVE
-------------------------------------------------- */

@media (max-width: 1050px) {

    .mp-home-content-grid {
        grid-template-columns: minmax(0, 1fr) 290px;
    }

    .mp-hero-single .mp-hero-main {
        min-height: 450px;
    }
}

@media (max-width: 780px) {

    .mp-home-content-grid {
        grid-template-columns: 1fr;
    }

    .mp-home-sidebar {
        order: 2;
    }

    .mp-home-sidebar .mp-popular {
        position: static;
    }

    .mp-hero-single .mp-hero-main {
        min-height: 380px;
    }

    .mp-hero-single .mp-hero-overlay {
        padding: 24px;
    }
}

@media (max-width: 520px) {

    .mp-hero-single .mp-hero-main {
        min-height: 320px;
    }

    .mp-hero-single .mp-hero-overlay {
        padding: 18px;
    }
}

/* --------------------------------------------------
   HOMEPAGE CONTENT AREA
-------------------------------------------------- */

.mp-home-content-area {
    padding: 25px 0 60px;
}

.mp-home-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 34px;
    align-items: start;
}

.mp-home-main-column {
    min-width: 0;
}

.mp-home-sidebar {
    min-width: 0;
}

.mp-home-sidebar .mp-popular {
    position: sticky;
    top: 20px;
}

/* --------------------------------------------------
   HERO FALLBACK
-------------------------------------------------- */

.mp-hero-single {
    grid-template-columns: 1fr;
}

.mp-hero-single .mp-hero-main {
    width: 100%;
    min-height: 520px;
}

.mp-hero-no-image,
.mp-hero-card-no-image {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            135deg,
            #182235 0%,
            #0b101a 55%,
            #05070b 100%
        );
}

.mp-hero-no-image::after,
.mp-hero-card-no-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(
            circle at 75% 25%,
            rgba(11, 99, 206, .28),
            transparent 35%
        );
}

.mp-hero-single .mp-hero-overlay {
    padding: 38px;
}

.mp-hero-single .mp-hero-overlay h1 {
    font-size: clamp(34px, 5vw, 58px);
}

/* --------------------------------------------------
   EMPTY STATE
-------------------------------------------------- */

.mp-home-empty {
    min-height: 300px;
    display: grid;
    place-items: center;
    align-content: center;
    text-align: center;
    padding: 40px;
    border: 1px solid var(--mp-border, #e5e7eb);
    border-radius: 8px;
    background: var(--mp-surface, #fff);
}

.mp-home-empty h2 {
    margin: 0 0 8px;
    font-size: 25px;
}

.mp-home-empty p {
    margin: 0;
    color: var(--mp-muted, #6b7280);
}

/* --------------------------------------------------
   CATEGORY EMPTY PROTECTION
-------------------------------------------------- */

.mp-category-section {
    margin-bottom: 42px;
}

/* --------------------------------------------------
   RESPONSIVE
-------------------------------------------------- */

@media (max-width: 1050px) {

    .mp-home-content-grid {
        grid-template-columns: minmax(0, 1fr) 290px;
    }

    .mp-hero-single .mp-hero-main {
        min-height: 450px;
    }
}

@media (max-width: 780px) {

    .mp-home-content-grid {
        grid-template-columns: 1fr;
    }

    .mp-home-sidebar {
        order: 2;
    }

    .mp-home-sidebar .mp-popular {
        position: static;
    }

    .mp-hero-single .mp-hero-main {
        min-height: 380px;
    }

    .mp-hero-single .mp-hero-overlay {
        padding: 24px;
    }
}

@media (max-width: 520px) {

    .mp-hero-single .mp-hero-main {
        min-height: 320px;
    }

    .mp-hero-single .mp-hero-overlay {
        padding: 18px;
    }
}
