/**
 * ニュース記事専用スタイルシート
 * 
 * このCSSファイルは news/papers/index.php 専用です
 * #news_article セクション内でのみ適用されます
 * 背景色: 白、文字色: 黒
 */

/* ===================================
   記事コンテナ全体のスタイル
   =================================== */
#news_article {
    background-color: #ffffff;
    color: #333333;
    font-family: "游ゴシック", YuGothic, "ヒラギノ角ゴ Pro", "Hiragino Kaku Gothic Pro", "メイリオ", Meiryo, "ＭＳ Ｐゴシック", sans-serif;
    line-height: 1.8;
    font-size: 16px;
}

#news_article .article-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 5px;
}

/* ===================================
   見出しスタイル (H1〜H6)
   =================================== */
#news_article h1 {
    font-size: 32px;
    line-height: 1.4;
    font-weight: 700;
    margin: 40px 0 20px;
    padding-bottom: 15px;
    border-bottom: 3px solid #e60012;
    color: #1a1a1a;
    text-align: left !important;
}

#news_article h2 {
    font-size: 28px;
    line-height: 1.5;
    font-weight: 700;
    margin: 35px 0 18px;
    padding: 10px 0 10px 15px;
    border-left: 5px solid #e60012;
    background: linear-gradient(to right, #f8f8f8 0%, transparent 100%);
    color: #1a1a1a;
    text-align: left !important;
}

#news_article h3 {
    font-size: 24px;
    line-height: 1.5;
    font-weight: 600;
    margin: 30px 0 15px;
    padding-left: 20px;
    position: relative;
    color: #2a2a2a;
    text-align: left !important;
}

#news_article h3::before {
    content: "▶";
    position: absolute;
    left: 0;
    color: #e60012;
}

#news_article h4 {
    font-size: 20px;
    line-height: 1.5;
    font-weight: 600;
    margin: 25px 0 12px;
    color: #333333;
    text-align: left !important;
}

#news_article h5 {
    font-size: 18px;
    line-height: 1.5;
    font-weight: 600;
    margin: 20px 0 10px;
    color: #333333;
    text-align: left !important;
}

#news_article h6 {
    font-size: 16px;
    line-height: 1.5;
    font-weight: 600;
    margin: 18px 0 10px;
    color: #444444;
    text-align: left !important;
}

/* ===================================
   段落スタイル
   =================================== */
#news_article p {
    font-size: 16px;
    line-height: 1.9;
    margin: 0 0 20px;
    color: #333333;
    text-align: justify;
}

#news_article p:last-child {
    margin-bottom: 0;
}

/* ===================================
   リストスタイル
   =================================== */
#news_article ul {
    margin: 20px 0;
    padding-left: 30px;
    list-style-type: none;
}

#news_article ul li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
    line-height: 1.8;
    color: #333333;
}

#news_article ul li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #e60012;
    font-weight: bold;
    font-size: 18px;
}

#news_article ol {
    margin: 20px 0;
    padding-left: 35px;
    counter-reset: item;
    list-style-type: none;
}

#news_article ol li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 10px;
    line-height: 1.8;
    color: #333333;
    counter-increment: item;
}

#news_article ol li::before {
    content: counter(item) ".";
    position: absolute;
    left: 0;
    color: #e60012;
    font-weight: bold;
}

/* ===================================
   テーブルスタイル
   =================================== */
#news_article table {
    width: 100%;
    margin: 30px 0;
    border-collapse: collapse;
    background-color: #ffffff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

#news_article table th {
    background-color: #f5f5f5;
    color: #333333;
    font-weight: 600;
    padding: 15px;
    text-align: left;
    border: 1px solid #ddd;
    font-size: 15px;
    white-space: nowrap;
    width: 150px;
}

#news_article table td {
    padding: 15px;
    border: 1px solid #ddd;
    color: #333333;
    line-height: 1.7;
    font-size: 15px;
}

#news_article table tr:hover {
    background-color: #fafafa;
}

/* ===================================
   強調・装飾要素
   =================================== */
#news_article strong {
    font-weight: 700;
    color: #1a1a1a;
}

#news_article em {
    font-style: italic;
    color: #555555;
}

#news_article blockquote {
    margin: 25px 0;
    padding: 20px 20px 20px 40px;
    background-color: #f9f9f9;
    border-left: 5px solid #e60012;
    position: relative;
    font-style: italic;
    color: #555555;
}

