/* =========================================================
   あゆみ愛 行事・活動報告 専用スタイルシート (activities.css)
   ベースの css/style.css, css/header.css を継承・拡張
   ========================================================= */

/* カテゴリごとの配色パレット */
:root {
    --cat-season-bg: #fff0f0;
    --cat-season-color: #d3381c;
    --cat-season-border: #ffccc7;

    --cat-rec-bg: #fff7e6;
    --cat-rec-color: #d46b08;
    --cat-rec-border: #ffd591;

    --cat-community-bg: #f6ffed;
    --cat-community-color: #389e0d;
    --cat-community-border: #b7eb8f;

    --cat-craft-bg: #f9f0ff;
    --cat-craft-color: #722ed1;
    --cat-craft-border: #d3adf7;

    --cat-daily-bg: #e6f7ff;
    --cat-daily-color: #096dd9;
    --cat-daily-border: #91d5ff;

    --cat-other-bg: #f5f5f5;
    --cat-other-color: #595959;
    --cat-other-border: #d9d9d9;
}

/* ---------------------------------------------------------
   ヒーローヘッダー（行事・活動報告）
   --------------------------------------------------------- */
.activities-hero {
    background: linear-gradient(135deg, #003366 0%, #004c99 50%, #f7941d 100%);
    color: #ffffff;
    padding: 70px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.activities-hero::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    pointer-events: none;
}

.activities-hero::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: -40px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(247, 148, 29, 0.18);
    pointer-events: none;
}

.activities-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 16px;
    letter-spacing: 0.05em;
}

.activities-hero-title {
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 14px;
    line-height: 1.3;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.activities-hero-lead {
    font-size: 1.1rem;
    max-width: 760px;
    margin: 0 auto 20px;
    line-height: 1.7;
    opacity: 0.95;
}

.activities-hero-motto {
    display: inline-block;
    background: #ffffff;
    color: #003366;
    padding: 6px 20px;
    border-radius: 30px;
    font-size: 0.92rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ---------------------------------------------------------
   パンくずリスト
   --------------------------------------------------------- */
.breadcrumb-nav {
    background: #f1f4f8;
    padding: 10px 0;
    font-size: 0.88rem;
    border-bottom: 1px solid #e1e6ed;
}

.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.breadcrumb-list li {
    display: flex;
    align-items: center;
    color: #666666;
}

.breadcrumb-list li a {
    color: #003366;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-list li a:hover {
    color: #f7941d;
    text-decoration: underline;
}

.breadcrumb-separator {
    margin: 0 6px;
    color: #999999;
}

/* ---------------------------------------------------------
   カテゴリ絞り込みフィルターバー
   --------------------------------------------------------- */
.category-filter-wrap {
    margin: 40px auto 36px;
    text-align: center;
}

.category-filter-list {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: #ffffff;
    color: #4b5563;
    border: 1px solid #d1d5db;
    border-radius: 30px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
}

.filter-btn:hover {
    background: #fff7ed;
    border-color: #f7941d;
    color: #c25e00;
    transform: translateY(-1px);
}

.filter-btn.is-active {
    background: #003366;
    border-color: #003366;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.25);
}

.filter-btn-count {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 20px;
    font-size: 0.75rem;
    background: rgba(0, 0, 0, 0.08);
    color: inherit;
    font-weight: 700;
}

.filter-btn.is-active .filter-btn-count {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* ---------------------------------------------------------
   投稿グリッドレイアウト
   --------------------------------------------------------- */
.activities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 36px;
    margin-bottom: 60px;
}

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

/* 活動報告カード */
.activity-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 51, 102, 0.08);
    border: 1px solid #e9edf2;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
}

.activity-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 51, 102, 0.14);
}

/* メイン写真領域 */
.card-media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #f0f3f6;
    overflow: hidden;
    cursor: pointer;
}

.card-main-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.activity-card:hover .card-main-photo {
    transform: scale(1.04);
}

/* 写真拡大アイコンオーバーレイ */
.card-photo-zoom-hint {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.65);
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(2px);
    pointer-events: none;
    transition: opacity 0.2s;
}

.card-media-count-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 51, 102, 0.85);
    color: #ffffff;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* 写真なし時のプレースホルダー */
.card-no-photo {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 0.9rem;
    gap: 6px;
    background: #f8fafc;
}

.card-no-photo-icon {
    font-size: 2.2rem;
    opacity: 0.6;
}

