:root {
  --font-family: Overpass;
  --main-color: #000;
  --main-bg-color: #FFF;
  --light-grey: #f0f0f0;
  --default-border-width: 3px;
}

* {
  box-sizing: border-box;
}

html {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-family), sans-serif;
  font-size: 1.375rem;
  color: var(--main-color);
  background-color: var(--main-bg-color);
  min-height: 100%;
}
body.negative {
  background-color: var(--main-color);
}

a {
  color: var(--main-color);
}
a:hover {
  cursor: pointer;
}

.long-text > p {
  margin: 0;
}
.long-text > p:not(:first-child) {
  margin-top: 1em;
}
.long-text > p:not(:last-child) {
  margin-bottom: 1em;
}

.link-with-arrow {
  display: flex;
}
svg.link-arrow {
  width: 30px;
  height: 24px;
  fill: var(--main-color);
  padding: 0 5.25px 0 0;
}
svg.link-arrow.right {
  padding: 0 0 0 .5em;
}
svg.link-arrow.left {
  padding: 0 .5em 0 0;
}
svg.link-arrow.negative path {
  fill: var(--main-color);
}
svg.link-arrow.negative polygon {
  fill: var(--main-bg-color);
}

div.row {
  padding: 0 20px 3em 20px;
  max-width: 1320px;
}
div.row.nobottompadding {
  padding: 0 20px;
}

div.row > h2 {
  margin: 40px 0;
  font-size: 3rem;
  text-decoration: underline;
}

div.negative-row-container, div.row.negative {
  color: var(--main-bg-color);
  background-color: var(--main-color);
}

/* header */
header {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--main-bg-color);
}

#header-content {
  max-width: 1320px;
  padding: 0 8px 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header a {
    text-decoration: none;
    display: block;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

#h-nav {
    display: none;
    padding: 13px 0;
}
#h-nav ul {
    margin:0;
    padding:0;
    list-style: none;
    display: flex;
    padding: 0 5px;
}
#h-nav li {
    display: block;
    padding: 0 15px;
    font-size: 1.5rem;
    font-weight: 700;
}
#h-nav li:last-child {
    padding: 0 6px 0 15px;
}
#h-nav li a.active {
    border-bottom: var(--default-border-width) solid var(--main-color);
}

#h-burger-btn {
  border-radius: 50%;
  padding: 12px;
  height:48px;
}
#h-burger-btn:hover {
  background-color: var(--light-grey);
}

#h-burger {
  width:24px;
  height:24px;
  display:inline-block;
  stroke: var(--main-color);
}

#sidebar {
  background-color: var(--main-bg-color);
  z-index: 251;
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 0;
  overflow-x: hidden;
  transition: 0.15s;
}
#sidebar.open {
  width: 100%;
}

#sidebar nav {
  margin: 48px 0 0 0;
  overflow: hidden;
}

#sidebar ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
#sidebar li {
  padding: 10px 20px;
}
#sidebar li a {
  display: block;
  text-align: center;
  padding: 10px 0;
  font-size: 2.25rem;
  font-weight: 700;
  text-decoration: none;
}
#sidebar li > a.active > span {
  border-bottom: var(--default-border-width) solid var(--main-color);
}

#sb-close-btn {
  position: absolute;
  border-radius: 50px;
  top: 2px;
  right: 10px;
  cursor: pointer;
  width: 48px;
  height: 48px;
  padding: 15px;
  margin: 0;
}
#sb-close-btn:hover {
  background-color: var(--light-grey);
}

#sb-close-btn svg {
  display: block;
  width: 18px;
  height: 18px;
  stroke: var(--main-color);
}

/* end header */

/* slideshow */
.slideshow {
  position: relative;
  /* avoid text selection */
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  margin: 2em 0;
}

.slideshow-arrow {
  position: absolute;
  top:40px;
  bottom:40px;
  width:60px;
  z-index:500;
  background-color: rgba(255,255,255,0);
  display: none;  /* flex when mouse over #slideshow via js */
  align-items: center;
  cursor:pointer;

  /* remove button styling */
  border: none;
}

.slideshow-arrow svg {
  width: 40px;
  margin: 10px;
}

.slideshow-arrow.left {
  left:0;
}

.slideshow-arrow.right {
  right:0;
}

.slideshow-scroll-view {
  position: absolute;
  top:0;
  bottom:0;
  left:0;
  right:0;
  display:flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;

  /* snap to images */
  scroll-snap-type: x mandatory;
  -webkit-scroll-snap-type: mandatory;

  /* hide scrollbar */
  scrollbar-width: none;  /* firefox */
  -ms-overflow-style: none;  /* IE 10+ */
}

