/*
Theme Name: EduV3 日本教育テーマ
Description: 现代化的教育资源WordPress主题，支持PDF和音频付费内容
Version: 1.0
Author: Your Name
Text Domain: eduv3
*/

:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --accent-color: #f59e0b;
    --text-color: #1f2937;
    --bg-color: #ffffff;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--bg-color);
    font-size: 16px;
}

/* ヘッダー・ナビゲーション */
.header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(229, 231, 235, 0.3);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.header.scrolled {
    position: fixed;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    position: relative;
}

.logo {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    z-index: 1001;
}

.logo a {
    text-decoration: none;
    color: inherit;
}

.logo img {
    max-height: 40px;
    width: auto;
}

/* メインナビゲーション */
.main-navigation {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    position: relative;
}

.nav-menu > li > a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    padding: 1rem 1.5rem;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 0 0.25rem;
}

.nav-menu > li > a:hover,
.nav-menu > li.current-menu-item > a {
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.1);
}

/* ドロップダウンアロー */
.dropdown-arrow {
    margin-left: 0.5rem;
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.nav-menu li:hover .dropdown-arrow {
    transform: rotate(180deg);
}

/* サブメニュー */
.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 220px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
}

.nav-menu li:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sub-menu li {
    width: 100%;
}

.sub-menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 6px;
    margin: 0 0.5rem;
}

.sub-menu a:hover {
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.1);
}

/* マルチレベルサブメニュー */
.sub-menu .sub-menu {
    top: 0;
    left: 100%;
    margin-left: 0.5rem;
}

/* ユーザーアクション */
.user-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 1001;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    white-space: nowrap;
}

.btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

/* モバイルメニュートグル */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1002;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* レスポンシブデザイン */
@media (max-width: 1024px) {
    .nav-container {
        padding: 1rem;
    }
    
    .nav-menu > li > a {
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
    }
    
    .user-actions .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .main-navigation {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 999;
    }
    
    .main-navigation.mobile-open {
        transform: translateX(0);
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 0;
        width: 100%;
        max-width: 300px;
        align-items: center;
    }
    
    .nav-menu > li {
        width: 100%;
    }
    
    .nav-menu > li > a {
        justify-content: center;
        padding: 1rem;
        margin: 0.25rem 0;
        text-align: center;
        font-size: 1.125rem;
    }
    
    /* モバイルサブメニュー */
    .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: rgba(248, 250, 252, 0.8);
        border-radius: 8px;
        margin: 0.5rem 1rem;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .nav-menu li:hover .sub-menu,
    .nav-menu li.menu-open .sub-menu {
        max-height: 300px;
    }
    
    .dropdown-arrow {
        margin-left: auto;
    }
    
    .user-actions {
        position: fixed;
        bottom: 2rem;
        left: 50%;
        transform: translateX(-50%);
        background: white;
        padding: 1rem;
        border-radius: 12px;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 1000;
    }
    
    .main-navigation.mobile-open ~ .user-actions {
        opacity: 1;
        visibility: visible;
    }
    
    .nav-container {
        padding: 0.75rem 1rem;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    body.menu-open {
        overflow: hidden;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0.5rem 1rem;
    }
    
    .logo {
        font-size: 1.25rem;
    }
    
    .user-actions {
        flex-direction: column;
        gap: 0.75rem;
        width: calc(100% - 2rem);
        max-width: 280px;
    }
    
    .user-actions .btn {
        width: 100%;
        text-align: center;
    }
}

/* ナビゲーションアニメーション */
.nav-menu li {
    transition: all 0.3s ease;
}

.nav-menu li:hover {
    transform: translateY(-1px);
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sub-menu {
    animation: slideInDown 0.3s ease;
}

/* スライダー */
.hero-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin-top: 0;
}

.slider-container {
    position: relative;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.slide-content {
    max-width: 800px;
    padding: 2rem;
}

.slide-content h2 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
    font-weight: 700;
}

.slide-content p {
    font-size: 1.25rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
    margin-bottom: 2rem;
}

/* メインコンテンツ */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    margin-top: 100px;
    padding: 2rem;
}

/* カテゴリーグリッド */
.category-section {
    margin: 4rem 0;
}

.category-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-color);
    font-weight: 700;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.category-card {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.category-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.75rem;
    font-weight: 600;
}

