/*
Theme Name: NorthBrave Original
Author: NorthBrave
Version: 1.0
*/

/* ====================================================================================
 1. WEBフォント設定
==================================================================================== */
@font-face {
  font-family: 'tiktok_x_icon';
  src: url('fonts/tiktok_x_icon.eot?v=1.1');
  src: url('fonts/tiktok_x_icon.eot?v=1.1#iefix') format('embedded-opentype'),
       url('fonts/tiktok_x_icon.woff?v=1.1') format('woff'),
       url('fonts/tiktok_x_icon.ttf?v=1.1') format('truetype'),
       url('fonts/tiktok_x_icon.svg?v=1.1#tiktok_x_icon') format('svg');
  font-weight: normal;
  font-style: normal;
}

/* ====================================================================================
 2. 全体・共通基本スタイル
==================================================================================== */
body {
    font-family: "Noto Serif JP", serif; /* サイト全体の基本フォント（明朝体） */
    background-image: url('images/AdobeStock_317053353.jpeg') !important; /* 全画面共通の背景画像 */
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* 背景画像を画面に固定（スクロール追従制御） */
    color: #333;
    line-height: 1.8;
    margin: 0;
    padding: 20px;
}

h1 {
    font-size: 1.9rem;
    font-weight: bold;
    letter-spacing: 0.5em;
    color: #af9d64;
    text-align: center;
    margin-bottom: 40px;
    text-indent: 0.5em;
}

h2 {
    font-size: 1.3rem;
    letter-spacing: 0.2em;
    text-indent: 0.2em;
}

/* タイムライン・一覧用：故人セクション間の二重区切り線 */
.fuhou-border {
    border-top: 1px double #999;
    opacity: 1;
    margin: 20px 0;
}

/* ====================================================================================
 3. 共通レイアウト・コンテナ設定
==================================================================================== */
/* 訃報詳細ページ：案内状メインカードコンテナ */
.container {
    position: relative; 
    max-width: 600px;
    margin: 40px auto;
    padding: 40px 20px;
    background: #ffffff;
    border-top: 5px solid #af9d64; /* 上部アクセントカラー */
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); 
    z-index: 1; 
    overflow: hidden; 
}

/* 詳細ページ：背景の蓮画像（擬似要素装飾） */
.container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/28823848_m.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.45;
    z-index: -1; 
    pointer-events: none; /* テキスト選択やクリック操作への干渉を防止 */
}

/* 訃報一覧ページ：メイン外枠ラッパー */
.fuhou-archive-container {
    max-width: 600px;
    margin: 40px auto;
    padding: 0 20px;
}

/* ====================================================================================
 4. 訃報 案内文エリア（.notice-content）
==================================================================================== */
.notice-content {
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
    letter-spacing: 0.1em;
    text-indent: 0.1em; 
    line-height: 1.6;
}

/* 故人氏名の強調表示スタイル */
.deceased-name {
    font-size: 1.8rem;
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 15px;
    color: #000;
}

/* 故人氏名のふりがなスタイル */
.deceased-furigana {
    font-size: 0.95rem;          
    color: #888888;              
    text-align: center;          
    margin-bottom: -5px;         
    letter-spacing: 0.15em;      
}

/* 享年・行年表示スタイル */
.aged {
    font-size: 1.3rem;
}

/* 案内文エリア内における各段落（pタグ）の共通マージン制御 */
.aged, 
.notice-content p {
    margin-top: 0;
    margin-bottom: 8px;
}

/* 喪主情報のレイアウト構造（詳細ページ用） */
.moshu-block {
    margin: 5px 0 12px 0; 
    padding: 0;
    text-align: center;
}

.moshu-item {
    margin: 0;
    font-size: 1.2rem; 
}

.moshu-label {
    color: #555;
}

.moshu-value {
    font-weight: bold;
    color: #222;
}

.moshu-relationship {
    font-size: 1rem; 
    color: #666;       
}

/* ====================================================================================
 5. 日程表エリア（.details / .detail-item）
==================================================================================== */
.details {
    background: #f9f9f9;
    padding: 1px 20px 10px 20px;
    border-radius: 5px;
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
    position: relative;
    overflow: hidden;
}

