/* tutorial.css - チュートリアルページ完全版 v1.0.3 */

/* ==========================================================================
   CSS VARIABLES - CSS変数
   ========================================================================== */

:root {
    --primary-green: #008b5d;
    --accent-green: #52c7a6;
    --light-green: #85e3c9;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --shadow-primary: 0 20px 40px rgba(0, 139, 93, 0.15);
}

/* ==========================================================================
   WORDPRESS ADMIN BAR - WordPress管理バー対応
   ========================================================================== */

.admin-bar body {
    padding-top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar body {
        padding-top: 46px;
    }
}

/* ==========================================================================
   BASE STYLES - 基本スタイル
   ========================================================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* hero-sectionのmargin-bottomを削除してcommon.cssに任せる */
.hero-section {
    margin-bottom: 0 !important;
}

/* ==========================================================================
   CARDS SECTION - カードセクション
   ========================================================================== */

.tutorial-cards-section {
    padding: 80px 0;
    background-color: #fff;
}

.tutorial-info {
    padding: 80px 0;
    background-color: #f8f9fa;
}

/* ==========================================================================
   TUTORIAL GRID - チュートリアルグリッド
   ========================================================================== */

.tutorial-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    margin-bottom: 80px;
    max-width: 1200px;
    margin: 0 auto;
}

.tutorial-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 30px 32px;
    padding-right: 140px;
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 200px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.tutorial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: inherit;
}

.tutorial-card:focus {
    outline: 2px solid #008b5d;
    outline-offset: 2px;
}

.tutorial-card .content {
    flex: 1;
    width: 100%;
}

.tutorial-card h3 {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.2;
}

