@charset "UTF-8";

/* ==========================================================================
   1. 全体共通設定（全画面幅でベースとなるスタイル）
   ========================================================================== */
html {
    scroll-behavior: smooth;
}

body {
    font-family: "Zen Kaku Gothic New", "Kiwi Maru", sans-serif;
    font-weight: 400;
    background-color: #f0f0f0; 
    margin: 0;
    padding: 0;
}

/* 画像の基本保護設定 */
img {
    pointer-events: none;
    -webkit-user-drag: none;
    user-select: none;
}

/* リンク内画像はクリック可能にする */
a img {
    pointer-events: auto;
}

/* 固定配置：ページトップ等のスクロールナビ */
.scroll-nav {
    position: fixed;
    z-index: 99;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.scroll-nav.is-show {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transform: translateY(0);
}

.scroll-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #12334c; 
    color: #ffffff;
    text-decoration: none !important;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: background-color 0.2s, transform 0.2s;
}

.scroll-btn:hover {
    background-color: #2ab9e9; 
    transform: scale(1.1);
}

/* 前後記事ナビゲーション（ベース設定） */
.post-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 550px;
    margin: 40px auto 0 auto;
    font-family: "Kiwi Maru", serif;
    font-weight: 500;
}

#js-prev-container,
#js-next-container {
    flex: 1;
    display: flex;
    min-width: 0;
}

#js-prev-container {
    justify-content: flex-start;
}

#js-next-container {
    justify-content: flex-end;
}

.post-pagination .back-to-list {
    flex-shrink: 0;
    font-size: 0.85rem;
    color: #777777;
    border-bottom: 1px solid #e0e0e0;
    padding: 0 10px 2px 10px;
    text-align: center;
    text-decoration: none !important;
}

.post-pagination .back-to-list:hover {
    color: #2ab9e9;
    border-color: #2ab9e9;
}

.post-pagination a.prev-post,
.post-pagination a.next-post {
    color: #12334c;
    text-decoration: none !important;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.post-pagination a:hover {
    color: #2ab9e9;
}

.post-pagination .arrow {
    font-size: 1rem;
}

/* タイル状ブログパーツ：カテゴリボタン群 */
.category-filter {
    max-width: 550px;
    margin-bottom: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.filter-btn {
    background-color: #ffffff;
    border: 1px solid #12334c;
    color: #12334c;
    font-family: "Kiwi Maru", serif;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 6px 16px;
    border-radius: 20px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: #12334c;
    border-color: #12334c;
    color: #ffffff;
}

/* タイル状ブログパーツ：グリッド・カード構成 */
.blog-parts-grid {
    display: grid;
    gap: 16px;
    max-width: 550px;
    margin-top: 0;
    margin-bottom: 40px;
    box-sizing: border-box;
}

.blog-card {
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    text-decoration: none !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, opacity 0.3s ease;
    opacity: 1;
}

.blog-card.is-hide {
    display: none;
    opacity: 0;
}

.blog-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(18, 51, 76, 0.12);
    border-color: #2ab9e9;
}

.card-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background-color: #f0f0f0;
}

.card-thumbnail img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    margin: 0 !important;
    transition: transform 0.3s ease;
}

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

.card-cat {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #12334c;
    color: #ffffff;
    font-family: "Kiwi Maru", serif;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 10px;
    letter-spacing: 0.03em;
}

.card-body {
    display: flex;
    flex-direction: column;
    padding: 12px;
}

.card-date {
    font-family: "Kiwi Maru", sans-serif;
    font-size: 0.75rem;
    color: #777777;
    margin-bottom: 4px;
}

.card-title {
    font-family: "Kiwi Maru", serif !important;
    font-size: 0.95rem !important;
    color: #12334c !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}

.blog-card:hover .card-title {
    color: #2ab9e9 !important;
}

/* 画像ギャラリー表示設定 */
.gallery-container {
    display: flex;
    gap: 12px;
    max-width: 550px;
    margin: 24px auto;
    box-sizing: border-box;
}

.gallery-item {
    flex: 1;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 4px;
    background-color: #f0f0f0;
    cursor: pointer;
}

.gallery-item img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    margin: 0 !important;
    transition: transform 0.2s ease, opacity 0.2s ease;
    pointer-events: auto !important; 
}

