.accordion-wrapper {
  margin: 30px 0;
  text-align: left;

  label {
    position: relative;
    display: block;
    cursor: pointer;
    color: #777;
    font-size: 110%;
    background: #f9f9f9;
    margin: 0;
    padding: 3px 15px;
    border: 1px solid #eee;
    border-bottom: 1px solid transparent;

    &:hover {
      background: #eee;
      color: #444;
    }
  }

  label:hover:after, input:checked + label:hover:after {
    opacity: 0.3;
    content: '';
    position: absolute;
    width: 30px;
    height: 20px;
    right: 15px;
    top: 7px;
    background: transparent url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgaGVpZ2h0PSI0OCIgdmlld0JveD0iMCAwIDQ4IDQ4IiB3aWR0aD0iNDgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE0LjgzIDE2LjQybDkuMTcgOS4xNyA5LjE3LTkuMTcgMi44MyAyLjgzLTEyIDEyLTEyLTEyeiIvPjxwYXRoIGQ9Ik0wLS43NWg0OHY0OGgtNDh6IiBmaWxsPSJub25lIi8+PC9zdmc+) no-repeat center center;
  }

  input:checked + label:hover:after {
    -ms-transform: rotate(180deg);
    -webkit-transform: rotate(180deg);
    transform: rotate(180deg);
  }

  input {
    display: none;
  }

  article {
    background: rgba(255, 255, 255, 0.5);
    overflow: hidden;
    max-height: 0px;
    position: relative;
    transition: max-height 0.3s ease-in-out;
    border: 1px solid #eee;
    border-top: 0;
    border-bottom: 0;
    padding: 0 15px;
  }

  input:checked ~ article {
    max-height: inherit;
  }

  input:checked + label {
    border-bottom: 1px solid #eee;
  }

  > div:last-child {
    label, input:checked ~ article {
      border-bottom: 1px solid #eee;
    }
  }
}

