/* 個別記事ページ専用CSS */

/* 記事メインコンテンツ */
.article-main {
    padding: 40px 0 60px;
    background-color: #FAF7F2;
}

.article-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 記事コンテンツ */
.article-content {
    background-color: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* 記事ヘッダー */
.article-header {
    padding: 40px 40px 30px;
    background: linear-gradient(135deg, #F5F1EB 0%, #E8DDD4 100%);
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.article-category {
    background-color: #FF6B6B;
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.article-date {
    color: #8D6E63;
    font-size: 14px;
    font-weight: 500;
}

.article-title {
    font-size: 32px;
    font-weight: 700;
    color: #5D4037;
    line-height: 1.3;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.article-excerpt {
    font-size: 18px;
    color: #8D6E63;
    line-height: 1.6;
    margin: 0;
}

/* アイキャッチ画像 */
.article-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 記事本文 */
.article-body {
    padding: 40px;
    line-height: 1.8;
    color: #333;
}

.article-body h2 {
    font-size: 24px;
    font-weight: 600;
    color: #5D4037;
    margin: 40px 0 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #FF6B6B;
    position: relative;
}

.article-body h2::before {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: #FFB347;
}

.article-body h3 {
    font-size: 20px;
    font-weight: 600;
    color: #5D4037;
    margin: 30px 0 15px;
    padding-left: 15px;
    border-left: 4px solid #4ECDC4;
}

.article-body h4 {
    font-size: 18px;
    font-weight: 600;
    color: #5D4037;
    margin: 25px 0 10px;
}

.article-body p {
    margin-bottom: 20px;
    font-size: 16px;
}

.article-body ul,
.article-body ol {
    margin: 20px 0;
    padding-left: 25px;
}

.article-body li {
    margin-bottom: 8px;
    font-size: 16px;
}

/* 材料リスト */
.ingredients-list {
    background-color: #F9F7F4;
    border: 2px solid #E8DDD4;
    border-radius: 10px;
    padding: 20px 25px;
    margin: 20px 0;
}

.ingredients-list li {
    font-weight: 500;
    color: #5D4037;
    margin-bottom: 10px;
}

/* ポイントボックス */
.tip-box,
.success-box {
    margin: 30px 0;
    padding: 20px;
    border-radius: 10px;
    border-left: 5px solid;
}

.tip-box {
    background-color: #E3F2FD;
    border-left-color: #2196F3;
}

.tip-box h4 {
    color: #1976D2;
    margin: 0 0 10px;
    font-size: 16px;
}

.success-box {
    background-color: #E8F5E8;
    border-left-color: #4CAF50;
}

.success-box h4 {
    color: #388E3C;
    margin: 0 0 10px;
    font-size: 16px;
}

.tip-box p,
.success-box p {
    margin: 0;
    font-size: 15px;
}

/* CTAセクション */
.cta-section {
    background: linear-gradient(135deg, #FF6B6B 0%, #FFB347 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    margin: 40px 0;
}

.cta-section h3 {
    color: white;
    margin: 0 0 15px;
    border: none;
    padding: 0;
}

.cta-section p {
    margin: 0 0 20px;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    background-color: white;
    color: #FF6B6B;
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* 記事フッター */
.article-footer {
    padding: 30px 40px;
    background-color: #F9F7F4;
    border-top: 1px solid #E8DDD4;
}

/* タグ */
.article-tags {
    margin-bottom: 25px;
}

.tag {
    display: inline-block;
    background-color: #E8DDD4;
    color: #5D4037;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 13px;
    margin: 0 8px 8px 0;
    transition: background-color 0.3s ease;
}

.tag:hover {
    background-color: #FF6B6B;
    color: white;
}

/* シェアボタン */
.article-share h4 {
    color: #5D4037;
    font-size: 16px;
    margin: 0 0 15px;
}

.share-buttons {
    display: flex;
    gap: 10px;
}

.share-btn {
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: transform 0.3s ease;
}

.share-btn:hover {
    transform: translateY(-2px);
}

.share-btn.twitter {
    background-color: #1DA1F2;
    color: white;
}

.share-btn.facebook {
    background-color: #4267B2;
    color: white;
}

.share-btn.line {
    background-color: #00B900;
    color: white;
}

/* 関連記事 */
.related-articles {
    padding: 40px;
    border-top: 1px solid #E8DDD4;
}

.related-articles h3 {
    color: #5D4037;
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #FF6B6B;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.related-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.related-card:hover {
    transform: translateY(-3px);
}

.related-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.related-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.related-content {
    padding: 15px;
}

.related-category {
    background-color: #FF6B6B;
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}

.related-card h4 {
    color: #5D4037;
    font-size: 14px;
    font-weight: 600;
    margin: 10px 0 5px;
    line-height: 1.4;
}

.related-card time {
    color: #999;
    font-size: 12px;
}

/* サイドバー */
.article-sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* 目次 */
.table-of-contents ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.table-of-contents li {
    margin-bottom: 8px;
}

.table-of-contents a {
    color: #5D4037;
    text-decoration: none;
    font-size: 14px;
    padding: 5px 0;
    display: block;
    border-bottom: 1px solid #F0F0F0;
    transition: color 0.3s ease;
}

.table-of-contents a:hover {
    color: #FF6B6B;
}

/* レスポンシブ対応 */
@media (max-width: 1024px) {
    .article-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .article-sidebar {
        order: -1;
    }
}

@media (max-width: 768px) {
    .article-main {
        padding: 20px 0 40px;
    }
    
    .article-layout {
        padding: 0 15px;
    }
    
    .article-header {
        padding: 30px 25px 20px;
    }
    
    .article-title {
        font-size: 24px;
    }
    
    .article-excerpt {
        font-size: 16px;
    }
    
    .article-body {
        padding: 25px;
    }
    
    .article-body h2 {
        font-size: 20px;
    }
    
    .article-body h3 {
        font-size: 18px;
    }
    
    .article-footer {
        padding: 20px 25px;
    }
    
    .related-articles {
        padding: 25px;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .share-buttons {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .article-header {
        padding: 20px 15px;
    }
    
    .article-title {
        font-size: 20px;
    }
    
    .article-body {
        padding: 20px 15px;
    }
    
    .article-body h2 {
        font-size: 18px;
    }
    
    .article-body h3 {
        font-size: 16px;
    }
    
    .article-footer {
        padding: 15px;
    }
    
    .related-articles {
        padding: 20px 15px;
    }
    
    .cta-section {
        padding: 20px 15px;
    }
}

/* スクロール時の目次ハイライト */
.table-of-contents a.active {
    color: #FF6B6B;
    font-weight: 600;
}

/* 画像の遅延読み込み効果 */
.article-image img,
.related-card img {
    transition: opacity 0.3s ease;
}

.article-image img[loading="lazy"],
.related-card img[loading="lazy"] {
    opacity: 0;
}

.article-image img[loading="lazy"].loaded,
.related-card img[loading="lazy"].loaded {
    opacity: 1;
}


/* 記事内吹き出し風要素のスタイル */
.article-speech-bubble {
    display: flex;
    align-items: flex-start;
    margin: 25px 0;
    padding: 0 10px;
    animation: fadeInLeft 0.6s ease forwards;
}

.article-speech-bubble .bubble-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    margin-right: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 2px solid white;
}

.article-speech-bubble .bubble-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-speech-bubble .bubble-content {
    position: relative;
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 15px 18px;
    max-width: 500px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
    flex: 1;
}

.article-speech-bubble .bubble-content::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 15px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 8px 8px 0;
    border-color: transparent #e9ecef transparent transparent;
}

.article-speech-bubble .bubble-content::after {
    content: '';
    position: absolute;
    left: -6px;
    top: 15px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 8px 8px 0;
    border-color: transparent #f8f9fa transparent transparent;
}

.article-speech-bubble .bubble-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #495057;
    font-weight: 500;
}

/* アニメーション */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ホバーエフェクト */
.article-speech-bubble:hover .bubble-content {
    transform: translateY(-2px);
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
}

.article-speech-bubble:hover .bubble-avatar {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .article-speech-bubble {
        margin: 20px 0;
        padding: 0 5px;
    }
    
    .article-speech-bubble .bubble-avatar {
        width: 45px;
        height: 45px;
        margin-right: 12px;
    }
    
    .article-speech-bubble .bubble-content {
        padding: 12px 15px;
        max-width: 100%;
    }
    
    .article-speech-bubble .bubble-content p {
        font-size: 13px;
    }
    
    .article-speech-bubble .bubble-content::before {
        left: -7px;
        top: 12px;
        border-width: 7px 7px 7px 0;
    }
    
    .article-speech-bubble .bubble-content::after {
        left: -5px;
        top: 12px;
        border-width: 7px 7px 7px 0;
    }
}

@media (max-width: 480px) {
    .article-speech-bubble {
        margin: 15px 0;
    }
    
    .article-speech-bubble .bubble-avatar {
        width: 40px;
        height: 40px;
        margin-right: 10px;
    }
    
    .article-speech-bubble .bubble-content {
        padding: 10px 12px;
    }
    
    .article-speech-bubble .bubble-content p {
        font-size: 12px;
    }
}

/* 複数の吹き出しがある場合の間隔調整 */
.article-speech-bubble + .article-speech-bubble {
    margin-top: 15px;
}

/* 吹き出しの後に続くコンテンツとの間隔 */
.article-speech-bubble + h2,
.article-speech-bubble + h3,
.article-speech-bubble + .tip-box,
.article-speech-bubble + .success-box {
    margin-top: 30px;
}

