/* Topic page - 役立つ情報 */
.topic-section {
    background: #f5f5f0;
    padding: 60px 20px 80px;
    min-height: 100vh;
}

.topic-container {
    max-width: 1200px;
    margin: 0 auto;
}

.topic-header {
    text-align: center;
    margin-bottom: 40px;
}

.topic-heading {
    font-size: 54px;
    font-weight: 900;
    color: #d7172a;
    line-height: 1.5;
    margin: 0;
}

.topic-content-wrapper {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* Main Content Area */
.topic-main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.topic-knowledge-box {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.topic-knowledge-title {
    font-size: 32px;
    font-weight: 700;
    color: #d7172a;
    margin: 0 0 15px;
    line-height: 1.5;
}

.topic-divider {
    height: 3px;
    background: repeating-linear-gradient(to right, #C9C9C9 0, #C9C9C9 20px, transparent 8px, transparent 26px);
    margin-bottom: 20px;
}

.topic-article-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 20px;
}

.topic-article-item {
    display: block;
    gap: 15px;
    align-items: flex-start;
    line-height: 1.6;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.topic-article-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.topic-article-date {
    font-size: 16px;
    color: #636363;
    flex-shrink: 0;
    min-width: 100px;
    display: block;
}

.topic-article-text {
    font-size: 20px;
    color: #2E2E2E;
    flex: 1;
    line-height: 1.5;
    text-decoration: none;
}

.topic-more-link {
    text-align: right;
    margin-top: 10px;
}

.topic-more-text {
    font-size: 20px;
    color: #d7172a;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s ease;
    text-decoration: underline;
}

.topic-more-text:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Sidebar */
.topic-sidebar {
    width: 350px;
    flex-shrink: 0;
}

.topic-archive-box {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.topic-archive-title {
    font-size: 32px;
    font-weight: 700;
    color: #d7172a;
    margin: 0 0 15px;
    line-height: 1.5;
}

.topic-archive-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.topic-archive-category {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.topic-archive-category-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.topic-archive-icon {
    width: 24px;
    height: 24px;
    color: #2E2E2E;
    flex-shrink: 0;
}

.topic-archive-category-name {
    font-size: 24px;
    color: #2E2E2E;
    font-weight: 500;
    line-height: 1.5;
}

.topic-archive-month-box {
    background: #fff;
    border-radius: 8px;
    padding: 12px 15px;
    margin-left: 24px;
    border: 1px solid #e0e0e0;
}

.topic-archive-month {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.5;
    color: #E92530;
    text-decoration: none;
    display: inline-block;
}

/* .topic-archive-month:hover {
    color: #b91420;
    text-decoration: underline;
} */

@media (max-width: 768px) {
    .topic-section {
        padding: 40px 16px 60px;
    }

    .topic-content-wrapper {
        flex-direction: column-reverse;
    }

    .topic-sidebar {
        width: 100%;
    }

    .topic-heading {
        font-size: 32px;
    }

    .topic-knowledge-box,
    .topic-archive-box {
        padding: 20px;
    }

    .topic-knowledge-title {
        font-size: 22px;
    }
    
    .topic-archive-title {
        font-size: 28px;
    }

    .topic-article-date {
        font-size: 12px;
    }

    .topic-archive-category-name {
        font-size: 20px;
    }

    .topic-archive-month {
        font-size: 20px;
    }

    .topic-article-item {
        flex-direction: column;
        gap: 5px;
    }

    .topic-article-date {
        min-width: auto;
    }

    .topic-archive-month-box {
        margin-left: 0;
    }
}

/* Category page - 探偵の知識 */
.category-section {
    background: #f5f5f0;
    padding: 60px 20px 80px;
    min-height: 100vh;
}

.category-container {
    max-width: 1200px;
    margin: 0 auto;
}

.category-header {
    text-align: center;
    margin-bottom: 50px;
}

.category-heading {
    font-size: 54px;
    font-weight: 900;
    color: #d7172a;
    line-height: 1.5;
    margin: 0;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

.category-card {
    background: #FFFFFF;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

/* .category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
    border-color: #ffd6e3;
} */

.category-card-title {
    font-size: 24px;
    font-weight: 700;
    color: #2E2E2E;
    margin: 0;
    line-height: 1.5;
    line-clamp: 2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 60px; /* keep consistent height for two lines */
}

.category-card-date {
    font-size: 16px;
    color: #636363;
    margin: 0;
    line-height: 1.5;
}

.category-card-content {
    font-size: 18px;
    color: #2E2E2E;
    margin: 0;
    line-height: 1.6;
}

.category-card-description {
    font-size: 18px;
    color: #2E2E2E;
    margin: 0;
    line-height: 1.6;
    background: #FFEAEE;
    padding: 12px 15px;
    border-radius: 8px;
    line-clamp: 2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 50px;
}

/* Pagination */
.category-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.category-page-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    font-size: 18px;
    font-weight: 500;
    color: #2E2E2E;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.category-page-number:hover {
    background: #f0f0f0;
}

.category-page-number.active {
    background: #FFCBD1;
    color: #CA0A23;
    font-weight: 700;
}

.category-page-ellipsis {
    font-size: 18px;
    color: #2E2E2E;
    padding: 0 5px;
}

.category-page-next {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    font-size: 18px;
    font-weight: 700;
    color: #CA0A23;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.category-page-next:hover {
    background: #ffd6e3;
}

.category-page-next svg {
    width: 16px;
    height: 16px;
}

@media (max-width: 768px) {
    .category-section {
        padding: 40px 16px 60px;
    }

    .category-heading {
        font-size: 32px;
    }

    .category-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .category-card {
        padding: 20px;
    }

    .category-card-title {
        font-size: 18px;
    }

    .category-card-date {
        font-size: 14px;
    }

    .category-card-description {
        font-size: 16px;
        padding: 10px 12px;
        height: 45px;
    }

    .category-page-number,
    .category-page-next {
        min-width: 36px;
        height: 36px;
        font-size: 16px;
    }
}

/* Detail page - 記事詳細 */
.detail-section {
    background: #fff;
    padding: 60px 20px 80px;
    min-height: 100vh;
}

.detail-container {
    max-width: 900px;
    margin: 0 auto;
}

.detail-article {
    background: #fff;
}

.detail-main-title {
    font-size: 48px;
    font-weight: 700;
    color: #d7172a;
    line-height: 1.6;
    margin: 0 0 15px;
}

.detail-date {
    font-size: 16px;
    color: #2E2E2E;
    margin: 0 0 20px;
    line-height: 1.5;
    text-align: right;
}

.detail-highlighted-title {
    background: #FFEAEE;
    padding: 15px 20px;
    font-size: 20px;
    font-weight: 500;
    color: #2E2E2E;
    line-height: 1.6;
    margin: 0 0 30px;
    border-radius: 4px;
}

.detail-content {
    margin-top: 30px;
}

.detail-paragraph {
    font-size: 20px;
    color: #2E2E2E;
    line-height: 1.8;
    margin: 0 0 30px;
}

.detail-section-title {
    font-size: 28px;
    font-weight: 700;
    color: #d7172a;
    margin: 40px 0 25px;
    line-height: 1.5;
}

.detail-points-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin: 25px 0 40px;
}

.detail-point-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.detail-point-number {
    font-size: 24px;
    font-weight: 700;
    color: #d7172a;
    flex-shrink: 0;
    min-width: 30px;
    line-height: 1.5;
}

.detail-point-content {
    flex: 1;
}

.detail-point-question {
    font-size: 20px;
    font-weight: 700;
    color: #2E2E2E;
    margin: 0 0 10px;
    line-height: 1.5;
}

.detail-point-text {
    font-size: 20px;
    color: #2E2E2E;
    line-height: 1.8;
    margin: 0;
}

/* Responsive Design for Detail */
@media (max-width: 768px) {
    .detail-section {
        padding: 40px 16px 60px;
    }

    .detail-main-title {
        font-size: 24px;
    }

    .detail-highlighted-title {
        font-size: 16px;
        padding: 12px 15px;
    }

    .detail-section-title {
        font-size: 22px;
    }

    .detail-paragraph {
        font-size: 16px;
    }

    .detail-point-number {
        font-size: 20px;
        min-width: 25px;
    }

    .detail-point-question {
        font-size: 18px;
    }

    .detail-point-text {
        font-size: 16px;
    }
    
    .topic-main-content {
        width: 100%;
    }

    .topic-article-text {
        font-size: 16px;
    }
}