/*
Theme Name: Akirapan Theme
Description: ちいさなパン工房 あきらぱん 用テーマ
Version: 1.0
*/

:root {
    --primary-color: #5c3a21; /* こげ茶 (テキスト/タイトル) */
    --accent-color: #d97d54;  /* 暖かみのあるオレンジ */
    --bg-color: #fdfaf6;      /* 生成り・クリーム系背景 */
    --menu-bg: #e8a87c;       /* メニュー背景 (暖色) */
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body {
    margin: 0;
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    background-color: var(--bg-color);
    color: var(--primary-color);
}
a { text-decoration: none; color: inherit; }
.container { max-width: 1000px; margin: 0 auto; padding: 40px 20px; }

/* -----------------------------
   Header
----------------------------- */
.site-header {
    position: relative;
    background-size: cover;
    background-position: center;
    background-color: #f4e1d2; /* 写真未設定時のベース */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    /* デスクトップ用高さ設定。スマホでは自動調整 */
    height: var(--header-height-pc); 
}

/* ナビゲーション (PC用) */
.header-nav-wrap {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
}
.header-nav ul {
    list-style: none;
    margin: 0;
    padding: 10px 20px;
    background-color: var(--menu-bg);
    border-radius: 4px;
    display: flex;
    gap: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.header-nav a {
    color: #fff;
    font-weight: bold;
    padding: 5px 10px;
    transition: var(--transition);
    display: block;
}
/* 高級感のあるホバーアクション */
.header-nav a:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* タイトル周り */
.header-titles { z-index: 10; }
.site-title { font-size: 2.5rem; margin: 0; letter-spacing: 2px; }
.site-description { font-size: 1.2rem; margin-top: 10px; }

/* -----------------------------
   Index (Posts Grid)
----------------------------- */
.section-title { text-align: center; margin-bottom: 30px; font-size: 1.8rem; border-bottom: 2px solid var(--accent-color); display: inline-block; padding-bottom: 5px;}
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}
.post-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: var(--transition);
}
/* クリックできる感・高級感のある浮き上がり */
.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}
.post-thumb img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}
.post-info { padding: 20px; }
.post-title { margin: 0 0 10px; font-size: 1.2rem; }
.post-excerpt { font-size: 0.9rem; color: #666; line-height: 1.6; }

/* -----------------------------
   Buttons
----------------------------- */
.category-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 60px;
}
.sq-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
    border-radius: 8px;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.sq-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}
.btn-sweet { background-color: #f29c9c; } /* ピンク系 */
.btn-dessert { background-color: #e0b084; } /* キャラメル系 */
.btn-meal { background-color: #8caba1; } /* グリーン系 */

/* -----------------------------
   Sidebar & Footer
----------------------------- */
.site-sidebar {
    margin-top: 60px;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #eee;
}
.site-footer {
    background-color: var(--primary-color);
    color: #fff;
    text-align: center;
    padding: 20px;
    margin-top: 50px;
}

/* -----------------------------
   Responsive (Tablet & SP)
----------------------------- */
.hamburger { display: none; }

@media (max-width: 768px) {
    .site-header {
        height: auto;
        min-height: 250px;
        padding: 60px 20px;
    }
    .header-nav {
        position: fixed;
        top: 0; right: -100%;
        width: 250px; height: 100vh;
        background: rgba(232, 168, 124, 0.95);
        transition: var(--transition);
        padding-top: 80px;
    }
    .header-nav.is-open { right: 0; }
    .header-nav ul {
        flex-direction: column; background: transparent; box-shadow: none; gap: 0;
    }
    .header-nav li { border-bottom: 1px solid rgba(255,255,255,0.3); }
    .header-nav a { padding: 20px; text-align: center; }

    /* ハンバーガーアイコン */
    .hamburger {
        display: block;
        position: fixed; top: 20px; right: 20px;
        width: 40px; height: 40px;
        background: #fff; border-radius: 5px;
        border: none; cursor: pointer; z-index: 101;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }
    .hamburger span {
        display: block; position: absolute;
        width: 24px; height: 2px;
        background: var(--primary-color);
        left: 8px; transition: var(--transition);
    }
    .hamburger span:nth-child(1) { top: 11px; }
    .hamburger span:nth-child(2) { top: 19px; }
    .hamburger span:nth-child(3) { top: 27px; }

    /* アニメーション状態 */
    .hamburger.is-active span:nth-child(1) { top: 19px; transform: rotate(45deg); }
    .hamburger.is-active span:nth-child(2) { opacity: 0; }
    .hamburger.is-active span:nth-child(3) { top: 19px; transform: rotate(-45deg); }

    .category-buttons { grid-template-columns: 1fr; }
    .sq-btn { aspect-ratio: auto; padding: 40px 20px; }
}

/* リスト全体を横並びにする設定 */
ul.lcp-vertical {
    display: flex;
    flex-wrap: wrap; /* 画面端まできたら折り返す */
    gap: 20px; /* 記事ごとの縦横の余白 */
    padding: 0;
}

/* 記事1つあたりの設定 */
ul.lcp-vertical li {
    display: flex;
    flex-direction: column; /* 記事の中（画像とテキスト）は縦並びのまま */
    width: calc(33.333% - 14px); /* 3列にする場合の幅（gapの分を考慮して調整） */
    margin-bottom: 0; /* gapで余白を作るためリセット */
}

/* サムネイル画像の下に余白を作る */
.lcp-thumb {
    margin-bottom: 10px;
    max-width: 100%;
    height: auto;
}