/* controls menu going up and down instead of across */
@media only screen and (min-width: 1152px) {
      
      .menu ul {
        background: white;
        padding-left: 0;
      }
      
      .menu li {
        z-index: 10;
        color: #136f63;
        background: white;
        display: block;
        float: left;
        padding: 1rem;
        position: relative;
        text-decoration: none;
      }

      .menu li > ul {
          z-index: 200;
      }

      .menu ul > li > a::before {
        content: "";
        margin-top: -50px;
        position: absolute;
        width: 100%;
        height: 2px;
        bottom: 0;
        left: 0;
        background-color: #000;
        visibility: hidden;
        transform: scaleX(0);
        transition: all 0.3s ease-in-out 0s;
        top: 105px;
      }
      .menu div > ul > li:hover > a::before {
        visibility: visible;
        transform: scaleX(1);
      }
        
      .menu li a {
        color: #136f63;
        padding: 0px;
        margin: 0px;
      }

      .menu li a:hover {
        text-decoration: none;
      }
      
      .menu ul li ul li:hover a,
      .menu ul li ul li:hover {
        color: white;
        background: #136f63;
      }

      .menu li:hover {
        cursor: pointer;
      }
      .menu ul li ul {
          border: black 1px solid;
      }
      
      .menu ul li ul {
        background: white;
        visibility: hidden;
        opacity: 0;
        min-width: 5rem;
        position: absolute;
        transition: all 0.5s ease;
        margin-top: 1rem;
        left: 0;
        display: none;
      }
      
      .menu div > ul > li:hover > ul,
      .menu div > ul > li > ul:hover {
        visibility: visible;
        opacity: 1;
        display: block;
        text-decoration: underline;
      }
      
      .menu ul li ul li {
        clear: both;
        width: 150px;
      }
      .menu-control {
          display: none;
      }
    }
    /* when to show hamburger menu */
      @media only screen and (max-width: 1151px) {
          .line {
            height: 4px;
            width: 32px;
            transition: all .5s ease;
          }
          .line-top {
            border-bottom: 4px solid #136f63;
          }
          .line-middle {
            margin-top: 4px;
            border-top: 4px solid #136f63;
          }
          .line-bottom {
            border-top: 4px solid #136f63;
          }


          .menu div > ul {
              position: fixed;
              right: 0px;
              z-index: 1000;
              border: #136f63 1px solid;
              top: 0px;
          }
        .menu-control {
            display: block;
            position: fixed;
            right: 15px;
            top: 20px;
            z-index: 2000;
            cursor: pointer;
        }
        .menu {
            display: none;
        }
        .menu ul,li {
            cursor: pointer;
        }
        .menu ul {
            background: white;
            padding-left: 0;
            margin-left: auto;
          }
          
          .menu li {
            z-index: 10;
            color: #136f63;
            background: white;
            display: block;
            
            padding: 1rem;
            
            text-decoration: none;
          }

          .menu li ul li:hover {
              background-color: #136f63;
              color: white;
          }

          .menu li ul li:hover a {
            background-color: #136f63;
            color: white;
        }

          .menu ul li ul {
            background: white;
            visibility: hidden;
            opacity: 0;
            min-width: 5rem;
            position: relative;
            transition: all 0.5s ease;
            margin-top: 1rem;
            left: 0;
            display: none;
            margin-left: auto;
            
          }

          .menu ul > li > a::before {
            content: "";
            position: relative;
            width: 100%;
            height: 2px;
            bottom: -20;
            left: 0;
            background-color: #000;
            visibility: hidden;
            transform: scaleX(0);
            transition: all 0.3s ease-in-out 0s;
            top: 40px;
            display: inline-block;
          }
          .menu div > ul > li:hover > a::before {
            visibility: visible;
            transform: scaleX(1);
          }
          .menu li a {
            color: #136f63;
            padding: 0px;
            margin: 0px;
          }
          .menu li a:hover {
            text-decoration: none;
          }
      }

/* top menu links shown as colored buttons, one color per category */
.menu li {
    padding: 4px 2px;
}
.menu li > a, .menu2Item > a {
    padding: 8px 10px;
}
.menu ul > li > a::before {
    display: none;
}
.menu li > a, .menu2Item > a {
    display: block;
    border-radius: 6px;
    color: white;
    text-align: center;
    line-height: 1.25;
    box-shadow: 0 2px 3px rgba(0,0,0,.3);
}
.menu li > a:hover, .menu2Item > a:hover {
    text-decoration: none;
    filter: brightness(1.2);
}
.menu li > a[href$="posterity.html"], .menu2Item > a[href$="posterity.html"] { background: #470063; color: white }
.menu li > a[href$="dc.html"], .menu2Item > a[href$="dc.html"] { background: #136f63; color: white }
.menu li > a[href$="ancestors.html"], .menu2Item > a[href$="ancestors.html"] { background: #8a4b2f; color: white }
.menu li > a[href$="stories.html"], .menu2Item > a[href$="stories.html"] { background: #b01c1c; color: white }
.menu li > a[href$="history.html"], .menu2Item > a[href$="history.html"] { background: #2c6e49; color: white }
.menu li > a[href$="reunion.html"], .menu2Item > a[href$="reunion.html"] { background: #1a6fa8; color: white }
.menu li > a[href$="generations.html"], .menu2Item > a[href$="generations.html"] { background: #6b5f73; color: white }
.menu li > a[href$="books.html"], .menu2Item > a[href$="books.html"] { background: #4f6b68; color: white }
@media only screen and (max-width: 1151px) {
    /* keep the first button clear of the hamburger close X */
    .menu ul {
        margin-top: 55px;
    }
}
@media only screen and (min-width: 1152px) {
    /* spread the buttons across the header like the home page menu */
    .menu {
        flex: 1;
        min-width: 0;
    }
    .menu ul {
        display: flex;
        margin: 0;
        align-items: center;
        height: 100%;
    }
    .menu li {
        float: none;
        flex: 1 0 auto;
        padding: 0 3px;
    }
}
