@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700;800&display=swap');

/* =========================================================
   ISO / TTQT PAGE
   File: css/components/iso.css
   Scope: Content type "TTQT ISO"

   Ghi chú:
   - Dùng cho trang chi tiết thủ tục quy trình ISO.
   - Layout gồm nội dung bên trái và menu danh mục bên phải.
   - Các lưu đồ dùng class .iso-flow--3 đến .iso-flow--10.
========================================================= */


/* =========================================================
   01. BASE / BIẾN MÀU / WRAPPER
========================================================= */

.iso-page-wrapper {
  --iso-red: #9b102f;
  --iso-red-dark: #7c0b25;
  --iso-red-soft: rgba(155, 16, 47, 0.08);
  --iso-gold: #d6a545;
  --iso-cream: #fff8ef;
  --iso-bg: #fbf6ee;
  --iso-border: #ead8d8;
  --iso-border-soft: #f0dddd;
  --iso-text: #2f2f2f;
  --iso-muted: #6b7280;

  width: 100%;
  background: var(--iso-bg);
  font-family: "Be Vietnam Pro", Arial, sans-serif;
  color: var(--iso-text);
}


/* =========================================================
   02. MAIN 2-COLUMN LAYOUT
========================================================= */

.iso-page-layout {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 16px 60px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 28px;
  align-items: start;
}

.iso-page-main {
  min-width: 0;
}

.iso-page-sidebar {
  position: sticky;
  top: 24px;
}


/* =========================================================
   03. DOCUMENT HERO / HEADER
========================================================= */

.iso-document-hero {
  position: relative;
  padding: 28px 30px;
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(155, 16, 47, 0.96), rgba(124, 11, 37, 0.96)),
    linear-gradient(135deg, var(--iso-red), var(--iso-red-dark));
  box-shadow: 0 16px 38px rgba(155, 16, 47, 0.22);
  overflow: hidden;
}

.iso-document-hero::after {
  content: "";
  position: absolute;
  right: -90px;
  top: -90px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(214, 165, 69, 0.18);
}

.iso-document-kicker {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ffe7a8;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 10px;
}

.iso-document-kicker::before {
  content: "";
  width: 26px;
  height: 3px;
  background: var(--iso-gold);
  border-radius: 999px;
}

.iso-document-title {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #fff;
  font-size: 30px;
  line-height: 1.32;
  font-weight: 800;
  letter-spacing: -0.35px;
}

