/*
Theme Name: Cocoon Child
Template: cocoon-master
Version: 1.1.3
*/

/************************************
** サイト共通スタイル（モバイル優先ベース）
************************************/

/* 1. デザイン変数の定義 */
:root {
    --gap: 24px;
    --gap-half: 12px;
    --line-height-base: 1.75;
    --color-primary: #0073aa;
    --color-primary-dark: #005a8c;
    --color-accent: #3498db; /* 強めのブルー */
    --color-accent-light: #e6f7ff;
    --color-border: #e0e0e0;
    --text: #333333;
    --muted: #666666;
    --bg-subtle: #f9f9f9;
    --radius: 8px;
    --shadow-base: 0 4px 10px rgba(0, 0, 0, 0.08);
}

/* 2. 基本的なリセットと共通デザイン */
.top-compact-design {
    max-width: 1100px; /* PCでの最大幅 */
    margin: var(--gap) auto;
    padding: 0 var(--gap-half);
}
.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: var(--gap);
    padding-bottom: 5px;
    border-bottom: 3px solid var(--color-primary);
}
.mb-compact {
    margin-bottom: var(--gap);
}

/* --- 3. Flexboxレイアウト定義（横並びの強化） --- */

/* 共通のFlexbox設定 */
.grid-2-col,
.grid-2-col-content,
.grid-3-col {
    display: flex; 
    flex-wrap: wrap; 
    gap: var(--gap);
    margin: 0;
    padding: 0;
    list-style: none;
}

/* 1. 注目のツール (2列) のレイアウト定義 */
.grid-2-col a.custom-card {
    flex: 1 1 calc(50% - (var(--gap) / 2));
    min-width: 300px;
}

/* 2. 人気記事/新着記事 (2列) のレイアウト定義 */
.grid-2-col-content > div {
    flex: 1 1 calc(50% - (var(--gap) / 2));
    min-width: 300px;
}
.list-wrap {
    background-color: #fff;
    padding: var(--gap);
    border-radius: var(--radius);
    box-shadow: var(--shadow-base);
}

/* 3. テーマ別カテゴリ (3列) のレイアウト定義 */
.grid-3-col a.category-btn {
    flex: 1 1 auto; 
    min-width: 180px;
}

/* --- 4. カスタムカード/ボタンのデザイン --- */

/* 注目ツールカード（共通スタイル） */
.custom-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: var(--gap);
    border-radius: var(--radius);
    box-shadow: var(--shadow-base);
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    min-height: 180px;
}
.custom-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}
.custom-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: #fff;
}
/* 視認性向上のため、説明文の色を明るいグレーに */
.custom-card p { 
    font-size: 0.9rem;
    margin-bottom: var(--gap);
    color: #f0f0f0;
}
.card-cta {
    display: inline-block;
    padding: 0.5em 1.2em;
    min-width: 120px;
    text-align: center;
    font-weight: 700;
    border-radius: 999px;
    text-decoration: none;
    transition: background-color 0.2s;
}
/* プライマリカード */
.card-primary {
    background-color: var(--color-primary);
}
/* 修正: CTAボタンをカード背景と異なる色にして目立たせる */
.card-primary .card-cta {
    background-color: #fff;
    color: var(--color-primary);
}
.card-primary .card-cta:hover {
    background-color: var(--color-accent-light);
}

/* アクセントカード */
.card-accent {
    background-color: var(--color-accent);
}
/* 修正: CTAボタンをカード背景と異なる色にして目立たせる */
.card-accent .card-cta {
    background-color: #fff;
    color: var(--color-accent);
}
.card-accent .card-cta:hover {
    background-color: var(--color-accent-light);
}

/* カテゴリボタン */
.category-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    background-color: var(--color-accent-light);
    color: var(--color-primary-dark);
    font-weight: 600;
    border-radius: 999px;
    transition: background-color 0.2s;
    text-decoration: none;
}
.category-btn:hover {
    background-color: #c4e4f7;
    text-decoration: none;
}

