/* ========================================
   Cotoel News ticker
======================================== */
.cotoel-news {
    --cotoel-news-slide-duration: 600ms;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    padding: 18px 24px;
    background: #ffffff;
    border-top: 1px solid #dddddd;
    border-bottom: 1px solid #dddddd;
}

/* News 見出し */
.cotoel-news__title {
    flex: 0 0 auto;
    margin-right: 40px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
    white-space: nowrap;
}

/* ニュース表示領域 */
.cotoel-news__viewport {
    position: relative;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    transition: height var(--cotoel-news-slide-duration) ease;
}

/* 1件のニュース */
.cotoel-news__item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: baseline;
    gap: 28px;
    transform: translateY(100%);
    opacity: 0;
    transition:
        transform var(--cotoel-news-slide-duration) ease,
        opacity var(--cotoel-news-slide-duration) ease;
}

/* 現在表示中 */
.cotoel-news__item.is-current {
    transform: translateY(0);
    opacity: 1;
}

/* 上へ抜けるニュース */
.cotoel-news__item.is-leaving {
    transform: translateY(-100%);
    opacity: 0;
}

/* 日付 */
.cotoel-news__date {
    flex: 0 0 auto;
    font-size: 14px;
    line-height: 1.7;
    color: #666666;
    white-space: nowrap;
}

/* ニュース本文：リンクあり・なし共通 */
.cotoel-news__text {
    min-width: 0;
    font-size: 14px;
    line-height: 1.7;
    color: #333333;
}

/* リンクの場合 */
a.cotoel-news__text {
    text-decoration: none;
}

/* リンクの場合だけマウスオーバー */
a.cotoel-news__text:hover {
    text-decoration: underline;
}

/* ========================================
   スマートフォン
======================================== */
@media (max-width: 767px) {
    .cotoel-news {
        align-items: flex-start;
        padding: 15px 16px;
    }

    .cotoel-news__title {
        margin-right: 20px;
        font-size: 16px;
        line-height: 1.5;
    }

    .cotoel-news__item {
        display: block;
    }

    .cotoel-news__date {
        display: block;
        margin-bottom: 2px;
        font-size: 12px;
        line-height: 1.5;
    }

    .cotoel-news__text {
        display: block;
        font-size: 13px;
        line-height: 1.6;
    }
}

/* ========================================
   OSの「アニメーションを減らす」設定への対応
======================================== */
@media (prefers-reduced-motion: reduce) {
    .cotoel-news__viewport,
    .cotoel-news__item {
        transition: none;
    }
}
