/*
Theme Name: Daily Manoranjan Feed
Theme URI: https://dailymanoranjan.com
Author: Daily Manoranjan
Author URI: https://dailymanoranjan.com
Description: Ultra-fast 9GAG-style entertainment feed theme with Flame Up reactions, instant sharing, sound toggles, and swipeable carousels.
Version: 2.1.0
Text Domain: daily-manoranjan-feed
*/

/* --- CSS Reset & Global Variables --- */
:root {
  --bg-main: #0e0e10;
  --bg-card: #18181c;
  --bg-card-hover: #1f1f23;
  --border-color: #26262c;
  --text-main: #ffffff;
  --text-muted: #9ca3af;
  --accent-color: #ef4444;
  --badge-bg: #27272a;
  --radius-card: 12px;
  --max-feed-width: 580px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img, video, iframe {
  max-width: 100%;
  display: block;
}

/* --- Top Header Navigation --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background-color: rgba(24, 24, 28, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
}

.header-inner {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 20px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffffff;
  cursor: pointer;
}

.site-logo-img {
  max-height: 34px;
  width: auto;
  object-fit: contain;
}

.brand-text span {
  color: #f97316;
}

.mobile-top-nav {
  display: none;
}

/* --- Layout Grid (Desktop 3-Column Architecture) --- */
.layout-container {
  display: grid;
  grid-template-columns: 240px var(--max-feed-width) 300px;
  gap: 24px;
  justify-content: center;
  padding: 24px 16px 40px 16px;
  max-width: 1200px;
  margin: 0 auto;
}

.sidebar-left,
.sidebar-right {
  position: sticky;
  top: 80px;
  height: calc(100vh - 100px);
  overflow-y: auto;
}

.sidebar-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-menu li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.sidebar-menu li a:hover,
.sidebar-menu li.current-menu-item a,
.sidebar-menu li.active a {
  background-color: var(--bg-card);
  color: var(--text-main);
}

.sidebar-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  padding: 16px;
  margin-bottom: 16px;
}

.sidebar-box h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.sidebar-ad-slot {
  background: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-card);
  min-height: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px;
  text-align: center;
}

/* --- Center Feed Stream --- */
.main-feed {
  width: 100%;
  max-width: var(--max-feed-width);
}

.single-nav-bar {
  margin-bottom: 16px;
}

.back-to-feed-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  transition: all 0.2s ease;
}

.back-to-feed-btn:hover {
  color: #fff;
  border-color: #fff;
}

.feed-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  margin-bottom: 24px;
  overflow: hidden;
  transition: border-color 0.2s ease;
  width: 100%;
}

.feed-card:hover {
  border-color: #383842;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
}

.card-category-badge {
  background-color: var(--badge-bg);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.03em;
}

.card-timestamp {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.card-title {
  padding: 0 16px 12px 16px;
}

.card-title h2 {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
  word-break: break-word;
}

.card-media {
  width: 100%;
  background-color: #000;
  position: relative;
  overflow: hidden;
}

.card-media-video {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  width: 100%;
}

.card-media-video iframe,
.card-media-video video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.sound-toggle-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  z-index: 10;
  background-color: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: transform 0.15s ease;
}

.sound-toggle-btn:active {
  transform: scale(0.92);
}

.clickable-image-link {
  display: block;
  cursor: pointer;
}

.card-media img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.carousel-container {
  position: relative;
  width: 100%;
}

.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  scroll-snap-align: start;
}

.carousel-slide img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.carousel-indicator {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  pointer-events: none;
}

/* Card Actions */
.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-top: 1px solid var(--border-color);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.action-buttons-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--bg-main);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.action-btn:hover {
  background-color: var(--bg-card-hover);
}

/* Flame Button Specifics */
.flame-count {
  display: inline-block !important;
  font-weight: 700 !important;
  font-size: 0.82rem !important;
  color: #ffffff !important;
  min-width: 14px;
  text-align: center;
}

.flame-btn.flamed {
  background-color: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
  color: #f87171;
}

.flame-btn.flamed .flame-icon {
  animation: flamePop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes flamePop {
  0% { transform: scale(1); }
  50% { transform: scale(1.4); }
  100% { transform: scale(1); }
}

.full-story-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.full-story-link:hover {
  color: #ffffff;
}

.in-feed-ad-card {
  background-color: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-card);
  margin-bottom: 24px;
  padding: 16px;
  text-align: center;
  width: 100%;
}

.ad-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.dmf-toast {
  visibility: hidden;
  min-width: 160px;
  background-color: rgba(24, 24, 28, 0.95);
  border: 1px solid #383842;
  color: #ffffff;
  text-align: center;
  border-radius: 999px;
  padding: 10px 18px;
  position: fixed;
  z-index: 1000;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(0,0,0,0.4);
  opacity: 0;
  transition: opacity 0.3s, visibility 0.3s;
}

.dmf-toast.show {
  visibility: visible;
  opacity: 1;
}

/* --- Responsive Breakpoints --- */
@media (max-width: 1024px) {
  .layout-container {
    grid-template-columns: minmax(0, 1fr);
    max-width: var(--max-feed-width);
    padding: 16px 14px 40px 14px;
  }
  .sidebar-left,
  .sidebar-right {
    display: none;
  }
}

