/*
Theme Name: daria
Author: 有限会社アイ・ワーク
Description: 有限会社ダリアサイトテーマ
Version: 1.0.1
*/

/* =======================================================================
   Common
======================================================================= */
main {
  box-sizing: border-box;
  margin-block-start: 0 !important;
  overflow-x: hidden;
}

a {
  transition: opacity 0.3s ease;

  &:hover {
    opacity: 0.5;
  }
}

p {
  margin-block-start: 0 !important;
  line-height: 1.8;
  text-align: justify;

  &:empty {
    display: none;
  }
}

.wp-block-spacer {
  margin-block-start: 0 !important;
}

:root :where(.is-layout-constrained) > * {
  margin-block-start: 0 !important;
}

.wp-block-query-pagination {
    gap: 0.5rem;

    .wp-block-query-pagination-numbers {
        .page-numbers {
            background-color: #FFF;
            border: 1px solid #1EAA39;
            border-radius: 100vmax;
            color: #1EAA39;
            display: inline-block;
            margin-right: 16px;
            padding: 0;
            text-decoration: none;
            text-align: center;
            line-height: 30px;
            height: 32px;
            width: 32px;

            &.current {
                background-color: #1EAA39;
                color: #FFF;
            }
        }
    } /* //.wp-block-query-pagination-numbers */

    .wp-block-query-pagination-next,
    .wp-block-query-pagination-previous {
        color: #1EAA39;
        display: inline-block;
        margin-right: 16px;
        padding: 4px 12px;
        text-decoration: none;
        position: relative;

        &:hover {
            opacity: 0.7;
        }
    }

    .wp-block-query-pagination-next {
        &:after {
            content: "\f138";
            color: #1EAA39;
            font-family: 'Font Awesome 7 Free';
            font-size: 1rem;
            font-weight: 900;
            position: absolute;
            top: 50%;
            right: -16px;
            transform: translateY(-50%);
        }
    }

    .wp-block-query-pagination-previous {
        &:before {
            content: "\f137";
            color: #1EAA39;
            font-family: 'Font Awesome 7 Free';
            font-size: 1rem;
            font-weight: 900;
            position: absolute;
            top: 50%;
            left: -16px;
            transform: translateY(-50%);
        }
    }
} /* //.wp-block-query-pagination */

.section-title {
  color: #58151c;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;

  &:before {
    content: "";
    background: url("assets/images/ornate_image.svg") no-repeat;
    background-size: contain;
    width: 32px;
    height: 35px;
  }
}

.page-title {
  position: relative;

  &::before {
    content: "";
    background: url("assets/images/tree_01.svg") no-repeat;
    background-size: contain;
    position: absolute;
    top: -1rem;
    left: 0;
    width: 50vw;
    height: 50vw;
    z-index: 100;
  }

  .page-title__image {
    border-radius: 0 0 0 30px;
    margin-left: auto;
    margin-right: 0;
    height: clamp(10.625rem, 6.664rem + 16.9vw, 21.875rem);
    width: 70vw;
  }

  .page-title__title {
    background: #fff;
    border-radius: 100vmax;
    color: #543a22;
    font-size: clamp(1.5rem, 1.159rem + 1.45vw, 2.25rem);
    padding: 0.5rem clamp(1rem, 0.12rem + 3.76vw, 3.5rem);
    text-align: center;
    position: absolute;
    bottom: 2.5rem;
    left: 10vw;
    width: fit-content;
    min-width: 25vw;
    z-index: 100;
  }
}

.file_button {
  .wp-block-file__button {
    background: rgb(30, 170, 57);
  }
}

/* =======================================================================
   Utilities
======================================================================= */
/* マージンユーティリティ */
.u-mt-0 {
  margin-top: 0 !important;
}

.u-mt-12 {
  margin-top: 0.75rem !important;
}

.u-mt-24 {
  margin-top: 1.5rem !important;
}

.u-mt-32 {
  margin-top: 2rem !important;
}

.u-mt-40 {
  margin-top: 2.5rem !important;
}

/* 文字間隔ユーティリティ */
.u-ls-n15 {
  letter-spacing: -1.5px;
}

/* PC表示・スマホ表示切替ユーティリティ */
.u-pc-hide {
  display: block !important;
}

.u-sp-hide {
  display: none !important;
}

.u-hide {
  display: none !important;
}

