/* =============================
   ヘッダー
   ============================= */
.topic .topic__header {
    height: 80px;
    margin-bottom: 50px;
    text-align: left;
    color: #FFF;
    background: #F15A24;
}

.topic .topic__header h1 {
    display: flex;
    align-items: center;
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    padding-left: 25px;
    font-size: 2em;
    font-weight: 600;
}

/* =============================
   背景
   ============================= */
#topics_bg {
    background: #FFFDE1;
}

#topics_bg .main120 {
    margin-bottom: 0 !important;
}

.title{
    position: relative;
    margin-top: 9em;
}
.img_top{
    position: absolute;
    /*top: -60%;*/
    bottom: 50%;
    right: 3em;
    width: 33%;

}

/* =============================
   アーカイブ
   ============================= */
.archive {
    top: 2rem;
    height: fit-content;
    margin-bottom: 1.5em;
    padding: 1.5rem;
    border-radius: 10px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.archive h3 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    font-size: 1.2rem;
    color: #000;
}



.archive-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
}

.archive-list li {
    margin-bottom: 0.5rem;
}

.archive-list button {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    padding: 0.4rem 0.8rem;
    border: 1px solid #DBDBDB;
    border-radius: 11px;
    text-align: left;
    font-size: 0.95rem;
    color: #000;
    background: #DBDBDB;
    cursor: pointer;
    transition: all 0.3s;
}

.archive-list button:hover {
    border: 1px solid #F15A24;
    color: #fff;
    background: #F15A24;
}

.archive-list button.active {
    border: 1px solid #F15A24;
    color: white;
    background: #F15A24;
}

.archive-list button.active:hover {
    border: 1px solid #DBDBDB;
    color: #000;
    background: #f0f0f0;
}

.post-count {
    padding: 0.1rem 0.6rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.5em;
    color: #FFF;
    background: #9C8A7F;
}

.archive-list button.active .post-count {
    background: #E99C6F;
}

/* =============================
   slug ボタン
   ============================= */
.topcs-button {
    border: none;
    border-radius: 4px;
    font-weight: 500;
    color: #F15A24;
    cursor: pointer;
}

.empty-btn-container {
    display: flex;
    justify-content: center;
    margin-top: 2em;
}

.topics-button_b {
    padding: 0.2em 1em;
    border-radius: 20px;
    color: #FFF;
    background: #F15A24 0% 0% no-repeat padding-box;
}

.topics-button_b:hover {}

.icon-arrow-left {
    display: inline-block;
    width: 0.5em;
    height: 0.5em;
    border-top: 3px solid currentColor;
    border-left: 3px solid currentColor;
    transform: rotate(-45deg);
    margin-right: 0.5em;
    margin-left: 0.5em;
    margin-bottom: 0.1em;
}

/* =============================
   メインコンテンツ
   ============================= */
.main-content {
    min-height: 400px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #F15A24;
}

.stat-label {
    margin-top: 0.25rem;
    font-size: 0.9rem;
    color: #666;
}

.topics a {
    text-decoration: underline;
    color: #F15A24;
}

.topics a:hover {
    color: #3E1000;
}

/* =============================
   フィルター / 表示件数
   ============================= */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.25rem;
    margin-bottom: 1.5rem;
}

.display-count {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.25rem;
    margin-bottom: 1.5rem;
}

.filter-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: white;
    background: #F15A24;
}

.filter-badge button {
    padding: 0;
    border: none;
    font-size: 1.2rem;
    line-height: 1;
    color: white;
    background: none;
    cursor: pointer;
}

/* =============================
   記事グリッド
   ============================= */
.posts-grid {
    gap: 2rem;
}

/* =============================
   記事カード
   ============================= */
.post-card {
    overflow: hidden;
    border-radius: 12px;
    background: white;
    box-shadow: 0px 3px 6px #00000029;
    transition: transform 0.3s, box-shadow 0.3s;
}

/* 記事詳細 */
.post-card-detail {
    overflow: hidden;
    padding: 2.5rem;
    line-height: 1.8;
    transition: max-height 0.5s ease;
}

.post-card-detail img {
    max-width: 100%;
    height: auto;
}

.post-card.loading .post-card-detail {
    text-align: center;
    color: #999;
}

/* 折りたたみ */
.post-card-detail.collapsed {
    position: relative;
    max-height: 350px;
}

.post-card-detail.collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.95) 50%, rgba(255, 255, 255, 1));
    pointer-events: none;
}

/* 続きを読むボタン */
.read-more-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem 0;
    margin-top: 0.5rem;
    border: none;
    font-size: 0.9rem;
    font-weight: 500;
    color: #F15A24;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.read-more-button::before {
    content: '';
    position: absolute;
    bottom: 0.75rem;
    left: 50%;
    width: 0;
    height: 1px;
    background: #3E1000;
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.read-more-button:hover {
    color: #3E1000;
}

.read-more-button:hover::before {
    width: 120px;
}

.read-more-button.hidden {
    display: none;
}

.read-more-button::after {
    content: '▼';
    font-size: 0.75rem;
    opacity: 0.7;
    transition: transform 0.3s;
}

.read-more-button.expanded::after {
    content: '▲';
    transform: rotate(180deg);
}


/* =============================
   記事内パーツ
   ============================= */
.post-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, #F15A24 0%, #764ba2 100%);
}

.post-content {
    padding: 2.5rem;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    color: #999;
}

.post-date {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 2em;
    margin-left: 1em;
}

.post-title {
    margin-bottom: 0.75rem;
    padding-left: 0.75em;
    border-left: solid 8px #F15A24;
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.4;
    color: #333;
}



.post-summary {
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #666;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    padding: 0.3rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85rem;
    color: #F15A24;
    background: #f0f0f0;
}

/* =============================
   空の状態
   ============================= */
.empty-state {
    padding: 4rem 2rem;
    border-radius: 12px;
    text-align: center;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.empty-state svg {
    width: 120px;
    height: 120px;
    margin-bottom: 1.5rem;
    opacity: 0.3;
}

.empty-state h3 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    color: #666;
}

.empty-state p {
    color: #999;
}

/* =============================
   ローディング
   ============================= */
.loading {
    padding: 4rem 2rem;
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #F15A24;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* =============================
   最終更新
   ============================= */
.last-updated-container {
    padding-top: 2em;
    padding-bottom: 5em;
    text-align: center;
    color: #666;
}

/* =============================
   アニメーション
   ============================= */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* =============================
   レスポンシブ
   ============================= */
@media (max-width: 968px) {
    .main-layout {
        grid-template-columns: 1fr;
    }

    .archive {
        position: static;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }

    .header h1 {
        font-size: 2rem;
    }
    .title{
        position: relative;
        margin-top: 4em;
    }
    .img_top{
        position: absolute;
        bottom: 60%;
        right: 3em;
        width: 33%;

}
}