@media (max-width: 600px) {
  html, body {
    width: 100% !important;
    overflow-x: hidden !important;
  }

  .header-inner {
    padding: 0 14px;
    height: 52px;
  }

  .site-logo-img {
    max-height: 28px;
  }

  .brand-text {
    font-size: 1.1rem;
  }

  .mobile-top-nav {
    display: flex !important;
    gap: 8px;
    overflow-x: auto;
    padding: 8px 12px 10px 12px;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background-color: var(--bg-card);
    margin: 0;
  }

  .mobile-top-nav::-webkit-scrollbar {
    display: none;
  }

  .mobile-top-nav li {
    display: inline-block;
    flex-shrink: 0;
    list-style: none;
  }

  .mobile-top-nav a,
  .mobile-pill {
    display: inline-block;
    background-color: var(--badge-bg);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 999px;
    text-decoration: none;
    flex-shrink: 0;
  }

  .mobile-top-nav .current-menu-item a,
  .mobile-pill.active {
    background-color: #f97316;
    border-color: #f97316;
    color: #ffffff;
  }

  .layout-container {
    display: block !important;
    width: 100% !important;
    padding: 12px 12px 40px 12px !important;
    margin: 0 !important;
  }

  .main-feed {
    width: 100% !important;
  }

  .feed-card {
    border-radius: 10px !important;
    margin-bottom: 16px !important;
  }

  .card-header,
  .card-title {
    padding-left: 12px;
    padding-right: 12px;
  }

  .card-actions {
    padding: 8px 12px;
  }

  .action-btn {
    padding: 5px 10px;
    font-size: 0.78rem;
  }
}
/* --- Static Pages Typography (AdSense Policy Pages) --- */
.page-content h2, 
.page-content h3 {
  color: #ffffff;
  margin-top: 20px;
  margin-bottom: 10px;
  font-weight: 700;
}

.page-content h2 {
  font-size: 1.25rem;
}

.page-content h3 {
  font-size: 1.05rem;
}

.page-content p {
  margin-bottom: 14px;
}

.page-content ul {
  margin: 12px 0 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.page-content a {
  color: #f97316;
  text-decoration: underline;
}
/* ========================================================
   DAILY MANORANJAN: 4:5 INSTAGRAM-STYLE CAROUSEL SLIDER
   ======================================================== */

.dm-carousel-container {
    position: relative;
    max-width: 520px;
    margin: 24px auto;
    overflow: hidden;
    border-radius: 12px;
    background: #0d0d0d;
    border: 1px solid #222;
    user-select: none;
}

/* 4:5 Scroll Track */
.dm-carousel-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Hide standard Firefox scrollbar */
}
.dm-carousel-track::-webkit-scrollbar {
    display: none; /* Hide Chrome/Safari scrollbar */
}

/* Individual Slide locked to 4:5 Aspect Ratio */
.dm-carousel-slide {
    flex: 0 0 100%;
    width: 100%;
    aspect-ratio: 4 / 5;
    position: relative;
    scroll-snap-align: center;
    background: #111;
}

.dm-carousel-slide img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

/* Left / Right Arrow Buttons */
.dm-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(18, 18, 18, 0.75);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s, opacity 0.2s;
}
.dm-carousel-nav:hover {
    background: rgba(255, 77, 0, 0.9);
}
.dm-carousel-prev {
    left: 12px;
}
.dm-carousel-next {
    right: 12px;
}

/* Bottom Pagination Dots */
.dm-carousel-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 10px 0 14px 0;
    background: #0d0d0d;
}
.dm-carousel-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #444;
    cursor: pointer;
    transition: all 0.25s ease;
}
.dm-carousel-dot.active {
    width: 18px;
    border-radius: 10px;
    background: #ff4d00;
}
/* ========================================================
   DAILY MANORANJAN: ARTICLE FORMATTING & SPACING
   ======================================================== */

.single-post .entry-content,
.post-content,
.card-content {
    font-size: 16px;
    line-height: 1.85 !important;
    color: #d1d5db;
}

/* Healthy paragraph spacing */
.single-post .entry-content p,
.post-content p {
    margin-bottom: 18px !important;
    line-height: 1.85 !important;
}

/* Bullet Points & Lists */
.single-post .entry-content ul,
.post-content ul {
    margin: 16px 0 22px 24px !important;
    padding-left: 10px !important;
    list-style-type: disc !important;
}

.single-post .entry-content ul li,
.post-content ul li {
    margin-bottom: 8px !important;
    line-height: 1.7 !important;
    color: #e5e7eb;
}

/* Subheadings & Section Titles */
.single-post .entry-content h3,
.post-content h3 {
    margin-top: 28px !important;
    margin-bottom: 12px !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #ff4d00 !important;
}
.single-post .post-full-card-media,
.single-post .feed-card-media,
.single-post .card-media,
.single-post .post-thumbnail,
.single-post .card-media-gallery,
.single-post .card-media-image {
    display: none !important;
}
/* ========================================================
   TEMPORARILY HIDE ADSENSE PLACEHOLDERS UNTIL APPROVAL
   ======================================================== */

/* 1. Hide In-Feed Sponsor Box */
.card-ad,
.feed-card-ad,
.feed-ad,
.dm-ad-card,
article:has(.card-badge:contains("SPONSORED")),
div:has(> .ad-label),
.feed-card:has(.card-badge) {
    display: none !important;
}

/* 2. Hide Sidebar Sponsored Widget */
aside div:has(> div:contains("Sponsored")),
aside div:has(> div:contains("Sidebar Ad Space")),
.sidebar-ad-card,
.sidebar-ad-widget,
.sidebar-ad-space {
    display: none !important;
}