.tutorial-card p {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

.tutorial-card .icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tutorial-card .icon img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.tutorial-card:hover .icon img {
    transform: scale(1.05);
}

/* ==========================================================================
   NO CARDS NOTICE - カード未作成時の通知
   ========================================================================== */

.no-cards-notice {
    background: #f0f8f0;
    border: 2px solid #008b5d;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    margin-top: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.no-cards-notice h3 {
    color: #008b5d;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
}

.no-cards-notice p {
    color: #666;
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
}

/* ==========================================================================
   INFO SECTION - 情報セクション
   ========================================================================== */

.info-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.info-content h2 {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
}

.info-content > p {
    font-size: 18px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 50px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.tutorial-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.feature-item {
    text-align: center;
    padding: 30px 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.feature-item h3 {
    font-size: 20px;
    font-weight: 600;
    color: #008b5d;
    margin-bottom: 12px;
}

.feature-item p {
    font-size: 16px;
    color: #666;
    line-height: 1.5;
    margin: 0;
}

/* ==========================================================================
   PROGRESS SECTION - プログレスセクション（オプション）
   ========================================================================== */

.progress-section {
    background: white;
    padding: 40px 0;
    border-bottom: 1px solid rgba(0, 139, 93, 0.1);
}

.progress-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 32px;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #e0e0e0;
    border-radius: 6px;
    overflow: visible;
    margin-bottom: 16px;
    position: relative;
    border: 2px solid #ddd;
}

.progress-fill {
    height: 12px;
    background: linear-gradient(90deg, #00BFFF 0%, #87CEEB 100%);
    border-radius: 4px;
    width: 35%;
    position: absolute;
    top: -2px;
    left: -2px;
    z-index: 10;
}

.progress-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ==========================================================================
   LOADING ANIMATION - ローディングアニメーション
   ========================================================================== */

.tutorial-card {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tutorial-card:nth-child(1) { animation-delay: 0.1s; }
.tutorial-card:nth-child(2) { animation-delay: 0.2s; }
.tutorial-card:nth-child(3) { animation-delay: 0.3s; }
.tutorial-card:nth-child(4) { animation-delay: 0.4s; }
.tutorial-card:nth-child(5) { animation-delay: 0.5s; }
.tutorial-card:nth-child(6) { animation-delay: 0.6s; }

/* ==========================================================================
   RESPONSIVE DESIGN - レスポンシブデザイン（1024px以下）
   ========================================================================== */

@media (max-width: 1024px) {
    .hero-section {
        padding: 40px 0 !important;
    }
    
    .hero-title {
        font-size: 42px !important;
    }
    
    .hero-subtitle {
        font-size: 18px !important;
    }
    
    .hero-description {
        font-size: 16px !important;
    }

    .tutorial-cards-section,
    .tutorial-info {
        padding: 60px 0;
    }

    .tutorial-grid {
        gap: 24px;
        margin-bottom: 60px;
    }
    
    .tutorial-card {
        padding: 25px 28px;
        padding-right: 120px;
        min-height: 180px;
    }
    
    .tutorial-card h3 {
        font-size: 22px;
    }
    
    .tutorial-card p {
        font-size: 15px;
    }
    
    .tutorial-card .icon {
        width: 80px;
        height: 80px;
        right: 15px;
    }
    
    .tutorial-card .icon img {
        width: 60px;
        height: 60px;
    }
    
    .info-content h2 {
        font-size: 28px;
    }
    
    .info-content > p {
        font-size: 16px;
        margin-bottom: 40px;
    }
    
    .tutorial-features {
        gap: 30px;
    }
}

/* ==========================================================================
   RESPONSIVE DESIGN - タブレット（768px以下）
   ========================================================================== */

@media (max-width: 768px) {
    /* ヒーローセクション - レスポンシブ */
    .hero-inner {
        padding: 0 20px;
    }

    .title-wrap h1 {
        font-size: 36px;
    }

    .green-bar {
        height: 60px;
    }

    .tutorial-cards-section,
    .tutorial-info {
        padding: 40px 0;
    }

    .tutorial-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 50px;
    }
    
    .tutorial-card {
        padding: 20px 24px;
        padding-right: 100px;
        min-height: 160px;
    }
    
    .tutorial-card h3 {
        font-size: 20px;
    }
    
    .tutorial-card p {
        font-size: 14px;
    }
    
    .tutorial-card .icon {
        width: 70px;
        height: 70px;
        right: 12px;
    }
    
    .tutorial-card .icon img {
        width: 50px;
        height: 50px;
    }
    
    .tutorial-features {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .feature-item {
        padding: 20px 15px;
    }
    
    .info-content h2 {
        font-size: 26px;
    }
    
    .info-content > p {
        font-size: 15px;
        margin-bottom: 30px;
    }
    
    .no-cards-notice {
        padding: 25px;
        margin-top: 30px;
    }
    
    .no-cards-notice h3 {
        font-size: 18px;
        margin-bottom: 12px;
    }
    
    .no-cards-notice p {
        font-size: 14px;
    }
}

/* ==========================================================================
   RESPONSIVE DESIGN - モバイル（480px以下）
   ========================================================================== */

@media (max-width: 480px) {
    /* ヒーローセクション - モバイル */
    .hero-section {
        padding: 32px 0;
        margin-bottom: 60px;
    }

    .title-wrap h1 {
        font-size: 28px;
    }

    .green-bar {
        height: 50px;
        margin-right: 12px;
    }

    .tutorial-cards-section,
    .tutorial-info {
        padding: 30px 0;
    }
    
    .tutorial-card {
        padding: 18px 20px;
        padding-right: 90px;
        min-height: 140px;
    }
    
    .tutorial-card h3 {
        font-size: 18px;
        margin-bottom: 6px;
    }
    
    .tutorial-card p {
        font-size: 13px;
        line-height: 1.5;
    }
    
    .tutorial-card .icon {
        width: 60px;
        height: 60px;
        right: 10px;
    }
    
    .tutorial-card .icon img {
        width: 40px;
        height: 40px;
    }
    
    .feature-item {
        padding: 15px 10px;
    }
    
    .feature-item h3 {
        font-size: 18px;
    }
    
    .feature-item p {
        font-size: 14px;
    }
    
    .info-content h2 {
        font-size: 24px;
        margin-bottom: 15px;
    }
    
    .info-content > p {
        font-size: 14px;
        margin-bottom: 25px;
    }
    
    .no-cards-notice {
        padding: 20px;
        margin-top: 25px;
    }
    
    .no-cards-notice h3 {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .no-cards-notice p {
        font-size: 13px;
    }
}

/* ==========================================================================
   ACCESSIBILITY STYLES - アクセシビリティスタイル
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* スクリーンリーダー用のスキップリンク */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* フォーカススタイル */
.tutorial-card:focus {
    outline: 3px solid #008b5d;
    outline-offset: 2px;
}

/* ==========================================================================
   PRINT STYLES - 印刷スタイル
   ========================================================================== */

@media print {
    .tutorial-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .tutorial-card:hover {
        transform: none;
        box-shadow: none;
    }
    
    .hero-section {
        background: #fff !important;
        color: #000 !important;
    }
    
    .hero-title,
    .hero-subtitle,
    .hero-description {
        color: #000 !important;
    }
}