/* ============================================
   v2/css/home.css
   استایل صفحه اصلی — اسلایدر + تب‌ها + اخبار + گیشه
   سایت اخبار استقلال — نسخه ۲
   نسخه: 2.5 — حذف دکمه‌های ناوبری از lightbox
   ============================================ */

/* ============ Slider (بالای صفحه) ============ */
.slider-section { padding: 12px 12px 0; }

.slider-main-wrapper {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
  height: 220px;
  background: var(--primary);
  touch-action: pan-y;
}

.slider-main-track {
  display: flex;
  flex-wrap: nowrap;
  height: 100%;
  transition: transform .45s cubic-bezier(.25,.46,.45,.94);
  will-change: transform;
}
.slider-main-track.dragging { transition: none; }

.slide-main {
  flex: 0 0 100%;
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  height: 100%;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  background: var(--primary);
}

.slide-main img.slide-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .75;
  z-index: 1;
  pointer-events: none;
}

.slide-main .overlay-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.3) 25%, rgba(0,0,0,0) 55%);
  z-index: 2;
  pointer-events: none;
}

.slide-main .content {
  position: relative;
  z-index: 3;
  padding: 20px 20px 34px;
  pointer-events: none;
}

.slide-main h3 {
  font-size: 1.05rem;
  margin: 0;
  color: #fff;
  line-height: 1.5;
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0,0,0,.6);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.slider-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  z-index: 5;
  padding: 4px 10px;
  background: rgba(0,0,0,.3);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 20px;
}

.slider-dots .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,.5);
  cursor: pointer;
  transition: all .3s;
  border: none;
  padding: 0;
}
.slider-dots .dot.active {
  background: var(--gold);
  transform: scale(1.2);
  width: 16px;
  border-radius: 4px;
}

/* ============ Category Tabs ============ */
.category-tabs {
  padding: 10px 12px 4px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 2px solid var(--bg);
  margin: 4px 0 8px;
}
.category-tabs::-webkit-scrollbar { display: none; }

.category-tab {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 600;
  color: #5a6a7a;
  transition: all .3s;
  cursor: pointer;
  background: var(--bg);
  border: none;
  flex-shrink: 0;
  touch-action: manipulation;
}
.category-tab.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(21,96,189,.25);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ============ News List ============ */
.news-list {
  padding: 0 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ============ News Item ============ */
.news-item {
  display: flex;
  gap: 0;
  padding: 0;
  border-bottom: none;
  align-items: stretch;
  cursor: pointer;
  transition: background .3s;
  background: #fff;
  overflow: hidden;
  min-height: 110px;
  border-radius: 10px;
}
.news-item:hover { background: var(--bg-light); }

.news-item .img-placeholder {
  width: 110px;
  min-width: 110px;
  height: auto;
  align-self: stretch;
  background: var(--grad-primary);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.5rem;
  overflow: hidden;
  position: relative;
  border-radius: 10px;
}
.news-item .img-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 10px;
}
.news-item .img-placeholder .multi-badge {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: rgba(0,0,0,.7);
  color: #fff;
  padding: 3px 8px;
  border-radius: 8px;
  font-size: .65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 2;
}
.news-item .img-placeholder .multi-badge i {
  font-size: .7rem;
  color: var(--gold);
}

.news-item .content {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.news-item .content h4 {
  font-size: .85rem;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.6;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-align: justify;
  text-align-last: right;
  -moz-text-align-last: right;
  word-spacing: -0.5px;
}

.news-item .content .footer-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  font-size: .62rem;
  color: #7a8a9a;
  gap: 6px;
  flex-wrap: wrap;
}
.news-item .content .footer-meta .stat-item {
  display: flex;
  align-items: center;
  gap: 3px;
  color: #7a8a9a;
}
.news-item .content .footer-meta .stat-item i {
  color: #7a8a9a;
}
.news-item .content .footer-meta .time-ago {
  color: #7a8a9a;
  font-weight: 600;
}
.news-item .content .footer-meta .time-ago i {
  color: #7a8a9a;
}

.heart-icon { color: #7a8a9a; }
.comment-icon { color: #7a8a9a; }

/* ============================================
   🎯 گیشه — کارت بزرگ با اسلایدر بنر
   ============================================ */
.newspaper-list {
  padding: 0 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.newspaper-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  border: 1px solid var(--border);
  transition: transform .3s, border-color .3s;
}

.newspaper-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--bg);
  background: linear-gradient(145deg, #fff, #f8fafc);
}

.newspaper-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .92rem;
  font-weight: 700;
  color: var(--primary);
  min-width: 0;
  flex: 1;
}

