@charset "UTF-8";

/* ==========================================================================
   Mag Archive Styles (記事一覧・アーカイブ用)
   ========================================================================== */

.mag-archive-wrap {
    padding: 40px 0;
    background-color: #f4f4f4;
}

.mag-archive-in {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* アーカイブヘッダー */
.mag-archive-wrap .mag-archive-header.card {
    margin-bottom: 40px;
    padding: 40px;
    background-color: #333;
    color: #fff;
    text-align: center;
    box-shadow: none;
}

.mag-archive-title {
    font-size: clamp(24px, 4vw, 42px);
    margin: 0;
    font-weight: bold;
}

.mag-label {
    display: block;
    font-size: 14px;
    font-family: 'Oswald', sans-serif;
    letter-spacing: 0.2em;
    color: #e70314;
    margin-bottom: 10px;
}

.mag-archive-desc {
    margin-top: 20px;
    font-size: 16px;
    color: #ccc;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* メインレイアウト */
.mag-archive-main-row {
    display: flex;
    gap: 40px;
}

.mag-archive-content {
    flex: 1;
}

.mag-archive-sidebar {
    flex: 0 0 320px;
}

/* サイドバー内のウィジェット調整 */
.mag-archive-sidebar .sidebar .side1 h4,
.mag-archive-sidebar .sidebar .side2 h4 {
    background-color: #333;
    color: #fff;
    font-size: 18px;
    padding: 15px;
    margin-bottom: 15px;
}

.mag-archive-sidebar .sidebar .side2 {
    background-color: #fff;
    color: #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.mag-archive-sidebar .sidebar .side2 h4 {
    margin-bottom: 0;
}

.mag-archive-sidebar .sidebar .side2 ul {
    padding: 10px 20px;
}

.mag-archive-sidebar .sidebar .side2 ul li {
    border-top: 1px solid #eee;
    padding: 15px 0;
}

.mag-archive-sidebar .sidebar .side2 ul li:first-child {
    border-top: none;
}

.mag-archive-sidebar .sidebar .side2 ul li a {
    color: #333;
    font-size: 16px;
    font-weight: normal;
    line-height: 1.4;
    margin-bottom: 0;
}

.mag-archive-sidebar .sidebar .side2 ul li:hover a {
    color: #e70314;
    text-shadow: none;
}

/* 記事グリッド (headline.cssと共通の設計) */
.mag-archive-wrap .card {
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.mag-archive-wrap .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.mag-article-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.mag-article-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.mag-article-thumbnail {
    width: 100%;
    aspect-ratio: 3 / 2;
    overflow: hidden;
}

.mag-article-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mag-article-content {
    padding: 20px;
    flex: 1;
}

.mag-category-small {
    font-size: 12px;
    color: #e70314;
    font-weight: bold;
    margin-bottom: 8px;
}

.mag-category-small a {
    color: inherit;
    text-decoration: none;
}

.mag-article-title {
    font-size: 18px;
    line-height: 1.5;
    margin-bottom: 10px;
}

.mag-article-title a {
    color: #333;
    text-decoration: none;
}

.mag-meta {
    font-size: 12px;
    color: #999;
}

/* ページネーション (既存の構造を継承しつつ調整) */
.pager {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 40px;
    background: none !important;
    box-shadow: none !important;
}

.pager span, .pager a {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0 !important;
    font-size: 14px !important;
    border-radius: 4px;
    background: #fff;
    color: #333;
    text-decoration: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.pager span.current {
    background: #e70314 !important;
    color: #fff !important;
    border: none !important;
}

/* -------------------------------------------------------------------------- */
/*                                Mobile Styles                               */
/* -------------------------------------------------------------------------- */

@media screen and (max-width: 900px) {
    .mag-archive-main-row {
        flex-direction: column;
    }
    .mag-archive-sidebar {
        flex: none;
        width: 100%;
    }
}

@media screen and (max-width: 639px) {
    .mag-archive-wrap {
        padding: 20px 0;
    }
    .mag-archive-header {
        padding: 30px 20px;
        margin-bottom: 20px;
    }
    .mag-article-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}