/* 日程表カード：背景のボタニカル画像（擬似要素装飾） */
.details::before {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 150%;  
    height: 150%; 
    background-image: url('images/22481066.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: bottom right;
    opacity: 0.3;
    z-index: -0.5;
    pointer-events: none; /* 下位要素へのマウス操作・クリックを透過 */
}

/* 日程表内：各イベント（通夜・葬儀等）の行スタイル */
.detail-item {
    display: flex;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding: 15px 10px;
}

/* 🌟【改善】プラグインとのクラス名競合を防ぐため、訃報システム内のみにスコープを限定 */
.container .label,
.archive-fuhou-card .label {
    width: 90px;
    font-weight: bold;
    letter-spacing: 0.1em;
    text-indent: 0.1em; 
    flex-shrink: 0; /* レスポンシブ時に見出し幅が潰れるのを防止 */
}

/* 🌟【改善】適用範囲を訃報エリア内部に限定 */
.container .value,
.archive-fuhou-card .value {
    flex: 1;
}

/* 日時・時間データ出力エリア（数字の等幅アライメントおよびカーニング制御） */
.container .detail-item .value,
.archive-fuhou-card .detail-item .value {
    font-weight: 600;
    font-variant-numeric: tabular-nums; /* 数字の横幅を等幅に統一して視認性を向上 */
    font-feature-settings: "palt" 0;    /* 数字部分の自動プロポーショナル詰めを無効化 */
    letter-spacing: 0.05em;
}

/* 外部連携テキストリンクスタイル */
.map-link {
    color: #0066cc;
    text-decoration: none;
    font-size: 0.9em;
}

.tel-link {
    color: #333;
    text-decoration: none;
    font-weight: bold;
}

.tel-link:hover,
.map-link:hover {
    text-decoration: underline;
}

/* ====================================================================================
 6. アクションボタン（LINE / メール / 一覧 / 印刷）
==================================================================================== */
.actions {
    margin-top: 30px;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 各種ボタングループの共通デザイン基盤 */
.btn-line, .btn-email, .btn-archive {
    display: block;
    text-align: center;
    text-decoration: none;
    padding: 15px;
    margin-bottom: 10px;
    font-weight: bold;
    transition: transform 0.2s, background-color 0.2s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border-radius: 30px; 
}

.btn-line {
    background-color: #06C755;
    color: white;
}

.btn-email {
    background-color: #0078d4;
    color: white;
}

.btn-archive {
    background-color: #444444; 
    color: #ffffff;
}

.btn-line:hover, .btn-email:hover, .btn-archive:hover {
    transform: translateY(-2px);
}

.btn-archive:hover {
    background-color: #af9d64; /* ホバー時にブランドカラーへ遷移 */
    color: #ffffff;
}

/* ボタングループ内のセクション区切り線 */
.btn-divider {
    border: none;                  
    height: 1px;                   
    background-color: rgba(175, 157, 100, 0.6); 
    margin: 15px 0;                
    width: 100%;                   
}

/* ブラウザ印刷・PDF生成トリガーボタン */
.btn-print {
    display: block;
    width: 100%;
    text-align: center;
    border: none;
    padding: 15px;
    margin-bottom: 10px;
    font-weight: bold;
    font-family: "Noto Serif JP", serif;
    background-color: #fbd782; 
    color: #444444;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border-radius: 30px;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
}

.btn-print:hover {
    transform: translateY(-2px);
    background-color: #ffcd57; 
}

/* ====================================================================================
 7. 担当葬儀会社情報ブロック（.company-info）
==================================================================================== */
.company-info {
    margin-top: 40px;
    padding: 20px 0;
    text-align: center;
    font-family: "Noto Serif JP", serif;
}

.company-divider {
    border: 0;
    border-top: 1px dashed #ccc;
    margin-bottom: 25px;
}

.company-label {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 5px;
}

.company-name {
    font-size: 1.15rem;
    font-weight: bold;
    color: #222;
    margin-bottom: 10px;
    letter-spacing: 0.05em;
}

.company-details {
    font-size: 0.9rem;
    color: #444;
    line-height: 1.6;
}

.company-tel {
    color: #af9d64; 
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
}

/* ====================================================================================
 8. 訃報一覧ページ（独立カード型案内状）専用スタイル
==================================================================================== */
/* アーカイブページメイン見出しのレイアウト */
.archive-page-header {
    text-align: center;
}

/* アーカイブページ大見出し：視認性確保のための背景色と文字装飾の定義 */
.archive-page-header h1 {
    font-size: 2.0rem;
    font-weight: bold;
    letter-spacing: 0.5em;
    color: #af9d64; 
    text-indent: 0.5em;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
    display: inline-block; 
    background: rgba(255, 255, 255, 0.75); 
    padding: 10px 30px; 
    border-radius: 4px; 
    border: 1px solid rgba(175, 157, 100, 0.3); 
    margin: 0 auto 20px auto;
}

.fuhou-sub-title {
    font-size: 1rem;
    font-weight: 700;
    color: #666;
    text-align: center;
    margin-bottom: 40px;
}

/* 一覧ページ：各故人データを個別に内包する案内状カード */
.archive-fuhou-card {
    position: relative;
    background: #ffffff;
    border-top: 5px solid #af9d64; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); 
    padding: 40px 20px;
    margin-bottom: 40px; 
    overflow: hidden;
    z-index: 1;
}

.archive-fuhou-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/28823848_m.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.45;
    z-index: -1;
}

/* 一覧ページ最下部：フッター会社情報専用カード */
.company-info-card {
    position: relative;
    background: #ffffff;
    border-top: 5px solid #af9d64;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    padding: 30px 20px;
    overflow: hidden;
    z-index: 1;
    margin-top: 50px;
}

.company-info-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/28823848_m.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.2; 
    z-index: -1;
}

