/* ====================================
   notification.css (Luxury & Clean 完全版)
   (PC: タイトル中央・リンク right端 / SP: 中央並び替え)
   (整合性：新着情報ページの ID: news-meta に対応)
==================================== */

/* --- アンカージャンプ位置の強力な補正 --- */
/* TOPページから詳細（新着情報ページ）へ飛ぶ際のズレを防止します */
.news-meta[id],
[id^="news-"] {
    /* main-content-news.css と数値を 180px で統一します */
    scroll-margin-top: 180px !important;
}

/* iOS / Legacy Browser 対策 */
.news-meta[id]::before,
[id^="news-"]::before {
    content: "";
    display: block;
    height: 180px;      /* ヘッダーの高さ */
    margin-top: -180px; /* 余白を相殺 */
    visibility: hidden;
    pointer-events: none;
}

/* --- 全体共通：外枠のレイアウト --- */
.notification-box {
    width: 95%;
    max-width: 1000px;
    margin: 80px auto; 
    border: 1px solid #e5dcd2;
    padding: 50px 40px;
    background-color: #fff;
    box-sizing: border-box;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

/* ヘッダー部分 */
.notification-header {
    background-color: #f8f4f0;
    padding: 18px 25px;
    border-bottom: 2px solid #8b6d4d;
    margin-bottom: 35px;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    position: relative;
}

.header-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #444;
    letter-spacing: 0.1em;
    font-family: "Hiragino Mincho ProN", serif;
}

.past-articles-link {
    font-size: 13px;
    font-weight: bold;
    color: #8b6d4d;
    text-decoration: none;
    position: relative;
    padding-right: 15px;
    transition: all 0.3s ease;
}

.past-articles-link::after {
    content: '>';
    position: absolute;
    right: 0;
    transition: transform 0.3s ease;
}

.past-articles-link:hover {
    color: #bfa482;
}

.past-articles-link:hover::after {
    transform: translateX(4px);
}

/* --- お知らせリスト部分 (下部メイン) --- */
.notification-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.notification-list li {
    border-bottom: 1px solid #f2f2f2;
}

.notification-list li:last-child {
    border-bottom: none;
}

.notification-list li a {
    display: flex;
    align-items: center;
    padding: 35px 15px; 
    text-decoration: none;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
    gap: 20px;
}

.notification-list li a:hover {
    background-color: #fafafa;
    padding-left: 25px;
}

.date {
    font-weight: bold;
    color: #999;
    flex-shrink: 0; 
    width: 150px;
    font-family: "Century Gothic", Arial, sans-serif;
    font-size: 0.95em;
    display: flex;
    align-items: center;
}

.article-title {
    color: #333;
    flex-grow: 1;
    font-weight: 500;
    line-height: 1.7;
    transition: color 0.3s ease;
    text-align: left;
}

.notification-list li a:hover .article-title {
    color: #8b6d4d;
}

/* 1番目の記事にNEWバッジ */
.notification-list li:first-child .date::after {
    content: "NEW";
    font-size: 10px;
    background: #d1b894;
    color: #fff;
    padding: 2px 6px;
    margin-left: 10px;
    border-radius: 2px;
}

/* ====================================
   最新記事専用（空室検索前：JSコピー用）
==================================== */
.latest-notification {
    width: 95%;
    max-width: 1000px;
    margin: 30px auto;
    padding: 15px 30px; 
    background-color: #fdfaf7; 
    border-left: 6px solid #8b6d4d;
    box-sizing: border-box;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.latest-notification ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.latest-notification li {
    display: flex !important;
    align-items: center !important;
    padding: 0 !important; 
    border: none !important;
}

.latest-notification li a {
    display: flex !important;
    padding: 10px 0 !important; 
    align-items: center !important;
    gap: 20px !important; 
    background: transparent !important;
    width: 100% !important;
}

.latest-notification .date {
    width: 130px !important;
    color: #8b6d4d !important;
}

/* 【修正箇所】SP表示等でタイトルが長い場合の突き抜け対策 */
.latest-notification .article-title {
    font-weight: 700 !important;
    color: #333 !important;
    white-space: normal !important; /* nowrapを解除して改行を許可 */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box !important;
    -webkit-line-clamp: 2; /* 最大2行まで表示し、以降を「...」にする */
    -webkit-box-orient: vertical;
    line-height: 1.5;
}

/* ====================================
   レスポンシブ (PC/SP切り替え)
==================================== */

/* PC：タイトル中央固定 */
@media screen and (min-width: 769px) {
    .header-title {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }
    .past-articles-link {
        margin-left: auto;
    }
}

/* スマホ：共通レスポンシブ */
@media screen and (max-width: 768px) {
    .notification-box {
        padding: 30px 15px;
        margin: 50px auto;
    }
    
    .notification-header {
        flex-direction: column;
        padding: 20px 10px;
    }

    .notification-list li a {
        flex-direction: column;
        align-items: flex-start;
        padding: 25px 10px;
        gap: 8px;
    }

    .date {
        width: auto;
    }

    .latest-notification li a {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 5px !important;
    }

    /* SP用アンカー補正 (130pxに統一) */
    .news-meta[id],
    [id^="news-"] {
        scroll-margin-top: 130px !important;
    }
    .news-meta[id]::before,
    [id^="news-"]::before {
        height: 130px;
        margin-top: -130px;
    }
}