/* ======= BASIS ======= */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;               
  overscroll-behavior: none;    
  -webkit-overflow-scrolling: touch;
}

body {
  background: url("img/Hintergrund_Holz - Findyourbrewery.jpeg.jpg");
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
  font-family: Arial, sans-serif;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
}

h1 {
  color: #FFF;
  font-family: "FONTSPRING DEMO - Wausau";
  font-size: clamp(36px, 8vw, 96px);
  font-weight: 400;
  text-align: center;
  margin: 5vh 0 5vh;
}





/* ======= TAP / ZAPFHAHN ======= */
.tap {
  width: 200px;
  height: 558.5px;
  background: linear-gradient(270deg, #3C3C3C -21.25%, #BCBCBC 50.99%, #3C3C3C 118.75%);
  border-radius: 10px;
  position: relative;
  z-index: 20;
  margin: 0 auto 0 auto;
}

.tap-base {
  width: 200px;
  height: 74px;
  background-color: #5A5A5A;
  border-radius: 50%;
  position: absolute;
  bottom: -30px;
  left: 0;
  right: 0;
  margin: auto;
  z-index: 1;
}

.tap-handle {
  position: absolute;
  top: -70px;
  left: 38%;
  width: 48px;
  height: 121px;
  cursor: pointer;
  transition: transform 0.3s ease;
  z-index: 10;
}

.tap-label {
  position: absolute;
  writing-mode: vertical-rl;  
  transform: rotate(180deg);    
  color: white;
  font-size: 20px;
  font-weight: bold;
  text-align: center;
  pointer-events: none;
  line-height: 1;
  top: 5px;                     
  left: 55%;
  transform-origin: top center;
  translate: -50% 0;
  margin-top: 60px;
}

.tap-circle, .tap-spout, .tap-opening, .tap-hole,
.tap-top-spout, .tap-center-button, .tap-center-inner,
.tap-connector-gold, .tap-connector-gold-bottom {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.tap-circle { top: 70px; width: 83px; height: 83px; z-index: 2; }
.tap-spout { top: 110px; width: 42px; height: 62px; z-index: 3; }
.tap-opening { top: 54px; width: 30px; height: 17px; z-index: 2; }
.tap-hole { top: 53px; width: 20px; height: 11px; z-index: 3; }
.tap-top-spout { top: 75px; width: 39px; height: 26px; z-index: 3; }
.tap-center-button { top: 90px; width: 42px; height: 42px; z-index: 4; }
.tap-center-inner { top: 9px; width: 24px; height: 24px; z-index: 5; }
.tap-connector-gold { top: -40px; width: 29px; height: 18px; z-index: 6; }
.tap-connector-gold-bottom { top: 10px; width: 39px; height: 20px; z-index: 6; }





/* ======= BEER ======= */
.beer-glass {
  position: absolute;
  top: 515px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 180px;
  z-index: 30;
  pointer-events: none;
}

.glass {
  width: 100%;
  height: 100%;
  border: 4px solid white;
  border-radius: 0 0 20px 20px;
  background-color: transparent;
  overflow: hidden;
  position: relative;
}

.beer-fill {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 0;
  background-color: #E8B504;
  transition: height 0.3s ease-out;
  z-index: 31;
}

@keyframes fillBeer {
  from { height: 0; }
  to { height: 100%; }
}

.beer-flow {
  position: absolute;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 0;
  background-color: #E8B504;
  border-radius: 4px;
  z-index: 29;
  transition: height 1s ease-in;
}




/* ======= DROPDOWN & INTERFACE ======= */
.interface-group {
  position: relative;
  top: -65px;
  transform: scale(0.8);
  transform-origin: top center;
  z-index: 10;
  margin-top: 60px;
}

#brewery-type-dropdown,
#city-dropdown {
  background-color: #2C5F00;
  color: white;
  border: 2px solid white;
  padding: 12px 40px 12px 16px;
  font-size: 18px;
  border-radius: 6px;
  width: 200px;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='14' viewBox='0 0 20 20' width='16' xmlns='http://www.w3.org/2000/svg'><polygon points='0,0 20,0 10,10'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 10px;
  z-index: 2;
  position: relative;
  margin-bottom: 15px;
}

.dropdown-wrapper {
  display: flex;
  justify-content: center;
  gap: 100px;
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
  z-index: 5;
}

.dropdown-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
}

.connection-svg {
  margin-top: -10px;
  margin-block: -20px;
  z-index: 1;
  position: relative;
}

.dropdown-column:first-child .connection-svg {
  transform: translateX(30px);
}

.dropdown-column:last-child .connection-svg {
  transform: translateX(-30px);
}




/* ======= OVERLAY ======= */
#container {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #c6ab2d;
  border: 9px solid white;
  border-radius: 10px;
  width: 90vw;
  max-width: 1000px;
  max-height: 90vh;             
  overflow-y: auto;               
  overflow-x: hidden;
  padding: 40px;
  padding-left: 100px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  box-sizing: border-box;
}

.overlay-title {
  font-size: clamp(36px, 6vw, 72px);
  font-family: 'Montserrat', sans-serif;
  text-transform: uppercase;
  font-weight: 700;
  color: #042900;
  margin-bottom: 30px;
  letter-spacing: 1px;
  line-height: 1.2;
  animation: zoomPulse 2s ease-in-out infinite;
  transform-origin: center center;
  display: inline-block;
  text-align: left;
}

@keyframes zoomPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}

.info-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 40px;
}

.label {
  font-weight: bold;
  color: white;
  font-size: 20px;
  min-width: 120px;
  flex-shrink: 0;
  text-align: left;
}

.value {
  color: white;
  font-size: 20px;
  max-width: 700px;
}

.value a {
  color: white;
  text-decoration: underline;
}