/* 日程未定（調整中）時のインフォメーションボックス */
.tbd-message {
    font-size: 0.95rem;
    color: #af9d64; 
    text-align: center;
    line-height: 1.6;
    padding: 15px 10px;
    background-color: rgba(175, 157, 100, 0.05); 
    border: 1px dashed rgba(175, 157, 100, 0.3);
    border-radius: 4px;
    margin: 10px 0;
}

/* 該当データ未存在時のシステムメッセージ */
.no-fuhou {
    text-align: center;
    color: #888888;
    font-size: 1.1rem;
    padding: 50px 0;
    width: 100%;
}

/* ====================================================================================
 9. レスポンシブ設定（モバイル表示最適化：ブレイクポイント560px以下）
==================================================================================== */
@media screen and (max-width: 560px) {
    /* 表形式の横並びレイアウトを縦積みブロックへと再構成 */
    .detail-item {
        flex-direction: column; 
        padding: 12px 0;
        display: block !important; 
    }

    /* 🌟【改善】レスポンシブ時の競合汚染を完全にブロック */
    .container .label,
    .archive-fuhou-card .label {
        width: 100% !important;   
        margin-bottom: 5px;    
        font-size: 0.8rem;     
        color: #af9d64;        
        display: block !important;
    }

    /* 🌟【改善】レスポンシブ時の競合汚染を完全にブロック */
    .container .value,
    .archive-fuhou-card .value {
        width: 100%;
        font-size: 1.00rem;    
        padding-left: 0;       
        line-height: 1.4;
    }
}

/* ====================================================================================
 10. 印刷用スタイル（メディアクエリ：print制御時に自動適用）
==================================================================================== */
@media print {
    /* 印刷視認性確保のための背景リセット、テキスト・モノクロ最適化 */
    body {
        background-image: none !important; 
        background-color: #ffffff !important;
        color: #000000 !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* 紙幅に合わせたフルワイド展開および不要なシャドウ・ボーダーの無効化 */
    .container {
        max-width: 100% !important;
        box-shadow: none !important;
        border-top: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* トナー節約およびテキスト視認性向上のため、擬似背景画像を完全に除外 */
    .container::before,
    .details::before {
        display: none !important;
    }

    /* 印刷時に出力不要となる各種画面専用ナビゲーション・コンポーネントの非表示化 */
    header,
    footer,
    .actions,        
    .map-link,       
    .btn-divider,    
    .company-divider {
        display: none !important;
    }

    /* 故人氏名の印刷用サイズ最適化 */
    .deceased-name {
        color: #000000 !important;
        font-size: 2.2rem !important;
        margin-bottom: 20px !important;
    }

    /* 日程表ブロックの印刷用レイアウト（境界線・余白の再定義） */
    .details {
        background-color: #ffffff !important;
        border: 1px solid #000000 !important;
        padding: 15px 20px !important;
        margin-bottom: 20px !important;
        page-break-inside: avoid; /* セクションの途中における不自然な改ページを抑制 */
    }

    .detail-item {
        border-bottom: 1px solid #cccccc !important;
        padding: 10px 0 !important;
    }

    /* 電話番号リンクの白黒印刷用カラーリセット */
    .tel-link {
        color: #000000 !important;
        text-decoration: none !important;
    }

    /* 主要コンテンツブロックのページ跨ぎによる分断を防止 */
    .notice-content,
    .moshu-block,
    .company-info {
        page-break-inside: avoid;
    }
}