@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;600;700&family=Lato:wght@700;900&family=Outfit:wght@100..900&family=Rowdies:wght@300&display=swap');

#footer {
  /*====================================================
  ALL UNSET
  ====================================================*/
  all: unset;
  * {
    all: unset;
  }

  /*====================================================
  RESET
  ====================================================*/
  &,
  *,
  :after,
  :before {
    box-sizing: border-box;
    border-style: solid;
    border-width: 0;
  }
  html {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  }
  body {
    margin: 0;
  }
  main {
    display: block;
  }
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    font-size: inherit;
    line-height: inherit;
    font-weight: inherit;
    margin: 0;
  }
  dl,
  figure,
  form,
  iframe,
  ol,
  p,
  table,
  ul {
    margin: 0;
  }
  ol,
  ul {
    padding: 0;
    list-style: none;
  }
  dt {
    font-weight: 400;
  }
  dd {
    margin-left: 0;
  }
  a {
    background-color: transparent;
    text-decoration: none;
    color: inherit;
  }
  small {
    font-size: 80%;
  }
  sub,
  sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
  }
  sub {
    bottom: -0.25em;
  }
  sup {
    top: -0.5em;
  }
  iframe,
  img {
    vertical-align: bottom;
  }
  button,
  input,
  select,
  textarea {
    -webkit-appearance: none;
    appearance: none;
    vertical-align: middle;
    color: inherit;
    font: inherit;
    background: 0;
    padding: 0;
    margin: 0;
    border-radius: 0;
    text-align: inherit;
  }
  [type='checkbox'] {
    -webkit-appearance: checkbox;
    appearance: checkbox;
  }
  [type='radio'] {
    -webkit-appearance: radio;
    appearance: radio;
  }
  button,
  input {
    overflow: visible;
  }
  button,
  select {
    text-transform: none;
  }
  [type='button'],
  [type='reset'],
  [type='submit'],
  button {
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
  }
  [type='button'][disabled],
  [type='reset'][disabled],
  [type='submit'][disabled],
  button[disabled] {
    cursor: default;
  }
  fieldset,
  option {
    padding: 0;
  }
  fieldset {
    margin: 0;
    min-width: 0;
  }
  textarea {
    overflow: auto;
  }
  table {
    border-collapse: collapse;
    border-spacing: 0;
  }
  td,
  th {
    vertical-align: top;
    padding: 0;
  }
  th {
    text-align: left;
    font-weight: 400;
  }

  /*====================================================
  COMMON
  ====================================================*/
  line-height: 1.6;
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 500;
  color: #fff;
  overflow-wrap: anywhere;
  word-break: normal;
  line-break: strict;

  p,
  div,
  layer,
  article,
  aside,
  footer,
  header,
  hgroup,
  main,
  nav,
  section,
  address,
  blockquote,
  figcaption,
  figure,
  center,
  hr,
  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  ul,
  menu,
  dir,
  ol,
  dd,
  dl,
  dt,
  form,
  legend,
  fieldset,
  pre,
  xmp,
  plaintext,
  listing,
  ruby > rt,
  frameset,
  frame,
  details,
  summary {
    display: block;
  }

  header,
  footer {
    width: 100%;
  }
  .inner {
    width: 1000px;
    max-width: 95%;
    margin-inline: auto;
  }
  @media (hover: hover) {
    button,
    a:where([href]) {
      cursor: pointer;
      transition: opacity 0.3s;
      &:hover {
        opacity: 0.7;
      }
    }
  }
  a {
    &:focus-visible {
      outline: 2px solid #005fcc;
      outline-color: AccentColor;
      outline: -webkit-focus-ring-color auto 1px;
    }
  }
  img {
    width: auto;
    height: auto;
    max-width: 100%;
  }
  .flex {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
  }
  .grid {
    display: grid;
  }
  .tab_display,
  .sp_display {
    display: none;
  }
  @media screen and (min-width: 768px) and (max-width: 1053px) {
    .tab_display {
      display: block;
    }
  }
  @media screen and (max-width: 767px) {
    .pc_display {
      display: none;
    }
    .sp_display {
      display: block;
    }
    .tab_display {
      display: none;
    }
    .inner {
      max-width: 92%;
    }
    img {
      width: 100%;
    }
  }

  /*====================================================
  FOOTER
  ====================================================*/

  color: #fff;
  font-size: 16px;
  background-color: #3e3e3e;

  .footer__to_top {
    width: 100%;
    height: 5em;
    background-color: #fff;
    background-image: url(../img/common/caret_up_black.svg);
    background-repeat: no-repeat;
    background-size: 1.6em;
    background-position: center;
    display: block;
    &:hover {
      @media (hover: hover) {
        opacity: 1;
      }
    }
  }

  .inner {
    width: 1330px;
    margin-inline: auto;
    display: flex;
    justify-content: space-between;
  }
  /* Main footer content */
  .footer__main_wrap {
    display: flex;
    flex-direction: column;
    background-image: url('../img/common/footer_bg.png');
    background-repeat: repeat;
    background-size: 90em;
    position: relative;
    overflow: hidden;
  }
  .footer__main {
    padding-block: 6em 2.6em;
    border-bottom: 2px solid #595959;
  }

  .footer__logo_section {
    display: flex;
    flex-direction: column;
    row-gap: 1.4em;
    align-items: center;
  }

  .footer__logo {
    display: block;
    margin-bottom: 0.9em;
    &:where(.footer__bottom *) {
      display: none;
    }
  }
  .footer__logo_image {
    width: 18em;
    height: auto;
  }

  .footer__social {
    display: flex;
    column-gap: 2.6em;
  }

  .footer__social_icon {
    width: 4.375em;
    height: auto;
    aspect-ratio: 1/1;
  }

  .footer__kids {
    flex-direction: column;
    background-color: #ffe249;
    align-items: center;
    width: fit-content;
    row-gap: 0.6em;
    padding: 0.5em 1em 0.3em;
    border-radius: 0.5em;
    margin-top: auto;
    &:where(.footer__logo_section *) {
      display: none;
    }
  }

  .footer__kids_image {
    width: 5.3em;
    height: auto;
  }

  .footer__kids_text {
    color: #000;
    text-align: center;
    font-size: 0.904375em;
    line-height: 1.22667588;
    font-weight: 600;
  }

  /* Navigation */
  .footer__nav {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2em 2.8em;
    width: 67.4%;
  }

  .footer__nav_title {
    font-size: 1.125em;
    font-weight: 600;
    margin-bottom: 0.8em;
    &:where(.footer__nav_title + *) {
      margin-top: 0.4em;
    }
    &:where(.footer__nav_list + *) {
      margin-top: 1.6em;
    }
  }
  .footer__nav_title_link {
    display: flex;
    align-items: center;
    &:where(a) {
      &:hover {
        @media (hover: hover) {
          opacity: 1;
          color: #eb610f;
        }
      }
    }
  }
  .footer__nav_title_circle {
    background-color: #eb610f;
    display: inline-block;
    width: 0.7em;
    height: auto;
    aspect-ratio: 1/1;
    border-radius: 50%;
    transform: translateY(-0.12em);
    margin-right: 0.5em;
  }
  .footer__nav_list {
    display: flex;
    flex-direction: column;
    row-gap: 0.5em;
  }

  .footer__nav_item {
    position: relative;
  }

  .footer__nav_link {
    color: #fff;
    padding-left: 1em;
    display: inline-block;
    letter-spacing: -0.06em;
    white-space: nowrap;
    &::before {
      content: '';
      position: absolute;
      top: 44%;
      left: 0;
      width: 0.3125em;
      height: 0.125em;
      background-color: #fff;
      border-radius: 50%;
      transform: translateY(-50%);
    }
    &:hover {
      @media (hover: hover) {
        opacity: 1;
        color: #eb610f;
        &::before {
          background-color: #eb610f;
        }
      }
    }
  }
  .footer__nav_column_wrap {
    display: grid;
    grid-template-columns: repeat(3, auto);
  }
  .footer__nav_column {
    display: flex;
    flex-direction: column;

    &:where(:not(.footer__nav_column_wrap *)) {
      grid-row: 1/3;
    }
  }

  .footer__kids_arrow {
    width: 0.9em;
    transform: translateY(-0.3em);
    margin-left: 0.1em;
  }

  /* Buttons */
  .footer__buttons {
    display: flex;
    gap: 0.7em;
  }

  /* Fixed positioning for cloned buttons */
  .footer__buttons--fixed {
    position: fixed;
    bottom: 1.5em;
    right: 1.5em;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.2s;
  }

  /* Visible state for smooth animation */
  .footer__buttons--visible {
    opacity: 1;
    pointer-events: auto;
  }

  .footer__button {
    background-color: #fff;
    color: #000;
    padding: 0.4em 0.2em 0.5em;
    text-align: center;
    border-radius: 1em;
    font-size: 1.125em;
    font-weight: bold;
    text-decoration: none;
    display: block;
    border: 0.1875em solid #3f3f3f;
    width: 12.1em;
    box-shadow: 0 0 0.5em rgba(0, 0, 0, 0.2);

    &:hover {
      @media (hover: hover) {
        opacity: 1;
        background-color: #000;
        color: #fff;
      }
    }
    &:where(:last-child) {
      background-color: #eb610f;
      color: #fff;
      border-color: #fff;
      &:hover {
        @media (hover: hover) {
          border-color: #fff;
          background-color: #843202;
        }
      }
    }
  }

  /* Bottom section */
  .footer__bottom {
    padding-block: 1.6em 2.3em;
  }

  .footer__links {
    display: flex;
    column-gap: 2.4em;
  }

  .footer__links_item {
    position: relative;
    + .footer__links_item {
      &::before {
        content: '|';
        position: absolute;
        top: 50%;
        left: -1.2em;
        transform: translate(-50%, -50%);
      }
    }
  }

  .footer__bottom_link {
    font-size: 0.875em;
    position: relative;
    &:hover {
      @media (hover: hover) {
        text-decoration: underline;
        opacity: 1;
      }
    }
  }

  .footer__copyright {
    font-size: 0.875em;
  }

  .footer__expg_banner {
    background-color: #60605f;
    padding: 1.4em;
    column-gap: 1.9em;
    justify-content: center;
    align-items: center;
    .footer__expg_banner_image {
      width: 7em;
    }
    .footer__expg_banner_text {
      font-size: 1.125em;
      line-height: 1.8;
    }
    .footer__expg_banner_arrow {
      width: 2.2em;
    }
  }

  /* Mobile styles */
  @media screen and (max-width: 767px) {
    font-size: 3.2vw;

    .inner {
      flex-direction: column;
      &:where(.footer__main *) {
        row-gap: 1.6em;
        max-width: 89%;
      }
      &:where(.footer__bottom *) {
        max-width: 89%;
        align-items: center;
      }
    }

    .footer__main_wrap {
      padding-block: 4.2em 1.8em;
      row-gap: 2em;
    }

    .footer__main {
      border-bottom: none;
      padding: 0;
    }

    .footer__logo_section {
      flex-direction: row;
      justify-content: flex-end;
      column-gap: 2.8em;
    }

    .footer__logo {
      &:where(.footer__logo_section *) {
        display: none;
      }
      &:where(.footer__bottom *) {
        display: block;
        margin-bottom: 0.8em;
      }
    }

    .footer__social_icon {
      width: 4.8em;
    }

    .footer__social {
      justify-content: center;
      column-gap: 3em;
    }

    .footer__nav_column_wrap {
      display: flex;
      flex-direction: column;
    }

    .footer__nav_column {
      padding-block: 1.3em;
      border-bottom: 1px solid #595959;
      &:where(.footer__nav_column_wrap *) {
        &:where(:nth-child(2)) {
          display: grid;
          grid-template-columns: repeat(2, auto);
          grid-auto-flow: column;
          grid-template-rows: repeat(2, auto);
          align-items: start;
        }
        &:where(:nth-child(3)) {
          flex-direction: row;
          flex-wrap: wrap;
          gap: 1em 2em;
        }
      }
    }

    .footer__nav {
      display: flex;
      flex-direction: column;
      width: 100%;
      overflow: hidden;
      row-gap: 0;
    }

    .footer__nav_list {
      flex-direction: row;
      flex-wrap: wrap;
      column-gap: 2.4em;
      padding-left: 1em;
    }
    .footer__nav_item {
      position: relative;
      &:where(:not(:last-child)) {
        &::before {
          content: '|';
          position: absolute;
          top: 50%;
          right: -1.2em;
          transform: translate(-50%, -50%);
        }
        &:where(.footer__nav_column_wrap *) {
          &:where(.footer__nav_column:nth-child(2) &) {
            &::before {
              content: none;
            }
          }
        }
      }
    }
    .footer__nav_link {
      padding-left: 0;
      &::before {
        content: none;
      }
    }

    .footer__nav_title {
      font-size: 1.08333333em;
      margin-bottom: 0.5em;
      margin-top: 0;
      &:where(.footer__nav_column_wrap *) {
        &:where(.footer__nav_column:nth-child(3) *) {
          margin-block: 0;
        }
      }
    }

    .footer__nav_title_circle {
      width: 0.5em;
    }

    .footer__kids {
      &:where(.footer__nav_column *) {
        display: none;
      }
      &:where(.footer__logo_section *) {
        display: flex;
        margin-top: 0;
      }
    }

    .footer__buttons {
      display: none;
    }

    .footer__links {
      flex-wrap: wrap;
      margin-inline: auto;
      width: 86%;
      row-gap: 1.3em;
      margin-bottom: 3.2em;
    }
    .footer__links_item {
      + .footer__links_item {
        &::before {
          content: none;
        }
      }
    }
    .footer__bottom_link {
      font-size: 1em;
      color: #a6a3a3;
    }
    .footer__bottom {
      padding-block: 0;
    }
    .footer__copyright {
      font-size: 1em;
    }

    .footer__expg_banner {
      position: relative;
      column-gap: 4vw;
      padding: 4vw 4vw 7vw;
      .footer__expg_banner_image {
        width: 21.06666667vw;
      }
      .footer__expg_banner_text {
        flex: 1;
        font-size: 1.08333333em;
      }
      .footer__expg_banner_arrow {
        position: absolute;
        bottom: 3.8vw;
        right: 6vw;
        width: 5vw;
      }
    }
  }

  /* Tablet styles */
  @media screen and (min-width: 768px) and (max-width: 1400px) {
    font-size: 1.14285714vw;
  }
}
