/* Gallery Page Styles */
.gallery-header {
  background: #00aaff;
  color: #fff;
  padding: 60px 20px 30px;
  text-align: center;
  margin-bottom: 30px;
  position: relative;
}

.gallery-header .home-btn {
  position: absolute;
  top: 20px;
  left: 20px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 10px 20px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.gallery-header .home-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.gallery-header h1 {
  font-size: 2.5rem;
  margin: 10px 0 5px;
}

.gallery-header p {
  font-size: 1.1rem;
  max-width: 800px;
  margin: 0 auto;
  opacity: 0.9;
}

/* Categories Section */
.categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto 50px;
}

.category-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  aspect-ratio: 4/3;
  cursor: pointer;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.category-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  padding: 20px;
  text-align: center;
  opacity: 1;
  transition: background 0.3s ease;
}

.category-card:hover .category-overlay {
  background: rgba(0, 0, 0, 0.7);
}

.category-overlay h2 {
  font-size: 2rem;
  margin: 0 0 15px;
  color: white;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.view-category-btn {
  background: #00aaff;
  color: white;
  border: none;
  padding: 10px 25px;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.view-category-btn:hover {
  background: #0088cc;
  transform: translateY(-2px);
}

/* Back button */
.back-btn {
  background: #f5f5f5;
  border: none;
  padding: 8px 20px;
  border-radius: 25px;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 auto 20px;
  transition: all 0.3s ease;
}

.back-btn:hover {
  background: #e0e0e0;
}

/* Hidden class */
.hidden {
  display: none !important;
}

/* Gallery section */
#gallery-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
  width: 100%;
  box-sizing: border-box;
}

/* Gallery Grid */
.gallery-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.gallery-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  aspect-ratio: 4/3;
  width: 100%;
  background: #f5f5f5;
  max-height: 300px;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.gallery-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-overlay {
  display: none;
}

.gallery-item:hover .gallery-overlay {
  display: none;
}

.gallery-overlay h3 {
  display: none;
}

.view-btn {
  display: none;
  transition: background 0.3s ease;
}

.view-btn:hover {
  background: #0088cc;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  overflow: auto;
}

.modal-content {
  display: block;
  margin: 50px auto;
  max-width: 90%;
  max-height: 80vh;
  object-fit: contain;
}

#caption {
  margin: 15px auto;
  display: block;
  width: 80%;
  max-width: 700px;
  text-align: center;
  color: #ccc;
  padding: 10px 0;
  font-size: 1.2rem;
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
}

.close-btn:hover,
.close-btn:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}

.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.4);
}

.prev-btn {
  left: 15px;
}

.next-btn {
  right: 15px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .gallery-container {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    padding: 15px;
    gap: 15px;
  }
  
  .gallery-btn {
    padding: 6px 15px;
    font-size: 0.9rem;
    margin: 0 5px;
  }
  
  .modal-content {
    max-width: 95%;
    max-height: 70vh;
  }
  
  .nav-btn {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
}
