@layer base {
  @media (min-width: 890px) {
    .header {
      padding-bottom: 22px !important;
    }
  }
}

@layer custom {
  :root {
    --content-spacing-lg: clamp(1.25rem, 24vw, max(calc(50vw - 1312px / 2), 12px));
  }

  @media (min-width: 768px) {
    .only-sp {
      display: none;
    }
  }

  /* header */
  .header {
    background-color: #fff;
    border-bottom: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    width: 100%;
    border-radius: 0;
    top: 0;
    margin-inline: 0;
    padding-block: 20px;
    height: auto;
    padding-left: var(--content-spacing-lg);
    padding-right: 60px;
    min-height: 88px;
  }

  @media (min-width: 890px) {
    .header {
      padding-block: 22px !important;
      padding-inline: var(--content-spacing-lg);
    }
  }

  .header .inner {
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
    width: 100%;
  }
  
  @media (min-width: 1320px) {
    .header .inner {
      gap: 30px;
    }
  }

  /* Logo */
  .header .inner .link.logo {
    margin-right: auto;
    max-width: 180px;
    transition: all 0.3s;
  }

  .header .inner .link.logo:hover {
    opacity: 0.7;
  }

  @media (min-width: 890px) {
    .header .inner .link.logo {
      max-width: 320px;
    }
  }

  .header .inner .link.logo img {
    width: 100%;
    height: auto;
    object-fit: contain;
  }

  .header .sep {
    display: none;
  }

  /* Navigation (物件検索, アクセス, 会社概要) */
  .header .list {
    display: flex;
    gap: 8px;
    padding: 0;
    border: none;
    margin: 5px 0 0 0;
  }

  @media (min-width: 1280px) {
    .header .list {
      gap: 15px;
    }
  }

  @media (max-width: 1170px) {
    .header .list {
      display: none;
    }
  }

  .header .list .item {
    width: auto;
    height: auto;
    border: none !important;
  }

  .header .list .item .link,
  .header .list .item .text {
    display: block;
    padding: 11px 18px;
    border: 1px solid #707070;
    border-radius: 50px;
    color: #454545;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    transition: all 0.3s;
    background: #fff;
    line-height: 1;
    white-space: nowrap;
  }

  @media (min-width: 1280px) {
    .header .list .item .link,
    .header .list .item .text {
      padding: 11px 34px;
    }
  }

  .header .list .item .link:hover {
    background-color: #147849;
    border-color: #147849;
    color: #fff;
    opacity: 1;
  }

  .header .list .item:hover .menu {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Information (Tel & Hours) */
  .header .information {
    display: none;
  }

  @media (min-width: 890px) {
    .header .information {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      margin-left: auto;
      padding: 0;
    }
  }

  .header .information .block-tel {
    margin-bottom: 0;
    line-height: 1;
  }

  .header .information .tel {
    font-family: "Arial", sans-serif;
    /* 数字のフォント調整 */
    font-size: 36px;
    font-weight: 700;
    color: #333;
    text-decoration: none;
    gap: 6px;
    white-space: nowrap;
    transition: all 0.3s;
    letter-spacing: 1.5px;
  }

  .header .information .tel:hover {
    opacity: 0.7;
  }

  .header .information .tel::before {
    content: none;
  }

  /* 電話番号下の営業時間・定休日 */
  .header .information .block {
    display: flex;
    gap: 2px;
    font-size: 11px;
    color: #333;
    white-space: nowrap;
  }

  .header .information .block-text-title {
    margin-left: 0 !important;
  }

  /* Contact Button */
  .header .button-link.contact-link {
    display: none;
  }

  @media (min-width: 380px) {
    .header .button-link.contact-link {
      background-color: #B20007;
      color: #fff;
      border: none;
      border-radius: 4px;
      text-decoration: none;
      font-weight: bold;
      margin: 0;
      gap: 4px;
      width: auto;
      max-width: 140px;
      font-size: 12px;
      font-weight: 500;
      padding: 14px 20px;
      height: auto;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.3s;
    }
  }

  .header .button-link.contact-link:hover {
    opacity: 0.7;
  }

  @media (min-width: 890px) {
    .header .button-link.contact-link {
      max-width: 200px;
      font-size: 20px;
      padding: 14px 30px;
      gap: 10px;
      border-radius: 8px;
    }
  }

  .header .button-link.contact-link .contactIcon {
    fill: #fff;
    width: 14px;
    height: 11px;
    flex-shrink: 0;
  }

  @media (min-width: 890px) {
    .header .button-link.contact-link .contactIcon {
      width: 22px;
      height: 17px;
    }
  }

  /* hamburger menu */
  .hamburger-menu {
    left: unset;
    top: 24px;
    right: 10px;
    display: flex;
    background-color: rgba(255, 255, 255, 0.7);
  }

  @media (min-width: 890px) {
    .hamburger-menu {
      display: none;
    }

    .hamburger-menu.close {
      display: flex;
    }
  }

  /* footer */
  .footer {
    background: url(../image/bg_yama.png) center bottom / cover no-repeat, rgba(255, 255, 255, 0.8);
    background-blend-mode: lighten;
    padding-block: 0 40px !important;
    padding-inline: var(--content-spacing-lg);

    /* Grid Layout */
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 40px;
    color: #333;
    grid-template-areas:
      "information"
      "contact"
      "menu"
      "bottom";
      justify-items: center;
  }

  @media (min-width: 768px) {
    .footer {
      padding-block: 60px 40px !important;
      grid-template-columns: auto 1fr auto;
      align-items: start;
      padding-inline: var(--content-spacing-lg);
      grid-template-areas:
      "information information"
      "menu contact"
      "bottom bottom";
      justify-content: center;
      grid-template-columns: 1fr 1fr;
      background: url(../image/bg_yama.png) center bottom / 123.944% 100% no-repeat, rgba(255, 255, 255, 0.8);
    }
  }
  
  @media (min-width: 1060px) {
    .footer {
      grid-template-areas:
      "information menu contact"
      "bottom bottom bottom";
    }
  }

  /* Information (Left) */
  .footer .information {
    padding: 0 !important;
    grid-area: information;
  }

  @media (min-width: 768px) {
    .footer .information {
      align-items: flex-start;
      width: max-content;
    }
  }

  .footer .information .link {
    display: grid;
  }

  .footer .information .logo-text {
    font-size: clamp(0.6875rem, -0.25rem + 5vw, 0.875rem);
    font-weight: 400;
    color: #333;
    text-decoration: none;
    margin-left: clamp(3.25rem, 0.75rem + 13.3333vw, 3.75rem);
  }

  .footer .information .address {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 10px;
  }

  @media (min-width: 768px) {
    .footer .information .address {
      flex-direction: row;
      gap: 16px;
      margin-top: 24px;
      justify-content: flex-start;
    }
  }

  /* Menu (Center) */
  .footer .menu {
    display: flex;
    justify-content: center;
    gap: 30px;
    grid-area: menu;
  }

  @media (min-width: 360px) {
    .footer .menu {
      gap: 60px;
    }
  }

  @media (min-width: 768px) {
    .footer .menu {
      justify-self: end;
    }
  }

  @media (min-width: 1060px) {
    .footer .menu {
      justify-self: unset;
    }
  }

  .footer .menu .block {
    text-align: left;
  }

  .footer .menu .sublist-head {
    display: none;
  }

  .footer .menu .sublist-title {
    display: block;
    font-weight: bold;
    margin-bottom: 22px;
    font-size: 17px;
  }

  .footer .menu .sublist {
    padding: 0;
    margin: 0;
  }

  .footer .menu .sublist .item-li {
    list-style: none;
    margin-bottom: 15px;
  }

  .footer .menu .sublist .link {
    text-decoration: none;
    color: #333;
    font-size: 14px;
  }

    .footer .menu .sublist .link:hover {
      opacity: 1;
      color: var(--main-color);
      font-weight: bold;
    }

  /* Contact (Right) */
  .footer .contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    grid-area: contact;
    max-width: 320px;
  }

  @media (min-width: 768px) {
    .footer .contact {
      justify-self: start;
      align-items: flex-end;
    }
  }

  @media (min-width: 1060px) {
    .footer .contact {
      justify-self: unset;
    }
  }

  .footer .contact .block-tel {
    order: 2;
  }

  @media (min-width: 768px) {
    .footer .contact .block-tel {
      order: 1;
    }
  }

  .footer .contact .tel {
    font-family: "Arial", sans-serif;
    font-size: 30px;
    font-weight: 700;
    color: #333;
    text-decoration: none;
    gap: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 1.5px;
  }

  @media (min-width: 360px) {
    .footer .contact .tel {
      font-size: 36px;
    }
  }


  .footer .contact .telIcon {
    width: 30px;
    height: auto;
    fill: #333;
    margin: 0;
  }

  .footer .contact .tel::before {
    content: none !important;
    /* 親テーマのアイコンを削除 */
  }

  .footer .contact .block-info {
    order: 3;
  }

  @media (min-width: 768px) {
    .footer .contact .block-info {
      order: 2;
    }
  }

  .footer .contact .block-text {
    font-size: var(--text-xs);
  }

  .footer .contact .button-link.contact-link {
    background-color: #B20007;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    padding: 15px 30px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 16px;
    width: 100%;
    max-width: 320px;
    order: 1;
    margin-bottom: 20px;
    border: none;
  }

  @media (min-width: 768px) {
    .footer .contact .button-link.contact-link {
      margin-top: 20px;
      order: 3;
    }
  }

  /* Bottom */
  .footer .bottom {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
    font-size: 12px;
    grid-area: bottom;
  }

  @media (min-width: 768px) {
    .footer .bottom {
      justify-content: flex-start;
    }
  }

  .footer .bottom .link {
    text-decoration: none;
    color: #333;
  }

  .footer .bottom .link:hover {
    opacity: 1;
    color: var(--main-color);
    font-weight: bold;
  }

  .footer a {
    transition: all 0.3s;
  }

  .footer a:hover {
    opacity: 0.7;
  }


  /* global navigation */
  .navigation .contents {
    padding-block: 10px;
    padding-inline: clamp(35px, 24vw, max(calc(50vw - var(--main-width) / 2), 12px));;
  }

  .navigation .contents .divider {
    display: none;
  }

  
  @media (min-width: 768px) {
    .navigation .contents .block {
      grid-template-columns: 1fr;
    }
  }

  .navigation .contents .block .heading,
  .navigation .contents > li > .link {
    font-size: 18px;
    border-bottom: 1px solid #FFF;
    padding: 10px;
    font-weight: 700;
  }

  .navigation .contents > li > .link {
    display: block;
  }

  .navigation .contents .block .heading:before,
  .navigation .contents > li > .link:before {
    content: "";
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11.71 8.71L14.3 11.3C14.3927 11.3925 14.4662 11.5024 14.5164 11.6234C14.5666 11.7443 14.5924 11.874 14.5924 12.005C14.5924 12.136 14.5666 12.2656 14.5164 12.3866C14.4662 12.5076 14.3927 12.6175 14.3 12.71L11.71 15.3C11.08 15.93 9.99999 15.48 9.99999 14.59V9.41C9.99999 8.52 11.08 8.08 11.71 8.71Z' fill='%238EC06E'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: left center;
    width: 24px;
    height: 24px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 6px;
    border: none;
    position: unset;
    transform: unset;
    background-color: unset;
  }

  .navigation .contents .block .list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
    padding-left: 20px;
  }

  .navigation .contents .block .list li {
    min-width: 134px;
  }

  .navigation .link {
    font-weight: 500;
    padding-left: 18px;
  }

  .navigation .link::before {
    border: 1px solid #FFF;
    height: 1px;
    width: 10px;
    transform: unset;
    border: unset;
    background: #fff;
    top: 50%;
  }

  .navigation .contact-block {
    padding-inline: clamp(35px, 24vw, max(calc(50vw - var(--main-width) / 2), 12px));
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
  }
  .navigation .contact-block .contact-link {
    margin-left: 20px;
  }

}