/* =========================
   Video Theme - Single Post Styles (Mobile-First)
   ========================= */

/* Layout */
.single-post-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.main-content {
    width: 100%;
}

.sidebar {
    width: 100%;
}

/* Article */
.video-post {
    background: transparent;
}

/* Title */
.video-post > h1.video-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0 0 12px;
    line-height: 1.3;
    color: var(--primary-color);
}

/* Video */
.video-wrapper {
    position: relative;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
}

.video-player {
    width: 100%;
    display: block;
}

.iframe-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
}

.iframe-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Affiliate Button */
.affiliate-button {
    text-align: center;
    padding-bottom: 16px;
}

.affiliate-button a {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 999px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(102,126,234,.4);
    transition: 0.25s ease;
}

.affiliate-button a:hover {
    transform: translateY(-2px);
}

/* Video Info */
.video-info {
    padding: 12px 0;
    margin-bottom: 12px;
}

.video-info p {
    margin: 6px 0;
    font-size: .9rem;
    color: var(--secondary-color);
}

.video-info strong {
color: var(--primary-color);
    
}

.video-info a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.video-info a:hover {
    color: var(--success-color); /* or another highlight color */
}

/* Likes / Dislikes / Comments */
.likes-dislikes {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 16px;
    align-items: center;
}

.like-btn,
.dislike-btn,
.comment-toggle-btn,
.share-btn {
    padding: 10px 24px;
    border-radius: 999px;
    border: 1px solid #d0d0d0;
    background: #f2f2f2;
    cursor: pointer;
    font-size: .9rem;
    font-weight: 500;
    transition: .2s ease;
    color: #0f0f0f;
}

.like-btn:hover,
.dislike-btn:hover,
.comment-toggle-btn:hover,
.share-btn:hover {
    background: #e5e5e5;
}

/* Content */
.post-content {
    background: #333;
    color: #fff;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}



/* =========================
   Slide-Out Comments Panel
   ========================= */

#comments-panel {
    position: fixed;
    top: 0;
    left: -420px;
    width: 400px;
    height: 100vh;
    background: #fff;
    z-index: 10000;
    transition: left .3s ease;
    box-shadow: 4px 0 25px rgba(0,0,0,.25);
}

#comments-panel.active {
    left: 0;
}

.comments-inner {
    height: 100%;
    overflow-y: auto;
    padding: 20px;
}

.close-comments {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    float: right;
}

/* Make WP comments fit nicely */
#comments-panel textarea,
#comments-panel input[type="text"],
#comments-panel input[type="email"],
#comments-panel input[type="url"] {
    width: 100%;
}

/* =========================
   Responsive
   ========================= */

@media (min-width: 768px) {
    .single-post-container {
        flex-direction: row;
        gap: 24px;
    }

    .main-content {
        flex: 1;
    }

    .sidebar {
        flex: 0 0 320px;
    }

    .likes-dislikes {
        flex-direction: row;
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    #comments-panel {
        width: 100%;
        left: -100%;
    }
}

/* Related Videos Section - FULL WIDTH */
.related-posts {
    width: 100%;
    background: #000;
    padding: 40px 0;
    margin: 40px 0 0 0;
}

.related-posts > h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 30px;
    max-width: 1400px;
    padding: 0 16px;
    color: var(--primary-color);
}

/* Related videos use the main .video-grid styles - no override needed */
.related-posts .video-grid {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 16px;
    justify-items: center; 
}

.related-posts .video-card {
    width: 100%;
    max-width: 400px;
}

.video-card:hover {
	transform: none;
	box-shadow: none;
}

.video-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Video Thumbnail Container */
.video-card .video-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
    overflow: hidden;
}

/* Thumbnail Image */
.video-card .thumbnail-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity var(--transition-normal, 0.3s ease);
}

/* Trailer Video */
.video-card .trailer-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal, 0.3s ease);
}

/* Show trailer on hover */
.video-thumbnail:hover .trailer-video {
    opacity: 1;
}
/* Only swap image when a trailer exists */
.video-thumbnail.has-trailer:hover .trailer-video {
    opacity: 1;
}

.video-thumbnail.has-trailer:hover .thumbnail-image {
    opacity: 0;
}

/* Duration Badge & Views Badge */
.video-card .duration-badge,
.video-card .views-badge {
    position: absolute;
    bottom: 10px;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
}

.video-card .duration-badge {
    right: 10px;
}

.video-card .views-badge {
    left: 10px;
}

