/* iwgp2026-feed-cc: feed-youtube.css */

/* --- Container --- */
.iwgpcc-youtube {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  width: 100%;
}

/* --- Card (layout/width は .iwgpcc-youtube 基準) --- */
.iwgpcc-youtube .iwgpcc-card {
  background-color: #fff;
  box-sizing: border-box;
  display: flex;
  padding: 0;
}

/* --- Column width --- */
.iwgpcc-youtube .col1 { width: 100%; }
.iwgpcc-youtube .col2 { width: calc((100% - 20px)  / 2); }
.iwgpcc-youtube .col3 { width: calc((100% - 40px)  / 3); }
.iwgpcc-youtube .col4 { width: calc((100% - 60px)  / 4); }
.iwgpcc-youtube .iwgpcc-card:hover {
  opacity: 0.5;
  transition: .6s;
}
.iwgpcc-youtube .iwgpcc-card a {
  display: flex;
  flex-direction: column;
  width: 100%;
  text-decoration: none;
  color: inherit;
}

/* --- 内側要素は .iwgpcc-card 基準（詳細度 0,2,0）--- */
/* post_slug クラスによる上書き: .{post_slug} .pc.site-name { ... } */

/* Channel name — :where() で詳細度 0,1,0 → .{post_slug} .site-name が必ず勝つ */
:where(.iwgpcc-card) .site-name {
  padding: 3px;
  font-size: .7rem;
  text-align: center;
  color: #fff;
  background-color: #000;
}
/* display control only */
.iwgpcc-card .pc.site-name { display: block; }
.iwgpcc-card .sp.site-name { display: none; 
  padding: 1px;
  font-size: .6rem;
}

/* Thumbnail */
.iwgpcc-card .card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.iwgpcc-card .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Video info */
.iwgpcc-card .video-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 5px 10px;
}
.iwgpcc-card .video-info h3 {
  font-size: 1rem;
  line-height: 1.5;
  min-height: 3rem;
  overflow: hidden;
  margin: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.iwgpcc-card .video-info .meta {
  margin-top: auto;
  display: flex;
}
.iwgpcc-card .video-info .date {
  margin-left: auto;
  color: #7c7c7c;
  font-size: .9rem;
}

/* Tablet: 2 columns */
@media (max-width: 1024px) {
  .iwgpcc-youtube .iwgpcc-card {
    width: calc((100% - 20px) / 2);
  }
}

/* ================================================
   layout: editorial — Small Card (editorial grid)
   ================================================ */

.iwgpcc-youtube.editorial {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.iwgpcc-youtube.editorial .iwgpcc-card {
  width: auto;
  background-color: transparent;
  padding: 0;
}
.iwgpcc-youtube.editorial .iwgpcc-card:hover {
  opacity: 1;
  transform: translateY(-2px);
  transition: transform .3s;
}
.iwgpcc-youtube.editorial .iwgpcc-card .card-image {
  aspect-ratio: 16 / 10;
}
.iwgpcc-youtube.editorial .iwgpcc-card .video-info {
  padding: 12px 0 0;
  flex: none;
}
.iwgpcc-youtube.editorial .iwgpcc-card .video-info h3 {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.55;
  color: #1a1916;
  min-height: 0;
  -webkit-line-clamp: 3;
}
.iwgpcc-youtube.editorial .iwgpcc-card .meta {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-family: monospace;
  color: #7a7468;
  letter-spacing: 0.14em;
  margin-bottom: 6px;
}
:where(.iwgpcc-youtube.editorial .iwgpcc-card) .accent-mark {
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: #b03a2e;
  transform: rotate(45deg);
  flex-shrink: 0;
}
:where(.iwgpcc-youtube.editorial .iwgpcc-card) .site-name {
  font-weight: bold;
  background-color: transparent;
  color: #7a7468;
  padding: 0;
  font-size: inherit;
  text-align: left;
}

@media (max-width: 1024px) {
  .iwgpcc-youtube.editorial {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 767px) {
  .iwgpcc-youtube.editorial {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .iwgpcc-youtube.editorial .iwgpcc-card a {
    flex-direction: row;
    gap: 10px;
  }
  .iwgpcc-youtube.editorial .iwgpcc-card .card-image {
    flex: 0 0 120px;
  }
  .iwgpcc-youtube.editorial .iwgpcc-card .video-info {
    padding: 0;
  }
}

/* Mobile: 1 column, horizontal layout */
@media (max-width: 767px) {
  .iwgpcc-youtube .iwgpcc-card {
    width: 100%;
    padding: 5px;
  }
  .iwgpcc-youtube .iwgpcc-card a {
    flex-direction: row;
  }
  .iwgpcc-card .card-image {
    flex: 0 0 140px;
  }
  .iwgpcc-card .pc.site-name { display: none; }
  .iwgpcc-card .sp.site-name {
    display: block;
    font-weight: bold;
  }
  .iwgpcc-card .video-info {
    padding: 0 0 0 5px;
  }
  .iwgpcc-card .video-info h3 {
    font-size: .9rem;
  }
  .iwgpcc-card .video-info .meta {
    display: block;
  }
  .iwgpcc-card .video-info .date {
    text-align: right;
  }
}
