/* Template publikasi teknis Indo Mekanika.
   Direkonstruksi dari pola layout referensi dengan aset dan identitas milik sendiri. */

:root {
  --publication-brand-dark: #d71920;
  --publication-brand: #d71920;
  --publication-paper: #ffffff;
  --publication-line: #e2cfd0;
  --publication-link: #b5121b;
}

.publication-wide-container {
  width: min(100% - 32px, 1170px);
  margin-inline: auto;
}

.publication-reading-container {
  width: min(100% - 32px, 800px);
  margin-inline: auto;
}

/* Index */
.articles-page {
  margin: 0;
  padding-top: 47px;
  background: #fff;
  color: #333;
  font-family: var(--default-font);
}

.publication-index-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 997;
  min-height: 47px;
  background: var(--publication-brand-dark);
  border-bottom: 1px solid #741016;
}

.publication-index-nav .publication-wide-container {
  display: flex;
  align-items: center;
  min-height: 47px;
  gap: 18px;
}

.publication-brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.publication-brand:hover { color: #fff; }
.publication-brand img { width: 24px; height: 24px; object-fit: contain; }

.publication-topic-nav {
  display: flex;
  min-width: 0;
  align-items: stretch;
  overflow-x: auto;
  scrollbar-width: none;
}

.publication-topic-nav::-webkit-scrollbar { display: none; }

.publication-topic-nav .article-filter {
  flex: 0 0 auto;
  min-height: 47px;
  padding: 0 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #bdbdbd;
  font-size: 0.72rem;
  font-weight: 400;
}

.publication-topic-nav .article-filter:hover,
.publication-topic-nav .article-filter.active {
  border: 0;
  background: var(--publication-brand);
  box-shadow: none;
  color: #fff;
}

.articles-page .article-reference-section {
  min-height: 70vh;
  padding: 28px 0 55px;
  background: #fff;
}

.articles-page .article-reference-section .container {
  width: min(100% - 32px, 1170px);
  max-width: none;
  padding: 0;
}

.articles-page .article-reference-heading {
  padding: 0 0 17px;
  border-bottom: 1px solid #ddd;
}

.articles-page .article-reference-heading h1 {
  margin: 0 0 7px;
  color: var(--publication-brand-dark);
  font-family: var(--heading-font);
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 500;
  letter-spacing: 0;
}

.publication-byline {
  margin: 0;
  color: #555;
  font-family: var(--default-font);
  font-size: 0.74rem;
}

.articles-page .article-reference-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 20px 30px;
  padding-top: 20px;
}

.articles-page .article-reference-item { min-width: 0; }

.articles-page .article-reference-image {
  display: block;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 2 / 1;
  padding: 3px;
  border: 1px solid #ddd;
  background: #fff;
}

.articles-page .article-reference-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.articles-page .article-reference-item h2 {
  margin: 7px 0 5px;
  font-family: var(--heading-font);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.25;
}

.articles-page .article-reference-item h2 a { color: var(--publication-link); }
.articles-page .article-reference-item h2 a:hover { color: var(--publication-brand); text-decoration: underline; }

.articles-page .article-reference-item h2 i {
  display: inline-block;
  margin-left: 2px;
  font-size: 0.85em;
  transition: transform 0.2s ease;
}

.articles-page .article-reference-item h2 a:hover i,
.articles-page .article-read-more:hover i {
  transform: translateX(3px);
}

.articles-page .article-reference-excerpt {
  display: block;
  overflow: visible;
  margin: 0;
  color: #333;
  font-family: var(--default-font);
  font-size: 0.88rem;
  line-height: 1.18;
  text-align: justify;
  -webkit-line-clamp: unset;
}

.articles-page .article-read-more {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  color: var(--publication-link);
  font-size: 0.76rem;
  font-weight: 700;
  text-decoration: none;
}

.articles-page .article-read-more:hover {
  color: var(--publication-brand);
  text-decoration: underline;
}

