/* Chibamil home service cards: original imagery with readable text kept below. */
.home .service-card {
  min-height: 254px;
  padding: 147px 18px 20px;
  background: #fff;
  isolation: isolate;
}

.home .service-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: 122px;
  background-color: #edf5f1;
  background-position: center;
  background-size: cover;
  border-bottom: 1px solid rgba(23, 77, 62, .08);
  transition: transform .3s ease, filter .3s ease;
  transform-origin: center;
}

.home .service-card:hover::before {
  filter: saturate(1.06) brightness(1.03);
  transform: scale(1.035);
}

.home .service-card:nth-child(1)::before {
  background-image: linear-gradient(180deg, rgba(255,255,255,.02), rgba(17,55,44,.08)), url("service-news-720.webp");
  background-position: center 53%;
}

.home .service-card:nth-child(2)::before {
  background-image: linear-gradient(180deg, rgba(255,255,255,.02), rgba(17,55,44,.06)), url("service-disaster-720.webp");
  background-position: center 58%;
}

.home .service-card:nth-child(3)::before {
  background-image: linear-gradient(180deg, rgba(255,255,255,.01), rgba(17,55,44,.05)), url("service-support-720.webp");
  background-position: center 56%;
}

.home .service-card:nth-child(4)::before {
  background-image: linear-gradient(180deg, rgba(255,255,255,.01), rgba(17,55,44,.07)), url("service-hospital-720.webp");
  background-position: center 51%;
}

.home .service-card:nth-child(5)::before {
  background-image: linear-gradient(180deg, rgba(255,255,255,.01), rgba(17,55,44,.06)), url("../chibamil-cognition-support-assets/cognition-consultation-720.webp");
  background-position: center 56%;
}

.home .service-card:nth-child(6)::before {
  background-image: linear-gradient(180deg, rgba(255,255,255,.01), rgba(17,55,44,.06)), url("service-regions-v2-720.webp");
  background-position: center 50%;
}

.home .service-card:nth-child(7)::before {
  background-image: linear-gradient(180deg, rgba(255,255,255,.01), rgba(17,55,44,.06)), url("service-tourism-720.webp");
  background-position: center 52%;
}

.home .service-card:nth-child(8)::before {
  background-image: linear-gradient(180deg, rgba(255,255,255,.01), rgba(17,55,44,.06)), url("service-community-720.webp");
  background-position: center 54%;
}

.home .service-card__icon {
  position: absolute;
  z-index: 2;
  top: 94px;
  left: 18px;
  width: 46px;
  height: 46px;
  margin: 0;
  border: 3px solid #fff;
  box-shadow: 0 7px 18px rgba(18, 62, 49, .17);
}

.home .service-card strong,
.home .service-card p {
  position: relative;
  z-index: 1;
}

.home .service-card strong {
  color: #143b31;
  letter-spacing: .01em;
}

.home .service-card::after {
  z-index: 3;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  color: #174d3e;
  box-shadow: 0 5px 16px rgba(18, 62, 49, .14);
  backdrop-filter: blur(4px);
}

@media (max-width: 760px) {
  .home .service-card {
    min-height: 282px;
    padding: 158px 20px 23px;
  }

  .home .service-card::before {
    height: 134px;
  }

  .home .service-card__icon {
    top: 105px;
    width: 50px;
    height: 50px;
  }

  .home .service-card strong {
    margin-bottom: 10px;
    font-size: 21px;
    line-height: 1.45;
  }

  .home .service-card p {
    font-size: 16px;
    line-height: 1.75;
  }

  .home .service-card .cm-pictogram-label {
    display: none;
  }

  .home .service-card strong {
    margin-top: 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home .service-card::before {
    transition: none;
  }
}

/* “すぐに確認” links: photo-first, readable emergency/service navigation. */
.home .hero-panel .quick-link {
  position: relative;
  min-height: 126px;
  padding: 72px 14px 14px;
  overflow: hidden;
  isolation: isolate;
  background-color: #fff;
  box-shadow: 0 7px 20px rgba(20, 59, 49, .07);
}

.home .hero-panel .quick-link::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: 62px;
  background-color: #e8f3ef;
  background-position: center;
  background-size: cover;
  border-bottom: 1px solid rgba(20, 59, 49, .08);
  transition: filter .2s ease, transform .2s ease;
  transform-origin: center;
}

.home .hero-panel .quick-link:hover::before {
  filter: brightness(1.05) saturate(1.06);
  transform: scale(1.025);
}

