@import url('./partials/header.css');
@import url('./partials/page-title.css');
@import url('./partials/footer.css');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ベーススタイル */
body {
    font-family: Montserrat, 'Noto Sans JP', 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #fff;
    color: #222;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ヘッダー */
header {
    position: relative;
    z-index: 2;
    height: 80px;
}

/* 月別セレクター */
.selector {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    align-items: center;
}

.selector label {
    font-size: 1.1rem;
    font-weight: bold;
    color: #c40000;
    margin-right: 8px;
}

.selector select {
    font-size: 1.05rem;
    background: #fff;
    border: 1.5px solid #c40000;
    color: #222;
    border-radius: 6px;
    padding: 7px 14px;
    transition: border 0.2s;
}

.selector select:focus {
    border: 2px solid #c40000;
    outline: none;
}


/* ブログリスト */
.blog-list {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.blog-card {
    border: 1px solid #eee;
    border-left: 5px solid #c40000;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 25px;
    background-color: #fff8f8;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.blog-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.blog-card-link:hover {
    text-decoration: none;
    color: inherit;
}

/* 新しいブログカードのレイアウト */
.blog-card-content {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.blog-card-text {
    flex: 1;
    min-width: 0; /* flexアイテムの縮小を可能にする */
}

/* 画像がない場合は全幅表示 */
.blog-card:not(:has(.blog-card-image)) .blog-card-text {
    flex: none;
    width: 100%;
}

.blog-card-image {
    flex-shrink: 0;
    width: 180px;
    height: 180px;
    overflow: hidden;
    border-radius: 6px;
    background-color: #f5f5f5;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* 画像全体を表示 */
    background-color: #fff;
}

.category {
    font-size: 0.8rem;
    color: #c40000;
    font-weight: bold;
    text-transform: uppercase;
}

.blog-title {
    margin: 5px 0;
    font-size: 1.4rem;
    color: #111;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-date {
    font-size: 0.9rem;
    color: #999;
}

.excerpt {
    margin-top: 10px;
    font-size: 1rem;
    color: #444;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.read-more {
    display: inline-block;
    margin-top: 10px;
    color: #c40000;
    font-weight: bold;
    text-decoration: none;
}

.read-more:hover {
    text-decoration: underline;
}

/* 見出しとリンクのスタイル */
h1, h2, h3 {
    color: #c40000;
    font-family: Montserrat, 'Noto Sans JP', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 700;
    letter-spacing: 0.03em;
}

a {
    color: #c40000;
    transition: 0.3s;
}

a:hover {
    opacity: 0.7;
}

/* レスポンシブ対応 */
@media (max-width: 600px) {
    header {
        height: 60px;
    }

    .blog-card {
        padding: 10px;
    }

    .blog-card-content {
        position: relative;
    }
    
    .blog-card-image {
        position: absolute;
        top: 0;
        right: 0;
        width: 110px; /* SP版では少し小さめに */
        height: 90px; /* アスペクト比を保持 */
    }

    .blog-title {
        font-size: 1.2rem;
        margin-top: 0;
    }

    .excerpt {
        margin-top: 5px;
    }

    .blog-card-content:has(.blog-card-image) .blog-title {
        padding-right: 120px; /* 画像のスペースを確保 */
        height: 90px;
    }
}

/* アニメーション定義 */
@keyframes fade-in-menu {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fade-out-menu {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(0.95);
    }
}

