/* DM plugin styles - look & feel similar to BV Nhi TW */

/* ===========================
   FIX GRID 4 COLUMN CHUẨN FLATSOME
=========================== */

.dm-doctor-grid {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -10px; /* giống Flatsome */
  justify-content: flex-start;
}

.dm-doctor-item {
  width: 25%; /* ✅ đúng 4 cột desktop */
  padding: 0 10px;
  box-sizing: border-box;
  margin-bottom: 24px;
  text-align: center; /* ✅ căn giữa toàn bộ */
  transition: 0.3s ease;
}

/* Hover */
.dm-doctor-item:hover {
  transform: translateY(-6px);
}

/* Ảnh bác sĩ */
.dm-thumb {
  width: 100%;
  border: 1px solid #ddd; /* ✅ border mảnh giống mẫu */
  border-radius: 6px;
  overflow: hidden;
}

.dm-thumb img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

/* Info */
.dm-doctor-item .dm-info {
  padding: 12px;
  text-align: center;
}

.dm-doctor-item h3 {
  margin: 12px 0 4px;
  font-size: 18px;
  color: #0b7ac1;
  font-weight: 700;
  text-align: center;
}

.dm-doctor-item .dm-pos {
  color: #666;
  font-size: 14px;
  text-align: center;
}

/* ===========================
   PAGINATION
=========================== */
.dm-pagination {
  text-align: center;
  margin-top: 18px;
}

.dm-page {
  display: inline-block;
  margin: 2px;
  padding: 6px 10px;
  background: #f4f4f4;
  color: #333;
  border-radius: 4px;
  text-decoration: none;
  transition: 0.25s;
}

.dm-page:hover {
  background: #0b7ac1;
  color: #fff;
}

.dm-page.current {
  background: #0b7ac1;
  color: #fff;
}

/* =============================
   LAYOUT CHI TIẾT BÁC SĨ - FIXED
============================= */

.dm-detail-container {
  max-width: 1100px;
  margin: 40px auto;
  position: relative;
  color: #000000; /* Đảm bảo màu chữ đen */
}

.dm-breadcrumbs {
  margin-bottom: 15px;
  color: #000000;
  font-size: 14px;
  line-height: 1.4;
}

#dm-breadcrumbs a {
  color: #0073aa !important;
}

#dm-breadcrumbs a:hover {
  color: #ffd700 !important;
}

/* Cụ thể hóa cho từng link */
.dm-breadcrumbs a:first-child:hover {
  color: #ffd700 !important; /* Trang chủ - màu vàng khi hover */
}

.dm-breadcrumbs a:nth-child(2):hover {
  color: #ffd700 !important; /* Đội ngũ Bác sĩ - màu vàng khi hover */
}

.dm-breadcrumbs span {
  color: #000000; /* Màu đen cho trang hiện tại */
  font-weight: 500;
}

.dm-breadcrumbs a + a:before {
  margin: 0 8px;
  color: #666;
}

.dm-title {
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #000000; /* Đảm bảo màu đen */
}

.dm-sub {
  color: #000000; /* Đổi từ #777 sang đen */
  margin-bottom: 15px;
}

/* ✅ FIX LAYOUT 2 CỘT TRIỆT ĐỂ */
.dm-top-row {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  margin-bottom: 30px;
  min-height: 0;
  position: relative;
  color: #000000; /* Đảm bảo màu chữ đen */
}

.dm-left-col {
  width: 35%;
  flex: 0 0 35%; /* flex-grow, flex-shrink, flex-basis */
min-width: 0;
  position: relative;
  text-align: center;
  color: #000000; /* Đảm bảo màu chữ đen */
}

.dm-right-col {
  width: 65%;
  flex: 0 0 65%;
  min-width: 0;
  color: #000000; /* Đảm bảo màu chữ đen */
}

/* ====== CỘT TRÁI ====== */

.dm-photo-large {
  text-align: center;
  position: relative;
  width: 100%;
}

