/* リセットCSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* フルブリード（全幅）表示をサポートする基本設定 */
html, body {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
}

body.full-bleed {
    position: relative;
}

body {
    font-family: 'Hiragino Kaku Gothic Pro', 'メイリオ', sans-serif;
    line-height: 1.7;
    color: #333;
    background-color: #f8f8f8;
}

a {
    text-decoration: none;
    color: #0066cc;
}

a:hover {
    text-decoration: underline;
    color: #004499;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

ul, ol {
    list-style: none;
}

/* ヘッダー */
.header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    padding: 0;
    margin: 0;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

/* サイトタイトル */
.site-title {
    margin: 0;
    padding: 0;
    flex-shrink: 0;
}

/* ナビゲーションバー */
.nav-bar {
    display: flex;
    align-items: center;
    flex-grow: 1;
    justify-content: flex-end;
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 5px;
}

.nav-item {
    margin: 0;
    padding: 0;
}

.menu-item {
    display: block;
    padding: 8px 16px;
    color: #333;
    text-decoration: none;
    transition: color 0.3s, background-color 0.3s;
    border-radius: 4px;
    font-weight: 500;
    white-space: nowrap;
}

.menu-item:hover {
    color: #0066cc;
    background-color: #f0f0f0;
    text-decoration: none;
}

.nav-item.active .menu-item {
    color: #0066cc;
    font-weight: 600;
}

/* ハンバーガーメニュー */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
    background: transparent;
    border: none;
    position: relative;
    z-index: 1001;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* レスポンシブ - モバイル向けメニュー */
@media (max-width: 991px) {
    .hamburger {
        display: flex;
    }
    
    .nav-bar {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 280px;
        height: calc(100vh - 70px);
        background-color: #fff;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        transition: left 0.3s ease;
        overflow-y: auto;
        z-index: 999;
        justify-content: flex-start;
        padding: 0;
    }
    
    .nav-bar.active {
        left: 0 !important;
    }
    
    .nav-list {
        flex-direction: column;
        padding: 20px 0;
        gap: 0;
        width: 100%;
    }
    
    .nav-item {
        width: 100%;
        border-bottom: 1px solid #eee;
    }
    
    .nav-item:last-child {
        border-bottom: none;
    }
    
    .menu-item {
        padding: 15px 20px;
        border-radius: 0;
        width: 100%;
    }
    
    /* ハンバーガーアニメーション */
    .hamburger.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
}

/* コンテナ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    width: 100%;
    overflow-x: hidden;
}

/* ブログ記事用コンテナ */
.blog-container {
    overflow: visible !important;
}

/* ブログ記事全体 */
article.blog-detail {
    width: 100%;
    overflow: visible;
    max-width: 100%;
}

/* ヘッダースタイルはnavbar.cssへ移動しました */

/* FRESH!バッジの完全非表示 */
.fresh-badge, 
.new-badge {
    display: none;
    opacity: 0;
    visibility: hidden;
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    pointer-events: none;
    clip: rect(0, 0, 0, 0);
}

/* コンテンツ広げ */
.main {
    min-height: calc(100vh - 300px);
    padding: 40px 0 0;
    width: 100%;
    overflow-x: hidden;
    max-width: 100vw;
}

/* セクションタイトル - カテゴリーページなどで使用 */
.section-title {
    font-size: 2rem;
    margin: 0 15px 30px;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: #0066cc;
}

/* 記事グリッド */
.posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 0 15px;
    margin: 0;
    max-width: none;
    width: calc(100% - 30px);
}

