/* Gallery Page */
.gallery-page {
  padding: 120px 20px 60px;
  min-height: 100vh;
  background-color: #1a1a1a;
}

.gallery-page h1 {
  text-align: center;
  color: #fcd500;
  margin-bottom: 40px;
  font-size: 2.5em;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  max-width: 1600px;
  margin: 0 auto;
  padding: 20px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.gallery-item:hover {
  transform: scale(1.03);
}

.gallery-item img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
}

/*Back button*/

/* Gallery Header Alignment */
.gallery-header-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 20px; /* Match grid padding */
}

.gallery-header {
  position: relative;
  margin-bottom: 40px;
}

.back-btn {
  position: absolute;
  left: 0; /* Align with grid's left edge */
  top: 50%;
  transform: translateY(-50%);
  background-color: #fcd500;
  color: #000;
  padding: 10px 20px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  z-index: 1;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .gallery-header-container {
    padding: 0 15px;
  }

  .back-btn {
    position: relative;
    left: 0;
    transform: none;
    top: auto;
    margin-bottom: 15px;
    width: 100%;
    text-align: center;
  }

  .gallery-header h1 {
    text-align: center;
    width: 100%;
  }
}

.gallery-page {
  padding: 120px 20px 60px;
  min-height: 100vh;
  background-color: #1a1a1a;
}

.gallery-page h1 {
  text-align: center;
  color: #fcd500;
  margin: 0 auto 40px;
  font-size: 2.5em;
  max-width: 90%;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  max-width: 1600px;
  margin: 0 auto;
  padding: 20px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  transition: transform 0.3s ease;
  cursor: pointer;
  height: 300px;
}

.gallery-item:hover {
  transform: scale(1.03);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-header-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 20px 40px;
  text-align: center;
}

.gallery-header {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.back-btn {
  background-color: #fcd500;
  color: #000;
  padding: 10px 20px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  margin-bottom: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .gallery-page {
    padding: 100px 15px 30px;
  }

  .gallery-header-container {
    padding: 0 15px 30px;
  }

  .gallery-page h1 {
    font-size: 2rem;
    margin-bottom: 20px;
  }

  .back-btn {
    padding: 8px 16px;
    font-size: 0.9rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    padding: 10px;
    gap: 15px;
  }

  .gallery-item {
    height: 250px;
  }
}

@media (min-width: 769px) {
  .gallery-header {
    flex-direction: row;
    justify-content: center;
  }

  .back-btn {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    margin-bottom: 0;
  }
}