.gallery-item:hover img {
    transform: scale(1.05);
    opacity: 0.85;
}

/* 画像拡大モーダル設定 */
.image-overlay {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.image-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.image-overlay img {
    max-width: 90%;
    max-height: 85%;
    object-fit: contain;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    pointer-events: none; 
}

.overlay-close {
    position: absolute;
    top: 20px;
    right: 25px;
    color: #ffffff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
}

/* 埋め込み用iframeの画面はみ出し防止 */
article iframe,
.news-contents iframe {
    max-width: 100% !important;
    box-sizing: border-box;
}


/* ==========================================================================
   2. PC用設定（画面幅768px以上のデスクトップレイアウト）
   ========================================================================== */
@media (min-width: 768px) {
    /* 共通配置設定 */
    .scroll-nav {
        bottom: 30px;
        right: 30px;
        gap: 8px;
        transform: translateY(10px);
    }
    .scroll-btn {
        width: 40px;
        height: 40px;
        font-size: 0.8rem;
    }

    .site-container {
        max-width: 100%; 
        margin-left: auto;  
        margin-right: auto;
        position: relative; 
    }

    /* 左側：サイドバーヘッダー完全固定 */
    header.page-header {
        position: fixed;
        width: 280px; 
        min-width: 200px;
        height: 100vh;
        top: 0;
        left: 0;
        margin-left: 0;
        background: #ffffff;
        padding: 40px;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: space-between;
    }
    
    .header-top-group {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center; 
    }
    .logo {
        width: 140px;
        max-width: 100%; 
        height: auto; 
        margin-bottom: 50px;
    }

    .header-copyright {
        width: 100%;
        margin-bottom: 0;
    }
    .header-copyright p {
        font-size: 0.75rem;
        color: #777777; 
        text-align: center;
    }

    /* 不要なスマホ用表示を非表示化 */
    .menu-btn, .menu-mask {
        display: none !important;
    }

    /* サイドナビゲーションメニュー設定 */
    .main-nav {
        position: static;
        width: 100%;
        max-width: 140px;
        height: auto;
        background-color: transparent;
        padding-top: 0;
        transform: none;
    }
    .main-nav ul {
        display: block; 
        padding: 0;
        margin: 0;
        margin-bottom: 30px;
        list-style: none;
    }
    .main-nav li {
        margin: 0.8rem 0;
        text-align: left;
        position: relative;
    }
    .main-nav a {
        color: #12334c; 
        font-size: 0.8rem;        
        font-family: "Kiwi Maru", serif;        
        display: block;
        padding: 5px 0;
        text-decoration: none !important;
    }
    .main-nav a:hover {
        color: #2ab9e9;
    }

    /* カレント表示およびホバー時のドット表示 */
    .main-nav li.current a,
    .main-nav li:hover a {
        padding-left: 15px;
        transition: padding 0.2s ease, color 0.2s ease;
    }
    .main-nav li.current a {
        font-weight: bold;
    }
    .main-nav li.current::before,
    .main-nav li:hover::before {
        content: "";
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%); 
        width: 6px;
        height: 6px;
        background-color: #2ab9e9;   
        border-radius: 50%;          
        animation: dotFadeIn 0.2s ease forwards; 
    }
    @keyframes dotFadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    /* SNSリンク集 */
    .sns-links {
        display: flex;
        justify-content: flex-start;
        align-items: center;         
        gap: 16px;
        max-width: 550px;
        margin-left: auto;
        margin-right: auto;
        margin-top: 10px;                   
        margin-bottom: 40px;         
        width: 100%;
        position: relative;
    }
    .sns-links a {
        display: inline-block;
        transition: opacity 0.2s ease;
    }
    .sns-links a:hover {
        opacity: 0.6; 
    }
    .sns-links img {
        width: 22px;  
        max-width: 100%;
        height: auto;
    }
    .sns-links img.icon-landscape {
        width: 70px;
        height: auto;
    }

    /* 右側：コンテンツエリア */
    .news-contents {
        margin-left: 280px; 
        width: calc(100% - 280px); 
        box-sizing: border-box;
        padding: 40px;
    }
    .post-header-container {
        max-width: 550px;   
        margin-left: auto;  
        margin-right: auto;
        text-align: left;   
    }
    .post-info {
        position: relative;
        padding-top: 4px;
        margin-bottom: 40px;
        width: 100%;
    }
    .post-date {
        font-family: "Kiwi Maru", sans-serif;
        background: #5f90c8;
        border-radius: 50%;
        color: #fff;
        width: 100px;
        height: 100px;
        font-size: 1.625rem;
        text-align: center;
        position: absolute;
        top: 0;
        padding-top: 10px;
    }
    .post-date span {
        font-size: 1rem;
        border-top: 1px rgba(255,255,255,.5) solid;
        padding-top: 6px;
        display: block;
        width: 60%;
        margin: 0 auto;
    }
    .post-title {
        font-family: "Kiwi Maru", serif;
        font-weight: 500;
        color: #12334c;
        font-size: 2rem;
        max-width: 550px;
        margin-left: auto;
        margin-right: auto;
        padding-left: 0;
    }
    .post-info:has(.post-date) .post-title,
    .post-info:has(.post-date) .post-cat {
        margin-left: 120px;
    }

    /* 記事本文レイアウト設定 */
    article {
        width: 100%; 
        max-width: 1000px; 
        background-color: #ffffff;
        margin-left: 250px;
        margin-right: auto;
        padding: 40px 80px 100px 80px;
        border-radius: 8px;
        box-sizing: border-box;
    }
    article img {
        display: block;
        width: auto;
        max-width:550px;
        height:auto;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 10px;
    }
    
    /* 各種テキストデザイン */
    h1, h5, h6, .page-title {
        font-family: "Kiwi Maru", serif;
        font-weight: 500;
    }
    h2 {
        font-family: "Kiwi Maru", serif;
        font-size: 1.9rem !important;  
        color: #12334c;                
        font-weight: 500;
        max-width: 550px;
        margin-left: auto !important;
        margin-right: auto !important;
        padding-left: 0;
        letter-spacing: 0.09em;        
        line-height: 1.5;              
        margin-top: 50px;              
        margin-bottom: 25px;
        border-bottom: 1px solid rgba(18, 51, 76, 0.2);
        padding-bottom: 12px;
    }
    h3 {
        font-family: "Kiwi Maru", serif;
        font-size: 1.35rem;            
        color: #34537d;
        font-weight: 500;
        max-width: 550px;
        margin-left: auto;
        margin-right: auto;
        padding-left: 0;
        letter-spacing: 0.06em; 
        line-height: 1.4;
        margin-top: 35px;
        margin-bottom: 15px;
    }
    h4 {
        font-family: "Kiwi Maru", serif;
        font-size: 1.1rem;             
        color: #12334c;                
        font-weight: 500;
        max-width: 550px;
        margin-left: auto;
        margin-right: auto;
        padding-left: 0;
        letter-spacing: 0.04em; 
        line-height: 1.4;
        margin-top: 30px;              
        margin-bottom: 12px;           
    }
    p {
        font-family: "Zen Kaku Gothic New", sans-serif;
        font-weight: 400;
        margin-top: 0;
        margin-bottom: 0;
        max-width: 550px; 
        margin-left: auto;
        margin-right: auto;
        text-align: justify; 
        line-height: 1.6;
    }
    p:has(small),
    p.small-text { 
        font-size: 0.8rem;       
        line-height: 1.4 !important; 
        margin-top: 0;
        color:#777777;
    }
    p small {
        font-size: 1em;          
        line-height: inherit;    
        letter-spacing: 0.03em;  
    }
    p:has(small):last-child {
        margin-bottom: 0;
    }
    strong, 
    article strong {
        font-family: "Zen Kaku Gothic New", sans-serif;
        font-weight: 700;
        color: #12334c;
    }

    /* 目次構成 */
    .post-toc {
        max-width: 550px;
        margin-left: auto;
        margin-right: auto;
        background-color: #fafafa;
        border: 1px solid #e0e0e0;
        border-radius: 6px;
        padding: 24px 30px;
        box-sizing: border-box;
        margin-top: 30px;
        margin-bottom: 40px;
    }
    .toc-title {
        font-family: "Kiwi Maru", serif;
        color: #12334c;
        font-size: 0.9rem;
        letter-spacing: 0.1em;
        font-weight: 500;
        margin-top: 0 !important;
        margin-bottom: 15px !important;
        text-align: center;
    }
    .toc-list {
        list-style: none;
        padding: 0;
        margin: 0;
    }
    .toc-list li {
        margin: 10px 0;
        padding-left: 15px;
        position: relative;
        font-size: 0.9rem;
    }
    .toc-list li::before {
        content: "";
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 5px;
        height: 5px;
        background-color: #2ab9e9;
        border-radius: 50%;
    }
    .toc-list a {
        color: #12334c;
        text-decoration: none !important;
        transition: color 0.2s ease;
        display: inline-block;
    }
    .toc-list a:hover {
        color: #2ab9e9;
    }

    /* 記事内リスト（箇条書き） */
    article ul {
        max-width: 550px;
        margin-left: auto;
        margin-right: auto;
        padding-left: 0;
        margin-top: 20px;
        margin-bottom: 20px;
        list-style: none;
    }
    article li {
        font-size: 1rem;
        line-height: 1.7;
        color: #12334c;
        position: relative;
        padding-left: 1.2em;
        margin-bottom: 8px;
        text-align: justify;
    }
    article li:last-child {
        margin-bottom: 0;
    }
    article li::before {
        content: "・";
        position: absolute;
        left: 0;
        top: 0;
        color: #12334c;
        font-weight: normal;
    }

    /* 記事内テキストリンク */
    article p a,
    article li a {
        color: #2ab9e9;
        text-decoration: none !important;
        position: relative;
        padding-bottom: 2px;
        transition: color 0.2s ease;
        display: inline;
    }
    article p a::after,
    article li a::after {
content: "";
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 1px;
background-color: #2ab9e9;
opacity: 0;
transform: scaleX(0);
transform-origin: left center;
transition: opacity 0.2s ease, transform 0.2s ease;
}
article p a:hover::after,
article li a:hover::after {
opacity: 1;
transform: scaleX(1);
}
/* ナビゲーションおよびカテゴリ絞り込み調整 */
.post-pagination {
margin-top: 50px;
padding: 30px 0 0 0;
}
.post-pagination a.prev-post,
.post-pagination a.next-post {
font-size: 0.95rem;
}
.category-filter {
margin-left: auto !important;
margin-right: auto !important;
}
.blog-parts-grid {
grid-template-columns: repeat(2, 1fr); /* PC時は最大幅内で2列配置 */
margin-left: auto !important;
margin-right: auto !important;
}
}