.iso-document-meta {
  position: relative;
  z-index: 1;
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.iso-document-meta div {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(214, 165, 69, 0.55);
  border-radius: 14px;
  padding: 12px 14px;
}

.iso-document-meta span {
  display: block;
  color: var(--iso-muted);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 4px;
}

.iso-document-meta strong {
  display: block;
  color: var(--iso-red-dark);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
}

.iso-document-content {
  margin-top: 28px;
}


/* =========================================================
   04. RIGHT SIDEBAR MENU / DANH MỤC TTQT
========================================================= */

.iso-menu-box {
  background: #fff;
  border: 1px solid var(--iso-border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(124, 11, 37, 0.08);
}

.iso-menu-title {
  background: linear-gradient(135deg, var(--iso-red), var(--iso-red-dark));
  color: #fff;
  padding: 16px 18px;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.4;
}

.iso-menu-content {
  padding: 0;
  counter-reset: iso-menu-counter;
}

.iso-menu-content .view-content,
.iso-menu-content .item-list ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.iso-menu-content .views-row,
.iso-menu-content .item-list li {
  counter-increment: iso-menu-counter;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
}

.iso-menu-content a {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px !important;
  margin: 0 !important;
  color: #374151;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
  border-bottom: 1px solid #f1e3e3;
  border-left: 3px solid transparent;
  transition: all 0.18s ease;
}

.iso-menu-content a::before {
  content: counter(iso-menu-counter, decimal-leading-zero);
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff3e6;
  color: var(--iso-red);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.iso-menu-content a:hover {
  background: var(--iso-cream);
  color: var(--iso-red);
  border-left-color: var(--iso-gold);
  padding-left: 16px !important;
}

.iso-menu-content a.is-active {
  color: var(--iso-red);
  background: var(--iso-red-soft);
  border-left-color: var(--iso-red);
  font-weight: 800;
}

.iso-menu-content .views-row:last-child a,
.iso-menu-content .item-list li:last-child a {
  border-bottom: none;
}


/* =========================================================
   05. BODY CONTENT SECTIONS
========================================================= */

.iso-procedure-content {
  width: 100%;
}

.iso-content-section {
  margin-top: 28px;
  padding: 24px 26px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--iso-border);
  box-shadow: 0 8px 24px rgba(124, 11, 37, 0.06);
}

.iso-content-section:first-child {
  margin-top: 0;
}

.iso-content-section h2 {
  margin: 0 0 14px;
  color: var(--iso-red);
  font-size: 22px;
  line-height: 1.35;
  font-weight: 800;
  letter-spacing: -0.2px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.iso-content-section h2::before {
  content: "";
  width: 5px;
  height: 24px;
  background: linear-gradient(to bottom, var(--iso-gold), var(--iso-red));
  border-radius: 99px;
  flex: 0 0 auto;
}

.iso-content-section h3 {
  color: var(--iso-red-dark);
}

.iso-content-section p {
  margin: 0;
  color: var(--iso-text);
  font-size: 15.5px;
  line-height: 1.75;
}

.iso-content-section p + p {
  margin-top: 10px;
}

.iso-content-section > ul,
.iso-content-section > ol {
  margin: 0;
  padding-left: 22px;
}

.iso-content-section li {
  margin: 7px 0;
  line-height: 1.65;
}


/* =========================================================
   06. DEFINITION / ABBREVIATION CARDS
========================================================= */

.iso-definition-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 18px;
}

.iso-definition-card {
  border-radius: 14px;
  background: var(--iso-cream);
  border: 1px solid #f0ded3;
  padding: 18px;
}

.iso-definition-card h3 {
  margin: 0 0 10px;
  color: var(--iso-red);
  font-size: 17px;
  font-weight: 800;
}

.iso-definition-card p {
  margin: 0;
}

.iso-definition-card ul {
  margin: 0;
  padding-left: 20px;
}

.iso-definition-card li {
  margin: 7px 0;
  line-height: 1.55;
}


/* =========================================================
   07. SECTION TITLE ROW
========================================================= */

.iso-section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.iso-section-title-row h2 {
  margin-bottom: 0;
}

.iso-section-title-row span {
  white-space: nowrap;
  color: var(--iso-red);
  background: var(--iso-red-soft);
  border: 1px solid rgba(155, 16, 47, 0.18);
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}


/* =========================================================
   08. WORKFLOW / LƯU ĐỒ CÔNG VIỆC
========================================================= */

.iso-flow-wrap {
  margin-top: 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, #fffaf6, #fff);
  border: 1px solid #efdede;
  padding: 22px;
  overflow-x: auto;
}

.iso-flow {
  min-width: 880px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  align-items: stretch;
}

/* Số cột lưu đồ theo từng quy trình */
.iso-flow.iso-flow--3 {
  min-width: 680px;
  grid-template-columns: repeat(3, 1fr);
}

.iso-flow.iso-flow--4 {
  min-width: 720px;
  grid-template-columns: repeat(4, 1fr);
}

.iso-flow.iso-flow--5 {
  min-width: 900px;
  grid-template-columns: repeat(5, 1fr);
}

.iso-flow.iso-flow--6 {
  min-width: 980px;
  grid-template-columns: repeat(6, 1fr);
}

.iso-flow.iso-flow--7 {
  min-width: 1120px;
  grid-template-columns: repeat(7, 1fr);
}

.iso-flow.iso-flow--8 {
  min-width: 1280px;
  grid-template-columns: repeat(8, 1fr);
}

.iso-flow.iso-flow--10 {
  min-width: 1600px;
  grid-template-columns: repeat(10, 1fr);
}

.iso-flow-item {
  position: relative;
  min-height: 140px;
  border-radius: 18px;
  padding: 18px 14px 16px;
  background: #fff;
  border: 1px solid #eadada;
  box-shadow: 0 8px 18px rgba(124, 11, 37, 0.06);
  text-align: center;
}

.iso-flow-item:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -17px;
  top: 48%;
  transform: translateY(-50%);
  color: var(--iso-red);
  font-size: 22px;
  font-weight: 900;
  z-index: 2;
}

.iso-flow-icon {
  width: 46px;
  height: 46px;
  margin: 0 auto 10px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--iso-red), var(--iso-red-dark));
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(155, 16, 47, 0.22);
}

.iso-flow-title {
  color: var(--iso-red-dark);
  font-size: 14.5px;
  font-weight: 900;
  line-height: 1.35;
  margin-bottom: 8px;
}

.iso-flow-owner {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  background: var(--iso-red-soft);
  border: 1px solid rgba(155, 16, 47, 0.16);
  color: var(--iso-red);
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
}

.iso-flow-desc {
  margin-top: 9px;
  color: #4b5563;
  font-size: 12.5px;
  line-height: 1.45;
}

