/* ==========================================================================
   top.css
   トップページ（index.php）専用スタイル
   ========================================================================== */

/* ==========================================================================
   p-loading（ページ読み込み時のスプラッシュ演出）
   進行順序（js/top.jsがクラス付け替えで制御）：
   1. ロゴが0.8倍→1倍に拡大しながら現れる
   2. そのまま1秒静止
   3. ロゴが縮んで見えなくなる
   4. ロゴが消えたあとに、白背景全体が1秒以内でフェードアウトする
   ========================================================================== */
.p-loading {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-white);
}

.p-loading.is-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

.p-loading__logo {
  width: 140px;
  max-width: 40vw;
  height: auto;
  opacity: 0;
  transform: scale(0.8);
  animation: p-loading-logo-intro 0.6s ease forwards;
}

@keyframes p-loading-logo-intro {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(20%);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* 静止1秒のあと、この状態に切り替わって縮みながら消える */
.p-loading__logo.is-shrinking {
  animation: p-loading-logo-shrink 0.75s ease-in forwards;
}

@keyframes p-loading-logo-shrink {
  from {
    opacity: 1;
    transform: scale(1);
  }

  to {
    opacity: 0;
    /*		transform: translateY(-100%);*/
  }
}

.p-hero {
  position: relative;
  height: 100vh;
  margin: 0;
  border-radius: 0;
  background-color: var(--color-accent);
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* 背景スライドショー（Vegas.jsが#sliderの中身を生成） */
.p-hero__slideshow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* Vegasのkenburnsアニメーションは初期値が1.5倍で拡大が強すぎるため上書き */
@keyframes kenburns {
  0% {
    transform: scale(1.35);
  }

  100% {
    transform: scale(1);
  }
}

/* 土の装飾（hero最下部・右から左へ無限ループ） */
.p-hero__soil {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  overflow: hidden;
  line-height: 0;
  pointer-events: none;
}

.p-hero__soil-track {
  display: flex;
  width: 200%;
  animation: soil-scroll 60s linear infinite;
}

.p-hero__soil-img {
  display: block;
  width: 50%;
  height: auto;
  flex-shrink: 0;
}

@keyframes soil-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

/* キャッチコピー画像（l-mainの左下に固定配置） */
.p-hero__catch {
  position: absolute;
  left: calc(3vw + 20px);
  bottom: calc(6vw + 40px);
  z-index: 2;
  width: 40%;
  max-width: 620px;
  height: auto;
}

@media screen and (max-width: 1400px) {
  .p-hero {
    height: auto;
    aspect-ratio: 1200 / 700;
  }
}

@media screen and (max-width: 1300px) {
  .p-hero__soil-track {
    width: 300%;
  }

  .p-hero__catch {
    width: 35%;
    min-width: 300px;
  }
}

@media screen and (max-width: 900px) {
  .p-hero__catch {
    left: calc(0vw + 20px);
  }

  .p-hero {
    height: auto;
    aspect-ratio: 1/1;
  }
}

@media screen and (max-width: 600px) {
  .p-hero__catch {
    width: 45%;
  }

  .p-hero {
    aspect-ratio: 5/6;
  }

  .p-hero__soil-track {
    width: 500%;
  }
}

/* ==========================================================================
   p-about（ABOUT RIVER POINT セクション）
   レイアウトはGridを主体にし、position: absoluteは
   写真の重なり量を微調整するmarginの代わりには使わない。
   ========================================================================== */
.p-about {
  background-color: #fcf2f2;
  padding: 80px 0;
  overflow: hidden;
}

.p-about .c-heading {
  margin-left: calc(var(--indent-unit) * -2);
}

.p-about__inner {
  display: grid;
  grid-template-columns: minmax(700px, 800px) 1fr;
  grid-template-columns: 55% 45%;
  align-items: center;
  margin: 0 auto;
}

.about-photo-right {
  display: block;
  overflow: hidden;
  background: url(../img/top/about-right.png) center left no-repeat;
  background-size: cover;
  width: 100%;
  aspect-ratio: 1180 / 1410;
  z-index: 1;
}

.about-left {
  display: grid;
  grid-template-columns: 40% 60%;
}

.about-photo-left {
  display: block;
  overflow: hidden;
  background: url(../img/top/about-left.png) center right no-repeat;
  background-size: cover;
  width: 100%;
  aspect-ratio: 600 / 1420;
  z-index: 1;
}

.p-about__photo {
  width: 100%;
  height: auto;
}

.p-about__bg {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
  min-width: 400px;
  margin-left: 1.5vw;
}

/* 背景の白いシェイプは装飾のため position: absolute で本文の高さに追従させる。
   拡大アニメーションはこの::before単体だけにかけたいので、
   c-reveal-shapeを.p-about__bg本体には付けず、ここで直接scaleを制御する。 */
.p-about__bg::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url(../img/top/about-wh.png);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  width: 200%;
  aspect-ratio: 2125 / 2000;
  left: 50%;
  top: 50%;
  transform: scale(0.9) translate(-50%, -50%);
  transform-origin: center;
  transition: transform 1s ease;
}

.p-about.is-inview .p-about__bg::before {
  transform: scale(1) translate(-50%, -50%);
}

.p-about__text {
  display: flex;
  flex-direction: column;
  z-index: 1;
  gap: 14px;
  line-height: 1.7;
  margin-left: calc(var(--indent-unit) * 1.5);
}

.p-about__text p span {
  display: block;
}

.p-about__text p:nth-child(2) {
  text-indent: var(--indent-unit);
}

.p-about__text p:nth-child(3) {
  text-indent: calc(var(--indent-unit) * 2);
}

.p-about__text p:nth-child(4) {
  text-indent: calc(var(--indent-unit) * 3);
}

.p-about a {
  z-index: 1;
}

@media screen and (max-width: 1100px) {
  .p-about__bg {
    margin-left: -1vw;
  }
}

@media screen and (max-width: 900px) {
  .p-about {
    padding: 0;
  }

  .p-about__inner {
    grid-template-columns: 1fr;
  }

  .about-left {
    grid-template-columns: 40% 60%;
    align-items: center;
  }

  .p-about__bg::before {
    width: 150%;
  }

  .p-about__photo {
    display: none;
  }

  .p-about__bg {
    margin-left: 0;
    padding: 0 24px;
  }
}

@media screen and (max-width: 767px) {
  .p-about__bg::before {
    width: 180%;
  }

  .p-about {
    padding: 60px 0;
  }

  .p-about__bg {
    padding: 0 0 30px 0.5vw;
  }
}

@media screen and (max-width: 600px) {
  .p-about {
    padding: 20px 0;
  }

  .about-left {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
  }

  .about-photo-left {
    display: block;
    overflow: hidden;
    background: url(../img/top/about-left-sp.png) center right no-repeat;
    background-size: cover;
    width: 100%;
    aspect-ratio: 250 / 755;
    z-index: 1;
    position: relative;
    left: 0;
  }

  .p-about__bg {
    padding: 0;
    min-width: 338px;
  }

  .p-about .c-heading__en {
    margin-left: calc(var(--indent-unit) * 0);
  }

  .p-about .is-inview .c-heading__en {
    margin-left: calc(var(--indent-unit) * 0);
    left: 0;
  }

  .about-photo-right {
    /*    transform: scale(-1, 1);*/
    /*    width: 85%;*/
    margin-left: 5vw;
    margin-top: 30px;
  }

  .p-about__text p {
    /*    text-indent: 0 !important;*/
  }
}

@media screen and (max-width: 500px) {
  .about-photo-left {
    display: none;
  }

  .p-about .c-heading {
    margin-left: calc(var(--indent-unit) * 0);
    margin: auto;
    text-align: center;
    gap: 0;
  }

  .about-photo-right {
    background: url(../img/top/about-right-sp.png) center left no-repeat;
    background-size: cover;
    margin-top: -10vw;
    margin-bottom: 10vw;
  }

  .p-about__bg {
    padding: 0 20px;
  }

  .p-about .c-heading__en {
    margin-left: calc(var(--indent-unit) * 0);
    left: 0;
  }

  .p-about .c-heading__ja span {
    text-indent: calc(var(--indent-unit) * 0) !important;
  }

  .p-about__text {
    margin-left: 0;
  }

  .p-about__text p {
    text-align: center;
    text-indent: 0 !important;
  }

  .p-about__bg {
    padding: 0 20px;
    margin: auto;
  }

  .p-about__bg::before {
    aspect-ratio: 2125 / 3000;
    top: 0;
    transform: scale(0.9) translate(-50%, 0);
  }

  .p-about.is-inview .p-about__bg::before {
    transform: scale(1) translate(-50%, 0);
  }
}

/* ==========================================================================
   p-loop（商品写真が右から左へ無限ループするセクション）
   ========================================================================== */
.p-loop {
  position: relative;
  background-color: #fcf2f2;
  overflow: hidden;
}

.p-loop__track {
  display: flex;
  z-index: 1;
  position: relative;
  width: 200%;
  animation: p-loop-scroll 24s linear infinite;
}

.p-loop__set {
  display: flex;
  width: 50%;
  gap: 5vw;
  padding: 2.5vw;
}

.p-loop__img {
  flex: 1 1 0;
  min-width: 0;
  width: 100%;
  height: auto;
  display: block;
}

/* 右から左へ流れるように見せる */
@keyframes p-loop-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

/* 下端の波型は装飾のため position: absolute で重ねる */
.p-loop__curve {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 70%;
  display: block;
  pointer-events: none;
}

@media screen and (max-width: 1200px) {
  .p-loop {
    padding: 0;
  }

  .p-loop__track {
    width: 300%;
  }
}

@media screen and (max-width: 767px) {
  .p-loop {
    padding: 0;
  }

  .p-loop__set {
    gap: 16px;
    padding: 0 8px;
  }

  .p-loop__track {
    width: 370%;
  }
}

@media screen and (max-width: 600px) {
  .p-loop__track {
    width: 500%;
  }
}

/* ==========================================================================
   p-products（OUR PRODUCTS セクション）
   上半分（見出し・リード文・ボタン）と下半分（商品カード）を
   それぞれ独立したブロックとして作り、レスポンシブ調整を分離する。
   ========================================================================== */
.p-products {
  background-color: var(--color-white);
  position: relative;
}

.p-products::before {
  position: absolute;
  display: block;
  content: "";
  background: url("../img/bk/big-curve-pink.png") center no-repeat;
  background-size: 100% 100%;
  width: 100%;
  aspect-ratio: 2000/735;
  bottom: 0;
  left: 0;
}

/* ---------- 上半分 ---------- */
.p-products__top {
  padding: 100px 20px 60px;
}

.p-products__top-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5vw;
  max-width: 1400px;
  margin: 0 auto;
  justify-content: center;
}

