/* ==========================================================================
   DPSM Journal Grid
   Presentation only. Publication-specific behavior belongs in a plugin.
   ========================================================================== */

:root {
  --dpsm-page-bg: #efefef;
  --dpsm-content-bg: #ffffff;
  --dpsm-side-bg: #f7f7f7;
  --dpsm-menu-bg: #505e6d;
  --dpsm-text-color: #000000;
  --dpsm-heading-color: #0000cc;
  --dpsm-link-color: #004080;
  --dpsm-border-color: #cccccc;
  --dpsm-font-body: "Times New Roman", Georgia, serif;
  --dpsm-font-ui: Arial, Helvetica, sans-serif;
  --dpsm-text-size: 17px;
  --dpsm-line-height: 1.45;
  --dpsm-title-size: 32px;
  --dpsm-section-title-size: 26px;
  --dpsm-content-inset: 28px;
  --dpsm-mobile-width: 73.3%;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--dpsm-page-bg);
}

body {
  margin: 8px;
  color: var(--dpsm-text-color);
  background: var(--dpsm-page-bg);
  font-family: var(--dpsm-font-body);
  font-size: var(--dpsm-text-size);
  line-height: var(--dpsm-line-height);
}

a {
  color: var(--dpsm-link-color);
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button,
input,
textarea,
select {
  font: inherit;
}

.screen-reader-text,
.dpsm-skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.dpsm-skip-link:focus {
  z-index: 10000;
  top: 16px;
  left: 16px;
  width: auto;
  height: auto;
  padding: 10px 14px;
  clip-path: none;
  background: #fff;
  border: 2px solid #000;
}

/* One named grid: laptop. */
.dpsm-site-grid {
  display: grid;
  width: 100%;
  min-height: 100vh;
  grid-template-columns: 10% 16% 50% 14% 10%;
  grid-template-rows: 9px 114px 85px minmax(300px, auto) minmax(380px, auto) 129px 40px;
  grid-template-areas:
    "top top top top top"
    "header-margin-left header-logo header-title header-publisher header-margin-right"
    "outer-left menu menu menu outer-right"
    "outer-left left-sidebar content right-sidebar outer-right"
    "outer-left left-sidebar content right-sidebar outer-right"
    "outer-left footer-left footer-center footer-right outer-right"
    "outer-left bottom-left bottom-center bottom-right outer-right";
  gap: 0;
  background: var(--dpsm-page-bg);
}

.dpsm-top-rule { grid-area: top; }
.dpsm-header-margin-left { grid-area: header-margin-left; }
.dpsm-header-logo { grid-area: header-logo; }
.dpsm-header-title { grid-area: header-title; }
.dpsm-header-publisher { grid-area: header-publisher; }
.dpsm-header-margin-right { grid-area: header-margin-right; }
.dpsm-main-navigation { grid-area: menu; }
.dpsm-left-sidebar { grid-area: left-sidebar; }
.dpsm-content { grid-area: content; }
.dpsm-right-sidebar { grid-area: right-sidebar; }
.dpsm-footer-left { grid-area: footer-left; }
.dpsm-footer-center { grid-area: footer-center; }
.dpsm-footer-right { grid-area: footer-right; }
.dpsm-bottom-left { grid-area: bottom-left; }
.dpsm-bottom-center { grid-area: bottom-center; }
.dpsm-bottom-right { grid-area: bottom-right; }

.dpsm-top-rule {
  background: #000;
}

.dpsm-header-margin-left,
.dpsm-header-margin-right,
.dpsm-header-logo,
.dpsm-header-title,
.dpsm-header-publisher {
  background: #fff;
}

.dpsm-header-logo,
.dpsm-header-publisher {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.dpsm-header-logo-link,
.dpsm-publisher-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
}

.dpsm-header-logo-image {
  width: 176px;
  max-height: 55px;
  object-fit: contain;
}

.dpsm-publisher-logo-image {
  width: 176px;
  max-height: 50px;
  object-fit: contain;
}

.dpsm-brand-placeholder {
  color: var(--dpsm-heading-color);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 44px;
  line-height: 1;
  letter-spacing: .03em;
}

.dpsm-brand-placeholder-publisher {
  font-size: 32px;
}

.dpsm-header-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px;
  text-align: center;
}

.dpsm-journal-name {
  color: var(--dpsm-heading-color);
  font-size: var(--dpsm-title-size);
  font-weight: 500;
  line-height: 1.12;
}

.dpsm-journal-name a,
.dpsm-journal-name a:visited,
.dpsm-journal-name a:hover,
.dpsm-journal-name a:focus {
  color: inherit;
  text-decoration: none;
}

