/**
 * Layout - Footer
 * 共通フッター
 */

.l-footer {
  padding-block: 26px;
  position: relative;

  @media screen and (max-width: 767px) {
    padding-bottom: 66px;
  }

  /* 下層のみ：フッター内にパンくず */
  &.--hasBreadcrumb {
    padding-top: 1em;
    border-top: 1px solid;
  }

  &.--hasBreadcrumb .l-footerBreadcrumbWrapper {
    margin-bottom: 1em;
  }

  &.--hasBreadcrumb .l-footerBreadcrumbWrapper .l-breadcrumb {
    padding-block: 0;
    border-bottom: none;
    background-color: transparent;
  }

  &.--hasBreadcrumb .l-footerBreadcrumbWrapper .l-breadcrumbList {
    padding-inline: 0;
  }
}

/* ========================================
  PAGE TOP
======================================== */

.l-footerPageTop {
  padding-top: 0.5rem;
  transform-origin: top right;
  rotate: 90deg;
  position: fixed;
  bottom: 56px;
  right: 0;
  z-index: 10;

  @media screen and (max-width: 1259px) {
    padding-top: 0;
  }

  @media screen and (max-width: 767px) {
    rotate: 0deg;
    bottom: 2rem;
    right: 50%;
    translate: 50% 0;
  }
}

.l-footerPageTopLink {
  font-family: var(--font-en);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 0.5rem;

  &::before {
    content: "";
    display: inline-block;
    width: 24px;
    height: 24px;
    background-image: url("../../images/icon_arrow_left_black.svg");
    background-size: contain;
    background-position: center;

    @media screen and (max-width: 767px) {
      rotate: 90deg;
    }
  }
}

/* ========================================
  CTA
======================================== */

.l-footerContact {
  margin-bottom: 32px;
}

.l-footerContactActions {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin: 40px 0;
  padding: 0;

  @media screen and (max-width: 767px) {
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 20px 0;
  }
}

.l-footerContactCard {
  color: var(--color-text-main);
  min-height: 220px;
  padding: 32px 40px;
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  @media screen and (max-width: 767px) {
    min-height: auto;
    padding: 28px 24px;
  }

  /* サービス資料 */
  &.--document {
    color: var(--color-text-light);
    background-color: var(--color-bg-footer);

    .l-footerContactCardLink {
      color: var(--color-text-main);
      background-color: var(--color-bg-white);
    }

    .l-footerContactCardLink::after {
      background-image: url("../../images/icon_arrow_right_black.svg");
    }
  }

  /* お問い合わせ */
  &.--yellow {
    background-color: #f5d23c;

    .l-footerContactCardLink {
      color: var(--color-text-main);
      background-color: var(--color-bg-white);
    }
  }
}

.l-footerContactHeading {
  font-size: clamp(24px, 2vw, 32px);
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 16px;
}

.l-footerContactCardText {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: 0.02em;
  margin-bottom: 24px;
  text-align: center;
  @media screen and (max-width: 559px) {
    text-align: left;
  }
}

.l-footerContactCardLink {
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  width: fit-content;
  min-height: 44px;
  padding-inline: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border-radius: 999px;
  transition: opacity 0.3s ease;

  &:hover {
    opacity: 0.8;
  }

  &::after {
    content: "";
    display: block;
    width: 1rem;
    height: 1rem;
    background-image: url("../../images/icon_arrow_right_black.svg");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
  }
}

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

.l-footerBlock {
  color: var(--color-text-light);
  font-weight: 300;
  background-color: var(--color-bg-footer);
  border-radius: var(--radius-xl);
  padding-block: 64px 40px;
  padding-inline: 64px;

  @media screen and (max-width: 1023px) {
    padding-inline: 40px;
  }

  @media screen and (max-width: 559px) {
    padding-block: 40px 32px;
    padding-inline: 24px;
  }
}

/* ========================================
  SITEMAP + COMPANY
======================================== */

.l-footerUpper {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: clamp(48px, 8vw, 120px);
  align-items: start;

  @media screen and (max-width: 1023px) {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

/* ========================================
  SITEMAP
======================================== */

.p-footerSitemapColumn {
  display: grid;
  grid-template-columns: 1.5fr 1fr 0.8fr;
  gap: clamp(15px, 3vw, 32px);

  @media screen and (max-width: 767px) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  @media screen and (max-width: 559px) {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.p-footerSitemapItem {
  padding-block: 8px;

  & + & {
    margin-top: 20px;
  }
}

.p-footerSitemapMainLink {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  padding-block: 7px;
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 4px;

  &::after {
    content: "";
    display: block;
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
    background-image: url("../../images/icon_arrow_right_white.svg");
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
  }

  a {
    &:hover {
      opacity: 0.8;
    }
  }

  &.--noLink {
    &::after {
      display: none;
    }
  }
}

.p-footerSitemapChildLink {
  font-size: 14px;
  display: grid;
  gap: 10px;
  list-style: none;
  padding-block: 10px;
  padding-left: 10px;

  a {
    line-height: 1.6;

    &:hover {
      opacity: 0.8;
    }
  }
}

/* ========================================
  COMPANY
======================================== */

.l-footerCompany {
  margin: 0;
  margin-top: auto;

  @media screen and (max-width: 1023px) {
    width: fit-content;
  }
}

.l-footerCompanyLogo {
  padding: 0;
  margin-bottom: 24px;

  a {
    display: block;
    width: fit-content;
  }

  img {
    display: block;
    width: clamp(160px, 16vw, 220px);
    height: auto;
  }
}

.l-footerCompanyAddress {
  font-size: 0.625rem;
  line-height: 1.8;
  padding-left: 0;
  display: grid;
  gap: 12px;
}

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

.l-footerBottom {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--color-border-white);

  @media screen and (max-width: 767px) {
    margin-top: 40px;
  }
}

.l-footerSns {
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 0;

  a {
    display: block;
    transition: opacity 0.3s ease;

    &:hover {
      opacity: 0.7;
    }
  }

  img {
    display: block;
  }
}

.p-footerCopyright {
  font-size: 14px;
  text-align: center;
  margin-top: 24px;
}