/* Small screens (tablets) */
@media (min-width: 768px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Medium screens (laptops) */
@media (min-width: 992px) and (max-width: 1199px) {
    .posts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Large screens (desktops) */
@media (min-width: 1200px) {
    .posts-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ブログカード */
.blog-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin: 40px 15px 50px;
    padding: 0;
    max-width: none;
    width: calc(100% - 30px);
}

/* Small screens (tablets) */
@media (min-width: 768px) {
    .blog-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Medium screens (laptops) */
@media (min-width: 992px) and (max-width: 1199px) {
    .blog-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Large screens (desktops) */
@media (min-width: 1200px) {
    .blog-list {
        grid-template-columns: repeat(4, 1fr);
    }
}

.blog-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.blog-card-link {
    display: block;
    color: #333;
}

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

.blog-card-image {
    position: relative;
    overflow: hidden;
    padding-top: 56.25%; /* 16:9 Aspect Ratio (9/16 = 0.5625 = 56.25%) */
}

.blog-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.blog-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 5px;
}

.blog-card-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
    line-height: 1.4;
}

.blog-card-date, .post-meta {
    font-size: 0.8rem;
    color: #666;
    margin: 0;
    margin-top: 0;
    margin-bottom: 10px;
}

/* ホームページの日付情報スタイル */
.post-dates {
    text-align: right;
    margin-top: 15px;
    margin-bottom: 0;
}

.date-info {
    font-size: 0.65rem !important;
    color: #888 !important;
    font-style: italic !important;
    font-weight: normal !important;
    opacity: 0.8;
}

.blog-card-category {
    margin: 0;
    margin-top: 0;
    margin-bottom: 10px;
}

.category-label {
    display: inline-block;
    background-color: #0066cc;
    color: #fff;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
}

/* 概要テキストのスタイル統合 */
.blog-card-summary, .post-summary {
    font-size: 0.9rem;
    margin: 10px 0 15px;
    color: #555;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.blog-card-tags, .post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
}

.tag-label, .post-tag {
    display: inline-block;
    background-color: #f0f0f0;
    color: #666;
    padding: 3px 10px;
    margin: 3px;
    border-radius: 12px;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    min-width: 60px;
    text-align: center;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.post-tag:hover {
    background-color: #0066cc;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 3px rgba(0,0,0,0.15);
}

/* カテゴリーリスト */
.category-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.category-item {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.category-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.category-link {
    display: block;
    color: #333;
}

.category-link:hover {
    text-decoration: none;
}

.category-name {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #0066cc;
}

.category-description {
    font-size: 0.9rem;
    color: #666;
}

/* ブログ記事詳細 */
.blog-detail {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    padding: 30px 15px 40px;
    margin: 0 auto 40px;
    max-width: 1200px;
    width: calc(100% - 30px);
}

/* 全幅表示の記事詳細 */
.blog-detail-full-width {
    margin: 0 15px 40px;
    max-width: none;
    width: calc(100% - 30px);
}

.blog-header {
    margin-bottom: 30px;
}

.blog-title {
    font-size: 2.2rem;
    margin-bottom: 20px;
    line-height: 1.4;
}

.blog-meta {
    margin-bottom: 20px;
    color: #666;
    font-size: 0.9rem;
}

.blog-date, .blog-updated, .blog-category {
    margin-bottom: 5px;
}

/* 全幅アイキャッチ画像 */
.blog-eyecatch-full-width {
    width: 100vw;
    margin: 0 0 30px;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    overflow: hidden;
}

.blog-eyecatch-full-width img {
    width: 100%;
    display: block;
    max-width: none;
    margin: 0;
    border-radius: 0;
}

/* 旧スタイル - 互換性のために残しておく */
.blog-eyecatch {
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
}

.blog-content {
    margin-bottom: 40px;
    line-height: 1.8;
}

.blog-content h2 {
    font-size: 1.8rem;
    margin: 40px 15px 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
    max-width: none;
}

.blog-content h3 {
    font-size: 1.5rem;
    margin: 30px 15px 15px;
    max-width: none;
}

.blog-content p {
    margin: 0 15px 20px;
    max-width: none;
}

.blog-content ul, .blog-content ol {
    margin: 20px 15px;
    padding-left: 40px;
    max-width: none;
}

.blog-content ul {
    list-style-type: disc;
}

.blog-content ol {
    list-style-type: decimal;
}

.blog-content li {
    margin-bottom: 10px;
}

.blog-content a {
    color: #0066cc;
    text-decoration: underline;
}

.blog-content img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
    border-radius: 8px;
}

/* 記事内の画像を全幅表示するクラス */
.blog-content img.full-width {
    max-width: none;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-top: 20px;
    margin-bottom: 20px;
    border-radius: 0;
}

.blog-content blockquote {
    margin: 20px 15px;
    padding: 15px 20px;
    background-color: #f8f8f8;
    border-left: 4px solid #0066cc;
    font-style: italic;
    max-width: none;
}

.blog-content pre {
    margin: 20px 15px;
    padding: 15px;
    background-color: #2a2a2a;
    color: #f8f8f8;
    border-radius: 5px;
    overflow-x: auto;
    max-width: none;
}

.blog-content code {
    font-family: Consolas, Monaco, 'Andale Mono', monospace;
    font-size: 0.9rem;
}

.blog-tags {
    margin: 0 15px 30px;
    max-width: none;
}

.tags-label {
    display: inline-block;
    margin-right: 10px;
    font-weight: bold;
}

.tags-list {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-link {
    display: inline-block;
    background-color: #f0f0f0;
    color: #666;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    margin: 5px;
    min-width: 80px;
    text-align: center;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.tag-link:hover {
    background-color: #0066cc;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.blog-navigation, .category-navigation, .tag-navigation {
    text-align: center;
    margin: 40px 15px 0;
    padding: 20px 0;
    max-width: none;
    width: calc(100% - 30px);
}

.back-to-home, .to-category {
    display: inline-block;
    padding: 8px 20px;
    background-color: #0066cc;
    color: #fff;
    border-radius: 5px;
    margin: 0 10px;
    transition: background-color 0.3s;
}

.back-to-home:hover, .to-category:hover {
    background-color: #004499;
    text-decoration: none;
}

/* カテゴリー詳細 */
.category-detail, .tag-detail {
    margin: 0 15px 40px;
    padding: 0;
}

.category-header, .tag-header {
    text-align: center;
    margin-bottom: 40px;
}

.category-title, .tag-title {
    font-size: 2rem;
    margin-bottom: 15px;
}

.category-description, .tag-description {
    color: #666;
    max-width: 700px;
    margin: 0 auto;
}

.no-posts {
    text-align: center;
    margin: 50px 0;
    color: #666;
    font-style: italic;
}

/* フッター */
.footer {
    background-color: #333;
    color: #fff;
    padding: 50px 0 20px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #0066cc;
}

.footer-description {
    opacity: 0.8;
    margin-bottom: 20px;
    font-style: italic;
    color: #b3d9ff;
    line-height: 1.5;
}

.footer-heading {
    font-size: 1.2rem;
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 10px;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: #0066cc;
}

.footer-list {
    margin-bottom: 20px;
}

.footer-item {
    margin-bottom: 10px;
}

.footer-item a {
    color: #ccc;
    transition: color 0.3s;
}

.footer-item a:hover {
    color: #fff;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-item {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.1);
    color: #ccc;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    transition: background-color 0.3s;
}

.tag-item:hover {
    background-color: rgba(255, 255, 255, 0.2);
    text-decoration: none;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 0.9rem;
}

.copyright {
    margin-bottom: 10px;
}

.generation-note {
    opacity: 0.6;
    font-size: 0.8rem;
}

/* レスポンシブデザイン - モバイル向け */
@media (max-width: 480px) {
    .category-list {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 1.4rem;
    }
    
    .blog-title {
        font-size: 1.4rem;
    }
}

/* カテゴリーとタグページの統一スタイル */
.category-detail, .tag-detail {
    width: 100%;
    max-width: 1200px;
    margin: 40px auto 50px;
    padding: 0 15px;
}

/* 全幅表示 */
.category-detail-full-width, .tag-detail-full-width {
    max-width: none;
    margin: 40px 15px 50px;
    width: calc(100% - 30px);
}

.blog-list-full-width {
    display: grid !important;
    width: 100% !important;
    padding: 0;
    margin: 0;
}

.category-header, .tag-header {
    text-align: center;
    padding: 0 15px;
}

.category-title, .tag-title {
    font-size: 2rem;
    margin-bottom: 15px;
}

.category-description, .tag-description {
    font-size: 1rem;
    color: #666;
    margin-bottom: 0;
}

.category-navigation, .tag-navigation {
    text-align: center;
    padding: 0 15px;
}

.back-to-home, .to-category {
    display: inline-block;
    padding: 10px 20px;
    background-color: #0066cc;
    color: #fff;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.back-to-home:hover, .to-category:hover {
    background-color: #004499;
    text-decoration: none;
}

.no-posts {
    text-align: center;
    padding: 40px 15px;
    color: #666;
    font-size: 1.1rem;
}

/* 印刷スタイル */
@media print {
    .header, .footer, .blog-navigation, .blog-tags, .category-navigation, .tag-navigation {
        display: none;
    }
    
    .blog-detail, .category-detail, .tag-detail {
        box-shadow: none;
        padding: 0;
        margin: 0;
    }
    
    .blog-title, .category-title, .tag-title {
        font-size: 1.8rem;
    }
    
    .main {
        padding: 0;
    }
}