/* 見出しの背後のピンクの円形装飾。about の白いシェイプと同じ
   「0.9倍→1倍に拡大しながら現れる」アニメーションをここでも使う。
   ::before は要素ではないので c-reveal-shape クラスを付けられず、
   同じ拡大アニメーションをこのセレクタ用に書いている。 */
.p-products .c-heading {
  position: relative;
}

.p-products .c-heading::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 80%;
  left: 50%;
  width: 40vw;
  aspect-ratio: 1730 / 1530;
  background-image: url(../img/top/products-pk.png);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  transform: scale(0.9) translate(-50%, -50%);
  transition: transform 1s ease;
}

.p-products.is-inview .c-heading::before {
  transform: scale(1) translate(-50%, -50%);
}

.p-products__lead {
  margin-top: 5vw;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  line-height: 1.8;
}

.p-products__more {
  margin: 0;
  margin-top: 5vw;
  flex-shrink: 0;
}

/* ---------- 下半分 ---------- */
.p-products__bottom {
  padding: 0 20px;
}

.p-products__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  max-width: 1400px;
  margin: 0 auto;
}

.p-products__item {
  background: #fff;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 28px 24px 36px;
  border: 2px dashed var(--color-main);
  border-radius: 50px;
  text-align: center;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  font-weight: 500;
}

