@import url('https://fonts.googleapis.com/css2?family=Fredericka+the+Great&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Hanalei&family=Hanalei+Fill&display=swap');

/* Alles zurücksetzen */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  background-color: #FFD12C; /* Beer color */
  font-family: "Fredericka the Great", serif;
  position: relative;
}

/* Liquid background animation for bubbles */
#liquid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0; /* Place the liquid container behind content */
}

#liquid .bubble {
  position: absolute;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  opacity: 0.7;
  aspect-ratio: 1 / 1;      /* Always a perfect circle */
  width: 3vw;               /* Default width, overridden by JS */
  min-width: 20px;          /* Prevents too small bubbles */
  min-height: 20px;
  max-width: 60px;          /* Prevents too large bubbles */
  max-height: 60px;
  height: auto;             /* Height is set by aspect-ratio */
  animation-name: bubble;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
  pointer-events: none;
}

/* Bubble rise animation */
@keyframes bubble {
  0% {
    bottom: 0;
    transform: scale(1);
    opacity: 0.7;
  }

  50% {
    opacity: 1;
  }

  100% {
    bottom: 100%;
    transform: scale(1.2);
    opacity: 0;
  }
}

/* Header ganz oben zentriert */
header {
  width: 100%;
  text-align: center;
  position: relative; /* Add relative positioning */
  z-index: 2; /* Set a higher z-index for the header */
  display: inline-block;

}

h1 {
  font-family: "Oi", serif;
  font-size: clamp(1.5*3em, 5.5*3vw, 6.25*3rem);
  margin-top: 20px;
  text-align: center;
  line-height: 1;
  pointer-events: none;
  position: relative; /* Ensure it stays on top of the Schaum image */
  z-index: 3; /* This will ensure h1 stays in front of Schaum */
}

/* Position the schaum image behind the header */
#schaum {
  position: absolute; /* Position the image absolutely within the header */
  top: 50%; /* Vertically center the image */
  left: 50%; /* Horizontally center the image */
  transform: translate(-50%, -50%); /* Offset the image by 50% of its width and height */
  width: 100%;
  height: auto;
  max-width: 1816px;
  z-index: 1; /* Set a lower z-index to place the image behind the header */
}

/* Main-Content darunter */
main {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 20px;
}

#getBreweryBtn {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  justify-content: center;
  align-items: center;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 1;
  margin-top: 10%;
  margin-bottom: 10%;
}

#getBreweryBtn img {
  width: clamp(1.5*5rem, 5.5*5vw, 6.25*5rem);
  height: auto;       
  border: none;
  z-index: 1;
  transition: 
    opacity 0.2s,
    transform 0.5s cubic-bezier(.68,-0.55,.27,1.55); /* bounce effect */
}

#getBreweryBtn:hover img {
  content: url('Bilder/Bierdeckel_ausgewaehlt.png');
  transform: scale(1.15) rotate(-8deg);
}

.flasche_map_wrapper {
  position: relative;
  width: 100%;
  max-width: 1816px;
  margin: 0 auto;
}

#flasche {
  width: 100%;
  height: auto;
  display: block;
  position: relative;
  z-index: 2;
}

#map {
  position: absolute;
  top: 50%; /* half-way beneath the top of the image */
  left: 0;
  width: 100%;
  height: 137%; /* you can adjust this for how much map is shown */
  z-index: 1;
}


.flasche_bg {
  position: relative;
  display: inline-block;
  text-align: center;
  z-index: 1;
}

#noResultText {
  position: absolute;
  top: 50%; /* adjust as needed to center vertically in label */
  left: 70%; /* adjust to move into the brown label */
  transform: translate(-50%, -50%); /* center the text around the point */
  font-family: "Hanalei Fill", sans-serif;
  font-size: clamp(1rem, 2.5vw, 2rem);
  color: black;
  padding: 1rem;
  text-align: left;
  max-width: 40%;
  z-index: 3; /* ensure it's above the bottle */
  pointer-events: none;
}

.fredericka-the-great-regular {
  font-family: "Fredericka the Great", serif;
  font-weight: 400;
  font-style: normal;
}

h1,
#noResultText,
button,
input,
select,
textarea,
header,
main,
.flasche_bg,
#getBreweryBtn,
#getBreweryBtn img,
#flasche,
#map {
  font-family: "Fredericka the Great", serif !important;
  font-weight: 400;
  font-style: normal;
}






@media only screen and (max-width: 1024px) {
  #noResultText {
    font-size: clamp(0.67rem, 1.67vw, 1.3rem);
  }
  #map {
    height: 50vh;
  }
  #getBreweryBtn {
    margin-top: 45%;
    margin-bottom: 30%;
  }
  #getBreweryBtn img {
    transform: scale(2);
  }
  #getBreweryBtn:hover img {
    transform: scale(2.3) rotate(-8deg);
  }
  #liquid .bubble {
    width: 5vw !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 50% !important;
    min-width: 12px !important;
    min-height: 12px !important;
    max-width: 32px !important;
    max-height: 32px !important;
    height: auto !important;
  }
}

@media only screen and (max-width: 605px) {
  #noResultText {
    font-size: clamp(0.67rem, 1.67vw, 1.3rem);
  }
  #map {
    height: 380%;
  }
  #getBreweryBtn {
    margin-top: 45%;
    margin-bottom: 30%;
  }
  #getBreweryBtn img {
    transform: scale(2);
  }
  #getBreweryBtn:hover img {
    transform: scale(2.3) rotate(-8deg);
  }
  #liquid .bubble {
    width: 8vw !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 50% !important;
    min-width: 8px !important;
    min-height: 8px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    height: auto !important;
  }
}

