/*
 * halaman-sop.css
 * CSS khusus halaman detail statis/SOP.
 * Tambahkan class "halaman-sop" pada elemen <main>.
 * Tidak memerlukan library tambahan; kompatibel dengan Bootstrap.
 */

main.halaman-sop {
  --sop-primary: #176b55;
  --sop-primary-dark: #104c3d;
  --sop-accent: #d7a84b;
  --sop-text: #293640;
  --sop-muted: #65737d;
  --sop-border: #e4ebe8;
  --sop-paper: #ffffff;
  --sop-background: #f3f6f5;

  color: var(--sop-text);
  background: var(--sop-background);
  padding: 1.25rem 0 3rem;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.halaman-sop .container {
  max-width: 1140px;
}

.halaman-sop .breadcrumb {
  align-items: center;
  margin: 0;
  padding: .65rem 0;
  font-size: .92rem;
}

.halaman-sop .breadcrumb a {
  color: var(--sop-primary);
}

.halaman-sop .breadcrumb a:hover {
  color: var(--sop-primary-dark);
  text-decoration: underline !important;
}

.halaman-sop .breadcrumb-item.active {
  color: var(--sop-muted);
  overflow-wrap: anywhere;
}

/* Lembar dokumen */
.halaman-sop .sop-paper {
  background: var(--sop-paper);
  border: 1px solid rgba(22, 74, 58, .08);
  border-radius: 18px;
  box-shadow: 0 12px 38px rgba(26, 52, 43, .07);
  padding: clamp(1.25rem, 4vw, 3.5rem);
}

/* Judul halaman */
.halaman-sop .sop-title {
  position: relative;
  color: var(--sop-primary-dark);
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.035em;
  text-align: center;
  overflow-wrap: anywhere;
  margin: 0 auto 2.25rem;
  padding: 0 0 1.2rem;
  max-width: 900px;
}

.halaman-sop .sop-title::after {
  content: "";
  position: absolute;
  width: 76px;
  height: 4px;
  border-radius: 99px;
  background: var(--sop-accent);
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

/* Konten dinamis dari halaman_konten */
.halaman-sop .sop-content {
  color: var(--sop-text);
  font-size: 1.075rem;
  line-height: 1.85;
  overflow-wrap: anywhere;
  word-break: normal;
}

.halaman-sop .sop-content > *:first-child {
  margin-top: 0;
}

.halaman-sop .sop-content p {
  margin: 0 0 1.1rem;
}

.halaman-sop .sop-content h2,
.halaman-sop .sop-content h3,
.halaman-sop .sop-content h4,
.halaman-sop .sop-content h5 {
  color: var(--sop-primary-dark);
  font-weight: 750;
  line-height: 1.4;
  margin: 2rem 0 .8rem;
}

.halaman-sop .sop-content h2 { font-size: 1.45rem; }
.halaman-sop .sop-content h3 { font-size: 1.28rem; }
.halaman-sop .sop-content h4 { font-size: 1.13rem; }
.halaman-sop .sop-content h5 { font-size: 1.05rem; }

.halaman-sop .sop-content strong,
.halaman-sop .sop-content b {
  color: #233c34;
  font-weight: 750;
}

.halaman-sop .sop-content ul,
.halaman-sop .sop-content ol {
  margin: .5rem 0 1.35rem;
  padding-left: 1.65rem;
}

.halaman-sop .sop-content li {
  padding-left: .25rem;
  margin: .35rem 0;
}

.halaman-sop .sop-content li::marker {
  color: var(--sop-primary);
  font-weight: 750;
}

.halaman-sop .sop-content a {
  color: var(--sop-primary);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.halaman-sop .sop-content a:hover {
  color: var(--sop-primary-dark);
}

.halaman-sop .sop-content blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--sop-accent);
  border-radius: 0 10px 10px 0;
  background: #f6f8f7;
  color: #46564f;
}

.halaman-sop .sop-content table {
  width: 100%;
  margin: 1.25rem 0;
  border-collapse: collapse;
  font-size: .98rem;
}

.halaman-sop .sop-content th,
.halaman-sop .sop-content td {
  padding: .8rem .9rem;
  border: 1px solid var(--sop-border);
  text-align: left;
  vertical-align: top;
}

.halaman-sop .sop-content th {
  background: #edf5f1;
  color: var(--sop-primary-dark);
  font-weight: 750;
}

.halaman-sop .sop-content img,
.halaman-sop .sop-content video,
.halaman-sop .sop-content iframe {
  max-width: 100%;
}

.halaman-sop .sop-content img {
  height: auto;
  border-radius: 10px;
}

.halaman-sop .sop-content hr {
  margin: 1.75rem 0;
  border: 0;
  border-top: 1px solid var(--sop-border);
  opacity: 1;
}

.halaman-sop .sop-content pre {
  max-width: 100%;
  overflow-x: auto;
  padding: 1rem;
  border-radius: 10px;
  background: #f4f6f5;
}

.halaman-sop .sop-content code {
  overflow-wrap: anywhere;
}

/* Perangkat menengah */
@media (max-width: 767.98px) {
  main.halaman-sop {
    padding-top: .5rem;
    padding-bottom: 1.5rem;
  }

  .halaman-sop .breadcrumb {
    font-size: .84rem;
    flex-wrap: wrap;
  }

  .halaman-sop .sop-paper {
    border-radius: 13px;
    padding: 1.25rem 1rem;
    box-shadow: 0 6px 22px rgba(26, 52, 43, .06);
  }

  .halaman-sop .sop-title {
    margin-bottom: 1.65rem;
    font-size: clamp(1.45rem, 6vw, 1.9rem);
    line-height: 1.3;
  }

  .halaman-sop .sop-content {
    font-size: 1rem;
    line-height: 1.8;
  }

  .halaman-sop .sop-content h2 { font-size: 1.3rem; }
  .halaman-sop .sop-content h3 { font-size: 1.16rem; }

  .halaman-sop .sop-content ul,
  .halaman-sop .sop-content ol {
    padding-left: 1.35rem;
  }

  .halaman-sop .sop-content table {
    display: block;
    overflow-x: auto;
    white-space: normal;
  }

  .halaman-sop .sop-content th,
  .halaman-sop .sop-content td {
    padding: .65rem;
  }
}

/* Tombol pendaftaran dinamis untuk seluruh halaman SOP */
.halaman-sop .sop-content a.sop-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  margin: 1rem 0;
  padding: 13px 24px;

  background-color: #176b55;
  color: #ffffff !important;

  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  text-decoration: none !important;

  border: 1px solid #176b55;
  border-radius: 9px;

  box-shadow: 0 5px 14px rgba(23, 107, 85, 0.16);
  transition: background-color .2s ease,
              box-shadow .2s ease,
              transform .2s ease;
}

