@import url(normalize.css);
@import url(global.css);

body {
    background-color: var(--bg-color);
    color: var(--text-color-primary);
    font: var(--text);
    max-width: 1280px;
    padding-inline: 32px;
    margin-inline: auto;
}

#primary {
    justify-content: space-between;
    padding-block: 20px;
}

#primary div {
    display: flex;
    align-items: center;
    gap: 8px;
}

#secondary {
    padding-block: 14px;
    justify-content: space-between;
    border-top: 1px solid var(--stroke-color);
    border-bottom: 1px solid var(--stroke-color);
}

main {
    margin-top: 40px;
    max-width: 100%;
}

#featured {
    gap: 16px;

    & img {
        border-radius: 4px;
    }
}

.card {
    position: relative;
    overflow: hidden;
    border-radius: 4px;

    &::before {
        content: '';
        inset: 0;
        /* You had to set the inset because it's a positioned element (absolute). Its final position is determined by the values of right/top.... "inset" is a shorthand to top/right/left... It works almost as a margin*/
        top: 50%;
        background: linear-gradient(180deg,
                transparent 0%,
                #020617 100%);
        position: absolute;
    }

    figcaption {
        position: absolute;
        bottom: 0;
        padding: 24px;

        &:has(.text-lg) {
            padding: 12px;
        }

        h2 {
            margin-top: 8px;
            margin-bottom: 0px;
        }
    }
}

.cols2 {
    gap: 16px;
}

section header {
    align-items: center;
    justify-content: space-between;
    color: var(--text-color-secondary);
    padding-block: 12px 24px;
    margin-block-start: 80px;
    border-top: 1px solid var(--stroke-color);

    h3 {
        font: var(--text-span);
        margin: 0px;
    }
}

#weekly {
    div {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
        max-height: 234px;
    }


    img {
        max-width: 100%;
        height: auto;
    }


    .content-tag {
        position: absolute;
        top: 8px;
        left: 8px;
    }

    b {
        font: var(--text-span);
    }

}


.card2 {
    position: relative;

    p {
        margin-block-start: 0px;
        margin-block-end: 0px;
    }
}

article {
    max-width: 696px;
}

#last-section {

    & {
        gap: 32px;
    }

    #highlights-ai {

        header {
            max-width: 696px;
        }

        #ai-news {
            gap: 32px;
        }

        article {
            & {
                gap: 16px;
            }

            .redeable-content {
                max-width: 504px;
            }

            h3 {
                margin-block: 8px 4px;
                font-size: 16px;
                font-weight: 800;
            }

            p {
                color: #CBD5E1;
                margin: 0px;
            }

            figure {
                width: 176px;
                height: 176px;
            }

        }
    }

    #side-news {
        #ads {
            img {
                display: block;
                width: 488px;
                height: 280px;
            }
        }

        & {
            margin-top: 80px;

            header {
                margin-block: 32px 24px;
                padding: 0px;
            }
        }

        #news-aside {
            gap: 32px;
            max-width: 488px;

            article {
                gap: 15px;

                figure {
                    width: 72px;
                    height: 72px;
                }

                h3 {
                    margin-block: 8px 0px;
                }
            }

        }
    }
}

/* Remeber To see the Notion */