/* ============================================================
   Baode Instruments en_style.css
   Layout / components / responsive all use Bootstrap 5 classes,
   this file only keeps necessary custom styles Bootstrap cannot replace.
   ============================================================ */

/* ---------- Brand color override: bg-primary / text-primary / btn-primary use brand blue ---------- */
:root {
  --bs-primary: #0973C1;
  --bs-primary-rgb: 9, 115, 193;
  --bs-link-color: #0973C1;
  --bs-link-hover-color: #06588f;
}

/* ---------- Fonts (Montserrat local font pack, not replaceable by Bootstrap) ---------- */
@font-face {
  font-family: 'Conv_MONTSERRAT-REGULAR';
  src: url('fonts/MONTSERRAT-REGULAR.eot');
  src: local('☺'), url('fonts/MONTSERRAT-REGULAR.woff') format('woff'), url('fonts/MONTSERRAT-REGULAR.ttf') format('truetype'), url('fonts/MONTSERRAT-REGULAR.svg') format('svg');
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: 'Conv_MONTSERRAT-LIGHT';
  src: url('fonts/MONTSERRAT-LIGHT.eot');
  src: local('☺'), url('fonts/MONTSERRAT-LIGHT.woff') format('woff'), url('fonts/MONTSERRAT-LIGHT.ttf') format('truetype'), url('fonts/MONTSERRAT-LIGHT.svg') format('svg');
  font-weight: normal;
  font-style: normal;
}

/* ---------- Global base ---------- */
body {
  font-family: 'Conv_MONTSERRAT-LIGHT', 'Helvetica Neue', Arial, sans-serif;
  background: #fff;
  color: #333;
}
.container {
  max-width: 1400px !important;
  width: 100%;
}

/* ---------- Desktop nav: hover blue background + dropdown (match CN version) ---------- */
.nav .nav-item { display: flex; align-items: center; position: relative; }
.nav .nav-item:hover,
.nav .nav-item.active { background: var(--bs-primary); }
.nav .nav-item:hover > .nav-link,
.nav .nav-item.active > .nav-link { color: #fff; }
.nav .nav-item:hover > .dropdown-menu { display: block; top: 100%; left: 0; margin-top: 0; }

/* Dropdown beautify (match CN version) */
.nav .dropdown-menu {
  border: none;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .15);
  padding: 6px 0;
  min-width: 170px;
  overflow: hidden;
  animation: navMenuIn .18s ease-out;
}
.nav .dropdown-menu .dropdown-item {
  padding: 9px 20px;
  font-size: 14px;
  color: #333;
  border-left: 3px solid transparent;
  transition: all .15s ease;
}
.nav .dropdown-menu .dropdown-item:hover {
  background: #eef6fc;
  color: var(--bs-primary);
  border-left-color: var(--bs-primary);
}
@keyframes navMenuIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Image hover zoom (no Bootstrap utility equivalent) ---------- */
.zoom { overflow: hidden; }
.zoom img { transition: transform .5s ease; }
.zoom:hover img { transform: scale(1.1); }

/* ---------- Homepage slogan (serif font, no Bootstrap equivalent) ---------- */
.banner-slogan {
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-size: 2.7rem;
  letter-spacing: 1px;
}

/* ---------- Rich text content (editor HTML, cannot add classes) ---------- */
.detailcontent img, .showcontent img { max-width: 100%; height: auto; }
.detailcontent video { width: 100%; }
.detailcontent table { max-width: 100%; }

/* ---------- Pagination (generated by backend PHP, class names fixed) ---------- */
.pages { text-align: center; padding: 20px 0; }
.pages a, .pages span { display: inline-block; margin: 0 3px; padding: 5px 12px; border: 1px solid #dee2e6; border-radius: 4px; color: var(--bs-primary); background: #fff; text-decoration: none; }
.pages a:hover { background: var(--bs-primary); color: #fff; border-color: var(--bs-primary); }
.pages .current, .pages .on { background: var(--bs-primary); color: #fff; border-color: var(--bs-primary); }

/* ---------- Mobile: expand dropdown directly inside collapsed menu ---------- */
@media (max-width: 767.98px) {
  .nav .dropdown-menu {
    display: block;
    position: static;
    background: transparent;
    border: 0;
    box-shadow: none;
  }
  .nav .dropdown-menu .dropdown-item { color: #fff; padding-left: 1.5rem; }
}

/* ---------- Sidebar menu (match CN version) ---------- */
.side-menu { padding: 0.75rem 0 0.5rem; }
.side-menu .list-group-item {
  border-left: 3px solid transparent;
  color: #444;
  padding: 0.9rem 1.25rem;
  font-size: 15px;
  transition: all .15s ease;
}
.side-menu .list-group-item:hover {
  background: #eef6fc;
  color: var(--bs-primary);
  border-left-color: var(--bs-primary);
}
.side-menu .list-group-item.active {
  background: var(--bs-primary);
  border-color: transparent;
  border-left-color: #fff;
  color: #fff;
}
.side-menu .list-group-item.active:hover { color: #fff; }
.side-menu .list-group-item.active + .list-group-item { margin-top: 0.6rem; }
/* List item arrow icon: primary by default, white when active */
.list-group-item .fa-angle-right { color: var(--bs-primary); }
.list-group-item.active .fa-angle-right { color: #fff; }
.side-menu .list-group-item.ps-5 {
  position: relative;
  font-size: 0.875rem;
  color: #555;
  padding: 0.65rem 1.25rem 0.65rem 2.6rem;
}
.side-menu .list-group-item.ps-5::before {
  content: "";
  position: absolute;
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  background: var(--bs-primary);
  border-radius: 50%;
  opacity: 0.7;
}
.side-menu .list-group-item.ps-5:hover {
  background: #eef6fc;
  color: var(--bs-primary);
}

/* Hide sidebar card shadow when no submenu items */
.shadow-sm.rounded.overflow-hidden.bg-white:has(.side-menu:not(:has(.list-group-item))) {
  box-shadow: none !important;
  background: transparent !important;
  border-radius: 0 !important;
}
.shadow-sm.rounded.overflow-hidden.bg-white:has(.side-menu:not(:has(.list-group-item))) .bg-primary {
  border-radius: 0.375rem;
}