.p-products__item:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.p-products__item:hover img {
  opacity: 0.85;
}

/* 商品名タグ（左上にかぶせる装飾のため position: absolute） */
.p-products__tag {
  position: absolute;
  top: -14px;
  left: 20px;
  z-index: 2;
  writing-mode: vertical-rl;
  background-color: var(--color-main);
  color: var(--color-white);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.35rem;
  padding: 14px 8px 22px;
  border-radius: 8px 8px 0 0;
  clip-path: polygon(0 0, 100% 0, 100% 82%, 50% 100%, 0 82%);
}

.p-products__photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 24px;
  overflow: hidden;
}

.p-products__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.p-products__detail {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: 50px;
  background-color: var(--color-main);
  color: var(--color-white);
  font-weight: 700;
  box-shadow: 0 6px 0 #8c1313;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

/* products.php の「オンライン注文はこちら」（.c-btn--solid）と同じ、押し込まれるような hover */
.p-products__detail:hover {
  transform: translateY(3px);
  box-shadow: 0 3px 0 #8c1313;
}

@media screen and (max-width: 1200px) {
  .p-products__item {
    font-size: 0.9rem;
  }

  .p-products__list {
    gap: 20px;
  }

  .p-products__tag {
    top: -14px;
    left: 14px;
    font-size: 1.15rem;
    letter-spacing: 0.25rem;
    padding: 14px 7px 22px;
  }

  .p-products__item {
    gap: 20px;
    padding: 20px 20px 20px;
    border-radius: 45px;
  }
}

@media screen and (max-width: 900px) {
  .p-products__top {
    padding-top: 50px;
  }

  .p-products__more {
    margin-left: 25%;
    margin-top: 20px;
  }

  .p-products__top-inner {
    gap: 0 40px;
  }

  .p-products .c-heading::before {
    top: 60%;
  }

  .p-products .c-heading {
    top: 5vw;
  }
}

@media screen and (max-width: 800px) {
  .p-products__list {
    grid-template-columns: 1fr;
    max-width: 480px;
  }

  .p-products::before {
    aspect-ratio: 1000 / 735;
  }

  .p-products__top {
    padding: 60px 20px 40px;
  }

  .p-products .c-heading::before {
    width: 55vw;
  }

  .p-products__top-inner {
    flex-wrap: nowrap;
    flex-direction: column;
    gap: 40px;
  }

  .p-products__top-inner {
    gap: 20px 40px;
  }

  .p-products__lead {
    margin-left: 10vw;
    margin-top: 10vw;
  }
  .p-products .c-heading {
    margin-left: 0;
  }

  .p-products__bottom {
    padding: 0 20px 0;
  }

  .p-products__list {
    gap: 30px;
  }
}

@media screen and (max-width: 600px) {
  .p-products .c-heading::before {
    width: 65vw;
  }
}

@media screen and (max-width: 500px) {
  .p-products .c-heading::before {
    max-width: 400px;
    width: calc(100vw - 40px);
  }

  .p-products__more {
    margin-top: 0;
    margin-left: 0;
  }

  .p-products__lead {
    margin-left: 0;
    margin-top: 30px;
    text-align: center;
  }
}

/* ==========================================================================
   p-feature（LISTENING TO NATURE セクション）
   写真の重なりはFlexbox＋%指定のmarginだけで表現し、position: absoluteは
   ふきだし（装飾的な重なり）にのみ使う。margin/widthがすべて%指定のため、
   画面幅が変わってもブレークポイントごとに座標を再計算する必要がない。
   ========================================================================== */
.p-feature {
  position: relative;
  background-color: #fbf1f2;
  overflow: hidden;
  padding: 20px 0 0;
}

.p-feature__inner {
  display: grid;
  align-items: center;
  gap: 40px 60px;
  margin: 0 auto;
  padding: 0 20px;
  max-width: 1400px;
  grid-template-columns: 1fr 480px;
}

/* ---------- ギャラリー（写真3枚） ---------- */
.p-feature__gallery {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  z-index: 2;
  height: 100%;
  padding: 100px 0 0;
}

.p-feature__photo {
  position: relative;
  display: inline-block;
  vertical-align: top;
  width: 100%;
  margin: 0;
  aspect-ratio: 50/ 75;
  overflow: hidden;
}

.p-feature__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 写真の輪郭より少し外側に浮かせた白い点線 */
.p-feature__photo::after {
  content: "";
  position: absolute;
  inset: -3%;
  border: 2px dashed #fff;
  border-radius: inherit;
  pointer-events: none;
}

/* ---------- ふきだし（鳥＋テキスト＋背景の白いシェイプ）
   画像の重なりのため、装飾目的でposition: absoluteを使用する ---------- */
.p-feature__talk {
  z-index: 4;
  left: 0;
  bottom: 0;
  display: block;
  position: relative;
}

.p-feature__talk-bg,
.p-feature__talk-img {
  display: block;
  width: 100%;
}

/* 背景の白いシェイプ（bird-wh.png）。鳥＋テキスト（bird-talk.png）と
   同じ座標系で書き出されているため、そのまま重ねるだけで位置が揃う。 */
.p-feature__talk-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  width: 100%;
  opacity: 0.9;
}

