.og-grid *,
.og-grid *:after,
.og-grid *:before {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

.og-grid {
  list-style: none;
  padding: 20px 0;
  margin: 0 auto;
  text-align: left;
  width: 100%;
}

.og-grid li {
  display: inline-block;
  margin: 10px 5px 0 5px;
  vertical-align: top;
}
.og-grid.og-transitionable li,
.og-grid.og-transitionable .og-expander {
  transition: height 350ms ease;
}

.og-grid li > a,
.og-grid li > a img {
  border: none;
  outline: none;
  display: block;
  position: relative;
}

.og-grid li.og-expanded > a::after {
  top: auto;
  border: solid transparent;
  content: ' ';
  height: 0;
  width: 0;
  position: absolute;
  pointer-events: none;
  border-bottom-color: #ddd;
  border-width: 15px;
  left: 50%;
  margin: -20px 0 0 -15px;
}

.og-expander {
  position: absolute;
  background: #ddd;
  top: auto;
  left: 0;
  width: 100%;
  margin-top: 10px;
  text-align: left;
  height: 0;
  overflow: hidden;
}

.og-expander-inner {
  padding: 50px 30px;
  height: 100%;
}

.og-close {
  position: absolute;
  width: 40px;
  height: 40px;
  top: 20px;
  right: 20px;
  cursor: pointer;
}

.og-close::before,
.og-close::after {
  content: '';
  position: absolute;
  width: 100%;
  top: 50%;
  height: 1px;
  background: #888;
  -webkit-transform: rotate(45deg);
  -moz-transform: rotate(45deg);
  transform: rotate(45deg);
}

.og-close::after {
  -webkit-transform: rotate(-45deg);
  -moz-transform: rotate(-45deg);
  transform: rotate(-45deg);
}

.og-close:hover::before,
.og-close:hover::after {
  background: #333;
}

.og-fullimg,
.og-details {
  width: 50%;
  float: left;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.og-details {
  padding: 0 40px 0 20px;
}

.og-fullimg {
  text-align: center;
}

.og-fullimg img {
  display: inline-block;
  max-height: 100%;
  max-width: 100%;
}

.og-loading {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ddd;
  box-shadow:
    0 0 1px #ccc,
    15px 30px 1px #ccc,
    -15px 30px 1px #ccc;
  position: absolute;
  top: 50%;
  left: 50%;
  margin: -25px 0 0 -25px;
  -webkit-animation: loader 0.5s infinite ease-in-out both;
  -moz-animation: loader 0.5s infinite ease-in-out both;
  animation: loader 0.5s infinite ease-in-out both;
}

.og-previous,
.og-next {
  position: absolute;
  top: 50%;
  margin-top: -20px;
  height: 23px;
  width: 14px;
  line-height: 40px;
}
.og-previous {
  left: 10px;
  background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAXCAQAAACRmLYJAAAAi0lEQVR42nXSGxzAIBgE8LnlltvccsttbnOb27nlltvccsttj/tF3ZX+q++5+YMTD5qDgOujB9URSAVhpohKwpquCUjtg45DKQ3KShmdlJQORrqxm6r4qiHqK/BVJQk+9tXAov3QdlWym8EUV5gZSzHSBstpvM6ed9yMfnqO5L7igKLjVi5qPFyx9gKoA5CSv3obGAAAAABJRU5ErkJggg==');
}
.og-previous:hover {
  background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAXCAQAAACRmLYJAAAAi0lEQVR42nXRGxgAIRAE4HPLLbfccsvt3MYtt3PLLbdzyy23e+y3NE3p374P/QA8GAoC6kcPuqLLqCEwRXSja0+VwGh8MHGulJ3KSgXTKK90WqUbSUxlUQNxifKpuhPhI6McG+1Drqsj6GhQXWbvOBHwGjRnjy6aE26rDs3ReO44oNG5JTcWf6gfjhefnYFMHCqTVwAAAABJRU5ErkJggg==');
}
.og-next {
  right: 5px;
  background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAXCAQAAACRmLYJAAAAiUlEQVR42n3RGQDFMBAE0LjVLW51i1vc6ha3uI1b3OJWt7qtW4/59+9sVl+yZ8CGHSXoQD9xR8WkcEIjw2OQO6JOXse8wE7ePM5PTpoT2ZA1z1hZfdEcuRbzJo/PxWD0ex/trCnqn3XqekUNwk4V+StAfv5KdyqstGJWZKTonbqJdaFpYrCNGmQcCKCQktV9gRIAAAAASUVORK5CYII=');
}
.og-next:hover {
  background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAXCAQAAACRmLYJAAAAiUlEQVR42n3RGwDAIBAG4Nzmltvccsttbr9bbrmdW25zy+3c9n7vv9KveztUTIDjD2XBCQkdww6ycbY4b1zgefLU5gG6cLU4Hhw4h40VkXOPcas+cPbbWtSa3B+Lya3oqbUzYVTudfJ6IIPsnTKyV4B4RIU/Yas0omekG3nr1ELWBSF0YV0oOfpm9leBTNYeLFIAAAAASUVORK5CYII=');
}

@-webkit-keyframes loader {
  0% {
    background: #ddd;
  }
  33% {
    background: #ccc;
    box-shadow:
      0 0 1px #ccc,
      15px 30px 1px #ccc,
      -15px 30px 1px #ddd;
  }
  66% {
    background: #ccc;
    box-shadow:
      0 0 1px #ccc,
      15px 30px 1px #ddd,
      -15px 30px 1px #ccc;
  }
}

@-moz-keyframes loader {
  0% {
    background: #ddd;
  }
  33% {
    background: #ccc;
    box-shadow:
      0 0 1px #ccc,
      15px 30px 1px #ccc,
      -15px 30px 1px #ddd;
  }
  66% {
    background: #ccc;
    box-shadow:
      0 0 1px #ccc,
      15px 30px 1px #ddd,
      -15px 30px 1px #ccc;
  }
}

@keyframes loader {
  0% {
    background: #ddd;
  }
  33% {
    background: #ccc;
    box-shadow:
      0 0 1px #ccc,
      15px 30px 1px #ccc,
      -15px 30px 1px #ddd;
  }
  66% {
    background: #ccc;
    box-shadow:
      0 0 1px #ccc,
      15px 30px 1px #ddd,
      -15px 30px 1px #ccc;
  }
}

@media screen and (max-width: 830px) {
  .og-expander h3 {
    font-size: 32px;
  }
  .og-expander p {
    font-size: 13px;
  }
  .og-expander a {
    font-size: 12px;
  }
}

@media screen and (max-width: 650px) {
  .og-fullimg {
    display: none;
  }
  .og-details {
    float: none;
    width: 100%;
  }
}

.og-grid.og-transitionable .og-fullimg img {
  opacity: 1;
  animation-name: fadeInOpacity;
  animation-iteration-count: 1;
  animation-timing-function: ease-in-out;
  animation-duration: 300ms;
}

@keyframes fadeInOpacity {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
