/* 賃貸経営ニュースの一覧(2026-11-08 たいちが4案から a を選んだ。並べ方は src/components/owner/NewsList.astro)。
   色と書体はサイトの決まり(style.css の変数)の中で。参考画像の青は使わず、選んだ所は黒、印はロゴの黄緑 */

.nl {
  --nl-radius: 12px;
  --nl-shadow: 0 0 0 1px rgba(30, 50, 70, 0.06), 0 3px 12px rgba(30, 50, 70, 0.08);
  --nl-shadow-hover: 0 0 0 1px rgba(30, 50, 70, 0.08), 0 10px 24px rgba(30, 50, 70, 0.14);
  background: #fafcfe;
  padding-bottom: 88px;
}
.nl [hidden],
.nl[data-mode="results"] [data-top-only] {
  display: none;
}
.nl-ico {
  width: 22px;
  height: 22px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ===== 明るい帯(左に題と説明、右に建物の写真) ===== */
.nl-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 320px;
  overflow: hidden;
  background: linear-gradient(90deg, #eef2f6 0%, #f6f8fa 45%, #fff 100%);
}
.nl-hero-photo {
  position: absolute;
  inset: 0 0 0 auto;
  width: 62%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 34%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 34%);
}
.nl-hero-inner {
  position: relative;
  padding-block: 56px;
}
.nl-hero h1 {
  font-family: var(--font-display);
  font-weight: var(--font-display-weight);
  font-size: clamp(32px, 3.4vw, 46px);
  letter-spacing: 0.08em;
  line-height: 1.35;
  color: var(--color-text);
}
.nl-hero h1::after {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  margin-top: 18px;
  background: var(--brand-green);
}
.nl-hero p {
  max-width: 34em;
  margin-top: 20px;
  font-size: 15px;
  line-height: 2;
  color: var(--color-text-sub);
}

.nl-wrap {
  padding-top: 40px;
}
.nl-empty-all {
  padding: 64px 0;
  text-align: center;
  color: var(--color-text-sub);
}

/* ===== 記事を探す+この言葉で探す ===== */
.nl-find {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 28px;
}
.nl-search {
  display: flex;
  flex: 1 1 420px;
  max-width: 520px;
  min-height: 56px;
  overflow: hidden;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(30, 50, 70, 0.05);
}
.nl-search:focus-within {
  border-color: var(--color-text);
}
.nl-search label {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding-left: 22px;
  color: var(--color-text-sub);
}
.nl-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  /* 16px 未満だと iPhone の Safari で押した時に画面が拡大される(2026-11-10 再総点検 g3-1) */
  font-size: 16px;
  color: var(--color-text);
}
.nl-search button {
  flex: none;
  margin: 6px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: var(--color-text);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.nl-words {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.nl-words > p {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-sub);
}
.nl-words ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nl-word {
  display: inline-block;
  padding: 7px 16px;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  white-space: nowrap;
}
.nl-word:is(:hover, :focus-visible) {
  border-color: var(--color-text);
}

/* ===== 分類の札(印つき・横一列。選んだ札は黒) ===== */
.nl-tabs {
  display: flex;
  margin-top: 28px;
  overflow-x: auto;
  border-radius: var(--nl-radius);
  background: #fff;
  box-shadow: var(--nl-shadow);
  scrollbar-width: none;
}
.nl-tabs::-webkit-scrollbar {
  display: none;
}
.nl-tabs a {
  position: relative;
  display: flex;
  flex: 1 0 140px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 104px;
  padding: 14px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  white-space: nowrap;
}
.nl-tabs a + a::before {
  content: "";
  position: absolute;
  top: 26px;
  bottom: 26px;
  left: 0;
  border-left: 1px solid var(--color-line);
}
.nl-tabs a .nl-ico {
  width: 30px;
  height: 30px;
}
.nl-tabs small {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-sub);
}
.nl-tabs a:is(:hover, :focus-visible):not([aria-current]) {
  background: var(--color-soft);
}
.nl-tabs a[aria-current] {
  background: var(--color-text);
  color: #fff;
}
.nl-tabs a[aria-current] .nl-ico {
  color: var(--brand-green);
}
.nl-tabs a[aria-current] small {
  color: var(--color-dark-text-sub);
}
.nl-tabs a[aria-current]::before,
.nl-tabs a[aria-current] + a::before {
  display: none;
}

/* ===== 記事の札(components/owner/NewsCard.astro) ===== */
.nl-item > a {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: var(--nl-radius);
  background: #fff;
  box-shadow: var(--nl-shadow);
  color: var(--color-text);
  text-decoration: none;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}
