/* tutorial-detail.css - チュートリアル詳細ページ専用CSS */

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

/* hero-sectionのmargin-bottomを削除 */
.hero-section {
    margin-bottom: 0 !important;
}

.tutorial-detail-content {
    padding: 40px 0 60px 0;
    background-color: #f8f9fa;
}

.container {
     max-width: 1900px !important;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   LAYOUT STYLES - レイアウトスタイル
   ========================================================================== */

.tutorial-layout {
    display: flex !important;
    gap: 40px !important;
     max-width: 1900px !important;
    margin: 0 auto;
    padding: 0 20px;
    align-items: flex-start;
}

/* ==========================================================================
   SIDEBAR STYLES - サイドバースタイル（統一版）
   ========================================================================== */

.sidebar {
    width: 300px !important;
    min-width: 300px !important;
    flex-shrink: 0 !important;
    background-color: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 20px;
}

.sidebar h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #008b5d;
    text-align: center;
    padding: 12px;
    background-color: transparent;
    border: 2px solid #008b5d;
    border-radius: 8px;
}

.sidebar-menu {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.sidebar-menu li {
    margin-bottom: 5px !important;
}

.sidebar-menu a {
    display: block !important;
    padding: 12px 16px !important;
    text-decoration: none !important;
    color: #333 !important;
    background-color: transparent !important;
    border-radius: 6px !important;
    transition: all 0.3s ease !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    cursor: pointer !important;
}

.sidebar-menu a:hover {
    background-color: #e8f5e8 !important;
    color: #008b5d !important;
    transform: translateX(5px);
}

.sidebar-menu a.active {
    background-color: #008b5d !important;
    color: #fff !important;
}

/* ==========================================================================
   MAIN CONTENT STYLES - メインコンテンツスタイル（Support統一対応）
   ========================================================================== */

.main-content {
    flex: 1 !important;
    min-height: 600px;
    width: calc(100% - 300px);
    background-color: transparent;
}

/* Support構造統一用のスタイル調整 */
.support-content {
    padding: 40px 0 60px 0;
    background-color: #f8f9fa;
}

.support-layout {
    display: flex !important;
    gap: 40px !important;
    max-width: 1900px !important;
    margin: 0 auto;
    padding: 0 20px;
    align-items: flex-start;
}

.content-header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid #008b5d;
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.content-header h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.content-header p {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 0;
}

/* セクション表示制御 */
.content-section {
    display: none !important;
}

.content-section.active {
    display: block !important;
}

.section-header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid #008b5d;
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.section-header h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.section-header p {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 0;
}

/* ==========================================================================
   VIDEO GRID STYLES - 動画グリッドスタイル
   ========================================================================== */

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.video-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* 動画サムネイル */
.video-thumbnail {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 アスペクト比 */
    height: 0;
    overflow: hidden;
    background: #000;
}

.video-thumbnail iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    z-index: 10;
}

/* 動画情報 */
.video-info {
    padding: 20px;
}

.video-info h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.4;
}

.video-info p {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 15px;
}

/* メタ情報 */
.video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.category-tag {
    display: inline-block;
    padding: 4px 12px;
    background: #e8f5e8;
    color: #008b5d;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.view-count {
    font-size: 12px;
    color: #999;
}

/* ==========================================================================
   LOADING & PLACEHOLDER STYLES - ローディング・プレースホルダー
   ========================================================================== */

.video-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 8px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ==========================================================================
   ANIMATION STYLES - アニメーションスタイル
   ========================================================================== */

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

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

/* スクロールアニメーション */
.video-card:nth-child(1) { animation-delay: 0.1s; }
.video-card:nth-child(2) { animation-delay: 0.2s; }
.video-card:nth-child(3) { animation-delay: 0.3s; }
.video-card:nth-child(4) { animation-delay: 0.4s; }
.video-card:nth-child(5) { animation-delay: 0.5s; }
.video-card:nth-child(6) { animation-delay: 0.6s; }

/* ==========================================================================
   HOVER EFFECTS - ホバーエフェクト
   ========================================================================== */

.video-card:hover .video-info h3 {
    color: #008b5d;
}

.category-tag:hover {
    background: #008b5d;
    color: white;
    transform: scale(1.05);
}

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

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

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

/* video-card-link のスタイル */
.video-card-link {
    text-decoration: none !important;
    color: inherit !important;
    display: block;
}

.video-card-link:hover {
    text-decoration: none !important;
}

/* ==========================================================================
   RESPONSIVE DESIGN - レスポンシブデザイン
   ========================================================================== */

@media (max-width: 1024px) {
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .tutorial-layout {
        flex-direction: column !important;
        gap: 30px !important;
    }
    
    .sidebar {
        width: 100% !important;
        min-width: 100% !important;
        position: static !important;
    }
    
    .main-content {
        width: 100% !important;
    }
    
    .sidebar h3 {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    .sidebar-menu {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }
    
    .sidebar-menu li {
        margin-bottom: 0 !important;
    }
    
    .sidebar-menu a {
        padding: 8px 12px !important;
        font-size: 12px !important;
        min-width: 70px;
        text-align: center;
    }

    .sidebar-menu a:hover {
        transform: translateX(0);
        transform: scale(1.05);
    }

    .section-header h2 {
        font-size: 20px;
    }

    .section-header p {
        font-size: 13px;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .video-info h3 {
        font-size: 16px;
    }
    
    .video-info p {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .tutorial-layout {
        padding: 0 15px !important;
    }

    .sidebar {
        padding: 15px;
    }

    .sidebar h3 {
        font-size: 13px;
        padding: 10px;
    }

    .sidebar-menu {
        gap: 6px;
    }

    .sidebar-menu a {
        padding: 6px 10px !important;
        font-size: 11px !important;
        min-width: 60px;
    }

    .section-header {
        padding: 20px;
        margin-bottom: 20px;
    }

    .section-header h2 {
        font-size: 18px;
    }
    
    .video-card {
        border-radius: 8px;
    }
    
    .video-info {
        padding: 15px;
    }
    
    .video-info h3 {
        font-size: 15px;
        margin-bottom: 8px;
    }
    
    .video-info p {
        font-size: 12px;
        margin-bottom: 12px;
    }
    
    .category-tag {
        font-size: 11px;
        padding: 3px 10px;
    }
    
    .view-count {
        font-size: 11px;
    }
}