#container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    font-family: Arial, sans-serif;
}

.wrapper {
    display: grid;
    grid-template-columns: 100%;
    grid-template-rows: auto;
    grid-template-areas:
    "title"
    "photo"
    "byline"
    "wordsone"
    "dataone"
    "wordstwo"
    "datatwo"
    "more";
}

#map {
    width: 100%;
    height: 500px;
    position: relative;
}

#state-info {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #fefefe;
    display: grid;
    justify-content: left;
}

#loading {
    text-align: center;
    padding: 20px;
}

.total { 
    font-weight: normal; 
    font-size: 20px; 
}

.democrat { 
    color: #0000ff; 
}

.republican { 
    color: #ff0000; 
}

.legend {
    margin: 20px 0;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.color-box {
    width: 20px;
    height: 20px;
    border: 1px solid #999;
}

#header {
    display: flex;
    justify-content: space-between; 
    align-items: center; 
    padding: 0 20px;
    position: relative; 
    height: 60px; 
    border-bottom: solid .5px rgb(203, 200, 200);
}

#menu {
    flex: 0 1 auto; 
}

#post {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
}

#post img {
    pointer-events: auto;
}

#new-button {
    flex: 0 1 auto; 
    width: 80px;
    
}

#buttonone {
    background-color: #0e4db3;
    border: none;
    color: white;
    text-align: center;
    text-decoration: none;
    display: block; 
    font-size: 16px;
    /* padding: 10px 40px;
    margin: 20px auto;  */ 
    border-radius: 30px; 
    cursor: pointer;
}

#buttontwo {
    background-color: #0e4db3;
    border: none;
    color: white;
    text-align: center;
    text-decoration: none;
    display: block; 
    font-size: 16px;
    padding: 10px;
    margin: 0px;
    border-radius: 30px;
    width: 80px;
    cursor: pointer;
    
}

.sidenav {
    height: 100%; 
    position: fixed; 
    background-color: #fbf9f9; 
    overflow-x: hidden; 
    padding-top: 60px; 
    transition: 0.5s; 
    width: 0;
}

.sidenavlinks {
    text-align: left;
    padding: 0;
}

.sidenav a {
    padding: 12px 20px; 
    text-decoration: none;
    font-size: 16px;
    color: #040303;
    display: block;
    transition: 0.3s;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    margin-bottom: 0; 
}

.sidenav a:hover {
    color: #040303; 
    background-color: #e6e6e6;
}


.sidenav .closebtn {
    position: absolute;
    top: 0;
    right: 25px;
    font-size: 36px;
    padding: 8px 12px; 
    margin: 0;
}


.sidenav .closebtn:hover {
    background-color: transparent; 
}
  
  #main {
    transition: margin-left .5s;
    padding: 20px;
  }

  .title {
    grid-area: title;
    display: flex;
    flex-direction: row;
    margin-left: 20%;
    margin-right: 20%;
    text-align: center;
  }

  h2 {
    font-size: 50px;
  }

  #photo {
    grid-area: photo;
    margin-left: 25%;
    margin-right: 25%;
    display: flex;
    justify-content: center;
    flex-direction: column;
    text-align: right;
    font-family: Arial, Helvetica, sans-serif;
  }

  .one {
    display: flex; 
    flex-direction: row;
    align-items: center;
  }

  #photo img {
    height: 500px;
    width: auto;
  }

#byline {
    margin-left: 25%;
    margin-right: 25%;
}

#byline img {
    border-radius: 50px;
    height: 30px;
    width: 30px;
    margin-right: 10px;
    margin-bottom:10px;
}

  h3 {
    font-size: 12px;
  }

  h4 {
    font-size: 16px;
    font-family: arial;
    color: grey;
    padding: 0px;
    margin: 0px;
  }

  #wordsone {
    grid-area: wordsone;
    margin-left: 25%;
    margin-right: 25%;
  }

  h5 {
    font-family: Arial, Helvetica, sans-serif;
    font-weight: normal;
    font-size: 20px;
    color:#222121;
  }

  #dataone {
    grid-area:dataone;
    margin-left: 25%;
    margin-right: 25%;
  }

  #wordstwo {
    grid-area: wordstwo;
    margin-left: 25%;
    margin-right: 25%;
    height: 300px;
    width: auto;
    display: flex;
    justify-content: center;
    padding: 5px;
    margin-bottom: 100px;

  }

  #datatwo {
    grid-area: datatwo;
    margin-left: 25%;
    margin-right: 25%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-top: 100px;

  }




  
  @media screen and (max-height: 450px) {
    .sidenav {padding-top: 15px;}
    .sidenav a {font-size: 18px;}
    h2 {font-size: 20px;}
  }

  @media screen and (max-height: 680px) {
    h2 {
        font-size: 20px;
    }
  }