.articles-page .article-read-more i {
  transition: transform 0.2s ease;
}

/* Detail */
.article-detail-page {
  margin: 0;
  padding: 0;
  background: var(--publication-paper);
  color: #333;
  font-family: var(--default-font);
  font-size: 14px;
}

.publication-detail-header {
  padding: 20px 24px;
  border-top: 6px solid var(--publication-brand);
  background: var(--publication-brand-dark);
  color: #fff;
}

.publication-detail-header p {
  margin: 0 0 2px;
  font-family: var(--nav-font);
  font-size: 0.7rem;
}

.publication-detail-header h2 {
  margin: 0;
  color: #fff;
  font-family: var(--heading-font);
  font-size: clamp(1.7rem, 4vw, 2.45rem);
  font-weight: 600;
}

.article-detail-page .article-reference-actions {
  padding: 0;
  background: var(--publication-brand);
}

.article-detail-page .article-reference-actions .publication-reading-container {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 22px;
}

.article-detail-page .article-share-actions {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
}

.article-detail-page .article-reference-actions a,
.article-detail-page .article-reference-actions button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-family: var(--nav-font);
  font-size: 0.9rem;
}

.article-detail-page .article-share-actions a,
.article-detail-page .article-share-actions button {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
}

.article-detail-page .article-share-actions a:hover,
.article-detail-page .article-share-actions button:hover {
  background: rgba(255, 255, 255, 0.16);
}

.article-detail-page .article-reference-title {
  padding: 13px 0 0;
  border: 0;
  background: var(--publication-paper);
}

.article-detail-page .article-reference-author {
  margin: 0 0 3px;
  color: #777;
  font-family: var(--nav-font);
  font-size: 0.7rem;
}

.article-detail-page .article-reference-title h1 {
  margin: 0 0 7px;
  color: var(--publication-brand-dark);
  font-family: var(--heading-font);
  font-size: clamp(1.8rem, 4vw, 2.3rem);
  font-weight: 700;
  letter-spacing: 0;
}

.article-detail-page .article-reference-date {
  margin: 0;
  color: #777;
  font-family: var(--default-font);
  font-size: 0.72rem;
}

.article-detail-page .article-detail-section {
  padding: 0 0 28px;
  background: var(--publication-paper);
}

.article-detail-page .article-detail-section > .container {
  width: min(100% - 32px, 800px);
  max-width: none;
  padding: 0;
}

.article-detail-page .article-toc-column,
.article-detail-page .article-toc-disclosure { display: none !important; }

.article-detail-page .article-detail-layout { display: block; margin: 0; }
.article-detail-page .article-content-column { width: 100%; padding: 0; }