.iso-flow-note {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.iso-flow-note-card {
  border-radius: 14px;
  background: #fff;
  border: 1px dashed rgba(155, 16, 47, 0.28);
  padding: 14px 16px;
  color: #4b5563;
  font-size: 13.5px;
  line-height: 1.55;
}

.iso-flow-note-card strong {
  color: var(--iso-red);
}


/* =========================================================
   09. PROCESS TIMELINE / NỘI DUNG QUY TRÌNH
========================================================= */

.iso-process-timeline {
  position: relative;
  display: grid;
  gap: 16px;
}

.iso-process-step {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 16px;
  align-items: stretch;
}

.iso-step-number {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--iso-red), var(--iso-red-dark));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(155, 16, 47, 0.22);
}

.iso-step-content {
  border: 1px solid #efdede;
  background: linear-gradient(180deg, #fff, #fffaf6);
  border-radius: 16px;
  padding: 18px 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.iso-process-step:hover .iso-step-content {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(124, 11, 37, 0.09);
}

.iso-step-content h3 {
  margin: 0 0 9px;
  color: var(--iso-red-dark);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.15px;
  line-height: 1.4;
}

.iso-step-content p {
  margin: 0 0 14px;
  color: #374151;
  font-size: 15px;
  line-height: 1.7;
}

.iso-step-info {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.iso-step-info span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #eadada;
  padding: 7px 12px;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.35;
}

.iso-step-info strong {
  color: var(--iso-red);
}


/* =========================================================
   10. FORM TABLE / BIỂU MẪU ÁP DỤNG
========================================================= */

.iso-form-table-wrap {
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid var(--iso-border);
}

.iso-form-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: #fff;
}

.iso-form-table th {
  background: var(--iso-red);
  color: #fff;
  text-align: left;
  padding: 14px 15px;
  font-size: 14px;
  font-weight: 800;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
}

.iso-form-table th:last-child {
  border-right: 0;
}

.iso-form-table td {
  padding: 15px;
  border-top: 1px solid var(--iso-border-soft);
  border-right: 1px solid var(--iso-border-soft);
  vertical-align: top;
  font-size: 14.5px;
  line-height: 1.55;
}

.iso-form-table td:last-child {
  border-right: 0;
}

.iso-form-table tbody tr:hover {
  background: var(--iso-cream);
}

.iso-form-table ul {
  margin: 0;
  padding-left: 18px;
}


/* =========================================================
   11. ATTACHMENT FILES / TỆP BIỂU MẪU ĐÍNH KÈM
========================================================= */

.iso-attachment-section {
  margin-top: 28px;
}

.iso-attachment-list {
  margin-top: 12px;
}

.iso-attachment-list .field__label {
  display: none;
}

.iso-attachment-list .field__items {
  display: grid;
  gap: 10px;
}

.iso-attachment-list .field__item {
  margin: 0;
}

.iso-attachment-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 15px;
  border-radius: 12px;
  background: var(--iso-cream);
  border: 1px solid #efdede;
  color: var(--iso-red);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  transition: all 0.18s ease;
}

.iso-attachment-list a::before {
  content: "📎";
  font-size: 16px;
}

.iso-attachment-list a:hover {
  background: var(--iso-red);
  color: #fff;
  border-color: var(--iso-red);
  transform: translateY(-1px);
}

/* Ẩn dung lượng file để danh sách gọn hơn */
.iso-attachment-list .file-size {
  display: none !important;
}


/* =========================================================
   12. ADMIN TABS
========================================================= */

.iso-page-wrapper .tabs,
.iso-page-wrapper .tabs.primary {
  margin-bottom: 16px;
}


/* =========================================================
   13. RESPONSIVE
========================================================= */

@media (max-width: 1000px) {
  .iso-page-layout {
    grid-template-columns: 1fr;
  }

  .iso-page-sidebar {
    position: static;
  }

  .iso-document-meta {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .iso-definition-grid {
    grid-template-columns: 1fr;
  }

  .iso-flow-note {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .iso-page-layout {
    padding: 24px 12px 44px;
  }

  .iso-document-hero {
    padding: 22px 20px;
  }

  .iso-document-title {
    font-size: 23px;
  }

  .iso-document-meta {
    grid-template-columns: 1fr;
  }

  .iso-menu-title {
    font-size: 15px;
  }

  .iso-content-section {
    padding: 20px 16px;
  }

  .iso-content-section h2 {
    font-size: 19px;
  }

  .iso-section-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .iso-section-title-row span {
    white-space: normal;
  }

  .iso-flow-wrap {
    padding: 16px;
  }

  .iso-process-step {
    grid-template-columns: 1fr;
  }

  .iso-step-number {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    font-size: 16px;
  }

  .iso-step-info span {
    border-radius: 12px;
  }
}
