/* ---------------------------------------
   Base Setup
---------------------------------------- */
body {
  margin: 0;
  padding: 0;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
}

::selection {
  background-color: #de9bff;
  color: white;
}

::-moz-selection {
  background-color: #de9bff;
  color: white;
}

/* ex-H1 */
.visually-hidden {
  border: 0 !important;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px !important;
  margin: -1px !important;
  overflow: hidden !important;
  padding: 0 !important;
  position: absolute !important;
  width: 1px !important;
  white-space: nowrap !important;
}


/* ---------------------------------------
 Flex Container Layout
---------------------------------------- */
.flex-container {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  overflow-y: auto;
  z-index: 0;
}

.flex-container figure {
  position: relative;
  margin: 0;
}

/* Center image-half figures */
.flex-container > figure.image-half {
  margin-left: auto;
  margin-right: auto;
}

/* Base image rule */
.flex-container img {
  flex: 0 0 auto;
  width: 100%;
  height: auto;
  display: block;
}

/* Override: exclude image-half so it can be styled separately */
.flex-container > figure:not(.image-half) > img {
  flex: 0 0 auto;
  width: 100%;
  height: auto;
  display: block;
}


/* ---------------------------------------
 Image Wrapper with Blur-up
---------------------------------------- */
.image-wrapper {
  position: relative;
  width: 100%;
  max-width: 100%;
  padding-top: 66.65%;
  overflow: hidden;
  display: block;
}

.image-wrapper .blur-up,
.image-wrapper .full-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.1s ease;
  display: block;
}

.image-wrapper .blur-up {
  filter: blur(1px);
  opacity: 1;
  pointer-events: none;
}

.image-wrapper .full-image {
  opacity: 0;
}

.image-wrapper.loaded .full-image {
  opacity: 1;
}

.image-wrapper.loaded .blur-up {
  opacity: 0;
}

.blur-up {
  pointer-events: none;
}


/* ---------------------------------------
 Figcaption Styles
---------------------------------------- */
figcaption {
  position: absolute;
  bottom: 10px;
  right: 10px;
  padding: 4px 8px;
  font-size: 0.9em;
  z-index: 1;
  display: none;
}

figcaption:not(:empty) {
  display: block;
}

figcaption.bright {
  color: white;
  background-color: rgba(0, 0, 0, 0.4);
}

figcaption.dark {
  color: black;
  background-color: rgba(255, 255, 255, 0.4);
}


/* ---------------------------------------
 Text Sections (Reference + Impressum)
---------------------------------------- */
.text-section {
  background: white;
  color: black;
  padding: 40px 20px;
  max-width: 600px;
  margin: 0 auto;
  box-sizing: border-box;
}

.text-section h2 {
  font-weight: bold;
  font-size: 1em;
  margin-bottom: 1em;
}

.text-section ul {
  list-style: none;
  padding-left: 0;
  margin-left: 0;
}

.text-section ul li {
  margin-bottom: 0.5em;
}

.text-section p {
  margin-bottom: 0.5em;
}


/* ---------------------------------------
 Links
---------------------------------------- */
/* Arrows */
.link-with-arrow {
  color: inherit;
  text-decoration: none;
}

.link-with-arrow::after {
  content: '\200B➔';
  color: #54ff00;
  padding-left: 0.3em;
  font-size: 1.1em;
  line-height: 1;
}

.link-with-arrow:hover,
.link-with-arrow:focus,
.link-with-arrow:hover::after,
.link-with-arrow:focus::after {
  color: #54ff00;
  cursor: pointer;
}

/* Mailto */
.mailto-link {
  color: inherit;
  text-decoration: none;
}

.mailto-link:hover,
.mailto-link:focus {
  color: #54ff00;
  cursor: pointer;
}


/* ---------------------------------------
 Fixed Elements
---------------------------------------- */
.fixed-element {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 10;
}

.fixed-element img {
  width: 200px;
}


/* ---------------------------------------
 Responsive
---------------------------------------- */

/* tabli deskt: half width and centered */
@media (min-width: 769px) {
  /* New for image-half */
  .image-half {
      width: 50%;
      margin: 0 auto;
      text-align: center;
  }

  .image-half img {
      width: 100%;
      height: auto;
      display: block;
      box-sizing: border-box;
  }
}

/* neuertel */
@media (max-width: 768px) {
  .fixed-element img {
      width: 100px;
  }
}
