/*
Theme Name: Lanlannu Original
Theme URI: https://example.com/
Author: j b
Author URI: https://example.com/
Description: lanlannu----.zip のデザインをベースにした高速・SEO（2026水準）対応のオリジナルWordPressテーマ。
Version: 1.1.6
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: lanlannu-original
Tags: custom-colors, custom-menu, featured-images, two-columns, responsive-layout
*/

/* --- 1. ベースリセット --- */
* { box-sizing: border-box; }
:root {
    --primary-color: #2E8B57;
    --accent-color: #FF8C00;
    --bg-color: #f9f9f9;
    --text-color: #333;
    --white: #ffffff;
    /*
     * Used for body offset when the header is fixed.
     * Updated at runtime by assets/js/header-height.js for accurate, responsive sizing.
     */
    --header-height: 70px;
}
body {
    font-family: "Helvetica Neue", Arial, sans-serif;
    margin: 0; padding: 0;
    background-color: var(--bg-color); color: var(--text-color);
    line-height: 1.6;
    padding-top: var(--header-height);
}
img { max-width: 100%; height: auto; vertical-align: bottom; }
a { text-decoration: none; color: inherit; transition: 0.3s; }
a:hover { opacity: 0.8; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }

/* --- 2. ヘッダー & ナビ --- */
header {
    background-color: var(--white);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: fixed; top: 0; left: 0; width: 100%;
    /* height is auto to allow subtitle/logo wrapping; body offset is handled via --header-height */
    height: auto;
    padding: 12px 0;
    z-index: 1000;
}

/* 管理バー表示時（ログイン中）の重なり防止 */
body.admin-bar header{ top:32px; }
@media screen and (max-width:782px){ body.admin-bar header{ top:46px; } }
.header-inner { display: flex; justify-content: space-between; align-items: center; }
.site-branding{display:flex;flex-direction:column;justify-content:center;line-height:1.15;}
.site-subtitle{font-size:.75rem;color:#666;margin-top:2px;}
.site-logo { font-size: 1.5rem; font-weight: bold; color: var(--primary-color); z-index: 1002; }
.site-logo span { color: var(--accent-color); }

.main-nav ul { display: flex; list-style: none; padding: 0; margin: 0; gap: 20px; }
.main-nav a { font-weight: bold; font-size: 0.95rem; }

/* スマホ用ハンバーガー */
.hamburger-btn { display: none; }

@media (max-width: 768px) {
    .hamburger-btn {
        display: block; background: none; border: none; cursor: pointer;
        width: 30px; height: 24px; position: relative; z-index: 1002; padding: 0;
    }
    .hamburger-btn span {
        display: block; width: 100%; height: 3px; background-color: var(--primary-color);
        position: absolute; left: 0; transition: 0.4s; border-radius: 3px;
    }
    .hamburger-btn span:nth-child(1) { top: 0; }
    .hamburger-btn span:nth-child(2) { top: 10px; }
    .hamburger-btn span:nth-child(3) { top: 20px; }
    
    .hamburger-btn.active span:nth-child(1) { transform: translateY(10px) rotate(45deg); }
    .hamburger-btn.active span:nth-child(2) { opacity: 0; }
    .hamburger-btn.active span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

    .main-nav {
        position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
        background: rgba(255,255,255,0.98); transform: translateY(-100%); transition: 0.4s;
        display: flex; align-items: center; justify-content: center; z-index: 1001;
    }
    .main-nav.active { transform: translateY(0); }
    .main-nav ul { flex-direction: column; text-align: center; gap: 30px; }
    .main-nav a { font-size: 1.2rem; }
}

/* --- 3. トップページ専用スタイル --- */
/* ヒーローセクション */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), #66CDAA);
    color: var(--white); padding: 40px 0; text-align: center; margin-bottom: 30px;
}
.hero-section h2 { margin: 0 0 10px 0; }

/* 2カラムレイアウト (メイン + サイドバー) */
.content-grid {
    display: grid; grid-template-columns: 1fr; gap: 30px; margin-bottom: 50px;
}
@media (min-width: 900px) {
    .content-grid { grid-template-columns: 1fr 300px; }
}