.halaman-sop .sop-content a.sop-btn:hover {
  background-color: #104c3d;
  border-color: #104c3d;
  color: #ffffff !important;
  box-shadow: 0 7px 18px rgba(23, 107, 85, 0.22);
  transform: translateY(-2px);
}

.halaman-sop .sop-content a.sop-btn:focus-visible {
  outline: 3px solid rgba(23, 107, 85, 0.35);
  outline-offset: 3px;
}

@media (max-width: 576px) {
  .halaman-sop .sop-content a.sop-btn {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 16px;
  }
}



/* =========================================
   TABEL KONTEN HALAMAN SOP
   Berlaku dinamis untuk seluruh halaman
   ========================================= */

/* Tabel utama dan tabel isi */
.halaman-sop .sop-content table {
  width: 100%;
  max-width: 100%;
  margin: 1.25rem 0;
  border-collapse: separate;
  border-spacing: 0;
  color: #293640;
  background: #fff !important;
  font-size: 1rem;
  line-height: 1.75;
  border: 1px solid #e1e9e5;
  border-radius: 10px;
  overflow: hidden;
}

/* Sel tabel */
.halaman-sop .sop-content table td,
.halaman-sop .sop-content table th {
  padding: 12px 15px;
  vertical-align: top;
  border: 0;
  border-bottom: 1px solid #e8eeeb;
  background-color: transparent !important;
}

/* Hilangkan garis pada baris terakhir */
.halaman-sop .sop-content table tr:last-child > td,
.halaman-sop .sop-content table tr:last-child > th {
  border-bottom: 0;
}

/* Kolom nomor */
.halaman-sop .sop-content table td:first-child {
  width: 48px;
  min-width: 42px;
  color: #176b55;
  font-weight: 700;
  white-space: nowrap;
}

/* Tabel bertingkat yang digunakan sebagai pembungkus */
.halaman-sop .sop-content table table {
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

/* Baris bergantian pada tabel isi */
.halaman-sop .sop-content table table tr:nth-child(even) {
  background-color: #f5f8f6;
}

/* Hover baris untuk perangkat yang mendukung hover */
@media (hover: hover) {
  .halaman-sop .sop-content table table tr:hover {
    background-color: #edf5f1;
  }
}

/* Judul bagian dalam konten */
.halaman-sop .sop-content p > b:first-child,
.halaman-sop .sop-content p > strong:first-child {
  color: #104c3d;
  font-weight: 800;
}

/* Tautan dalam konten */
.halaman-sop .sop-content a:not(.sop-btn) {
  color: #176b55;
  font-weight: 650;
  text-underline-offset: 3px;
}

/* Responsif untuk HP */
@media (max-width: 767.98px) {
  .halaman-sop .sop-content table {
    font-size: .96rem;
    line-height: 1.7;
  }

  .halaman-sop .sop-content table td,
  .halaman-sop .sop-content table th {
    padding: 10px;
  }

  .halaman-sop .sop-content table td:first-child {
    width: 38px;
    min-width: 32px;
  }
}


/* Layar sangat kecil */
@media (max-width: 380px) {
  .halaman-sop .sop-paper {
    padding: 1rem .8rem;
  }

  .halaman-sop .sop-content {
    font-size: .96rem;
  }
}