.dpsm-journal-issn {
  margin-top: 14px;
  font-size: 20px;
}

.dpsm-main-navigation {
  position: relative;
  align-self: center;
  min-width: 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0 25px;
  color: #fff;
  background: var(--dpsm-menu-bg);
}

.dpsm-primary-menu-wrap {
  width: 100%;
}

.dpsm-primary-menu {
  display: flex;
  align-items: center;
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dpsm-primary-menu li {
  position: relative;
  margin: 0;
  list-style: none;
}

.dpsm-primary-menu a {
  display: block;
  padding: 15px 0;
  color: #fff;
  line-height: 1;
}

.dpsm-primary-menu .sub-menu {
  position: absolute;
  z-index: 100;
  top: 100%;
  left: 0;
  display: none;
  min-width: 210px;
  margin: 0;
  padding: 8px 0;
  list-style: none;
  background: var(--dpsm-menu-bg);
  box-shadow: 0 7px 16px rgba(0, 0, 0, .22);
}

.dpsm-primary-menu li:hover > .sub-menu,
.dpsm-primary-menu li:focus-within > .sub-menu {
  display: block;
}

.dpsm-primary-menu .sub-menu a {
  padding: 11px 16px;
  line-height: 1.25;
}

.dpsm-menu-toggle {
  display: none;
}

.dpsm-sidebar {
  min-width: 0;
  padding: 23px 10px 20px;
  background: var(--dpsm-side-bg);
}

.dpsm-right-sidebar {
  padding-inline: 14px;
}

.dpsm-widget {
  min-width: 0;
  margin: 0 0 18px;
}

.dpsm-widget-title,
.dpsm-widget-toggle {
  width: 100%;
  margin: 0;
  color: var(--dpsm-link-color);
  font-family: var(--dpsm-font-body);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.15;
  text-align: center;
}

.dpsm-widget-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  gap: 8px;
  align-items: center;
  padding: 10px;
  cursor: pointer;
  background: #f1f1f1;
  border: 1px solid var(--dpsm-border-color);
}

.dpsm-widget-toggle-icon::before {
  content: "+";
  display: block;
  font-family: var(--dpsm-font-ui);
}

.dpsm-widget-toggle[aria-expanded="true"] .dpsm-widget-toggle-icon::before {
  content: "−";
}

.dpsm-widget-panel {
  padding: 12px 10px;
  border: 1px solid var(--dpsm-border-color);
  border-top: 0;
  background: #f1f1f1;
}

.dpsm-widget-panel[hidden] {
  display: none;
}

.dpsm-widget ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.dpsm-widget li {
  margin: 0 0 9px;
}

.dpsm-content {
  min-width: 0;
  padding: var(--dpsm-content-inset);
  background: var(--dpsm-content-bg);
  overflow-wrap: anywhere;
}

.dpsm-breadcrumb {
  margin: 0 0 22px;
  color: #666;
  font-size: 14px;
}

.dpsm-content-heading,
.dpsm-entry-header {
  margin-bottom: 22px;
}

.dpsm-entry-header-with-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.dpsm-entry-header-with-badge .dpsm-entry-title {
  flex: 1 1 auto;
  min-width: 0;
}

.dpsm-content-title-right {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  margin-left: 28px;
  padding-right: 10px;
  text-align: right;
}

.dpsm-cc-badge-link {
  display: block;
  line-height: 0;
}

.dpsm-cc-badge-image {
  display: block;
  width: 88px;
  height: 31px;
  margin-left: auto;
  object-fit: contain;
}

.dpsm-content-heading h1,
.dpsm-entry-title {
  margin: 0;
  color: var(--dpsm-heading-color);
  font-size: var(--dpsm-section-title-size);
  font-weight: 600;
  line-height: 1.18;
}

.dpsm-entry-title a {
  color: inherit;
}

.dpsm-entry {
  margin: 0 0 34px;
}

.dpsm-entry + .dpsm-entry {
  padding-top: 28px;
  border-top: 1px solid #ddd;
}

.dpsm-entry-meta {
  margin-top: 8px;
  color: #666;
  font-size: 14px;
}

.dpsm-entry-thumbnail {
  display: block;
  margin: 0 0 20px;
}

.dpsm-entry-content > :first-child {
  margin-top: 0;
}

.dpsm-entry-content > :last-child {
  margin-bottom: 0;
}

.dpsm-content p {
  margin: 0 0 16px;
  text-align: justify;
}

.dpsm-content h2 {
  color: var(--dpsm-heading-color);
  font-size: 26px;
  line-height: 1.2;
}

