@charset "UTF-8";

.content-wrapper {
    max-width: 1200px;
}

.container {
    display: flex
;
    margin: auto;
}

#contentWrap {
    flex: 4;
    padding: 20px;
}

#sideWrap {
    flex: 1;
    padding: 20px;
}

.news-title {
    display: block;
    padding: 12px 15px;
    border: 3px solid #cc141d;
    background: #D80C18;
    color: #fff !important;
    font-weight: bold;
    font-size: 18px;
    line-height: 20px;
}

/* SP向け */
@media (max-width: 768px) {
    .news-title{
       font-size: 18px;
    }
}

.news-list {
    list-style: none;
    padding: 0;
    margin-top:10px;
}

.news-list li {
    padding: 10px;
    border: 1px solid #ccc;
    margin-top:10px;
}

.news-list li::before {
    content: "";
    display: inline-block;
    width: 12px; /* 画像の幅 */
    height: 12px; /* 画像の高さ */
    background-image: url('/asset/img/arrow_red_h.png'); /* 画像パス */
    background-size: contain;
    background-repeat: no-repeat;
    margin-right: 8px; /* 文字との間隔 */
}

.news-list li a {
    text-decoration: none;
}

.news-list li a:hover {
    text-decoration: underline;
}

/* SP向け */
@media (max-width: 768px) {
    .news-list {
        padding: 10px;
    }
}

/* === 全体のスタイル === */
.news-release {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0px 20px;
    border: 1px solid #707070;
}

/* 見出しのスタイル */
.page-news .news-age {
    font-size: 4.5rem;
    margin-bottom: 0;
    border-bottom: 2px solid #000;
    padding-bottom: 5px;
    color: #4b4b4b;
    font-weight: lighter;
    margin-top:10px;
}

/* 各ニュースのアイテム */
.news-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 25px 20px;
    border-bottom: 1px solid #ddd;
}

.news-item p {
    margin: 0;
    flex-grow: 1;
    line-height: 1.6;
    align-items: center;
    gap: 5px;
    display: flex
;
}
.news-item p img {
    width: auto;
    height: 15px;
    display: inline;
}
/* 日付 */
.news-date {
    font-size: 1.6rem;
    color: #555;
    white-space: nowrap;
}

/* "New" の赤色表示 */
.news-new {
    color: red;
    font-size: 1.4rem;
    font-weight: bold;
    margin-left: 5px;
    min-width: 50px;  /* 固定幅を指定 */
    display: inline-block;
    text-align: center;
    margin: 0 20px;
}

.news-content {
    font-size: 1.4rem;
    word-break: break-word; /* 単語内でも折り返し */
    overflow-wrap: break-word; /* 長い単語やURLも折り返す */
    display: block; /* インライン要素のままだと折り返されないため */
    white-space: normal; /* 折り返しを許可 */
    line-height: 1.6; /* 読みやすいように行間を調整 */
}

.news-tag{
    display: inline-block;
    color: white;
    padding: 2px 20px;
    border-radius: 20px; /* 丸みのあるデザイン */
    border: none;
}

/* NEWがない場合でもスペースを確保 */
.news-new.hidden {
    padding: 0 20px;
    visibility: hidden; /* 文字は非表示にするが、スペースは維持 */
}

/* ページネーション */
.pagination {
    text-align: center;
    margin-top: 30px;
    font-size: 1.8rem;
}

.pagination ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.pagination ul li {
    display: inline-block;
}

.pagination ul li a {
    display: block;
    padding: 8px 12px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
   
}

/* アクティブなページ */
.pagination ul li a.active {
    background: #D80C18;
    color: #fff;
    font-weight: bold;
}

/* タブリスト（縦並び） */
.tab-list {
    position: relative;
    width: 140px;
    list-style: none;
    padding: 0;
    margin: 0;
    border-right: 2px solid #ddd;
}

/* 非アクティブなタブは通常非表示 */
.tab-item {
    display: none; /* 初期状態では非表示 */
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    padding: 10px;
    background: #f8f8f8;
    border-bottom: 1px solid #ddd;
    font-size: 16px;
    cursor: pointer;
}

/* アクティブなタブは常に表示 */
.tab-item.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    background: #f8f8f8;
    color: #333;
}

.tab-list.open{
    position: absolute;
    background: #fff;
    z-index: 100; /* 他の要素より上に */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* 影をつけてわかりやすく */
}

/* クリックで開いたときに、全タブを表示 */
.tab-list.open .tab-item {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* 矢印アイコン（擬似要素） */
.tab-item::after {
    content: "";
    position: absolute;
    right: 10px;
    top: 30%;
    width: 20px;
    height: 20px;
    background-size: contain;
    background-repeat: no-repeat;
    background-image: url(/asset/img/icon_news_arrow.svg);
}

/* アクティブ時の矢印変更 */
.tab-item.active::after {
    background-image: url(/asset/img/icon_news_arrow_r.png);
}

.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
}

.news-info {
    display: flex;
}



/* SP向け */
@media (max-width: 768px) {
    .news-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
    }

    .news-tag {
        padding: 0 20px ;
    }
    .news-date,
    .news-tag {
        margin-right: 0;
        font-size: 1.6rem;
        white-space: nowrap;
    }

    .tab-item {
        font-size: 1.2rem;
        padding: 5px 15px;
    }

    .tab-list {
        width: 100px;
    }

    .tab-item::after {
        content: "";
        position: absolute;
        right: 10px;
        top: 27%;
        width: 15px;
        height: 15px;
    }

    .page-news .news-title {
        font-size: 2.4rem;
    }

    .news-date, .news-tag {
        font-size: 1.2rem;
        white-space: nowrap;
    }

    .news-date {
        min-width: 70px;
    }

    .news-new {
        font-size: 1.2rem;
        margin: 0;
    }

    .news-content {
        font-size: 1.6rem;
        
    }

    .news-item {
        gap: 5px;
    }

  
    .news-info {
        flex-direction: row; /* 横並び */
        align-items: center;
        gap: 8px; /* 要素間の間隔 */
        flex-direction: column;
        align-items: flex-start;
    }

}

/* ✅ PC時はすべて表示 */
@media (min-width: 769px) {
    .pagination ul li {
        display: inline-block; /* PC時はすべて表示 */
    }
}

/* ✅ SP時は1,2,3,次へ 以外を非表示 */
@media (max-width: 768px) {
    .pagination ul li {
        display: none; /* すべて非表示に */
    }

    .pagination ul li:nth-child(1),  /* 1 */
    .pagination ul li:nth-child(2),  /* 2 */
    .pagination ul li:nth-child(3),  /* 3 */
    .pagination ul li:last-child {   /* 「次へ」 */
        display: inline-block; /* 表示する */
    }
}