/* 記事カード */
.section-title {
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 10px; margin-bottom: 20px; font-size: 1.25rem;
}
.article-list { display: grid; gap: 20px; }
.article-card {
    background: var(--white); border-radius: 8px; overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); display: flex; flex-direction: column;
}
@media (min-width: 600px) {
    .article-card { flex-direction: row; height: 140px; }
}
.card-img {
    background-color: #ddd; width: 100%; height: 150px; object-fit: cover;
}
@media (min-width: 600px) {
    .card-img { width: 200px; height: 100%; }
}
.card-content {
    padding: 15px; flex: 1; display: flex; flex-direction: column; justify-content: space-between;
}
.card-meta { font-size: 0.8rem; color: #888; margin-bottom: 5px; }
.tag {
    background-color: var(--primary-color); color: white;
    padding: 2px 6px; border-radius: 4px; font-size: 0.7rem; margin-right: 8px;
}
.tag { display: inline-block; text-decoration: none; }
a.tag, a.tag:visited { color: #fff; text-decoration: none; }
a.tag:hover { opacity: 0.92; }
.tag.close { background-color: #666; }
.tag.event { background-color: var(--accent-color); }
.card-title { font-size: 1.1rem; font-weight: bold; margin: 0; line-height: 1.4; }
.card-area { font-size: 0.8rem; color: var(--primary-color); margin-top: auto; padding-top: 10px; font-weight: bold; }
.card-area a { color: var(--primary-color); text-decoration: none; }
.card-area a:hover { text-decoration: underline; }
.card-area .is-static { opacity: 0.9; }

/* サイドバー */
.sidebar-widget {
    background: var(--white); padding: 20px; border-radius: 8px;
    margin-bottom: 20px; box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.ranking-list { list-style: none; padding: 0; counter-reset: rank; }
.ranking-list li {
    position: relative; padding-left: 30px; margin-bottom: 10px;
    border-bottom: 1px dashed #eee; padding-bottom: 10px; font-size: 0.9rem;
}
.ranking-list li::before {
    counter-increment: rank; content: counter(rank);
    position: absolute; left: 0; top: 0;
    background: var(--accent-color); color: white;
    width: 20px; height: 20px; text-align: center;
    line-height: 20px; border-radius: 50%; font-size: 0.7rem; font-weight: bold;
}

/* --- 4. 詳細ページ（single.html）用パーツ --- */
/* Layout control (Customizer default + per-post override).
 * one: 800px centered
 * two: main + right sidebar
 */
.single-layout-one .container { max-width: 800px; }
.single-layout-two .container { max-width: 1200px; }

.single-layout-wrap { display: block; }
.single-layout-two .single-layout-wrap {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 30px;
	align-items: start;
}
.single-layout-two .single-sidebar > aside { position: sticky; top: calc(var(--header-height) + 20px); }

@media (max-width: 960px) {
	.single-layout-two .single-layout-wrap { grid-template-columns: 1fr; }
	.single-layout-two .single-sidebar { margin-top: 24px; }
	.single-layout-two .single-sidebar > aside { position: static; top: auto; }
}
.article-header { text-align: center; padding: 30px 0; }
.article-title { font-size: 1.4rem; font-weight: bold; margin: 15px 0; }
.article-tag { background: var(--primary-color); color: white; padding: 4px 12px; border-radius: 20px; font-size: 0.8rem; }
.article-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 10px; }
.article-tag { display: inline-block; text-decoration: none; }
a.article-tag, a.article-tag:visited { color: #fff; text-decoration: none; }
a.article-tag:hover { opacity: 0.92; }
.article-tag.area { background: var(--accent-color); }
.article-tag.area.is-static { opacity: 0.95; }
.hero-image-container { width: 100%; margin-bottom: 30px; border-radius: 12px; overflow: hidden; }
.hero-image{ width:100%; height:auto; display:block; }
.summary-card {
    background: #fff; border: 2px solid var(--accent-color); border-radius: 12px;
    padding: 25px 20px 20px; margin: 30px 0; position: relative;
}
.summary-title {
    position: absolute; top: -14px; left: 20px; background: var(--accent-color);
    color: white; padding: 2px 15px; font-weight: bold; border-radius: 4px; font-size: 0.9rem;
}
.summary-list { margin: 0; padding-left: 20px; }
/* 雰囲気メーター */
.vibe-section { background: white; padding: 20px; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); margin: 30px 0; }
.vibe-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
@media (max-width: 600px) { .vibe-grid { grid-template-columns: 1fr; } }
.meter-bg { background: #eee; height: 10px; border-radius: 5px; margin-top: 5px; }
.meter-fill { height: 100%; background: var(--primary-color); border-radius: 5px; }
.meter-fill.high { background: var(--accent-color); }
/* らんらんコース */
.course-section {
    background: #fdf5e6; border: 2px dashed var(--accent-color);
    padding: 20px; border-radius: 12px; margin: 40px 0;
}
.course-timeline { border-left: 3px solid #ddd; margin-left: 10px; padding-left: 20px; margin-top: 15px; }
.course-step { position: relative; margin-bottom: 25px; }
.course-step::before {
    content: ''; position: absolute; left: -28px; top: 0; width: 12px; height: 12px;
    background: var(--accent-color); border-radius: 50%; border: 2px solid white;
}
.step-time { font-weight: bold; color: #888; font-size: 0.8rem; display: block; margin-bottom: 5px; }
.step-content { background: white; padding: 10px 15px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); font-size: 0.95rem; }
/* 店舗情報テーブル */
.shop-info-table { width: 100%; border-collapse: collapse; background: white; margin: 30px 0; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.shop-info-table th, .shop-info-table td { padding: 12px; border-bottom: 1px solid #eee; text-align: left; }
.shop-info-table th { background: #f5f5f5; width: 30%; font-size: 0.9rem; }

/* --- 5. フッター (共通) --- */
footer {
	background-color: #333; color: #fff;
	/* 中身が詰まって見えないよう余白を少し増やす */
	padding: 56px 0;
	text-align: center;
	margin-top: auto;
}
.footer-links a { margin: 0 10px; color: #ccc; font-size: 0.9rem; }
@media (max-width: 768px) { footer { padding-bottom: 100px; } }

/* --- 6. モバイル用固定アクションバー (詳細ページ用) --- */
.mobile-sticky-bar {
    position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
    width: 90%; max-width: 500px; background: white; box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    border-radius: 50px; border: 1px solid #eee; z-index: 9999;
    display: none; justify-content: space-between; padding: 0 10px; height: 60px; align-items: center;
}
@media (max-width: 768px) { .mobile-sticky-bar { display: flex; } }
.sticky-btn {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-decoration: none; color: #333; font-size: 0.7rem; height: 100%;
}
.sticky-btn svg { width: 24px; height: 24px; margin-bottom: 2px; fill: var(--primary-color); }
.sticky-btn.highlight { color: var(--accent-color); font-weight: bold; }
.sticky-btn.highlight svg { fill: var(--accent-color); }

/* --- 7. 本文（Gutenberg/クラシック共通）タイポグラフィ --- */
*, *::before, *::after { box-sizing: border-box; }

.entry-content {
    font-size: 1rem;
    line-height: 1.8;
}
.entry-content > * { margin-top: 0; margin-bottom: 1.15em; }
.entry-content p { margin: 0 0 1.15em 0; }
.entry-content a { color: var(--primary-color); text-decoration: underline; text-underline-offset: 0.15em; }
.entry-content a:hover { opacity: 0.85; }

.entry-content h2, .entry-content h3, .entry-content h4 {
    line-height: 1.35;
    margin: 1.6em 0 0.6em 0;
}
.entry-content h2 { font-size: 1.55rem; padding-bottom: 0.35em; border-bottom: 2px solid #eee; }
.entry-content h3 { font-size: 1.25rem; }
.entry-content h4 { font-size: 1.1rem; }

.entry-content ul, .entry-content ol { padding-left: 1.25em; }
.entry-content li { margin: 0.35em 0; }

.entry-content img, .entry-content figure { max-width: 100%; height: auto; }
.entry-content figure { margin: 1.2em 0; }
.entry-content figcaption { font-size: 0.85rem; color: #777; margin-top: 0.4em; }

.entry-content blockquote {
    margin: 1.4em 0;
    padding: 0.9em 1em;
    background: #f7f7f7;
    border-left: 4px solid var(--accent-color);
    border-radius: 8px;
}
.entry-content code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.95em;
    background: #f4f4f4;
    padding: 0.15em 0.35em;
    border-radius: 6px;
}
.entry-content pre {
    background: #111;
    color: #f5f5f5;
    padding: 14px 16px;
    border-radius: 10px;
    overflow: auto;
    line-height: 1.6;
}
.entry-content pre code { background: none; padding: 0; color: inherit; }

/* テーブルはスマホで横スクロールできるように */
.entry-content .wp-block-table { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { padding: 10px 12px; border-bottom: 1px solid #eee; text-align: left; }
.entry-content thead th { background: #f5f5f5; }
@media (max-width: 600px) {
    .entry-content table { display: block; overflow-x: auto; white-space: nowrap; }
}

/* 画像が本文幅いっぱいのときの見栄え */
.entry-content img { border-radius: 12px; }

/* 店舗情報テーブルもスマホでは横スクロール */
@media (max-width: 600px) {
  .shop-info-table { display: block; overflow-x: auto; white-space: nowrap; }
}


/* --- Pagination --- */
.pagination-wrap{margin-top:24px;}
.navigation.pagination{margin:0;}
.navigation.pagination .nav-links{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    justify-content:center;
    align-items:center;
}
.navigation.pagination .page-numbers{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:44px;
    height:44px;
    padding:0 14px;
    border-radius:999px;
    background:#fff;
    border:1px solid rgba(0,0,0,.08);
    box-shadow:0 4px 12px rgba(0,0,0,.06);
    color:inherit;
    text-decoration:none;
    font-weight:700;
    transition:transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease, border-color .15s ease;
}
.navigation.pagination .page-numbers.dots{
    min-width:auto;
    padding:0 6px;
    height:auto;
    border:none;
    box-shadow:none;
    background:transparent;
}
.navigation.pagination .page-numbers.current{
    border:none;
    color:#fff;
    background:linear-gradient(135deg,var(--primary-color),var(--accent-color));
    box-shadow:0 10px 25px rgba(0,0,0,.12);
}
.navigation.pagination a.page-numbers:hover{
    transform:translateY(-1px);
    box-shadow:0 10px 25px rgba(0,0,0,.12);
    border-color:rgba(0,0,0,.12);
}
@media (max-width:600px){
    .navigation.pagination .page-numbers{
        min-width:40px;
        height:40px;
        padding:0 12px;
    }
}



/* 関連記事 */
.related-posts{
    /* 記事本文やフッターと“詰まる”のを防ぐ */
    margin-top: 40px;
    margin-bottom: 72px;
}
.related-posts .section-title{ margin-top:0; }
.related-posts .article-list{ margin-top: 18px; }

