/* Variable Global */
:root {
  /* Color */
  --primary-color: rgba(0, 82, 156, 1);

  /* Font size */
  --font-size-title: 18px;
  --font-size-text: 16px;
  --font-size-small: 14px;
  --font-size-mini: 12px;

  /* Space */
  --space-mini: 4px;
  --space-small: 8px;
  --space-medium: 16px;
  --space-large: 24px;

  /* Font-weight */
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-bold: 700;
}

@font-face {
  font-family: "Myriad Pro";
  src: url("../font/MYRIADPRO-REGULAR.OTF") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Myriad Pro";
  src: url("../font/MyriadPro-Light.otf") format("opentype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Myriad Pro";
  src: url("../font/MYRIADPRO-SEMIBOLD.OTF") format("opentype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Myriad Pro";
  src: url("../font/MYRIADPRO-BOLD.OTF") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Base Styles */
body {
  font-family: "Myriad Pro", Arial, sans-serif;
  line-height: 1.6;
  color: #333;
}

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

.instruction__logo {
  text-align: center;
  padding: var(--space-medium);
  background: #fff;
}

.instruction__logo img {
  max-width: 100%;
  height: auto;
}

/* Main Title */
.main-title {
  display: block;
  text-align: center;
  font-size: 40px;
  font-weight: var(--font-weight-bold);
  color: var(--primary-color);
  padding: var(--space-large) var(--space-medium);
  margin: 0 auto;
  max-width: 1200px;
  background: #fff;
}

/* Main Container */
.main-container {
  display: flex;
  min-height: calc(100vh - 200px);
  max-width: 1200px;
  margin: 0 auto;
  gap: var(--space-large);
  align-items: flex-start;
}

html {
  scroll-behavior: smooth;
}

/* Sidebar Styles */
.sidebar {
  width: 320px;
  background: #fff;
  border-right: 1px solid #e0e0e0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  align-self: flex-start;
  max-height: 100vh;
}

/* Search Input */
.sidebar__search {
  position: relative;
  padding: var(--space-medium);
  border-bottom: 1px solid #e0e0e0;
}

.sidebar__search-input {
  width: 100%;
  padding: var(--space-small) var(--space-medium) var(--space-small)
    var(--space-small);
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  font-size: var(--font-size-text);
  outline: none;
  transition: border-color 0.2s;
}

.sidebar__search-input:focus {
  border-color: var(--primary-color);
}

.sidebar__search-icon {
  position: absolute;
  right: calc(var(--space-medium) + var(--space-small));
  top: 50%;
  transform: translateY(-50%);
  color: #666;
  pointer-events: none;
}

/* Navigation */
.sidebar__nav {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-small) 0;
}

.sidebar__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Sidebar Items */
.sidebar__item {
  margin: 0;
}

.sidebar__link {
  display: block;
  padding: var(--space-small) calc(var(--space-medium) * 2) var(--space-small)
    var(--space-medium);
  color: #333;
  text-decoration: none;
  font-size: var(--font-size-text);
  transition: background-color 0.2s, color 0.2s;
  cursor: pointer;
  position: relative;
}

.sidebar__link:hover {
  background-color: #f5f5f5;
}

.sidebar__item.active > .sidebar__link,
.sidebar__subitem.active > .sidebar__sublink,
.sidebar__subsubitem.active > .sidebar__subsublink {
  background-color: var(--primary-color);
  color: #fff;
  font-weight: var(--font-weight-medium);
}

/* Dropdown arrow icons - only show when active */
.sidebar__item--has-children.active > .sidebar__link::after,
.sidebar__subitem--has-children.active > .sidebar__sublink::after {
  content: "";
  position: absolute;
  right: var(--space-medium);
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: translateY(-30%) rotate(225deg);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

/* Sub Items */
.sidebar__sublist {
  list-style: none;
  padding: 0;
  margin: 0;
  background-color: #f9f9f9;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.sidebar__item--has-children.active > .sidebar__sublist,
.sidebar__subitem--has-children.active > .sidebar__subsublist,
.sidebar__sublist.show,
.sidebar__subsublist.show {
  max-height: 800px;
}

.sidebar__subitem {
  margin: 0;
}

.sidebar__sublink {
  display: block;
  padding: var(--space-small) var(--space-medium) var(--space-small)
    calc(var(--space-medium) * 2);
  color: #555;
  text-decoration: none;
  font-size: var(--font-size-small);
  transition: background-color 0.2s, color 0.2s;
  cursor: pointer;
}

.sidebar__sublink:hover {
  background-color: #f0f0f0;
}

/* Sub Sub Items */
.sidebar__subsublist {
  list-style: none;
  padding: 0;
  margin: 0;
  background-color: #f0f0f0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.sidebar__subsubitem {
  margin: 0;
}

.sidebar__subsublink {
  display: block;
  padding: var(--space-small) var(--space-medium) var(--space-small)
    calc(var(--space-medium) * 3);
  color: #666;
  text-decoration: none;
  font-size: var(--font-size-small);
  transition: background-color 0.2s, color 0.2s;
  cursor: pointer;
}

.sidebar__subsublink:hover {
  background-color: #e8e8e8;
}

/* Content Area */
.content {
  flex: 1;
  padding: var(--space-large);
  background: #fafafa;
}

.content__title {
  display: block;
  text-align: center;
  font-size: 40px;
  font-weight: var(--font-weight-bold);
  color: var(--primary-color);
  margin-bottom: var(--space-large);
  padding: var(--space-medium) 0;
}

.content__section {
  max-width: 800px;
  margin: 0 auto var(--space-large);
}

.content__section h2 {
  font-size: var(--font-size-title);
  color: var(--primary-color);
  margin-bottom: var(--space-medium);
  font-weight: var(--font-weight-bold);
}

.content img {
  max-width: 100%;
  height: auto;
}

.content__section p {
  font-size: var(--font-size-text);
  color: #333;
  margin-bottom: var(--space-medium);
  line-height: 1.8;
  font-weight: var(--font-weight-normal);
}

/* Accessibility table */
.accessibility-table-wrapper {
  margin-top: var(--space-large);
  overflow-x: auto;
}

.accessibility-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-small);
}

.accessibility-table th,
.accessibility-table td {
  border: 1px solid #d0d0d0;
  padding: 10px 16px;
  vertical-align: middle;
}

.accessibility-table thead th {
  background-color: #f5f5f5;
  font-weight: var(--font-weight-medium);
  text-align: center;
}

.accessibility-table tbody td:first-child {
  font-weight: var(--font-weight-medium);
}

.accessibility-table .center {
  text-align: center;
}

.instruction__appWrapper {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.instruction__appWrapper-app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.instruction__appWrapper-app img {
  width: 200px;
  height: auto;
}

.instruction--link-qr {
  margin-top: 30px;
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
}

.instruction--link-qr img {
  width: 150px;
  height: auto;
}

.instruction-link {
  text-decoration: none;
}

.primary-highlight {
  color: var(--primary-color);
}

.text-bold {
  font-style: bold;
  font-weight: var(--font-weight-bold);
}

.text-primary-color {
  color: var(--primary-color);
}

.shadow-md {
  box-shadow: none !important;
}

/* Mobile navigation */
.mobile-nav {
  display: none;
  padding: 0 var(--space-medium) var(--space-medium);
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.mobile-nav__label {
  display: block;
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-small);
  color: var(--primary-color);
  text-align: center;
}

.mobile-nav__select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cfd4dc;
  border-radius: 10px;
  font-size: var(--font-size-text);
  outline: none;
  background: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  color: #1a1f36;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #999 50%),
    linear-gradient(135deg, #999 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.mobile-nav__select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 6px 16px rgba(0, 82, 156, 0.15);
}

.mobile-nav__select option {
  padding: 10px 12px;
  font-size: var(--font-size-text);
  color: #1a1f36;
  background: #fff;
  font-weight: 500;
}

.mobile-nav__select option:checked {
  background-color: #e8f1fb;
  color: #0b3d91;
}

.mobile-dropdown {
  position: relative;
}

.mobile-dropdown__toggle {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cfd4dc;
  border-radius: 10px;
  background: #fff;
  font-size: var(--font-size-text);
  color: #1a1f36;
  text-align: left;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mobile-dropdown__toggle::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid #666;
  border-bottom: 2px solid #666;
  transform: rotate(45deg);
  margin-left: auto;
}

.mobile-dropdown__toggle:focus {
  border-color: var(--primary-color);
  box-shadow: 0 6px 16px rgba(0, 82, 156, 0.15);
  outline: none;
}

.mobile-dropdown__list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #cfd4dc;
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
  max-height: 320px;
  overflow-y: auto;
  padding: 6px 0;
  z-index: 30;
  display: none;
}

.mobile-dropdown__list.show {
  display: block;
}

.mobile-dropdown__item {
  padding: 10px 14px;
  font-size: var(--font-size-text);
  color: #1a1f36;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.mobile-dropdown__item:hover,
.mobile-dropdown__item:focus {
  background: #e8f1fb;
  color: #0b3d91;
  outline: none;
}

.mobile-dropdown__item.active {
  background: #d9e9ff;
  color: #0b3d91;
  font-weight: 600;
}

@media (max-width: 768px) {
  .mobile-nav__select {
    font-size: 15px;
  }

  select.mobile-nav__select::-webkit-scrollbar {
    width: 6px;
  }

  select.mobile-nav__select::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
  }

  .instruction__appWrapper {
    flex-direction: column;
    gap: 20px;
    align-items: center;
  }
}

@media (max-width: 768px) {
  .main-container {
    flex-direction: column;
    padding: 0 var(--space-medium);
    gap: var(--space-medium);
  }

  .sidebar {
    display: none;
  }

  .content {
    padding: 0;
  }

  .content__title {
    display: none;
  }

  .main-title {
    font-size: 24px;
    padding: var(--space-medium) var(--space-small);
  }

  .content__section {
    scroll-margin-top: 80px;
  }

  .mobile-nav {
    display: block;
    margin-bottom: 20px;
  }

  .instruction__logo {
    padding: var(--space-small);
  }

  .content img {
    max-height: 60vh;
    width: auto;
    margin: 0 auto;
    display: block;
    object-fit: contain;
  }

  .instruction__appWrapper-app img {
    width: 160px;
    height: auto;
  }

  .instruction--link-qr img {
    width: 200px;
    height: auto;
  }
}
