/*
Theme Name: SerialDekho
Theme URI: https://serialdekhlo.com
Author: Your Name
Author URI: NIL
Description: A custom theme for SerialDekho,
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: custom-theme, video, serials
Text Domain: serialdekhlo
*/

/*
 This file is necessary for WordPress theme details.
 We are doing most styling via Tailwind CSS, loaded from 'functions.php'.
 But some base styles can be added here.
*/

body {
    /* This sets the default background color for the entire site,
      to get a dark look on every page like 'apnetv'.
      This is the color code for Tailwind 'bg-gray-900'.
    */
    background-color: #111827;
    color: #d1d5db; /* Tailwind 'text-gray-300' */
}

/*
  This CSS has been moved from 'index.php'
  to keep the code clean.
*/
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}
.scrollbar-hide {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* ... your previous style.css code ... */

/**
 * Scrollbar Hide CSS
 * This code was moved from 'index.php'
 */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}
.scrollbar-hide {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Fix for WhatsApp icon background */
.share-buttons img.whatsapp-icon-fix {
    background-color: white; /* Gives a white background to the WhatsApp icon */
    border-radius: 0.5rem; /* Rounded corners (like the others) */
}

/* --- Top Bar Marquee (FIXED - Always running) --- */

.marquee-container {
    position: relative;
    width: 100%;
    /* This gives a gradient effect so text fades from the sides */
    -webkit-mask-image: linear-gradient(to right, transparent, white 10%, white 90%, transparent);
    mask-image: linear-gradient(to right, transparent, white 10%, white 90%, transparent);
}

.marquee-content {
    display: flex;
    /* Adjust speed here (e.g., change 30s to 40s or 20s) */
    animation: marquee 30s linear infinite; 
    list-style: none;
    padding: 0;
    margin: 0;
}

.marquee-item {
    flex-shrink: 0; /* Prevents items from shrinking */
}

/* Marquee Animation */
@keyframes marquee {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); } /* -50% because we duplicated the list */
}

/* --- Pagination Styling --- */

.pagination-links {
    clear: both;
    margin-top: 2rem; /* A little space above */
}

.pagination-links .nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem; /* 8px space between items */
    flex-wrap: wrap; /* For mobile */
}

/* Hide the "Posts navigation" text */
.pagination-links .nav-links .screen-reader-text {
    display: none;
}

/* Style for ALL links (Next, Last, numbers) */
.pagination-links .nav-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem; /* 14px */
    font-weight: 500;
    color: #d1d5db; /* text-gray-300 */
    border-radius: 9999px; /* full-rounded */
    min-width: 2.25rem; /* 36px */
    height: 2.25rem; /* 36px */
    padding: 0 0.75rem;
    transition: background-color 0.2s, color 0.2s;
    border: 1px solid transparent; /* Space for border */
}

/* Style for non-link spans (current page, dots) */
.pagination-links .nav-links span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem; /* 14px */
    font-weight: 500;
    color: #d1d5db; /* text-gray-300 */
    border-radius: 9999px; /* full-rounded */
    min-width: 2.25rem; /* 36px */
    height: 2.25rem; /* 36px */
    padding: 0 0.5rem; /* Less padding for numbers */
}

/* Style for hover (links only) - UPDATED */
.pagination-links .nav-links a:hover {
    background-color: #000000; /* black */
    color: #ffffff; /* text-white */
    font-weight: 700; /* Bold like current page */
    border: 1px solid #4b5563; /* Border like current page */
}

/* Current page number (the black circle) */
.pagination-links .nav-links span.current {
    background-color: #000000; /* black */
    color: #ffffff; /* text-white */
    font-weight: 700;
    border: 1px solid #4b5563; /* bg-gray-600 */
}

/* Dots (...) */
.pagination-links .nav-links span.dots {
    background-color: transparent;
    border: none;
    color: #d1d5db;
}

/* Specific style for "Next" and "Last" text links */
.pagination-links .nav-links .next,
.pagination-links .nav-links .last-page-link {
    font-weight: 700;
    padding: 0 1rem; /* More padding */
}

