/* Blog Page Styles */

/* Main Visual for Blog Pages */
#blog-mv {
    background-image: url('../images/header_top.png');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 10rem 0;
    position: relative;
}

#blog-mv::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

#blog-mv .container {
    position: relative;
    z-index: 2;
}

#blog-mv h1 {
    font-size: 3rem;
    margin: 0;
    color: white;
    -webkit-text-fill-color: white;
}

#blog-mv p {
    font-size: 1.2rem;
    margin-top: 0.5rem;
}

/* Blog List Section */
#blog-list-section {
    padding: 6rem 0;
    background-image: url('../images/hexagon-pattern.svg');
    background-repeat: repeat;
    background-size: 100px 115px;
}

.blog-list-items li {
    border-bottom: 1px solid #e0e0e0;
}

.blog-list-items li a {
    display: flex;
    align-items: center;
    padding: 1.5rem 1rem;
    transition: background-color 0.3s;
}

.blog-list-items li a:hover {
    background-color: #f7f7f7;
}

.blog-list-items img {
    width: 150px;
    height: 100px;
    object-fit: cover;
    margin-right: 2rem;
    border-radius: 8px;
    flex-shrink: 0;
}

.blog-text-content {
    display: flex;
    flex-direction: column;
}

.blog-text-content time {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 0.5rem;
}

/* Pagination and Single Page styles are the same as news */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 3rem;
    gap: 0.5rem;
}
.pagination a, .pagination span {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: var(--main-color);
}
.pagination .current {
    background-color: var(--main-color);
    color: white;
}

#blog-single-section {
    padding: 5rem 0;
}
.breadcrumbs {
    margin-bottom: 2rem;
    color: #888;
}
.breadcrumbs a {
    color: var(--main-color);
}