/* --- 5. プロフィールボックス --- */
.profile-box {
    display: flex;
    align-items: center;
    gap: var(--gap);
    padding: var(--gap);
    background-color: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-base);
}
.profile-box img {
    border-radius: 50%;
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 3px solid var(--color-primary);
}
.profile-text {
    flex-grow: 1;
}
.profile-cta {
    white-space: nowrap;
    padding: 0.5em 1.2em;
    background-color: var(--muted);
    color: #fff;
    border-radius: 999px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background-color 0.2s;
}
.profile-cta:hover {
    background-color: var(--text);
    text-decoration: none;
}

/* --- 6. 記事本文の調整（可読性維持） --- */

/* 記事本文の段落、リスト、引用符の行間と下マージンを適切に設定 */
.entry-content p,
.entry-content ul,
.entry-content ol,
.entry-content blockquote {
    line-height: var(--line-height-base) !important;
    margin-top: 0 !important;
    margin-bottom: 1.7em !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}
/* 見出しの余白調整 */
.entry-content h2,
.entry-content h3,
.entry-content h4 {
    margin-top: 2.5em !important;
    margin-bottom: 0.8em !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}
/* 記事コンテンツのレイアウト */
.content-in,
.article-page {
    max-width: 750px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    background-color: #fff;
    padding: var(--gap);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
/* 記事内テーブルのモバイルはみ出し対策 */
.entry-content table {
    display: block;
    overflow-x: auto;
    width: 100%;
    -webkit-overflow-scrolling: touch;
}


/* --- 7. メディアクエリ（レスポンシブ対応） --- */

/* 記事とアイキャッチの幅統一 (PC) */
@media screen and (min-width: 900px) {
    .content-in,
    .article-page,
    #article-eye-catch,
    #post-eye-catch,
    .article-eye-catch {
        max-width: 1000px !important;
    }
    .content-in,
    .article-page {
        max-width: 1000px !important;
    }
}

/* モバイル対応 (768px以下) */
@media screen and (max-width: 768px) {
    /* ツール、記事リストは1列に強制 */
    .grid-2-col,
    .grid-2-col-content {
        flex-direction: column;
        gap: var(--gap-half);
    }
    .grid-2-col a.custom-card,
    .grid-2-col-content > div {
        flex: 1 1 100%;
        min-width: unset;
    }

    /* カテゴリボタンは2列に */
    .grid-3-col {
        flex-direction: row;
        gap: var(--gap-half);
    }
    .grid-3-col a.category-btn {
        flex: 1 1 calc(50% - (var(--gap-half) / 2));
    }
    .mb-compact {
        margin-bottom: var(--gap-half);
    }

    /* プロフィールボックスのレイアウト調整 */
    .profile-box {
        flex-direction: column;
        text-align: center;
        gap: var(--gap-half);
        padding: var(--gap-half);
    }
    .profile-text {
        order: 3;
    }
    .profile-box img {
        order: 1;
    }
    .profile-cta {
        order: 2;
        margin-top: var(--gap-half);
    }
    .profile-text small {
        display: block;
        margin-top: 5px;
    }
    
    /* セクション間の余白を調整 */
    .spotlight-section,
    .info-section,
    .profile-section,
    .category-section,
    .article-section {
        margin-bottom: calc(var(--gap) / 2) !important;
    }
}
/************************************
** キャンプ場一覧 (カードデザイン)
************************************/
:root {
    --camp-primary: #0073aa; /* メインカラー */
    --camp-success: #28a745; /* 公開済み強調色 */
    --camp-warning: #ffc107; /* 公開予定強調色 */
    --camp-danger: #dc3545; /* 休業中強調色 */
    --camp-bg: #f9f9f9;
}

/* --- レイアウトの定義（再利用） --- */

/* base-grid-2 は強制的な2列Flexboxとして定義 */
.base-grid-2 {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 20px !important;
    margin-top: 20px !important;
}
.base-grid-2 > .base-card {
    /* 均等な2列幅を強制適用 */
    flex: 1 1 calc(50% - 10px) !important; 
    min-width: 300px !important;
    box-sizing: border-box !important;
}

/* モバイル対応: 1列に強制 */
@media screen and (max-width: 600px) {
    .base-grid-2 > .base-card {
        flex: 1 1 100% !important;
        min-width: unset !important;
    }
}


/* --- カードの基本デザイン --- */

.base-card {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #eeeeee;
}
.base-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.base-card-inner {
    padding: 15px;
    height: 100%; /* Flexboxアイテムの高さを揃えるため */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* --- カード内要素 --- */

.camp-header-layout {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}
.camp-header-layout a {
    font-size: 1.1em;
    font-weight: bold;
    color: var(--camp-primary);
    line-height: 1.4;
}

.camp-feature {
    font-size: 0.9em;
    color: var(--camp-text);
    margin-top: 5px !important;
    margin-bottom: 10px !important;
    line-height: 1.6;
}

.camp-footer-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px dashed #f0f0f0;
    padding-top: 10px;
}

/* タグの共通スタイル */
.camp-tag {
    font-size: 0.7em;
    font-weight: bold;
    padding: 3px 6px;
    border-radius: 4px;
    white-space: nowrap;
    color: #fff;
    background-color: #6c757d;
}
/* タグの色分け */
.tag-family { background-color: #ff8c00; }
.tag-sea { background-color: #17a2b8; }
.tag-fuji, .tag-grass { background-color: #28a745; }
.tag-closed { background-color: var(--camp-danger); }


/* --- 公開ステータス別のデザインとCTA強調 --- */

/* 1. 公開予定 (status-pending) */
.camp-card.status-pending {
    opacity: 0.7;
    border-left: 5px solid var(--camp-warning);
}
.camp-card.status-pending .review-status {
    color: var(--camp-warning);
    font-weight: bold;
}

/* 2. 休業中 (status-closed) */
.camp-card.status-closed {
    opacity: 0.5;
    border-left: 5px solid var(--camp-danger);
    pointer-events: none; /* クリック無効化 */
}
.camp-card.status-closed .review-status {
    color: var(--camp-danger);
    font-weight: bold;
}

/* 3. 公開済み (status-published) - CTA強調 */
.camp-card.status-published {
    border: 2px solid var(--camp-success);
    box-shadow: 0 6px 12px rgba(40, 167, 69, 0.2); /* 緑色の影 */
}
.camp-card.status-published .review-status {
    color: var(--camp-success);
    font-weight: bold;
    font-size: 0.9em;
}

/* 公開済みカードのフッターCTA */
.camp-footer-info.published-footer {
    display: flex;
    flex-direction: column; /* 縦に並べる */
    align-items: stretch;
    gap: 5px;
}
.camp-footer-info.published-footer .status-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}
.camp-card.status-published .theme-button {
    /* 「体験記を読む」ボタンの強調 */
    display: block;
    width: 100%;
    padding: 10px 15px;
    text-align: center;
    background-color: var(--camp-success);
    color: #fff !important;
    font-weight: bold;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.2s;
}
.camp-card.status-published .theme-button:hover {
    background-color: #1e7e34;
}
.camp-card.status-published .published-note {
    font-size: 0.8em;
    color: #6c757d;
    text-align: right;
    margin-top: 5px !important;
    margin-bottom: 0 !important;
}

/* 関連リンクと情報ボックス */
.related-links-section {
    margin-top: 40px;
    padding: 20px;
    background-color: var(--camp-bg);
    border-radius: 8px;
}
.info-box-note {
    /* Cocoonのpタグのスタイルを上書きし、情報ボックス風にする */
    margin-top: 20px !important;
    padding: 15px;
    border: 1px solid #d4edda;
    background-color: #e2f0e4;
    border-radius: 5px;
    line-height: 1.6;
}
/*
================================================
1. Base Styling & Typography
================================================
*/
:root {
    /* Color Palette */
    --color-primary: #1e40af; /* Blue-900 for main accents */
    --color-success: #059669; /* Green-600 for Published */
    --color-warning: #d97706; /* Amber-600 for Pending */
    --color-danger: #ef4444; /* Red-500 for Closed */
    --color-dark: #374151; /* Gray-700 for Official link fallback */
    --color-secondary-bg: #f9fafb; /* Light Gray for sections */
    --color-border: #e5e7eb; /* Gray-200 */
    --color-text-main: #1f2937; /* Gray-800 */
}

body {
    /* 注意: bodyに直接フォントを適用すると、Cocoon全体に影響を与える可能性があります。
    可能であれば、.trip-list-containerなど、リストを囲む要素に適用することを推奨します。
    */
    /* font-family: 'Noto Sans JP', 'Inter', sans-serif;
    color: var(--color-text-main);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale; 
    */
}

.trip-list-container {
    max-width: 1200px;
    /* Cocoonの本文エリアに合わせて調整 */
    margin: 0 auto;
    padding: 20px 0; /* Cocoon本文エリア内のpaddingは調整 */
}

/*
================================================
2. Layout Containers
================================================
*/
.trip-list-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/*
================================================
3. Headers and Titles
================================================
*/
.trip-main-title {
    font-size: 2.25rem; /* text-4xl */
    font-weight: 700; /* font-extrabold */
    color: var(--color-primary);
    margin-bottom: 24px;
    text-align: center;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--color-border);
}

.trip-section-title {
    font-size: 1.75rem; /* text-2xl */
    font-weight: 700;
    margin-top: 32px;
    margin-bottom: 24px;
    padding: 12px 16px;
    background-color: var(--color-secondary-bg);
    border-radius: 8px; /* rounded-lg */
    border-left: 6px solid var(--color-primary);
}

.trip-section-title i {
    margin-right: 10px;
    color: var(--color-primary);
}

/*
================================================
4. Overview & Alert Boxes
================================================
*/
.trip-overview-box {
    background-color: #e0f2fe; /* Sky-100 */
    border-left: 4px solid #0ea5e9; /* Sky-500 */
    padding: 16px 20px;
    margin-bottom: 20px;
    border-radius: 6px; /* rounded-md */
}

.trip-lead-text {
    font-size: 1rem;
    color: #0c4a6e; /* Sky-900 */
    margin: 0;
}

.trip-alert-box {
    background-color: #fef3c7; /* Amber-100 */
    border: 1px solid #f59e0b; /* Amber-400 */
    color: #92400e; /* Amber-900 */
    padding: 12px 20px;
    margin-bottom: 30px;
    border-radius: 6px; /* rounded-md */
    font-size: 0.875rem; /* text-sm */
}

/* TOC Placeholder Styling */
/* [toc]はCocoonのショートコードに置き換わるため、このスタイルは不要ですが、HTMLに合わせたプレースホルダーとして残します */
/*
[toc] {
    display: block;
    margin-bottom: 30px;
    padding: 15px;
    background-color: #fff;
    border: 1px dashed var(--color-border);
    border-radius: 8px;
    font-weight: 600;
    color: #6b7280; 
    text-align: center;
}
[toc]::before {
    content: "【目次エリア】";
}
*/


/*
================================================
5. Card List (Grid Layout)
================================================
*/
.trip-card-list {
    display: grid;
    gap: 20px;
    /* Mobile: 1 column */
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    /* Tablet/Desktop: 2 columns */
    .trip-card-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    /* Large Desktop: 3 columns */
    .trip-card-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

/*
================================================
6. Card Styling
================================================
*/
.trip-card {
    background-color: white;
    border-radius: 12px; /* rounded-xl */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1); /* shadow-md */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex; /* Ensures content fills the height */
    border: 1px solid var(--color-border);
}

.trip-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1); /* shadow-lg */
}

