/*
Theme Name: モダンWPテーマ
Theme URI: https://yourwebsite.com
Author: Your Name
Author URI: https://yourwebsite.com
Description: モダンなWordPressテーマ
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: theme-textdomain
*/

/* グローバル変数 */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --accent-color: #28a745;
    --text-color: #333333;
    --light-gray: #f8f9fa;
    --border-color: #dee2e6;
    
    --font-main: 'Noto Sans JP', sans-serif;
    --font-heading: 'Roboto', sans-serif;
    
    --container-width: 1200px;
    --spacing-unit: 8px;
}

/* 基本スタイル */
body {
    font-family: var(--font-main);
    color: var(--text-color);
    line-height: 1.6;
    background-color: #ffffff;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ヘッダー全体のスタイル */
.site-header {
    background-color: transparent;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: background-color 0.3s ease, padding 0.3s ease;
}

/* スクロール時のヘッダースタイル */
.site-header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    position: fixed;
    padding: 10px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* ヘッダー内コンテンツの配置 */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* サイトロゴ */
.site-logo {
    max-width: 150px;
}

.site-logo img {
    max-height: 50px;
    width: auto;
}

/* メインナビゲーション */
.main-navigation {
    display: flex;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    position: relative;
    margin-left: 30px;
}

.nav-menu a {
    color: #fff;
    font-weight: 500;
    font-size: 16px;
    text-decoration: none;
    padding: 10px 0;
    display: inline-block;
    position: relative;
    transition: color 0.3s ease;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* スクロール時のメニューリンク色 */
.site-header.scrolled .nav-menu a {
    color: #333;
    text-shadow: none;
}

/* メニューアイテムのホバーエフェクト */
.nav-menu a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-menu a:hover::after {
    width: 100%;
}

/* 現在のページのメニューアイテム */
.nav-menu .current-menu-item > a {
    color: var(--primary-color);
}

.nav-menu .current-menu-item > a::after {
    width: 100%;
}

/* サブメニュー（ドロップダウン） */
.nav-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: -15px;
    background-color: #fff;
    min-width: 200px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

.nav-menu li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-menu .sub-menu li {
    margin: 0;
    width: 100%;
}

.nav-menu .sub-menu a {
    padding: 8px 20px;
    display: block;
    font-size: 14px;
}

.nav-menu .sub-menu a::after {
    display: none;
}

/* モバイルメニューボタン */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: #fff;
    margin: 6px 0;
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.site-header.scrolled .menu-toggle span {
    background-color: #333;
    box-shadow: none;
}

/* モバイルメニューボタンのアクティブ状態 */
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* メニュー開いている時の背景オーバーレイ */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.menu-overlay.active {
    display: block;
}

/* パンくずリスト */
.breadcrumbs {
    background-color: var(--light-gray);
    padding: 10px 0;
    margin-bottom: 30px;
    font-size: 14px;
}

.breadcrumbs a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

/* フッター */
.site-footer {
    background-color: #333;
    color: #fff;
    padding: 50px 0 20px;
    margin-top: 60px;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.footer-widget {
    width: 30%;
    margin-bottom: 30px;
}

.footer-widget h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #fff;
}

.footer-widget ul {
    padding: 0;
    margin: 0;
}

.footer-widget ul li {
    margin-bottom: 10px;
}

.footer-widget a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-widget a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    margin-top: 30px;
    font-size: 14px;
    color: #aaa;
}

/* メインコンテンツエリア */
.site-content {
    padding: 50px 0;
}

.content-area {
    width: 70%;
    float: left;
}

.sidebar {
    width: 25%;
    float: right;
}

/* 記事一覧 */
.post {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
}

.entry-title {
    font-size: 24px;
    margin-bottom: 15px;
}

.entry-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.entry-title a:hover {
    color: var(--primary-color);
}

.entry-meta {
    color: var(--secondary-color);
    font-size: 14px;
    margin-bottom: 15px;
}

.entry-meta a {
    color: var(--secondary-color);
    text-decoration: none;
}

.entry-meta a:hover {
    color: var(--primary-color);
}

.entry-content {
    margin-top: 20px;
}

.read-more {
    display: inline-block;
    margin-top: 15px;
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
}

.read-more:hover {
    text-decoration: underline;
}

/* サイドバー */
.widget {
    margin-bottom: 30px;
    padding: 20px;
    background-color: var(--light-gray);
    border-radius: 5px;
}

.widget-title {
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.widget ul {
    padding: 0;
    margin: 0;
    list-style: none;
}

.widget ul li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.widget a:hover {
    color: var(--primary-color);
}

/* ページネーション */
.pagination {
    margin-top: 40px;
    text-align: center;
}

.pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 5px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* レスポンシブ設定 */
@media (max-width: 768px) {
    /* ヘッダーナビゲーション */
    .menu-toggle {
        display: block;
    }

    .main-navigation {
        position: fixed;
        top: 0;
        right: -300px;
        width: 300px;
        height: 100vh;
        background-color: #fff;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        padding: 60px 20px 20px;
        overflow-y: auto;
        transition: right 0.3s ease;
        z-index: 1000;
    }

    .main-navigation.active {
        right: 0;
    }

    .nav-menu {
        flex-direction: column;
    }

    .nav-menu li {
        margin: 0 0 15px 0;
        width: 100%;
    }

    .nav-menu a {
        display: block;
        padding: 8px 0;
    }

    .nav-menu a::after {
        display: none;
    }

    /* モバイルでのサブメニュー */
    .nav-menu .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background-color: transparent;
        padding: 5px 0 5px 15px;
        margin-top: 5px;
        display: none;
    }

    .nav-menu .menu-item-has-children > a {
        position: relative;
    }

    .nav-menu .menu-item-has-children > a::before {
        content: '+';
        position: absolute;
        right: 0;
        top: 8px;
    }

    .nav-menu .menu-item-has-children.active > a::before {
        content: '-';
    }

    .nav-menu .menu-item-has-children.active .sub-menu {
        display: block;
    }
    
    /* レイアウト */
    .content-area,
    .sidebar {
        width: 100%;
        float: none;
    }
    
    .sidebar {
        margin-top: 40px;
    }
    
    /* フッター */
    .footer-widget {
        width: 100%;
        margin-bottom: 30px;
    }
}

@media (max-width: 480px) {
    /* 小さいスマホ向け調整 */
    .site-title {
        font-size: 24px;
    }
    
    .entry-title {
        font-size: 20px;
    }
    
    .container {
        padding: 0 15px;
    }
}

/* フロントページ専用スタイル */
.front-page-hero {
    position: relative;
    color: #fff;
    padding: 180px 0 100px;
    text-align: center;
    margin-bottom: 60px;
    overflow: hidden;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.8) 0%, rgba(0, 83, 179, 0.9) 100%);
    z-index: -1;
}

