/**
 * ==========================================================================
 * TEMAJET - ÇERÇEVELİ & JİLET GİBİ KURUMSAL MANŞET ALTI EN ÇOK OKUNANLAR
 * Benzersiz İzolasyon Sınıfı: .temajet-framed-popular-news / .tfpn-*
 * Sitedeki diğer tüm modüllerden (Örn: Trend Haberler) %100 BAĞIMSIZDIR.
 * ==========================================================================
 */

/* Ana Kapsayıcı */
.temajet-framed-popular-news {
  width: 100%;
  margin-top: 12px;
  margin-bottom: 28px;
  box-sizing: border-box;
  clear: both;
  font-family: var(--tfpn-font, inherit);
}

.temajet-framed-popular-news .tfpn-box {
  background: #ffffff;
  border-radius: 12px;
  padding: 16px 18px 18px;
  border: 1px solid #edf0f5;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.03);
  box-sizing: border-box;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

/* --------------------------------------------------------------------------
   MODÜL BAŞLIK ŞERİDİ
   -------------------------------------------------------------------------- */
.temajet-framed-popular-news .tfpn-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f1f5f9;
  position: relative;
}

.temajet-framed-popular-news .tfpn-title-wrap {
  display: flex;
  align-items: center;
  gap: 9px;
}

.temajet-framed-popular-news .tfpn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #ff416c, #ff4b2b);
  color: #ffffff;
  border-radius: 6px;
  font-size: 13px;
  box-shadow: 0 2px 8px rgba(255, 75, 43, 0.3);
}

.temajet-framed-popular-news .tfpn-heading {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1;
  font-family: var(--tfpn-font, inherit);
}

.temajet-framed-popular-news .tfpn-line {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, #f1f5f9 0%, transparent 100%);
  margin: 0 14px;
}

.temajet-framed-popular-news .tfpn-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: #d90429;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  background: rgba(217, 4, 41, 0.08);
  padding: 4px 9px;
  border-radius: 12px;
}

.temajet-framed-popular-news .tfpn-pulse {
  width: 6px;
  height: 6px;
  background-color: #d90429;
  border-radius: 50%;
  display: inline-block;
  animation: tfpnPulseAnim 1.8s infinite ease-in-out;
}

@keyframes tfpnPulseAnim {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.4); opacity: 1; box-shadow: 0 0 6px rgba(217, 4, 41, 0.6); }
  100% { transform: scale(0.9); opacity: 0.8; }
}

/* --------------------------------------------------------------------------
   HABER GRID DÜZENİ (MASAÜSTÜ)
   -------------------------------------------------------------------------- */