/* カード本文領域 */
.card-content {
    padding: 22px 24px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* メタ情報（日付＋カテゴリバッジ） */
.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.card-date {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #64748b;
    font-size: 0.86rem;
    font-weight: 600;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    border: 1px solid transparent;
}

/* カテゴリ別カラー */
.category-badge.cat-season {
    background: var(--cat-season-bg);
    color: var(--cat-season-color);
    border-color: var(--cat-season-border);
}
.category-badge.cat-rec {
    background: var(--cat-rec-bg);
    color: var(--cat-rec-color);
    border-color: var(--cat-rec-border);
}
.category-badge.cat-community {
    background: var(--cat-community-bg);
    color: var(--cat-community-color);
    border-color: var(--cat-community-border);
}
.category-badge.cat-craft {
    background: var(--cat-craft-bg);
    color: var(--cat-craft-color);
    border-color: var(--cat-craft-border);
}
.category-badge.cat-daily {
    background: var(--cat-daily-bg);
    color: var(--cat-daily-color);
    border-color: var(--cat-daily-border);
}
.category-badge.cat-other {
    background: var(--cat-other-bg);
    color: var(--cat-other-color);
    border-color: var(--cat-other-border);
}

.card-media-link {
    display: block;
    text-decoration: none;
    overflow: hidden;
}

/* タイトル */
.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.45;
    margin-bottom: 14px;
}

.card-title-link {
    color: #1e293b;
    text-decoration: none;
    transition: color 0.2s ease;
}

.card-title-link:hover,
.activity-card:hover .card-title-link {
    color: #f7941d;
}

/* ＜続きはこちら＞ 誘導ボタン */
.card-action-wrap {
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px dashed #e2e8f0;
}

.card-read-more-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 11px 18px;
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    color: #c25e00;
    border: 1.5px solid #fdba74;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.03em;
    transition: all 0.25s ease;
    box-shadow: 0 2px 6px rgba(247, 148, 29, 0.12);
}

.card-read-more-btn:hover,
.activity-card:hover .card-read-more-btn {
    background: linear-gradient(135deg, #f7941d 0%, #ea580c 100%);
    color: #ffffff;
    border-color: #ea580c;
    box-shadow: 0 6px 16px rgba(247, 148, 29, 0.35);
}

.card-read-more-btn span {
    transition: transform 0.2s ease;
}

.activity-card:hover .card-read-more-btn span {
    transform: scale(1.03);
}

/* 本文テキスト */
.card-text {
    color: #475569;
    font-size: 0.94rem;
    line-height: 1.85;
    white-space: pre-wrap;
    word-break: break-word;
    flex: 1;
}

/* 複数写真のミニサムネイル一覧 */
.card-gallery-strip {
    display: flex;
    gap: 8px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px dashed #e2e8f0;
    overflow-x: auto;
    padding-bottom: 4px;
}

.gallery-strip-thumb {
    width: 60px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
    cursor: pointer;
    border: 1px solid #cbd5e1;
    transition: transform 0.2s, border-color 0.2s;
    flex-shrink: 0;
}

.gallery-strip-thumb:hover {
    transform: scale(1.08);
    border-color: #f7941d;
}

/* ---------------------------------------------------------
   投稿なしのプレースホルダー
   --------------------------------------------------------- */
.empty-posts-box {
    background: #ffffff;
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    padding: 60px 20px;
    text-align: center;
    color: #64748b;
    margin: 40px auto;
    max-width: 600px;
}

.empty-posts-icon {
    font-size: 3.5rem;
    margin-bottom: 16px;
}

.empty-posts-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

/* ---------------------------------------------------------
   管理者用リンクバナー
   --------------------------------------------------------- */
.admin-jump-bar {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 16px 0;
    text-align: center;
    font-size: 0.88rem;
    color: #64748b;
}

.admin-jump-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #003366;
    text-decoration: none;
    font-weight: 600;
    padding: 6px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    transition: all 0.2s;
}

.admin-jump-link:hover {
    color: #f7941d;
    border-color: #f7941d;
    background: #fff7ed;
}

/* ---------------------------------------------------------
   ライトボックス（写真拡大モーダル）
   --------------------------------------------------------- */