.dpsm-content h3 {
  color: var(--dpsm-heading-color);
  font-size: 22px;
  line-height: 1.2;
}

.dpsm-content h4 {
  color: var(--dpsm-heading-color);
  font-size: 18px;
  line-height: 1.2;
}

.dpsm-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

.dpsm-content th,
.dpsm-content td {
  padding: 8px 10px;
  border: 1px solid var(--dpsm-border-color);
  vertical-align: top;
}

.dpsm-content figure {
  max-width: 100%;
  margin: 24px auto;
}

.dpsm-content figcaption {
  margin-top: 8px;
  color: #444;
  font-size: 15px;
  line-height: 1.35;
  text-align: center;
}

.dpsm-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.dpsm-search-form label {
  min-width: 0;
}

.dpsm-search-field {
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--dpsm-border-color);
}

.dpsm-search-submit {
  padding: 8px 12px;
  color: #fff;
  cursor: pointer;
  background: var(--dpsm-link-color);
  border: 1px solid var(--dpsm-link-color);
}

.dpsm-footer-left,
.dpsm-footer-center,
.dpsm-footer-right {
  min-width: 0;
  min-height: 129px;
  padding: 20px;
  overflow-wrap: anywhere;
}

.dpsm-footer-left,
.dpsm-footer-right {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--dpsm-side-bg);
}

.dpsm-footer-center {
  background: #fff;
}

.dpsm-footer-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
}

.dpsm-footer-logo-image {
  max-width: 100%;
  max-height: 100px;
  object-fit: contain;
}

.dpsm-contact-title {
  color: var(--dpsm-link-color);
  font-size: 20px;
  font-weight: 600;
}

.dpsm-footer-center p {
  margin: 6px 0 0;
}

.dpsm-bottom-left,
.dpsm-bottom-center,
.dpsm-bottom-right {
  min-width: 0;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  background: var(--dpsm-page-bg);
  border-top: 1px solid #ddd;
  font-size: 13px;
  text-align: center;
}

/* Plugin-ready wider layouts. */
.dpsm-layout-left-only {
  grid-template-areas:
    "top top top top top"
    "header-margin-left header-logo header-title header-publisher header-margin-right"
    "outer-left menu menu menu outer-right"
    "outer-left left-sidebar content content outer-right"
    "outer-left left-sidebar content content outer-right"
    "outer-left footer-left footer-center footer-right outer-right"
    "outer-left bottom-left bottom-center bottom-right outer-right";
}

.dpsm-layout-left-only .dpsm-right-sidebar,
.dpsm-layout-content-only .dpsm-left-sidebar,
.dpsm-layout-content-only .dpsm-right-sidebar {
  display: none;
}

.dpsm-layout-content-only {
  grid-template-areas:
    "top top top top top"
    "header-margin-left header-logo header-title header-publisher header-margin-right"
    "outer-left menu menu menu outer-right"
    "outer-left content content content outer-right"
    "outer-left content content content outer-right"
    "outer-left footer-left footer-center footer-right outer-right"
    "outer-left bottom-left bottom-center bottom-right outer-right";
}

/* Tablet: the same areas in three columns. */
@media only screen and (min-width: 701px) and (max-width: 1000px) {
  .dpsm-site-grid {
    grid-template-columns: 20% 63% 17%;
    grid-template-rows: 9px 114px 85px minmax(300px, auto) minmax(380px, auto) 129px 40px;
    grid-template-areas:
      "top top top"
      "header-logo header-title header-publisher"
      "menu menu menu"
      "left-sidebar content right-sidebar"
      "left-sidebar content right-sidebar"
      "footer-left footer-center footer-right"
      "bottom-left bottom-center bottom-right";
  }

  .dpsm-header-margin-left,
  .dpsm-header-margin-right {
    display: none;
  }

  .dpsm-journal-name {
    font-size: clamp(22px, 3.5vw, 30px);
  }

  .dpsm-header-logo,
  .dpsm-header-publisher {
    padding-inline: 6px;
  }

  .dpsm-layout-left-only {
    grid-template-areas:
      "top top top"
      "header-logo header-title header-publisher"
      "menu menu menu"
      "left-sidebar content content"
      "left-sidebar content content"
      "footer-left footer-center footer-right"
      "bottom-left bottom-center bottom-right";
  }

  .dpsm-layout-content-only {
    grid-template-areas:
      "top top top"
      "header-logo header-title header-publisher"
      "menu menu menu"
      "content content content"
      "content content content"
      "footer-left footer-center footer-right"
      "bottom-left bottom-center bottom-right";
  }

  .dpsm-sidebar a {
    font-size: clamp(11px, 1.25vw, 16px);
    line-height: 1.15;
  }

  .dpsm-widget-title,
  .dpsm-widget-toggle {
    font-size: clamp(16px, 1.7vw, 20px);
  }
}

