* {
    padding:0;
    margin:0;
    box-sizing: border-box;
    /* border:3px solid; */
    font-family: Roboto, Arial, sans-serif;
}

/* 
color:#c1cbfd;
rgb(88, 90, 99);
rgb(37, 32, 43);
rgb(150, 136, 201);
rgb(132, 120, 175);
rgb(133, 115, 199); 
*/

body {
    background-image: url(../res/svg/brickBackground.svg);
    /* background-color: rgba(37, 32, 43); */
    background-size: 4.25%;
    image-rendering:pixelated;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#wrapper {
    text-align: center;
    display:grid;
    grid-template-columns: 15vw 3rem 5fr 3rem 15vw;
    grid-template-rows:auto;
    flex: 1;
}

nav {
    grid-area:1 / 1 / 1 / -1;
    display:flex;
    align-items: center;
    flex-wrap: nowrap;
    height: 5.25rem;
    background-color:  rgba(37, 32, 43, .75);
    border-bottom: 2px solid rgb(88, 90, 99);
}

nav .links {
    flex: 1 1 auto;
    min-width: 0;
}

#logo,
#search,
.dropdown {
    flex-shrink: 0;
}

nav a {
    text-decoration: none;
    display:block;
    font-size: 2rem;
    font-weight: bold;
}

 a:link, a:visited{
    color:#c1cbfd;
}

nav .links a:hover {
    background-color: rgba(150, 136, 201, 0.4);
}

nav .links ul {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    list-style-type: none;
    margin:0px 1rem;
}

nav .links ul a {
    padding:.3rem;
    font-size:2rem;
}

#logo {
    margin:5px 1rem;
    display: flex;
    align-items: center;
}

#logo a img {
    width: 60px;
    max-height: calc(5.25rem - 10px);
    object-fit: contain;
}

.dropdown img {
    width:48px;
    max-height: calc(5.25rem - 10px);
    margin:5px 1rem;
    object-fit: contain;
}

.dropdown ul {
    right:5px;
    font-size: 1.5rem;
    display: none;
    position: absolute;
    list-style-type: none;
    background-color:rgb(132, 120, 175, .9);
    border:2px #c1cbfd solid;
    z-index: 2;
}

.dropdown ul li {
    padding:.5rem;
    border:1px #c1cbfd solid;
    color:#c1cbfd;
}

.dropdown:hover ul {
    display: block;
}

.dropdown {
    grid-area: 1/ 4 / 1 / 4;
}

#search {
    grid-area: 1 / 3 / 1 / 3;
    height:3rem;
    width: 16rem;
    margin-left:auto;
    background-color: rgba(133, 115, 199, .75);
    border:2px #c1cbfd solid;
    padding: 12px 20px;
    border-radius: 0%;
    font-weight: 900;
    color:#c1cbfd;
    text-align: center;
    font-size: 1.5rem;
}

#search:focus {
    background-color: rgba(133, 115, 199, .75);
    border:2px #c1cbfd solid;
    outline:none;
}

#search::placeholder {
    color: rgba(193, 203, 253, .5);
}

header {
    grid-area: 2 / 1 / 2 / 6;
}

.hGrid {
    display:grid;
    grid-template-columns: 1fr 4fr 1fr;
}

#hLeft, #hRight {
    border-bottom: 2.5rem solid transparent;
}

#hLeft {
    grid-area: 1 / 1 / 1 / 1;
    border-right: 2.5rem solid rgba(133, 115, 199, .9);
}

#hCenter {
    padding-top: 5px;
    font-size: 2rem;
    justify-content:center;
    grid-area: 1 / 2 / 1 / 2;
    background-color: rgba(133, 115, 199, .9);
}

#hRight {
    grid-area: 1 / 3 / 1 / 3;
    border-left: 2.5rem solid rgba(133, 115, 199, .9);
}

