/*
Theme Name: My Original Theme
Theme URI: 
Author: awaino design
Description: たんぽぽのおうち - オリジナルのWordPressテーマです。
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: my-original-theme
*/

/* --- 0. ベース設定 --- */
:root {
    /* たんぽぽのイメージパレット */
    --primary-yellow: #f0d35b; /* たんぽぽ色 */
    --soft-yellow: #fdfcf5;    /* 背景の生成り色 */
    --text-brown: #595045;     /* 土のような焦げ茶 */
    --accent-green: #8da399;   /* 葉っぱの緑 */
    --white: #ffffff;
    
    /* 間（あわい）の設定 */
    --spacing-section: 100px;
    --container-width: 1100px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Zen Old Mincho', serif; /* 信頼と品格 */
    background-color: var(--soft-yellow);
    color: var(--text-brown);
    line-height: 2.0;
    letter-spacing: 0.05em;
}

h1, h2, h3 {
    font-weight: 600;
}

/* 丸ゴシックで優しさを（本文やボタン） */
.maru {
    font-family: 'Zen Maru Gothic', sans-serif;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- 1. ヘッダー（ナビゲーション） --- */
header {
    background-color: rgba(253, 252, 245, 0.95);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(89, 80, 69, 0.05);
}

.header-container {
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo {
    font-size: 1.4rem;
    color: var(--text-brown);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo span {
    font-size: 0.8rem;
    background: var(--primary-yellow);
    padding: 2px 8px;
    border-radius: 10px;
    color: #fff;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav li a {
    font-size: 0.95rem;
    font-family: 'Zen Maru Gothic', sans-serif;
    position: relative;
}

nav li a::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: var(--primary-yellow);
    transition: width 0.3s;
}

nav li a:hover::after {
    width: 100%;
}

.mobile-menu { display: none; }

/* --- 2. メインビジュアル（第2の実家） --- */
.hero {
    margin-top: 60px;
    height: 85vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, rgba(240,211,91,0.1) 100%);
    overflow: hidden;
}

.hero-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    z-index: -1;
    background: url('images/hero-bg.JPG') center/cover;
}

.hero-content {
    background: rgba(255, 255, 255, 0.85);
    padding: 3rem 4rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(89, 80, 69, 0.05);
    max-width: 600px;
}

.hero-copy-vertical {
    writing-mode: vertical-rl;
    font-size: 2.4rem;
    line-height: 1.8;
    height: 300px;
    margin: 0 auto;
    letter-spacing: 0.2em;
    color: var(--text-brown);
}

.hero-sub {
    margin-top: 2rem;
    font-family: 'Zen Maru Gothic', sans-serif;
    font-size: 1rem;
    color: var(--accent-green);
}

/* --- 3. コンセプト（パパ・ママへの手紙） --- */
.section {
    padding: var(--spacing-section) 20px;
    max-width: var(--container-width);
    margin: 0 auto;
}

.message-box {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: 3rem;
    color: var(--text-brown);
    display: inline-block;
    border-bottom: 3px solid var(--primary-yellow);
    padding-bottom: 10px;
}

.highlight {
    background: linear-gradient(transparent 60%, var(--primary-yellow) 60%);
    display: inline-block;
}

/* --- 4. 3つの柱（絵本・少人数・パパママの自由） --- */
.features {
    background-color: var(--white);
    border-radius: 20px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.feature-card {
    text-align: center;
}

.feature-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    background-color: #eee;
}

.feature-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--accent-green);
}

/* --- 5. ブログ（日々の風景） --- */
.blog-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.blog-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    transition: transform 0.3s;
}

.blog-card:hover {
    transform: translateY(-5px);
}

.blog-img {
    height: 180px;
    background-color: #ddd;
    overflow: hidden;
}

.blog-img a {
    display: block;
    width: 100%;
    height: 100%;
}

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

.blog-content {
    padding: 1.5rem;
}

.blog-date {
    font-size: 0.8rem;
    color: #999;
}