.trip-card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.trip-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 10px;
}

.trip-facility-name {
    font-size: 1.25rem; /* text-xl */
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-text-main);
    transition: color 0.2s;
}

.trip-facility-name:hover {
    color: var(--color-primary);
}

.trip-feature-text {
    color: #6b7280; /* Gray-500 */
    font-size: 0.95rem;
    margin-top: 5px;
    margin-bottom: 15px;
    flex-grow: 1; /* Pushes the footer down */
}

.trip-footer {
    padding-top: 15px;
    border-top: 1px dashed var(--color-border);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.trip-footer-with-btn {
    flex-direction: column;
    align-items: stretch;
}

.trip-tags-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

/*
================================================
7. Tags & Badges
================================================
*/
.trip-type-tag {
    font-size: 0.75rem; /* text-xs */
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px; /* rounded-full */
    white-space: nowrap;
    align-self: flex-start;
}

.trip-tag-primary {
    background-color: #eff6ff; /* Blue-50 */
    color: #1e40af; /* Blue-800 */
    border: 1px solid #93c5fd; /* Blue-300 */
}

.trip-pref-tag {
    font-size: 0.8rem;
    font-weight: 500;
    color: #4b5563; /* Gray-600 */
}
 
.trip-date-text {
    font-size: 0.8rem;
    color: #9ca3af; /* Gray-400 */
    margin-left: auto;
}

.trip-status-tag {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}

/* Status colors */
.trip-tag-success {
    background-color: var(--color-success);
    color: white;
}
.trip-tag-warning {
    background-color: var(--color-warning);
    color: white;
}
.trip-tag-danger {
    background-color: var(--color-danger);
    color: white;
}
.trip-tag-dark {
    background-color: var(--color-dark);
    color: white;
}
.trip-tag-secondary {
    background-color: #f3f4f6; /* Gray-100 */
    color: var(--color-text-main);
    padding: 4px 8px;
    border-radius: 6px;
}

/*
================================================
8. Status Card Specific Overrides
================================================
*/

/* PENDING Card (Warning State) */
.trip-card-pending {
    border-left: 5px solid var(--color-warning);
}

/* PUBLISHED Card (Success State) */
.trip-card-published {
    border-left: 5px solid var(--color-success);
    transition: all 0.3s;
}

/* CLOSED Card (Danger State - Faded) */
.trip-card-closed {
    border-left: 5px solid var(--color-danger);
    opacity: 0.7;
    /* Make text links gray */
    pointer-events: none; /* Disable click on whole card for better UX */
}
.trip-card-closed a {
    color: #9ca3af; /* Gray-400 */
}
.trip-card-closed:hover {
    transform: none;
    box-shadow: none;
    opacity: 0.8;
}

/* NO OFFICIAL Card (Dark State - Emphasis on alternative link) */
.trip-card-no-official {
    border-left: 5px solid var(--color-dark);
}

/*
================================================
9. Buttons
================================================
*/
.trip-read-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 15px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
    text-align: center;
    width: 100%;
    margin-top: 10px;
}
.trip-read-btn i {
    margin-left: 8px;
}

