@charset "utf-8";

@import url("colors.css");

/* ==========================================================================
   Top News Section
   ========================================================================== */
.top-news-section {
    background-color: var(--top-news-bg);
    width: 100%;
    padding: 60px 0;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* 足跡背景 (左側/上側) */
.top-news-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 120px;
    height: 180px;
    background-image: url('../img/top-news-list-news_background_l.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: left top;
    z-index: -1;
}

/* 足跡背景 (右側/下側) */
.top-news-section::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 120px;
    height: 180px;
    background-image: url('../img/top-news-list-news_background_r.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: right bottom;
    z-index: -1;
}

/* PC/SP共通 */
.top-news-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

/* Header (Title Image) */
.top-news-header {
    margin-bottom: -10px; /* 1つ目の画像に乗るように調整。画像下部の余白により調整してください */
    position: relative;
    left: 60px;
    display: inline;
    z-index: 2;
    text-align: left;
    line-height: 0;
}

.news-title-img {
    width: 130px !important; /* SPでのタイトル画像サイズ */
    max-width: 130px !important;
    height: auto !important;
    display: inline-block;
}

/* List */
.top-news-list {
    display: grid;
	grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 40px;
}

/* Item */
.top-news-item {
    display: block;
    width: 80%;
    margin: 0 auto;
}

.top-news-link {
    display: block;
    text-decoration: none;
    transition: opacity 0.3s ease;
    color: inherit;
}

.top-news-link:hover {
    opacity: 0.8;
}

.top-news-thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: var(--thumb-bg); /* 仮のグレー背景 */
    position: relative;
    overflow: hidden;
}

.top-news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.no-image {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-white);
    font-size: 16px;
    font-weight: bold;
}

/* 記事コンテンツ（サムネイル下） */
.top-news-content {
    padding-top: 5px;
    text-align: left;
}

/* カテゴリ・日付エリア */
.top-news-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0px;
}

/* カテゴリバッジ */
.top-news-cat {
    position: absolute;
    bottom: 0;
    right: 0;
    background-color: var(--blog-primary);
    color: var(--text-white);
    font-size: 11px;
    font-weight: bold;
    padding: 3px 8px;
    /* 右下にくっつけるため、丸みをなくすか必要なら残します（今回は残します） */
    border-radius: 3px 0 0 0; /* 左上だけ丸くするスタイル例 */
    display: inline-block;
    z-index: 2;
}

/* 日付 */
.top-news-date {
    color: var(--text-muted);
    font-size: 13px;
}

/* タイトル */
.top-news-title {
    font-size: 15px;
    font-weight: 400;
    color: var(--blog-text);
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Button */
.top-news-btn-wrap {
    text-align: center;
}

.btn-more-news {
    display: inline-block;
    background-color: var(--btn-bg) !important;
    color: var(--btn-text) !important;
    font-size: 16px;
    font-weight: 400;
    padding: 15px 60px;
    border-radius: 4px;
    text-decoration: none !important;
    transition: transform 0.3s ease, opacity 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-more-news:hover {
    color: var(--btn-text) !important;
    text-decoration: none !important;
    transform: scale(1.05);
}

/* ==========================================================================
   Media Query (PC)
   ========================================================================== */
@media screen and (min-width: 768px) {
    .top-news-section {
        padding: 120px 0;
    }

    .top-news-inner {
        padding: 0 40px;
    }

    .top-news-header {
        position: relative; /* absoluteを解除 */
        text-align: left;
        margin-bottom: 0; /* 必要に応じて微調整（例: -5px） */
        line-height: 0; /* 画像の下の隙間を消す */
        z-index: 2;
    }
    
    .news-title-img {
        width: 140px !important; /* PC用サイズ指定。より小さくする場合は数値を調整 */
        max-width: 140px !important;
        vertical-align: bottom; /* 画像下の隙間対策 */
    }

    .top-news-list {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 60px;
        padding-top: 0; /* 余白をなくして画像にぴったりくっつける */
        margin-bottom: 60px;
    }

    .top-news-item {
        width: calc((100% - 120px) / 3); /* gap(60px * 2)を引いて3等分 */
    }



    /* 2件目のサムネイルを上にずらす (デザインの再現) */
    .top-news-item:nth-child(2) {
        transform: translateY(-80px);
    }
    .top-news-item.js-fade-down:nth-child(2) {
        transform: translateY(-110px);
    }
    .top-news-item.js-fade-down.is-active:nth-child(2) {
        transform: translateY(-80px);
    }

    /* 足跡背景をPC用に調整 */
    .top-news-section::before {
        width: 200px;
        height: 300px;
    }
    .top-news-section::after {
        width: 200px;
        height: 300px;
    }
}

  
/* Scroll Animation (Fade Down) */  
.js-fade-down {  
    opacity: 0;  
    transform: translateY(-30px);  
    transition: opacity 0.8s ease, transform 0.8s ease;  
}  
  
.js-fade-down.is-active {  
    opacity: 1;  
    transform: translateY(0);  
} 

/* ==========================================================================
   New Top News List Styles (Text Based)
   ========================================================================== */
/* SP First (Mobile) */
.top-news-list-new {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 40px;
    padding: 0 20px;
}

.top-news-list-item {
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 15px;
}

.top-news-list-link {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

.top-news-list-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.top-news-list-date {
    color: var(--blog-text);
    font-weight: bold;
    font-size: 14px;
    white-space: nowrap;
}

.top-news-list-cat {
    background-color: var(--blog-primary);
    color: var(--text-white);
    font-size: 11px;
    font-weight: bold;
    padding: 3px 10px;
    border-radius: 2px;
    white-space: nowrap;
}

.top-news-list-title {
    font-size: 15px;
    font-weight: 500;
    margin: 0;
    color: var(--blog-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* PC */
@media screen and (min-width: 768px) {
    .top-news-list-link {
        flex-direction: row;
        align-items: center;
        gap: 20px;
    }
    
    .top-news-list-date {
        font-size: 16px;
    }
    
    .top-news-list-cat {
        font-size: 13px;
        padding: 4px 12px;
    }
    
    .top-news-list-title {
        font-size: 16px;
        flex-grow: 1;
        -webkit-line-clamp: 1;
    }
}
