:root {
  --primary-light: #8abdff;
  --primary: #6d5dfc;
  --primary-dark: #5b0eeb;
  --white: #ffffff;
  --greyLight-1: #e4ebf5;
  --greyLight-2: #c8d0e7;
  --greyLight-3: #bec8e4;
  --greyDark: #9baacf;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: inherit;
}

html {
  box-sizing: border-box;
  font-size: 62.5%;
  overflow-y: scroll;
  background: var(--greyLight-1);
}

@media screen and (min-width: 900px) {
  html {
      font-size: 75%;
  }
}

body {
  font-family: Arial, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
}

header {
  text-align: center;
  margin: 20px 0;
}

#gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  width: 80%;
  max-width: 1200px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  margin-top: 10px;
  border-radius: 8px;
}

.gallery-item img {
  /* width: 100%; */
  width: auto;
  height: auto;
  display: block;
}

.gallery-item .overlay {
  position: absolute;
  bottom: 0;
  background: rgba(0, 0, 0, 0.646);
  color: #fff;
  width: 100%;
  text-align: justify;
  padding: 10px;
  transform: translateY(100%);
  transition: transform 0.3s;
}

.gallery-item:hover .overlay {
  transform: translateY(0);
}

.copy-button {
  background-color: #4CAF50;
  border: none;
  color: white;
  padding: 10px;
  text-align: center;
  display: inline-block;
  margin-top: 10px;
  cursor: pointer;
  width: 100%;
}

/* Centering the search container */
.search-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-align: center;
}

/* SEARCH */
.search {
  padding-top: 20px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search__input {
  width: 20.4rem;
  height: 4rem;
  border: none;
  border-radius: 1rem;
  font-size: 1.4rem;
  padding-left: 4.8rem; /* Space for the icon */
  box-shadow: inset 0.2rem 0.2rem 0.5rem var(--greyLight-2), inset -0.2rem -0.2rem 0.5rem var(--white);
  background: none;
  font-family: inherit;
  color: var(--greyDark);
}

.search__input::placeholder {
  color: var(--greyLight-3);
}

.search__input:focus {
  outline: none;
  box-shadow: 0.3rem 0.3rem 0.6rem var(--greyLight-2), -0.2rem -0.2rem 0.5rem var(--white);
}

.search__input:focus + .search__icon {
  color: var(--primary);
}

.search__icon {
  position: absolute;
  left: 15px; /* Adjusted to align with the input padding */
  top: 70%;
  /* margin-right: 20px; */
  transform: translateY(-50%);
  font-size: 2rem;
  color: var(--greyDark);
  pointer-events: none;
  transition: 0.3s ease;
}

/* Search examples */
.search__examples {
  margin-top: 10px;
  text-align: center;
}

.search__example {
  display: inline-block;
  background-color: #f0f0f0;
  padding: 5px 10px;
  margin: 5px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  color: var(--greyDark);
}

.search__example:hover {
  background-color: #e0e0e0;
}

/* Responsive adjustments */
@media screen and (max-width: 600px) {
  #gallery {
      grid-template-columns: repeat(1, 1fr);
      gap: 15px;
      width: 100%;
  }

  .search__input {
      width: 100%;
      padding-left: 3rem; /* Adjusted padding for smaller screens */
  }

  .copy-button {
      padding: 8px;
      font-size: 1.2rem;
  }
}