/* 鳥がゆらゆら揺れるアニメーション。回転の軸は鳥の脚元あたりに設定 */
.p-feature__talk-img {
  position: relative;
  transform-origin: 18% 86%;
  animation: p-feature-bird-sway 3.2s ease-in-out infinite;
  max-width: 120%;
  width: 120%;
  top: -50px;
  left: 5vw;
}

@keyframes p-feature-bird-sway {
  0%,
  100% {
    transform: rotate(-4deg);
  }
  50% {
    transform: rotate(4deg);
  }
}

/* ---------- 見出し・リード文 ---------- */
.p-feature__content {
  position: relative;
  z-index: 1;
  padding-top: 5vw;
  padding-bottom: 5vw;
}

/* 背景の白いシェイプ。about/productsと同じ「0.9倍→1倍に拡大しながら
   現れる」アニメーションをここでも使う。 */
.p-feature__content::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 45%;
  width: 150%;
  aspect-ratio: 1730 / 1400;
  background: url("../img/top/feature-wh.png");
  background-size: 100% 100%;
  transform: translate(-50%, -50%) rotate(-5deg) scale(0.9);
  transition: transform 1s ease;
}

.p-feature.is-inview .p-feature__content::before {
  transform: translate(-50%, -50%) rotate(-5deg) scale(1);
}