#news_article blockquote::before {
    content: """;
    position: absolute;
    left: 10px;
    top: 10px;
    font-size: 40px;
    color: #e60012;
    opacity: 0.3;
}

/* ===================================
   リンクスタイル
   =================================== */
#news_article a {
    color: #0066cc;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

#news_article a:hover {
    color: #e60012;
    border-bottom-color: #e60012;
}

#news_article a:visited {
    color: #663399;
}

/* ===================================
   画像スタイル
   =================================== */
#news_article img {
    max-width: 100%;
    height: auto;
    margin: 25px 0;
    display: block;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    border-radius: 4px;
}

/* ニュース記事コンテンツ内の画像サイズ指定クラス */
#news_article .news-content-image {
    height: auto;
    margin: 25px auto;
    display: block;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    border-radius: 4px;
}

/* {image} - そのままのサイズ（元画像サイズ） */
#news_article .news-content-image-original {
    max-width: none;
    width: auto;
}

/* {image max} - 100%幅 */
#news_article .news-content-image-max {
    max-width: 100%;
    width: 100%;
}

/* {image small} - 30%幅 */
#news_article .news-content-image-small {
    max-width: 30%;
    width: 30%;
}

/* {image harf} - 50%幅 */
#news_article .news-content-image-harf {
    max-width: 50%;
    width: 50%;
}

#news_article figure {
    margin: 30px 0;
    text-align: center;
}

#news_article figcaption {
    margin-top: 10px;
    font-size: 14px;
    color: #666666;
    font-style: italic;
}

/* ===================================
   ボタンスタイル
   =================================== */
#news_article .btn,
#news_article button {
    display: inline-block;
    padding: 12px 30px;
    background-color: #e60012;
    color: #ffffff;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 10px 5px;
}

#news_article .btn:hover,
#news_article button:hover {
    background-color: #cc0010;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(230, 0, 18, 0.3);
}

/* ===================================
   区切り線
   =================================== */
#news_article hr {
    margin: 40px 0;
    border: none;
    border-top: 2px solid #eeeeee;
    position: relative;
}

#news_article hr::after {
    content: "◆";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #ffffff;
    color: #e60012;
    padding: 0 10px;
    font-size: 20px;
}

/* ===================================
   コードブロック
   =================================== */
#news_article pre {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin: 20px 0;
    overflow-x: auto;
}

#news_article code {
    background-color: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: "Courier New", Courier, monospace;
    font-size: 14px;
    color: #d14;
}

#news_article pre code {
    background-color: transparent;
    padding: 0;
    color: #333333;
}

/* ===================================
   特殊クラス
   =================================== */
#news_article .highlight {
    background-color: #fff3cd;
    padding: 2px 4px;
    border-radius: 3px;
}

#news_article .text-center {
    text-align: center;
}

/* 見出しは常に左揃え */
#news_article h1.text-center,
#news_article h2.text-center,
#news_article h3.text-center,
#news_article h4.text-center,
#news_article h5.text-center,
#news_article h6.text-center {
    text-align: left !important;
}

#news_article .text-right {
    text-align: right;
}

#news_article .text-muted {
    color: #6c757d;
}

#news_article .small {
    font-size: 14px;
}

#news_article img.small,
#news_article figure img.small {
    max-width: 300px !important;
    width: auto !important;
    height: auto !important;
    margin: 20px auto !important;
    display: block !important;
}

#news_article figure.small,
#news_article figure:has(img.small) {
    max-width: 300px;
    margin: 20px auto;
}

#news_article .large {
    font-size: 18px;
}

/* ===================================
   注記・警告ボックス
   =================================== */
#news_article .note {
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 0 4px 4px 0;
}

#news_article .warning {
    background-color: #fff3e0;
    border-left: 4px solid #ff9800;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 0 4px 4px 0;
}

#news_article .error {
    background-color: #ffebee;
    border-left: 4px solid #f44336;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 0 4px 4px 0;
}

#news_article .success {
    background-color: #e8f5e9;
    border-left: 4px solid #4caf50;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 0 4px 4px 0;
}

/* ===================================
   レスポンシブ対応
   =================================== */

/* タブレット対応 */
@media (max-width: 1024px) {
    #news_article .article-content {
        max-width: 100%;
        padding: 15px 5px;
    }
}

/* モバイル対応 (横幅を広く使う) */
@media (max-width: 768px) {
    #news_article {
        font-size: 15px;
        line-height: 1.7;
    }
    
    #news_article .article-content {
        padding: 10px 0;
        max-width: 100%;
    }
    
    /* 見出しのモバイル調整 */
    #news_article h1 {
        font-size: 24px;
        line-height: 1.3;
        margin: 30px 0 15px;
        padding-bottom: 10px;
    }
    
    #news_article h2 {
        font-size: 20px;
        line-height: 1.4;
        margin: 25px 0 12px;
        padding: 8px 0 8px 12px;
    }
    
    #news_article h3 {
        font-size: 18px;
        line-height: 1.4;
        margin: 20px 0 10px;
        padding-left: 18px;
    }
    
    #news_article h4 {
        font-size: 17px;
        margin: 18px 0 8px;
    }
    
    #news_article h5 {
        font-size: 16px;
        margin: 15px 0 8px;
    }
    
    #news_article h6 {
        font-size: 15px;
        margin: 12px 0 6px;
    }
    
    /* 段落の調整 */
    #news_article p {
        font-size: 15px;
        line-height: 1.8;
        margin: 0 0 18px;
    }
    
    /* テーブルのモバイル対応 */
    #news_article table {
        font-size: 13px;
        margin: 20px 0;
        width: 100%;
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    #news_article table th {
        padding: 12px 8px;
        font-size: 13px;
        min-width: 80px;
    }
    
    #news_article table td {
        padding: 12px 8px;
        font-size: 13px;
        white-space: normal;
        word-wrap: break-word;
        line-height: 1.6;
    }
    
    /* リストの調整 */
    #news_article ul {
        padding-left: 25px;
        margin: 15px 0;
    }
    
    #news_article ul li {
        padding-left: 15px;
        margin-bottom: 8px;
        font-size: 15px;
        line-height: 1.7;
    }
    
    #news_article ol {
        padding-left: 30px;
        margin: 15px 0;
    }
    
    #news_article ol li {
        padding-left: 20px;
        margin-bottom: 8px;
        font-size: 15px;
        line-height: 1.7;
    }
    
    /* 画像の調整 */
    #news_article img {
        margin: 20px 0;
        border-radius: 2px;
    }
    
    /* モバイルでのサイズ調整 */
    /* {image} - そのままサイズだがモバイルでは最大幅制限 */
    #news_article .news-content-image-original {
        max-width: 100%;
        width: auto;
    }
    
    /* {image max} - 100%幅 */
    #news_article .news-content-image-max {
        max-width: 100%;
        width: 100%;
    }
    
    /* {image small} - モバイルでは40%に */
    #news_article .news-content-image-small {
        max-width: 40%;
        width: 40%;
    }
    
    /* {image harf} - そのまま50% */
    #news_article .news-content-image-harf {
        max-width: 50%;
        width: 50%;
    }
    
    #news_article figure {
        margin: 20px 0;
    }
    
    #news_article figcaption {
        font-size: 13px;
        padding: 0 5px;
        margin-top: 8px;
    }
    
    /* ボタンの調整 */
    #news_article .btn,
    #news_article button {
        padding: 10px 20px;
        font-size: 15px;
        margin: 8px 3px;
        display: inline-block;
        width: auto;
    }
    
    /* 注記ボックスの調整 */
    #news_article .note,
    #news_article .warning,
    #news_article .error,
    #news_article .success {
        padding: 12px 15px;
        margin: 15px 0;
        font-size: 14px;
        line-height: 1.6;
    }
    
    /* ブロッククォートの調整 */
    #news_article blockquote {
        padding: 15px 15px 15px 30px;
        margin: 20px 0;
        font-size: 14px;
        line-height: 1.7;
    }
    
    #news_article blockquote::before {
        font-size: 30px;
        left: 8px;
        top: 8px;
    }
    
    /* 区切り線の調整 */
    #news_article hr {
        margin: 30px 0;
    }
    
    /* コードブロックの調整 */
    #news_article pre {
        padding: 12px;
        font-size: 13px;
        overflow-x: auto;
    }
    
    #news_article code {
        font-size: 13px;
        padding: 1px 4px;
    }
}

/* 小さなモバイル画面用 */
@media (max-width: 480px) {
    #news_article .article-content {
        padding: 10px 0;
    }
    
    #news_article h1 {
        font-size: 22px;
        margin: 25px 0 12px;
    }
    
    #news_article h2 {
        font-size: 19px;
        margin: 20px 0 10px;
    }
    
    #news_article h3 {
        font-size: 17px;
        margin: 18px 0 8px;
    }
    
    #news_article p {
        font-size: 14px;
        margin: 0 0 15px;
    }
    
    /* テーブルをさらに小さく */
    #news_article table th,
    #news_article table td {
        padding: 10px 6px;
        font-size: 12px;
    }
    
    /* ボタンをフルワイズに */
    #news_article .btn,
    #news_article button {
        width: 100%;
        margin: 8px 0;
        padding: 12px 15px;
    }
    
    /* 2つのボタンが並ぶ場合の調整 */
    #news_article .text-center .btn {
        width: calc(50% - 5px);
        margin: 5px 2.5px;
        font-size: 14px;
    }
}

/* ===================================
   印刷用スタイル
   =================================== */
@media print {
    #news_article {
        background-color: white;
        color: black;
    }
    
    #news_article a {
        color: black;
        text-decoration: underline;
    }
    
    #news_article .btn,
    #news_article button {
        display: none;
    }
}