.nl-item > a:is(:hover, :focus-visible) {
  transform: translateY(-4px);
  box-shadow: var(--nl-shadow-hover);
}
.nl-img {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--color-soft);
}
.nl-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.nl-item > a:is(:hover, :focus-visible) .nl-img img,
.nl-cat-card:is(:hover, :focus-visible) .nl-img img {
  transform: scale(1.04);
}
.nl-img.is-figure {
  padding: 10px;
  background: #fff;
}
.nl-img.is-figure img {
  object-fit: contain;
}
.nl-img.is-empty {
  background:
    var(--color-primary) url("/img/brand/nehayas-mark-green.png") center / 72px auto no-repeat;
}
.nl-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  padding: 16px 18px 20px;
}
.nl-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--color-text-sub);
}
.nl-cat {
  padding: 2px 10px;
  border-radius: 4px;
  background: var(--color-text);
  color: #fff;
  font-weight: 700;
}
.nl-title {
  display: -webkit-box;
  overflow: hidden;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.nl-excerpt {
  display: -webkit-box;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.8;
  color: var(--color-text-sub);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
/* カードの列の数は、カードの枚数に合わせる(1枚なら横長1枚、2枚なら2列、3枚なら3列) */

/* ===== 記事一覧 ===== */
.nl-list-sec {
  margin-top: 56px;
  scroll-margin-top: calc(var(--header-height) + 24px);
}
.nl[data-mode="results"] .nl-list-sec {
  margin-top: 40px;
}
.nl-list-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 20px;
}
.nl-list-head h2 {
  font-family: var(--font-display);
  font-weight: var(--font-display-weight);
  font-size: 26px;
  letter-spacing: 0.06em;
}
.nl-status {
  font-size: 13px;
  color: var(--color-text-sub);
}
.nl-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nl-empty {
  padding: 40px 0;
  text-align: center;
  color: var(--color-text-sub);
}
.nl-empty a {
  margin-left: 8px;
  font-weight: 700;
  color: var(--color-text);
}
.nl-more {
  margin-top: 36px;
  text-align: center;
}
.nl-more button {
  min-width: 280px;
  min-height: 54px;
  padding: 0 32px;
  border: 2px solid var(--color-text);
  border-radius: 999px;
  background: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
  cursor: pointer;
}
.nl-more button::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: -3px 0 0 14px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  vertical-align: middle;
}
.nl-more button:is(:hover, :focus-visible) {
  background: var(--color-text);
  color: #fff;
}