.newspaper-card-title i {
  color: var(--gold);
  font-size: 1rem;
  flex-shrink: 0;
}

.newspaper-card-title span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.newspaper-card-date {
  font-size: .65rem;
  color: var(--text-muted);
  background: var(--bg);
  padding: 4px 10px;
  border-radius: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.newspaper-card-date i {
  color: var(--gold);
  font-size: .7rem;
}

/* 🎯 اسلایدر داخل کارت */
.newspaper-slider {
  position: relative;
  width: 100%;
  height: 260px;
  background: #000;
  overflow: hidden;
  touch-action: pan-y;
}

.newspaper-slider-track {
  display: flex;
  flex-wrap: nowrap;
  height: 100%;
  transition: transform .45s cubic-bezier(.25,.46,.45,.94);
  will-change: transform;
}
.newspaper-slider-track.dragging { transition: none; }

.newspaper-slide {
  flex: 0 0 100%;
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: zoom-in;
  background: #111;
}

.newspaper-slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.newspaper-slide .newspaper-count-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0,0,0,.6);
  color: #fff;
  padding: 3px 10px;
  border-radius: 14px;
  font-size: .65rem;
  font-weight: 700;
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  gap: 4px;
}
.newspaper-slide .newspaper-count-badge i {
  color: var(--gold);
  font-size: .7rem;
}

/* دکمه‌های ناوبری اسلایدر */
.newspaper-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,.4);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  z-index: 5;
  backdrop-filter: blur(6px);
  transition: background .3s, transform .2s;
  touch-action: manipulation;
}
.newspaper-nav:hover {
  background: rgba(0,0,0,.65);
}
.newspaper-nav:active {
  transform: translateY(-50%) scale(.9);
}
.newspaper-nav:disabled {
  opacity: .3;
  cursor: not-allowed;
}
.newspaper-nav.prev { right: 8px; }
.newspaper-nav.next { left: 8px; }

/* Dots */
.newspaper-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  z-index: 5;
  padding: 4px 10px;
  background: rgba(0,0,0,.35);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 20px;
}

.newspaper-dots .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,.5);
  cursor: pointer;
  transition: all .3s;
  border: none;
  padding: 0;
}
.newspaper-dots .dot.active {
  background: var(--gold);
  transform: scale(1.2);
  width: 16px;
  border-radius: 4px;
}

/* حالت خالی */
.newspaper-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-light);
  font-size: .85rem;
}
.newspaper-empty i {
  font-size: 3rem;
  display: block;
  margin-bottom: 12px;
  opacity: .4;
}

/* ============================================
   🎯 Lightbox — نمایش fullscreen با زوم
   ============================================ */
.newspaper-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.95);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
}

.newspaper-lightbox.open {
  display: flex;
  animation: nlbFadeIn .25s ease;
}

@keyframes nlbFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.newspaper-lightbox .nlb-image-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.newspaper-lightbox .nlb-image-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform-origin: center center;
  transition: transform .2s ease;
  user-select: none;
  -webkit-user-drag: none;
  will-change: transform;
}

.newspaper-lightbox .nlb-close {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  color: #fff;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  backdrop-filter: blur(10px);
  transition: background .2s, transform .2s;
  touch-action: manipulation;
}
.newspaper-lightbox .nlb-close:active {
  background: rgba(255,255,255,.3);
  transform: scale(.9);
}

.newspaper-lightbox .nlb-counter {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255,255,255,.15);
  color: #fff;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: .8rem;
  font-weight: 700;
  z-index: 20;
  backdrop-filter: blur(10px);
  display: none;
}
.newspaper-lightbox .nlb-counter.show {
  display: block;
}

/* 🎯 دکمه‌های ناوبری در lightbox — مخفی */
.newspaper-lightbox .nlb-nav {
  display: none !important;
}

/* ریسپانسیو */
@media (max-width: 380px) {
  .slider-main-wrapper { height: 200px; }
  .newspaper-slider { height: 220px; }
  .newspaper-card-title { font-size: .85rem; }
  .newspaper-nav { width: 32px; height: 32px; font-size: .8rem; }
  .newspaper-lightbox .nlb-close { width: 42px; height: 42px; }
}