/* 1. Gallery Styling (Your existing rows) */
.gallery-container {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 10px;
    text-align:center;
    justify-content: center;
    text-align:center;
}

.gallery-item {
    height: 150px; /* Fixed height as requested */
    width: auto;   /* Width adjusts to maintain aspect ratio */
    cursor: pointer;
    transition: 0.2s;
}

.gallery-item:hover {
    opacity: 0.8;
}

/* 2. The Lightbox Background */
.lightbox {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top of everything */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; 
    object-fit: contain;
    background-color: rgba(0,0,0,0.9); /* Black background with opacity */
    
    /* This centers the image vertically and horizontally */
    align-items: center;
    justify-content: center;
}

/* 3. The Lightbox Image (Responsive Sizing Logic) */
.lightbox-content {
    margin: auto;
    display: block;
    
    /* CRITICAL: This ensures the image never exceeds the screen size */
    max-width: 95%; 
    max-height: 95%;
     
    /* This ensures the aspect ratio stays correct */
    width: auto;
    height: auto;
    
    /* Nice animation */
    animation-name: zoom;
    animation-duration: 0.3s;
}

/* Optional: Close Button */
.close-btn {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 5vh;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}
.header{
  display : none;
  width : 100%;
  font-size:xxx-large;
}
/* Simple Zoom Animation */
@keyframes zoom {
  from {transform:scale(0)} 
  to {transform:scale(1)}
}
.overlayText {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background-color: white;
  color: black;
  padding: 5px;
  font-size: 3vh;
  text-align: center;
 /* width: 75%;*/
  box-shadow: 0px 4px 8px rgba(0,0,0,0.3);
  border-radius: 5px;
  z-index: 100;
}
.loading-state {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
}
.loading {
  width: 100px;
  height: 100px;
  color: green;
  background-color: green;
  border-radius: 50%;
  border: 10px solid #ddd;
  border-top-color: green;
  animation: loading 2s linear infinite;
}
@keyframes loading {
  to {
    transform: rotate(360deg);
  }
}
.thumbnails{
  height: 15vh;
  width:auto;
}  
.htext{
  margin:auto;
  font-family: "Bh";
  font-size: 5vh;
  font-weight: bold;
}

.backim{
    height: 8vh; /* Fixed height as requested */
    width: auto;   /* Width adjusts to maintain aspect ratio */
}
@font-face {
  font-family:"Bh"; /* A name you choose for your font */
  src: url("../fonts/Bh.woff");
}