.title {
    grid-area: 4 / 3 / 4 / 3;
    border-style: solid;
    border-color: rgba(150, 136, 201, 0.9);
    background-color: rgba(133, 115, 199, .9);
    color:#c1cbfd;
    z-index: 1;
    font-size:2.5rem;
    font-weight: bold;
    margin:0rem 3rem;
    text-align: center;
}

#container,
.drop-card,
.drop-list-item {
    margin:3rem 0rem;
}

main {
    grid-area:6 / 3 / 10 / -3;
    margin:0rem 0rem 3rem 0rem;
}

.back {
    grid-area:6 / 2 / 11 / 5;
    margin-top:6.5rem;
    margin-bottom:9rem;
    
    background-color:  rgba(37, 32, 43, .75);
    border-style: solid;
    border-color: rgba(28, 24, 33, 0.75);
}

.sort-bar,
.subnav-row {
    grid-row: 2;
    grid-column: 3 / -3;
    margin: 0rem 0rem 1rem;
}

.subnav-row:has(.pageNav--top) {
    min-height: calc(2.7rem + 2px);
}

.subnav-row:has(.pageNav--top) .pageNav.pageNav--top p {
    margin: 0;
}

.sort-bar {
    background-color: rgba(105, 91, 158, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.2);
    text-align: center;
    position: sticky;
    top: 0.25rem;
    z-index: 2;
    width: 100%;
}

.pageNav.pageNav--top p {
    margin: 0;
}

.custom-select {
    position: relative;
}

.custom-select select {
    display: none;
}

.select-selected {
    background-color: rgba(105, 91, 158, 0.9);
    text-align: center;
    height: 2.7rem;
    padding: 8px 32px 8px 16px;
    border: solid 1px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    color: #c1cbfd;
    font-size: 1.5rem;
    outline: none;
    user-select: none;
}

.select-selected:after {
    position: absolute;
    content: "";
    top: 14px;
    right: 10px;
    width: 0;
    height: 0;
    border: 6px solid transparent;
    border-color: #fff transparent transparent transparent;
}

.select-selected.select-arrow-active:after {
    border-color: transparent transparent #fff transparent;
    top: 7px;
}

.select-items div,
.select-selected {
    box-sizing: border-box;
}

.select-items {
    position: absolute;
    background-color: rgba(133, 115, 199, 0.9);
    top: 100%;
    left: 0;
    right: 0;
    z-index: 3;
}

.select-items div {
    padding: 8px 16px;
    border: solid 1px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    color: #c1cbfd;
    font-size: 1.5rem;
}

.select-hide {
    display: none;
}

.select-items div:hover,
.select-items div.same-as-selected {
    background-color: rgba(190, 175, 245, 0.95);
    color: #fff;
}

.upperbody, .lowerbody {
    line-height: 150%;
    font-size: 1.2rem;
    color:#c1cbfd;
    background-color: rgba(88, 90, 99, 0.75);
    border-style: solid;
    text-align: left;
    border-color: rgba(88,91,102,1);
}

.upperbody {
    grid-area:5 / 2 / 8 / 5;
    display:grid;
    grid-template-columns: 1fr 7fr 1fr;
}

.mapImg {
    width:100%;
}

#upMargin,
.up-margin {
    grid-area: 1 / 1 / 3 / 4;
    margin:50px 25px 25px 20px;
}

#pageInfo,
.page-info {
    grid-area: 1 / 1 / 1 / 1;
    font-size: large;
    margin-top:30px;
    justify-content: space-between;
    flex-wrap: nowrap;
    display:flex;
}

.pageNav p{
    display: flex;
    flex-wrap: nowrap;
    background-color: rgba(98, 94, 162, 0.85);
    margin:0rem 3rem;
    height:2.7rem;
    border: solid 1px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    padding: 0;
    box-shadow: none;
    line-height: normal;
}

