/* CT Series Unified Layout Fixes (cleaned) */
/* Scope: body.ct-series-fullwidth added only on target series page */

body.ct-series-fullwidth { --ct-gutter: clamp(14px, 2.8vw, 48px); overflow-x:hidden; }

/* Remove internal scroll & absolute sizing from listing area */
body.ct-series-fullwidth .series-listing-wrapper,
body.ct-series-fullwidth .main-series-items { height:auto!important; max-height:none!important; position:relative!important; overflow:visible!important; top:auto!important; left:auto!important; right:auto!important; bottom:auto!important; }

/* Player & related wrappers full width */
body.ct-series-fullwidth .main-player-in-series-vertical,
body.ct-series-fullwidth .beeteam368-player,
body.ct-series-fullwidth .beeteam368-player-content { width:100%!important; max-width:100%!important; }

/* Entry header alignment */
body.ct-series-fullwidth article.vidmov_series .entry-header.single-post-title { margin:48px 0 0; padding:0 var(--layout_df-padding)!important; box-sizing:border-box; }
body.ct-series-fullwidth article.vidmov_series .entry-header.single-post-title .entry-title { margin:0; line-height:1.15; }

/* Framed box style for the series title */
/* Article (title + content) constrained & centered like normal layout */
/* Article uses theme's default container now (no forced widths) */
body.ct-series-fullwidth article.vidmov_series { margin:48px auto 0; box-sizing:border-box; }
body.ct-series-fullwidth article.vidmov_series .entry-header.single-post-title { margin:0 0 32px; padding:0; background:transparent; border:0; box-shadow:none; }
body.ct-series-fullwidth article.vidmov_series .entry-header.single-post-title .entry-title { margin:0; line-height:1.15; }