.blog-title {
    font-size: 1rem;
    margin-top: 0.5rem;
    font-weight: bold;
}

/* --- 6. CTA（LINE予約・ご利用案内） --- */
.cta-section {
    background-color: #fdf6d5;
    text-align: center;
    padding: 80px 20px;
}

/* --- 茶色ボタン（通常リンク用） --- */
.btn-brown {
    display: inline-block;
    background-color: var(--text-brown); /* 焦げ茶色（#595045） */
    color: var(--white);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: bold;
    /* ↓ここがポイント！ 焦げ茶色のRGB値(89, 80, 69)に30%の透明度をかけた同系色の影 */
    box-shadow: 0 4px 15px rgba(89, 80, 69, 0.3);
    font-family: 'Zen Maru Gothic', sans-serif;
    transition: all 0.3s;
}

.btn-brown:hover {
    background-color: #463f36; /* ホバー時は少しだけ暗くする */
    transform: scale(1.05);
}

.btn-line {
    display: inline-block;
    background-color: #06C755;
    color: white;
    padding: 1rem 3rem;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: bold;
    margin-top: 2rem;
    box-shadow: 0 4px 15px rgba(6, 199, 85, 0.3);
    font-family: 'Zen Maru Gothic', sans-serif;
}

.btn-line:hover {
    background-color: #05b54d;
    transform: scale(1.05);
}

/* --- フッター --- */
footer {
    background-color: var(--text-brown);
    color: var(--white);
    padding: 3rem 0;
    text-align: center;
    font-size: 0.9rem;
}

.footer-nav {
    margin-bottom: 2rem;
}

.footer-nav a {
    margin: 0 1rem;
    color: #ddd;
}

/* --- Instagramボタン（グラデーションと優しい影） --- */
.btn-instagram {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px; /* アイコンと文字の隙間 */
    /* インスタ風のグラデーション（サイトに合わせて少しマイルドな色調に） */
    background: linear-gradient(45deg, #FFB13B 0%, #FF5C5C 50%, #C32B74 100%);
    color: var(--white);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(255, 92, 92, 0.3); /* ピンク系の影 */
    font-family: 'Zen Maru Gothic', sans-serif;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-instagram:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

/* フッター用の小さなインスタボタン */
.btn-instagram-small {
    padding: 0.5rem 1.2rem;
    font-size: 0.85rem;
}

/* ===================================================
   7. 固定ページ（当園について・ご利用案内等）の調和設定
=================================================== */

/* 全体の間（あわい）とフォント */
.page-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 0;
    color: var(--text-brown);
}

/* 段落（Pタグ）の呼吸を整える */
.page-content p {
    font-family: 'Zen Maru Gothic', sans-serif; /* 親しみやすさ */
    font-size: 1.05rem;
    line-height: 2.2;
    letter-spacing: 0.05em;
    margin-bottom: 2.5rem;
}

/* 見出し（H2）の装飾：たんぽぽのアクセント */
.page-content h2 {
    font-family: 'Zen Old Mincho', serif;
    font-size: 1.8rem;
    text-align: center;
    margin-top: 5rem;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 15px;
}

.page-content h2::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: var(--primary-yellow);
    border-radius: 2px;
}

/* 見出し（H3）の装飾：木漏れ日のような控えめな主張 */
.page-content h3 {
    font-family: 'Zen Old Mincho', serif;
    font-size: 1.4rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    color: var(--accent-green);
}

/* --- メディアとテキストブロック（画像＋文字）の調整 --- */
.wp-block-media-text {
    margin-bottom: 5rem !important; /* ブロック同士の間隔を大きく */
    gap: 40px; /* 写真と文字の間のあわい */
}

/* ブロック内の写真を少し角丸にして優しさを出す */
.wp-block-media-text figure img {
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(89, 80, 69, 0.05);
}

