/* -------------------------------------------------------
   Hide extra affiliates on mobile
------------------------------------------------------- */
@media (max-width: 767px) {
  .aff-list li:nth-child(n+2) { display: none !important; }
}

/* -------------------------------------------------------
   META ROW (paysite + views on left, rating on right)
------------------------------------------------------- */
.item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;  /* Push rating to right */
  gap: 6px;
  flex-wrap: nowrap;
  font-size: 12px;
  color: #999999;
  margin-top: 4px;
  max-width: 100%;
}

/* Left side grouping */
.item-meta-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

/* Paysite truncates inline */
.item-paysite {
  display: inline-flex;
  min-width: 0;
  max-width: 60%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.item-paysite a { 
  display: inline; 
  color: #999999; 
}
.item-paysite a:hover { 
  text-decoration: underline; 
}

/* Rating on the right - bright green by default */
.item-meta .item-rating {
  flex-shrink: 0;
  white-space: nowrap;
  color: #22C55E;  /* Green for good ratings */
}

/* Red for poor ratings (50% or below) */
.item-meta .item-rating.rating-low {
  color: #ff2124;  /* Your site's red */
}


/* -------------------------------------------------------
   VIDEO TITLE - 2 LINES WITH WORKING HOVER
------------------------------------------------------- */
.item-col .item-name {
    font-size: 15px;
    font-weight: 400;
    line-height: 1.3;
    margin-top: 6px;
    margin-bottom: 0;
    
    /* Override fixed height from template */
    height: auto !important;
    min-height: 0 !important;
    
    /* Allow 2 lines with ellipsis */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
    max-height: 2.6em;
}

/* Make the link fill the container */
.item-col .item-name a {
    display: block;
    color: inherit;
    text-decoration: none;
}

/* Hover effect on the PARENT, not the link */
.item-col .item-name:hover a {
    text-decoration: underline !important;
}


/* -------------------------------------------------------
   THUMB OVERLAYS (HD + FAV)
------------------------------------------------------- */

/* HD hover motion */
.item-col:hover .item-quality {
  transform: translateY(-1px);
  opacity: 1;
}

/* Add-to-fav */
.item-col .add-to-fav {
  position: absolute;
  right: 60px;
  top: 5px;
  height: 16px;
  line-height: 16px;
  font-size: 13px;
  color: #ff2024;
  opacity: 0;
  z-index: 2;
  transition: all 0.2s ease;
  cursor: pointer;
}
.item-col:hover .add-to-fav { opacity: 1; transform: scale(1.05); }
.item-col .add-to-fav:hover { color: #b90003; }



/* -------------------------------------------------------
   STABILIZE BADGES & NUMBERS (all browsers)
------------------------------------------------------- */
.item-col .image .item-quality {
  contain: layout paint;
  will-change: transform;
  text-align: center;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* -------------------------------------------------------
   SAFARI / WEBKIT MICRO-TWEAKS
------------------------------------------------------- */

/* Desktop Safari pixel alignment */
@media screen and (min-width: 1025px) {
  @supports (-webkit-hyphens: none) and (not (-webkit-touch-callout: none)) {
    .item-col .item-quality {
      transform: translateY(-0.4px) !important;
    }
  }
}

/* Mobile Safari micro tweak */
@supports (-webkit-touch-callout: none) {
  .item-col .item-quality { transform: translateY(0.2px); }
}



/* -------------------------------------------------------
   OVERLAYS (HD + Duration + Fav)
------------------------------------------------------- */
.item-col { position: relative; }
.item-col .image { position: relative; }

/* Duration: bottom-right */
.item-col .image .item-duration {
  position: absolute !important;
  right: 6px !important;
  bottom: 6px !important;
  z-index: 3 !important;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  background: rgba(80,80,80,0.8) !important;
  color: #fff;
  padding: 4px 6px;
  border-radius: 0 !important;
  font-size: 12px;  /* Slightly increased */
  line-height: 1;
  font-weight: 600;
}
.item-col .image .item-duration .icon-clock {
  width: 14px;
  height: 14px;
  display: block;
}

/* Hide legacy meta duration */
.item-col.-video .item-meta .item-time,
.item-col.-video .item-meta .item-time.-below,
.item-col.-video .item-meta .fa-clock {
  display: none !important;
}

/* Ensure link above overlays */
.item-col > a {
  position: relative;
  z-index: 2;
  display: block;
}

/* Favorite: top-left */
.item-col .add-to-fav {
  position: absolute !important;
  top: 6px !important;
  left: 6px !important;
  right: auto !important;
  z-index: 4;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: auto !important;
  height: auto !important;
  padding: 0 !important;
  background: transparent !important;
}
.item-col .add-to-fav i,
.item-col .add-to-fav svg {
  width: 18px;
  height: 18px;
  line-height: 1;
}

/* Views meta (icon + number inline) */
.item-meta .item-views-meta {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  vertical-align: middle;
}
.item-meta .item-views-meta .icon-eye {
  width: 14px;
  height: 14px;
  display: block;
  flex-shrink: 0;
}

/* HD badge (top-right) - Enlarged to match duration */
.item-col .image .item-quality {
  position: absolute !important;
  top: 6px !important;
  right: 6px !important;
  left: auto !important;
  z-index: 3 !important;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  /* Match duration size */
  padding: 4px 6px !important;
  height: auto !important;
  line-height: 1 !important;
  min-width: 0 !important;
  width: auto !important;
  letter-spacing: 0 !important;

  font-size: 12px !important;  /* Increased from 11px */
  font-weight: 600 !important;
  text-transform: uppercase;

  background: rgba(80,80,80,0.8) !important;  /* Dark gray to match duration */
  color: #fff !important;
  border-radius: 0 !important;

  overflow: hidden;
  box-shadow: none !important;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.item-col .image .item-quality:hover {
  background: rgba(80,80,80,1) !important;
  transform: translateY(-1px);
}

@media screen and (min-width: 1025px) {
  @supports (-webkit-hyphens: none) and (not (-webkit-touch-callout: none)) {
    .item-col .image .item-quality {
      display: grid !important;        /* bulletproof centering in Safari */
      place-items: center !important;
      transform: translateY(-0.2px) !important; /* sub-pixel vertical balance */
    }
  }
}



/* -------------------------------------------------------
   BEING WATCHED NOW - Remove Category List & Fix Grid
------------------------------------------------------- */

/* Hide the category/channels list column */
.being-watched-sec .channels-list-col {
  display: none !important;
}

/* Make the being-watched column take full width */
.being-watched-sec .being-watched-col {
  width: 100% !important;
  max-width: 100% !important;
  flex: 0 0 100% !important;
}

/* Override being-watched-sec .item-col to match site defaults */
@media (min-width: 768px) {
  .being-watched-sec .item-col {
    max-width: 33.333334% !important; /* 3 per row */
  }
}

@media (min-width: 1039px) {
  .being-watched-sec .item-col {
    max-width: 25% !important; /* 4 per row */
  }
}

@media (min-width: 1469px) {
  .being-watched-sec .item-col {
    max-width: 20% !important; /* 5 per row - matches rest of site! */
  }
}

/* -------------------------------------------------------
   AD SLOTS - Desktop & Mobile Separate
------------------------------------------------------- */
.ad-slot {
  margin: 20px 0;
  text-align: center;
}

.ad-slot .ad-frame {
  max-width: 100%;
  margin: 0 auto;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Advertisement label */
.ad-slot .ad-label {
  display: block;
  font-size: 12px;
  color: #ccc;
  text-align: center;
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Desktop Ads */
.ad-slot .ad-desktop {
  display: block;
  border: none;
  max-width: 100%;
  margin: 0 auto;
}

.ad-slot .ad-desktop img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Mobile Ads */
.ad-slot .ad-mobile {
  display: none;
  border: none;
  max-width: 100%;
  margin: 0 auto;
}

.ad-slot .ad-mobile img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Show/Hide based on screen size */
@media (max-width: 767px) {
  .ad-slot .ad-desktop {
    display: none !important;
  }
  
  .ad-slot .ad-mobile {
    display: block !important;
  }
  
  .ad-slot .ad-label {
    font-size: 11px;
    color: #aaa;
  }
}

/* -------------------------------------------------------
   MOBILE ADJUSTMENTS
------------------------------------------------------- */
/* Slightly larger titles on mobile for better readability */
@media (max-width: 767px) {
  .item-col .item-name {
    font-size: 16px;  /* Up from 15px on desktop */
  }
}