.dm-photo-large img {
  width: 100%;
  max-width: 350px;
  border-radius: 8px;
  object-fit: cover;
  margin-bottom: 20px;
  display: block;
  flex-shrink: 0;
  transition: none !important;
}

.dm-meta-box {
  text-align: center;
  font-size: 15px;
  line-height: 1.6;
  position: relative;
  text-align: left;
  color: #000000; /* Đảm bảo màu chữ đen */
}

.dm-meta-box h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
  text-align: left;
  color: #000000; /* Đảm bảo màu đen */
}

.dm-meta-box p {
  margin: 4px 0;
  text-align: left;
  color: #000000; /* Đã có màu đen */
}

.dm-meta-box strong {
  color: #000000; /* Đảm bảo thẻ strong cũng màu đen */
}

/* ======= CỘT PHẢI ======= */

.dm-section-title {
  color: #000000; /* Đổi từ #0b7ac1 sang đen */
  font-weight: 700;
  margin-top: 26px;
  margin-bottom: 10px;
  font-size: 20px;
}

.dm-list li {
  margin-bottom: 6px;
  font-size: 15px;
  color: #000000; /* Đảm bảo màu đen */
}

.dm-content {
  color: #000000; /* Đảm bảo toàn bộ content màu đen */
}

.dm-content p {
  margin-bottom: 10px;
  font-size: 15px;
  line-height: 1.6;
  color: #000000; /* Đã có màu đen */
}

.dm-content strong {
  color: #000000; /* Đảm bảo thẻ strong màu đen */
}

.dm-content em {
  color: #000000; /* Đảm bảo thẻ em màu đen */
}

/* ======= RESEARCH SECTION - FIXED POSITION ======= */
.dm-research-wrapper {
  margin-top: 20px;
  width: 100%;
  position: relative;
  left: 0;
  box-sizing: border-box;
  color: #000000; /* Đảm bảo màu chữ đen */
}

/* Research section container - QUAN TRỌNG: đặt trong cột phải */
.dm-research-section {
  margin-top: 26px;
  width: 100%;
  color: #000000; /* Đảm bảo màu chữ đen */
}

/* Tiêu đề nghiên cứu */
.dm-research-title {
  color: #000000; /* Đổi từ #0b7ac1 sang đen */
  font-weight: 700;
  margin-bottom: 15px;
  font-size: 20px;
  text-align: left; /* Giữ tiêu đề căn trái */
}

