@charset "UTF-8";

/* TOPIC詳細ページ */
.topic-detail {
    padding: 60px 0;
}

.topic-detail__inner {
    max-width: 900px;
    position: relative;
    min-height: 500px;
}

/* ローディング表示 */
.topic-detail__loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--text-color);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border-radius: 50%;
    border: 4px solid var(--bg-light);
    border-top-color: var(--main-color);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* エラーメッセージ */
.topic-detail__error {
    padding: 30px;
    background-color: #fff0f0;
    border-radius: 10px;
    text-align: center;
    color: #e53e3e;
    margin: 40px auto;
    max-width: 600px;
}

.topic-detail__error p {
    margin-bottom: 15px;
}

.topic-detail__error a {
    color: var(--main-color);
    text-decoration: underline;
}

/* 記事ヘッダー */
.topic-detail__header {
    margin-bottom: 30px;
}

.topic-detail__title {
    font-size: 32px;
    font-weight: bold;
    line-height: 1.4;
    margin-bottom: 15px;
    color: var(--text-color);
}

.topic-detail__meta {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #666;
    font-size: 14px;
}

.topic-detail__category {
    display: inline-block;
    padding: 4px 12px;
    background-color: var(--pink-color);
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.topic-detail__date {
    color: #777;
}

/* アイキャッチ画像 */
.topic-detail__eyecatch {
    margin-bottom: 30px;
    overflow: hidden;
    border: 1px solid #000000;
}

.topic-detail__img {
    width: 100%;
    height: auto;
    display: block;
}

/* 記事本文 */
.topic-detail__body {
    line-height: 1.8;
    color: var(--text-color);
}

.topic-detail__body h1,
.topic-detail__body h2,
.topic-detail__body h3,
.topic-detail__body h4,
.topic-detail__body h5,
.topic-detail__body h6 {
    margin-top: 2em;
    margin-bottom: 1em;
    font-weight: bold;
    line-height: 1.4;
}

.topic-detail__body h2 {
    font-size: 24px;
    padding-bottom: 0.5em;
    border-bottom: 1px solid #eee;
    color: var(--main-color);
}

.topic-detail__body h3 {
    font-size: 20px;
    color: var(--accent-color);
}

.topic-detail__body p {
    margin-bottom: 1.5em;
}

.topic-detail__body ul,
.topic-detail__body ol {
    margin-bottom: 1.5em;
    padding-left: 1.5em;
}

.topic-detail__body li {
    margin-bottom: 0.5em;
}

.topic-detail__body img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 1em 0;
}

.topic-detail__body a {
    color: var(--main-color);
    text-decoration: underline;
}

.topic-detail__body blockquote {
    margin: 1.5em 0;
    padding: 1em 1.5em;
    border-left: 4px solid var(--accent-color);
    background-color: var(--bg-light);
    font-style: italic;
}

.topic-detail__body table {
    width: 100%;
    margin: 1.5em 0;
    border-collapse: collapse;
}

.topic-detail__body th,
.topic-detail__body td {
    padding: 0.75em;
    border: 1px solid #ddd;
    text-align: left;
}

.topic-detail__body th {
    background-color: var(--bg-light);
    font-weight: bold;
}

/* ナビゲーション */
.topic-detail__nav {
    margin-top: 60px;
    padding-top: 30px;
    text-align: center;
}

.topic-detail__back {
    display: inline-flex;
    align-items: center;
    padding: 12px 25px;
    background-color: var(--pink-color);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.3s;
}

.topic-detail__back:hover {
    background-color: #DE4E74;
    transform: translateY(-3px);
}

.topic-detail__back i {
    margin-right: 8px;
}

/* レスポンシブ対応 */
@media screen and (max-width: 768px) {
    .topic-detail {
        padding: 40px 0;
    }
    
    .topic-detail__title {
        font-size: 24px;
    }
    
    .topic-detail__body h2 {
        font-size: 20px;
    }
    
    .topic-detail__body h3 {
        font-size: 18px;
    }
}

@media screen and (max-width: 576px) {
    .topic-detail__meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .topic-detail__title {
        font-size: 20px;
    }
    
    .topic-detail__body h2 {
        font-size: 18px;
    }
    
    .topic-detail__body h3 {
        font-size: 16px;
    }
} 