.pageNav p button,
.pageNav p a {
    background-color: rgba(0,0,0,.05);
    font-size:1.2rem;
    margin:0px;
    padding:0px;
    border:none;
    min-width: 2.5ch;
    flex: 1;
    text-decoration: none;
    color: #c1cbfd;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pageNav--top {
    display: none;
}

.pageNav--bottom {
    display: block;
}

.pageNav p button:hover,
.pageNav p a:hover {
    opacity: .2; 
}

.lowerbody {
    margin:0rem;
    grid-area:9 / 2 / 10 / 5;
    padding:10px;
}

#lowMargin,
.low-margin {
    /* border:1px solid red; */
    display:grid;
    grid-template-columns: 1fr 1fr 2fr 1fr;
    grid-template-rows:auto;
}

#commentMenu,
.comment-menu {
    grid-area: 1 / 1 / 1 / 3;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.commentToggle {
    background-color: rgba(133, 115, 199, .9);
    color: #c1cbfd;
    border: 1px solid rgba(0, 0, 0, 0.2);
    padding: 4px 10px;
    font-size: 0.9rem;
    cursor: pointer;
    width: auto;
    margin-left: 0;
}

.commentToggleRow {
    display: flex;
    justify-content: center;
    margin-top: 0.75rem;
}

.commentToggle:hover {
    opacity: 0.85;
}

.commentList.is-collapsed {
    display: none;
}

.comment-button {
    grid-area: 2 / 1 / 2 / -1;
    display:grid;
    grid-template-columns: 3.8rem auto;
}

.newComment {
    grid-area: 1 / 2 / 1 / -1;
    background-color: rgba(0,0,0,0);
    text-decoration: underline;
    font-size: 1rem;
    padding:0px;
    text-align: left;
}

.comments {
    display:grid;
    grid-template-columns: 3.8rem auto;
    grid-template-rows: auto;
    color:#c1cbfd;
    line-height: 150%;
    font-size: 1.2rem;
    border: solid 3px rgba(88,91,102,1);
    border-top: solid 4px rgba(37, 32, 43, .5);
    background-color: rgba(88, 90, 99, 0.75);
    text-align: left;
    padding:5px;
    padding-left: 1.5rem;
}

.comments img, .comment-button img {
    width:2.5rem;
    margin:.4rem;
    grid-area:  1 / 1 / 2 / 1;
}

.comment-button img {
    margin-left:0px;
}

.username {
    grid-area: 1 / 2 / 1 / 2;
}

.comment {
    margin-top:2rem;
    grid-area: 1 / 2 / 1 / 2;
}

footer {
    grid-area:12 / 1 / 12 / 8;
    border:2px solid rgba(28, 24, 33, 0.75);
    background-color:  rgba(37, 32, 43, .75);
    display: grid;
    grid-template-rows:auto;
    grid-template-columns: 1fr auto 1fr;
    padding:16px
} 

#about {
    font-size: 2rem;
    margin:auto;
}

footer img{
    width:4rem;
}

footer ul {
    display:flex;
    justify-content: space-around;
    grid-column: 3 / -1;
}

footer ul li {
    list-style-type: none;
}

p {
    background-color:  rgba(37, 32, 43, .25);
    box-shadow:0px 0px 2px 1px rgba(37, 32, 43, .75);
    padding:10px;
    line-height: 200%; 
}

footer p {
    background-color:rgba(0,0,0,0);
    box-shadow:none;
    grid-column: 2 / 2;
    color:#c1cbfd;
}

footer p a {
    font-size: 1rem;
}