/* ===== 分類から読む(横にすべる) ===== */
.nl-cats {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  align-items: center;
  gap: 40px;
  margin-top: 72px;
  padding: 48px 40px 40px;
  border-radius: var(--nl-radius);
  background: var(--color-soft);
}
.nl-cats-head h2 {
  padding-left: 14px;
  border-left: 4px solid var(--brand-green);
  font-family: var(--font-display);
  font-weight: var(--font-display-weight);
  font-size: 28px;
  letter-spacing: 0.06em;
}
.nl-cats-head p {
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--color-text-sub);
}
.nl-scroller {
  display: grid;
  grid-auto-columns: calc((100% - 20px) / 2.3);
  grid-auto-flow: column;
  gap: 20px;
  margin-inline: -4px;
  padding: 4px 4px 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.nl-scroller > * {
  scroll-snap-align: start;
}
.nl-cat-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--nl-radius);
  box-shadow: var(--nl-shadow);
  color: #fff;
  text-decoration: none;
}
.nl-cat-card .nl-img {
  position: relative;
  aspect-ratio: 16 / 9;
}
.nl-cat-card .nl-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 20, 20, 0.05) 30%, rgba(20, 20, 20, 0.82) 100%);
}
.nl-cat-card-body {
  position: absolute;
  right: 22px;
  bottom: 18px;
  left: 22px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nl-cat-card-name {
  font-size: 20px;
  font-weight: 700;
}
.nl-cat-card-count {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
}

/* ===== タブレット ===== */
@media (max-width: 900px) {
  .nl-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .nl-cats {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
}

/* ===== スマホ(カードは2列。縦1列に長く積まない) ===== */
@media (max-width: 760px) {
  .nl {
    padding-bottom: 64px;
  }
  .nl-hero {
    align-items: flex-end;
    min-height: 0;
    background: #eef2f6;
  }
  .nl-hero-photo {
    width: 100%;
    opacity: 0.22;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .nl-hero-inner {
    padding-block: 44px 36px;
  }
  .nl-hero p {
    font-size: 14px;
    line-height: 1.9;
  }
  .nl-wrap {
    padding-top: 24px;
  }
  /* 縦に並べる時は折り返さない(折り返すと、言葉の札の長さに引っぱられて探す欄が画面からはみ出す) */
  .nl-find {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 14px;
  }
  .nl-search {
    flex: none;
    max-width: none;
    min-height: 50px;
  }
  .nl-words {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .nl-words > p {
    flex: none;
    font-size: 12px;
  }
  .nl-words ul {
    flex-wrap: nowrap;
  }
  .nl-word {
    padding: 6px 14px;
  }
  .nl-tabs {
    gap: 8px;
    margin-top: 18px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  .nl-tabs a {
    flex: 0 0 auto;
    flex-direction: row;
    gap: 6px;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--color-line);
    border-radius: 999px;
    background: #fff;
    font-size: 13px;
  }
  .nl-tabs a + a::before {
    display: none;
  }
  .nl-tabs a .nl-ico {
    width: 18px;
    height: 18px;
  }
  .nl-tabs a[aria-current] {
    border-color: var(--color-text);
  }

  /* カード: 2列。題は3行まで、要約は隠す */
  .nl-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 12px;
  }
  .nl-body {
    gap: 6px;
    padding: 10px 12px 14px;
  }
  .nl-meta {
    font-size: 11px;
  }
  .nl-cat {
    padding: 1px 8px;
  }
  .nl-title {
    font-size: 13.5px;
    line-height: 1.6;
  }
  /* 説明はスマホでも消さない(2026-11-08 夜の決まり)。小さめの字で3行まで */
  .nl-excerpt {
    font-size: 12px;
    line-height: 1.7;
    -webkit-line-clamp: 3;
  }
  /* 1枚だけの時と、3枚の時の3枚目は、横いっぱいの横長にして行を埋める */
  .nl-list-sec {
    margin-top: 40px;
  }
  .nl-list-head h2 {
    font-size: 21px;
  }
  .nl-more button {
    width: 100%;
    min-width: 0;
  }
  .nl-cats {
    margin-top: 48px;
    margin-inline: calc(var(--gutter) * -1);
    padding: 36px var(--gutter) 28px;
    border-radius: 0;
  }
  .nl-cats-head h2 {
    font-size: 22px;
  }
  .nl-scroller {
    grid-auto-columns: 72%;
    gap: 12px;
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    scroll-padding-inline: var(--gutter);
  }
  .nl-cat-card-name {
    font-size: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nl-item > a,
  .nl-img img {
    transition: none;
  }
  .nl-item > a:is(:hover, :focus-visible) {
    transform: none;
  }
}

/* ===== 査定の帯(記事の並びの外。記事のカードと見分けがつくよう、写真を使わない薄い黄緑の横長の帯) ===== */
.nl-satei-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin-top: 48px;
  padding: 28px 36px;
  border: 1px solid #d6ebaa;
  border-left: 6px solid var(--brand-green);
  border-radius: 8px;
  background: #f4f9ea;
}
/* パソコンは右の列に査定の箱があるので、帯は絞り込んで右の列が消えた時だけ出す */
@media (min-width: 761px) {
  .nl[data-mode="top"] .nl-satei-band {
    display: none;
  }
}
.nl[data-mode="results"] .nl-satei-band {
  margin-top: 40px;
}
.nl-satei-band-text {
  display: grid;
  gap: 6px;
}
.nl-satei-band-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
}
.nl-satei-band-text p:not(.nl-satei-band-title) {
  font-size: 14px;
  line-height: 1.8;
  color: var(--color-text-sub);
}
.nl-satei-band .btn {
  flex: none;
  min-width: 260px;
}
/* スマホは記事のカードの下に「らくらく賃料査定」のボタンだけを置く。帯の地と文は出さない(2026-11-09 たいち「どれが記事かわかんない」) */
@media (max-width: 760px) {
  .nl-satei-band {
    display: block;
    margin-top: 28px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
  }
  .nl-satei-band-text {
    display: none;
  }
  .nl-satei-band .btn {
    display: flex;
    width: 100%;
    min-width: 0;
  }
}

/* ===== パソコンの上の段(参考画像の形): 左に大きい注目記事と小さいカード、右の列に査定の箱と新着記事 ===== */
.nl-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: start;
  gap: 24px;
  margin-top: 40px;
}
.nl-top-main {
  display: grid;
  gap: 20px;
}
.nl-top-side {
  display: grid;
  gap: 20px;
}
/* 小さいカードはいつも3列の枠に入れる(1枚・2枚でも伸ばさない) */
.nl-picks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nl-picks .nl-title {
  font-size: 14.5px;
}
.nl-picks .nl-excerpt {
  font-size: 12.5px;
}

/* 大きい注目記事(写真の上に分類・題・要約) */
.nl-feature > a {
  position: relative;
  justify-content: flex-end;
  min-height: 420px;
  color: #fff;
}
.nl-feature .nl-img {
  position: absolute;
  inset: 0;
  aspect-ratio: auto;
}
.nl-feature .nl-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 20, 20, 0.05) 25%, rgba(20, 20, 20, 0.88) 100%);
}
.nl-feature .nl-img.is-figure {
  padding: 24px 24px 45%;
}
.nl-feature .nl-img.is-figure::after {
  background: linear-gradient(180deg, rgba(20, 20, 20, 0) 40%, rgba(20, 20, 20, 0.92) 70%);
}
.nl-feature .nl-body {
  position: relative;
  flex: none;
  gap: 12px;
  padding: 32px 36px 34px;
}
.nl-feature .nl-cat {
  background: var(--brand-green);
  color: var(--color-text);
}
.nl-feature .nl-meta {
  color: rgba(255, 255, 255, 0.8);
}
.nl-feature .nl-title {
  font-family: var(--font-display);
  font-weight: var(--font-display-weight);
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.5;
}
.nl-feature .nl-excerpt {
  max-width: 40em;
  color: rgba(255, 255, 255, 0.86);
}
.nl-read {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 700;
}
.nl-read::after {
  content: " →";
  color: var(--brand-green);
}