/* ==========================================================================
   3. スマホ用設定（画面幅767px以下のモバイルレイアウト）
   ========================================================================== */
@media (max-width: 767px) {
    /* 共通配置の上書き */
    .scroll-nav {
        bottom: 15px;
        right: 15px;
        gap: 6px;
    }
    .scroll-btn {
        width: 34px;
        height: 34px;
        font-size: 0.7rem;
        background-color: rgba(18, 51, 76, 0.75);
    }

    /* 上部ヘッダー（スマホ時は固定解除） */
    header.page-header {
        position: static;
        width: 100%;
        height: auto;
        background-color: #ffffff;
        padding: 15px 0;
        text-align: center;
        display: block;
        border-bottom: 1px solid #e0e0e0;
    }
    .logo {
        width: 100px;
    }

    /* ハンバーガーメニューボタン */
    .menu-btn {
        display: flex !important;
        position: fixed;
        top: 15px;
        right: 15px;
        z-index: 100;
        width: 40px;
        height: 40px;
        background: #12334c;
        border: none;
        cursor: pointer;
        flex-direction: column;
        justify-content: space-around;
        padding: 10px;
        border-radius: 4px;
    }
    .menu-btn span {
        display: block;
        width: 100%;
        height: 2px;
        background-color: #fff;
        transition: transform 0.3s, opacity 0.3s;
    }
    .menu-btn.is-active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .menu-btn.is-active span:nth-child(2) { opacity: 0; }
    .menu-btn.is-active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
    
    /* 引き出し型ナビゲーション */
    .main-nav {
        position: fixed !important;
        top: 0;
        right: 0;
        z-index: 95 !important;
        width: 250px;
        height: 100vh;
        background-color: #fff !important;
        padding-top: 80px;
        box-sizing: border-box;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        display: block !important;
    }
    .main-nav.is-active {
        transform: translateX(0) !important;
    }
    .main-nav ul {
        display: block !important;
        padding: 0;
        margin: 0;
        list-style: none;
        width: 100%;
    }
    .main-nav li {
        margin: 20px 0;
        text-align: center;
    }
    .main-nav a {
        font-family: "Kiwi Maru", serif !important;
        font-weight: 500 !important;
        font-size: 1.1rem !important;
        color: #12334c !important;
        text-decoration: none !important;
        display: block !important;
        padding: 10px 0;
        opacity: 1 !important;
        visibility: visible !important;
    }
    .main-nav a:hover {
        color: #2ab9e9;
    }

    /* メニュー展開時の背景マスク */
    .menu-mask {
        display: block !important;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 80;
        width: 100vw;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.5);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s;
    }
    .menu-mask.is-active {
        opacity: 1;
        pointer-events: auto;
    }

    /* スマホ用SNSメニュー縦並び化 */
    .sns-links {
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 15px;
        margin-top: 40px;
        padding: 0 20px;
    }
    .sns-links img {
        width: 24px;
        height: auto;
    }
    .sns-links img.icon-landscape {
        width: 70px;
        height: auto;
    }

    /* コンテンツエリアの全幅化 */
    .news-contents {
        width: 100%;
        padding: 20px 3%;
        box-sizing: border-box;
        display: block;
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-top: 20px;
    }
    article {
        width: 100%;
        background-color: #ffffff;
        padding: 20px 15px;
        border-radius: 8px;
        box-sizing: border-box;
    }
    article img {
        max-width: 100%;
        margin-bottom: 15px;
    }
    article p {
        font-size: 0.95rem;
        line-height: 1.6;
        max-width: 100%;
    }

    /* 記事ヘッダー・日付バッジ */
    .post-header-container {
        max-width: 100%;
    }
    .post-info {
        position: relative;
        padding-top: 4px;
        margin-bottom: 30px;
        width: 100%;
    }
    .post-date {
        font-family: "Kiwi Maru", sans-serif;
        background: #5f90c8;
        border-radius: 50%;
        color: #fff;
        width: 70px;
        height: 70px;
        font-size: 1.1rem;
        text-align: center;
        position: absolute;
        top: 0;
        left: 0;
        padding-top: 10px;
        box-sizing: border-box;
    }
    .post-date span {
        font-size: 0.75rem;
        border-top: 1px rgba(255,255,255,.5) solid;
        padding-top: 2px;
        display: block;
        width: 70%;
        margin: 0 auto;
    }
    .post-info:has(.post-date) .post-title,
    .post-info:has(.post-date) .post-cat {
        margin-left: 85px;
    }
    .post-title {
        font-family: "Kiwi Maru", serif;
        font-size: 1.35rem;
        color: #12334c;
        margin: 0;
    }
    .post-cat {
        font-size: 0.85rem;
        margin-top: 6px;
    }

    /* 各種見出しフォント指定 */
    h1, h2, h3, h4, h5, h6, .page-title {
        font-family: "Kiwi Maru", serif;
        font-weight: 500;
        color: #12334c;
    }

    /* タイル状ブログパーツ：スマホ用1列化 */
    .category-filter {
        max-width: 100%;
        margin-bottom: 20px;
        gap: 8px;
        justify-content: flex-start;
    }
    .filter-btn {
        font-size: 0.8rem;
        padding: 5px 12px;
    }
    .blog-parts-grid {
        grid-template-columns: 1fr; /* スマホは確実に1列配置 */
        gap: 14px;
        max-width: 100%;
    }
    .card-body {
        padding: 12px;
    }
    .card-title {
        font-size: 1rem !important;
    }
}