.activity-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 20, 35, 0.88);
    backdrop-filter: blur(6px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.activity-lightbox.is-open {
    display: flex;
    opacity: 1;
}

.lightbox-content-wrap {
    position: relative;
    max-width: 92vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.lightbox-caption {
    color: #ffffff;
    margin-top: 14px;
    font-size: 0.95rem;
    text-align: center;
    max-width: 800px;
}

.lightbox-close-btn {
    position: absolute;
    top: -46px;
    right: 0;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    padding: 4px 10px;
    transition: transform 0.2s;
}

.lightbox-close-btn:hover {
    transform: scale(1.2);
    color: #f7941d;
}

.lightbox-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #ffffff;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.lightbox-nav-btn:hover {
    background: #f7941d;
    border-color: #f7941d;
}

.lightbox-prev {
    left: -60px;
}

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

@media (max-width: 768px) {
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
}

.lightbox-counter {
    position: absolute;
    top: -40px;
    left: 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.88rem;
    font-weight: 600;
}

/* =========================================================
   管理・投稿画面 (post.php) 用スタイル
   ========================================================= */
.admin-container {
    max-width: 980px;
    margin: 40px auto 60px;
    padding: 0 20px;
}

.admin-header {
    background: #003366;
    color: #ffffff;
    padding: 20px 24px;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.admin-header-title {
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.admin-btn-primary {
    background: #f7941d;
    color: #ffffff;
}
.admin-btn-primary:hover {
    background: #e07f0f;
}

.admin-btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}
.admin-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
}

.admin-btn-danger {
    background: #ef4444;
    color: #ffffff;
}
.admin-btn-danger:hover {
    background: #dc2626;
}

.admin-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    padding: 30px;
    margin-bottom: 40px;
}

/* ログインフォームカード */
.login-box {
    max-width: 440px;
    margin: 80px auto;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 51, 102, 0.1);
    padding: 36px 32px;
    text-align: center;
}

.login-lock-icon {
    font-size: 2.8rem;
    margin-bottom: 12px;
}

.login-title {
    font-size: 1.4rem;
    color: #003366;
    margin-bottom: 6px;
    font-weight: 700;
}

.login-desc {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 24px;
}

/* フラッシュ通知アラート */
.alert-box {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 0.94rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: #f6ffed;
    color: #237804;
    border: 1px solid #b7eb8f;
}

.alert-error {
    background: #fff2f0;
    color: #cf1322;
    border: 1px solid #ffccc7;
}

/* 投稿フォームグループ */
.form-field {
    margin-bottom: 22px;
}

.form-label {
    display: block;
    font-size: 0.92rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.form-label .required-badge {
    background: #ef4444;
    color: #ffffff;
    font-size: 0.72rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    font-weight: 700;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #1e293b;
    background: #ffffff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #003366;
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.12);
}

.form-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 640px) {
    .form-row-2col {
        grid-template-columns: 1fr;
    }
}

/* 写真アップロードドロップゾーン */
.dropzone-box {
    border: 2px dashed #94a3b8;
    background: #f8fafc;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s;
    position: relative;
}

.dropzone-box:hover,
.dropzone-box.is-dragover {
    border-color: #f7941d;
    background: #fff7ed;
}

.dropzone-icon {
    font-size: 2.2rem;
    color: #64748b;
    margin-bottom: 8px;
}

.dropzone-text {
    font-size: 0.95rem;
    color: #334155;
    font-weight: 600;
}

.dropzone-subtext {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 4px;
}

.file-input-hidden {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* プレビューグリッド */
.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #cbd5e1;
    background: #f1f5f9;
}

.preview-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.2s;
}

.preview-remove-btn:hover {
    background: #ef4444;
}

/* 既存投稿一覧テーブル */
.posts-table-wrap {
    overflow-x: auto;
    margin-top: 14px;
}

.posts-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.posts-table th {
    background: #f1f5f9;
    color: #475569;
    padding: 12px 14px;
    text-align: left;
    font-weight: 700;
    border-bottom: 2px solid #cbd5e1;
    white-space: nowrap;
}

.posts-table td {
    padding: 14px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

.posts-table tr:hover td {
    background: #f8fafc;
}

.table-thumb {
    width: 54px;
    height: 42px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
}

/* =========================================================
   本文・写真挿入ストーリーブロック（公開側・管理側共通）
   ========================================================= */

/* 公開側：本文と写真の自然な段落・挿入フロー */
.activity-story-flow {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 14px;
}

.story-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.story-text-block {
    color: #334155;
    font-size: 0.95rem;
    line-height: 1.8;
    word-break: break-word;
}

.story-photo-block {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #f1f5f9;
    box-shadow: 0 4px 14px rgba(0, 51, 102, 0.08);
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.story-photo-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 51, 102, 0.15);
}

