@charset "utf-8";

body {
  background-color: #fff !important;
}

h1 {
  margin: 20px 0 0;
  padding: 30px 40px 0;
  font-size: 20px;
}

.photo-db-h1 {
  background-image: url("../img/photo-db-h1.png");
  background-repeat: no-repeat;
  background-position: 0 28%;
  background-size: 40px auto;
  font-size: 24px;
  padding: 0 0 10px 46px;
}

h3 {
  color: #666;
  border-bottom: none;
  margin-bottom: 0;
}

/* ご利用規約 */
#main .textbox ul {
  font-size: 14px;
}

#main .textbox.tx-gray-2 {
  font-size: 14px;
  margin-top: 0;
  background-color: #ebebeb;
  color: var(--black);
}

#main .textbox.tx-gray-2 ul {
  font-size: 14px;
  margin: 1em 0 1.5em 1.5em;
}

/* スライダー */
.top-slider-box {
  margin: 30px auto;
}

.swiper-slide {
  width: 260px;
}

#main .js-photo-db {
  margin-top: 30px;
}

/* キーワード検索 */
#main .js-photo-db .keyword-search-mode {
  display: flex;
  align-items: center;
  gap: 20px;
  background: #fafafa;
  border: 1px solid #ddd;
  padding: 12px 16px;
  border-radius: 8px;
  width: 100%;
  box-sizing: border-box;
}

#main .js-photo-db .keyword-search-mode input[type="text"] {
  flex: 1;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  outline: none;
  transition: border-color 0.3s;
}

#main .js-photo-db .keyword-search-mode input[type="text"]:focus {
  border-color: #0078d7;
  box-shadow: 0 0 4px rgba(0, 120, 215, 0.3);
}

#main .js-photo-db .keyword-search-mode label {
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
}

#main .js-photo-db .keyword-search-mode input[type="radio"] {
  margin-right: 6px;
  accent-color: #0078d7;
}

/* 絞り込み */
#main .js-photo-db .js-content__filter {
  margin-top: 20px;
}

#main .js-photo-db .accordion .accordion-body {
  margin-inline: 24px;
}

#main .js-photo-db .accordion-body > ul.list {
  display: flex;
  flex-wrap: wrap;
  row-gap: 20px;
  column-gap: 48px;
  margin: 15px 0 0;
  padding-left: 0;
  list-style: none;
}

#main .js-photo-db .accordion-body li {
  font-size: 14px;
  list-style: none;
  margin-block: 0;
}

#main .js-photo-db .accordion-body > ul.bunya-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px 32px;
  align-items: start;
}

#main .js-photo-db .bunya-group > label {
  font-weight: var(--fw-bold, 700);
}

#main .js-photo-db .bunya-children {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0 0;
  padding-left: 0;
}

#main .js-photo-db .accordion-body label.depth-2 {
  padding-left: 1.5em;
}

#main .js-photo-db .accordion-body label.depth-3 {
  padding-left: 3em;
}

#main .js-photo-db .accordion-body label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.4;
}

#main .js-photo-db .accordion-body label.is-disable {
  pointer-events: none;
  opacity: 0.5;
}

#main .js-photo-db .accordion-body input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin: 2px 0 0;
  flex: 0 0 17px;
}

#main .js-photo-db .count-reset {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px 24px;
  margin-top: 20px;
  padding: 16px 20px;
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 8px;
}

#main .js-photo-db .c-filter__count {
  font-size: 14px;
  font-weight: var(--fw-bold, 700);
  color: var(--black, #333);
}

#main .js-photo-db .ps-filter-reset {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-family: inherit;
  font-weight: var(--fw-bold, 700);
  color: var(--black, #333);
  background: #fff;
  border: 1px solid #bbb;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}

#main .js-photo-db .ps-filter-reset:hover {
  background: #f5f5f5;
  border-color: #888;
}

#main .js-photo-db .ps-filter-reset__icon {
  position: relative;
  flex-shrink: 0;
  width: 14px;
  height: 14px;
}