.article-detail-page .article-detail-card {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.article-detail-page .article-detail-hero {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 25px;
  aspect-ratio: auto;
  object-fit: contain;
}

.article-detail-page .article-content {
  padding: 0;
  background: transparent;
}

.article-detail-page .article-reference-summary {
  margin: 0 0 30px;
  padding: 0 0 26px;
  border-bottom: 1px solid var(--publication-line);
}

.article-detail-page .article-reference-summary h2 {
  margin: 0 0 16px;
  color: var(--publication-brand-dark);
  font-family: var(--heading-font);
  font-size: 1.55rem;
  font-weight: 500;
}

.article-detail-page .article-reference-summary p {
  max-width: none;
  margin: 0 28px;
  padding-left: 20px;
  border-left: 5px solid var(--publication-brand);
  color: #5e5152;
  font-family: var(--default-font);
  font-size: 0.95rem;
  font-style: italic;
  line-height: 1.6;
  text-align: justify;
}

.article-detail-page .article-content h1,
.article-detail-page .article-content h2,
.article-detail-page .article-content h3,
.article-detail-page .article-content h4 {
  color: var(--publication-brand-dark);
  font-family: var(--heading-font);
  font-weight: 700;
  letter-spacing: 0;
}

/* Artikel lama yang sebelumnya terimpor sebagai daftar satu-baris tetap terbaca sebagai heading bernomor. */
.article-detail-page .article-content > ol > li:only-child,
.article-detail-page .article-content > ol > li:only-child::marker {
  font-weight: 700;
}

.article-detail-page .article-content h1 { margin: 30px 0 12px; font-size: 1.8rem; }
.article-detail-page .article-content h2 { margin: 28px 0 10px; font-size: 1.55rem; }
.article-detail-page .article-content h3 { margin: 24px 0 9px; font-size: 1.28rem; }
.article-detail-page .article-content h4 { margin: 21px 0 8px; font-size: 1.1rem; }

.article-detail-page .article-content p,
.article-detail-page .article-content li {
  color: #222;
  font-family: var(--default-font);
  font-size: 0.93rem;
  line-height: 1.55;
}

.article-detail-page .article-content p {
  margin: 0 0 18px;
  text-align: justify;
}

.article-detail-page .article-content ul,
.article-detail-page .article-content ol { margin: 0 0 18px; padding-left: 28px; }

.article-detail-page .article-content img {
  display: block;
  width: 100% !important;
  max-width: 100%;
  height: auto;
  margin: 24px auto;
}

.article-detail-page .article-content table {
  width: 100%;
  margin: 24px 0;
  border-collapse: collapse;
  border-top: 1px solid var(--publication-line);
  background: transparent;
  box-shadow: none;
}

.article-detail-page .article-content th,
.article-detail-page .article-content td {
  padding: 9px 12px;
  border: 0;
  border-bottom: 1px solid var(--publication-line);
  background: transparent;
  color: #222;
  font-family: var(--default-font);
  font-size: 0.86rem;
  vertical-align: top;
}

.article-detail-page .article-content th { font-weight: 600; }

.article-detail-page .article-note {
  border: 0;
  border-left: 5px solid #ccc;
  border-radius: 0;
  background: transparent;
}

.article-detail-page .article-discussion-section,
.article-detail-page .light-background,
.article-detail-page .article-cta {
  width: min(100% - 32px, 800px);
  margin-inline: auto;
}

.article-detail-page .article-discussion-card,
.article-detail-page .article-card,
.article-detail-page .article-cta {
  border-radius: 0;
  box-shadow: none;
}

.article-detail-page .article-discussion-section {
  padding: 28px 0 40px;
  border-top: 1px solid var(--publication-line);
  background: var(--publication-paper);
}

.article-detail-page .article-discussion-section > .container {
  width: 100%;
  max-width: none;
  padding: 0;
}

.article-detail-page .article-discussion-card {
  max-width: none;
  padding: 0;
  border: 0;
  background: transparent;
}

.article-detail-page .article-discussion-heading {
  gap: 12px;
  margin-bottom: 22px;
}

.article-detail-page .article-discussion-icon {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  border: 1px solid #ccc;
  border-radius: 0;
  background: transparent;
  color: var(--publication-brand-dark);
}

.article-detail-page .article-discussion-heading h2 {
  margin: 0 0 3px;
  color: var(--publication-brand-dark);
  font-family: var(--heading-font);
  font-size: 1.45rem;
  font-weight: 500;
}

.article-detail-page .article-discussion-heading p,
.article-detail-page .article-comment-body p {
  font-family: var(--default-font);
}

.article-detail-page .article-discussion-share {
  display: inline-flex;
  gap: 8px;
  margin-left: auto;
}

.article-detail-page .article-discussion-share a,
.article-detail-page .article-discussion-share button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid #c9c9c9;
  border-radius: 0;
  background: #fff;
  color: var(--publication-brand-dark);
  font-family: var(--nav-font);
  font-size: 0.78rem;
  line-height: 1.2;
  text-decoration: none;
}

.article-detail-page .article-discussion-share a:hover,
.article-detail-page .article-discussion-share button:hover {
  border-color: var(--publication-brand-dark);
  background: #fff5f5;
}