.slideshow-scroll-view::-webkit-scrollbar, .slideshow-scroll-view::-webkit-scrollbar-thumb {
  display: none; /* hide scrollbar chrome safari */
}

.slideshow-media-container {
  min-width: 100%;
  scroll-snap-align: start;
  position:relative;
}

.slideshow-media-container > img {
  position:absolute;
  max-width: 100%;
  max-height: 100%;
  top:0;
  bottom:0;
  left:0;
  right:0;
  margin:auto;
  cursor:zoom-in;
}

div.slideshow-caption {
  display: none;
  position: absolute;
  left: 4rem;
  right: 4rem;
  bottom: 0;
  max-height: 100%;
  overflow-y: auto;
  z-index: 251;
  background-color: var(--main-bg-color);
  opacity: .85;
}

.slideshow-caption-container {
  margin: 2em 0;
}

.slideshow-caption-container > p {
  text-align: center;
  margin: 0 0 3px 0;
  font-size: .8rem;
}

.slideshow-caption-container > p:last-child {
  margin: 0;
}

.slideshow:hover div.slideshow-caption {
  display: block;
}

.slideshow-media-container > iframe {
  width: 100%;
  height: 100%;
}

.slideshow-dots {
  position:absolute;
  bottom: .5rem;
  left:0;
  right:0;
  z-index: 250;
  display:flex;
  justify-content:center;
  min-height: .4rem;
}

.slideshow-dot {
  display:block;
  fill: var(--main-color);
  stroke: var(--main-bg-color);
  height: .5em;
  width: .7em;
  flex-basis: .7rem;
  padding: 0 .1rem;
  opacity: .4;
}

.active {
  opacity: 1;
}

.slideshow-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color:#000;
  opacity: 0;
  transition: opacity .2s ease-in-out;
  cursor:zoom-out;
  flex-direction:column;
}

.slideshow-modal.active {
  opacity:1;
}

.slideshow-modal-image-container {
  position: relative;
  flex-basis: 100%;
}

.slideshow-modal-image {
  position: absolute;
  max-width: 100%;
  max-height: 100%;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  margin: auto;
}
/* end slideshow */

/* card */
.cards {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -20px;
}

.card {
  display: block;
  text-decoration: none;
  flex-basis: 100%;
  padding: 20px;
}

.card-image {
  display: block;
}

.card-image img {
  max-height: 100%;
  max-width: 100%;
}

.card-body {
  margin: 10px 0 0 0;
}

.card-caption {
  display: block;
  color: inherit;
  text-decoration: none;
}

.card-caption p {
  margin: 0;
}
/* end card */

/* section */
section > h3 {
  font-size: 2.25rem;
  font-weight: 700;
  margin: 3rem 0 1.5rem 0;
  text-decoration: underline;
}
.negative-row-container section:first-child > h3 {
  padding: 3rem 0 0 0;
}
/* end section */

/* item-nav */
#item-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin: 10px 0;
}
#previous-link {
  padding: 0 30px 0 20px;
}
#next-link {
  padding: 0 0 0 30px;
}
#back-link {
  flex-grow: 1;
  align-items: center;
  text-decoration: none;
}
#back-link:hover {
  text-decoration: underline;
}
.pagination-arrow {
  width: 1.2em;
}
/* end item-nav */

/* index */
#index-slideshow {
    margin: 0;
    padding: 0;
    list-style: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
#index-slideshow:hover {
    cursor: pointer;
}
#index-slideshow li {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}
#index-slideshow li {
    opacity: 0;
    z-index: 0;
    transition: opacity 0.3s ease-in-out;
}
#index-slideshow li.active {
    opacity: 1;
    z-index: 50;
}
.index-slide-caption {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;

    text-decoration: none;

    background-color: var(--main-bg-color);
    font-size: 1.5rem;
    font-weight: 700;
    padding: 13px 0;
}
.index-slide-caption > * {
    padding: 0 10px;
}
.index-slide-caption .post {
    max-width: 660px;
    margin: 0 auto;
    font-size: 1rem;
    font-weight: 400;
}
.index-slide-caption .post h2 {
    margin: 0;
}
.index-slide-caption .post p {
    margin-top: 13px;
}
.index-slide-caption .exh-title {
    font-style: italic;
}

.index-arrow {
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 75;
    position: absolute;
    top: 0px;
    height: 100%;
}
.index-arrow svg {
    width: 40px;
    padding: 20px 0;
}