/* 査定の箱(右の列)。記事のカード(白地に写真)と見分けがつくよう、写真を使わない薄い黄緑の箱 */
.nl-satei-box {
  display: grid;
  gap: 12px;
  padding: 28px 26px;
  border: 1px solid #d6ebaa;
  border-top: 6px solid var(--brand-green);
  border-radius: 8px;
  background: #f4f9ea;
}
.nl-satei-box-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
}
.nl-satei-box-text {
  font-size: 14px;
  line-height: 1.8;
  color: var(--color-text-sub);
}
.nl-satei-box .btn {
  display: flex;
  width: 100%;
  margin-top: 4px;
}

/* 新着記事(参考画像の「人気の記事ランキング」の代わり。閲覧数の元データが無いので新しい順) */
.nl-side-new {
  padding: 20px 22px 8px;
  border-radius: var(--nl-radius);
  background: #fff;
  box-shadow: var(--nl-shadow);
}
.nl-side-new h2 {
  padding-bottom: 12px;
  border-bottom: 2px solid var(--color-text);
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.nl-side-new ol {
  margin: 0;
  padding: 0;
  list-style: none;
}
.nl-side-new li + li {
  border-top: 1px solid var(--color-line);
}
.nl-mini > a {
  flex-direction: row;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 4px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.nl-mini > a:is(:hover, :focus-visible) {
  transform: none;
  box-shadow: none;
}
.nl-mini > a:is(:hover, :focus-visible) .nl-title {
  text-decoration: underline;
}
.nl-mini .nl-title {
  font-size: 14px;
  -webkit-line-clamp: 2;
}
.nl-no {
  display: grid;
  flex: none;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--color-soft);
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 1100px) {
  .nl-top {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
}
@media (max-width: 900px) {
  .nl-top {
    grid-template-columns: minmax(0, 1fr);
  }
}
/* スマホは上の段を出さない(記事は下の一覧に全部、同じ形で並ぶ) */
@media (max-width: 760px) {
  .nl-top {
    display: none;
  }
}

/* ===== スマホ・タブレットの崩れの直し(2026-11-10 再総点検 g3) ===== */
/* g3-3: WebKit は、3行で切る題の中に inline-block(言葉のかたまり)があると、収まっていても「…」を付ける。題の中だけ inline にする */
.nl-title :is(.phrase, .phrase-group) {
  display: inline;
}
/* g3-16: タブレットの幅では、帯の説明文が右の写真(左側をぼかした所)に重なって読みにくい。写真の手前で折り返す */
@media (min-width: 761px) and (max-width: 1100px) {
  .nl-hero p {
    max-width: calc(45vw - var(--gutter));
  }
}
/* g3-2: いちばん狭い幅(320 前後)では、欄の中の余白と「探す」の左右を詰めて、見本の字「言葉で記事を探す」を切らない */
@media (max-width: 360px) {
  .nl-search label {
    gap: 6px;
    padding-left: 14px;
  }
  .nl-search button {
    padding: 0 16px;
  }
}
