/*
Theme Name: 狐弥夢クリエイティブ
Theme URI: https://koyume-creative.jp
Author: 狐弥夢クリエイティブ
Author URI: https://koyume-creative.jp
Description: 神社仏閣・狐・スピリチュアル表現のスペシャリスト 狐弥夢クリエイティブの公式テーマ
Version: 2.0.7
License: GPL v2 or later
Text Domain: koyume-creative
Tags: custom-background, custom-colors, custom-header, custom-logo, custom-menu, featured-images, footer-widgets, full-width-template, one-column, responsive-layout, sticky-post, theme-options, translation-ready, accessibility-ready
Requires PHP: 7.4
Requires at least: 5.0
*/

/* ===================================
   和風カラーパレット
=================================== */
:root {
    --fox-red: #E73C28;
    --fox-orange: #FF8C42;
    --fox-gold: #FFB366;
    --fox-light: #FFF5F0;
    --fox-cream: #FFE8DC;
    --white: #FFFFFF;
    --black: #1A1A1A;
    --gray: #666666;
    --light-gray: #E5E5E5;
}

/* ===================================
   基本設定
=================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Yu Mincho', 'Hiragino Mincho ProN', 'MS PMincho', serif;
    background: linear-gradient(135deg, var(--fox-light) 0%, var(--fox-cream) 100%);
    color: var(--black);
    letter-spacing: 0.05em;
    line-height: 1.8;
    min-height: 100vh;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

/* プリローダー */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--fox-light);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    transition: opacity 0.5s ease;
}

.preloader-content {
    text-align: center;
}

.preloader-fox {
    font-size: 4rem;
    animation: bounce 1s infinite;
}

.preloader-text {
    margin-top: 20px;
    font-size: 1.2rem;
    color: var(--fox-red);
    letter-spacing: 0.1em;
}

/* スクロールバーカスタマイズ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--fox-light);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, var(--fox-red), var(--fox-orange));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, var(--fox-orange), var(--fox-red));
}

/* ===================================
   ヘッダー
=================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    padding: 15px 30px;
    transition: all 0.3s ease;
}
.site-content { margin-top: var(--header-h, 70px); }

/* 左メニューとフッターの連続性確保（フロント縦ページ） */
body.front-page-vertical .site-footer { margin-top: 0; }


/* ヘッダー縮小を無効化 */
.site-header.scrolled { padding: 15px 30px; }

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--fox-red);
}

.site-logo .fox-icon {
    font-size: 2rem;
    margin-right: 10px;
    animation: bounce 2s infinite;
}

.site-title {
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 0.1em;
}

/* ===================================
   ナビゲーション
=================================== */
.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

.main-navigation a {
    color: var(--black);
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
    font-size: 0.95rem;
    letter-spacing: 0.08em;
}

.main-navigation a:hover {
    color: var(--fox-orange);
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--fox-orange);
    transition: width 0.3s ease;
}

.main-navigation a:hover::after {
    width: 100%;
}

/* モバイルメニュー */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--black);
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* ===================================
   フッター
=================================== */
.site-footer {
    background: linear-gradient(135deg, var(--fox-red), var(--fox-orange));
    color: var(--white);
    padding: 20px 0 12px; /* さらに細く */
    margin-top: 40px;
    position: relative;
    z-index: 1000; /* 左メニューより前面に */
    font-size: 0.9rem; /* 文字小さめ */
}

/* 読みやすさ（全体） */
.slide-content p {
	line-height: 1.95;
	margin: 0.6em 0;
}
.slide-content ul {
	margin: 0.8em 0 1em;
}
.slide-content li {
	line-height: 1.9;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px; /* 詰める */
    margin-bottom: 20px; /* 詰める */
}

.footer-section h3 {
    margin-bottom: 12px;
    font-size: 1rem; /* 見出しも小さめ */
    letter-spacing: 0.08em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 6px;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 10px;
}

.footer-section a {
    color: var(--white);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.footer-section a:hover {
    opacity: 0.8;
}

.footer-bottom {
    text-align: center;
    padding-top: 16px; /* 詰める */
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

/* ===================================
   アニメーション
=================================== */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-180deg);
    }
    to {
        opacity: 1;
        transform: rotate(0);
    }
}

.animate-bounce {
    animation: bounce 1.5s ease infinite;
}

.animate-slide {
    animation: slideInLeft 1s ease;
}

.animate-fade {
    animation: fadeInUp 1s ease;
}

.animate-rotate {
    animation: rotateIn 0.8s ease;
}

/* ===================================
   ユーティリティクラス
=================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
}

.section-title {
    font-size: 2.5rem;
    color: var(--fox-red);
    text-align: center;
    margin-bottom: 50px;
    letter-spacing: 0.15em;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--fox-orange), var(--fox-red));
}

.btn-primary {
    display: inline-block;
    padding: 15px 40px;
    background: linear-gradient(135deg, var(--fox-red), var(--fox-orange));
    color: var(--white);
    text-decoration: none;
    border-radius: 30px;
    transition: all 0.3s ease;
    font-weight: bold;
    letter-spacing: 0.1em;
    box-shadow: 0 5px 15px rgba(231, 60, 40, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(231, 60, 40, 0.4);
}

.btn-secondary {
    display: inline-block;
    padding: 15px 40px;
    background: var(--white);
    color: var(--fox-orange);
    text-decoration: none;
    border-radius: 30px;
    border: 2px solid var(--fox-orange);
    transition: all 0.3s ease;
    font-weight: bold;
    letter-spacing: 0.1em;
}

.btn-secondary:hover {
    background: var(--fox-orange);
    color: var(--white);
}

/* ===================================
   レスポンシブ対応
=================================== */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .main-navigation {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(255, 255, 255, 0.98);
        transition: left 0.3s ease;
    }
    
    .main-navigation.active {
        left: 0;
    }
    
    .main-navigation ul {
        flex-direction: column;
        padding: 30px;
        gap: 20px;
    }
    
    .main-navigation a {
        font-size: 1.2rem;
        padding: 10px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .site-title {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
}

/* ===================================
   スマホ最適化（横スクロール根絶/全幅徹底/フェード遷移）
=================================== */
html, body { overflow-x: hidden; }
img, video, svg, canvas, iframe { max-width: 100%; height: auto; }
pre, code, table { max-width: 100vw; }
pre, code, table { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* フェード遷移 */
body.entering { animation: fadeIn .3s ease both; }
body.leaving  { animation: fadeOut .2s ease both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }

/* モバイルでハンバーガー非表示（TOCを代替ナビに） */
@media (max-width: 767px) {
    .menu-toggle { display: none !important; }
}

/* TOCオープンボタン（モバイル） */
.toc-open {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 8px;
}
@media (max-width: 767px) {
    .toc-open { display: inline-block; }
}

/* 検索/Top FABの表示状態（位置はJS/CSSで固定、表示はフェード） */
.fab--visible,
.back-to-top.show { opacity: 1 !important; pointer-events: auto !important; }