/* Play Overlay */
.video-card .play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 2;
    pointer-events: none;
}

.video-card .video-thumbnail:hover .play-overlay {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.video-card .play-icon {
    width: 30px;
    height: 30px;
    color: #000;
    margin-left: 3px;
}

/* Video Info Section */
.video-card .video-info {
    padding: 10px 12px;
}

.video-card .video-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 10px 0;
    color: var(--primary-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Video Meta */
.video-card .video-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: var(--primary-color);
}

.video-card .video-models {
    font-weight: 500;
    color: var(--primary-color);
}

.video-card .video-views,
.video-card .video-date {
    color: var(--text-color);

}

.video-card .video-meta span:not(:last-child)::after {
    content: "•";
    margin-left: 8px;
    color: #aaa;
}
.sidebar {
    width: 100%;
}

.sidebar .widget {
    background: #000;
    padding: 16px;
    margin-bottom: 16px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex; /* ADD THIS */
    flex-direction: column; /* ADD THIS */
    align-items: center; /* ADD THIS */
}

.sidebar .widget h2,
.sidebar .widget h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 15px 0;
    color: #212529;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
    width: 100%; /* ADD THIS - keeps header full width */
    text-align: center; /* ADD THIS - centers title */
}

/* ADD THIS - Center all widget content */
.sidebar .widget > * {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

/* ADD THIS - Center images and iframes in sidebar widgets */
.sidebar .widget img,
.sidebar .widget iframe {
    display: block;
    margin: 0 auto;
}

/* ADD THIS - Center widget lists if any */
.sidebar .widget ul,
.sidebar .widget ol {
    list-style-position: inside;
    text-align: center;
}

/* Ad Zone Styling - 728x90 Banner */
.ad-zone {
    margin: 16px 0;
    text-align: center;
    max-width: 728px;
    margin-left: auto;
    margin-right: auto;
}

.ad-above-video {
    margin-bottom: 16px;
}

.ad-below-video {
    margin-top: 16px;
    margin-bottom: 16px;
}

/* Widget wrapper */
.ad-zone .widget {
    margin: 0 auto;
    padding: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
}

/* Hide widget titles in ad zones */
.ad-zone .widget-title {
    display: none;
}

/* Ad container */
.ad-zone .widget > * {
    max-width: 728px;
    margin: 0 auto;
}

/* Responsive - Scale down on mobile */
@media (max-width: 768px) {
    .ad-zone {
        max-width: 100%;
    }
    
    .ad-zone .widget > *,
    .ad-zone img,
    .ad-zone iframe {
        max-width: 100%;
        height: auto;
    }
}

/* Ensure iframes and images scale properly */
.ad-zone img,
.ad-zone iframe {
    max-width: 728px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* For 728x90 specific */
@media (min-width: 769px) {
    .ad-zone img,
    .ad-zone iframe {
        max-height: 90px;
    }
}

/* =========================
   Video Ad Zone Overlay
   ========================= */
 .video-wrapper {
  position: relative;
  z-index: 1;
}

.video-ad-zone {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 300px;
  height: 250px;
  z-index: 9999 !important;
  padding: 0;
  border-radius: 8px;
  pointer-events: auto;
  background: #fff;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

/* Remove widget padding/background */
.video-ad-zone .widget {
  padding: 0;
  margin: 0;
  background: transparent;
  box-shadow: none;
  width: 100%;
  height: 100%;
}

/* Close button styling */
.close-ad-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background-color: #ff0000;
  border: 2px solid #fff;
  color: white;
  font-weight: bold;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
  z-index: 10001;
  font-size: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.close-ad-btn:hover,
.close-ad-btn:active {
  background-color: #cc0000;
  transform: scale(1.1);
}

/* Mobile-specific tweaks */
@media (max-width: 768px) {
  .video-ad-zone {
    width: 280px;
    height: 233px;
  }
  .close-ad-btn {
    width: 48px;
    height: 48px;
    font-size: 26px;
    top: 6px;
    right: 6px;
  }
}

@media (max-width: 480px) {
  .video-ad-zone {
    width: 225px;
    height: 150px;
  }
  .close-ad-btn {
    width: 44px;
    height: 44px;
    font-size: 24px;
    top: 6px;
    right: 6px;
  }
}

/* Hide widget title */
.video-ad-zone .widget-title {
  display: none;
}

/* Ensure ad content fits properly */
.video-ad-zone img,
.video-ad-zone iframe {
  max-width: 100%;
  max-height: 100%;
  display: block;
}