.brewery-name {
  font-size: clamp(26px, 6vw, 44px);
  color: white;
  margin: 0 0 20px;
  text-align: left;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700; 
  line-height: 1.2;
  position: relative;
}

#close-overlay {
  position: absolute;
  top: 15px;
  right: 20px;
  background: transparent;
  color: white;
  font-size: 24px;
  border: none;
  cursor: pointer;
}




/* ======= BAR ======= */
.bar-container {
  position: relative;
  margin-top: 0;
  padding-top: 40px;
  width: 100%;
  max-width: 1400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
  top: -290px;
}

.bar-top {
  width: 100%;
  height: 100px;
  background-color: #a07e4a;
  border-radius: 78.5px;
  z-index: 2;
  position: relative;
}

.bar-front {
  width: 90%;
  height: 200px;
  background-color: #8b683a;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  z-index: 1;
  position: relative;
}

.bar-front .panel {
  width: 300px;
  height: 160px;
  background-color: #704d26;
  border-radius: 8px;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.3);
}





/* ======= Responsive Design ======= */
/*1100px*/
@media (max-width: 1100px) {
  .bar-container {
    width: 96vw;
    max-width: 96vw;
    margin: 0 auto;
    padding-top: 24px;
    top: -80px;
  }

  .bar-top {
    margin-top: -200px;
  }
  
  .bar-front .panel {
    flex: 1 1 40%;
    min-width: 160px;
    height: 150px;
    width: 80px;
    margin-left: 30px;
    margin-right: 30px;
  }
  
  #brewery-type-dropdown,
  #city-dropdown {
    min-width: 120px;
    max-width: 260px;
    font-size: 16px;
  }
  
  #container {
    width: 92vw;
    max-width: none;
    padding: 24px 16px;
    font-size: 16px;
    border-width: 6px;
    box-sizing: border-box;
  }

  .overlay-title {
    font-size: clamp(20px, 8vw, 36px);
    margin-bottom: 24px;
    word-break: break-word;
  }

  .info-row {
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
  }

  .label,
  .value {
    font-size: 16px;
    text-align: left;
  }

  #close-overlay {
    font-size: 22px;
    top: 10px;
    right: 12px;
  }
}

/*750px*/
@media (max-width: 750px) {
  html, body {
    overflow-x: hidden;
    height: auto;
    min-height: 100%;
  }

  main {
    padding: 0 2vw;
  }

  h1 {
    font-size: clamp(20px, 7vw, 32px);
    margin: 2vh 0 2vh;
  }

    .dropdown-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 6px;
}

 .connection-svg {
    display: none;
  }

.dropdown-column {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

#brewery-type-dropdown,
#city-dropdown {
  width: 60vw;
  max-width: 320px;
  min-width: 200px;
  padding: 12px 36px 12px 16px;
  background-position: right 12px center;
  background-size: 10px;
  display: block;
}

  .interface-group {
    transform: none;
    top: 0;
    margin-top: 10px;
    width: 100vw;
    max-width: 100vw;
    padding: 0;
  }

  .zapfbereich {
      display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  margin: 0 auto -20px auto;
  padding-bottom: 0;
  position: relative;
  z-index: 10;
  transform: scale(0.6);
  transform-origin: bottom center;  
  }

  .tap {
  width: 150px;
  height: 400px;
  max-width: 80vw;
  min-width: 60px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
  transform: none;
  }
  
  .tap-base {
    width: 150px;
    height: 30px;
    bottom: -10px;
  }

  .tap-handle {
  left: 50%;
  transform: translateX(-50%);
  } 

  .beer-glass {
  position: absolute;
  margin-top: -225px;       
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 100px;
  z-index: 15;
  }

  .bar-container {
  margin-top: 280px;            
  padding-top: 0;
  position: relative;
  z-index: 5;
  }

  .bar-top {
    height: 50px;
    border-radius: 30px;
  }

  .bar-front {
    flex-direction: row;
    flex-wrap: nowrap;
    width: 86vw;
    gap: 10px;
    align-items: center;
    justify-content: space-evenly;
    height: 100px;
    padding-bottom: 6px;
    margin: 0 auto;
    margin-top: -5px;
  }

  .bar-front .panel {
  width: 30vw;
  min-width: 90px;
  max-width: 130px;
  height: 80px;
  margin: 0 6px;
  justify-content: space-evenly;
  }

   #container {
    width: 92vw;
    max-height: 80vh;
    overflow-y: auto; 
    overflow-x: hidden;
    padding: 24px 16px;
    font-size: 16px;
    border-width: 6px;
    box-sizing: border-box;
    max-height: 80vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 40px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    box-sizing: border-box;
  }

  .overlay-title {
    font-size: clamp(20px, 8vw, 36px);
    margin-bottom: 24px;
    word-break: break-word;
  }

  .info-row {
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
  }

  .label,
  .value {
    font-size: 16px;
    text-align: left;
  }

  #close-overlay {
    font-size: 22px;
    top: 10px;
    right: 12px;
  }
}

/*400px*/
@media (max-width: 400px) {
  .bar-front {
    justify-content: space-evenly;
    gap: 6px;
    padding: 0 4px;
  }

  .bar-front .panel {
    width: 26vw;
    min-width: 60px;
    max-width: 90px;
    height: 60px;
    margin: 0;
  }
}


/*300px*/
@media (max-width: 300px) {
  .bar-front .panel {
    width: 26vw;
    min-width: unset;
    max-width: 90px;
    height: 60px;
    margin: 0 4px;
  }

  .bar-front {
    gap: 4px;
    justify-content: space-evenly;
    flex-wrap: nowrap; 
  }

}
@media (max-width: 1570px) {
  html, body {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
  }
}
