/*
 * Material Classic compatibility skin for OJS 3.5
 * Target: madi-nuralin/material v3.1.x
 */

:root {
  --mc-header: #1E6292;
  --mc-primary: #006798;
  --mc-blue: #274685;
  --mc-cyan: #3db3c5;
  --mc-text: rgba(0,0,0,.87);
  --mc-muted: rgba(0,0,0,.54);
  --mc-border: #ddd;
  --mc-soft-border: #e5e7eb;
  --mc-footer: #f8f9fa;
  --mc-content-width: 1180px;
  --mc-radius: 4px;
}

body {
  background: #fff !important;
  color: var(--mc-text) !important;
  font-family: "Noto Sans", Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
}

a { color: var(--mc-primary); }
a:hover { color: #2d71a1; }

/* Top header / navigation */
body:not(.pkp_page_login):not(.pkp_page_user) > header {
  background: linear-gradient(90deg, rgba(39,70,133,.98) 0%, rgba(30,98,146,.98) 100%) !important;
  color: #fff !important;
  box-shadow: 0 2px 10px rgba(0,0,0,.14) !important;
  padding-top: .8rem !important;
  padding-bottom: .8rem !important;
}

body > header img {
  max-height: 42px;
  width: auto;
  object-fit: contain;
}

body > header #navigationPrimary a,
body > header #navigationUser a,
body > header nav a {
  color: rgba(255,255,255,.92) !important;
  text-decoration: none !important;
}

body > header #navigationPrimary a:hover,
body > header #navigationUser a:hover,
body > header nav a:hover {
  color: #fff !important;
}

body > header #navigationPrimary > li > a {
  border-radius: 2px !important;
  padding-top: .55rem !important;
  padding-bottom: .55rem !important;
}

body > header #navigationPrimary > li > a:hover,
body > header #navigationPrimary > li > a:focus-visible {
  background: rgba(255,255,255,.10) !important;
}

/* Homepage hero: patched class + CSS-only fallback */
.material-classic-hero,
body.pkp_page_index.pkp_op_index > header + div.relative.overflow-hidden {
  position: relative !important;
  isolation: isolate;
  overflow: hidden !important;
  background: linear-gradient(to right, rgba(39,70,133,.94) 0%, rgba(61,179,197,.92) 100%) !important;
  padding-bottom: 92px !important;
}

.material-classic-hero > img,
body.pkp_page_index.pkp_op_index > header + div.relative.overflow-hidden > img {
  z-index: 0 !important;
  opacity: .16 !important;
  mix-blend-mode: soft-light;
  filter: saturate(.8) contrast(.9);
}

.material-classic-hero > div,
body.pkp_page_index.pkp_op_index > header + div.relative.overflow-hidden > div {
  position: relative;
  z-index: 2;
}

/* Classic wave */
.material-classic-hero::after,
body.pkp_page_index.pkp_op_index > header + div.relative.overflow-hidden::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  width: 100%;
  height: 150px;
  z-index: 4;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1920 355' preserveAspectRatio='none'%3E%3Cpath fill='%23ffffff' d='M0 37.134 C175.041 62.893 327.944 75.772 458.711 75.772 C654.861 75.772 870.645 40.632 1205.983 8.193 C1429.541 -13.434 1667.547 9.092 1920 75.772 L1920 355 L0 355 Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: bottom center;
  background-size: 100% 100%;
}

.material-classic-hero-grid { max-width: var(--mc-content-width) !important; }
.material-classic-hero-copy { max-width: 790px; }

body.pkp_page_index.pkp_op_index > header + div.relative.overflow-hidden > div > div {
  max-width: var(--mc-content-width) !important;
}

/* Hero title */
.material-classic-hero p.font-extrabold,
body.pkp_page_index.pkp_op_index > header + div.relative.overflow-hidden p.font-extrabold {
  display: block !important;
  color: #fff !important;
  font-size: clamp(2.25rem, 4vw, 3.5rem) !important;
  line-height: 1.12 !important;
  font-weight: 700 !important;
  letter-spacing: -.025em !important;
  margin: 0 0 1.4rem !important;
}

