@charset "utf-8";

:root {
  --orange: #ff8a00;
  --blue: #1e90ff;
  --text-main: #1a1a1a;
  --text-sub: #555;
  --border: #e5e5e5;
  --bg-page: #f6f4ef;
}

/* -----------------------------------------------------------
   niwork-top__list
-------------------------------------------------------------- */

.niwork-top__list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 1400px;
  margin: 0 auto;
}

.niwork-top__item {
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  position: relative;
}

.niwork-top__item a {
  color: var(--cmnblack);
  display: block;
  height: 100%;
  padding: 54px 50px 54px;
  text-decoration: none;
}

.niwork-top__item a::after {
  background: var(--main);
  border-radius: 50%;
  bottom: 14px;
  content: "";
  height: 8px;
  position: absolute;
  right: 14px;
  transition: transform 0.3s;
  width: 8px;
}

@media screen and (min-width: 769px) {
  .niwork-top__scroll {
    overflow: initial !important;
  }
  .niwork-top__item a {
    transition: opacity 0.3s;
  }

  .niwork-top__item a:hover {
    opacity: 0.7;
  }

  .niwork-top__item a:hover::after {
    transform: scale(1.6);
  }
}

/* -----------------------------------------------------------
    BeforeAfter サーモ画像
-------------------------------------------------------------- */
.niwork-list__thumb {
  display: flex;
  gap: 40px;
  position: relative;
}

.niwork-list__ba {
  flex: 1;
  min-width: 0;
  position: relative;
}

.niwork-list__ba .img {
  aspect-ratio: 4 / 3;
}

.niwork-list__ba img {
  display: block;
  height: 100%;
  max-width: none;
  object-fit: cover;
  width: 100%;
}

/* ※ .temperature / .caption / .difference-temperature は施工事例一覧（works/）のCMS用クラス */
.thermo-label,
.niwork-list__ba .temperature {
  background: #fff;
  bottom: 0;
  font-family: var(--en);
  font-size: 3.6rem;
  font-weight: 700;
  left: 0;
  letter-spacing: 0.02em;
  line-height: 1;
  padding: 13px 12px 8px 0px;
  position: absolute;
}

.thermo-label small,
.niwork-list__ba .temperature small {
  font-size: 2rem;
  margin-left: 3px;
}

.thermo-tag,
.niwork-list__ba .caption {
  bottom: 0;
  color: #fff;
  font-family: var(--en);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
  position: absolute;
  right: 0;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.35);
  background: var(--main);
  padding: 5px;
}
[data-listba="before"] .thermo-tag,
[data-listba="before"].niwork-list__ba .caption {
  background: #555;
}

.thermo-arrow {
  font-size: 2.2rem;
  font-weight: 700;
  left: 50%;
  line-height: 1;
  position: absolute;
  text-shadow:
    0 0 3px #fff,
    0 0 3px #fff,
    0 0 6px #fff;
  top: 108px;
  transform: translateX(-50%);
  z-index: 2;
}

.room-temp-badge,
.difference-temperature {
  align-items: center;
  background: #fff;
  border: 2px solid var(--blue);
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  color: var(--blue);
  /*display: flex;*/
  flex-direction: column;
  font-weight: 700;
  gap: 6px;
  justify-content: center;
  left: 50%;
  line-height: 1;
  min-width: 110px;
  padding: 12px 12px 14px;
  position: absolute;
  top: 18px;
  transform: translateX(-50%);
  white-space: nowrap;
  z-index: 2;
  font-size: 3rem;
}
.room-temp-badge.plus,
.difference-temperature.plus {
  border: 2px solid #f14a41;
  color: #f14a41;
}

.room-temp-badge span:first-child,
.difference-temperature span:first-child {
  font-size: 1.6rem;
  letter-spacing: 0.1em;
}

.room-temp-badge span:last-child,
.difference-temperature span:last-child {
  font-family: var(--en);
  font-size: 2.8rem;
}

.room-temp-badge small,
.difference-temperature small {
  font-size: 1.5rem;
  margin-left: 2px;
}

/* -----------------------------------------------------------
    プランタグ + 属性
-------------------------------------------------------------- */
.meta-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  font-size: 1.2rem;
  gap: 8px 16px;
  line-height: 1.4;
  margin: 18px 0 0;
}

.plan-tag {
  align-items: center;
  border: 1px solid #ccc;
  border-radius: 3px;
  display: inline-flex;
  font-size: 1.3rem;
  font-weight: 700;
  gap: 6px;
  letter-spacing: 0.05em;
  padding: 5px 10px;
}

.plan-tag .plan-icon {
  flex-shrink: 0;
  height: 16px;
  width: 15px;
}

.niwork-list__ttl {
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.5;
  margin: 10px 0 0;
}

/* -----------------------------------------------------------
    補助金 + 自己負担額
-------------------------------------------------------------- */
.subsidy-box {
  display: flex;
  gap: 30px;
  margin: 20px 0 0;
}

.subsidy {
  border: 1px solid var(--border2);
  flex: 1;
  min-width: 0;
  padding: 18px 16px;
}

.subsidy-label {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.4;
}

