/* GENERAL SETTINGS */

body {
    margin: 0px;
}

/* colors */

:root {
    --border: #d1d1d1;
    --hover: #fafafa;
}

/* main scrollbar */

::-webkit-scrollbar {
    width: 15px;
}

::-webkit-scrollbar-thumb {
    background-color: grey;
    border-radius: 10px;
}

/* HEADER */

#header {
    position: sticky;
    top: 0px;
    background-color: white;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    width: 100%;
    height: 80px;
    border-bottom: 1px solid var(--border);
}

.header-container {
    display: flex;
    align-items: center;
    height: 60px;
    padding: 10px 20px;
}

/* logo container */

#header-logo-container {
    justify-content: left;
    width: 200px;
}

/* search bar container */

#header-search-container {
    justify-content: center;
    width: 600px;
}

#header-search-form {
    background-color: white;
    padding-left: 20px;
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
}

#header-search-bar {
    width: 350px;
    height: 27px;
    border: none;
    outline: none;
}

#header-search-submit {
    width: 75px;
    height: 29px;
    background-color: var(--border);
    border: none;
    outline: none;
    cursor: pointer;
}

/* header icons container */

#header-icon-container {
    justify-content: right;
    gap: 5px;
    width: 200px;
}

.header-icon-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.header-icon-container:hover {
    background-color: var(--hover);
}

.header-icon {
    width: 20px;
    height: 20px;
}

/* MAIN CONTAINER */

#main-container {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    width: 100%;
}

.sticky {
    position: sticky;
    top: 81px;
    width: 100%;
    height: calc(100vh - 81px);
}

.overflow {
    width: calc(100% - 40px);
    height: 100%;
    padding: 0px 20px 0px 20px;
    overflow-y: scroll;
}

.overflow::-webkit-scrollbar {
    width: 10px;   
}

.overflow::-webkit-scrollbar-track {
    background-color: white;
}

.overflow::-webkit-scrollbar-thumb {
    background-color: var(--border);
    border-radius: 10px;
}

.overflow-inner-wrapper {
    margin-bottom: 20px;
}

/* quick links sidebar */

#main-links {
    width: 250px;
}

#quick-links {
    display: flex;
    flex-direction: column;
}

#quick-links a {
    color: black;
}

.quick-links-child {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px 0px;
    border-top: 1px solid var(--border);
}

.quick-link-heading {
    font-weight: 600;
}

/* pain posts content */

#main-content {
    width: calc(100% - 500px);
    padding: 0px 0px 20px 20px;
}

#post-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
}

.post-tile {
    width: calc(33.3% - 60px);
    min-height: 200px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.post-tile:hover {
    background-color: var(--hover);
    transform: scale(1.02)
}

/* recent links sidebar */

#main-recent {
    width: 250px;
}

#recently-viewed-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.recently-viewed-tile {
    width: calc(100% - 20px);
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 5px;
}

.recently-viewed-tile:hover {
    background-color: var(--hover);
}

.recently-viewed-tile a {
    color: black;
}

/* FOOTER */

#footer {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 50px;
    border-top: 1px solid var(--border);
}

#footer a {
    color: black;
}

.laptop-show, .tablet-show, .mobile-wide-show, .mobile-show {
    display: none;
}

/* MEDIA QUERIES */

/* small desktop */

@media (max-width: 1600px) {

    .post-tile {
        width: calc(50% - 60px);
    }

}

/* laptop */

@media (max-width: 1120px) {

    .laptop-hide {
        display: none;
    }

    .laptop-show {
        display: flex;
        flex-direction: column;
    }

    /* HEADER */

    /* MAIN CONTAINER */

    /* quick links sidebar */

    /* main posts content */

    .post-tile {
        width: 100%;
    }

    /* recent links sidebar */

}

/* tablet */

@media (max-width: 992px) {

    .tablet-hide {
        display: none;
    }

    .tablet-show {
        display: flex;
        flex-direction: column;
    }

    /* HEADER */

    #header-search-container {
        width: 400px;
    }


    #header-search-bar {
        width: 200px;
    }

    /* MAIN CONTAINER */

    /* quick links sidebar */

    /* main posts content */

    #main-content {
        width: calc(100% - 250px);
        padding-right: 20px;
    }

    /* recent links sidebar */

}

/* widescreen phone */

@media (max-width: 768px) {

    .mobile-wide-hide {
        display: none;
    }

    .mobile-wide-show {
        display: flex;
        flex-direction: column;
    }

    /* HEADER */

    .header-container {
        align-items: center;
        justify-content: center;
    }

    #header-mobile-bars-container {
        display: flex;
        width: 100px;
        margin-left: 20px;
        justify-content: center;
        align-items: start;
    }

    #header-logo-container {
        justify-content: center;
    }

    #header-mobile-search-container {
        display: flex;
        width: 100px;
        margin-right: 20px;
        justify-content: center;
        align-items: end;
    }

    .mobile-header-icon {
        height: 30px;
    }

    /* mobile icon bar (bottom) */

    #mobile-icon-bar {
        position: sticky;
        display: flex;
        flex-direction: row;
        align-items: center;
        bottom: 0px;
        width: 100%;
        height: 50px;
        background-color: white;
        border-top: 1px solid var(--border);
        border-top: 1px solid var(--border);
    }

    .mobile-icon-bar-container {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 25%;
        height: 100%;
        border-left: 1px solid var(--border);
        border-right: 1px solid var(--border);
        margin: 0px -1px 0px -1px;
    }

    /* MAIN CONTAINER */

    /* quick links sidebar */

    /* main posts content */

    #main-content {
        width: 100%;
        padding-right: 0px;
    }

    .post-tile {
        width: calc(50% - 60px);
    }

    /* recent links sidebar */

}

/* vertical phone */

@media (max-width: 480px) {
    
    .mobile-hide {
        display: none;
    }

    .mobile-show {
        display: flex;
        flex-direction: column;
    }


    /* HEADER */

    /* MAIN CONTAINER */

    /* quick links sidebar */

    /* main posts content */

    #main-content {
        padding-right: 20px;
    }

    .post-tile {
        width: 100%;
    }

    /* recent links sidebar */

}