.resources {
    width: 100%;
    display: flex;
    flex-direction: column;

    & .resources-header {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 5rem 3rem;

        & h2 {
            font-size: 2.5rem;
            color: var(--accent-gold);
            margin-bottom: 2rem;
        }
    }

    & .main-resources {
        margin: 3rem 0;
        padding-bottom: 3rem;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        column-gap: 2rem;
        row-gap: 5rem;

        & .cat-card {
            padding: 2rem;
            display: flex;
            flex-direction: column;
            border: 1px solid var(--border);
            background: var(--bg-surface);
            border-radius: 1rem;

            & .header {
                width: 100%;
                display: flex;
                align-items: center;
                justify-content: center;
                padding: 2rem 0;
                border-bottom: 1px solid var(--border);

                & h3 a {
                    color: var(--accent-gold);
                    font-size: 1.5rem;
                }
            }
        }
    }
}



/* Code / Cheat Sheets*/
.main-cs {
    width: 100%;
    display: flex;
    flex-direction: column;

    & header {
        padding: 10rem 5rem;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        margin-bottom: 2rem;

        & h2, p {
            margin: 0;
            padding: 0;
            display: flex;

        }

        & h2 {
            font-size: 2.5rem;
            color: var(--accent-gold);
        }

        & p {
            margin-top: 3rem;
            color: var(--text);
        }
    }

    & main {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        column-gap: 2rem;
        row-gap: 5rem;
        margin: 2rem 0;

        & a, h3, h4 {
            color: var(--accent-gold);
            margin-top: 4rem;
        }

        & blockquote {
            color: var(--accent-gold-soft);
        }

        & .cs-preview {
            display: flex;
            flex-direction: column;
            border: 1px solid var(--border);
            height: 80vh;
            overflow: hidden;
            width: 100%;

            & a, h3, h4 {
                color: var(--accent-gold);
                margin: 0;
                margin-top: 2rem;
            }

            & .header {
                width: 100%;
                display: flex;
                flex-direction: column;
                align-items: center;
                border-bottom: 1px solid var(--border);
            }

            & .preview-container {
                position: relative;
                padding: 1rem;
            }
            
            & .preview-container::after {
                content: '';
                width: 100%;
                height: 80vh;
                position: absolute;
                top: 0;
                left: 0;
                background: linear-gradient(
                    to bottom,
                    rgba(109, 109, 109, 0), /* transparent */
                    rgb(61, 61, 61)  /* fully opaque */
                );
                z-index: 2;
            }
        }
    }
}


.main-cheat-sheet {
    display: flex;
    flex-direction: column;

    & header {
        padding: 5rem;
        display: flex;
        flex-direction: column;
        align-items: center;

        & h3 {
            font-size: 2rem;
            color: var(--accent-gold);
        }

        & .wrapper {
            margin-right: auto;
            margin-top: 2rem;
            font-size: .8rem;
            color: var(--text-muted);

            & .none {
                user-select: none;
                -moz-user-select: none;
            }

            & a {
                color: var(--text-muted);
            }
        }
    }

    & main {
        margin: 3rem 5rem;
        display: flex;
        flex-direction: column;

        & h3, h4 {
            color: var(--accent-gold);
            margin: 0;
            padding: 0;
            margin-bottom: 1rem;
        }

        & blockquote {
            color: var(--accent-gold-soft);
        }

        & ul {
            margin: 0;  
        }

        & table {
            border-collapse: collapse;
            margin-bottom: 1rem;

            & th {
                text-align: start;
                margin-bottom: 1rem;
                font-weight: 700;
                border-bottom: 1px solid var(--border);
            }
        }

        & hr {
            width: 100%;
            margin: 2rem 0;
        }
    }
}





@media screen and (max-width: 900px) {
    .resources {
        & .main-resources {
            grid-template-columns: repeat(1, 1fr);
            padding: 0 1rem;
        }
    }

    .main-cs {
        & header {
            padding: 5rem 2rem;
        }

        & main {
            grid-template-columns: repeat(1, 1fr);
        }
    }
    
    .main-cheat-sheet {
        overflow-wrap: anywhere;
        word-break: break-word;

        & header {
            padding: 5rem 1rem;
            text-align: center;
        }

        & main {
            margin: 3rem 0;
            padding: 0 1rem;

            & pre {
                max-width: 100%;
                white-space: pre-wrap;
            }
        }
    }
}