@charset "utf-8";
/* ------------- header , css init , sp-menu -------------- */

*,
*:before,
*:after {
  box-sizing: inherit;
}

html {
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  font-family: "Noto Sans JP", sans-serif;
  min-height: 100dvh;
  row-gap: 64px;
  /* 改行 */
  overflow-wrap: anywhere;
  word-break: normal;
  line-break: strict;
  position: relative;
}

/* スマホメニューが開いていると背景を固定 */
body:has(.isShow) {
  overflow: hidden;
}

footer {
  /* footerを最下部へ */
  position: sticky;
  top: 100%;
}

img {
  max-width: 100%;
  width: 100%;
  height: auto;
  vertical-align: middle;
  font-style: italic;
}

a {
  text-decoration: none;
  color: black;
}

ul {
  list-style-type: none;
}

h1,
h2,
h3,
h4,
p,
a,
figure,
img,
ul,
ol,
li,
dl,
dt,
dd {
  padding: 0;
  margin: 0;
}

.inlineBlockSpan {
  display: inline-block;
}

/* -------------------- ヘッダー ---------------------- */

header {
  container: cq-header / inline-size;
  > .headlineContainer {
    width: 73.95%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    justify-content: space-between;
    align-items: center;
    gap: 0 32px;
    margin-inline: auto;
    padding: 6px 0;
    > a {
      display: grid;
      gap: 8px 0;
      > p {
        font-size: clamp(0.625rem, 0.55rem + 0.38vw, 1rem);
        color: #4c7fcb;
        white-space: nowrap;
      }
      > h1 {
        width: 90%;
      }
    }
    > .headlineRight {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      grid-template-rows: repeat(2, 1fr);
      justify-content: center;
      align-items: center;
      gap: 0 12px;
      > .headlineBox {
        display: grid;
        grid-template-columns: 40% 1fr;
        gap: 6px;
        white-space: nowrap;
        > a {
          display: flex;
          align-items: center;
          gap: 6px;
        }
        &:nth-of-type(1),
        &:nth-of-type(2) {
          > h2 {
            background-color: #4c7fcb;
            color: white;
            width: 100%;
            padding: 4px 8px;
            border-radius: 5px;
            font-size: clamp(10px, 1.04vw, 20px);
            text-align: center;
          }
          > p {
            color: #132f56;
            font-size: clamp(10px, 1.25vw, 24px);
            font-weight: 500;
          }
        }
        &:nth-of-type(2) {
          grid-column: 1;
          grid-row: 2;
        }
        &:nth-of-type(3) {
          > a {
            padding: 2px 4px;
            > h2 {
              > picture {
                display: grid;
                > img {
                  width: 100%;
                  min-width: 35px;
                }
              }
            }
            > p {
              color: #6dc300;
              font-size: clamp(12px, 1.66vw, 32px);
              font-weight: 700;
            }
          }
        }
        &:nth-of-type(4) {
          > a {
            background-color: #6dc300;
            border-radius: 100vmax;
            width: fit-content;
            padding: 8px 16px;
            > h2 {
              > picture {
                display: grid;
                > img {
                  width: 100%;
                  min-width: 20px;
                }
              }
            }
            > p {
              color: white;
              font-size: clamp(10px, 0.9375vw, 18px);
              font-weight: 700;
            }
          }
        }
      }
    }
    &:nth-of-type(2) {
      > figure {
        display: grid;
        justify-content: center;
        align-items: center;
        gap: 12px;
        > hgroup {
          color: #132f56;
          > h2 {
            font-size: clamp(12px, 1.04vw, 20px);
            padding: 4px 0;
            border-bottom: 2px solid #333;
          }
          > p {
            font-size: clamp(10px, 0.9375vw, 18px);
            font-weight: 700;
            &:nth-of-type(n + 2) {
              font-weight: normal;
              font-size: clamp(8px, 0.9375vw, 12px);
            }
          }
        }
        > img {
          width: 100%;
        }
        &:nth-of-type(2) {
          grid-template-columns: auto 1fr;
        }
      }
    }
  }
  > nav {
    background-color: #4c7fcb;
    padding: 12px 0;
    > div {
      width: 73.95%;
      display: flex;
      flex-wrap: wrap;
      justify-content: space-between;
      margin-inline: auto;
      > a {
        font-size: clamp(10px, 0.9375vw, 18px);
        color: white;
      }
    }
  }
}

