@charset "UTF-8";

/* ==========================================================================
   金沢西みなとクリニック - ブログギャラリー風デザイン (blog.css)
   ========================================================================== */

/* --------------------------------------------------------------------------
   カテゴリーソートフィルター (緑色デザイン＋下部余白拡張)
   -------------------------------------------------------------------------- */
.blog-category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 56px;
    justify-content: center;
}

.filter-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #4a5568;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 8px 22px;
    border-radius: 9999px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s ease;
    font-family: inherit;
    display: inline-block;
}

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

/* --------------------------------------------------------------------------
   ギャラリースタイルの記事カードグリッド (一覧ページ)
   -------------------------------------------------------------------------- */
.blog-grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 36px 24px;
}

.blog-card {
    display: flex;
    flex-direction: column;
    background: transparent;
    border: none;
    box-shadow: none;
}

.blog-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 写真：正方形・角丸なし・黒枠線 */
.blog-thumb-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f8fafc;
    border-radius: 0;
    overflow: hidden;
    position: relative;
    border: 1px solid #000000;
    margin-bottom: 14px;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-card:hover .blog-thumb-wrap {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.blog-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.blog-thumb-placeholder {
    width: 100%;
    height: 100%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000000;
    font-size: 2.5rem;
}

/* カード下部テキスト情報 */
.blog-content {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* 日付・カテゴリー */
.blog-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.blog-date {
    font-size: 0.78rem;
    font-weight: 500;
    color: #64748b;
    font-family: 'Outfit', sans-serif;
}

/* 白黒のカテゴリーバッジ */
.blog-cat-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 0;
    white-space: nowrap;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.blog-cat-badge:hover {
    opacity: 0.8;
}

.badge-clinic {
    background: #000000;
    color: #ffffff;
    border: 1px solid #000000;
}

/* タイトル */
.blog-title {
    font-size: 1rem;
    font-weight: 700;
    color: #000000;
    margin: 4px 0 2px 0;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.blog-card:hover .blog-title {
    color: #25a884;
}

/* 抜粋文 */
.blog-excerpt {
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --------------------------------------------------------------------------
   記事詳細ページ (`article.php`) スタイル
   -------------------------------------------------------------------------- */
.article-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ヒーローメタバッジ */
.article-hero-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.blog-date-badge {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #4a5568;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    padding: 5px 16px;
    border-radius: 9999px;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.05em;
}

.blog-cat-badge.subpage-style {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #25a884;
    background: #edf7f4;
    border: 1px solid #cce8e0;
    padding: 5px 16px;
    border-radius: 9999px;
    letter-spacing: 0.05em;
}

/* 2カラムレイアウト */
.article-layout {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 60px;
    align-items: start;
}

/* 左カラム：写真群 */
.article-gallery-col {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* メインサムネイル */
.article-main-thumb-wrap {
    width: 100%;
    border: 1px solid #000000;
    background: #f8fafc;
    overflow: hidden;
    line-height: 0;
    cursor: pointer;
}

.article-main-thumb-img {
    width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.article-main-thumb-wrap:hover .article-main-thumb-img {
    transform: scale(1.02);
}

/* サブ画像グリッド */
.article-sub-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.article-sub-thumb-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    border: 1px solid #000000;
    background: #f8fafc;
    overflow: hidden;
    line-height: 0;
    cursor: pointer;
}

.article-sub-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.article-sub-thumb-wrap:hover .article-sub-thumb-img {
    transform: scale(1.03);
}

/* 右カラム：本文テキスト */
.article-body-col {
    padding-top: 4px;
}

.article-body-text {
    font-size: 1.05rem;
    color: #1a202c;
    line-height: 2.15;
    white-space: pre-wrap;
    word-break: break-all;
}

/* --------------------------------------------------------------------------
   画像モーダル（アニメーション付 Lightbox）
   -------------------------------------------------------------------------- */
.lightbox-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox-modal.is-active {
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.92);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox-modal.is-active .lightbox-content {
    transform: scale(1);
}

.lightbox-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
    user-select: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.lightbox-img.is-swapping {
    opacity: 0.3;
    transform: scale(0.97);
}

/* モーダル閉じるボタン */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #ffffff;
    font-size: 1.8rem;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 100001;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.08);
}

/* 写真送り矢印ボタン */
.lightbox-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #ffffff;
    font-size: 2.2rem;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
    user-select: none;
    z-index: 100001;
}

.lightbox-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-50%) scale(1.08);
}

.lightbox-prev {
    left: 24px;
}

.lightbox-next {
    right: 24px;
}

/* カウンター表示 */
.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    letter-spacing: 0.1em;
    background: rgba(0, 0, 0, 0.5);
    padding: 4px 16px;
    border-radius: 9999px;
}

/* 記事下ナビゲーション */
.article-nav-wrapper {
    margin-top: 60px;
    padding-top: 32px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.article-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #1a202c;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.article-nav-link:hover {
    color: #25a884;
}

.article-btn-back {
    display: inline-block;
    background: #25a884;
    color: #ffffff;
    padding: 10px 28px;
    border-radius: 9999px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: background 0.2s ease;
}

.article-btn-back:hover {
    background: #1f9171;
}

/* --------------------------------------------------------------------------
   ページネーション
   -------------------------------------------------------------------------- */
.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 60px;
}

.page-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 0;
    border: 1px solid #000000;
    color: #000000;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.page-num.active,
.page-num:hover {
    background: #000000;
    border-color: #000000;
    color: #ffffff;
}

/* --------------------------------------------------------------------------
   レスポンシブ対応
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
    .blog-grid-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 28px 20px;
    }
}

@media (max-width: 900px) {
    .article-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .article-gallery-col {
        max-width: 440px;
        margin: 0 auto;
        width: 100%;
    }

    .lightbox-btn {
        width: 42px;
        height: 42px;
        font-size: 1.5rem;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }
}

@media (max-width: 768px), (max-width: 1024px) and (orientation: portrait) {
    .blog-grid-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px 16px;
    }
    .article-body-text {
        font-size: 0.95rem !important;
        line-height: 1.7 !important;
    }
}

@media (max-width: 480px) {
    .blog-grid-container {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .article-sub-grid {
        gap: 10px;
    }
}