/* Nút research - CĂN CHỈNH LẠI */
.dm-research-toggle {
  -moz-box-shadow: inset 0 1px 0 0 #54a3f7;
  -webkit-box-shadow: inset 0 1px 0 0 #54a3f7;
  box-shadow: inset 0 1px 0 0 #54a3f7;
  background: -webkit-gradient(
    linear,
    left top,
    left bottom,
    color-stop(0.05, #007dc1),
    color-stop(1, #0061a7)
  );
  background: -moz-linear-gradient(top, #007dc1 5%, #0061a7 100%);
  background: -webkit-linear-gradient(top, #007dc1 5%, #0061a7 100%);
  background: -o-linear-gradient(top, #007dc1 5%, #0061a7 100%);
  background: -ms-linear-gradient(top, #007dc1 5%, #0061a7 100%);
  background: linear-gradient(to bottom, #007dc1 5%, #0061a7 100%);
background-color: #007dc1;
  -moz-border-radius: 3px;
  -webkit-border-radius: 3px;
  border-radius: 3px;
  border: 1px solid #124d77;
  display: inline-block;
  cursor: pointer;
  color: #ffffff; /* Giữ màu trắng cho chữ trên nút */
  padding: 6px 24px;
  text-decoration: none;
  text-shadow: 0 1px 0 #154682;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  width: auto;
  margin: 0 auto;
  text-align: center;
}

.dm-research-toggle:hover {
  background: -webkit-gradient(
    linear,
    left top,
    left bottom,
    color-stop(0.05, #0061a7),
    color-stop(1, #007dc1)
  );
  background: -moz-linear-gradient(top, #0061a7 5%, #007dc1 100%);
  background: -webkit-linear-gradient(top, #0061a7 5%, #007dc1 100%);
  background: -o-linear-gradient(top, #0061a7 5%, #007dc1 100%);
  background: -ms-linear-gradient(top, #0061a7 5%, #007dc1 100%);
  background: linear-gradient(to bottom, #0061a7 5%, #007dc1 100%);
  background-color: #0061a7;
  color: #ffffff; /* Giữ màu trắng khi hover */
}

/* Nội dung nghiên cứu */
.dm-research-content {
  display: none;
  margin-top: 15px;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  line-height: 1.6;
  width: 100%;
  box-sizing: border-box;
  position: relative;
  text-align: left; /* Nội dung căn trái */
  color: #000000; /* Đảm bảo màu đen */
}

.dm-research-content.active {
  display: block;
}

.dm-research-content p {
  color: #000000; /* Đảm bảo paragraph màu đen */
}

.dm-research-content strong {
  color: #000000; /* Đảm bảo strong màu đen */
}

.dm-research-content em {
  color: #000000; /* Đảm bảo em màu đen */
}

.dm-research-content li {
  color: #000000; /* Đảm bảo list items màu đen */
}

/* =============================
   FIX FLATSOME SPECIFIC ISSUES
============================= */

/* Ngăn chặn các transition không mong muốn từ Flatsome */
.dm-left-col * {
  transition: none !important;
}

/* Đảm bảo flex container không bị ảnh hưởng bởi click events */
.dm-top-row {
  pointer-events: none;
}

.dm-top-row > * {
  pointer-events: auto;
}

/* Fix cho images trong Flatsome */
.dm-photo-large img {
  backface-visibility: hidden;
  transform: translateZ(0);
}

/* =============================
   MOBILE RESPONSIVE - FIXED
============================= */

@media (max-width: 900px) {
  .dm-detail-container {
    margin: 20px auto;
    padding: 0 200px; /* Cách đều trái phải 200px */
    max-width: 100%;
    box-sizing: border-box;
    color: #000000; /* Đảm bảo màu chữ đen trên mobile */
  }

  .dm-top-row {
    flex-direction: column;
    gap: 0;
    align-items: stretch;
    color: #000000; /* Đảm bảo màu chữ đen */
  }

  .dm-left-col,
  .dm-right-col {
    width: 100%;
    flex: none;
    text-align: left;
color: #000000; /* Đảm bảo màu chữ đen */
  }

  /* Ảnh căn trái và cùng hàng dọc với text */
  .dm-photo-large {
    text-align: left;
    margin-bottom: 20px;
  }

  .dm-photo-large img {
    width: 100%;
    max-width: 100%; /* Cho ảnh chiếm full width của container */
    margin: 0;
  }

  /* Thông tin meta - cùng hàng dọc với ảnh */
  .dm-meta-box {
    text-align: left !important;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    color: #000000; /* Đảm bảo màu chữ đen */
  }

  .dm-meta-box h3 {
    font-size: 20px;
    margin-bottom: 15px;
    text-align: left !important;
    color: #000000; /* Đảm bảo màu đen */
  }

  .dm-meta-box p {
    margin: 8px 0;
    text-align: left !important;
    justify-content: flex-start;
    color: #000000; /* Đảm bảo màu đen */
  }

  .dm-meta-box strong {
    color: #000000; /* Đảm bảo strong màu đen */
  }

  /* Breadcrumbs - cùng hàng dọc */
  .dm-breadcrumbs {
    text-align: left;
    font-size: 14px;
    margin-bottom: 20px;
    color: #000000; /* Đảm bảo màu đen */
  }

  /* Tiêu đề chính */
  .dm-title {
    font-size: 24px;
    text-align: left;
    margin-bottom: 5px;
    color: #000000; /* Đảm bảo màu đen */
  }

  .dm-date {
    text-align: left;
    margin-bottom: 20px;
    color: #000000; /* Đổi từ #777 sang đen */
  }

  /* Các section trong cột phải - cùng hàng dọc */
  .dm-section-title {
    text-align: left;
    font-size: 20px;
    margin-top: 25px;
    margin-bottom: 10px;
    color: #000000; /* Đảm bảo màu đen */
  }

  .dm-content,
  .dm-list {
    text-align: left;
    color: #000000; /* Đảm bảo màu đen */
  }

  .dm-content p {
    color: #000000; /* Đảm bảo paragraph màu đen */
  }

  .dm-content strong {
    color: #000000; /* Đảm bảo strong màu đen */
  }

  .dm-list li {
    color: #000000; /* Đảm bảo list items màu đen */
  }

  /* Research section - cùng hàng dọc */
  .dm-research-section {
    width: 100%;
    margin-left: 0;
    text-align: left;
    color: #000000; /* Đảm bảo màu chữ đen */
  }

  .dm-research-title {
    text-align: left !important;
    font-size: 20px;
    color: #000000; /* Đảm bảo màu đen */
  }

  .dm-research-toggle {
    width: auto;
    max-width: none;
    text-align: center;
    margin: 10px 0;
    display: block;
    color: #ffffff; /* Giữ màu trắng cho chữ trên nút */
  }

  .dm-research-content {
    margin-top: 15px;
    padding: 15px;
    text-align: left;
    color: #000000; /* Đảm bảo màu đen */
  }

  .dm-research-content p {
    color: #000000; /* Đảm bảo paragraph màu đen */
  }

  .dm-research-content strong {
    color: #000000; /* Đảm bảo strong màu đen */
  }

  hr {
    margin: 20px 0;
    border-color: #000000; /* Đảm bảo đường kẻ màu đen */
  }
}

/* Mobile nhỏ hơn */
@media (max-width: 768px) {
  .dm-detail-container {
    padding: 0 100px; /* Giảm khoảng cách trên tablet nhỏ */
color: #000000; /* Đảm bảo màu chữ đen */
  }
}

@media (max-width: 480px) {
  .dm-detail-container {
    padding: 0 50px; /* Giảm khoảng cách trên mobile nhỏ */
    color: #000000; /* Đảm bảo màu chữ đen */
  }

  .dm-photo-large img {
    max-width: 100%;
  }

  .dm-title {
    font-size: 22px;
    color: #000000; /* Đảm bảo màu đen */
  }

  .dm-research-toggle {
    width: 100%;
    font-size: 13px;
    padding: 8px 16px;
    color: #ffffff; /* Giữ màu trắng cho chữ trên nút */
  }
}

/* Mobile rất nhỏ */
@media (max-width: 360px) {
  .dm-detail-container {
    padding: 0 20px; /* Khoảng cách nhỏ nhất cho mobile rất nhỏ */
    color: #000000; /* Đảm bảo màu chữ đen */
  }
}

/* Đảm bảo tất cả các phần tử con đều màu đen */
.dm-detail-container,
.dm-detail-container *:not(.dm-research-toggle) {
  color: #000000 !important;
}

/* Riêng nút research giữ màu chữ trắng */
.dm-research-toggle {
  color: #ffffff !important;
}

/* ======= SLIDER CÁC BÁC SĨ KHÁC ======= */
.entry-related {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 2px solid #e0e0e0;
}

.entry-related__title {
  text-align: center;
  margin-bottom: 30px;
}

.entry-related__title span {
  color: #000000;
  font-size: 24px;
  font-weight: 700;
  text-transform: uppercase;
  display: inline-block;
  padding-bottom: 10px;
  border-bottom: 3px solid #0073aa;
}

/* Item styling */
.entry-related .item {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.entry-related .item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.entry-related .figu {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.entry-related .figu img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.entry-related .item:hover .figu img {
  transform: scale(1.05);
}

.entry-related .para {
  padding: 20px;
  text-align: center;
}

.entry-related .para__title {
  margin: 0 0 10px 0;
  font-size: 18px;
  font-weight: 700;
}

.entry-related .para__title a {
  color: #000000;
  text-decoration: none;
  transition: color 0.3s ease;
}

.entry-related .para__title a:hover {
  color: #0073aa;
}

.entry-related .para__position {
  color: #0073aa;
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  line-height: 1.4;
}

/* Owl Carousel Navigation - FIXED FOR YOUR HTML STRUCTURE */
.entry-related {
  position: relative;
}

.entry-related .owl-carousel {
  position: relative;
}

.entry-related .owl-theme .owl-nav {
  display: block !important;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: none;
  z-index: 100;
}

.entry-related .owl-theme .owl-nav [class*="owl-"] {
  position: absolute !important;
  top: calc(50% + 140px) !important; /* Điều chỉnh theo chiều cao ảnh */
transform: translateY(-50%) !important;
  background: rgba(255, 255, 255, 0.95) !important;
  color: #0073aa !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
  width: 45px !important;
  height: 45px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 20px !important;
  transition: all 0.3s ease !important;
  border: 2px solid #0073aa !important;
  outline: none !important;
  margin: 0 !important;
  padding: 0 !important;
  z-index: 1000 !important;
  pointer-events: auto;
  font-family: "Font Awesome 5 Free" !important;
  font-weight: 900 !important;
}

.entry-related .owl-theme .owl-nav .owl-prev {
  left: -20px !important; /* Đưa ra ngoài một chút */
  right: auto !important;
}

.entry-related .owl-theme .owl-nav .owl-next {
  right: -20px !important; /* Đưa ra ngoài một chút */
  left: auto !important;
}

.entry-related .owl-theme .owl-nav [class*="owl-"]:hover {
  background: #ffffff !important;
  color: #005a87 !important;
  border-color: #005a87 !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4) !important;
  transform: translateY(-50%) scale(1.15) !important;
}

/* QUAN TRỌNG: Đảm bảo item và ảnh có position relative */
.entry-related .owl-carousel .item {
  position: relative;
}

.entry-related .figu {
  position: relative;
  overflow: hidden;
}

.entry-related .figu img {
  width: 100%;
  height: auto;
  display: block;
}

/* Owl Carousel Dots */
.entry-related .owl-theme .owl-dots {
  margin-top: 25px !important;
  text-align: center;
  position: relative;
  z-index: 10;
  display: block !important;
}

.entry-related .owl-theme .owl-dots .owl-dot {
  display: inline-block;
  margin: 0 4px;
}

.entry-related .owl-theme .owl-dots .owl-dot span {
  width: 12px;
  height: 12px;
  margin: 5px;
  background: #ccc;
  border-radius: 50%;
  display: block;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.entry-related .owl-theme .owl-dots .owl-dot.active span {
  background: #0073aa !important;
  transform: scale(1.2);
  box-shadow: 0 2px 6px rgba(0, 115, 170, 0.3);
}

.entry-related .owl-theme .owl-dots .owl-dot:hover span {
  background: #0073aa;
  transform: scale(1.1);
}

/* Responsive */
@media (max-width: 768px) {
  .entry-related .owl-theme .owl-nav {
    display: none !important;
  }

  .entry-related .owl-theme .owl-nav [class*="owl-"] {
    width: 35px !important;
    height: 35px !important;
    font-size: 16px !important;
  }

  .entry-related .owl-theme .owl-nav .owl-prev {
    left: -15px !important;
  }

  .entry-related .owl-theme .owl-nav .owl-next {
    right: -15px !important;
  }

  .entry-related .owl-theme .owl-dots {
    margin-top: 20px !important;
  }

  .entry-related {
    margin-top: 40px;
    padding-top: 30px;
  }

  .entry-related__title span {
    font-size: 20px;
  }

  .entry-related .figu {
    height: 180px;
  }
}
@media (max-width: 480px) {
  .entry-related .figu {
    height: 160px;
  }

  .entry-related .para {
    padding: 15px;
  }

  .entry-related .para__title {
    font-size: 16px;
  }
}