.trip-btn-success {
    background-color: var(--color-success);
    color: white;
}
.trip-btn-success:hover {
    background-color: #047857; /* Darker Green */
    color: white;
    text-decoration: none;
}

/*
================================================
10. Dividers & Related Links
================================================
*/
.trip-divider {
    height: 1px;
    background-color: var(--color-border);
    margin: 40px 0;
    clear: both;
}

.trip-related-links-section {
    padding: 20px;
    background-color: var(--color-secondary-bg);
    border-radius: 12px;
    margin-top: 40px;
    border: 1px solid var(--color-border);
}

.trip-related-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-main);
    margin-bottom: 20px;
    border-bottom: 2px dashed var(--color-border);
    padding-bottom: 10px;
}
.trip-related-title i {
    color: var(--color-primary);
    margin-right: 8px;
}

.trip-link-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.trip-list-link {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: 500;
    background-color: white;
    border: 1px solid var(--color-border);
    transition: background-color 0.2s, box-shadow 0.2s;
}

.trip-list-link i {
    margin-right: 10px;
}

.trip-list-link:hover {
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.trip-link-danger {
    color: var(--color-danger);
}
.trip-link-info {
    color: #0ea5e9; /* Sky-500 */
}
.trip-link-danger:hover { color: #b91c1c; }
.trip-link-info:hover { color: #0284c7; }

