/* =========================================
   Latest News (tod-latestNews) - fixed
   ========================================= */

.tod-latestNews {
    width: 100%;
}

.tod-latestNews__inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    /* label | slider | viewall */
    align-items: center;
    column-gap: 16px;

    padding: 14px 18px;
    border-radius: 999px;

    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.10);

    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);

    overflow: hidden;
}


/* 左：LATEST NEWS */
.tod-latestNews__label {
    font-weight: 700;
    letter-spacing: 0.12em;
    font-size: 14px;
    color: rgba(0, 0, 0, 0.65);
    white-space: nowrap;
}

/* ラベル右の縦線 */
.tod-latestNews__label::after {
    content: "";
    display: inline-block;
    width: 1px;
    height: 18px;
    margin-left: 16px;
    background: rgba(0, 0, 0, 0.12);
    vertical-align: middle;
}

/* 中央：スライダー */
.tod-latestNews__slider {
    min-width: 0;
    width: 100%;
    overflow: hidden;
    z-index: 1;
    /* ←追加：はみ出し防止 */
}

/* 省略を効かせる */

.tod-latestNews .swiper-wrapper {
    align-items: center;
}

/* Swiper slideが縮みすぎて中身が崩れないように */
.tod-latestNews .swiper-slide {
    min-width: 0;
}

/* 1アイテム（詰まり対策：gapとline-heightを調整） */
.tod-latestNews__item {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 12px;

    text-decoration: none;
    color: inherit;

    padding: 6px 0;
    min-width: 0;
}

/* 日付 */
.tod-latestNews__date {
    font-size: 14px;
    line-height: 1;
    color: rgba(0, 0, 0, 0.65);
    white-space: nowrap;
}

/* カテゴリ：ピル（高さを締めて重なりを防止） */
.tod-latestNews__cat {
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    min-width: 6em;
    /* 「おしらせ」最低保証 */
    text-align: center;

    padding: 5px 10px;
    border-radius: 999px;

    background: rgba(225, 243, 234, 0.95);
    border: 1px solid rgba(25, 135, 84, 0.18);
    color: rgba(25, 135, 84, 0.95);

    /* カテゴリ名が長い時の保険（表示崩れ防止） */
    max-width: 8.5em;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Latest News のスライドは最低幅を持たせる */
.tod-latestNews__item.swiper-slide {
    min-width: 260px;
    /* 240〜280pxで好み調整 */
}


/* タイトル：省略を確実に効かせる */
.tod-latestNews__title {
    font-size: 14px;
    line-height: 1.2;
    color: rgba(0, 0, 0, 0.82);

    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 右：View All（余白を整理して中央の幅を確保） */
.tod-latestNews__all {
    justify-self: end;
    white-space: nowrap;

    display: inline-flex;
    align-items: center;
    gap: 10px;
    z-index: 2;
    font-size: 14px;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.78);
    text-decoration: none;

    padding-left: 14px;
    /* 仕切り線の分 */
    position: relative;
    /* ←これが必須（::before の基準） */
}


/* View All の左の縦線 */
.tod-latestNews__all::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 1px;
    height: 18px;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.12);
}

/* 矢印 */
.tod-latestNews__arrow {
    display: inline-block;
    transform: translateY(-1px);
    transition: transform 0.25s ease;
}

/* 伸びる線 */
.tod-latestNews__all::after {
    content: "";
    display: inline-block;
    width: 0;
    height: 1px;
    background: rgba(0, 0, 0, 0.55);
    margin-left: 8px;
    transition: width 0.25s ease;
}

/* Hover */
@media (hover: hover) and (pointer: fine) {
    .tod-latestNews__item:hover .tod-latestNews__title {
        text-decoration: underline;
        text-underline-offset: 3px;
    }

    .tod-latestNews__all:hover::after {
        width: 22px;
    }

    .tod-latestNews__all:hover .tod-latestNews__arrow {
        transform: translate(3px, -1px);
    }
}

/* =========================================
   Latest News - SP layout（3行構成）
   ========================================= */
@media screen and (max-width: 599px){

  .tod-latestNews__inner{
    grid-template-columns: 1fr;
    grid-template-areas:
      "label"
      "slider"
      "viewall";
    row-gap: 6px;

    padding: 12px 14px;
    border-radius:20px;
  }

  /* 1行目：LATEST NEWS */
  .tod-latestNews__label{
    grid-area: label;
    font-size: 11px;
    letter-spacing: 0.14em;
    opacity: 0.7;
  }

  /* ラベル右の縦線はSPでは不要 */
  .tod-latestNews__label::after{
    display: none;
  }

  /* 2行目：スライダー */
  .tod-latestNews__slider{
    grid-area: slider;
  }

  .tod-latestNews__item{
    gap: 10px;
  }

  .tod-latestNews__date{
    font-size: 12px;
  }

  .tod-latestNews__cat{
    font-size: 11px;
    padding: 5px 9px;
    max-width: 8em;
  }

  .tod-latestNews__title{
    font-size: 13px;
  }

  /* 3行目：View All */
  .tod-latestNews__all{
    grid-area: viewall;
    justify-self: end;

    font-size: 11px;
    gap: 6px;
    padding-left: 0;
  }

  /* View All 左の仕切り線は非表示 */
  .tod-latestNews__all::before{
    display: none;
  }
}