/* Keep the previous link hidden (which we emptied in PHP) */
.pagination-links .nav-links .prev {
    display: none;
}

/* --- [ NAYA CODE: Comment Form Styling ] --- */

.comment-form {
    margin-top: 2rem;
}

#reply-title {
    font-size: 1.5rem; /* 24px */
    font-weight: 600;
    color: #ffffff; /* white */
    border-bottom: 1px solid #4b5563; /* border-gray-600 */
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.comment-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #d1d5db; /* text-gray-300 */
}

/* Fixing the white text boxes */
.comment-form textarea,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
    width: 100%;
    background-color: #1F2937; /* bg-gray-800 */
    color: #d1d5db; /* text-gray-300 */
    border: 1px solid #4b5563; /* border-gray-600 */
    border-radius: 0.375rem; /* rounded-md */
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

/* On focus (click) */
.comment-form textarea:focus,
.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus {
    outline: none;
    border-color: #3B82F6; /* blue-500 */
    box-shadow: 0 0 0 2px #3B82F6;
}

/* "Post Comment" button */
.form-submit .submit {
    background-color: #000000; /* Black */
    color: #ffffff; /* White */
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem; /* rounded-md */
    border: 1px solid #4b5563; /* border-gray-600 */
    cursor: pointer;
    transition: background-color 0.2s;
}

/* Button hover */
.form-submit .submit:hover {
    background-color: #374151; /* bg-gray-700 */
}

/* "Save my name..." checkbox */
.comment-form-cookies-consent {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.comment-form-cookies-consent input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    background-color: #1F2937; /* bg-gray-800 */
    border: 1px solid #4b5563; /* border-gray-600 */
    border-radius: 0.25rem;
}

.comment-form-cookies-consent label {
    margin-bottom: 0; /* Reset margin from above */
    font-weight: 400; /* Normal font */
}

/* Custom Styles for Policy Pages - UPDATED */
.entry-content h2,
.entry-content h3 {
    font-size: 1.8rem; /* Pehle 2rem tha, ab thoda chota kiya */
    font-weight: 700; /* bold */
    color: #E5E7EB; /* text-gray-200 */
    margin-top: 2.5rem; /* 40px */
    margin-bottom: 1rem; /* 16px */
    line-height: 1.3; /* Thoda tight */
}

/* Agar aap chahein to sirf h2 ko thoda aur bara rakh sakte hain */
/*
.entry-content h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #E5E7EB;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}
.entry-content h3 {
    font-size: 1.6rem;
    font-weight: 700; // Same bold as h2
    color: #E5E7EB;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
}
*/

.entry-content p {
    line-height: 1.6;
    margin-bottom: 1rem;
}

/*
==========================================================================
 CUSTOM STYLES (Background, Hover Effects, Font Weights)
==========================================================================
*/

/* === NAYA: ApneTV jaisa Background Color === */
html {
    background-color: #111111; /* Fallback */
}
body {
    background-color: #111111 !important; /* ApneTV ka exact dark color */
}

/* === NAYA: Slide-in Menu CSS === */
#mobile-slide-menu {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px; /* Menu width */
    background-color: #000000; /* ApneTV menu (Black) */
    z-index: 10000;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    overflow-y: auto;
    border-right: 1px solid #333;
}
#mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #333;
}
#mobile-menu-close-btn {
    color: #9ca3af; /* gray-400 */
    padding: 5px;
}
#mobile-menu-close-btn:hover {
    color: #ffffff;
}
#mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7); /* Darker overlay */
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s;
}
#page {
    /* Yeh aapka main content wrapper hai */
    transition: transform 0.3s ease-in-out;
    background-color: #111111; /* Page content ka background */
    min-height: 100vh; /* Ensure page takes full height */
}
/* --- Open State --- */
body.menu-open #mobile-slide-menu {
    transform: translateX(0);
}
body.menu-open #page {
    transform: translateX(280px); /* Menu width jitna push karein */
}
body.menu-open #mobile-menu-overlay {
    opacity: 1;
    visibility: visible;
}
/* === Slide-in Menu CSS Khatam === */