.hero-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* 背景固定 */
    opacity: 0.4;
    animation: slow-zoom 30s infinite alternate;
}

/* 浮かぶパーティクル */
.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.particle {
    position: absolute;
    display: block;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    animation: float-up 15s infinite linear;
}

@keyframes slow-zoom {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.1);
    }
}

@keyframes float-up {
    0% {
        transform: translateY(100%) translateX(0) rotate(0);
        opacity: 0;
    }
    20% {
        opacity: 0.5;
    }
    80% {
        opacity: 0.5;
    }
    100% {
        transform: translateY(-1000%) translateX(20px) rotate(360deg);
        opacity: 0;
    }
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    animation: fade-in-up 1s ease-out;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 24px;
    margin-bottom: 30px;
    opacity: 0.9;
    animation: fade-in-up 1s ease-out 0.3s both;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.hero-button {
    display: inline-block;
    background-color: #fff;
    color: var(--primary-color);
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    animation: fade-in-up 1s ease-out 0.6s both;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.hero-button:hover {
    background-color: rgba(255, 255, 255, 0.9);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

@keyframes fade-in-up {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 24px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-button {
    display: inline-block;
    background-color: #fff;
    color: var(--primary-color);
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.hero-button:hover {
    background-color: rgba(255, 255, 255, 0.9);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* フィーチャーセクション */
.feature-section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 20px auto 0;
}

.feature-grid {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.feature-item {
    width: calc(33.333% - 30px);
    margin: 0 15px 30px;
    text-align: center;
}

.feature-icon {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.feature-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
}

.feature-description {
    color: var(--secondary-color);
}

@media (max-width: 768px) {
    .feature-item {
        width: calc(50% - 30px);
    }
}

@media (max-width: 480px) {
    .feature-item {
        width: 100%;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
}

/* 投稿詳細ページ */
.single .entry-header {
    margin-bottom: 30px;
}

.single .entry-title {
    font-size: 32px;
}

.single .entry-content {
    font-size: 16px;
    line-height: 1.8;
}

.single .entry-content p,
.single .entry-content ul,
.single .entry-content ol,
.single .entry-content blockquote {
    margin-bottom: 20px;
}

.single .entry-content h2 {
    font-size: 24px;
    margin: 40px 0 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.single .entry-content h3 {
    font-size: 20px;
    margin: 30px 0 15px;
}

.single .entry-content a {
    color: var(--primary-color);
    text-decoration: none;
}

.single .entry-content a:hover {
    text-decoration: underline;
}

.single .entry-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 15px 20px;
    background-color: var(--light-gray);
    font-style: italic;
}

.single .entry-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.post-tags {
    margin-bottom: 20px;
}

.post-tags a {
    display: inline-block;
    background-color: var(--light-gray);
    padding: 5px 10px;
    margin-right: 5px;
    margin-bottom: 5px;
    border-radius: 3px;
    font-size: 12px;
    color: var(--secondary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.post-tags a:hover {
    background-color: var(--primary-color);
    color: #fff;
}