/* --- ブログ詳細ページ --- */
.blog-article {
    width: 100%;
    max-width: 800px; /* 記事全体の最大幅 */
    margin: 0 auto 4rem auto;
    padding: 2rem;
    box-sizing: border-box;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.article-eyecatch {
    width: 100%;
    margin-bottom: 2rem;
    text-align: center; /* 画像を中央揃えにする */
}

.article-eyecatch img {
    max-width: 100%; /* 親要素の幅に合わせて最大幅を設定（レスポンシブ） */
    height: auto;    /* 縦横比を維持 */
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.article-title {
    font-size: 1.7rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    text-align: left !important;
}

.article-date {
    color: #888;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.article-content {
    line-height: 1.8;
    font-size: 1rem;
}

.article-content h1,
.article-content h2,
.article-content h3 {
    margin-top: 2.5rem;
    margin-bottom: 1.2rem;
    line-height: 1.5;
    color: #333;
    font-weight: 600;
}
.article-content h2 { 
    font-size: 1.5rem !important; 
    border-bottom: 2px solid #f0f0f0 !important; 
    padding: 0.8rem 1rem !important; 
    text-align: left !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    border-radius: 6px !important;
    margin: 2.5rem 0 1.2rem 0 !important;
    position: relative !important;
    background-color: #fafbfd !important;
}

.article-content h2::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #fafbfd;
    border-radius: 6px;
    z-index: -1;
}

/* ブログ記事内のテーブルスタイル */
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* PC版のテーブルサイズ調整 */
@media (min-width: 769px) {
    .article-content table {
        width: 70%;
        margin: 1.5rem 0;
    }
}

.article-content table tr {
    border-bottom: solid 2px white;
}

.article-content table tr:last-child {
    border-bottom: none;
}

.article-content table th {
    position: relative;
    text-align: left;
    width: 30%;
    background: linear-gradient(135deg, #52c2d0 0%, #5dd1de 100%);
    color: white;
    text-align: center;
    padding: 10px 12px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* PC版のテーブルセル調整 */
@media (min-width: 769px) {
    .article-content table th {
        width: 25%;
        padding: 8px 10px;
        font-size: 0.85rem;
    }
    
    .article-content table td {
        width: 75%;
        padding: 8px 10px;
        font-size: 0.85rem;
        line-height: 1.3;
    }
}


.article-content table td {
    text-align: left;
    width: 70%;
    text-align: center;
    background-color: #f8f9fa;
    padding: 10px 12px;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* テーブル内のpタグを左揃え */
.article-content table p {
    text-align: left !important;
    margin: 0;
    padding-left: 10px;
}

/* ブログ記事内の引用コメント */
.article-content blockquote {
    font-size: 0.8rem;
    font-style: italic;
    margin: 1.5rem 0;
    padding: 1rem;
    border-left: 4px solid #52c2d0;
    background-color: #f8f9fa;
    border-radius: 0 6px 6px 0;
}

/* スマホ版のテーブル調整 */
@media (max-width: 768px) {
    .article-content table th,
    .article-content table td {
        padding: 8px 10px;
        font-size: 0.85rem;
        line-height: 1.3;
    }
    
}
.article-content h3 { 
    font-size: 1.3rem; 
    color: #4a90e2;
    border-left: 4px solid #4a90e2;
    padding-left: 1rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    margin-left: -1rem;
    padding-right: 1rem;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content img {
    max-width: 100%;
    height: auto;
    margin: 2rem 0;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.article-content a {
    color: #4a90e2;
    text-decoration: underline;
}

.article-content ul, .article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.article-content ul {
    border: solid 2px #4a90e2;
    padding: 0.5em 1em 0.5em 2.3em;
    position: relative;
    margin-bottom: 1.5rem;
    background-color: #f8f9ff;
    border-radius: 8px;
}

.article-content ul li {
    line-height: 1.5;
    padding: 0.5em 0;
    list-style-type: none !important;
    color: #555;
    position: relative;
}

.article-content ul li::before {
    content: "✓";
    position: absolute;
    left: -1.3em;
    color: #4a90e2;
    font-weight: bold;
    font-size: 1.1rem;
}

.article-content ol {
    counter-reset: item;
    padding-left: 0;
}

.article-content ol li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 0.8rem;
    line-height: 1.6;
    color: #555;
    counter-increment: item;
}

.article-content ol li::before {
    content: counter(item) ".";
    color: #4a90e2;
    font-weight: 600;
    position: absolute;
    left: 0;
    top: 0;
}

.article-content blockquote {
    margin: 2rem 0;
    padding: 1rem 1.5rem;
    border-left: 4px solid #e0e0e0;
    background-color: #f9f9f9;
    color: #555;
}

@media (max-width: 768px) {
    .blog-article {
        padding-left: 10px;
        padding-right: 10px;
    }

    .article-content h2 {
        text-align: left !important;
        font-size: 1.4rem;
    }

    .article-content h3 {
        font-size: 1.2rem;
        margin-left: 0;
        padding-left: 0.8rem;
        padding-right: 0.8rem;
    }

    .article-title {
        text-align: left !important;
        font-size: 1.7rem;
    }

    .article-content ul {
        padding: 0.4em 0.8em 0.4em 2em;
        margin-bottom: 1.2rem;
    }

    .article-content ul li {
        padding: 0.4em 0;
        font-size: 0.95rem;
    }

    .article-content ul li::before {
        left: -1.1em;
        font-size: 1rem;
    }

    .article-content ol li {
        padding-left: 1.5rem;
        margin-bottom: 0.6rem;
        font-size: 0.95rem;
    }

    .blog-list-items {
        padding-left: 0;
    }

    .blog-list-items li {
        border-bottom: none;
        margin-bottom: 1.5rem;
        background-color: #fff;
        border-radius: 12px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.05);
        overflow: hidden; /* 画像の角丸を適用するため */
    }

    .blog-list-items li a {
        display: block;
        padding: 0;
    }

    .blog-list-items img {
        width: 100%;
        height: auto;
        margin-right: 0;
        border-radius: 12px 12px 0 0; /* 上の角だけ丸める */
    }

    .blog-list-items .blog-text {
        padding: 10px 1.2rem;
    }

    .blog-list-items .blog-text h3 {
        font-size: 1.1rem;
        line-height: 1.5;
    }
}

@media (max-width: 768px) {
    #blog-mv {
        padding: 5rem 0;
    }
}