/* Full journal description */
.pkp_page_index .line-clamp-3 {
  -webkit-line-clamp: unset !important;
  line-clamp: unset !important;
  overflow: visible !important;
}

.material-classic-hero .line-clamp-3,
body.pkp_page_index.pkp_op_index > header + div.relative.overflow-hidden .line-clamp-3 {
  display: block !important;
  max-width: 820px;
  color: rgba(255,255,255,.93) !important;
  font-size: 1.08rem !important;
  line-height: 1.72 !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  margin-top: 0 !important;
}

.material-classic-hero .line-clamp-3 p,
body.pkp_page_index.pkp_op_index > header + div.relative.overflow-hidden .line-clamp-3 p {
  color: inherit !important;
  margin-top: 0 !important;
  margin-bottom: .8rem !important;
}

.material-classic-hero .line-clamp-3 a,
body.pkp_page_index.pkp_op_index > header + div.relative.overflow-hidden .line-clamp-3 a {
  color: #fff !important;
  text-decoration: underline !important;
}

/* Hero buttons */
.material-classic-hero a.rounded-full,
body.pkp_page_index.pkp_op_index > header + div.relative.overflow-hidden a.rounded-full {
  border-radius: var(--mc-radius) !important;
  border: 2px solid rgba(255,255,255,.92) !important;
  background: transparent !important;
  color: #fff !important;
  padding: .72rem 1.2rem !important;
  font-size: .78rem !important;
  line-height: 1.2 !important;
  font-weight: 600 !important;
  text-transform: uppercase;
  letter-spacing: .05em;
  box-shadow: none !important;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}

.material-classic-hero a.rounded-full:hover,
body.pkp_page_index.pkp_op_index > header + div.relative.overflow-hidden a.rounded-full:hover {
  background: #fff !important;
  color: var(--mc-blue) !important;
  border-color: #fff !important;
}

/* Journal cover in hero: requires template patch */
.material-classic-cover-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 360px;
  padding: 1rem 1rem 4rem;
}

.material-classic-cover {
  display: block;
  width: auto;
  max-width: min(330px, 90%);
  max-height: 430px;
  object-fit: contain;
  border-radius: 24px;
  box-shadow: 0 15px 50px rgba(0,0,0,.30), 0 3px 10px rgba(0,0,0,.16);
  transform: translateY(12px);
}

/* Main journal page */
.page_index_journal {
  width: 100%;
  color: var(--mc-text);
}

.page_index_journal h2 {
  color: #0d1e2d !important;
  font-size: clamp(1.55rem, 2.5vw, 2rem) !important;
  line-height: 1.3 !important;
  font-weight: 600 !important;
  letter-spacing: -.015em !important;
  margin-top: 2.2rem !important;
  margin-bottom: 1.25rem !important;
}

/* About */
.page_index_journal .homepage_about {
  padding: .5rem 0 2.6rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--mc-soft-border);
  color: var(--mc-text);
  font-size: 1rem;
  line-height: 1.72;
}

.page_index_journal .homepage_about p {
  margin-top: 0;
  margin-bottom: 1rem;
}

.page_index_journal .homepage_about a {
  color: var(--mc-primary) !important;
}

/* Current issue */
.page_index_journal .current_issue {
  padding-top: .25rem;
}

.page_index_journal .current_issue_title {
  margin: .5rem 0 1.5rem !important;
  color: #303030 !important;
  font-size: 1.1rem !important;
  line-height: 1.5 !important;
  font-weight: 700 !important;
}

.obj_issue_toc img {
  border-radius: 2px !important;
}

/* Article list */
.obj_issue_toc ul[role="list"] {
  margin: 0 !important;
  padding: 0 !important;
  border-top: 1px solid var(--mc-soft-border);
  list-style: none !important;
}

.obj_issue_toc ul[role="list"] > li {
  display: block !important;
  margin: 0 !important;
  padding: 1.35rem 0 !important;
  border-bottom: 1px solid var(--mc-soft-border);
  gap: 0 !important;
}