@media only screen and (max-width: 992px){
    #wrapper {
        grid-template-columns: 1fr 1fr 3fr 1fr 1fr;
        grid-template-rows: auto;
    }

    .sort-bar,
    .subnav-row {
        margin: 0rem 0rem 1rem;
        grid-row: 2;
        grid-column: 1 / -1;
        position: static;
    }

    .sort-bar {
        position: static;
    }

    .back {
        margin:0px;
        grid-area: 4 / 1 / 8 / 6;
    }

    .title {
        margin:0px;
    }

    body {
        background-size: 14%;
    }

    nav {
        grid-area: 1 / 1 / 1 / -1;
        flex-wrap: wrap;
        justify-content: space-around;
        height: 9rem;
        max-height: 9rem;
    }

    header {
        grid-area: 2 / 1 / 2 / -1;
    }

    #hLeft, #hRight, #hCenter {
        display:none;
    }

    #logo a img {
        width: 4rem;
        max-height: calc(4.5rem - 10px);
    }

    .links { 
        order:4;
        flex-basis: 100%;
    }

    .dropdown img {
        padding: 5px 0px 0px 5px;
        width:5rem;
    }

    #search {
        margin:0px;
        width:65%;
        height:3rem;
    }

    .title {
        grid-area: 3 / 2 / 3 / 5;
    }

    #container, main,
    .drop-card,
    .drop-list-item {
        margin:0rem;
    }

    .upperbody {
        grid-area: 4 / 1 / 7 / 6;
    }
    
    .pageNav p{
        margin:0px;
    }

    .pageNav--top {
        display: block;
    }

    .pageNav--bottom {
        display: none;
    }

    .lowerbody {
        border-top: solid 4px rgba(37, 32, 43, .5);
        grid-area: 8 / 1 / 9 / 6;
        margin:0px;
    }

    main {
        grid-area: 4 / 1 / 9 / -1;
    }
    
    footer {
        grid-area: 11 / 1 / 11 / -1;
    }

    #about {
        font-size: 1rem;
        grid-area: 3 / 2 / 3 / 2;
    }
}

    
@media only screen and (max-width: 768px){

    #logo {
        margin:10px;
    }

    #logo a img {
        width: 4rem;
    }

    .dropdown img {
        width: 4rem;
        margin:10px;
        padding:0px;
    }

    nav .links ul a { 
        font-size: 1rem;
    }

    #wrapper {
        grid-template-columns:1fr;
    }

    nav .links ul a { 
        font-size: 1rem;
    }

    .title, .upperbody, .lowerbody {
        grid-column: 1 / -1;
        margin:0px;
        width:100%;
    }    

    .title {
        font-size:2rem;
    }

    .upText {
        font-size:1rem;
    }

    #upMargin {
        margin:10px;
    }

    #pageInfo p{
        display:flex;
        /* flex-flow: wrap; */
        justify-content: space-between;
        font-size:1rem;
    }
    
    .dayCounter, .author {
        margin-left: 5px;
        margin-right:5px;
    }

    .dropdown ul li {
        border:1px #c1cbfd solid;
        color:#c1cbfd;
    }

    .dropdown ul li a {
        font-size:1rem;
    }

    footer ul{
        grid-area: 1 / 1 / 1 / -1
    }

    footer img{
        width:3rem;
    }
}

@media only screen and (max-width: 480px){

    #wrapper {
        grid-template-columns:1fr;
    }

    #logo {
        margin:5px;
        margin-top:15px;
    }

    #logo a img {
        width: 2rem;
    }

    .dropdown img {
        width: 2rem; 
        margin:5px;
        padding:0px;
    }

    nav .links ul a { 
        font-size: 1rem;
    }

    main {
        grid-row: 4 / 9 ;
    }
    
    .title, .upperbody, .lowerbody {
        grid-column: 1 / -1;
        margin:0px;
        width:100%;
        padding:0px;
    }    

    .title {
        font-size:2rem;
    }

    .upText {
        font-size:1rem;
    }

    #upMargin {
        margin:10px;
    }
    
    .dayCounter, .author {
        margin-left: 5px;
        margin-right:5px;
    }

    #pageCounter {
        flex-basis: 100%;    }

    .pageNav p button,
    .pageNav p a {
        padding:5px;
    }

    .dropdown ul li a {
        font-size:1rem;
    }

    footer img{
        width:2rem;
    }
}