/* Global Styles */
body {
  background: url('/images/rbg.jpg') no-repeat center center fixed;
  background-size: cover;
  background-attachment: fixed;
  background-position: center top;
  color: #FFFFFF;
  text-align: center;
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding: 0;
}

.header {
  background: rgba(0, 0, 0, 0.8);
  padding: 20px;
  text-align: center;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
  border-bottom: 2px solid #ffffff33;
}

.header h1 {
  margin: 0;
  font-size: 32px;
  font-weight: bold;
  letter-spacing: 1px;
}

.image-container {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.info-text {
  max-width: 80%;
  margin: 20px auto;
  font-size: 18px;
  line-height: 1.6;
  color: #FFFFFF;
  text-align: left;
  background-color: rgba(0, 0, 0, 0.7);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0px 4px 15px rgba(255, 255, 255, 0.1);
}

figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 50px;
  position: relative;
}

img {
  transition: transform 0.3s ease, margin-bottom 0.3s ease;
  cursor: pointer;
  border-radius: 10px;
  box-shadow: 0px 4px 15px rgba(255, 255, 255, 0.15);
  position: relative;
}

figure:hover img {
  transform: scale(1.2);
}

figcaption {
  margin-top: 15px;
  font-size: 16px;
  color: #FFFFFF;
  background: rgba(0, 0, 0, 0.6);
  padding: 5px 15px;
  border-radius: 8px;
  display: inline-block;
  text-align: center;
  transition: transform 0.3s ease;
}

figure:hover figcaption {
  transform: translateY(50px);
  padding-top: 10px;
}

.fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
}

.fullscreen img {
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  object-fit: contain;
}

.stacked-images {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 20px;
}

.horizontal-images {
  display: flex;
  justify-content: center;
  gap: 25px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.horizontal-images figure {
  max-width: 30%;
}

.horizontal-images img {
  width: 100%;
  max-width: 450px;
}

/* Mobile-Specific Media Queries */

/* Mobile Landscape */
@media (max-width: 1024px) and (orientation: landscape) {
  body {
    background-attachment: scroll !important;
    background-size: cover !important;
    background-position: center center;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
  }
  
  .image-container {
    width: 100vw;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  .image-container figure,
  .image-container img {
    width: 75% !important;
    max-width: 75% !important;
    margin: 0 auto;
    box-sizing: border-box;
  }
  
  .stacked-images {
    width: 100vw;
    margin: 0;
    padding: 0 10px;
    box-sizing: border-box;
  }
  .stacked-images figure,
  .stacked-images img {
    width: 75% !important;
    max-width: 75% !important;
    margin: 0 auto;
    box-sizing: border-box;
  }
  
  .info-text {
    width: 75%;
    max-width: 75%;
    margin: 20px auto;
  }
  
  .horizontal-images {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 2px;
    overflow-x: auto;
    padding: 2px;
    white-space: nowrap;
    width: 100vw;
    box-sizing: border-box;
  }
  .horizontal-images figure {
    flex: 0 0 auto;
    width: auto !important;
    max-width: 30% !important;
    margin: 0;
    box-sizing: border-box;
  }
  .horizontal-images img {
    width: 100%;
    max-width: 120px;
    height: auto;
  }
}

/* Mobile Portrait */
@media (max-width: 768px) {
  body {
    background-attachment: scroll;
  }

  .header {
    padding: 15px;
  }

  .header h1 {
    font-size: 24px;
  }

  .info-text {
    max-width: 95%;
    font-size: 16px;
    padding: 15px;
  }

  img {
    max-width: 100%;
    height: auto;
  }

  figure:hover img,
  figure:hover figcaption {
    transform: none;
    padding-top: 0;
  }

  .stacked-images figure {
    margin-bottom: 30px;
  }

  .horizontal-images {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 20px;
    overflow-x: auto;
    padding: 10px;
    white-space: nowrap;
    scroll-snap-type: x mandatory;
  }

  .horizontal-images figure {
    flex: 0 0 auto;
    width: 30%;
    min-width: 150px;
    text-align: center;
    scroll-snap-align: center;
  }

  .horizontal-images img {
    width: 100%;
    max-width: 180px;
  }

  .fullscreen img {
    touch-action: none;
    cursor: grab;
    max-width: none;
    transform-origin: center;
  }

  .fullscreen {
    overflow: hidden;
  }
}

#visitor-counter {
  position: fixed;
  bottom: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 14px;
  z-index: 1000;
}