/* --- リスト（箇条書き・番号付き）の余白と呼吸を整える --- */
.page-content ul,
.page-content ol {
    padding-left: 1.5em; /* 全角1.5文字分のインデント（間） */
    margin-bottom: 2.5rem; /* 段落と同じ下余白 */
}

/* リストの項目同士がくっつきすぎないように隙間を空ける */
.page-content li {
    margin-bottom: 0.5rem;
    font-family: 'Zen Maru Gothic', sans-serif;
}

/* --- 単独の画像ブロック（写真のみ）の装飾 --- */
.page-content .wp-block-image img {
    border-radius: 12px; /* 角を丸くする */
    box-shadow: 0 4px 15px rgba(89, 80, 69, 0.05); /* 優しい影をつける */
    margin-bottom: 2rem; /* 写真の下に少し余白を作る */
}

/* ===================================================
   コース案内（カード型レイアウト）の装飾
=================================================== */

/* カードのベーススタイル */
.course-card {
    background-color: var(--white);
    border: 3px solid var(--primary-yellow); /* たんぽぽ色の枠線 */
    border-radius: 20px;
    padding: 2rem 1.5rem;
    height: 100%; /* 左右のカードの高さを揃える */
    box-shadow: 0 8px 20px rgba(89, 80, 69, 0.05);
    transition: transform 0.3s;
}

/* コースB用の色違い（アクセントグリーン） */
.course-card.type-b {
    border-color: var(--accent-green);
}

/* カードに少し浮遊感を持たせる */
.course-card:hover {
    transform: translateY(-5px);
}

/* カード内の見出し（H3）の調整 */
.course-card h3 {
    text-align: center;
    margin-top: 0 !important;
    margin-bottom: 1.5rem !important;
    font-size: 1.3rem;
    border-bottom: 2px dashed #eee;
    padding-bottom: 15px;
}

/* スマホ表示時の余白調整 */
@media (max-width: 768px) {
    .course-card {
        margin-bottom: 20px;
    }
}

/* ===================================================
   ご利用の流れ（タイムライン・ステップ）の装飾
=================================================== */

/* クラス名「step-list」を付けた番号付きリスト(ol)だけをタイムライン化する */
ol.step-list {
    list-style: none; /* 元の数字を消す */
    padding-left: 0;
    margin-top: 2rem;
    counter-reset: step-counter; /* オリジナルの数字カウンターを準備 */
}

ol.step-list li {
    position: relative;
    padding-left: 50px; /* 丸と線の分のスペースを空ける */
    padding-bottom: 30px; /* 次のステップまでの間隔（縦線の長さ） */
    margin-bottom: 0;
}

/* 縦のライン（たんぽぽ色）を引く */
ol.step-list li::before {
    content: '';
    position: absolute;
    left: 17px; /* 丸の中心に合わせる */
    top: 36px; /* 丸の下から線をスタート */
    bottom: 0;
    width: 2px;
    background-color: var(--primary-yellow);
}

/* 最後の項目の縦線は不要なので消す */
ol.step-list li:last-child::before {
    display: none;
}

/* 丸い数字の部分を作る */
ol.step-list li::after {
    counter-increment: step-counter; /* カウンターを1つ進める */
    content: counter(step-counter); /* 進めた数字を表示 */
    position: absolute;
    left: 0;
    top: 0;
    width: 36px;
    height: 36px;
    background-color: var(--primary-yellow);
    color: var(--text-brown);
    border-radius: 50%; /* 完全な丸にする */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(89, 80, 69, 0.1); /* 少し浮かせる */
}

/* ===================================================
   8. レスポンシブ（スマホ対応）＆ ハンバーガーメニュー
=================================================== */

/* ハンバーガーボタンの基本スタイル（PCでは非表示） */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 20px;
    position: relative;
    z-index: 1000;
}

.hamburger span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--text-brown);
    transition: all 0.3s ease;
}

.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger span:nth-child(3) { bottom: 0; }

/* ハンバーガーが「×」になるアニメーション */
.hamburger.active span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}