.p-feature .c-heading {
  margin-left: 0;
  gap: 0;
}

.p-feature .c-heading__en {
  width: 220px;
  max-width: 100%;
  left: -2vw;
  margin: 0 0 18px;
}

.p-feature__heading {
  margin: 0 0 24px;
  font-size: clamp(28px, 2.6vw, 44px);
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.06em;
}

.p-feature__text {
  line-height: 2;
  letter-spacing: 0.08em;
}

.p-feature__text span {
  display: inline-block;
}

.p-feature__photo--1 {
  position: relative;
  top: -50px;
}

.p-feature__photo--3 {
  position: relative;
  top: 50px;
}

@media screen and (max-width: 1200px) {
  .p-feature__content::before {
    width: 135%;
  }
}

@media screen and (max-width: 1100px) {
  .p-feature__content::before {
    width: 140%;
  }

  .p-feature__talk {
    width: 130%;
  }

  .p-feature__inner {
    gap: 20px 40px;
    grid-template-columns: 1.35fr 1fr;
  }

  .p-feature__photo--1 {
    top: -30px;
  }
  .p-feature__photo--3 {
    top: 30px;
  }

  .p-feature__gallery {
    padding: 70px 0 0;
  }
}

@media screen and (max-width: 980px) {
  .p-feature {
    padding: 20px 0;
  }

  .p-feature__content::before {
    width: 180%;
  }

  .p-feature__text span {
    display: inline;
  }
}

@media screen and (max-width: 900px) {
  .p-feature__inner {
    grid-template-columns: 1fr;
  }

  .p-feature__text span {
    display: block;
  }

  .p-feature__content {
    order: -1;
    text-align: center;
  }

  .p-feature__content::before {
    width: 65%;
    left: 50%;
  }

  .p-feature .c-heading {
    align-items: center;
  }

  .p-feature__gallery {
    max-width: 85vw;
    margin: -3vw auto 0;
    padding-top: 0;
  }

  .p-feature__talk-img {
    top: -5vw;
  }

  .p-feature__inner {
    gap: 0;
  }

  .p-feature__text {
    line-height: 2;
    letter-spacing: 0.08em;
    max-width: 450px;
    margin: 0 auto 30px;
  }

  .p-feature__content::before {
    width: 80%;
  }

  .p-feature__talk {
    margin-top: 20px;
  }
}