.story-photo-img {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.story-photo-block:hover .story-photo-img {
    transform: scale(1.02);
}

/* 管理側：本文・写真挿入編集ブロック */
.story-block-builder {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 24px;
}

.story-block-item {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-left: 4px solid #003366;
    border-radius: 10px;
    padding: 20px;
    position: relative;
    transition: border-color 0.2s;
}

.story-block-item:hover {
    border-color: #94a3b8;
    border-left-color: #f7941d;
}

.story-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}

.story-block-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.story-block-num {
    background: #003366;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
}

.story-block-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
}

.story-block-del-btn {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fca5a5;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.story-block-del-btn:hover {
    background: #ef4444;
    color: #ffffff;
}

/* 写真枠（各ブロック内） */
.section-photo-row {
    background: #ffffff;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.section-photo-preview {
    width: 90px;
    height: 70px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid #cbd5e1;
}

.section-photo-controls {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.add-block-btn-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin: 16px 0 28px;
    padding: 14px 18px;
    background: #f1f5f9;
    border-radius: 8px;
    border: 1px dashed #cbd5e1;
}

.add-block-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #003366;
    color: #ffffff;
    border: none;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.add-block-btn:hover:not(:disabled) {
    background: #004c99;
    transform: translateY(-1px);
}

.add-block-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    opacity: 0.7;
}

.photo-counter-badge {
    font-size: 0.88rem;
    font-weight: 700;
    color: #003366;
    background: #ffffff;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid #cbd5e1;
}

/* =========================================================
   活動報告 詳細ページ (detail.php) 用スタイル（本文・写真を大きく表示）
   ========================================================= */
.detail-page-container {
    max-width: 900px;
    margin: 40px auto 70px;
    padding: 0 20px;
}

.detail-article-wrap {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 51, 102, 0.08);
    border: 1px solid #e9edf2;
    padding: 48px 56px;
    overflow: hidden;
}

@media (max-width: 768px) {
    .detail-article-wrap {
        padding: 28px 20px;
        border-radius: 14px;
    }
}

.detail-meta-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.detail-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 600;
}

.detail-article-title {
    font-size: 2.1rem;
    font-weight: 700;
    color: #003366;
    line-height: 1.45;
    margin-bottom: 28px;
    padding-bottom: 22px;
    border-bottom: 2px solid #f1f5f9;
    letter-spacing: 0.02em;
}

@media (max-width: 768px) {
    .detail-article-title {
        font-size: 1.5rem;
        margin-bottom: 20px;
        padding-bottom: 16px;
    }
}

/* 詳細ページの本文・写真ストーリー（大きく読みやすく配置） */
.detail-story-flow {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.detail-text-block {
    color: #334155;
    font-size: 1.05rem;
    line-height: 1.8;
    letter-spacing: 0.02em;
    word-break: break-word;
}

@media (max-width: 768px) {
    .detail-text-block {
        font-size: 0.98rem;
        line-height: 1.75;
    }
}

.detail-photo-block {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: #f8fafc;
    box-shadow: 0 6px 20px rgba(0, 51, 102, 0.1);
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    margin: 8px 0;
}

.detail-photo-block:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 51, 102, 0.18);
}

.detail-photo-img {
    width: 100%;
    max-height: 560px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.detail-photo-block:hover .detail-photo-img {
    transform: scale(1.02);
}

.detail-photo-caption {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(4px);
    pointer-events: none;
}

/* 一覧に戻るボタン ＆ 前後の記事ナビゲーション */
.detail-bottom-nav {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 2px solid #f1f5f9;
}

.detail-back-btn-wrap {
    text-align: center;
    margin-bottom: 36px;
}

.detail-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 36px;
    background: #003366;
    color: #ffffff;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(0, 51, 102, 0.25);
    transition: all 0.25s ease;
}

.detail-back-btn:hover {
    background: #f7941d;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(247, 148, 29, 0.35);
}

.detail-adjacent-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.detail-adjacent-link {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 48%;
    color: #003366;
    text-decoration: none;
    transition: color 0.2s ease;
}

.detail-adjacent-link:hover {
    color: #f7941d;
}

.detail-adjacent-label {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 700;
}

.detail-adjacent-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

@media (max-width: 600px) {
    .detail-adjacent-nav {
        flex-direction: column;
        align-items: stretch;
    }
    .detail-adjacent-link {
        max-width: 100%;
    }
}


