:root {
--cm-color-green: #007238;
}
.pane-header+.pane-globalnav+.block-faq,
.pane-header+.pane-globalnav+.block-guide,
.pane-header+.pane-globalnav+.block-privacy {
padding-top: 112px;
}

/* =====================================
   Race Horse Directory
===================================== */

.block-racehorse {
  padding: 0 20px;
  margin: 12px 0 40px;
}

.block-racehorse h1 {
  padding: 12px 0 0;
}

.block-racehorse-intro {
  margin: 0 0 40px;
}

.block-racehorse-intro--text {
  margin: 0 0 20px;
}

/* 50音ナビ */

.block-racehorse-index {
  display: flex;
  flex-wrap: wrap;
  gap: 15px 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.block-racehorse-index li {
  width: calc((100% - 20px) / 3);
}

.block-racehorse-index a {
  position: relative;
  display: block;
  height: 100%;
  padding: 8px 15px 30px;
  background: #fff;
  border-radius: 3px;
  box-shadow: 0 0 10px rgb(0 0 0 / 15%);
  font-size: 15px;
  font-weight: bold;
  text-align: center;
}

.block-racehorse-index a::after {
  content: "";
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  margin: auto;
  width: 8px;
  height: 8px;
  border-right: 1px solid var(--cm-color-green);
  border-bottom: 1px solid var(--cm-color-green);
  transform: rotate(45deg);
}

/* 行ブロック */

.block-racehorse-section:not(:last-child) {
  margin-bottom: 40px;
}

.block-racehorse-section h2 {
  padding: 0.45em 0.9em;
  margin: 0 0 20px;
  background: var(--cm-color-green);
  color: #fff;
  border-radius: 0.5em;
  font-size: clamp(14px, 5.2vw, 20px);
}

/* 馬一覧 */

.block-racehorse-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.block-racehorse-list li {
  margin: 0;
}

.block-racehorse-list a {
  display: block;
  padding: 14px 16px;
  background: #fff;
  border-radius: 5px;
  box-shadow: 0 0 5px rgb(0 0 0 / 15%);
  font-weight: bold;
  transition: .3s;
}

.block-racehorse-list a:hover {
  text-decoration: none;
  color: var(--cm-color-green);
  box-shadow: 0 4px 12px rgb(0 0 0 / 18%);
}

@media screen and (min-width: 769px) {

  .block-racehorse {
    max-width: var(--responsive-sys-container-width);
    margin: 24px auto 80px;
  }

  .block-racehorse h1 {
    margin-bottom: 9px;
    padding: 16px 0;
  }

  .block-racehorse-index {
    gap: 25px 20px;
  }

  .block-racehorse-index li {
    width: calc((100% - 80px) / 5);
  }

  .block-racehorse-index a {
    padding: 10px 0 30px;
    border-radius: 5px;
    transition: .3s;
  }

  .block-racehorse-index a:hover {
    text-decoration: none;
    opacity: .7;
  }

  .block-racehorse-section {
    scroll-margin-top: 162px;
  }

  .block-racehorse-section:not(:last-child) {
    margin-bottom: 68px;
  }

  .block-racehorse-section h2 {
    background: var(--cm-color-green);
    border-radius: .2em;
    font-size: 28px;
    margin-bottom: 30px;
  }

  .block-racehorse-list {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }
}