/* --- PREMIUM OTT STYLE BUTTONS --- */
.free-link-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Text ko left side par rakhega */
    gap: 12px;
    padding: 10px 20px; /* Button ko thoda patla aur smart kiya hai */
    margin: 0 0 8px 0 !important; /* Opar ka gap 0, aur neeche sirf 8px ka gap */
    background: #1f2937 !important; /* Dark grey color */
    border: 1px solid #374151 !important; /* Halki si grey border */
    color: #e5e7eb !important;
    border-radius: 6px !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    width: 100%;
    max-width: 400px; /* Buttons ki chaurai (width) ko control karega */
    box-shadow: none !important; /* Purana ajeeb shadow khatam kar diya */
}

/* Hover Effect - Jab mouse upar jaye */
.free-link-btn:hover {
    background: #2563eb !important; /* Premium Blue */
    border-color: #3b82f6 !important;
    color: #ffffff !important;
}

.free-link-btn .icon svg {
    width: 18px;
    height: 18px;
}

/* WordPress ke automatic extra gap (Paragraphs) ko fix karne ke liye */
.entry-content p:has(> .free-link-btn) {
    margin-bottom: 0 !important;
    margin-top: 0 !important;
}

/* --- Page Headings CSS (Policy Pages) --- */
.page .entry-content h2,
.page .entry-content h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #E5E7EB;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}
.page .entry-content p {
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* --- Category & Single Post Font Weights --- */
.archive .entry-header .entry-title a,
.single-post .entry-header .entry-title { 
    font-weight: 300 !important;
}
.breadcrumbs-container span {
    font-weight: 400 !important; 
}
h2 {
    font-weight: 700 !important; 
}
h3 {
    font-weight: 400 !important; 
}
.channel-section h2.font-semibold {
    font-weight: 600 !important;
}
.drama-scroll h3.font-normal {
    font-weight: 400 !important;
}
.latest-serials h3.font-normal { /* Latest shows ke titles ko bhi normal rakhein */
    font-weight: 400 !important;
}

/* --- Pagination (First/Last links) --- */
.pagination-links .first-page-link,
.pagination-links .last-page-link {
    /* Yahan aap 'First' aur 'Last' ke liye specific styling daal sakte hain, agar zaroori ho */
    /* Example:
    background-color: #333;
    border: 1px solid #555;
    */
}

/* --- Thumbnail Play Icon Effect --- */
.post-thumbnail-container {
    position: relative;
}
.play-icon-overlay {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 32px;
    height: 32px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    z-index: 10;
    pointer-events: none;
}
.play-icon-overlay::after {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 12px solid white;
    margin-left: 3px;
}
.post-card-link:hover .play-icon-overlay {
    opacity: 1;
}
.post-card-link:hover .post-thumbnail-container img {
    box-shadow: 0 0 20px 6px rgba(255, 255, 255, 0.5);
}

/* --- Layout Shift (Hover Zoom) Fix --- */
.hover\:scale-105:hover {
    z-index: 40 !important; /* Isay 50 se 40 kar diya hai */
}

/* --- Menu Always on Top Fix --- */
#masthead {
    z-index: 999 !important; /* Yeh menu ko hamesha sabse upar rakhega */
}

/* --- Scroll Button Fixes --- */
.channel-section .scroll-btn {
    position: absolute !important;
    top: 38% !important; /* Adjust this value if needed */
    transform: translateY(-38%) !important;
    background-color: rgba(0, 0, 0, 0.6) !important;
    color: #ffffff !important;
    transition: all 0.3s ease !important;
    border: none !important;
    border-radius: 9999px !important;
    padding: 8px !important;
    z-index: 99 !important;
    opacity: 0 !important;
    cursor: pointer !important;
}
.channel-section .scroll-btn:hover {
    background-color: #ffffff !important;
    color: #000000 !important;
}
.channel-section .scroll-btn:hover svg {
    color: #000000 !important;
}
.channel-section .scroll-btn svg {
    transition: color 0.3s ease !important;
}
.channel-section .group:hover .scroll-btn {
    opacity: 1 !important;
}
.channel-section .scroll-btn.left-0 {
    left: 0 !important;
}
.channel-section .scroll-btn.right-0 {
    right: 0 !important;
}