.obj_issue_toc ul[role="list"] > li h3,
.obj_issue_toc ul[role="list"] > li h4,
.obj_issue_toc ul[role="list"] > li h5,
.obj_issue_toc ul[role="list"] > li h6 {
  color: #1d2730 !important;
  font-size: 1.02rem !important;
  line-height: 1.45 !important;
  font-weight: 600 !important;
  margin: 0 0 .35rem !important;
}

.obj_issue_toc ul[role="list"] > li h3 a,
.obj_issue_toc ul[role="list"] > li h4 a,
.obj_issue_toc ul[role="list"] > li h5 a,
.obj_issue_toc ul[role="list"] > li h6 a {
  color: #1d2730 !important;
  text-decoration: none !important;
}

.obj_issue_toc ul[role="list"] > li h3 a:hover,
.obj_issue_toc ul[role="list"] > li h4 a:hover,
.obj_issue_toc ul[role="list"] > li h5 a:hover,
.obj_issue_toc ul[role="list"] > li h6 a:hover {
  color: var(--mc-primary) !important;
  text-decoration: underline !important;
}

/* Quiet page-number badge */
.obj_issue_toc ul[role="list"] > li span.rounded-md {
  background: transparent !important;
  color: var(--mc-muted) !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

/* PDF/Galley buttons */
.obj_galley_link,
.obj_galley_link_supplementary {
  border-radius: 3px !important;
  padding: .5rem .85rem !important;
  font-size: .78rem !important;
  line-height: 1.2 !important;
  font-weight: 600 !important;
  text-transform: uppercase;
  letter-spacing: .035em;
  text-decoration: none !important;
}

.obj_galley_link {
  background: var(--mc-primary) !important;
  color: #fff !important;
  border: 1px solid var(--mc-primary) !important;
  box-shadow: 0 2px 5px rgba(0,0,0,.14) !important;
}

.obj_galley_link:hover {
  background: #2d71a1 !important;
  border-color: #2d71a1 !important;
  color: #fff !important;
  box-shadow: 0 3px 8px rgba(0,0,0,.18) !important;
}

.obj_galley_link_supplementary {
  background: #fff !important;
  color: var(--mc-primary) !important;
  border: 1px solid var(--mc-primary) !important;
  box-shadow: none !important;
}

/* Read more / all issues */
.page_index_journal .read_more {
  display: inline-block;
  margin-top: 1.25rem !important;
  margin-bottom: 2.5rem !important;
  color: var(--mc-primary) !important;
  font-weight: 600 !important;
  text-decoration: none !important;
}

.page_index_journal .read_more::after { content: " ›"; }

/* Sidebar blocks */
.pkp_block {
  margin-bottom: 1.5rem !important;
  padding: 1rem 0 1.25rem !important;
  border-top: 1px solid var(--mc-border);
  background: transparent !important;
  box-shadow: none !important;
  color: var(--mc-text) !important;
}

.pkp_block .title {
  margin-bottom: .7rem !important;
  color: #1d2730 !important;
  font-size: .92rem !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: .035em;
}

.pkp_block a {
  color: var(--mc-primary) !important;
  text-decoration: none !important;
}

/* Footer */
footer.footer {
  background: var(--mc-footer) !important;
  color: var(--mc-muted) !important;
  border-top: 1px solid var(--mc-soft-border);
  padding-top: 2.5rem !important;
  padding-bottom: 2.5rem !important;
}

footer.footer a {
  color: #4b5563 !important;
  text-decoration: none !important;
}

footer.footer a:hover {
  color: var(--mc-primary) !important;
  text-decoration: underline !important;
}

/* Responsive */
@media (max-width: 1023px) {
  .material-classic-hero,
  body.pkp_page_index.pkp_op_index > header + div.relative.overflow-hidden {
    padding-bottom: 70px !important;
  }

  .material-classic-hero::after,
  body.pkp_page_index.pkp_op_index > header + div.relative.overflow-hidden::after {
    height: 110px;
  }

  .material-classic-cover-wrap {
    min-height: auto;
    padding-top: 0;
    padding-bottom: 4rem;
  }

  .material-classic-cover {
    max-width: 260px;
    max-height: 340px;
    border-radius: 18px;
    transform: none;
  }
}

@media (max-width: 640px) {
  .material-classic-hero,
  body.pkp_page_index.pkp_op_index > header + div.relative.overflow-hidden {
    padding-bottom: 48px !important;
  }

  .material-classic-hero::after,
  body.pkp_page_index.pkp_op_index > header + div.relative.overflow-hidden::after {
    height: 72px;
  }

  .material-classic-hero p.font-extrabold,
  body.pkp_page_index.pkp_op_index > header + div.relative.overflow-hidden p.font-extrabold {
    font-size: 2rem !important;
  }

  .material-classic-hero .line-clamp-3,
  body.pkp_page_index.pkp_op_index > header + div.relative.overflow-hidden .line-clamp-3 {
    font-size: .98rem !important;
    line-height: 1.62 !important;
  }

  .material-classic-cover {
    max-width: 210px;
    max-height: 285px;
  }
}

/* ============================================================
   MATERIAL CLASSIC – Ergänzungen
   ============================================================ */


/* ------------------------------------------------------------
   1. Dropdown-Menüs der Primary Navigation
   Schrift auf weißem Hintergrund schwarz
   ------------------------------------------------------------ */

body > header
#navigationPrimary > li
> div.relative
> div.absolute
ul a {
    color: #111827 !important;
}

body > header
#navigationPrimary > li
> div.relative
> div.absolute
ul a:hover {
    color: #111827 !important;
    background: #f3f4f6 !important;
}

/* ------------------------------------------------------------
   2. Hero-Buttons ausblenden
   ------------------------------------------------------------ */

body.pkp_page_index.pkp_op_index
> header
+ div.relative.overflow-hidden
a[href*="/about/submissions"],

body.pkp_page_index.pkp_op_index
> header
+ div.relative.overflow-hidden
a[href*="/issue/archive"] {
    display: none !important;
}

body.pkp_page_index.pkp_op_index
> header
+ div.relative.overflow-hidden
.mt-8.flex.gap-4 {
    display: none !important;
}

/* ------------------------------------------------------------
   3. Homepage-Inhalte neu anordnen
   ------------------------------------------------------------ */

.page_index_journal {
    display: flex;
    flex-direction: column;
}


/* "About the Journal" entfernen:
   Beschreibung steht bereits vollständig im Hero */

.page_index_journal > .homepage_about {
    display: none !important;
}


/* Editors-in-Chief / Scopus / e-ISSN usw. nach oben */

.page_index_journal > .additional_content {
    order: 10;
}


/* Current Issue danach */

.page_index_journal > .current_issue {
    order: 20;
}

.page_index_journal > .additional_content {
    order: 10;

    margin: 0 0 3rem;
    padding: 1.25rem 1.5rem;

    background: #f7f9fa;
    border-left: 4px solid #006798;
}

.page_index_journal > .additional_content blockquote {
    margin: 0 !important;
    padding: 0 !important;

    border: 0 !important;

    color: rgba(0, 0, 0, .75) !important;
    font-style: normal !important;
}

.page_index_journal > .additional_content p:first-child {
    margin-top: 0;
}

.page_index_journal > .additional_content p:last-child {
    margin-bottom: 0;
}

@media (min-width: 1024px) {

    .page_index_journal {
        position: relative;
    }

    .page_index_journal > .homepage_image {
        position: absolute;
        z-index: 20;

        width: 280px;

        /* wird nach dem Upload genau angepasst */
        top: -690px;
        right: 0;
    }

    .page_index_journal > .homepage_image img {
        display: block;

        width: 100%;
        height: auto;

        border-radius: 24px;

        box-shadow:
            0 15px 50px rgba(0, 0, 0, .30),
            0 3px 10px rgba(0, 0, 0, .16);
    }
}

/* Header-Logo nur auf Journal-Seiten ausblenden */
body.pkp_page_index.pkp_op_index > header .pkp_site_name,
body.pkp_page_index.pkp_op_index > header .pkp_site_name_wrapper {
    display: none !important;
}

/* User-Navigation: Dropdown-Einträge schwarz */
body > header
#navigationUser
div.absolute
a {
    color: #111827 !important;
}

body > header
#navigationUser
div.absolute
a:hover {
    color: #111827 !important;
    background: #f3f4f6 !important;
}