/* ==========================================
   MovieHive.in - Static Listing & Category Pages Styling
   ========================================== */

/* --- 🌟 Category Hero Banner --- */
.category-hero {
  position: relative;
  max-width: 1400px;
  margin: 0 auto 0px; /* Removed bottom margin */
  padding: 20px 25px 0px 25px; /* Reduced top padding and set bottom padding to 0 */
  background-color: transparent !important; /* Flat dark look from screenshot */
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  border-radius: 0;
  overflow: visible;
  box-shadow: none !important;
}

.category-hero-overlay {
  display: none !important; /* Remove background overlay */
}

.category-hero-content {
  position: relative;
  z-index: 5;
  text-align: left;
  color: #fff;
  padding: 0;
  width: 100%;
}

.category-hero-content h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  text-transform: none;
  letter-spacing: 0px;
  margin-bottom: 8px; /* Reduced margin */
  color: #ffffff; /* White title as in screenshot */
}

.category-hero-content p {
  font-size: 1rem;
  opacity: 0.7;
  max-width: 600px;
  line-height: 1.4;
  color: #ccc;
  margin-bottom: 15px; /* Reduced margin */
}

/* Custom Genre Metadata Counter Blocks from screenshot */
.hero-metadata-grid {
  display: flex;
  gap: 40px;
  margin-top: 15px; /* Reduced margin */
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-bottom: 15px; /* Reduced padding to make it compact */
}

.hero-meta-item {
  display: flex;
  flex-direction: column;
}

.hero-meta-value {
  font-size: 1.8rem; /* Made slightly smaller for premium look */
  font-weight: 800;
  color: #ffffff;
}

.hero-meta-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #777;
  letter-spacing: 1px;
  margin-top: 2px;
}

/* --- 🎛️ Sort and Filter Panel --- */
.listing-controls {
  max-width: 1400px;
  margin: 0 auto 10px; /* Reduced margin */
  padding: 10px 25px;
  background: transparent !important;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: none !important;
  box-shadow: none !important;
}

.results-count {
  font-weight: 700;
  font-size: 1.25rem;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.results-count::before {
  content: '|';
  color: #00d2ff;
  font-weight: 800;
  margin-right: 5px;
}

.sort-select-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sort-select-wrapper label {
  font-weight: 600;
  font-size: 0.95rem;
  color: #777;
}

.sort-dropdown {
  padding: 6px 12px;
  background: #121218;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: 6px;
  font-size: 0.95rem;
  cursor: pointer;
  outline: none;
}

/* --- 🎬 Grid Structure & Movie Cards --- */
.listing-container {
  max-width: 1400px; /* Expanded from 1250px to match moviehive.tv wider layout */
  margin: 0 auto 50px;
  padding: 0 25px; /* Alka gap on both sides */
}

.listing-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr); /* Exactly 6 movies per row on desktop */
  gap: 20px 15px;
}

/* --- 📄 Static Pagination Layout --- */
.pagination-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 40px auto 60px;
  flex-wrap: wrap;
}

.pagination-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 6px;
  background: #1a1a20;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #ccc;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

body.light-mode .pagination-item {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #555;
}

.pagination-item:hover {
  background: var(--primary-gradient, #ff9900);
  color: #fff;
  border-color: transparent;
  transform: translateY(-2px);
}

.pagination-item.active {
  background: var(--primary-gradient, #ff9900);
  color: #fff;
  border-color: transparent;
  pointer-events: none;
}

.pagination-item.disabled {
  opacity: 0.3;
  pointer-events: none;
}

/* --- 📱 Responsiveness --- */
@media (max-width: 768px) {
  .category-hero {
    height: auto;
    border-radius: 0;
    padding: 20px 10px;
  }
  
  .listing-controls {
    flex-direction: column;
    align-items: stretch;
    border-radius: 0;
    margin-bottom: 20px;
    padding: 15px;
  }
  
  .listing-grid {
    grid-template-columns: repeat(3, 1fr) !important; /* Exactly 3 movies per row on mobile */
    gap: 12px 8px !important;
  }
}

/* --- 🔄 Load More Button Styles --- */
.load-more-container {
  display: flex;
  justify-content: center;
  margin: 30px 0;
  width: 100%;
}

.load-more-btn {
  background: #1a1a20;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px 35px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  font-family: 'Poppins', sans-serif;
  outline: none;
}

.load-more-btn:hover {
  background: var(--primary-gradient, #ff9900);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 153, 0, 0.4);
}

/* --- 📝 About Collection Section Styles --- */
.about-collection-section {
  max-width: 1400px;
  margin: 40px auto 20px;
  padding: 0 25px;
}

.about-collection-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 15px;
  font-family: 'Montserrat', sans-serif;
  border-left: 3px solid var(--primary-color, #ff9900);
  padding-left: 10px;
}

.about-collection-section p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #aaa;
  margin: 0;
  font-family: 'Poppins', sans-serif;
}

body.light-mode .about-collection-section h2 {
  color: #1a1a20;
}

body.light-mode .about-collection-section p {
  color: #555;
}

/* --- 🔝 Go to Top Button Override --- */
#go-to-top {
  background: var(--primary-gradient, #ff9900) !important;
}
