﻿
:root {
    --width-article: 700px;
}

.topic {
    margin-left: auto;
    margin-right: auto;

    & div.header {
        position: relative;
        background-color: var(--color-dark-blue);
        background-image: url(../content/common/default-header.png);
        background-repeat: no-repeat;
        background-position: center;
        background-size: cover;

        min-height: 250px;
        min-width: 100%;
        padding: 2rem 1rem;
        padding-bottom: calc(1rem + 5px);

        display: grid; 
        align-content: center;
        align-items: center;
        padding: 1rem;

        margin-bottom: 10px;

        &::before {
            content: '';
            position: absolute;
            top: 0px;
            bottom: 0px;
            left: 0px;
            right: 0px;
            background-color: var(--color-dark-blue);
            opacity: .5;
            z-index: 0;
        }

        & div.titles {
            position: relative;
            z-index: 5;

            & span {
                display: block;
                text-align: center;
                color: var(--color-whitish);

                &.title {
                    font-family: var(--fonts-serif);
                    font-size: 2rem;
                    font-weight: bold;
                    text-transform: capitalize;
                    text-shadow: 0px 0px 5px #000000;
                }

                &.sub-title {
                    font-family: var(--fonts-serif);
                    font-size: 1.5rem;
                    font-weight: bold;
                    text-shadow: 0px 0px 5px #000000;
                }
            }
        }

        &::after {
            content: '';
            background-color: var(--color-whitish);
            position: absolute;
            bottom: -5px;
            width: 75vw;
            left: 50%;
            transform: translateX(-50%);
            height: 10px;
        }
    }

    & div.content {
        position: relative;
        min-height: 5rem;

        & div.links {
            padding: 1rem; 
            margin-top: 2rem;

            background-color: var(--color-whitish);
            box-shadow: 0 0 0 100vmax var(--color-whitish);
            clip-path: inset(0 -100vmax);

            & div.title {
                display: none;
                text-transform: uppercase;
                padding-bottom: .5rem;
                margin-bottom: .5rem;
                border-bottom: solid 1px var(--color-dark-blue);
                text-align: center;
                font-weight: bold;
            }

            & div.list {
                display: grid;
                grid-auto-flow: row;
                gap: .75rem;

                & a {
                    display: block;
                    text-align: left;
                    color: var(--color-dark-blue);
                }
            }
        }

        & div.content {
            /* MAIN CMS CONTENT*/
            padding: 3rem;
            padding-top: 2rem;
            font-family: var(--fonts-sans-serif);
            width: min(100%, var(--width-article));
            margin-left: auto;
            margin-right: auto;
            position: relative;
        }
    }

    & div.articles {
        & div.host {
            width: min(100%, var(--width-article));
            margin-right: auto;
            margin-left: auto;
            padding: 3rem;
            padding-top: 0rem;
                        
            & > div.title {
                display: grid; 
                grid-auto-flow: column;
                grid-template-columns: max-content 1fr;
                gap: 1rem;
                align-items: center;
                margin-bottom: 1rem;

                & * {
                    font-family: var(--fonts-serif);
                    font-size: 1.75rem;
                    font-weight: bold;
                    color: var(--color-dark-blue);
                }
            }

            & div.list {                           
                & div.item {
                    padding-block: .75rem;
                    
                    &:hover {
                        & .title {
                            text-shadow: 0px 0px 5px rgba(0, 0, 0, .3);
                        }
                    }
                    
                    &.has-image {
                        display: grid;
                        grid-auto-flow: column;
                        grid-template-columns: min-content 1fr;
                        gap: .8rem;
                        
                        & img {
                            width: clamp(50px, 20vw, 200px);
                            border-radius: .25rem;
                            box-shadow: 0px 0px 2px rgba(0, 0, 0, .6);
                        }
                    }
                    
                    &:not(:first-child) {
                        border-top: solid 1px var(--color-whitish);
                    }                    
                
                    & .info {
                        display: grid;
                        grid-auto-flow: column;
                        gap: 1rem;
                        justify-content: space-between;
                
                        & .dated {
                            color: var(--color-dark-blue);
                            font-size: .6rem;
                            text-transform: uppercase;
                            font-weight: bold;
                        }
                        
                        & .topic {
                            color: #d57229;
                            font-size: .6rem;
                            text-align: right;
                            font-weight: bold;
                        }
                    }
                    
                    & .title {
                        padding-block: .75rem;
                        font-weight: bold;
                        color: var(--color-dark-blue);
                    }
                    
                    & .subtitle {
                        padding-block: .5rem;
                        font-weight: bold;
                        font-size: .9rem;
                        color: var(--color-dark-blue);
                    }
                    
                    & .blurb { 
                        font-size: .8rem;
                        padding-bottom: .8rem;
                    }
                    
                    & > .caption > a {
                        font-size: .65rem;
                        color: color-mix(in srgb, var(--color-links) 75%, #000);
                    }
                }
            }
        }
    }
}

@media(min-width: 1200px) {
    .topic {
        & div.content {
            & div.content {
                & div.links {
                    background-color: transparent;
                    position: absolute;
                    width: 30%;
                    top: 3rem;
                    left: calc(-30% + 1rem);
                    margin-right: 1rem;

                    box-shadow: none;
                    clip-path: none;
        
                    margin-top: 0rem;
                    padding: .5rem;
                }
            }
        }
    }
}