/* font-size: 16px */
.u-text-base {
  font-size: 1rem !important;
}
/* font-size: 20px - 18px */
.u-text-md {
  font-size: clamp(1.125rem, 1.068rem + 0.24vw, 1.25rem) !important;
}
/* font-size: 24px - 20px */
.u-text-lg {
  font-size: clamp(1.25rem, 1.136rem + 0.48vw, 1.5rem) !important;
}
/* font-size: 30px - 20px */
.u-text-xl {
  font-size: clamp(1.25rem, 0.966rem + 1.21vw, 1.875rem) !important;
}
/* font-size: 36px - 24px */
.u-text-xxl {
  font-size: clamp(1.5rem, 1.159rem + 1.45vw, 2.25rem) !important;
}

.u-speech-bubble {
  position: relative;

  &:before {
    content: "";
    position: absolute;
    left: -10px;
    top: 50%;
    width: 16px;
    height: 16px;
    background: inherit;
    clip-path: polygon(100% 0, 100% 100%, 0 50%);
    transform: translateY(-50%);
  }
}

/* =======================================================================
   Header
======================================================================= */
nav.wp-block-navigation {
  padding-top: 80px;
}

.header-container {
  margin: 0 auto !important;
  max-width: 1280px;
}

/* ハンバーガーメニュー */
.custom-hamburger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 48px;
  height: 48px;
  background: #689f00;
  border: none;
  border-radius: 100vmax;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
  position: fixed;
  top: 16px;
  right: 16px;

  span {
    display: block;
    background: #fff;
    border-radius: 100vmax;
    height: 3px;
    width: 24px;
    margin: 2px 0;
    transition: all 0.3s;
    position: relative;
  }

  &.active span {
    &:nth-child(1) {
      transform: translateY(7px) rotate(45deg);
    }
    &:nth-child(2) {
      opacity: 0;
    }
    &:nth-child(3) {
      transform: translateY(-7px) rotate(-45deg);
    }
  }
}