.home .hero-panel .quick-link:nth-child(1)::before {
  background-image: linear-gradient(180deg, rgba(255,255,255,.04), rgba(15,52,43,.08)), url("service-disaster-720.webp");
  background-position: center 58%;
}

.home .hero-panel .quick-link:nth-child(2)::before {
  background-image: linear-gradient(180deg, rgba(255,255,255,.03), rgba(15,52,43,.07)), url("service-support-720.webp");
  background-position: center 56%;
}

.home .hero-panel .quick-link:nth-child(3)::before {
  background-image: linear-gradient(180deg, rgba(255,255,255,.03), rgba(15,52,43,.07)), url("service-regions-v2-720.webp");
  background-position: center 50%;
}

.home .hero-panel .quick-link:nth-child(4)::before {
  background-image: linear-gradient(180deg, rgba(255,255,255,.03), rgba(15,52,43,.07)), url("service-community-720.webp");
  background-position: center 54%;
}

.home .hero-panel .quick-link:nth-child(5)::before {
  background-image: linear-gradient(180deg, rgba(255,255,255,.02), rgba(15,52,43,.08)), url("../chibamil-license-return-photo.webp");
  background-position: center 48%;
}

.home .hero-panel .quick-link:nth-child(6)::before {
  background-image: linear-gradient(180deg, rgba(255,255,255,.02), rgba(15,52,43,.08)), url("../chibamil-fraud-police-720.webp");
  background-position: center 42%;
}

.home .hero-panel .quick-link span,
.home .hero-panel .quick-link strong {
  position: relative;
  z-index: 1;
}

.home .hero-panel .quick-link strong {
  color: #143b31;
  font-size: 16px;
  line-height: 1.45;
}

@media (max-width: 760px) {
  .home .hero-panel .quick-links {
    gap: 11px;
  }

  .home .hero-panel .quick-link {
    min-height: 94px;
    padding: 14px 14px 14px 124px;
    justify-content: center;
    gap: 4px;
    border-radius: 17px;
  }

  .home .hero-panel .quick-link::before {
    inset: 0 auto 0 0;
    width: 108px;
    height: auto;
    border-right: 1px solid rgba(20, 59, 49, .08);
    border-bottom: 0;
  }

  .home .hero-panel .quick-link span {
    font-size: 13px;
    line-height: 1.45;
  }

  .home .hero-panel .quick-link strong {
    font-size: 18px;
    line-height: 1.4;
  }
}

/* Mobile home sections: keep the long page compact and let visitors open what they need. */
.cm-home-fold-toggle {
  display: none;
}

.cm-home-fold-body {
  display: contents;
}

@media (max-width: 760px) {
  .cm-home-fold-toggle {
    display: flex;
    width: 100%;
    min-height: 66px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 12px 0 15px;
    padding: 11px 15px;
    border: 1px solid #9fcbbf;
    border-radius: 16px;
    background: linear-gradient(135deg, #f0faf6, #fffaf0);
    color: #17483d;
    box-shadow: 0 6px 18px rgba(21, 70, 57, .08);
    font: inherit;
    text-align: left;
    cursor: pointer;
  }

  .cm-home-fold-toggle span,
  .cm-home-fold-toggle small,
  .cm-home-fold-toggle strong {
    display: block;
  }

  .cm-home-fold-toggle small {
    margin-bottom: 3px;
    color: #58756d;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.4;
  }

  .cm-home-fold-toggle strong {
    color: #153f35;
    font-size: 17px;
    line-height: 1.35;
  }

  .cm-home-fold-toggle b {
    display: grid;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 50%;
    background: #08775b;
    color: #fff;
    font-size: 24px;
    line-height: 1;
  }

  .cm-home-fold-toggle.is-open {
    border-color: #08775b;
    background: #eef9f5;
  }

  .cm-home-fold-toggle--regions {
    position: relative;
    min-height: 94px;
    overflow: hidden;
    padding-left: 124px;
  }

  .cm-home-fold-toggle--regions::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 106px;
    border-right: 1px solid rgba(20, 59, 49, .12);
    background:
      linear-gradient(180deg, rgba(255,255,255,.02), rgba(14,56,45,.12)),
      url("service-regions-v2-720.webp") center 50% / cover no-repeat;
  }

  .cm-home-fold-toggle--regions > span,
  .cm-home-fold-toggle--regions > b {
    position: relative;
    z-index: 1;
  }

  .cm-home-fold-toggle:focus-visible {
    outline: 3px solid #f0a444;
    outline-offset: 3px;
  }

  .cm-home-fold-body {
    display: block;
  }

  .cm-home-fold-body[hidden] {
    display: none !important;
  }
}