/* --- Enhanced Pagination Buttons (Mobile Friendly) --- */
.pagination-links .nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap; /* ✅ important for mobile wrapping */
  gap: 0.4rem;
  margin: 1rem 0;
  text-align: center;
}

.pagination-links .nav-links a,
.pagination-links .nav-links span {
  background-color: #1f2937;      /* gray-800 background */
  border: 1px solid #374151;      /* gray-700 border */
  color: #e5e7eb;                 /* gray-200 text */
  border-radius: 9999px;          /* rounded pill */
  min-width: 2.2rem;
  height: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.25s ease;
  text-decoration: none;
  word-break: keep-all; /* ✅ stops breaking numbers weirdly */
}

.pagination-links .nav-links a:hover {
  background-color: #2563eb;      /* blue-600 */
  border-color: #3b82f6;          /* blue-500 */
  color: #ffffff;
  transform: scale(1.05);
}

.pagination-links .nav-links span.current {
  background-color: #000000;
  border-color: #4b5563;
  color: #ffffff;
  font-weight: 700;
}

.pagination-links .nav-links span.dots {
  background: transparent;
  border: none;
}

.pagination-links .nav-links .next,
.pagination-links .nav-links .last-page-link {
  padding: 0 1rem;
  font-weight: 600;
}

/* --- Responsive tweaks --- */
@media (max-width: 640px) {
  .pagination-links .nav-links {
    gap: 0.3rem;
    row-gap: 0.4rem; /* ✅ ensures multiple rows have spacing */
  }

  .pagination-links .nav-links a,
  .pagination-links .nav-links span {
    min-width: 1.9rem;
    height: 1.9rem;
    font-size: 0.8rem;
    padding: 0 0.5rem;
  }
}

/* --- Mobile Menu Button Click / Press Effect --- */
#menu-main-menu li a {
  display: block;
  padding: 12px 18px;
  color: #ffffff;
  text-decoration: none;
  background-color: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: background-color 0.2s ease, transform 0.1s ease;
}

/* Hover effect (when finger hovers) */
#menu-main-menu li a:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

/* Active effect (when tapped/clicked) */
#menu-main-menu li a:active {
  background-color: rgba(59, 130, 246, 0.3);  /* Light blue press effect */
  transform: scale(0.97);                     /* Slight press animation */
  border-radius: 6px;
}

/* ===========================================================
   CHANNEL HEADING (Logo + Title smaller)
   =========================================================== */
.channel-heading .channel-logo {
  height: 2rem !important; /* pehle h-10 (~2.5rem) tha */
  width: auto !important;
}

.channel-heading h2 {
  font-size: 1.125rem !important;      /* pehle text-xl (~1.25rem) tha */
  font-weight: 600 !important;
  line-height: 1.2 !important;
}

@media (min-width: 640px) {
  .channel-heading h2 {
    font-size: 1.125rem !important; /* sm:text-2xl override */
  }
  .channel-heading .channel-logo {
    height: 2rem !important; /* thoda bara for desktop clarity */
  }
}


@media (max-width: 768px) {
  /* Sidebar ya 'Other Channels' section ke liye extra top spacing */
  .sidebar,
  .widget-area,
  .other-channels-section,
  .channel-section {
    margin-top: 2rem; /* Increase if you want more gap */
  }
}

img {
  transition: opacity 0.3s ease-in-out;
  opacity: 1 !important;
}
img[data-lazy-loaded="false"] {
  opacity: 0;
}

/* Fix episodes badge invisibility */
.channel-section .episodes-badge,
.channel-section .episodes-badge * {
    position: relative !important;
    z-index: 9999 !important;
    pointer-events: none !important;
}