/* Media items (On the Road with CT) container */
body.ct-series-fullwidth .media-items-section { margin:48px 0 0; padding:clamp(18px,2vw,34px); background:#18181b; border-radius:18px; box-shadow:0 0 32px 0 rgba(0,0,0,.18); box-sizing:border-box; }

/* Typography scaling */
body.ct-series-fullwidth .media-items-section h1, 
body.ct-series-fullwidth .media-items-section h2, 
body.ct-series-fullwidth .media-items-section .section-title { font-size:clamp(1.9rem,1.1rem + 1.1vw,2.6rem); line-height:1.2; margin:0 0 1rem; }

/* List improvements */
body.ct-series-fullwidth .ct-series-item { transition:background .18s, border-color .18s; }
body.ct-series-fullwidth .ct-series-item:hover { border-color:#f241a3; }

/* Breakpoints */
@media (max-width:1024px){ body.ct-series-fullwidth .media-items-section { margin-top:40px; } }
@media (max-width:820px){ body.ct-series-fullwidth { --ct-gutter: clamp(14px,3.2vw,36px); } body.ct-series-fullwidth .media-items-section { padding:22px var(--ct-gutter)!important; } }
@media (max-width:640px){ body.ct-series-fullwidth { --ct-gutter: clamp(12px,4.5vw,28px); } body.ct-series-fullwidth .media-items-section { margin-top:32px; padding:20px var(--ct-gutter)!important; } }
@media (max-width:480px){ body.ct-series-fullwidth { --ct-gutter: clamp(12px,5vw,22px); } body.ct-series-fullwidth .media-items-section { padding:18px var(--ct-gutter)!important; } }

/* Removed previous padding:0 reset so theme container gutter returns (aligns with playlist). */

/* Responsive crew/cast list (real markup .cast-variant-items-row / .cast-variant-item) */
body.ct-series-fullwidth .cast-variant-items-wrapper { width:100%; }
body.ct-series-fullwidth .cast-variant-items-row { display:flex; flex-direction:column; gap:22px; margin:0; padding:0; list-style:none; }
body.ct-series-fullwidth .cast-variant-item { display:flex; align-items:flex-start; gap:18px; padding:14px 18px; background:#1d1d21; border:1px solid rgba(255,255,255,0.06); border-radius:14px; transition:background .18s,border-color .18s,transform .18s; }
body.ct-series-fullwidth .cast-variant-item:hover { background:#242428; border-color:rgba(255,255,255,0.14); }
body.ct-series-fullwidth .cast-variant-item .blog-img-wrapper { width:78px; height:78px; flex-shrink:0; border-radius:12px; overflow:hidden; background:#111; }
body.ct-series-fullwidth .cast-variant-item .blog-img-wrapper img { width:100%; height:100%; object-fit:cover; display:block; }
body.ct-series-fullwidth .cast-variant-item .cast-variant-content { flex:1 1 auto; line-height:1.45; font-size:.92rem; }
body.ct-series-fullwidth .cast-variant-item .cast-variant-content strong { font-weight:600; font-size:1rem; display:block; margin:0 0 4px; }

@media (min-width:960px){
  body.ct-series-fullwidth .cast-variant-items-row { display:grid; grid-template-columns:repeat(auto-fill,minmax(340px,1fr)); gap:26px; }
  body.ct-series-fullwidth .cast-variant-item { margin:0; }
}
@media (min-width:1440px){
  body.ct-series-fullwidth .cast-variant-items-row { grid-template-columns:repeat(auto-fill,minmax(360px,1fr)); }
}
@media (max-width:820px){
  body.ct-series-fullwidth .cast-variant-item { padding:12px 14px; gap:14px; }
  body.ct-series-fullwidth .cast-variant-item .blog-img-wrapper { width:70px; height:70px; }
}
@media (max-width:600px){
  body.ct-series-fullwidth .cast-variant-item .blog-img-wrapper { width:62px; height:62px; border-radius:10px; }
  body.ct-series-fullwidth .cast-variant-item .cast-variant-content { font-size:.9rem; }
}
@media (max-width:430px){
  body.ct-series-fullwidth .cast-variant-item { padding:10px 12px; gap:12px; }
  body.ct-series-fullwidth .cast-variant-item .blog-img-wrapper { width:54px; height:54px; }
}

/* Custom fixes for Crews section in "On the Road with CT" */
body.ct-series-fullwidth .ct-crews-section {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  padding: 30px 0;
}

body.ct-series-fullwidth .ct-crew-member {
  background: #1d1d21;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.ct-series-fullwidth .ct-crew-member:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
  border-color: rgba(242, 65, 163, 0.4);
}

body.ct-series-fullwidth .ct-crew-image-container {
  width: 120px;
  height: 120px;
  margin: 20px auto;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #f241a3;
}

body.ct-series-fullwidth .ct-crew-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.ct-series-fullwidth .ct-crew-content {
  padding: 0 20px 20px;
  text-align: center;
}

body.ct-series-fullwidth .ct-crew-name {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 10px;
  color: #ffffff;
}

body.ct-series-fullwidth .ct-crew-bio {
  font-size: 0.92rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
}

/* Premium content section alignment */
body.ct-series-fullwidth .premium-content-section {
  text-align: center;
  margin: 40px 0;
}

body.ct-series-fullwidth .premium-content-title {
  font-size: 2rem;
  margin-bottom: 15px;
}

body.ct-series-fullwidth .premium-content-description {
  max-width: 800px;
  margin: 0 auto 20px;
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
}

/* Improved episode listing */
body.ct-series-fullwidth .ct-series-item {
  display: flex;
  align-items: center;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 10px;
  background: #1d1d21;
  border-left: 4px solid transparent;
}

body.ct-series-fullwidth .ct-series-item:hover {
  border-left-color: #f241a3;
  background: #242428;
}

body.ct-series-fullwidth .ct-episode-thumbnail {
  width: 120px;
  height: 68px;
  border-radius: 6px;
  overflow: hidden;
  margin-right: 15px;
}

body.ct-series-fullwidth .ct-episode-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.ct-series-fullwidth .ct-episode-content {
  flex: 1;
}

body.ct-series-fullwidth .ct-episode-title {
  font-weight: 600;
  margin-bottom: 5px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  body.ct-series-fullwidth .ct-crews-section {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
  }
  
  body.ct-series-fullwidth .ct-crew-image-container {
    width: 100px;
    height: 100px;
    margin: 15px auto;
  }
}

@media (max-width: 480px) {
  body.ct-series-fullwidth .ct-crews-section {
    grid-template-columns: 1fr;
  }
  
  body.ct-series-fullwidth .ct-episode-thumbnail {
    width: 90px;
    height: 50px;
  }
}

/* --- Alignment correction (1.2.2): restore standard container gutter for playlist area --- */
body.ct-series-fullwidth .series-container {
  padding-left: var(--layout_df-padding) !important;
  padding-right: var(--layout_df-padding) !important;
}
@media (max-width:575px){
  body.ct-series-fullwidth .series-container {
    padding-left: var(--layout_df-padding-mobile) !important;
    padding-right: var(--layout_df-padding-mobile) !important;
  }
}
/* 1.2.3: Force lower article + media section to align with playlist container */
/* 1.2.4 refined alignment: article + media block use same horizontal padding as playlist container */
body.ct-series-fullwidth #beeteam368-primary-cw .series-container { position:relative; }
body.ct-series-fullwidth #beeteam368-primary-cw article.vidmov_series { 
  max-width:100%!important;
  width:100%!important;
  margin:48px 0 0!important;
  padding-left:0!important; /* remove double gutter */
  padding-right:0!important;
  box-sizing:border-box!important;
 }
@media (max-width:575px){
  body.ct-series-fullwidth #beeteam368-primary-cw article.vidmov_series { padding-left:var(--layout_df-padding-mobile); padding-right:var(--layout_df-padding-mobile); }
}
body.ct-series-fullwidth #beeteam368-primary-cw article.vidmov_series .entry-content { margin:0; padding:0; }
body.ct-series-fullwidth #beeteam368-primary-cw article.vidmov_series .media-items-section { 
  margin:48px 0 0!important; 
  /* remove left/right padding so темний блок вирівнюється точно з плейлистом */
  padding:clamp(20px,1.8vw,36px) 0!important;
  background:#18181b; 
  border-radius:18px; 
  box-shadow:0 0 32px 0 rgba(0,0,0,.18); 
  box-sizing:border-box; 
  width:100%!important;
  max-width:100%!important;
  margin-left:0!important;
  margin-right:0!important;
}
/* Переносимо горизонтальний відступ всередину контенту секції */
body.ct-series-fullwidth #beeteam368-primary-cw article.vidmov_series .media-items-section > .cast-variant-items-wrapper,
body.ct-series-fullwidth #beeteam368-primary-cw article.vidmov_series .media-items-section > .media-items-inner,
body.ct-series-fullwidth #beeteam368-primary-cw article.vidmov_series .media-items-section > .entry-content {
  padding-left:var(--layout_df-padding)!important;
  padding-right:var(--layout_df-padding)!important;
  box-sizing:border-box;
}
@media (max-width:575px){
  body.ct-series-fullwidth #beeteam368-primary-cw article.vidmov_series .media-items-section > .cast-variant-items-wrapper,
  body.ct-series-fullwidth #beeteam368-primary-cw article.vidmov_series .media-items-section > .media-items-inner,
  body.ct-series-fullwidth #beeteam368-primary-cw article.vidmov_series .media-items-section > .entry-content {
    padding-left:var(--layout_df-padding-mobile)!important;
    padding-right:var(--layout_df-padding-mobile)!important;
  }
}
/* Kill theme centering (auto margins) if present */
body.ct-series-fullwidth .media-items-section { margin-left:0!important; margin-right:0!important; max-width:100%!important; }
@media (min-width:1600px){
  /* Optional: keep readability, limit inner text width but align left */
  body.ct-series-fullwidth #beeteam368-primary-cw article.vidmov_series .media-items-section { padding-left:clamp(22px,2vw,42px)!important; padding-right:clamp(22px,2vw,42px)!important; }
}
/* Guard: ensure container padding restored if some earlier rules removed it */
body.ct-series-fullwidth #beeteam368-primary-cw .series-container.flush-left-fix { padding-left: var(--layout_df-padding)!important; padding-right: var(--layout_df-padding)!important; }


@media (max-width:820px){
  body.ct-series-fullwidth .entry-content ul li { padding:12px 14px; gap:14px; }
  body.ct-series-fullwidth .entry-content ul li img { width:70px; height:70px; }
}

@media (max-width:600px){
  body.ct-series-fullwidth .entry-content ul li { flex-direction:row; align-items:flex-start; }
  body.ct-series-fullwidth .entry-content ul li img { width:62px; height:62px; border-radius:8px; }
  body.ct-series-fullwidth .entry-content ul li > div { font-size:.9rem; }
}

@media (max-width:430px){
  body.ct-series-fullwidth .entry-content ul li { padding:10px 12px; gap:12px; }
  body.ct-series-fullwidth .entry-content ul li img { width:54px; height:54px; }
}