.temajet-framed-popular-news .tfpn-grid {
  display: grid;
  grid-template-columns: repeat(var(--tfpn-cols, 5), 1fr);
  gap: 14px;
  width: 100%;
  box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   ÇERÇEVELİ HABER KARTI (KURUMSAL MİKRO ÇERÇEVE)
   -------------------------------------------------------------------------- */
.temajet-framed-popular-news .tfpn-card {
  display: flex;
  flex-direction: column;
  background: var(--tfpn-bg, #ffffff);
  border: 1px solid var(--tfpn-border, #e2e8f0);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none !important;
  color: inherit;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease, border-color 0.22s ease;
  position: relative;
  will-change: transform;
  box-sizing: border-box;
}

.temajet-framed-popular-news .tfpn-card:hover {
  transform: translateY(-3px);
  border-color: #cbd5e1;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.12);
}

/* --------------------------------------------------------------------------
   GÖRSEL KAPSAYICI (16:9 CLS Korumalı, Canlı & Keskin)
   -------------------------------------------------------------------------- */
.temajet-framed-popular-news .tfpn-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 120px;
  background: #0f172a;
  overflow: hidden;
}

.temajet-framed-popular-news .tfpn-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(105%) saturate(110%);
  image-rendering: -webkit-optimize-contrast;
  display: block;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.temajet-framed-popular-news .tfpn-card:hover .tfpn-thumb {
  transform: scale(1.05);
  filter: contrast(108%) saturate(115%);
}

/* Dikkat Çekici Sıralama Rozetleri (Badges) */
.temajet-framed-popular-news .tfpn-rank-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 800;
  color: #ffffff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45);
  font-family: monospace, sans-serif;
  letter-spacing: -0.5px;
}

.temajet-framed-popular-news .tfpn-rank-1 {
  background: linear-gradient(135deg, #e63946, #d90429);
}

.temajet-framed-popular-news .tfpn-rank-2 {
  background: linear-gradient(135deg, #f7971e, #ffd200);
  color: #111111;
}

.temajet-framed-popular-news .tfpn-rank-3 {
  background: linear-gradient(135deg, #00b4db, #0083b0);
}

.temajet-framed-popular-news .tfpn-rank-def {
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(4px);
}

/* Kategori Etiketi */
.temajet-framed-popular-news .tfpn-cat-tag {
  position: absolute;
  bottom: 8px;
  left: 8px;
  z-index: 3;
  font-size: 9.5px;
  font-weight: 700;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: 1.2;
}

/* --------------------------------------------------------------------------
   BAŞLIK & METİN ALANI (2 Satır Sınırlandırma, Özel Renk & Font)
   -------------------------------------------------------------------------- */
.temajet-framed-popular-news .tfpn-info {
  padding: 12px 12px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.temajet-framed-popular-news .tfpn-card-title {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.42;
  color: var(--tfpn-title-color, #1a1a1a);
  font-family: var(--tfpn-font, inherit);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 2.85em;
  max-height: 2.85em;
  transition: color 0.18s ease;
}

.temajet-framed-popular-news .tfpn-card:hover .tfpn-card-title {
  color: #d90429;
}

/* Meta Bilgileri (Varsayılan Olarak Gizli) */
.temajet-framed-popular-news .tfpn-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid #f1f5f9;
  font-size: 11px;
  color: #64748b;
}

.temajet-framed-popular-news .tfpn-author,
.temajet-framed-popular-news .tfpn-date {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* --------------------------------------------------------------------------
   DARK MODE (KOYU TEMA) DESTEĞİ
   -------------------------------------------------------------------------- */
body.dark-theme .temajet-framed-popular-news .tfpn-box {
  background: #141820;
  border-color: #212836;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3);
}

body.dark-theme .temajet-framed-popular-news .tfpn-header {
  border-bottom-color: #212836;
}

body.dark-theme .temajet-framed-popular-news .tfpn-heading {
  color: #f8fafc;
}

body.dark-theme .temajet-framed-popular-news .tfpn-line {
  background: linear-gradient(90deg, #212836 0%, transparent 100%);
}

body.dark-theme .temajet-framed-popular-news .tfpn-card {
  background: #1a202c;
  border-color: #283344;
}

body.dark-theme .temajet-framed-popular-news .tfpn-card:hover {
  background: #202736;
  border-color: #3b465c;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4);
}

body.dark-theme .temajet-framed-popular-news .tfpn-card-title {
  color: #f1f5f9;
}

body.dark-theme .temajet-framed-popular-news .tfpn-card:hover .tfpn-card-title {
  color: #ff5252;
}

body.dark-theme .temajet-framed-popular-news .tfpn-meta {
  border-top-color: #242c3d;
  color: #94a3b8;
}

/* --------------------------------------------------------------------------
   TABLET VE MOBİL DUYARLI KIRILIMLAR (%100 RESPONSIVE & SWIPEABLE)
   -------------------------------------------------------------------------- */
@media (max-width: 1199px) {
  .temajet-framed-popular-news .tfpn-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 991px) {
  .temajet-framed-popular-news .tfpn-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
  .temajet-framed-popular-news .tfpn-heading {
    font-size: 15px;
  }
}

/* Mobil Ekranlar: Dokunmatik Kaydırılabilir (Swipeable Touch-Scrolling) Mimari */
@media (max-width: 768px) {
  .temajet-framed-popular-news .tfpn-box {
    padding: 12px 14px 16px;
  }

  .temajet-framed-popular-news .tfpn-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 12px;
    padding-bottom: 6px;
    scrollbar-width: none; /* Firefox */
  }

  .temajet-framed-popular-news .tfpn-grid::-webkit-scrollbar {
    display: none; /* Chrome & Safari */
  }

  .temajet-framed-popular-news .tfpn-card {
    flex: 0 0 74%;
    max-width: 270px;
    min-width: 210px;
    scroll-snap-align: start;
  }

  .temajet-framed-popular-news .tfpn-thumb-wrap {
    min-height: 120px;
  }

  .temajet-framed-popular-news .tfpn-card-title {
    font-size: 12.5px;
  }

  .temajet-framed-popular-news .tfpn-heading {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .temajet-framed-popular-news .tfpn-card {
    flex: 0 0 80%;
    max-width: 260px;
  }

  .temajet-framed-popular-news .tfpn-info {
    padding: 10px 10px 12px;
  }

  .temajet-framed-popular-news .tfpn-card-title {
    font-size: 12px;
    min-height: 2.8em;
    max-height: 2.8em;
  }
}
