/* =====================================================
   MASR Official Theme - Scientific IRG
   Full CSS for Navigation, Dropdowns, Articles, Dark Mode
===================================================== */

/* ================= 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;
  color: #b91c1c; /* أحمر MASR الرسمي */
}

/* ================= NAVIGATION MENU ================= */
.pkp_navigation_primary {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: flex-end;
    background: #b91c1c; /* اللون الأساسي للهيدر */
}

.pkp_navigation_primary > li {
    position: relative;
}

.pkp_navigation_primary > li > a {
    color: #ffffff !important;
    font-weight: 600;
    padding: 14px 18px;
    display: block;
    transition: all 0.2s ease;
}

.pkp_navigation_primary > li > a:hover,
.pkp_navigation_primary > li > a:focus {
    color: #f87171 !important; 
}

/* ================= DROPDOWN MENU ================= */
.pkp_navigation_primary li ul {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #7f1d1d; /* لون خلفية القوائم الداخلية */
    border-radius: 6px;
    min-width: 180px;
    z-index: 999;
}

.pkp_navigation_primary li:hover > ul {
    display: block;
}

.pkp_navigation_primary li ul li a {
    color: #fff !important;
    padding: 10px 15px;
    display: block;
    font-weight: 500;
    transition: background 0.2s ease;
}

.pkp_navigation_primary li ul li a:hover {
    background: #f87171;
    color: #1a1a1a !important;
}

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

/* اسم المجلة */
.pkp_site_name .is_text {
  font-family: 'Poppins', sans-serif !important;
  font-weight: 700;
}

/* ================= 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,
a:link,
a:visited {
    color: #b91c1c !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover,
a:focus {
    color: #7f1d1d !important;
    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 ================= */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #0f172a;
    color: #e5e7eb;
  }
  .obj_article_summary {
    background: #111827;
    border-color: #1f2937;
  }
  .pkp_structure_footer_wrapper {
    background: #020617;
  }
  a {
    color: #f87171;
  }
  h1, h2, h3, h4, h5, h6 {
    color: #f87171;
  }
  .pkp_structure_head {
    background: linear-gradient(135deg, #7f1d1d 0%, #450a0a 100%);
  }
  .pkp_navigation_primary > li > a {
      color: #f87171 !important;
  }
  .pkp_navigation_primary > li > a:hover,
  .pkp_navigation_primary > li > a:focus {
      color: #f43f5e !important;
  }
  .pkp_navigation_primary li ul {
      background: #450a0a;
  }
}

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

/* ================= 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;
}

.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;
}

/* ================= AUTHOR AFFILIATION ================= */
.obj_article_details .affiliation,
.obj_article_details .value,
.authors .affiliation,
.authors .value,
.item .affiliation,
.item .value {
    color: #1f2937 !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    display: block !important;
    margin-top: 2px;
    line-height: 1.4;
}

@media (prefers-color-scheme: dark) {
  .obj_article_details .affiliation,
  .obj_article_details .value,
  .authors .affiliation,
  .authors .value,
  .item .affiliation,
  .item .value {
      color: #cbd5e1 !important;
  }
}

/* ================= RESPONSIVE MENU ================= */
@media (max-width: 768px) {
  .pkp_navigation_primary {
      flex-direction: column;
  }
  .pkp_navigation_primary > li {
      width: 100%;
  }
  .pkp_navigation_primary li ul {
      position: static;
      min-width: 100%;
  }
  .pkp_navigation_primary li ul li a {
      padding: 12px 20px;
  }
}