:root {
  --font-family-base: "microsoft-sans-serif", Arial, Helvetica, sans-serif;
  --font-weight-normal: 400;
  --font-style-normal: normal;
  --font-size-base: clamp(0.9rem, 0.7857rem + 0.1786vw, 1rem);
  --font-size-h1: clamp(0.9rem, 0.7857rem + 0.1786vw, 1rem);
  --font-size-h2: clamp(1.4rem, 1.2667rem + 0.2778vw, 1.6rem);
  --color-green: #009241;
  --color-white: #ffffff;
  --color-overlay-bg: rgba(0, 0, 0, 0.5);
}

html,
body {
  width: 100%;
  height: 100dvh; 
  min-height: -webkit-fill-available;
  font-family: var(--font-family-base);
  font-weight: var(--font-weight-normal);
  font-style: var(--font-style-normal);
  font-size: var(--font-size-base);
  letter-spacing: 0.1rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body.template-exhibition {
  background-color: var(--color-white);
}

body.template-newsletter {
  background-color: rgba(255, 255, 255, 0);
}

body.template-home,
body.template-default {
  background-color: var(--color-green);
}

body.template-exhibition p,
body.template-imprint p,
body.template-exhibition a,
body.template-imprint a,
body.template-exhibition h1,
body.template-imprint h1,
body.template-exhibition h3 {
  color: var(--color-green);
}

body.template-home p,
body.template-home a,
body.template-home h1,
body.template-home h2 {
  color: var(--color-white);
}

.newsletter-info-container p,
.newsletter-info-container a,
.newsletter-info-container h1,
.newsletter-info-container h2 {
  color: var(--color-green) !important;
}

form {
  margin: 0;
  padding: 0;
}

ul {
  list-style: none;
  margin: 0;
  padding: 16px 16px 0;
  width: fit-content;
}

li {
  margin-bottom: 8px;
}

a {
  text-decoration: underline;
  cursor: pointer;
}

.info-text a,
.open-imprint,
.open-imprint a {
  text-decoration: none;
}

p {
  margin: 0;
}

h1 {
  font-size: var(--font-size-h1);
  margin: 0;
  font-weight: normal;
}

h2 {
  font-size: var(--font-size-h2);
  margin: 0;
  font-weight: normal;
}


h3 {
  font-size: var(--font-size-base);
  margin: 0;
  font-weight: normal;
  text-align: center;
}

.home-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.exhibitions-container {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  margin: 16px;
  max-width: 100%;
  background: var(--color-green);
  z-index: 999;
}

.info-text {
  width: fit-content;
  max-width: 85ch;
  margin-bottom: 8px;
}

.stempel-wrap {
  display: inline-flex;
  flex: 0 0 auto;
  width: var(--stempel-w);
  height: var(--stempel-h);
  overflow: hidden;
  align-items: center;
  justify-content: center;
  contain: paint;
}

.stempel {
  transform-origin: center;
  will-change: transform, opacity;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform: rotateZ(351deg) translate3d(0, -16px, 0);
  transform: rotateZ(351deg) translate3d(0, -16px, 0);
  margin: 32px 0 24px 4px;
}

.stempel.first-load {
  animation: stempelAnimation 0.8s ease-out forwards;
}

@keyframes stempelAnimation {
  0% {
    -webkit-transform: rotateZ(372deg) translate3d(0, 0, 0) scale(5);
    transform: rotateZ(372deg) translate3d(0, 0, 0) scale(5);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    -webkit-transform: rotateZ(351deg) translate3d(0, -16px, 0) scale(1);
    transform: rotateZ(351deg) translate3d(0, -16px, 0) scale(1);
    opacity: 1;
  }
}

@keyframes newsletterAnimation {
  0% {
    transform: rotateZ(-7deg) scale(5);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: rotateZ(12deg) translateY(-16px) scale(1);
    opacity: 1;
  }
}

/* Newsletter Signup Form */
.newsletter {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.email-signup,
.join-newsletter {
  padding: 4px;
  border-radius: 4px;
  border: none;
  font-family: var(--font-family-base);
  font-weight: var(--font-weight-normal);
  font-style: var(--font-style-normal);
  font-size: var(--font-size-base);
  letter-spacing: 0.1rem;
}

.email-signup {
  background-color: var(--color-white);
  max-width: 300px;
}

input[name="EMAIL"] {
  color: var(--color-green) !important;
}

input[name="EMAIL"]::placeholder {
  color: var(--color-green);
}

.join-newsletter {
  border: 1px solid var(--color-white);
  color: var(--color-white);
  background-color: var(--color-green);
  width: fit-content;
  cursor: pointer;
}

.join-newsletter:hover {
  border: 1px solid var(--color-white);
  color: var(--color-green);
  background-color: var(--color-white);
  width: fit-content;
}

.open-imprint {
  margin-top: 16px;
}

/* Exhibition Page */
.back-to-home a {
  position: fixed;
  top: 0;
  right: 0;
  margin: 16px;
}

.exhibition-content {
  width: 100%;
  display: flex;
  flex-direction: row-reverse;
  gap: 32px;
  height: 100%;
  overflow: hidden;
  padding: 0 16px;
}

.exhibition-info {
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: 50%;
  overflow-y: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.exhibition-info-wrapper {
  margin: 16px 16px 16px 0px;
}

.exhibition-basic-info {
  margin-right: 64px;
}

.exhibition-text {
  max-width: 85ch;
  margin: 32px 0;
}


.exhibition-text-full {
    display: block;
}

.exhibition-text-mobile {
    display: none;
}


.exhibition-images {
  width: 50%;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  overflow-y: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.exhibition-images img:first-child {
  margin-top: 16px;
}

.exhibition-navigation {
  width: 100%;
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
}

/* newsletter info */
.newsletter-info-container {
  margin: 48px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.overlay {
  position: fixed;
  padding: 16px;
  top: 0;
  left: 0;
  width: 100%;
  height: 100dvh;
  height: 100vh;
  background: var(--color-overlay-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.overlay.hidden {
  display: none;
}

.overlay-content {
  margin: 32px;
  padding: 48px;
  background: var(--color-white);
  border-radius: 16px;
  max-width: 445px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  position: relative;
  animation: newsletterAnimation 0.6s ease-out forwards;
  transform-origin: center;
}

.overlay-content h2 {
  color: var(--color-green) !important;
}

.overlay-content p {
  color: var(--color-green) !important;
  margin: 24px 0;
}

.overlay-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  color: var(--color-green);
  cursor: pointer;
}

/* Imprint and DSGVO */
.imprint-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 64px;
  width: 50%;
}

.imprint-section,
.dsgvo-section {
  max-width: 85ch;
}

/* Responsive Design */
@media screen and (max-width: 768px) {

  .stempel {
  margin: 24px 0 16px 4px;
}


  .exhibition-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: auto;
    overflow: auto;
    padding: 0 16px;
  }

  .exhibition-info {
    width: 100%;
  }


  .exhibition-info-wrapper {
    margin: 48px 0 0 0;
  }

.exhibition-basic-info {
  margin-right: 0;
}

  .exhibition-text-full {
        display: none;
    }
    
    .exhibition-text-mobile {
        display: block;
    }
    
    .exhibition-toggle-btn {
        margin-top: 16px;
        cursor: pointer;
        color: var(--color-green);
        text-decoration: underline;
    }

  .exhibition-images {
    width: 100%;
  }

  .exhibition-images img:first-child {
    margin-top: 0;
  }

  .imprint-content {
    width: 100%;
    padding: 48px 16px 16px;
  }
}
