/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* Button styling */
.menu-toggle {
  display: inline-block;
  padding: .75em 15px .75em .255em;
  line-height: 1em;
  font-size: 1em;
  color: #630;
}

.menu-toggle:hover,
.menu-toggle:focus {
  color: #630;
}

/*
  Default styles + Mobile first
  Offscreen menu style
*/
.main-menu {
  position: absolute;
  display: none;
  left: -200px;
  top: 0;
  height: 100%;
    overflow-y: scroll;
    overflow-x: visible;
    transition: left 0.3s ease,
                      box-shadow 0.3s ease;
    z-index: 999;
}

.main-menu ul {
  list-style: none;
  margin: 0;
  padding: 2.5em 0 0;
  /* Hide shadow w/ -8px while 'closed' */
/*    -webkit-box-shadow: -8px 0 8px rgba(0,0,0,.5);
      -moz-box-shadow: -8px 0 8px rgba(0,0,0,.5);
          box-shadow: -8px 0 8px rgba(0,0,0,.5);*/
  min-height: 100%;
  width: 200px;
  background: #fff;
}

.main-menu ul ul {
    padding: 0 0 0 2.5em;
}

.main-menu a {
  display: block;
  padding: .75em 15px;
  line-height: 1em;
  font-size: 1em;
  text-decoration: none;
  font-weight: 200;
  /*border-bottom: 1px solid #630;*/
}

.main-menu li:first-child a {
  /*border-top: 1px solid #630;*/
}

.main-menu a:hover,
.main-menu a:focus {
/* 
  text-decoration: underline; */
  font-weight: bold;
}

.main-menu .menu-close {
  position: absolute;
  right: 0;
  top: 0;
}

/*
  On small devices, allow it to toggle...
*/
/*
  :target for non-JavaScript
  [aria-expanded] will be used if/when JavaScript is added to improve interaction, though it's completely optional.
*/
.main-menu:target,
.main-menu[aria-expanded="true"] {
  display: block;
  left: 0;
  outline: none;
  -moz-box-shadow: 3px 0 12px rgba(0,0,0,.25);
  -webkit-box-shadow: 3px 0 12px rgba(0,0,0,.25);
  box-shadow: 3px 0 12px rgba(0,0,0,.25);
}

.main-menu:target .menu-close,
.main-menu[aria-expanded="true"] .menu-close {
  z-index: 1001;
}

.main-menu:target ul,
.main-menu[aria-expanded="true"] ul {
  position: relative;
  z-index: 1000;
}

/* 
  We could us `.main-menu:target:after`, but
  it wouldn't be clickable.
*/
.main-menu:target + .backdrop,
.main-menu[aria-expanded="true"] + .backdrop{
  position: absolute;
  display: block;  
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 998;
  background: #fff;
  background: rgba(255,255,255,.85);
  cursor: default;
}

@supports (position: fixed) {
  .main-menu,
  .main-menu:target + .backdrop,
  .main-menu[aria-expanded="true"] + .backdrop{
    position: fixed;
  }
}

/*
  Larger screen styling
  Horizontal menu
*/
@media (min-width: 768px) {
  header {
    position: relative;
    margin-bottom: 1.5rem;

  }

  .menu-toggle,
  .main-menu .menu-close {
    display: none;
  }
  
  /* Undo positioning of off-canvas menu */
  .main-menu {
      width: 100%;
      position: absolute;
      left: 0px;
      top: 3rem; 
      text-align: center;
      height: auto;
      display: block; 
      overflow-y: visible;
  }

  .main-menu:target {
    -webkit-box-shadow: none;
    -moz-box-shadow: none;
          box-shadow: none;

  }

  .main-menu .menu {
    display: inline-block;
    margin: 0;
  }

  .main-menu .menu li{
    float: left;
    margin-left:0;
    padding-right:.7em;
    position: relative;
    color: #630;
  }

  .main-menu .menu li:last-of-type {
    padding-right: 0;
  }

  .main-menu .menu li a { 
    padding: 0; 
    color: #630;
    text-decoration: none;
    font-size: 1.1rem;
  }

  .main-menu .menu li a:hover, .menu li a.active {  
    opacity: 0.7!important;
    color: #630;
    /* text-decoration: underline; */
    font-weight: bold;
  }

  .main-menu .menu li ul.submenu {
    background-color: rgba(255,255,255,1);
    position:absolute;
    top:1.2em;
    left:0;
    display: none;
    list-style-type: none;
    margin: 0;
    padding: 0;
  }
  
  .main-menu .menu li:hover ul.submenu {
      display: block;
  }
  
  .main-menu .menu li ul.submenu li {
      clear: both;
      margin: 0;
      padding: 3px 4px;
  }
  
  .main-menu ul {
    display: flex;
    
    /* Undo off-canvas styling */
    padding: 0;
    -webkit-box-shadow: none;
        -moz-box-shadow: none;
            box-shadow: none;
    height: auto;
    width: auto;
    background: none;
  }
  
  .main-menu a {
    /* color: #06c; */
    border: 0 !important; /* Remove borders from off-canvas styling */
  }
  
  .main-menu a:hover,
  .main-menu a:focus {
    background: none; /* Remove background from off-canvas styling */
    /* color: #c00; */
  }
}

/*
  Demo purposes only
*/
*,
*:before,
*:after {
  box-sizing: border-box;
}

header {
  padding: 0;
  display: flex;
  align-items: baseline;
}

article {
  padding: 30px;
  width: 55em;
  font-size: 16px;
  line-height: 1.5em;
}

article h2 {
  font-weight: 500;
  font-size: 28px;
}

.logo {
  margin: 0 30px 0 10px;
  font-size: 1.5em;
}