/* search form compact inline controls */
.search-form .form-container { text-align: center; margin: 18px 0; }
.search-form form {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* inputs and select */
.search-form input[type="search"],
.search-form select {
  height: 34px;
  min-width: 160px;
  padding: 4px 10px;
  font-size: 13px;
  line-height: 1;
  color: #111;
  background: #fff;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 2px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.06);
  vertical-align: middle;
}

/* search width tweak */
.search-form input[type="search"] { width: 240px; max-width: 40vw; }

/* nicer select with custom arrow */
.search-form select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 28px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path fill='%23000' d='M0 0l5 6 5-6z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 10px 6px;
}

/* search button (yellow) */
.search-form button[type="submit"] {
  height: 34px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
  color: #000;
  background: #f5e600;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 2px;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(0,0,0,0.12);
}

/* subtle hover/focus states */
.search-form button[type="submit"]:hover { filter: brightness(0.96); }
.search-form input[type="search"]:focus,
.search-form select:focus,
.search-form button[type="submit"]:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(245,230,0,0.12);
}

/* mobile spacing */
@media (max-width: 600px) {
  .search-form form { gap: 8px; }
  .search-form input[type="search"] { width: 160px; }
}

/* grid: 3 columns, centered */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  max-width: 1100px; /* adjust to control overall width */
  margin: 0 auto;
  padding: 20px;
}

/* each item fills its grid cell */
.gallery-item {
  overflow: hidden;
  position: relative;
}

/* fixed visible box for images; all cells same size */
.gallery-item .img-wrapper {
  width: 100%;
  height: 360px; /* visible box height — tune this */
  overflow: hidden;
  display: block;
}

/* image covers the box and is cropped consistently */
.gallery-item .img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;   /* crucial: fills and crops */
  display: block;
}

/* caption area under the image */
.gallery-item .info {
  text-align: center;
  margin-top: 10px;
}
.gallery-item .info .title {
  font-size: 0.9rem;
  color: #f5e600;
}

.pages {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.current {
  text-decoration: underline;
  font-weight: bold;
}

/* responsive: 2 cols on tablet, 1 on small */
@media (max-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-item .img-wrapper { height: 320px; }
}
@media (max-width: 600px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-item .img-wrapper { height: 220px; }
}
