@import url('https://cdn.jsdelivr.net/gh/rastikerdar/dana-font@v5.0.1/dana.css');
@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');
@import url('https://cdn.jsdelivr.net/gh/rastikerdar/peyda-font@v1.0.0/peyda.css');

/* Full page background when using Elementor Canvas (no theme header/footer) */
body.elementor-template-canvas {
  background: linear-gradient(180deg, #05070d 0%, #0a1128 40%, #0E2EB0 200%);
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

.dej-news-page {
  direction: rtl;
  font-family: Dana, Peyda, Vazirmatn, Tahoma, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  --dej-blue: #0E2EB0;
  --dej-gold: #C1A61A;
  --dej-white: #F9F8F8;
  --dej-ink: #0f172a;
  --dej-muted: #64748b;
  --dej-line: rgba(14, 46, 176, .12);
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(18px, 3vw, 34px);
  color: var(--dej-ink);
}

.dej-news-hero {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(135deg, var(--dej-blue) 0%, #071a73 70%, #05070d 100%);
  color: var(--dej-white);
  padding: clamp(26px, 5vw, 56px);
  margin-bottom: 22px;
  box-shadow: 0 22px 70px rgba(14, 46, 176, .23);
}

.dej-news-hero::before {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 20% 20%, rgba(193,166,26,.28), transparent 24%),
    radial-gradient(circle at 80% 70%, rgba(249,248,248,.11), transparent 28%);
  pointer-events: none;
}

.dej-news-hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
}

.dej-news-kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(193,166,26,.35);
  background: rgba(193,166,26,.13);
  color: var(--dej-gold);
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 900;
  font-size: 12px;
}

.dej-news-title {
  margin: 0;
  color: var(--dej-white);
  font-size: clamp(28px, 5vw, 52px);
  line-height: 1.15;
  font-weight: 950;
  letter-spacing: -1px;
}

.dej-news-title span {
  color: var(--dej-gold);
}

.dej-news-subtitle {
  max-width: 760px;
  margin: 0;
  color: rgba(249, 248, 248, .82);
  line-height: 2;
  font-size: 14px;
}

.dej-news-toolbar {
  background: rgba(255, 255, 255, .86);
  border: 1px solid var(--dej-line);
  border-radius: 22px;
  padding: 14px;
  margin-bottom: 20px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.dej-news-toolbar .dej-filter-panel {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--dej-ink);
}

.dej-news-toolbar .dej-filter-panel select,
.dej-news-toolbar .dej-filter-panel input {
  color: var(--dej-ink);
  background: #fff;
  border: 1px solid #dbe2ef;
  min-height: 44px;
  border-radius: 14px;
  font-family: inherit;
  font-weight: 700;
}

.dej-news-toolbar .dej-filter-panel button {
  min-height: 44px;
  border-radius: 14px;
  background: var(--dej-blue);
  color: var(--dej-white);
  transition: .2s ease;
}

.dej-news-toolbar .dej-filter-panel button:hover {
  background: #0a258f;
  transform: translateY(-1px);
}

.dej-news-per-page {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(14,46,176,.1);
  color: var(--dej-muted);
  font-size: 12px;
  font-weight: 900;
}

.dej-news-per-page select {
  min-height: 38px;
  border-radius: 12px;
  border: 1px solid #dbe2ef;
  background: #fff;
  color: var(--dej-ink);
  padding: 0 10px;
  font-family: inherit;
  font-weight: 800;
}

.dej-news-list {
  display: grid;
  gap: 16px;
}

.dej-news-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 18px;
  align-items: stretch;
  background: #fff;
  border: 1px solid var(--dej-line);
  border-radius: 24px;
  padding: 16px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .07);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.dej-news-card:hover {
  transform: translateY(-3px);
  border-color: rgba(193,166,26,.38);
  box-shadow: 0 18px 46px rgba(14, 46, 176, .12);
}

.dej-news-card__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dej-news-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--dej-muted);
  font-size: 12px;
  font-weight: 800;
}

.dej-news-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--dej-gold);
  box-shadow: 0 0 0 5px rgba(193,166,26,.13);
}

.dej-news-card__title {
  margin: 0;
  font-size: clamp(18px, 2.3vw, 24px);
  line-height: 1.6;
  font-weight: 950;
}

.dej-news-card__title a {
  color: #0b1226;
  text-decoration: none;
  transition: color .18s ease;
}

.dej-news-card__title a:hover {
  color: var(--dej-blue);
}

.dej-news-card__excerpt {
  margin: 0;
  color: #475569;
  line-height: 2.2;
  font-size: 14px;
  text-align: justify;
  text-justify: inter-word;
}

.dej-news-card__media {
  min-height: 200px;
  max-height: 320px;
  border-radius: 18px;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(14,46,176,.1);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  aspect-ratio: 16/9;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}

.dej-news-card__media img,
.dej-news-card__media video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

/* Safari & iOS fixes */
@supports (-webkit-media-controls) {
    .dej-news-card__media video {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
        -webkit-object-fit: contain !important;
    }
}

.dej-news-card__media--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dej-blue);
  font-size: 34px;
  font-weight: 900;
}

.dej-news-card .dej-term-row {
  margin: 0;
}

.dej-news-card .dej-term-chip {
  background: rgba(14,46,176,.08);
  color: var(--dej-blue);
  border-color: rgba(14,46,176,.18);
}

.dej-news-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 6px;
}

.dej-news-telegram-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--dej-blue);
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;
  border: 1px solid rgba(14,46,176,.18);
  background: rgba(14,46,176,.06);
  border-radius: 999px;
  padding: 7px 12px;
  transition: .2s ease;
}

.dej-news-telegram-link:hover {
  background: var(--dej-blue);
  color: var(--dej-white);
}

.dej-news-actions .dej-engagement-row {
  margin-top: 0;
}

.dej-news-empty {
  background: #fff;
  border: 1px dashed rgba(14,46,176,.25);
  border-radius: 24px;
  padding: 42px 20px;
  text-align: center;
  color: var(--dej-muted);
  font-weight: 800;
}

.dej-news-pagination {
  margin-top: 26px;
  display: flex;
  justify-content: center;
}

.dej-news-pagination ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.dej-news-pagination li {
  margin: 0;
}

.dej-news-pagination a,
.dej-news-pagination span {
  min-width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid rgba(14,46,176,.15);
  background: #fff;
  color: var(--dej-blue);
  text-decoration: none;
  font-size: 13px;
  font-weight: 950;
  box-shadow: 0 8px 20px rgba(15,23,42,.05);
}

.dej-news-pagination a:hover,
.dej-news-pagination .current {
  background: var(--dej-blue);
  color: var(--dej-white);
  border-color: var(--dej-blue);
}

@media (max-width: 820px) {
  .dej-news-card {
    grid-template-columns: 1fr;
  }

  .dej-news-card__media {
    order: -1;
    min-height: 190px;
  }
}

@media (max-width: 520px) {
  .dej-news-page {
    padding: 12px;
  }

  .dej-news-hero {
    border-radius: 20px;
    padding: 24px 18px;
  }

  .dej-news-card {
    border-radius: 20px;
    padding: 12px;
  }

  .dej-news-card__media {
    min-height: 165px;
  }
}