.index-arrow.left {
    left: 20px;
}
.index-arrow.right {
    right: 20px;
}
/* end index */

/* exhibitions */
#exhibition-filters {
  margin: 40px 0 20px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}
.exh-active-filter {
  white-space: nowrap;
}
.exh-active-filter:hover {
  text-decoration: underline;
}
.exh-active-filter-cross {
  vertical-align: sub;
  width: 1em;
  stroke: var(--main-bg-color);
  fill: var(--main-color);
}
.exh-filter-container {
  padding: 0 10px 0 0;
}
/* Thank you !!!
 * https://www.filamentgroup.com/lab/select-css.html */
.exh-filter {
  display: block;
  font-size: 1.375rem;
  font-family: var(--font-family), sans-serif;
  font-weight: 700;
  color: var(--main-color);
  line-height: 1.3;
  padding: .6em 1.4em .5em .8em;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 5px 0;
  border: calc(var(--default-border-width) / 3) solid var(--main-color);
  border-radius: 0;
  -moz-appearance: none;
  -webkit-appearance: none;
  appearance: none;
  background-color: var(--main-bg-color);

  background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23000%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E');
  background-repeat: no-repeat;
  background-position: right .7em top 50%;
  background-size: .65em auto;
}
.exh-filter::-ms-expand {
  display: none;
}
.exh-filter:focus {
  box-shadow: 0 0 0 var(--default-border-width) var(--main-color);
  color: var(--main-color);
  outline: none;
}
.exh-filter option {
  font-weight: normal;
}

section.exhibition-sublist > h3 {
  font-size: 3rem;
}
.exhibition-sublist {
  font-size: 1.091em;
}
.exhibition-sublist.filtered-out, .exhibition-sublist .exhibition.filtered-out {
  display: none;
}

.exhibition {
  margin: 2em 0;
}
.exhibition:hover, .exhibition:hover a {
  cursor: pointer;
}
.exhibition .exh-link {
  text-decoration: none;
}
.exh-link:hover {
  text-decoration: underline;
}
.exhibition .exh-dates {
  display: flex;
  align-items: center;
  margin: .5em 0;
}
.exhibition .exh-dates .exh-viewing-room-link {
  font-weight: 700;
  display: none;
}
.exhibition .exh-artists {
  font-weight: 700;
}
.exhibition a.exh-artist {
  text-decoration: none;
}
.exhibition a.exh-artist:hover {
  text-decoration: underline;
}
.exhibition .exh-title {
  font-style: italic;
}
.exhibition .exh-location {
  margin: .5em 0;
}

.exhibition .exh-artists .exh-artist {
  white-space: nowrap;
}
/* end exhibitions */

/* exhibition */
#exhibition-slideshow {
  height: 62vh;
}
/* end exhibition */

/* artwork */
#artwork-slideshow {
  height: 62vh;
}

#artwork-caption-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}
#artwork-caption p {
  margin: 0;
}
#artwork-caption p.caption-artists {
  margin: 0 0 .25em 0;
  font-weight: 700;
}
#artwork-caption p.caption-artists a {
  text-decoration: none;
}
#artwork-caption p.caption-artists a:hover {
  text-decoration: underline;
}

#artwork-description p {
  margin: 0;
}
/* end artwork */

/* artists */
#artists {
  list-style: none;
  padding: 0;
  margin: 40px 0;
}
#artists a {
  display: block;
  padding: 10px 0;
  font-size: 2.25rem;
  font-weight: 700;
  text-decoration: none;
}
#artists a:hover {
  text-decoration: underline;
}
/* end artists */

/* artist */
#artist-exhibitions > ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
#artist-exhibitions > ul > li:not(:first-child) {
    margin-top: 1.5em;
}
#artist-exhibitions > ul > li:not(:last-child) {
    margin-bottom: 1.5em;
}

#artist-downloads > ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
#artist-downloads a {
    text-decoration: none;
    cursor: pointer;
    margin: .5em 0;
}
#artist-downloads a:hover {
    text-decoration: underline;
}
.artist-subsection:last-child {
    margin-bottom: 5em;
}
/* end artist */

/* publications */
button.add-to-cart {
  -webkit-appearance:none;
  -moz-appearance:none;
  appearance: none;
  font-size: inherit;
  font-weight: inherit;
  margin:0;
  padding:0;
  border:none;
  color: inherit;
  background-color: inherit;
  cursor: pointer;
}
button.add-to-cart:hover {
  text-decoration: underline;
}
button.add-to-cart > svg.link-arrow {
  fill: var(--main-bg-color);
}

