/* Awards Gallery Section - Mobile Layout for All Devices */

.awards-gallery {
  padding: 40px 0;
  background: #f9f9f9;
  max-width: 428px; /* Mobile container width */
  margin: 0 auto; /* Center the section */
}

.awards-gallery .container {
  max-width: 428px;
  margin: 0 auto;
  padding: 0;
}

.awards-gallery .head h2 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 24px;
  color: #333;
}

/* Gallery Grid - Always Mobile Layout */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr) !important; /* Force 2 columns always */
  gap: 10px !important;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 10px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.gallery-item img {
  width: 100%;
  height: 180px !important; /* Mobile height always */
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* Modal Lightbox - Mobile Optimized */
.modal-lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.95);
  animation: fadeIn 0.3s ease;
}

.modal-lightbox.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content-wrapper {
  position: relative;
  max-width: 95%;
  max-height: 90%;
  margin: auto;
}

.modal-content {
  width: auto;
  max-width: 95%;
  max-height: 70vh;
  display: block;
  margin: 0 auto;
  border-radius: 4px;
  animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Close Button */
.close-modal {
  position: absolute;
  top: 10px;
  right: 20px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10000;
  transition: color 0.3s ease;
}

.close-modal:hover,
.close-modal:focus {
  color: #bbb;
}

/* Navigation Arrows */
.prev-arrow,
.next-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 30px;
  font-weight: bold;
  cursor: pointer;
  padding: 10px;
  user-select: none;
  z-index: 10000;
  transition: background-color 0.3s ease;
  border-radius: 4px;
}

.prev-arrow { left: 10px; }
.next-arrow { right: 10px; }

.prev-arrow:hover,
.next-arrow:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

/* Image Counter */
.image-counter {
  text-align: center;
  color: #fff;
  font-size: 16px;
  padding: 10px 0;
  margin-top: 10px;
}

/* Extra small devices - Further optimization */
@media (max-width: 380px) {
  .gallery-item img {
    height: 150px !important;
  }
  
  .awards-gallery .head h2 {
    font-size: 20px;
  }
  
  .gallery-grid {
    gap: 8px !important;
    padding: 0 8px;
  }
}