@media screen and (max-width: 600px) {
  .p-feature {
    padding: 30px 0 0;
  }

  .p-feature__text {
    margin: 0 auto 50px;
  }

  .p-feature__gallery {
    max-width: 100%;
    top: -20px;
  }

  .p-feature__content::before {
    width: 120%;
  }

  .p-feature__talk {
    width: 110%;
  }

  .p-feature__text span {
    display: block;
  }

  .p-feature__talk-bg {
    max-width: 170%;
    width: 170%;
    left: -10px;
  }

  .p-feature__talk-img {
    max-width: 200%;
    width: 200%;
  }
}

@media screen and (max-width: 500px) {
  .p-feature__content::before {
    width: 180%;
    top: 45%;
  }
}
/* ==========================================================================
   p-news（新着情報セクション）
   カード自体のスタイルは manage/includes/news_helper.php の
   render_news_item() が出力する .news-item 系クラスに対して当てている。
   ========================================================================== */
.p-news {
  background-color: var(--color-white);
  position: relative;
}

.p-news__inner {
  padding: 100px 20px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
  max-width: 1400px;
  margin: 0 auto;
}

.p-news__heading {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 見出しは下層ページと共通の c-sec-ttl（common.css）。
   横並びレイアウトの左カラムに収まるよう、下の余白だけ詰める。 */
.p-news__ttl {
  margin-bottom: 20px;
}

.p-news__more {
  margin: 0;
}

.p-news__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.p-news__list .news-item-link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 100%;
  padding: 0 24px 28px;
  border: 1px solid #ececec;
  border-radius: 20px;
  background-color: var(--color-white);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.p-news__list .news-item-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
  opacity: 1;
}

.p-news__list .news-item-category {
  position: absolute;
  z-index: 2;
  top: -10px;
  left: 15px;
  writing-mode: vertical-rl;
  background-color: var(--color-main);
  color: var(--color-white);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 10px 6px 16px;
  border-radius: 6px 6px 0 0;
  clip-path: polygon(0 0, 100% 0, 100% 82%, 50% 100%, 0 82%);
}

/* 写真の有無にかかわらず、カード上部は常に同じ縦横比（5:3）の領域にする。
   こうすることでカードごとの高さが揃い、news-item-date の位置も一致する。 */
.p-news__list .news-item-media {
  display: block;
  position: relative;
  align-self: stretch;
  margin: 0 -24px 16px;
  aspect-ratio: 5 / 3;
  overflow: hidden;
  border-radius: 20px 20px 0 0;
  background-color: #fbf1f2;
}

.p-news__list .news-item-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 写真が無い場合：領域の中央にデフォルトアイコン（daikon-icon.png）を丸く表示 */
.p-news__list .news-item-media:not(.has-photo)::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: url("../img/daikon-icon.png");
  background-size: cover;
}

.p-news__list .news-item-date {
  margin-bottom: 8px;
  color: #999;
  letter-spacing: 0.02em;
  display: flex;
  justify-content: center;
  align-items: center;
}

.p-news__list .news-item-new {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 10px;
  background-color: var(--color-yellow);
  color: var(--color-main-dark);
  font-size: 0.75rem;
  font-weight: 700;
  vertical-align: middle;
}

.p-news__list .news-item-title {
  text-align: left;
}
.p-news__list .news-item-title-text {
  font-weight: 700;
  line-height: 1.6;
}

@media screen and (max-width: 1100px) {
  .p-news__list {
    gap: 20px;
  }

  .p-news__inner {
    padding: 60px 20px;
    grid-template-columns: 210px 1fr;
    gap: 20px;
  }
}

@media screen and (max-width: 900px) {
  .p-news__inner {
    gap: 40px;
    grid-template-columns: 1fr;
  }

  .p-news__list .news-item-date {
    color: #6c6c6c;
    font-weight: 500;
  }

  .p-news__heading {
    align-items: center;
    text-align: center;
  }

  .p-news__list .news-item-date {
    font-size: 0.85rem;
  }

  .p-news__list .news-item-link {
    padding: 0 20px 20px;
  }

  .p-news__list .news-item-title-text {
    font-size: 0.9rem;
  }
}

@media screen and (max-width: 800px) {
  .p-news__list {
    margin: auto;
    grid-template-columns: 1fr;
    max-width: 480px;
  }

  .p-news__list .news-item-date {
    margin-bottom: 3px;
  }

  .p-news__list .news-item-link {
    padding: 0 20px 20px;
    text-align: left;
    align-items: flex-start;
  }
}