.article-detail-page .article-feedback-form .form-label,
.article-detail-page .article-comment-count,
.article-detail-page .article-comment-meta strong {
  color: #222;
  font-family: var(--heading-font);
  font-weight: 500;
}

.article-detail-page .article-feedback-form .form-control {
  border: 1px solid #cfcfcf;
  border-radius: 0;
  background: #fff;
  font-family: var(--default-font);
}

.article-detail-page .article-feedback-form .form-control:focus {
  border-color: #777;
  box-shadow: none;
}

.article-detail-page .article-feedback-submit {
  padding: 9px 15px;
  border-radius: 0;
  background: var(--publication-brand-dark);
  font-family: var(--nav-font);
  font-weight: 600;
}

.article-detail-page .article-feedback-submit:hover { background: var(--publication-brand); }

.publication-footer {
  padding: 22px 0;
  background: var(--publication-brand-dark);
  color: #fff;
  font-family: var(--default-font);
  font-size: 0.76rem;
}

.journal-site-footer,
.article-detail-page .journal-site-footer {
  width: 100%;
  margin: 0;
  background: #fff2f2;
}

@media (max-width: 767px) {
  .publication-index-nav .publication-wide-container { gap: 10px; }
  .publication-brand span { display: none; }
  .publication-topic-nav .article-filter { padding-inline: 9px; }

  .articles-page .article-reference-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 16px;
  }

  .publication-detail-header { padding: 16px; }
  .article-detail-page .article-reference-summary p { margin-inline: 0; }
  .article-detail-page .article-content table { display: block; overflow-x: auto; }
}

@media (max-width: 479px) {
  .articles-page .article-reference-grid { grid-template-columns: 1fr; }
}

