/* =====================================================
   CDIS Premium Q1 Theme - Scientific IRG
   FINAL FIXED VERSION
===================================================== */

/* ================= BASE ================= */
body {
  font-family: 'Roboto', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #222;
  background-color: #ffffff;
}

/* ================= HEADINGS ================= */
h1, h2, h3, h4, h5, h6,
.pkp_page_title,
.obj_article_summary .title a {
  font-family: 'Poppins', sans-serif !important;
  font-weight: 600;
  letter-spacing: 0.25px;
  color: #0b5ed7;
}

/* ================= NAVIGATION ================= */
.pkp_navigation_primary > li > a {
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  transition: all 0.2s ease;
}

.pkp_navigation_primary > li > a:hover {
  color: #0b5ed7;
}

/* ================= HERO HEADER ================= */
.pkp_structure_head {
  background: linear-gradient(135deg, #0b5ed7 0%, #0a3ea8 100%);
  color: #fff;
}

.pkp_site_name .is_text {
  font-family: 'Poppins', sans-serif !important;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
}

/* ================= ARTICLE CARDS ================= */
.obj_article_summary {
  border: 1px solid #e6e9ef;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  background: #ffffff;
  transition: all 0.25s ease;
}

.obj_article_summary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.08);
}

/* ================= ARTICLE PAGE ================= */
.obj_article_details {
  font-size: 16px;
  line-height: 1.75;
}

.obj_article_details .item .label {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
}

/* ================= BUTTONS ================= */
button,
.pkp_button,
.cmp_button,
input[type="submit"] {
  font-family: 'Poppins', sans-serif !important;
  border-radius: 8px;
  transition: all 0.2s ease;
}

button:hover,
.pkp_button:hover,
.cmp_button:hover {
  transform: translateY(-1px);
}

/* ================= LINKS ================= */
a {
  color: #0b5ed7;
  transition: color 0.2s ease;
}

a:hover {
  color: #084298;
  text-decoration: underline;
}

/* ================= FORMS ================= */
input,
select,
textarea {
  font-family: 'Roboto', sans-serif !important;
  border-radius: 6px;
}

/* ================= FOOTER ================= */
.pkp_structure_footer_wrapper {
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  background: #f8f9fb;
}

/* =====================================================
   🌙 DARK MODE — PROFESSIONAL FIX
===================================================== */
@media (prefers-color-scheme: dark) {

  body {
    background-color: #0f172a;
    color: #e5e7eb;
  }

  h1, h2, h3, h4, h5, h6,
  .pkp_page_title,
  .obj_article_summary .title a {
    color: #60a5fa !important;
  }

  a {
    color: #60a5fa;
  }

  a:hover {
    color: #93c5fd;
  }

  /* ===== ARTICLE CARDS ===== */
  .obj_article_summary {
    background: #111827;
    border-color: #1f2937;
    color: #e5e7eb !important;
  }

  /* ===== ARTICLE DETAILS ===== */
  .obj_article_details,
  .obj_article_details .item,
  .obj_article_details .value,
  .obj_article_details .label {
    color: #e5e7eb !important;
  }

  /* ===== AUTHORS ===== */
  .authors,
  .authors a,
  .author {
    color: #e5e7eb !important;
  }

  /* ✅ FIX: UNIVERSITY NAME (AFFILIATION) */
  .authors .affiliation,
  .authors .value,
  .obj_article_details .affiliation,
  .obj_article_details .authors .value,
  .item .value,
  .item .affiliation {
    color: #cbd5e1 !important;
  }

  /* كلمة Author */
  .authors .label,
  .item .label {
    color: #e5e7eb !important;
  }

  /* ===== SIDEBAR ===== */
  .pkp_block,
  .pkp_block .content,
  .block {
    color: #e5e7eb !important;
    background: transparent;
  }

  /* ===== HEADER ===== */
  .pkp_structure_head {
    color: #ffffff !important;
  }

  /* ===== BUTTONS ===== */
  .pkp_button,
  .cmp_button,
  button {
    color: #ffffff !important;
  }

  /* ===== FOOTER ===== */
  .pkp_structure_footer_wrapper {
    background: #020617;
    color: #cbd5e1;
  }

  /* ===== FORMS ===== */
  input,
  select,
  textarea {
    background: #020617;
    color: #e5e7eb;
    border-color: #1f2937;
  }
}

/* ================= ARABIC SUPPORT ================= */
html[lang="ar"] body {
  font-family: 'Cairo', sans-serif !important;
}

/* =====================================================
   📚 FORCE SHOW REFERENCES
===================================================== */
.references,
.ref-list,
.item.references,
.citation_output,
.article-references,
.cmp_article_references,
.entry_details .references {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  max-height: none !important;
}

.references h2,
.references h3,
.cmp_article_references h2 {
  color: #e67e22;
  font-weight: 700;
  margin-top: 30px;
}

.references li {
  margin-bottom: 8px;
  line-height: 1.6;
}