/* ナビゲーションのカスタム表示（スマホ時） */
.custom-nav-wrap {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #689f00;
  z-index: 1000;
  padding-left: 16px;
  padding-right: 16px;
  text-align: left;

  &.active {
    display: block;
    animation: fadeIn 0.2s;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.wp-block-navigation__container {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  display: inline-block;

  li {
    margin: 0 0 24px 0;
  }

  a {
    display: block;
    font-size: 1rem;
    text-decoration: none;
    transition: opacity 0.3s ease;
    font-family: "Zen Maru Gothic", "Zen Maru Gothic JP", "ヒラギノ丸ゴ ProN",
      "Hiragino Maru Gothic ProN", "メイリオ", Meiryo, sans-serif;

    &:hover {
      opacity: 0.5;
    }
  }

  &.wp-block-navigation {
    .wp-block-navigation-item {
      border-bottom: 1px solid #fff;
      color: #fff;
      padding-bottom: 8px;
    }
  }

  .header-nav__item--contact {
    border-bottom: none !important;

    a {
      background: #e95513;
      border-radius: 100vmax;
      color: #fff !important;
      display: block;
      padding: 4px 16px;
      width: fit-content;
    }
  }
}

/* WordPress標準のハンバーガーアイコンを非表示 */
.wp-block-navigation__responsive-container-open {
  display: none !important;
}

/* メニューオープン時のbodyスクロール禁止 */
body:has(.active) {
  overflow: hidden !important;
}

/* =======================================================================
   Footer
======================================================================= */
footer {
  margin-block-start: 0 !important;

  p {
    margin-block-start: 0.75rem !important;
  }

  .footer-logo {
    text-align: center;
  }

  .address {
    margin: 1.5rem auto;
    width: fit-content;
  }

  .staff {
    img {
      max-height: 90px;
    }
  }

  .contact-form__button {
    background: #fff url("assets/images/email.png") no-repeat;
    background-position-x: 8px;
    background-size: 96px;
    border-radius: 20px;
    color: #689f00;
    display: block;
    font-weight: 700;
    padding: 16px;
    text-align: center;
    text-decoration: none;
  }

  .footer-nav {
    color: #fff;
    list-style-type: none;
    line-height: 1.8;
    margin-left: -1rem;

    > li {
      font-weight: 700;

      a {
        color: #fff;
        text-decoration: none;

        &:hover {
          opacity: 0.7;
        }
      }

      li {
        font-weight: 400;
        list-style-type: "- ";
      }
    }
  }
}

.page-top {
  cursor: pointer;
  position: fixed;
  bottom: 112px;
  right: 16px;
  z-index: 100;

  &:hover {
    opacity: 0.7;
  }
}

.grecaptcha-badge {
  visibility: hidden;
}

/* =======================================================================
   店舗一覧
======================================================================= */
.store-list {
  display: block;
  max-width: 100% !important;
}

.store-item {
  display: flex;
  align-items: center;
  background-color: transparent;
  border-bottom: 1px solid #ddd;
  padding: 12px 0;
}

/* SP表示では画像を非表示にする */
.store-item__images {
  display: none;
}

.store-item__meta {
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
}

/* 地域タグ */
.store-tag {
  font-size: 14px;
  background-color: #e57373;
  color: #fff;
  padding: 4px 10px;
  border-radius: 20px;
  text-decoration: none;
  margin: 0;
  flex-shrink: 0;
}

/* 店舗名 */
.store-name {
  font-size: 16px;
  font-weight: 500;
  margin-left: 10px;
}

/* 店舗名のリンク */
.store-name a {
  text-decoration: none;
  color: #555;
}

/* =======================================================================
   お問い合わせ
======================================================================= */
.form-container {
  position: relative;
  z-index: 150;
}

/* =======================================================================
   Media Query
======================================================================= */
@media (min-width: 769px) {
  html {
    scroll-padding-top: 102px;
  }

  header {
    background-color: rgb(255 255 255 / 0.8);
    position: fixed;
    width: 100%;
    z-index: 200;
  }

  .page-title {
    &::before {
      top: -5rem;
      width: 45vw;
      height: 45vw;
    }

    .page-title__title {
      left: 15vw;
    }
  }

  .u-pc-hide {
    display: none !important;
  }

  .u-sp-hide {
    display: block !important;
  }

  nav.wp-block-navigation {
    padding-top: 0;
  }

  .custom-hamburger {
    display: none;
  }

  .custom-nav-wrap {
    display: block !important;
    position: static;
    background: none;
    padding-top: 0;
    text-align: right;
  }

  .wp-block-navigation__container {
    display: flex;
    gap: 24px;

    li {
      margin: 0;
    }

    &.wp-block-navigation {
      .wp-block-navigation-item {
        border-bottom: none;
        color: #212529;
        padding: 0;
      }
    }
  }

  footer {
    .footer-logo {
      text-align: left;
    }

    .address {
      margin: 1.5rem 0;
    }

    .staff {
      img {
        max-height: 108px;
      }
    }

    .footer-nav {
      margin-left: 0;
    }
  }

  /* 
    固定ページ、投稿ページ共通のコンテナ
    固定ヘッダー分の余白を確保する（PC表示のみ）
     */
  .main-offset {
    padding-top: 102px;
  }

  /* 店舗一覧の横スクロールコンテナ */
  .store-list__container {
    max-width: 100% !important;
  }

  /* 店舗一覧全体のコンテナ */
  .store-list {
    display: flex;
    flex-wrap: nowrap;
    gap: 24px;
    padding: 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;

    /* スクロールバーを非表示 */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */

    &::-webkit-scrollbar {
      display: none; /* Chrome, Safari, Opera */
    }

    cursor: grab; /* ドラッグ可能なカーソルに変更 */
    user-select: none; /* テキスト選択を無効化 */
    -ms-user-select: none;
    -moz-user-select: none;
    -webkit-user-select: none;

    /* ドラッグ中のカーソル */
    &:active {
      cursor: grabbing;
    }
  }

  /* 個々の店舗ブロック */
  .store-item {
    flex: 0 0 auto;
    width: 250px;
    height: 250px;
    background-color: #fff;
    border-radius: 30px;
    box-shadow: 0 4px 12px rgb(0 0 0 / 10%);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px;
    box-sizing: border-box;

    figure {
      margin: 0 0 1rem;
    }
  }

  /* サムネイル画像 */
  .store-item__images {
    display: block;
    width: 202px;
    height: 115px !important;
    object-fit: cover;
    border-radius: 15px;
  }

  /* メタ情報（地域タグと店舗名）のコンテナ */
  .store-item__meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  /* 地域タグ */
  .store-tag {
    display: inline-block;
    background-color: #e57373;
    color: #fff;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 20px;
    text-decoration: none;
    margin-bottom: 8px;
  }

  /* 店舗名 */
  .store-name {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
  }

  /* 店舗名のリンク */
  .store-name a {
    text-decoration: none;
    color: #555;
  }
}