.category-card p {
    color: var(--secondary-color);
    margin-bottom: 2rem;
    line-height: 1.7;
}

/* コンテンツグリッド */
.recent-content {
    margin: 4rem 0;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.content-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.content-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.content-thumbnail {
    position: relative;
    overflow: hidden;
}

.content-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.content-card:hover .content-thumbnail img {
    transform: scale(1.05);
}

.content-info {
    padding: 1.5rem;
}

.content-info h4 {
    margin-bottom: 0.75rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.content-info h4 a {
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.content-info h4 a:hover {
    color: var(--primary-color);
}

.content-type {
    background: var(--primary-color);
    color: white;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-block;
    margin-top: 0px;
}

/* PDF・音声プレイヤー */
.pdf-viewer {
    width: 100%;
    height: 80vh;
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.audio-player {
    width: 100%;
    margin: 2rem 0;
    border-radius: 8px;
}

/* 銀行振込情報 */
.bank-transfer-info {
    background: #f0f9ff;
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 1.5rem;
    border: 1px solid #bae6fd;
    animation: slideDown 0.3s ease-out;
}

.bank-transfer-info h4 {
    color: #0369a1;
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.bank-details {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1rem 0;
    font-family: 'Courier New', monospace;
    white-space: pre-line;
    border: 1px solid #e0f2fe;
    line-height: 1.6;
}

.bank-transfer-info p {
    margin-bottom: 0;
    color: #0369a1;
}

.bank-transfer-info strong {
    color: #dc2626;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* フォーム */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ユーザーダッシュボード */
.user-dashboard {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin: 2rem 0;
}

.dashboard-section {
    margin-bottom: 3rem;
}

.dashboard-section h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--border-color);
    font-size: 1.5rem;
    font-weight: 600;
}

.user-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.info-item {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.info-item strong {
    display: block;
    color: var(--secondary-color);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

/* 購入履歴 */
.purchase-history {
    overflow-x: auto;
}

.purchase-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.purchase-table th,
.purchase-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.purchase-table th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--secondary-color);
}

.status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status.completed {
    background: #d1fae5;
    color: #065f46;
}

.status.pending {
    background: #fef3c7;
    color: #92400e;
}

/* 分類購入オプション */
.category-purchase-option {
    background: #e8f5e8;
    border: 2px solid #28a745;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
}

.category-purchase-option::before {
    content: "おすすめ";
    position: absolute;
    top: -10px;
    left: 20px;
    background: #28a745;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
}

.category-purchase-option h4 {
    color: #155724;
    margin-bottom: 0.75rem;
}

.category-purchase-option p {
    color: #155724;
    margin-bottom: 0.75rem;
}

.btn-category {
    background: #28a745;
    border-color: #28a745;
}

.btn-category:hover {
    background: #218838;
    border-color: #1e7e34;
}

/* フッター */
.footer {
    background: var(--text-color);
    color: white;
    padding: 4rem 0 2rem;
    margin-top: 6rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-widget h3 {
    margin-bottom: 1rem;
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    color: #9ca3af;
}

/* 管理画面スタイル */
.admin-panel {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    margin: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.admin-panel h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.nav-tab-wrapper {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.nav-tab {
    background: transparent;
    border: none;
    padding: 1rem 1.5rem;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    color: var(--secondary-color);
    font-weight: 500;
    text-decoration: none;
}

.nav-tab.nav-tab-active,
.nav-tab:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* レスポンシブデザイン */
@media (max-width: 1024px) {
    .main-container {
        padding: 1.5rem;
    }
    
    .category-grid {
        gap: 1.5rem;
    }
    
    .slide-content h2 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .user-actions {
        order: -1;
    }
    
    .slide-content h2 {
        font-size: 2rem;
    }
    
    .slide-content p {
        font-size: 1rem;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .user-info {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .main-container {
        padding: 1rem;
    }
    
    .category-card {
        padding: 1.5rem;
    }
    
    .slide-content h2 {
        font-size: 1.75rem;
    }
    
    .user-dashboard {
        padding: 1.5rem;
    }
}

/* アニメーション */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-card,
.content-card {
    animation: fadeInUp 0.6s ease-out;
}

/* 印刷スタイル */
@media print {
    .header,
    .user-actions,
    .footer {
        display: none !important;
    }
    
    .main-container {
        max-width: none;
        padding: 0;
    }
}