/* ===================================================
   ブログ一覧のページネーション（ページ送り）
=================================================== */
.pagination {
    text-align: center;
    margin-top: 5rem;
    font-family: 'Zen Maru Gothic', sans-serif;
}

.pagination .page-numbers {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0 5px;
    background-color: var(--white);
    color: var(--text-brown);
    border-radius: 8px;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(89, 80, 69, 0.05);
    transition: all 0.3s;
}

/* 現在いるページ番号の色 */
.pagination .current {
    background-color: var(--primary-yellow); /* たんぽぽ色 */
    color: var(--text-brown);
    font-weight: bold;
}

/* ホバー時の動き */
.pagination a.page-numbers:hover {
    background-color: var(--primary-yellow);
    transform: translateY(-3px);
}

/* ===================================================
   9. 個別記事ページ（ブログ詳細）の装飾
=================================================== */

/* 白い便箋（コンテナ）の設定 */
.single-container {
    max-width: 800px; /* 固定ページより少し狭くして、文章を読みやすくする */
    margin: 0 auto;
    padding: 40px 50px;
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(89, 80, 69, 0.03); /* ほんのり優しい影 */
}

/* ヘッダー（タイトル周辺） */
.single-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px dashed #e0dcd5; /* 点線で区切る */
}

.single-meta {
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    font-family: 'Zen Maru Gothic', sans-serif;
    color: var(--accent-green);
}

/* カテゴリーのタグ風デザイン */
.single-category a {
    background-color: #fdf6d5; /* 薄いたんぽぽ色 */
    color: var(--text-brown);
    padding: 4px 12px;
    border-radius: 20px;
    margin-left: 10px;
    font-size: 0.8rem;
    display: inline-block;
}

.single-category a:hover {
    background-color: var(--primary-yellow);
}

.single-title {
    font-size: 1.8rem;
    line-height: 1.6;
    color: var(--text-brown);
}

/* アイキャッチ画像 */
.single-thumbnail {
    margin-bottom: 3rem;
    text-align: center;
}

.single-thumbnail img {
    border-radius: 8px;
    width: 100%;
    max-height: 500px;
    object-fit: cover;
}

/* --- 記事本文（WordPressエディタからの出力） --- */
.single-content {
    color: var(--text-brown);
}

.single-content p {
    font-family: 'Zen Maru Gothic', sans-serif;
    font-size: 1.05rem;
    line-height: 2.2;
    margin-bottom: 2rem;
}

/* ブログ内の見出しH2（左にたんぽぽ色の縦線） */
.single-content h2 {
    font-size: 1.5rem;
    margin-top: 4rem;
    margin-bottom: 2rem;
    padding-left: 15px;
    border-left: 5px solid var(--primary-yellow);
    border-bottom: none; /* 固定ページの下線を消す */
}

/* ブログ内の見出しH3（緑色の点線アンダーライン） */
.single-content h3 {
    font-size: 1.2rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    color: var(--accent-green);
    border-bottom: 1px dashed var(--accent-green);
    padding-bottom: 8px;
}

/* ブログ内に挿入した画像 */
.single-content img {
    border-radius: 8px;
    margin: 2rem 0;
    height: auto;
}

/* --- 前後の記事へのリンク --- */
.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
    font-family: 'Zen Maru Gothic', sans-serif;
}

.post-navigation a {
    color: var(--accent-green);
    font-weight: bold;
}

.post-navigation a:hover {
    color: var(--text-brown);
}

/* ===================================================
   10. ブログの検索・絞り込みエリア
=================================================== */
.blog-filter {
    max-width: 800px;
    margin: 0 auto 4rem auto;
    background-color: var(--white);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(89, 80, 69, 0.05);
    font-family: 'Zen Maru Gothic', sans-serif;
}

/* 検索窓のデザイン */
.filter-search {
    display: flex;
    margin-bottom: 20px;
    gap: 10px;
}