/* end publications */

/* publication */
#publication-title {
  color: var(--main-bg-color);
}

#publication-slideshow {
  height: 62vh;
}
#publication-slideshow-caption {
  color: var(--main-bg-color);
}

#publication-caption-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--main-bg-color);
}

#publication-caption-container .add-to-cart {
  margin: 1em 0 0 0;
}

#publication-caption p {
  margin: 0;
}

#publication-description, #publication-description a {
  color: var(--main-bg-color);
}

#publication-description p {
  margin: 0;
}
/* end publication */

/* posts */
#posts {margin: 40px 0;}
.post {display: block;text-decoration: none;font-size: 1.091em;margin: 2em 0;}
.post:hover {cursor:pointer;}
.post .date {margin:.5em 0;}
.post .title, .post .blurb, .post p {margin: 0;}
.post:hover .title {text-decoration:underline;}
/* end posts */

/* post */
#post-slideshow {
  height: 62vh;
}
/* end post */

/* contact */
.location {
  margin: 40px 0;
  display: grid;
  column-gap: 2em;
  grid-template-columns: 100%;
  grid-template-rows: auto;
  grid-template-areas:
    "address"
    "opening-hours"
    "newsletter"
    "social-links"
    "image"
    "legal-links";
}

.location .image {
  grid-area: image;
  max-width: 100%;
}

.location .address {
  grid-area: address;
}
.location .address h4 {
  margin: 0;
}
.location .address p {
  margin: 0;
}
.location .address p.address-link {
  margin-top: 1em;
}
.location .directions p {
  margin-top: 1em;
}

.location section.opening-hours > h3 {
  margin: 1em 0 .5em 0;
}
.location .oh-hours {
  grid-area: opening-hours;
}
.location .oh-hours th {
  text-align: left;
  padding-right: .25em;
  vertical-align: top;
}
.location .oh-hours td {
  vertical-align: top;
}

.location .newsletter {
  grid-area: newsletter;
}
.location .newsletter a {
  display: inline-block;
  margin: 1em 0;
  padding: .25em;
  text-decoration:none;
  background-color: var(--main-color);
  color: var(--main-bg-color);
  border: var(--default-border-width) solid var(--main-color);
}
.location .newsletter a:hover {
  background-color: var(--main-bg-color);
  color: var(--main-color);
}

.location .social-links {
  grid-area: social-links;
  list-style: none;
  padding: 0;
  margin: .5em -11px;
  display: flex;
}
.location .social-links li a {
  display: block;
  padding: 11px;
  height: 66px;
}
.location .legal-links {
  grid-area: legal-links;
}
.location .legal-links p {
  margin-top: 1em;
}

/* endcontact */

/* 404 */
#error-message-container {
  height: calc(100vh - 44px);
  /* viewport changes on mobile devices with scrolling => viewport value includes the UI */
  height: calc(-webkit-fill-available - 44px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
#error-message {
  font-size: 2rem;
  text-align: center;
}
#error-message h2 {
  margin: 0 0 40px 0;
}
#error-message p {
  margin: 0;
}
/* end 404 */

@media screen and (min-width: 480px) {
  .card {
    flex-basis: 50%;
  }

  .card-image {
    padding-bottom: 100%;
    position: relative;
  }

  .card-image img {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto;
  }
}

@media screen and (min-width: 480px) {
  .exhibition .exh-dates .exh-viewing-room-link {
    display: block;
    padding: 0 0 0 1em;
  }
}

@media screen and (min-width: 640px) and (min-height: 640px) {
  .index-arrow svg {
    width: 50px;
    padding: 0;
  }
}

@media screen and (min-width: 920px) {
  #h-nav {
    display: block;
  }
  #h-burger-btn {
    display: none;
  }
  #sidebar {
    display: none;
  }

  .card {
    flex-basis: 33.333%;
  }

  .long-text {
    column-count: 2;
  }

  #artists {
    column-count: 2;
  }

  .location {
    grid-template-columns: 50% auto;
    grid-template-rows: auto;
    grid-template-areas:
      "image address"
      "image opening-hours"
      "image newsletter"
      "image social-links"
      "image legal-links";
  }
  .location .image {
    max-width: 100%;
  }
}

@media screen and (min-width: 1360px) {
  #header-content, div.row {
    margin: 0 auto;
  }
  #artists {
    column-count: 3;
  }
}