/* 12時〜2時（60°）を切れ目にした円 */
#main .js-photo-db .ps-filter-reset__icon::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid currentColor;
  border-radius: 50%;
  -webkit-mask: conic-gradient(transparent 0deg 60deg, #000 60deg);
  mask: conic-gradient(transparent 0deg 60deg, #000 60deg);
}

/* 切れ目の端（12時）に時計回りの矢じり */
#main .js-photo-db .ps-filter-reset__icon::after {
  content: "";
  position: absolute;
  top: -2px;
  left: 6.5px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 3px 0 3px 4px;
  border-color: transparent transparent transparent currentColor;
}

/* 読み込み中 */
.photo-db-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 32px 16px;
}

.photo-db-loading__spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #ddd;
  border-top-color: #0078d7;
  border-radius: 50%;
  animation: photo-db-loading-spin 0.8s linear infinite;
}

.photo-db-loading__text {
  font-size: 14px;
}

@keyframes photo-db-loading-spin {
  to {
    transform: rotate(360deg);
  }
}

/* カード一覧（3カラム） */
#main .js-photo-db .js-content__inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 24px;
  row-gap: 40px;
  margin-top: 20px;
}

#main .js-photo-db .photo-db-empty {
  grid-column: 1 / -1;
}

#main .js-photo-db .js-content__inner a.c-card.is-filter-hidden,
#main .js-photo-db .js-content__inner a.c-card.is-scroll-hidden {
  display: none;
}

#main .js-photo-db .js-content__inner a.c-card {
  position: relative;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--black, #000);
}

#main .js-photo-db .js-content__inner a.c-card::after {
  display: none !important;
}

#main .js-photo-db .c-card .db-card {
  border-radius: var(--rounded-sm, 4px);
  overflow: hidden;
  border: 1px solid var(--border-color, #d9d9d9);
}

#main .js-photo-db .c-card__figure {
  margin: 0;
}

#main .js-photo-db .c-card .db-card img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: scale 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

#main .js-photo-db .c-card__body {
  margin-top: 8px;
}

#main .js-photo-db .c-card__title {
  font-size: 16px;
  font-weight: var(--fw-bold, 700);
  line-height: 1.5;
}

#main .js-photo-db .c-card__title .new {
  margin-left: 8px;
  vertical-align: middle;
}

#main .js-photo-db .c-card__meta {
  margin-top: 4px;
  font-size: 13px;
  color: #555;
}

#main .js-photo-db .c-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

#main .js-photo-db .c-card__tag {
  color: #fff;
  font-size: 12px;
  padding: 2px 5px;
  background: #727272;
}

#main .js-photo-db .c-card__tag[data-bunya] {
  cursor: pointer;
  transition: background-color 0.2s;
}

#main .js-photo-db .c-card__tag[data-bunya]:hover {
  background: #444;
}

#main .js-photo-db .js-scroll-trigger {
  height: 1px;
  margin-top: 40px;
}

@media (any-hover: hover) {
  #main .js-photo-db .hover-img-scale:hover img {
    scale: 1.08;
  }
}

@media (min-width: 768px) {
  h1 {
    margin: 40px 0 30px;
    padding: 30px 40px 0;
    font-size: 36px;
  }

  .photo-db-h1 {
    background-position: 0 30%;
    background-size: 60px auto;
    font-size: 34px;
    padding-bottom: 10px;
    padding-left: 64px;
  }

}

@media (max-width: 959px) {
  #main .js-photo-db .keyword-search-mode,
  #main .js-photo-db .count-reset {
    flex-direction: column;
    align-items: stretch;
  }

  #main .js-photo-db .accordion-body > ul.list {
    flex-direction: column;
  }

  #main .js-photo-db .ps-filter-reset {
    justify-content: center;
  }

  #main .js-photo-db .js-content__inner {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 24px;
  }
}

@media (max-width: 599px) {
  #main .js-photo-db .js-content__inner {
    grid-template-columns: 1fr;
  }
}
