/* =============================
    メインビジュアル
============================= */
.container {
  background: url(../img/hero-bg.jpg) center/contain;
}

.hero {
  height: auto;
  max-height: 800px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 min(100px, 5%);
}

.hero-text {
  width: 45%;
  height: 100%;
  display: flex;
  justify-content: space-between;
  position: relative;
}

.hero-text .catch1 {
  position: absolute;
  top: 20%;
  left: 0px;
}

.hero-image span {
  margin-top: 32px;
}

.hero-image {
  position: relative;
  width: 60%;
}

.hero-image img {
  width: 100%;
  max-height: 800px;
  aspect-ratio: 1/1;
  object-fit: cover;
}

.hero-image .catch2 {
  position: absolute;
  top: 5%;
  left: -70px;
  writing-mode: vertical-rl;
  text-align: center;
  font-size: 1.8rem;
  line-height: 2;
  margin-left: auto;
  margin-bottom: 100px;
}

.scrolldown {
  position: absolute;
  bottom: 10px;
  left: 20px;
}

.scrolldown span {
  /*描画位置*/
  position: absolute;
  left: -10px;
  bottom: 100px;
  /*テキストの形状*/
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  /*縦書き設定*/
  -ms-writing-mode: tb-rl;
  -webkit-writing-mode: vertical-rl;
  writing-mode: vertical-rl;
  font-family: "Barlow", sans-serif;
}

/* 丸の描写 */
.scrolldown:before {
  content: "";
  /*描画位置*/
  position: absolute;
  bottom: 0;
  left: -4px;
  /*丸の形状*/
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-color);
  /*丸の動き1.6秒かけて透過し、永遠にループ*/
  animation: circlemove 1.6s ease-in-out infinite,
    cirlemovehide 1.6s ease-out infinite;
}

/*下からの距離が変化して丸の全体が上から下に動く*/
@keyframes circlemove {
  0% {
    bottom: 45px;
  }
  100% {
    bottom: -5px;
  }
}

/*上から下にかけて丸が透過→不透明→透過する*/
@keyframes cirlemovehide {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  80% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
  }
}

/* 線の描写 */
.scrolldown:after {
  content: "";
  /*描画位置*/
  position: absolute;
  bottom: 0;
  left: 0;
  /*線の形状*/
  width: 1px;
  height: 80px;
  background: var(--text-color);
}

/* =============================
    コンテンツセクション共通
============================= */
.problems,
.services,
.news,
.contact {
  padding: 8rem calc(16% + 50px) 8rem 16%;
}

.section-title {
  margin-bottom: 4rem;
  text-align: center;
}

.section-title h2 {
  font-size: 2.5rem;
}

/* =============================
    お悩み解決
============================= */
.section-title .target {
  display: flex;
  margin-top: 2rem;
  justify-content: center;
}

.section-title .target span {
  color: #fff;
  background-color: var(--base-color);
  padding: 5px 10px;
  margin: 0 15px 0 0;
  font-size: 0.7rem;
  white-space: nowrap;
}

.problem-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.problem-box {
  border: 1px solid var(--text-color);
  padding: 1.5rem;
}

.problem-box h3 {
  font-size: 1.5rem;
  border-bottom: 1px solid var(--text-color);
}

.problem-box p {
  padding-top: 1.5rem;
}

/* =============================
    日々吉にできること
============================= */

.service-card {
  position: relative;
  border: 1px solid var(--text-color);
  margin: 2rem 0;
  padding: 2.5rem;
}

.service-button {
  position: absolute;
  right: 0;
  width: 150px;
}

.service-card a {
  display: inline-block;
  padding: 0.5rem 1.2rem;
  background: var(--base-color);
  color: #fff;
  text-decoration: none;
}

.service-wrap {
  display: flex;
  justify-content: space-between;
}

.service-title {
  margin-bottom: 48px;
}

.service-sub-title {
  font-size: 1.2rem;
}

.service-title h3 {
  font-size: 2.3rem;
  margin: 0.2em 0;
}

.service-card ul li {
  margin-bottom: 16px;
}

/* =============================
    お知らせ
============================= */

.news dl {
  display: flex;
  flex-wrap: wrap;
}

.news dt {
  width: 20%;
  border-bottom: 1px solid var(--text-color);
  padding: 1rem;
}

.news dd {
  width: 80%;
  border-bottom: 1px solid var(--text-color);
  padding: 1rem;
}