.subsidy-name {
  color: var(--gray);
  font-size: 1.3rem;
  line-height: 1.5;
  margin: 6px 0 0;
}

.self-pay {
  flex: 1;
  min-width: 0;
}

.self-pay .label {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.4;
}

.self-pay .amount {
  border-bottom: 2px solid var(--main);
  color: var(--main);
  font-family: var(--en);
  font-size: 4.5rem;
  font-weight: 700;
  line-height: 1;
  padding: 6px 0 6px;
  white-space: nowrap;
  word-spacing: -0.15em;
}

.self-pay .amount small {
  font-family: var(--sans);
  font-size: 2rem;
}

.self-pay .amount small:first-child {
  color: var(--cmnblack);
}

.self-pay .breakdown {
  font-size: 1.2rem;
  line-height: 1.4;
  margin: 6px 0 0;
  text-align: right;
}

.self-pay .price02-list {
  display: flex;
  justify-content: flex-end;
}
.self-pay .price02-list .breakdown:first-of-type::before {
  content: "(" !important;
}
.self-pay .price02-list .breakdown:last-of-type::after {
  content: ")";
}
.self-pay .price02-list .breakdown:last-of-type::before {
  content: "-";
}

/* -----------------------------------------------------------
    お悩み
-------------------------------------------------------------- */
.worry-row {
  align-items: center;
  display: flex;
  gap: 16px;
  margin: 20px 0 0;
}

.worry-tag {
  border: 1px solid var(--blue);
  border-radius: 100px;
  color: var(--blue);
  flex-shrink: 0;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
  padding: 6px 12px;
}

.worry-text {
  font-size: 1.6rem;
  letter-spacing: 0.05em;
  line-height: 1.6;
}

/* -----------------------------------------------------------
    SP（横スクロール）
-------------------------------------------------------------- */
@media screen and (max-width: 768px) {
  .niwork-top__scroll {
    overflow-x: auto;
    padding: 0 20px 20px;
  }

  .niwork-top__list {
    display: flex;
    gap: 20px;
    max-width: none;
    width: max-content;
  }

  .niwork-top__item {
    width: 280px;
  }

  .niwork-top__item a {
    padding: 15px 15px 24px;
  }

  .niwork-top__item a::after {
    bottom: 10px;
    height: 6px;
    right: 10px;
    width: 6px;
  }

  .niwork-list__thumb {
    flex-wrap: wrap;
    gap: 0;
  }

  .niwork-list__ba {
    flex: 0 0 50%;
    /*flex: 1 1 0;*/
  }

  .thermo-label,
  .niwork-list__ba .temperature {
    font-size: 1.6rem;
    padding: 6px 6px 0 6px;
  }

  .thermo-label small,
  .niwork-list__ba .temperature small {
    font-size: 1.1rem;
    margin-left: 2px;
  }

  .thermo-tag,
  .niwork-list__ba .caption {
    font-size: 1rem;
    top: 0;
    bottom: auto;
  }

  .thermo-arrow {
    display: none;
  }

  .room-temp-badge,
  .difference-temperature {
    align-items: baseline;
    border-radius: 0;
    box-shadow: none;
    flex-direction: row;
    gap: 10px;
    margin: 12px 0 0;
    min-width: 0;
    order: 3;
    padding: 7px 10px 8px;
    position: static;
    transform: none;
    width: 100%;
    font-size: 2.3rem;
    display: flex;
  }

  .room-temp-badge span:first-child,
  .difference-temperature span:first-child {
    font-size: 1.4rem;
  }

  .room-temp-badge span:last-child,
  .difference-temperature span:last-child {
    font-size: 2rem;
  }

  .room-temp-badge small,
  .difference-temperature small {
    font-size: 1.2rem;
  }

  .meta-row {
    display: block;
    font-size: 1.1rem;
    margin: 14px 0 0;
  }

  .meta-row > span {
    margin-right: 10px;
  }

  .meta-row .plan-tag {
    display: flex;
    font-size: 1.3rem;
    margin: 0 0 10px;
    width: fit-content;
  }

  .niwork-list__ttl {
    display: -webkit-box;
    font-size: 1.7rem;
    margin: 12px 0 0;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .niwork-list__ttl br {
    display: none;
  }

  .subsidy-box {
    flex-direction: column;
    gap: 16px;
    margin: 16px 0 0;
  }

  .subsidy {
    padding: 12px 16px;
  }

  .subsidy-label {
    font-size: 1.4rem;
  }

  .subsidy-name {
    font-size: 1.2rem;
    margin: 4px 0 0;
  }

  .self-pay {
    align-items: stretch;
    display: flex;
    flex-wrap: wrap;
  }

  .self-pay .label {
    align-items: flex-end;
    border-bottom: 2px solid var(--main);
    display: flex;
    font-size: 1.3rem;
    padding: 0 0 6px;
  }

  .self-pay .amount {
    flex: 1;
    font-size: 3rem;
    padding: 0 0 4px;
    text-align: right;
  }

  .self-pay .amount small {
    font-size: 1.3rem;
  }

  .self-pay .breakdown {
    font-size: 0.9rem;
    width: 100%;
  }

  .worry-row {
    display: none;
  }
}