@media print {
  .publication-detail-header,
  .article-reference-actions,
  .article-discussion-section,
  .light-background,
  .article-cta,
  .publication-footer,
  .scroll-top { display: none !important; }

  .article-detail-page { background: #fff; }
}

/* Final journal layout and mobile corrections. */
.articles-page,
.article-detail-page {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

.articles-page .article-reference-image img {
  object-fit: contain;
  background: #f1f1f1;
}

.articles-page .article-reference-image img.is-placeholder {
  padding: 24px;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.65;
}

.article-detail-page {
  font-size: 16px;
  line-height: 1.6;
}

.article-detail-page .article-content p,
.article-detail-page .article-content li {
  font-size: 1rem;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.article-detail-page .article-content a,
.publication-related a {
  color: var(--publication-link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article-detail-page .article-content figure,
.article-detail-page .article-content p:has(> img:only-child) {
  margin: 26px 0;
  text-align: center;
}

.article-detail-page .article-content p:has(> img:only-child) img {
  margin: 0 auto;
}

.article-detail-page .article-content img {
  width: 100% !important;
  max-width: 100% !important;
  max-height: none;
  object-fit: contain;
}

.article-detail-page .article-content pre {
  max-width: 100%;
  overflow-x: auto;
  white-space: pre;
  -webkit-overflow-scrolling: touch;
}

.article-detail-page .article-content table {
  table-layout: auto;
}

.publication-image-error {
  display: block;
  margin: 22px 0;
  padding: 20px;
  border: 1px dashed #aaa;
  background: #e5e5e5;
  color: #555;
  font-family: var(--default-font);
  font-size: 0.82rem;
  text-align: center;
}

.publication-related {
  padding: 28px 0 34px;
  border-top: 1px solid var(--publication-line);
  background: var(--publication-paper);
}

.publication-related h2 {
  margin: 0 0 12px;
  color: var(--publication-brand-dark);
  font-family: var(--heading-font);
  font-size: 1.45rem;
  font-weight: 500;
}

.publication-related ul {
  margin: 0;
  padding-left: 22px;
}

.publication-related li {
  margin: 5px 0;
  font-family: var(--default-font);
  font-size: 0.92rem;
}

@media (max-width: 767px) {
  .articles-page {
    padding-top: 89px;
  }

  .publication-index-nav {
    min-height: 89px;
  }

  .publication-index-nav .publication-wide-container {
    width: 100%;
    min-height: 89px;
    padding: 0;
    display: block;
  }

  .publication-brand {
    min-height: 42px;
    padding: 0 16px;
    border-bottom: 1px solid #3e3e3e;
  }

  .publication-brand span {
    display: inline;
  }

  .publication-topic-nav {
    min-height: 47px;
    padding: 0 7px;
  }

  .publication-topic-nav .article-filter {
    min-height: 47px;
    padding: 0 10px;
    font-size: 0.71rem;
  }

  .articles-page .article-reference-section {
    padding: 22px 0 38px;
  }

  .articles-page .article-reference-heading h1 {
    font-size: 1.65rem;
    line-height: 1.2;
  }

  .articles-page .article-reference-grid {
    grid-template-columns: 1fr;
    gap: 30px;
    padding-top: 18px;
  }

  .articles-page .article-reference-image {
    aspect-ratio: 2 / 1;
  }

  .articles-page .article-reference-item h2 {
    margin-top: 9px;
    font-size: 1rem;
    line-height: 1.35;
  }

  .articles-page .article-reference-excerpt {
    font-size: 0.96rem;
    line-height: 1.38;
    text-align: left;
  }

  .publication-detail-header {
    padding: 14px 0;
    border-top-width: 4px;
  }

  .publication-detail-header h2 {
    font-size: 1.52rem;
    line-height: 1.18;
  }

  .article-detail-page .article-reference-actions .publication-reading-container {
    min-height: 44px;
    gap: 16px;
    overflow-x: auto;
    white-space: nowrap;
  }

  .article-detail-page .article-reference-actions a,
  .article-detail-page .article-reference-actions button {
    font-size: 0.8rem;
  }

  .article-detail-page .article-reference-title {
    padding-top: 14px;
  }

  .article-detail-page .article-reference-title h1 {
    font-size: 1.72rem;
    line-height: 1.16;
  }

  .article-detail-page .article-reference-date {
    display: flex;
    flex-wrap: wrap;
    gap: 3px 12px;
  }

  .article-detail-page .article-detail-hero {
    margin-bottom: 20px;
  }

  .article-detail-page .article-reference-summary {
    margin-bottom: 24px;
    padding-bottom: 22px;
  }

  .article-detail-page .article-reference-summary h2 {
    margin-bottom: 10px;
    font-size: 1.35rem;
  }

  .article-detail-page .article-reference-summary p {
    padding-left: 14px;
    font-size: 0.96rem;
    line-height: 1.55;
    text-align: left;
  }

  .article-detail-page .article-content h1 { font-size: 1.65rem; }
  .article-detail-page .article-content h2 { font-size: 1.4rem; }
  .article-detail-page .article-content h3 { font-size: 1.18rem; }

  .article-detail-page .article-content p,
  .article-detail-page .article-content li {
    font-size: 0.98rem;
    line-height: 1.68;
    text-align: left;
  }

  .article-detail-page .article-content ul,
  .article-detail-page .article-content ol {
    padding-left: 22px;
  }

  .article-detail-page .article-content table {
    display: block;
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .article-detail-page .article-content th,
  .article-detail-page .article-content td {
    min-width: 130px;
    padding: 8px 10px;
    font-size: 0.8rem;
  }

  .article-detail-page .article-discussion-section {
    padding: 24px 0 32px;
  }

  .article-detail-page .article-discussion-heading {
    display: block;
  }

  .article-detail-page .article-discussion-icon {
    margin-bottom: 10px;
  }

  .article-detail-page .article-discussion-share {
    flex-wrap: wrap;
    margin: 14px 0 0;
  }

  .article-detail-page .article-feedback-actions {
    display: block;
  }

  .article-detail-page .article-feedback-submit {
    width: 100%;
    justify-content: center;
    margin-bottom: 12px;
  }

  .publication-footer {
    padding: 18px 0;
    line-height: 1.5;
  }
}