/*========================================================
    Media Queries (タブレット対応: 1310px以下)
========================================================*/
@media (max-width: 1310px) {
  .hero {
    display: block;
    position: relative;
    padding: 0;
  }
  .hero-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }
  .hero-text .catch1 {
    position: absolute;
    z-index: 1;
    top: 6%;
    left: 5%;
    writing-mode: vertical-rl;
    font-size: clamp(10px, 1.5vw, 0.9rem);
  }

  .hero-image .catch2 {
    top: 5%;
    right: 12%;
    margin: 0;
    font-size: clamp(18px, 2.15vw, 1.8rem);
  }

  .hero-image {
    width: 100%;
  }

  .hero-image img {
    aspect-ratio: auto;
  }
}

/*========================================================
    Media Queries (タブレット対応: 1310px以下)
========================================================*/
@media (max-width: 1310px) {
  .hero {
    display: block;
    position: relative;
    padding: 0;
  }
  .hero-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }
  .hero-text .catch1 {
    position: absolute;
    z-index: 1;
    top: 6%;
    left: 5%;
    writing-mode: vertical-rl;
    font-size: clamp(10px, 1.5vw, 0.9rem);
  }

  .hero-image .catch2 {
    top: 5%;
    right: 12%;
    margin: 0;
    font-size: clamp(18px, 2.15vw, 1.8rem);
  }

  .hero-image {
    width: 100%;
  }

  .hero-image img {
    aspect-ratio: auto;
  }
}

/* ========================================================
    Media Queries (タブレット対応: 1024px以下)
======================================================== */
@media (max-width: 1024px) {
  .problems,
  .services,
  .news,
  .contact {
    padding: 6rem calc(10% + 40px) 6rem 10%;
  }

  .problem-grid {
    gap: 1.5rem;
  }

  .section-title h2 {
    font-size: 2rem;
  }

  .problem-box h3 {
    font-size: 1.35rem;
  }
}

/*========================================================
    Media Queries (タブレット対応: 768px以下)
========================================================*/
@media (max-width: 768px) {
  /*全セクションのパディング*/
  .problems,
  .services,
  .news,
  .contact {
    padding: 4rem 5%;
  }

  .section-title h2 {
    font-size: 1.8rem;
  }

  /*Hero*/
  .hero {
    flex-direction: column;
    width: 100%;
    height: calc(100vh - 60px);
    max-height: 500px;
    padding: 0;
    position: relative;
  }

  .hero-image {
    width: 100%;
    height: 100%;
  }

  .hero-image img {
    height: 100%;
    width: 100%;
    object-fit: cover;
  }

  .hero-image span {
    margin-top: 1em;
  }

  .hero-text .catch1 {
    top: 6%;
    left: 5%;
    font-size: 12px;
    font-weight: 600;
    text-shadow: 1px 1px 8px #fff, -1px -1px 8px #fff, 2px 2px 8px #fff,
      -2px -2px 8px #fff, 3px 3px 8px #fff, -3px -3px 8px #fff;
  }

  .hero-image .catch2 {
    top: 5%;
    right: 5%;
    font-size: 21px;
    font-weight: 600;
    text-shadow: 1px 1px 8px #fff, -1px -1px 8px #fff, 2px 2px 8px #fff,
      -2px -2px 8px #fff, 3px 3px 8px #fff, -3px -3px 8px #fff;
  }

  /* SCROLL インジケータを再現 */
  .scrolldown {
    position: absolute;
    bottom: 20px;
    left: 5%;
    right: auto;
    z-index: 2;
  }

  .scrolldown:after {
    height: 50px; /* 長さを調整 */
  }

  .scrolldown span {
    bottom: 70px;
  }

  /* =============================
    日々吉にできること
============================= */

  .service-title h3 {
    font-size: 2.1rem;
    margin: 0.2em 0;
  }

  .service-card {
    position: relative;
    border: 1px solid var(--text-color);
    margin: 2rem 0;
    padding: 20px 20px 80px 20px;
  }

  .service-button {
    width: auto;
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
  }

  .service-button a {
    padding: 0;
    width: 150px;
    height: 40px;
    text-align: center;
    line-height: 40px;
  }

  .service-title {
    margin-bottom: 12px;
  }

  /* --------------------
    Other Sections
    -------------------- */
  .problem-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .service-wrap {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 24px;
  }

  .service-button {
    margin-top: 1rem;
  }

  .news dt {
    width: 100%;
    padding-bottom: 0.5rem;
  }
  .news dd {
    width: 100%;
    padding-top: 0.5rem;
    margin-bottom: 1rem;
  }
  .news dl {
    display: block;
  }
}