@container cq-header (width < 1024px) {
  header {
    > .headlineContainer:first-child {
      grid-template-columns: 100%;
      gap: 4px 0;
      > .headlineRight {
        margin-inline: auto;
      }
    }
  }
}

/* ///////////////// スマホメニュー ////////////////// */
.spMenuButton {
  display: none;
}
.spMenuWindow {
  position: fixed;
  inset: 0;
  margin: auto;
  z-index: 2;
  width: 100%;
  height: 100dvh;
  background-color: #446fafe5;
  transition: opacity 0.3s, visibility 0.3s;
  opacity: 0;
  visibility: hidden;
  overflow-y: scroll;
  > img {
    display: block;
    width: 25px;
    margin: 15px 15px 0 auto;
  }
  > ul {
    width: 95%;
    margin-inline: auto;
    > li {
      padding: 16px 6px;
      border-bottom: 1px solid white;
      > a {
        > p {
          color: white;
        }
      }
    }
  }
}
.isShow {
  opacity: 1;
  visibility: visible;
}

/* //////////////////////////////////////// */

/* --------------------- マウスホバー ---------------------- */
/* transition */
.headlineBox:nth-of-type(3) {
  > a.hoverTextShadow {
    transition: text-shadow 0.3s;
  }
}
.headlineBox:nth-of-type(4) {
  > a.hoverBgColor {
    transition: opacity 0.3s;
  }
}
header {
  > .headlineContainer {
    &:nth-of-type(2) {
      > figure:first-of-type {
        > a.hoverOpacity {
          transition: opacity 0.2s;
        }
      }
    }
  }
  > nav {
    > div {
      > a.hoverScale {
        transition: scale 0.3s;
      }
    }
  }
}
/*  */
@media (any-hover: hover) {
  .headlineBox:nth-of-type(3) {
    > a.hoverTextShadow:hover {
      text-shadow: 2px 2px 5px #b9d199;
    }
  }
  .headlineBox:nth-of-type(4) {
    > a.hoverBgColor:hover {
      opacity: 0.8;
    }
  }
  header {
    > .headlineContainer {
      &:nth-of-type(2) {
        > figure:first-of-type {
          > a.hoverOpacity:hover {
            opacity: 0.8;
          }
        }
      }
    }
    > nav {
      a.hoverScale:hover {
        scale: 1.1;
      }
    }
  }
}

/* メディアクエリ ///////////////////////////////// */
@media (width <= 520px) {
  header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    z-index: 1;
    > .headlineContainer {
      width: 100%;
      padding: 6px;
      &:first-child {
        grid-template-columns: 1fr auto;
        gap: 0 16px;
      }
      > a {
        gap: 0;
        > p {
          white-space: revert;
        }
        > h1 {
          width: 100%;
        }
      }
      > .headlineRight {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: revert;
        grid-column: 2;
        gap: 0 12px;
        > .headlineBox {
          gap: 0;
          grid-template-columns: 100%;
          &:nth-of-type(1),
          &:nth-of-type(2) {
            display: none;
          }
          &:nth-of-type(3) {
            grid-column: 2;
            > a {
              > h2 {
                > picture {
                  > img {
                    width: 19px;
                    min-width: revert;
                  }
                }
              }
              > p {
                display: none;
              }
            }
          }
          &:nth-of-type(4) {
            grid-column: 1;
            grid-row: 1;
            margin-left: auto;
            > a {
              background-color: revert;
              padding: 0;
              > h2 {
                > picture {
                  > img {
                    width: 25px;
                    min-width: revert;
                  }
                }
              }
              > p {
                display: none;
              }
            }
          }
        }
        > .spMenuButton {
          display: grid;
          width: 22px;
        }
      }
      &:nth-of-type(2) {
        grid-template-columns: 100%;
        > figure {
          &:first-of-type {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
          }
          &:nth-of-type(2) {
            display: none;
          }
        }
      }
    }
    > nav {
      padding: 4px 0;
      > div {
        display: none;
      }
    }
  }
}
