﻿/* --- ここからがCSS --- */

/* フィルタリングコントロール */
.thumbnail-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 25px;
  padding: 20px;
  background-color: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.control-group {
  display: flex;
  flex-direction: column;
}

.control-group label {
  font-weight: bold;
  margin-bottom: 8px;
  font-size: 14px;
  color: #333;
}

.control-group select,
.control-group input {
  padding: 10px;
  border-radius: 4px;
  border: 1px solid #ccc;
  min-width: 250px;
  font-size: 16px;
}

/* サムネイルグリッド */
.thumbnail-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 25px;
  padding: 10px 0;
}

/* 各サムネイルボックス */
.thumbnail-box {
  background-color: #fff;
  border: 3px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  position: relative; /* バッジの位置の基準とするため */
}

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

/* サムネイル画像部分 */
.thumbnail-image-wrapper {
  position: relative; /* バッジコンテナの基準 */
  width: 100%;
  padding-top: 56.25%; /* 16:9のアスペクト比 */
}

.thumbnail-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid #e0e0e0;
}

/* ▼▼▼【新規追加】ここからバッジのスタイル ▼▼▼ */
.badge-container {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1;
    display: flex;
    gap: 5px;
}

.badge {
    padding: 5px 12px;
    border-radius: 4px;
    color: white;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* バッジのテキストに応じた色設定 */
.badge.member { background-color: #007bff; } /* 会員限定 */
.badge.paid { background-color: #fd7e14; } /* 有料 */
.badge.new { background-color: #dc3545; }  /* ★「新着」を追加 */
.badge.featured { background-color: #28a745; } /* ★「注目」を追加 */
/* ▲▲▲【新規追加】ここまでバッジのスタイル ▲▲▲ */


/* サムネイル情報部分 */
.thumbnail-info {
  padding: 15px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
}

.thumbnail-title {
  font-weight: bold;
  font-size: 16px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
  min-height: 44.8px;
}

.thumbnail-meta {
  font-size: 13px;
  color: #666;
}

.thumbnail-meta span {
    display: block;
    margin-top: 5px;
}

/* スマートフォン向けのレスポンシブ設定 */
@media (max-width: 768px) {
  .thumbnail-controls {
    flex-direction: column;
  }
  .control-group input,
  .control-group select {
    min-width: auto;
    width: 100%;
  }
  .thumbnail-grid-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}
/* --- ここまでがCSS --- */

/* ===================================================================
   ベーススタイル
=================================================================== */
body.video {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    margin: 0;
}

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

/* ===================================================================
   動画再生ページ 主要要素
=================================================================== */

/* --- 戻るボタン --- */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #6c757d;
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
    margin-bottom: 25px;
}

.back-button:hover {
    background-color: #5a6268;
}

/* --- 動画ヘッダー --- */
.video-header {
    margin-bottom: 30px;
}

.video-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 15px 0;
}

.video-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    color: #666;
    font-size: 14px;
}

.video-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.video-category {
    background-color: #dc143c;
    color: white;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: bold;
}

/* --- 動画プレイヤー --- */
.video-player-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background-color: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    margin-bottom: 40px;
}

.video-player-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* --- コンテンツセクション --- */
.content-section {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.content-section h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

/* ===================================================================
   セミナー概要（description-content内）
=================================================================== */

/* --- 基本テキストスタイル --- */
.description-content p {
    line-height: 1.8;
    margin-bottom: 1em;
}

.description-content a {
    color: #dc143c;
    text-decoration: none;
}

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

/* --- 見出し (.midashi) --- */
.description-content .midashi {
    font-size: 18px;
    font-weight: 600;
    margin-top: 30px;
    margin-bottom: 15px;
    padding-left: 12px;
    border-left: 4px solid #dc143c;
}

/* --- テーブル --- */
.description-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
    font-size: 15px;
}

.description-content th,
.description-content td {
    padding: 15px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid #e9ecef;
}

.description-content th {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* 講演内容テーブルの時間列を狭く調整 */
.description-content .schedule-table th:first-child,
.description-content .schedule-table td:first-child {
    width: 120px; /* 時間列の幅を固定 */
    min-width: 120px; /* 最小幅を保証 */
    white-space: nowrap; /* 「13:30～13:40」などが改行されるのを防ぐ */
    text-align: center; /* 時間を中央揃えにすると見やすい */
}

/* 講演内容テーブルの内容列を広く */
.description-content .schedule-table th:last-child,
.description-content .schedule-table td:last-child {
    width: auto; /* 残りの幅を全て使用 */
}

/* 一般的なテーブルのth要素（講演内容以外） */
.description-content table:not(.schedule-table) th {
    white-space: nowrap;
    width: 1%;
}

/* --- リスト (.style) --- */
.description-content ul.style {
    padding-left: 20px;

    margin: 0;
}

.description-content ul.style li {
    margin-bottom: 0.8em;
}

/* --- 区切り線 (hr) --- */
.description-content hr {
    border: none;
    height: 1px;
    background-color: #e9ecef;
    margin-top: 10px;
    margin-bottom: 10px;
}

.description-content hr.sp20 {
    margin: 20px 0;
}

.description-content hr.sp10 {
    margin: 10px 0;
}

/* ===================================================================
   関連セミナー
=================================================================== */
.related-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.related-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.related-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.related-thumb {
    width: 100%;
    padding-top: 56.25%;
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid #e0e0e0;
}

.related-info {
    padding: 12px;
}

.related-title {
    font-size: 14px;
    font-weight: bold;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}

.related-date {
    font-size: 12px;
    color: #666;
}

/* ===================================================================
   レスポンシブデザイン (メディアクエリ)
=================================================================== */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .video-title {
        font-size: 22px;
    }

    .video-meta {
        font-size: 13px;
        gap: 15px;
    }

    .related-list {
        grid-template-columns: 1fr;
    }
    
    /* スマートフォンでは時間列をもう少し狭く */
    .description-content .schedule-table th:first-child,
    .description-content .schedule-table td:first-child {
        width: 100px;
        min-width: 100px;
    }
}

/* ===================================================================
   ハンバーガーメニュー (スマートフォン向け)
=================================================================== */

/* --- ハンバーガーボタン --- */
.hamburger-menu {
  display: none; /* デフォルト(PC)では非表示 */
  position: fixed; /* 画面に固定 */
  top: 10px;
  right: 15px;
  z-index: 1000; /* 他の要素より手前に表示 */
}

.menu-toggle {
  background: #333;
  color: white;
  border: none;
  padding: 10px 12px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

/* --- モバイルメニュー本体 --- */
.mobile-menu {
  display: none; /* JavaScriptで表示を制御 */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh; /* 画面の高さ一杯に */
  background-color: rgba(0, 0, 0, 0.98);
  z-index: 999;
  overflow-y: auto; /* メニューが多い場合にスクロール可能に */
  padding: 60px 0;
}

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

/* gnav.php内のスタイルをモバイル用に調整 */
.mobile-menu .main-menu {
  width: 100%;
}

.mobile-menu .menu-item {
  border-bottom: 1px solid #444;
  position: relative; /* 開閉ボタンの位置の基準 */
}

/* メインメニューのリンク */
.mobile-menu .menu-item > a {
  display: block;
  padding: 18px 50px 18px 20px; /* ボタンの領域を避ける */
  color: white;
  text-decoration: none;
  font-size: 16px;
}
.mobile-menu .menu-item > a > i {
  margin-right: 10px;
  width: 20px;
  text-align: center;
}

/* サブメニュー開閉ボタン */
.submenu-toggle {
  position: absolute;
  right: 0;
  top: 0;
  width: 60px; /* タップしやすいように幅を広げる */
  height: 100%;
  background: transparent;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  z-index: 2;
}
/* 開閉ボタンのアイコンの色をアクティブ時に変更 */
.submenu-toggle.active {
    color: #ffc107;
}

/* サブメニュー(.submenu) */
.mobile-menu .submenu {
  display: none; /* JavaScriptで表示を制御 */
  width: 100%;
  list-style: none;
  padding-left: 0;
  background-color: #1a1a1a;
}

/* デスクトップ用の閉じるボタンはモバイルでは非表示 */
.mobile-menu .submenu .btn-line {
  display: none;
}

.mobile-menu .submenu li {
  border-top: 1px solid #444;
}

.mobile-menu .submenu li a {
  display: block;
  padding: 15px 20px 15px 40px; /* インデントを付ける */
  color: #ccc;
  text-decoration: none;
  font-size: 14px;
}

.mobile-menu .submenu li a:hover {
  background-color: #dc143c;
  color: white;
}
.mobile-menu .submenu li .fa-lock {
  color: yellow;
  margin-left: 5px;
}

/* --- スマートフォン表示の切り替え (768px以下) --- */
@media (max-width: 768px) {
  /* デスクトップ用メニュー(#head内のgnav)を非表示 */
  #head .global-menu {
    display: none;
  }
  
  /* ハンバーガーメニューを表示 */
  .hamburger-menu {
    display: block;
  }
}

/* ===================================================================
   TOPへ戻る
=================================================================== */

#pageTop {
   position: fixed;
   bottom: 30px;
   right: 30px;
   z-index: 999;
}

#pageTop a {
   display: flex; /* flexboxに変更 */
   align-items: center; /* 垂直方向の中央揃え */
   justify-content: center; /* 水平方向の中央揃え */
   width: 46px;
   height: 46px;
   background-color: #333333;
   color: #fff;
   font-weight: bold;
   border-radius: 50%;
   opacity: 0.6;
   text-decoration: none;
   /* line-height: 46px; を削除 */
}

#pageTop a:hover {
   text-decoration: none;
   background-color: #cc0000;
   opacity: 0.8;
}

/* アイコンフォントの微調整（必要に応じて） */
#pageTop a i,
#pageTop a .fa,
#pageTop a::before {
   font-size: 18px; /* アイコンサイズを明示的に指定 */
   line-height: 1; /* line-heightをリセット */
}

/* Font Awesomeアイコンの場合の追加調整 */
#pageTop a .fa-chevron-up,
#pageTop a .fa-angle-up,
#pageTop a .fa-arrow-up {
   margin-top: -1px; /* わずかに上に調整（必要に応じて） */
}