/* Mobile: one column, ordered by named area. */
@media only screen and (max-width: 700px) {
  .dpsm-site-grid,
  .dpsm-layout-left-only,
  .dpsm-layout-content-only {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 9px auto auto auto auto repeat(6, auto);
    grid-template-areas:
      "top"
      "header-logo"
      "header-title"
      "header-publisher"
      "menu"
      "left-sidebar"
      "content"
      "right-sidebar"
      "footer-center"
      "footer-right"
      "bottom-center";
  }

  .dpsm-layout-left-only {
    grid-template-areas:
      "top"
      "header-logo"
      "header-title"
      "header-publisher"
      "menu"
      "left-sidebar"
      "content"
      "footer-center"
      "footer-right"
      "bottom-center";
  }

  .dpsm-layout-content-only {
    grid-template-areas:
      "top"
      "header-logo"
      "header-title"
      "header-publisher"
      "menu"
      "content"
      "footer-center"
      "footer-right"
      "bottom-center";
  }

  .dpsm-header-margin-left,
  .dpsm-header-margin-right,
  .dpsm-footer-left,
  .dpsm-bottom-left,
  .dpsm-bottom-right {
    display: none;
  }

  .dpsm-header-logo,
  .dpsm-header-title,
  .dpsm-header-publisher {
    min-height: 0;
  }

  .dpsm-header-logo {
    padding: 18px 16px 8px;
  }

  .dpsm-header-title {
    padding: 8px 16px 14px;
  }

  .dpsm-header-publisher {
    padding: 12px 16px 34px;
  }

  .dpsm-header-logo-image,
  .dpsm-publisher-logo-image {
    width: 287px;
    max-height: 90px;
  }

  .dpsm-journal-name {
    font-size: 32px;
  }

  .dpsm-entry-header-with-badge {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
  }

  .dpsm-entry-header-with-badge .dpsm-entry-title {
    flex: 1 1 60%;
  }

  .dpsm-content-title-right {
    flex: 0 1 auto;
    max-width: 40%;
    margin-left: auto;
    padding-right: 0;
  }

  .dpsm-main-navigation,
  .dpsm-sidebar,
  .dpsm-content,
  .dpsm-footer-center,
  .dpsm-footer-right,
  .dpsm-bottom-center {
    width: var(--dpsm-mobile-width);
    justify-self: center;
  }

  .dpsm-main-navigation {
    min-height: 60px;
    justify-content: flex-end;
    padding: 0 16px;
    margin-bottom: 22px;
  }

  .dpsm-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-left: auto;
    padding: 0;
    color: #fff;
    cursor: pointer;
    background: transparent;
    border: 0;
  }

  .dpsm-menu-toggle-icon,
  .dpsm-menu-toggle-icon::before,
  .dpsm-menu-toggle-icon::after {
    display: block;
    width: 28px;
    height: 3px;
    background: currentColor;
  }

  .dpsm-menu-toggle-icon {
    position: relative;
  }

  .dpsm-menu-toggle-icon::before,
  .dpsm-menu-toggle-icon::after {
    content: "";
    position: absolute;
    left: 0;
  }

  .dpsm-menu-toggle-icon::before {
    top: -8px;
  }

  .dpsm-menu-toggle-icon::after {
    top: 8px;
  }

  .dpsm-primary-menu-wrap {
    position: absolute;
    z-index: 100;
    top: 60px;
    right: 0;
    display: none;
    width: 100%;
    background: var(--dpsm-menu-bg);
    box-shadow: 0 6px 14px rgba(0, 0, 0, .22);
  }

  .dpsm-main-navigation.is-open .dpsm-primary-menu-wrap {
    display: block;
  }

  .dpsm-primary-menu {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .dpsm-primary-menu a {
    padding: 18px 24px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    font-family: var(--dpsm-font-ui);
    font-size: 18px;
    line-height: 1.2;
  }

  .dpsm-primary-menu .sub-menu {
    position: static;
    display: block;
    padding: 0 0 0 18px;
    box-shadow: none;
  }

  .dpsm-sidebar {
    padding: 23px 10px 20px;
  }

  .dpsm-content {
    padding: 24px 8px;
  }

  .dpsm-footer-center,
  .dpsm-footer-right {
    min-height: 120px;
  }

  .dpsm-content table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
  }
}
