:root {
  --line-height-header: 1.5em;
  --line-height-text: 1.3em;
  --line-height-nav: 1.3em;
}

html {
  margin: 0;
  font-family: "Helvetica Neue", "Helvetica", "Arial", sans-serif;
}

body {
  margin: 0;
  display: flex;
}

a,
a:hover,
a:active,
a:visited {
  color: black;
}

a,
a:visited {
  text-decoration: none;
}

a:hover,
a:active {
  text-decoration: underline;
}

ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.content {
  flex: 1;
  display: flex;
  flex-direction: row;
  height: 100%;
  width: 100vw;
}

@media screen and (max-width: 1600px) {
  .layout {
    font-size: 0.9em;
  }
}

/* Typography */

h1,
h2 {
  line-height: var(--line-height-header);
  font-size: 1.5em;
  letter-spacing: 0.2em;
}

h1 {
  font-weight: 300;
  margin: 0;
  flex: 0;
}

h1 a:hover,
h1 a:active {
  font-style: italic;
  text-decoration: none;
}

h2 {
  margin: 0;
}

header h1,
h2 {
  margin-bottom: 10vh;
}

h3 {
  font-size: 1em;
}

/* Header */
header {
  display: flex;
  flex: 0 0 280px;
  flex-direction: column;
  justify-content: space-between;
  padding: 50px 0 50px 50px;
}

header > * {
  flex: 0;
}

nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  line-height: var(--line-height-nav);
}

nav a:hover,
nav a:active {
  text-decoration: line-through;
}

nav li {
  margin: 0;
}

.nav-section {
  flex: 0;
}

.category {
  font-weight: bold;
}

.crossed {
  text-decoration: line-through;
}

.active {
  font-style: italic;
}

/* Reponsive */
.section-image h2 {
  display: none;
}

.section-text h2 {
  display: block;
}

.layout {
  display: flex;
  flex-direction: row;
  height: 100vh;
  width: 100vw;
}

/* Main Content */
main {
  flex: 3;
  overflow: auto;
}

section {
  min-height: 100vh;
}

section li {
  margin-bottom: 20px;
}

.section-content {
  display: flex;
  justify-content: space-between;
  gap: 50px;
}

.section-text {
  flex: 0 1 20vw;
  max-width: 600px;
  line-height: var(--line-height-text);
}

.section-image {
  flex: 3;
  width: 100%;
  max-width: 1400px;
}

.section-image img {
  width: 100%;
}

#cover img {
  flex: 1;
  height: 100%;
  width: 100%;
  object-fit: cover;
}

#cover {
  height: 100vh;
  display: flex;
  justify-content: flex-end;
}

#cover,
.section-content {
  padding: 50px 50px 50px 25px;
}

.details li {
  padding: 5px 0;
}

.caption {
  font-size: 0.8em;
  font-style: italic;
}

.contacts {
  flex: 0;
  display: flex;
  flex-direction: column;
  line-height: var(--line-height-text);
}

.contacts > * {
  flex: 0;
}

.nav-address {
  margin: 20px 0;
  transition: opacity 0.2s ease-out;
  opacity: 1;
}

.email {
  margin-top: 20px;
}

.overlay {
  background: #fff;
  transition: opacity 0.2s ease-out;
  opacity: 0;
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100vw;
}

.hidden {
  opacity: 0;
}

/* Mid-Size view */

@media screen and (max-width: 1460px) {
  .section-content {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .section-image h2 {
    display: block;
  }

  .section-text h2 {
    display: none;
  }

  .section-image,
  .section-text,
  #cover img {
    max-width: 800px;
  }

  header h1,
  h2 {
    margin-bottom: 50px;
  }
}

/* Mobile view */
.title-bar {
  display: none;
}

.mobile-contacts {
  display: none;
}

@media screen and (max-width: 768px) {
  .mobile-contacts {
    flex: 0;
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 20px;
  }

  .mobile-contacts div {
    flex: 0;
  }

  #cover {
    padding: 0 0 64px 0;
    display: flex;
    flex-direction: column;
  }

  .section-content {
    padding: 50px 20px;
  }

  header {
    background: #fff;
    position: fixed;
    display: none;
    padding: 20px;
    top: 0;
    left: 0;
    width: 60vw;
    min-width: 300px;
    height: 100vh;
    overflow-x: hidden;
    z-index: 30;
  }

  .contacts {
    flex: 1;
    justify-content: flex-end;
  }

  .nav-address {
    display: none;
  }

  .open {
    display: flex;
  }

  .visible {
    opacity: 0.5;
    display: block;
  }

  .arrow {
    background: #fff;
    border: solid #000;
    border-width: 0 1px 1px 0;
    display: inline-block;
    padding: 15px;
    cursor: pointer;
  }

  .arrow:hover {
    background: #ccc;
  }

  #open {
    position: absolute;
    top: 50vh;
    left: -22px;
    transform: rotate(-45deg);
    -webkit-transform: rotate(-45deg);
    z-index: 20;
  }

  #close {
    position: absolute;
    top: 50vh;
    right: -22px;
    transform: rotate(135deg);
    -webkit-transform: rotate(135deg);
    z-index: 40;
  }

  .content {
    margin-top: 64px;
  }

  h2 {
    margin-top: 20px;
  }

  .title-bar {
    background: #fff;
    display: block;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    padding: 20px;
    display: flex;
    align-items: center;
  }

  .title-bar h1 {
    flex: 1;
  }

  .layout {
    flex-direction: column;
  }

  .flickity-page-dots .dot {
    width: 5px !important;
    height: 5px !important;
  }
}
