/* 動画カード */
.movie-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 0;
    list-style: none;
}

.movie-card-item {
    display: block;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: #333;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.movie-card-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.movie-image-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    overflow: hidden;
}

.movie-image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.movie-card-date {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(255,255,255,0.8);
    color: #333;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
    z-index: 10;
}

.movie-card-info {
    padding: 15px;
    background-color: #f9f9f9;
}

/* 企業名とお気に入りボタンを横並び */
.movie-card-header {
    display: flex;
    justify-content: space-between; /* 左に企業名、右にボタン */
    align-items: center;
    flex-wrap: nowrap; /* 折り返し防止 */
}

.movie-card-header h2 {
    margin: 0; /* デフォルトマージンをリセット */
    font-size: 1.2rem;
    display: inline-block; /* ブロックからインラインに変更 */
}


/* モーダル */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    position: relative;
}

.close-button {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: #000;
    text-decoration: none;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

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

.no-video-message {
    display: none;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    font-size: 1.5rem;
    color: #555;
}

/* 複数動画ボタン */
.video-button-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    z-index: 10; /* iframeより前面に */
}

.video-switch-button {
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #fff;
    cursor: pointer;
}

.video-switch-button.active {
    background-color: #555;
    color: #fff;
}

.movie-card-item.highlight {
    border: 2px solid #007bff;
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.5);
}


/* =========================================
   movieページ：PCは3カラム、SPは1カラム
   ========================================= */
@media screen and (max-width: 768px) {
  /* 動画カード全体のグリッド */
  #movieList,
  .movie-list,
  .movie-grid {
    display: grid !important;
    grid-template-columns: 1fr !important; /* 1カラム */
    gap: 16px !important;
    width: 100% !important;
  }

  /* 各カードの幅調整 */
  .movie-card,
  .movie-card-item {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
  }
}