.filter-search input[type="text"] {
    flex-grow: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 50px;
    font-size: 1rem;
    color: var(--text-brown);
    outline: none;
    transition: border-color 0.3s;
}

.filter-search input[type="text"]:focus {
    border-color: var(--primary-yellow);
}

.filter-search button {
    background-color: var(--primary-yellow);
    color: var(--text-brown);
    border: none;
    padding: 0 25px;
    border-radius: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s;
}

.filter-search button:hover {
    opacity: 0.8;
}

/* カテゴリと年別の並び */
.filter-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    border-top: 1px dashed #eee;
    padding-top: 15px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-label {
    font-size: 0.9rem;
    color: #888;
}

/* カテゴリのタグ風デザイン */
.filter-category-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    gap: 10px;
    padding: 0;
    margin: 0;
}

.filter-category-list li a {
    background-color: #fdf6d5; /* 薄いたんぽぽ色 */
    color: var(--text-brown);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    text-decoration: none;
}

.filter-category-list li a:hover,
.filter-category-list li.current-cat a {
    background-color: var(--primary-yellow);
    font-weight: bold;
}

/* 年別プルダウンのデザイン */
.filter-year-select {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    color: var(--text-brown);
    font-family: 'Zen Maru Gothic', sans-serif;
    outline: none;
    cursor: pointer;
}

@media (max-width: 768px) {
    /* トップページ用 */
    .hero-copy-vertical {
        font-size: 1.8rem;
        height: 250px;
    }
    .features-grid {
        grid-template-columns: 1fr;
    }
    .header-container { justify-content: space-between; }
    .hero-content { padding: 2rem; width: 90%; }
    
    /* ハンバーガーメニューの表示 */
    .hamburger {
        display: block; 
    }
    
    /* スマホ時のナビゲーション（右からスライドイン） */
    nav#nav-menu {
        position: fixed;
        top: 0;
        right: -100%; /* 初期状態は画面の右外に隠す */
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: var(--soft-yellow); /* 生成り色 */
        box-shadow: -2px 0 10px rgba(89, 80, 69, 0.1);
        transition: right 0.3s ease;
        padding-top: 80px; /* ヘッダーの高さ分下げる */
        z-index: 999;
    }
    
    /* メニューが開いた時の状態 */
    nav#nav-menu.active {
        right: 0;
    }
    
    /* メニュー内のリストを縦並びに */
    nav#nav-menu ul {
        flex-direction: column;
        align-items: center;
        gap: 2.5rem;
    }
    
    /* 固定ページ用 */
    .page-content h2 {
        font-size: 1.5rem;
        margin-top: 4rem;
    }
    /* 固定ページ用：メディアとテキストのスマホ縦並び順序を強制する */
    .wp-block-media-text {
        display: flex !important;
        flex-direction: column !important; /* 縦並びにする */
        margin-bottom: 3rem !important;
        gap: 20px !important; /* 写真とテキストの間の余白 */
    }
    
    /* 必ず「画像」を1番目（上）に配置する魔法 */
    .wp-block-media-text figure {
        order: 1 !important; 
        margin-bottom: 0 !important;
        width: 100% !important; /* スマホでは横幅いっぱいに */
    }
    
    /* 必ず「テキスト」を2番目（下）に配置する魔法 */
    .wp-block-media-text .wp-block-media-text__content {
        order: 2 !important;
        margin-top: 0 !important;
    }
    
    /* 個別記事用のスマホ調整 */
    .single-container {
        padding: 30px 20px; /* スマホでは左右の余白を減らす */
    }
    .single-title {
        font-size: 1.4rem;
    }
    .post-navigation {
        flex-direction: column; /* スマホでは前後のリンクを縦並びに */
        gap: 15px;
        text-align: center;
    }
	
	/* 検索エリアのスマホ調整 */
    .filter-options {
        flex-direction: column;
        align-items: flex-start;
    }
    .filter-search {
        flex-direction: column;
    }
    .filter-search button {
        padding: 12px;
    }
}