/**
 * MoMo Blog Posts Layout Styles
 * Styling for custom blog layout matching MoMo design
 */

/* GLOBAL FONT: INTER */
/* GLOBAL FONT: INTER */
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
a,
li,
span,
div,
strong,
em,
button,
input,
textarea,
select,
.nav > li > a {
  font-family: interLocal, "Inter", sans-serif !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* =========================================
   LOAD MORE HIGHLIGHT ANIMATION
   ========================================= */
.momo-new-post-highlight {
  animation: highlightFadeIn 0.5s ease-out;
  background: linear-gradient(
    90deg,
    rgba(255, 193, 7, 0.12) 0%,
    rgba(216, 45, 139, 0.06) 100%
  ) !important;
  border-radius: 12px;
  padding: 15px !important;
  margin: -15px !important;
  margin-bottom: 10px !important;
  transition:
    background 0.8s ease-out,
    padding 0.3s ease,
    margin 0.3s ease;
  border-left: 3px solid rgba(255, 193, 7, 0.6);
}

@keyframes highlightFadeIn {
  0% {
    background: rgba(255, 193, 7, 0.3);
    transform: translateX(-5px);
    opacity: 0.8;
  }
  50% {
    background: rgba(255, 193, 7, 0.2);
    transform: translateX(0);
    opacity: 1;
  }
  100% {
    background: linear-gradient(
      90deg,
      rgba(255, 193, 7, 0.12) 0%,
      rgba(216, 45, 139, 0.06) 100%
    );
    transform: translateX(0);
    opacity: 1;
  }
}

/* TABLET/MOBILE: Force show mobile header, hide desktop header */
@media (max-width: 992px) {
  /* Hide Desktop Navigation (keep logo) */
  .header-nav.header-nav-main,
  .header-main .nav:not(.mobile-nav),
  .header-main .flex-col.hide-for-medium {
    display: none !important;
  }

  /* Show Mobile Menu Icon */
  .header-main .show-for-medium,
  .header-main .mobile-nav,
  .header-main .nav-icon.has-icon {
    display: flex !important;
  }

  /* Header row layout fix */
  .header-main .header-inner {
    position: relative !important;
  }

  .header-main .header-inner .flex-row {
    justify-content: space-between !important;
    position: relative !important;
  }

  /* Logo centering - use calc to account for container padding */
  .header-main .header-inner .flex-col.logo {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    margin: 0 auto !important;
    width: fit-content !important;
    z-index: 1 !important;
    transform: none !important;
  }

  /* Ensure flex-row allows centering */
  .header-main .header-inner {
    display: flex;
    justify-content: center;
  }

  /* Alternative selector for logo */
  .header-main .logo a {
    display: block !important;
  }

  /* First flex-col (menu icon) - stay left */
  .header-main .header-inner .flex-row > .flex-col:first-child {
    z-index: 2 !important;
  }

  /* Last flex-col (search/cart) - stay right */
  .header-main .header-inner .flex-row > .flex-col:last-child {
    z-index: 2 !important;
  }
}

/* =========================================
   MOBILE SEARCH LIGHTBOX STYLING
   ========================================= */
@media (max-width: 992px) {
  /* Full screen search overlay */
  .mfp-wrap.mfp-search {
    background: #fff !important;
  }

  .mfp-search .mfp-content {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
  }

  /* Search form container */
  .mfp-search .search-form-wrapper,
  .mfp-search .searchform-inner,
  .search-lightbox-inner {
    width: 100% !important;
    padding: 15px !important;
    background: #fff !important;
  }

  /* Search input field */
  .mfp-search .search-field,
  .search-lightbox-inner input[type="search"],
  .search-lightbox-inner input[type="text"] {
    width: 100% !important;
    height: 50px !important;
    font-size: 16px !important;
    padding: 12px 20px !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 30px !important;
    background: #f8f8f8 !important;
    outline: none !important;
    transition: all 0.3s ease !important;
  }

  .mfp-search .search-field:focus,
  .search-lightbox-inner input:focus {
    border-color: #d82d8b !important;
    background: #fff !important;
    box-shadow: 0 0 0 4px rgba(216, 45, 139, 0.1) !important;
  }

  /* Search submit button */
  .mfp-search .ux-search-submit,
  .search-lightbox-inner button[type="submit"] {
    position: absolute !important;
    right: 10px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: #d82d8b !important;
    color: #fff !important;
    border: none !important;
    border-radius: 50% !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* Close button */
  .mfp-search .mfp-close,
  .search-lightbox-inner .close-search {
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
    font-size: 24px !important;
    color: #333 !important;
    opacity: 0.7 !important;
    background: #f0f0f0 !important;
    border-radius: 50% !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 100 !important;
  }

  .mfp-search .mfp-close:hover {
    opacity: 1 !important;
    background: #e0e0e0 !important;
  }

  /* Search results dropdown */
  .mfp-search .autocomplete-suggestions,
  .search-lightbox-inner .live-search-results {
    position: relative !important;
    width: 100% !important;
    max-height: calc(100vh - 100px) !important;
    overflow-y: auto !important;
    background: #fff !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    margin-top: 10px !important;
    padding: 0 !important;
  }

  /* Search result items */
  .mfp-search .autocomplete-suggestion {
    padding: 15px !important;
    border-bottom: 1px solid #f0f0f0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
  }

  .mfp-search .autocomplete-suggestion img {
    width: 50px !important;
    height: 50px !important;
    border-radius: 8px !important;
    object-fit: cover !important;
  }

  .mfp-search .autocomplete-suggestion .search-name {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #333 !important;
    line-height: 1.4 !important;
  }

  .mfp-search .autocomplete-suggestion:active {
    background: rgba(216, 45, 139, 0.1) !important;
  }

  /* Search header text */
  .search-lightbox-inner h3,
  .mfp-search .search-header {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #333 !important;
    margin: 20px 15px 15px !important;
  }

  /* No results message */
  .mfp-search .no-results,
  .search-lightbox-inner .no-results {
    text-align: center !important;
    padding: 40px 20px !important;
    color: #999 !important;
    font-size: 16px !important;
  }
}

/* Blog Header */
/* Blog Header */
.momo-blog-header {
  margin-bottom: 40px;
  position: relative;
  border-radius: 10px;
  /* overflow: hidden; Removed to allow dropdowns */
  /* font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol; */
}

/* Overlay for Header */
.momo-blog-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  /* High opacity white overlay to mute the background */
  z-index: 1;
  border-radius: 10px;
  /* Match parent radius */
}

/* Header Content needs Z-index */
.momo-blog-title,
.momo-blog-description,
.momo-blog-nav-wrapper,
.momo-breadcrumbs {
  position: relative;
  z-index: 2;
}

.momo-blog-title {
  font-size: 42px;
  font-weight: 900;
  color: #222;
  margin: 10px 0 15px 0;
  padding: 0;
  line-height: 1.2;
}

.momo-blog-nav-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
}

/* Scroll Buttons */
.momo-nav-scroll-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #e0e0e0;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  flex-shrink: 0;
  font-size: 14px;
  color: #666;
  transition: all 0.2s;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.momo-nav-scroll-btn:hover {
  background: #fff;
  border-color: #d82d8b;
  color: #d82d8b;
  box-shadow: 0 3px 10px rgba(216, 45, 139, 0.15);
}

.momo-nav-scroll-btn.momo-nav-scroll-left {
  margin-right: 8px;
}

.momo-nav-scroll-btn.momo-nav-scroll-right {
  margin-left: 8px;
}

/* When scrollable, show buttons */
.momo-blog-nav-wrapper.is-scrollable .momo-nav-scroll-btn {
  display: flex;
}

.momo-blog-nav-wrapper.is-scrollable .momo-nav-scroll-btn.hidden {
  opacity: 0.3;
  pointer-events: none;
}

.momo-blog-nav {
  flex: 1;
  border-bottom: 1px solid #e0e0e0;
  position: relative;
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.momo-blog-nav::-webkit-scrollbar {
  display: none;
}

/* Dropdown fix - use fixed positioning to escape overflow */
.momo-nav-item .momo-sub-menu {
  position: fixed;
  top: auto;
  left: auto;
  z-index: 9999;
}

.momo-nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 24px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

/* Mobile Responsive: Restore Scroll */
@media (max-width: 768px) {
  /* Hide scroll buttons on mobile - users can swipe */
  .momo-nav-scroll-btn {
    display: none !important;
  }

  .momo-blog-nav {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 0px;
    margin-bottom: -20px;
  }

  .momo-blog-nav::-webkit-scrollbar {
    display: none;
  }

  .momo-nav-menu {
    flex-wrap: nowrap;
    white-space: nowrap;
    padding-bottom: 0;
  }

  /* Ensure items have width and handle expansion */
  .momo-nav-item {
    flex-shrink: 0;
    /* Keep row flow for Link + Toggle */
    flex-direction: row;
    align-items: center;
    height: 100%;
    position: static;
    /* IMPORTANT: Allow dropdown to be relative to parent container */
  }

  .momo-nav-item > a {
    /* Allow space for toggle */
    padding-right: 0px;
  }

  /* Toggle Button Style */
  .momo-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    color: #d82d8b;
    /* Pink to indicate interaction */
    font-size: 10px;
    /* Smaller arrow */
    cursor: pointer;
    margin-left: 5px;
    background: rgba(216, 45, 139, 0.1);
    border-radius: 50%;
    transition: background 0.2s;
  }

  .momo-menu-toggle:hover {
    background: rgba(216, 45, 139, 0.2);
  }

  /* Ẩn arrow dropdown trên mobile */
  .menu-item-has-children > a::after {
    display: none !important;
  }

  /* Ẩn hoàn toàn sub-menu (hover) trên mobile */
  .momo-sub-menu {
    display: none !important;
  }
}

/* =========================================
   Sub-Category Section - Modern Card Design
   ========================================= */
.momo-sub-cat-section {
  background: linear-gradient(180deg, #f8f9fa 0%, #fff 100%);
  padding: 20px 0 25px 0;
  margin-bottom: 5px;
  border-top: 1px solid #eee;
}

.momo-sub-cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  padding: 0 5px;
}

.momo-sub-cat-label {
  display: flex;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.momo-sub-cat-count {
  font-size: 12px;
  color: #999;
  background: #f0f0f0;
  padding: 4px 12px;
  border-radius: 20px;
}

.momo-sub-cat-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin: 0 -15px;
  padding: 5px 15px;
}

.momo-sub-cat-scroll::-webkit-scrollbar {
  display: none;
}

.momo-sub-cat-grid {
  display: flex;
  gap: 12px;
  flex-wrap: nowrap;
}

.momo-sub-cat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e8e8e8;
  text-decoration: none !important;
  transition: all 0.25s ease;
  min-width: 180px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.momo-sub-cat-card:hover {
  border-color: var(--card-color, #d82d8b);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.momo-sub-cat-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(
    135deg,
    var(--card-color, #d82d8b) 0%,
    rgba(216, 45, 139, 0.7) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.momo-sub-cat-card-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.momo-sub-cat-card-name {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.momo-sub-cat-card:hover .momo-sub-cat-card-name {
  color: var(--card-color, #d82d8b);
}

.momo-sub-cat-card-count {
  font-size: 12px;
  color: #888;
  margin-top: 2px;
}

.momo-sub-cat-card-arrow {
  color: #ccc;
  flex-shrink: 0;
  transition: all 0.2s;
}

.momo-sub-cat-card:hover .momo-sub-cat-card-arrow {
  color: var(--card-color, #d82d8b);
  transform: translateX(3px);
}

@media (max-width: 768px) {
  .momo-sub-cat-section {
    padding: 15px 0 20px 0;
  }

  .momo-sub-cat-card {
    min-width: 160px;
    padding: 10px 14px;
  }

  .momo-sub-cat-card-icon {
    width: 36px;
    height: 36px;
  }

  .momo-sub-cat-card-name {
    font-size: 13px;
  }
}

/* 
   Series Navigation Box 
*/
.momo-series-box {
  background: #f9f9f9;
  border: 1px solid #eee;
  border-left: 4px solid #d82d8b;
  border-radius: 4px;
  padding: 20px;
  margin-bottom: 30px;
  margin-top: 10px;
}

.momo-series-header {
  margin-bottom: 15px;
}

.momo-series-label {
  font-size: 12px;
  text-transform: uppercase;
  color: #999;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 5px;
}

.momo-series-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
}

.momo-series-title a {
  color: #333;
  text-decoration: none;
}

.momo-series-title a:hover {
  color: #d82d8b;
}

.momo-series-counter {
  font-size: 13px;
  color: #666;
  background: #eee;
  padding: 2px 8px;
  border-radius: 12px;
  display: inline-block;
  margin-top: 5px;
}

.momo-series-nav-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #e5e5e5;
  padding-top: 15px;
  flex-wrap: wrap;
  gap: 10px;
}

.momo-series-btn {
  font-size: 14px;
  color: #d82d8b;
  font-weight: 600;
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid #d82d8b;
  border-radius: 4px;
  transition: all 0.2s;
  background: #fff;
  white-space: nowrap;
}

.momo-series-btn:hover {
  background: #d82d8b;
  color: #fff;
}

.momo-series-btn.disabled {
  color: #ccc;
  border-color: #ddd;
  background: #f5f5f5;
  pointer-events: none;
}

.momo-series-toggle-list {
  background: none;
  border: none;
  color: #555;
  cursor: pointer;
  font-size: 13px;
  padding: 5px;
}

.momo-series-toggle-list:hover {
  text-decoration: underline;
}

.momo-series-toggle-container {
  display: none;
  /* Collapsed by default */
  margin-top: 15px;
  border-top: 1px dashed #ddd;
  padding-top: 15px;
  animation: momoSlideDown 0.3s ease;
}

.momo-series-toggle-container.open {
  display: block;
}

.momo-series-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.momo-series-item {
  margin-bottom: 8px;
  font-size: 15px;
  padding: 8px 10px;
  border-radius: 4px;
}

.momo-series-item.current {
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  border-left: 3px solid #d82d8b;
}

.momo-series-item a {
  color: #444;
  text-decoration: none;
  display: block;
}

.momo-series-item a:hover {
  color: #d82d8b;
}

.series-num {
  color: #999;
  margin-right: 5px;
  font-weight: normal;
}

.momo-series-item.current .series-num {
  color: #d82d8b;
  font-weight: bold;
}

.current-label {
  font-size: 11px;
  color: #d82d8b;
  font-style: italic;
  margin-left: 5px;
}

/* Ẩn series trên danh sách bài viết */
.momo-recent-post-item .momo-series-order,
.momo-recent-post-item .momo-series-meta-link,
.momo-post-card .momo-series-order,
.momo-post-card .momo-series-meta-link,
.momo-featured-post .momo-series-order,
.momo-featured-post .momo-series-meta-link,
.momo-recent-meta .momo-series-meta-link,
.momo-cat-wrapper .momo-series-order,
.momo-cat-wrapper .momo-sep,
.momo-meta .momo-series-meta-link,
.momo-meta .momo-sep:has(+ .momo-series-meta-link),
.momo-cat-label .momo-sep,
.momo-cat-label span[style*="font-size:11px"],
.momo-meta-container .momo-series-order,
.momo-meta-container .momo-sep:has(+ .momo-series-order),
/* Ẩn toàn bộ series link */
.momo-series-meta-link,
.momo-series-order,
.momo-sep:has(+ .momo-series-meta-link),
.momo-sep:has(+ .momo-series-order),
.momo-most-viewed-series {
  display: none !important;
}

@keyframes momoSlideDown {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Nav Item Base Styles */
.momo-nav-menu::-webkit-scrollbar {
  display: none;
}

.momo-nav-item {
  padding: 0 15px;
  height: 100%;
  display: flex;
  align-items: center;
  position: relative;
  transition: all 0.3s ease;
  border-bottom: 0px solid transparent;
  cursor: pointer;
  flex-shrink: 0;
  margin: 0 !important;
  list-style: none !important;
}

/* Sub Menu (Dropdown) */
.momo-sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: #fff;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  /* Rounded 8px */
  padding: 10px 0;
  z-index: 100;
  list-style: none;
  margin: 0;
}

/* Show Sub Menu on Hover */
.momo-nav-item:hover > .momo-sub-menu {
  display: block;
  animation: momoFadeIn 0.2s ease;
}

/* Level 3+ Flyout (Right side) */
.momo-sub-menu .momo-nav-item .momo-sub-menu {
  top: -5px;
  left: 100%;
  margin-left: 5px;
  /* Gap */
}

/* Sub Menu Items */
.momo-sub-menu li {
  padding: 0;
  margin: 0;
  display: block;
  position: relative;
  /* Anchor for sub-sub-menu */
}

.momo-sub-menu li a {
  display: flex;
  /* Flex for alignment */
  justify-content: space-between;
  align-items: center;
  padding: 8px 15px;
  color: #444;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 400;
  transition: all 0.2s;
  border-radius: 4px;
  margin: 0 5px;
  /* Small inset */
}

.momo-sub-menu li a:hover {
  color: var(--primary-color, #d82d8b);
  background: rgba(var(--primary-color-rgb, 216, 45, 139), 0.08);
}

/* Arrows for Submenu Parent Items */
.momo-sub-menu .menu-item-has-children > a::after {
  content: "\f105";
  /* FontAwesome Angle Right */
  font-family: "fl-icons";
  font-size: 14px;
  opacity: 0.4;
  margin-left: 10px;
}

.momo-sub-menu .menu-item-has-children:hover > a::after {
  color: var(--primary-color, #d82d8b);
  opacity: 1;
}

/* Invisible Bridge for Drop-off protection */
.momo-nav-item > .momo-sub-menu::before {
  content: "";
  display: block;
  position: absolute;
  top: -20px;
  left: 0;
  width: 100%;
  height: 20px;
  background: transparent;
}

.momo-sub-menu .momo-nav-item > .momo-sub-menu::before {
  top: 0;
  left: -20px;
  width: 20px;
  height: 100%;
}

@keyframes momoFadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.momo-nav-item a {
  display: block;
  padding: 10px 0px 13px 0px;
  color: #666;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.momo-nav-item a:hover {
  color: #222;
}

.momo-nav-item.active {
  color: var(--category-color, #d82d8b);
  border-bottom-color: var(--category-color, #d82d8b);
  font-weight: 600;
}

.momo-nav-item.active a {
  color: #222;
  font-weight: 600;
}

.momo-nav-menu > .momo-nav-item.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--category-color, #d82d8b);
  border-radius: 2px 2px 0 0;
}

/* Show scroll buttons on mobile when needed */
@media (max-width: 768px) {
  .momo-nav-scroll-btn {
    display: flex;
  }
}

/* Global container width - CHỈ áp dụng trong blog area */
.momo-blog-container {
  width: 100%;
  max-width: 1350px !important;
  margin: 0 auto;
  padding: 20px 0px;
}

/* Hoặc nếu muốn áp dụng cho .container/.row trong vùng blog thôi */
.blog .container,
.blog .row,
.archive .container,
.archive .row,
.single-post .container,
.single-post .row,
.page-template-blog .container,
.page-template-blog .row,
.home.blog .container,
.home.blog .row,
.page-id-505 .container,
.page-id-505 .row,
.page-id-505 .section-content,
.page-id-505 .col {
  max-width: 1350px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Force blog page container width */
.page-id-505 .col-inner,
.page-id-505 .momo-blog-header,
.page-id-505 .momo-blog-container,
body.page-id-505 #content .row,
body.page-id-505 #content .col {
  max-width: 1350px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* .momo-blog-container * {
    font-family: inherit;
} */

/* Featured Post (Large) */
.momo-featured-post {
  display: flex;
  gap: 30px;
  margin-bottom: 30px;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); */
  /* transition: transform 0.3s ease, box-shadow 0.3s ease; */
}

.momo-featured-post:hover {
  /* transform: translateY(-4px); */
  /* box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12); */
}

.momo-featured-image {
  flex: 0 0 auto;
  max-width: 528px;
  max-height: 297px;
  overflow: hidden;
  border-radius: 12px;
}

.momo-featured-image img {
  width: 100%;
  height: 100%;
  max-width: 528px;
  max-height: 297px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.momo-featured-post:hover .momo-featured-image img {
  /* transform: scale(1.05); */
}

.momo-featured-content {
  flex: 1;
  padding: 3px 30px 30px 0;
  display: inline;
  flex-direction: column;
  justify-content: center;
}

/* Category Badge */
.momo-category {
  display: inline-block;
  font-size: 0.8em;
  font-weight: 600;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.momo-category:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* Title Styles */
.momo-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 8px 0;
  color: #222;
}

.momo-title a {
  color: #222;
  text-decoration: none;
  transition: color 0.3s ease;
}

.momo-title a:hover {
  color: #d82d8b;
}

/* Post Meta */
.momo-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 0px;
  font-size: 13px;
  color: #888;
}

.momo-views {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Excerpt */
.momo-excerpt {
  font-size: 14px;
  line-height: 1.6;
  color: #666;
  margin-top: 6px;
}

/* Posts Grid (3 columns) */
.momo-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Post Card */
.momo-post-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); */
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

/* .momo-post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
} */

.momo-card-image {
  width: 100%;
  height: 200px !important;
  min-height: 200px;
  max-height: 200px;
  overflow: hidden;
  border-radius: 12px;
}

.momo-card-image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  transition: transform 0.3s ease;
}

.momo-post-card:hover .momo-card-image img {
  transform: scale(1.05);
}

.momo-card-content {
  padding: 10px 0px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.momo-card-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 8px 0;
  color: #222;
}

.momo-card-title a {
  color: #222;
  text-decoration: none;
  transition: color 0.3s ease;
}

.momo-card-title a:hover {
  color: #d82d8b;
}

.momo-card-excerpt {
  font-size: 13px;
  line-height: 1.6;
  color: #666;
  margin-top: 6px;
}

/* Responsive Design */
/* Tablet: ẩn featured post, hiện grid 2 cột */
@media (max-width: 992px) {
  /* Fix khoảng trống lớn - ẩn hoàn toàn sidebar "Xem nhiều nhất" */
  .page-id-505 .col.hide-for-medium,
  .hide-for-medium {
    display: none !important;
    min-height: 0 !important;
    height: 0 !important;
  }
  
  /* Bỏ min-height trên tất cả col */
  .page-id-505 .col,
  .momo-blog-container .col {
    min-height: auto !important;
  }

  .momo-posts-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  /* Featured post → card layout trên tablet/mobile */
  .momo-featured-post.momo-first-post {
    flex-direction: column;
    gap: 0;
    margin-bottom: 20px;
  }

  .momo-featured-post.momo-first-post .momo-featured-image {
    max-width: 100%;
    max-height: 220px;
    width: 100%;
    border-radius: 12px;
  }

  .momo-featured-post.momo-first-post .momo-featured-image img {
    max-width: 100%;
    max-height: 220px;
    width: 100%;
  }

  .momo-featured-post.momo-first-post .momo-featured-content {
    padding: 10px 0;
  }

  .momo-featured-post.momo-first-post .momo-excerpt {
    display: none;
  }

  .momo-card-image {
    height: 160px;
  }

  .momo-title {
    font-size: 22px;
  }
}

@media (max-width: 768px) {
  .momo-posts-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .momo-featured-post {
    gap: 0;
    margin-bottom: 20px;
  }

  .momo-featured-image {
    height: 200px;
  }

  .momo-title {
    font-size: 20px;
  }

  .momo-card-title {
    font-size: 16px;
  }

  .momo-featured-content {
    padding: 10px 10px;
  }
}

/* Fix Flatsome Layout for Sticky Sidebar - CRITICAL OVERRIDES */
.row.momo-main-layout {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}

.row.momo-main-layout > .col {
  display: flex;
  flex-direction: column;
  float: none !important;
}

.row.momo-main-layout > .col > .col-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: visible !important;
  /* Force visible for sticky */
}

/* Force ALL Flatsome columns to full width on tablet - GLOBAL */
@media (max-width: 992px) {
  .col.medium-3,
  .col.medium-4,
  .col.medium-6,
  .col.medium-8,
  .col.medium-9,
  .col.large-3,
  .col.large-4,
  .col.large-6,
  .col.large-8,
  .col.large-9 {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
  }

  /* Exception: Keep Related Posts as 2-column grid */
  .momo-related-section .col.small-6 {
    width: 50% !important;
    max-width: 50% !important;
    flex: 0 0 50% !important;
  }

  /* Make related posts more compact */
  .momo-related-section .box-image {
    padding-top: 50% !important; /* Shorter aspect ratio */
  }

  .momo-related-section h4 {
    font-size: 13px !important;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  .momo-related-section .momo-section-title {
    font-size: 18px !important;
    margin-bottom: 20px !important;
  }

  .momo-related-section .box-text {
    padding: 8px 0 !important;
  }

  .momo-related-section .col-inner {
    border-radius: 6px !important;
  }
}

.momo-most-viewed {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.momo-recent-post-item {
  display: flex;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid #eee;
  transition: all 0.3s ease;
  align-items: flex-start;
}

.momo-recent-thumbnail {
  flex-shrink: 0;
  width: 208px;
  /* PC Width */
  height: 117px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.momo-recent-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.momo-recent-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* Center vertically on PC too? or top? */
  gap: 0px;
}

.momo-recent-content .momo-recent-title {
  font-size: 1.125em;
}

/* Mobile Layout - Ảnh bên trái, giữ đầy đủ tính năng */
@media (max-width: 768px) {
  .momo-recent-posts {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .momo-recent-post-item {
    flex-direction: row; /* Ảnh bên trái */
    gap: 10px;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
  }

  .momo-recent-post-item:last-child {
    border-bottom: none;
  }

  /* Thumbnail vuông bên trái */
  .momo-recent-thumbnail {
    width: 90px;
    height: 90px;
    min-width: 90px;
    border-radius: 8px;
    flex-shrink: 0;
  }

  .momo-recent-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
  }

  /* Ẩn badge trên ảnh mobile */
  .momo-recent-badge {
    display: none;
  }

  /* Content bên phải */
  .momo-recent-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 4px;
    min-width: 0;
  }

  /* Hiện category */
  .momo-cat-wrapper {
    display: block;
    margin-bottom: 2px;
  }

  .momo-recent-category {
    font-size: 12px !important;
  }

  .momo-series-order {
    font-size: 11px !important;
  }

  /* Tiêu đề */
  .momo-recent-title {
    font-size: 14px !important;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .momo-recent-title a {
    color: #1a1a1a;
    text-decoration: none;
  }

  /* Hiện meta (views, series) */
  .momo-recent-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    font-size: 11px;
    color: #888;
    gap: 0;
  }

  .momo-recent-views {
    font-size: 11px;
  }

  .momo-series-meta-link {
    font-size: 11px;
  }

  /* Ẩn excerpt trên mobile */
  .momo-recent-excerpt {
    display: none !important;
  }
}

/* First Post Styling (Homepage & Featured) */
.momo-recent-post-item.momo-first-post .momo-recent-thumbnail,
.momo-featured-card.momo-first-post .momo-featured-thumb {
  border-radius: 12px !important;
  overflow: hidden !important;
  display: block !important;
  flex-shrink: 0;
}

.momo-featured-card.momo-first-post .momo-featured-thumb img,
.momo-recent-post-item.momo-first-post .momo-recent-thumbnail img {
  border-radius: 12px !important;
}

/* ===================================
   Most Viewed Sidebar (Sticky)
   =================================== */
/* Fix Flatsome Layout for Sticky Sidebar */
.row.momo-main-layout {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}

.row.momo-main-layout > .col {
  display: flex;
  flex-direction: column;
  float: none !important;
}

.row.momo-main-layout > .col > .col-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.momo-most-viewed {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.momo-most-viewed-inner {
  position: -webkit-sticky;
  position: sticky;
  top: 90px;
  z-index: 10;
  background: transparent;
  border: none;
  padding: 0;
  align-self: flex-start;
}

.momo-most-viewed-title {
  font-size: 18px;
  font-weight: 600;
  color: #222;
  margin: 0 0 20px 0;
  /* padding-bottom: 12px; */
  /* border-bottom: 1px solid #e0e0e0; */
  display: flex;
  align-items: center;
  gap: 6px;
}

.momo-most-viewed-title span {
  font-size: 18px;
}

.momo-most-viewed-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.momo-most-viewed-item {
  display: flex;
  gap: 15px;
  align-items: flex-start;
  transition: all 0.3s ease;
  padding-bottom: 0;
  margin-bottom: 0px;
  border-bottom: none;
}

.momo-most-viewed-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.momo-most-viewed-item:hover {
  transform: translateX(3px);
}

.momo-most-viewed-number {
  position: absolute;
  bottom: 10px;
  left: 8px;
  /* Removed width/height/display flex */
  font-size: 28px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  z-index: 2;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  line-height: 1;
  pointer-events: none;
}

.momo-most-viewed-thumb {
  flex-shrink: 0;
  width: 144px;
  height: 90px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.momo-most-viewed-thumb img {
  width: 144px;
  height: 90px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.momo-most-viewed-item:hover .momo-most-viewed-thumb img {
  transform: scale(1.05);
}

.momo-most-viewed-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  position: relative;
  padding-top: 10px;
  /* Add space for separator */
}

/* Decorative separator line */
.momo-most-viewed-info::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 30px;
  /* Small line */
  height: 1px;
  background-color: #ddd;
}

.momo-most-viewed-cat {
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
  letter-spacing: 0;
}

.momo-most-viewed-post-title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
}

.momo-most-viewed-post-title a {
  color: #222;
  text-decoration: none;
  transition: color 0.3s ease;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.momo-most-viewed-post-title a:hover {
  color: #d82d8b;
}

/* Responsive for Recent Posts */
@media (max-width: 768px) {
  .momo-recent-post-item {
    flex-direction: column;
    gap: 12px;
  }

  .momo-recent-thumbnail {
    width: 100%;
    height: 200px;
  }

  .momo-most-viewed-inner {
    position: static;
    top: auto;
  }
}

/* ===================================
   Pagination Styling
   =================================== */
.momo-pagination {
  margin: 40px 0 20px;
  text-align: center;
}

.momo-pagination .page-numbers {
  display: inline-block;
  margin: 0 4px;
  padding: 10px 16px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  color: #666;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.momo-pagination .page-numbers:hover {
  background: #f5f5f5;
  border-color: #d82d8b;
  color: #d82d8b;
}

.momo-pagination .page-numbers.current {
  background: #d82d8b;
  border-color: #d82d8b;
  color: #fff;
}

.momo-pagination .page-numbers.prev,
.momo-pagination .page-numbers.next {
  padding: 10px 20px;
}

.momo-pagination .page-numbers.dots {
  border: none;
  background: transparent;
}

.momo-pagination .page-numbers.dots:hover {
  background: transparent;
  border: none;
  color: #666;
  cursor: default;
}

/* Mobile Touch Fix for Pagination */
.momo-pagination a {
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(216, 45, 139, 0.2);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

@media (max-width: 992px) {
  .momo-pagination .page-numbers {
    padding: 12px 16px;
    min-width: 44px;
    min-height: 44px;
  }
}

/* ===================================
   Mobile Optimization for Recent Posts
   POLISHED CLEAN DESIGN
   =================================== */
@media (max-width: 768px) {
  .momo-recent-posts {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
  }

  .momo-recent-post-item {
    display: flex;
    flex-direction: row;
    gap: 14px;
    align-items: center;
    padding: 14px 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    border: none;
    border-bottom: 1px solid #f0f0f0;
  }

  .momo-recent-post-item:last-child {
    border-bottom: none;
  }

  /* Thumbnail bên trái - vuông bo nhẹ */
  .momo-recent-thumbnail {
    width: 88px !important;
    height: 88px !important;
    min-width: 88px;
    flex-shrink: 0;
    order: 1;
    margin: 0;
    border-radius: 10px;
    overflow: hidden;
  }

  .momo-recent-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  /* Ẩn badge trên ảnh */
  .momo-recent-badge {
    display: none;
  }

  /* Content bên phải */
  .momo-recent-content {
    order: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-width: 0;
  }

  /* Hiển thị chuyên mục */
  .momo-cat-wrapper {
    display: block !important;
    margin-bottom: 2px;
  }
  
  .momo-recent-category {
    font-size: 12px !important;
    font-weight: 600;
    display: inline-block;
  }

  /* Tiêu đề */
  .momo-recent-title {
    font-size: 14px !important;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #1a1a1a;
  }

  .momo-recent-title a {
    color: inherit;
    text-decoration: none;
  }

  /* Meta - views */
  .momo-recent-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #888;
    margin-top: 2px;
  }

  .momo-recent-views {
    font-size: 12px;
    color: #888;
  }

  /* Ẩn excerpt */
  .momo-recent-excerpt {
    display: none !important;
  }
}

/* Featured Grid (Top 3 Posts) */
.momo-featured-grid {
  display: grid;
  /* =========================================
       CUSTOM MOBILE MENU GRID (MoMo Style)
       ========================================= */

  /* Use native Nav Sidebar styles where possible */
  .nav-sidebar .sub-menu-grid {
    padding-left: 0 !important;
    background: #fff;
  }

  /* Parent Header Highlight when active */
  .nav-sidebar .menu-item.active > a {
    color: #d82d8b;
  }

  /* Grid Container */
  .momo-mobile-grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* 2 Columns */
    gap: 20px 15px;
    padding-bottom: 20px;
  }

  .momo-mobile-grid-item {
    display: flex;
    align-items: flex-start;
    text-decoration: none;
    gap: 10px;
    transition: transform 0.2s;
  }

  .momo-mobile-grid-item:active {
    transform: scale(0.98);
  }

  .momo-grid-icon {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    margin-top: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .momo-grid-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .momo-grid-info {
    flex: 1;
  }

  .momo-grid-title {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    line-height: 1.3;
    margin-bottom: 4px;
  }

  .momo-grid-desc {
    font-size: 12px;
    color: #777;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 400;
  }

  .momo-mobile-grid-item:hover .momo-grid-title {
    color: #d82d8b;
  }

  /* Custom icon mapping styles if using FontAwesome */
  .momo-grid-icon i {
    color: #d82d8b;
    font-size: 20px;
  }

  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.momo-featured-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.momo-featured-thumb {
  width: 100%;
  aspect-ratio: 3/2;
  border-radius: 12px;
  overflow: hidden;
  display: block;
}

.momo-featured-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.momo-featured-card:hover .momo-featured-thumb img {
  transform: scale(1.05);
}

.momo-featured-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.momo-cat-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
}

.momo-featured-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0;
}

.momo-featured-title a {
  color: #333;
  text-decoration: none;
  transition: color 0.2s;
}

.momo-featured-title a:hover {
  color: #d82d8b;
}

.momo-meta-small {
  font-size: 13px;
  color: #777;
}

.momo-featured-excerpt {
  font-size: 14px;
  color: #555;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 768px) {
  .momo-featured-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* Hide "Xem nhiều nhất" on tablet + mobile */
@media (max-width: 992px) {
  .momo-most-viewed {
    display: none !important;
  }
}

.momo-recent-content h3 {
  margin-bottom: 0.5rem !important;
}

.momo-recent-excerpt {
  font-size: 0.875rem;
}

.momo-recent-views {
  font-size: 0.8125rem;
}

a.momo-recent-category {
  font-size: 0.8em !important;
  /* Ép nhận cỡ chữ 13px */
  display: inline-block;
  /* Giúp padding/margin hoạt động tốt hơn nếu cần */
  line-height: 1.2;
  /* Căn chỉnh khoảng cách dòng */
  text-decoration: none !important;
  /* Bỏ gạch chân nếu có */
}

.momo-recent-excerpt {
  padding: 5px 0px;
}

h3.momo-recent-title {
  font-weight: 500;
}

a {
  line-height: 1.5 !important;
  /* display: block; */
}

/* 
 * =========================================
 * ADVANCED FILTERS WIDGET
 * =========================================
 */
.momo-filters-container {
  background-color: #fffcdd !important;
  border: 1px solid #f9e79f;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 30px;
  /* box-shadow: 0 2px 8px rgba(0,0,0,0.05); */
}

/* Filter Header Style */
.momo-filters-header-main {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  font-size: 16px;
  color: #333;
  text-transform: uppercase;
  margin-bottom: 25px;
  /* Border bottom similar to Momo design? Optional */
}

.momo-icon-filter {
  color: #666;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.momo-filter-group {
  margin-bottom: 25px;
}

.momo-filter-group:last-child {
  margin-bottom: 0;
}

.momo-filter-title {
  font-size: 16px;
  font-weight: 700;
  color: #222;
  margin-bottom: 12px;
  display: block;
}

.momo-filter-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.momo-filter-item {
  margin-bottom: 8px;
}

.momo-filter-item a {
  display: flex;
  align-items: center;
  color: #555;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
  cursor: pointer;
}

.momo-filter-item:hover a {
  color: #d82d8b;
}

/* Checkbox Style */
.momo-checkbox {
  width: 18px;
  height: 18px;
  border: 2px solid #ddd;
  border-radius: 4px;
  margin-right: 10px;
  position: relative;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.momo-filter-item:hover .momo-checkbox {
  border-color: #d82d8b;
}

/* Active State */
.momo-filter-item.active .momo-checkbox {
  background-color: #d82d8b;
  border-color: #d82d8b;
}

.momo-filter-item.active .momo-checkbox::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.momo-filter-item.active a {
  color: #222;
  font-weight: 600;
}

.momo-filter-count {
  margin-left: auto;
  font-size: 12px;
  color: #999;
  background: #f5f5f5;
  padding: 2px 6px;
  border-radius: 12px;
}

/* Selected Filters Alert (Compact) */
.momo-active-filters-alert {
  background-color: #fce4ec;
  border: 1px solid #f8bbd0;
  border-radius: 6px;
  padding: 8px 12px;
  /* Compact padding */
  margin-bottom: 20px;
  display: none;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  /* Smaller font */
  color: #333;
}

.momo-active-filters-alert.active {
  display: flex;
}

.momo-filters-left {
  flex-grow: 1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  line-height: 1.4;
}

.momo-filter-label {
  font-weight: 600;
  margin-right: 4px;
}

.momo-filter-tag {
  display: inline-flex;
  align-items: center;
  background: #d82d8b;
  color: white;
  padding: 1px 8px;
  /* Compact tag */
  border-radius: 4px;
  font-weight: 500;
  font-size: 12px;
}

.momo-result-count {
  color: #666;
  font-style: italic;
  margin-left: 8px;
  font-size: 12px;
}

.momo-clear-filters {
  background: none;
  border: none;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  color: #c2185b;
  cursor: pointer;
  margin-left: 10px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.2s;
}

.momo-clear-filters:hover {
  background: rgba(216, 45, 139, 0.1);
  text-decoration: underline;
}

/* 
 * =========================================
 * REMOVABLE TAG STYLE
 * =========================================
 */
.remove-tag {
  margin-left: 6px;
  cursor: pointer;
  opacity: 0.8;
  font-weight: normal;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.remove-tag:hover {
  opacity: 1;
  color: #ffcccc;
}

/* 
 * =========================================
 * MOBILE STYLE FOR FILTERS
 * =========================================
 */
/* Breadcrumbs */
.momo-breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  font-size: 15px;
  margin-bottom: 0px;
  color: #444;
  line-height: 1.5;
  padding: 10px 0px;
  border-radius: 5px;
}

.momo-breadcrumbs a {
  color: #555;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.momo-breadcrumbs a:hover {
  color: #d82d8b;
}

.momo-breadcrumbs .momo-sep {
  margin: 0 8px;
  color: #ccc;
  font-size: 12px;
}

@media (max-width: 768px) {
  .momo-breadcrumbs {
    font-size: 13px;
    margin-bottom: 15px;
  }
}

@media (max-width: 849px) {
  .momo-most-viewed-inner {
    position: static !important;
    transform: none !important;
  }

  .momo-filters-container {
    /* Yellow Background on Mobile */
    background-color: #fffcdd !important;
    border: 1px solid #f9e79f;
    padding: 20px;
    margin-top: 30px;
    border-radius: 8px;
  }

  /* Fix Pink Background Overflow */
  .momo-most-viewed {
    height: auto !important;
    flex: none !important;
    --mobase-pink-50: 254 241 249;
    --tw-bg-opacity: 1;
    background-color: rgb(var(--mobase-pink-50) / var(--tw-bg-opacity));
    padding: 15px;
    border-radius: 8px;
    margin-top: 30px;
  }

  /* Ensure it appears below content if not already (Grid logic handles this, but just in case) */
  .col.medium-4.small-12.large-4 {
    order: 2;
    /* Ensure Sidebar is below */
  }
}

.momo-blog-description {
  color: #666;
  margin: 0 0 20px 0;
  font-size: 15px;
  display: block;
  margin-bottom: 30px;
  background-color: #f1f1f1;
  border: 1px solid #e3e3e3;
  padding: 8px;
  border-radius: 4px;
  font-size: 16px;
  color: #555;
}

.momo-section-title {
  font-weight: 700;
  font-style: normal;
}

/* Series Info on Post Cards */
.momo-series-meta-link {
  display: inline-block;
  max-width: 150px;
  /* Adjust as needed */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  color: #444;
  text-decoration: none;
  position: relative;
  transition: color 0.2s;
}

.momo-series-meta-link:hover {
  color: #d82d8b;
  overflow: visible;
  z-index: 99;
}

/* Tooltip Effect on Hover */
.momo-series-meta-link:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  pointer-events: none;
}

/* Triangle for Tooltip */
.momo-series-meta-link:hover::before {
  content: "";
  position: absolute;
  bottom: 110%;
  /* Slightly lower than tooltip body */
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #333;
  z-index: 1000;
}

/* Responsive adjustment */
@media (max-width: 550px) {
  .momo-recent-meta {
    flex-wrap: wrap;
  }

  .momo-series-meta-link {
    max-width: 100%;
  }
}

/* Fix Sidebar Series Line Break */
.momo-most-viewed-series {
  display: block;
  /* Keep block but control spacing */
  margin-top: 2px !important;
  line-height: 1.3;
}

.momo-most-viewed-series a {
  display: inline !important;
  /* Force inline to avoid extra block breaks */
  font-weight: normal;
}

/* Ensure no huge gaps */
.momo-most-viewed-info h4 {
  margin-bottom: 2px;
}

/* Series List Shortcode Styles */
.momo-series-list-container {
  margin-bottom: 30px;
}

.momo-series-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  height: 100%;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.momo-series-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.momo-series-thumb {
  position: relative;
  padding-top: 56.25%;
  /* 16:9 Aspect Ratio */
  overflow: hidden;
}

.momo-series-thumb img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.momo-series-card:hover .momo-series-thumb img {
  transform: scale(1.05);
}

.momo-series-status {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 10px;
  border-radius: 4px;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.momo-series-status.status-running {
  background-color: #f39c12;
}

.momo-series-status.status-completed {
  background-color: #27ae60;
}

.momo-series-status.status-pending {
  background-color: #3498db;
}

.momo-series-status.status-paused {
  background-color: #95a5a6;
}

.momo-series-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.momo-series-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.4;
  color: #1a1a1a;
  transition: color 0.2s;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.momo-series-card:hover .momo-series-title {
  color: #d82d8b;
}

.momo-series-desc {
  font-size: 13px;
  color: #666;
  margin-bottom: 15px;
  line-height: 1.5;
}

.momo-series-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: auto;
  background: #f9f9f9;
  padding: 10px;
  border-radius: 4px;
  font-size: 12px;
}

.momo-meta-item {
  display: flex;
  flex-direction: column;
}

.momo-meta-item .label {
  color: #999;
  font-size: 10px;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.momo-meta-item .value {
  color: #333;
  font-weight: 600;
}

/* Highlight progress item */
.momo-meta-item.highlight {
  background: linear-gradient(135deg, #d82d8b 0%, #c2185b 100%);
  padding: 8px;
  border-radius: 6px;
  grid-column: span 2;
  text-align: center;
}

.momo-meta-item.highlight .label {
  color: rgba(255, 255, 255, 0.9);
  font-size: 11px;
}

.momo-meta-item.highlight .value {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  margin-top: 2px;
}

.momo-progress-bar-wrapper {
  margin-top: 15px;
}

.momo-progress-bar {
  height: 8px;
  background: #eee;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.momo-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #d82d8b 0%, #e91e63 100%);
  border-radius: 4px;
  transition: width 0.3s ease;
  box-shadow: 0 0 5px rgba(216, 45, 139, 0.5);
}

/* Enhanced Series Footer Styling */
.momo-series-footer {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  padding: 16px;
  border-radius: 10px;
  margin-bottom: 14px;
  font-size: 13px;
  border: 1px solid #e9ecef;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.momo-series-footer .footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed #e9ecef;
  transition: background 0.2s;
}

.momo-series-footer .footer-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.momo-series-footer .footer-row:hover {
  background: rgba(216, 45, 139, 0.03);
  border-radius: 6px;
  padding-left: 8px;
  padding-right: 8px;
  margin-left: -8px;
  margin-right: -8px;
}

.momo-series-footer .footer-label {
  color: #6c757d;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.momo-series-footer .footer-label .icon {
  font-size: 16px;
}

.momo-series-footer .footer-value {
  color: #212529;
  font-weight: 700;
  background: linear-gradient(135deg, #d82d8b 0%, #e91e63 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Enhanced Meta Row */
.momo-series-meta-row {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 18px;
  padding: 12px;
  background: linear-gradient(to right, #f8f9fa 0%, #ffffff 100%);
  border-radius: 8px;
}

.momo-series-meta-row .meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #495057;
  font-weight: 600;
}

.momo-series-meta-row .icon {
  font-size: 18px;
}

@media (max-width: 549px) {
  h3.momo-section-title {
    font-size: 1.5em !important;
  }
}

/* ==================================================
   CONTENT TYPOGRAPHY (Standard Blog)
   ================================================== */
.blog-single .entry-content,
.momo-entry-content {
  font-family: "Inter", sans-serif !important;
  /* Update Font Family */
  font-size: 16px !important;
  /* From image (17.6px -> 18px) */
  line-height: 1.75 !important;
  /* From image (30.8px / 17.6px) */
  color: rgb(69, 79, 89) !important;
  /* Exact Slate Gray color */
  font-weight: 400;
}

.blog-single .entry-content p,
.momo-entry-content p {
  margin-bottom: 20px !important;
  /* Standard spacing */
}

/* Headings inside content */
.momo-entry-content h2 {
  font-size: 25px;
  font-weight: 700;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  color: #222;
  border-left: 4px solid #d82d8b;
  /* Tạo nét gạch trái: Dày 4px, nét liền, màu hồng */
  padding-left: 15px;
  /* Tạo khoảng cách giữa chữ và nét gạch */
  line-height: 1.3;
}

.momo-entry-content h3 {
  font-size: 24px;
  font-weight: 600;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  color: #222;
}

.momo-entry-content ul,
.momo-entry-content ol {
  margin-bottom: 1.5em;
  padding-left: 20px;
}

.momo-entry-content li {
  margin-bottom: 0em;
}

/* Links inside content */
.momo-entry-content a {
  color: #0969da;
  text-decoration: underline;
  text-decoration-color: rgba(9, 105, 218, 0.3);
  text-underline-offset: 2px;
  transition: color 0.2s, text-decoration-color 0.2s;
}

.momo-entry-content a:hover {
  color: #0550ae;
  text-decoration-color: #0550ae;
}

/* ==================================================
   SINGLE POST LAYOUT (MoMo Style)
   ================================================== */

/* 1. Header Styles */
.momo-single-header .momo-breadcrumbs {
  font-size: 13px;
}

.momo-main-title {
  color: #222;
  letter-spacing: -0.5px;
}

.momo-post-meta {
  gap: 15px;
  flex-wrap: wrap;
}

.momo-post-meta .flex-col {
  display: inline-flex;
  align-items: center;
}

.momo-post-meta strong {
  color: #333;
}

/* 2. Content Styles */
.momo-entry-content {
  font-size: 16px;
  line-height: 1.8;
  color: #333;
}

.momo-entry-content h2 {
  margin-top: 30px;
  margin-bottom: 15px;
  font-weight: 700;
}

.momo-entry-content h3 {
  font-size: 20px;
  margin-top: 25px;
  margin-bottom: 12px;
  font-weight: 600;
}

.momo-sapo {
  border-left: 3px solid #ccc;
  padding-left: 15px;
  margin: 20px 0;
}

/* 3. Footer Styles */
.momo-rating-action-box {
  background: #fff5f9;
  padding: 20px;
  border-radius: 8px;
  border: 1px dashed #d82d8b;
}

.momo-rating-action-box p {
  font-weight: bold;
  margin-bottom: 10px;
  color: #d82d8b;
}

/* Recommended List */
.momo-recommended-list li a {
  transition: color 0.2s;
}

.momo-recommended-list li a:hover {
  color: #d82d8b !important;
}

/* Related Grid */
.momo-related-posts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 550px) {
  .momo-related-posts-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  /* Có thể bạn quan tâm - 2 cột trên mobile */
  .momo-you-may-like-bottom .row.small-columns-1 {
    --col-count: 2 !important;
  }
  
  .momo-you-may-like-bottom .row.small-columns-1 > .col {
    width: 50% !important;
    max-width: 50% !important;
    flex: 0 0 50% !important;
  }
  
  .momo-you-may-like-bottom .post-title {
    font-size: 13px !important;
  }
  
  .momo-you-may-like-bottom .momo-related-thumb {
    padding-top: 65% !important;
  }
}

/* ==================================================
   TABLE OF CONTENTS (TOC)
   ================================================== */

/* Desktop Sticky Sidebar */
.momo-toc-wrapper.sticky-sidebar {
  position: -webkit-sticky;
  position: sticky;
  top: 80px;
  z-index: 10;
  /* align-self removal: we let margin/top handle it inside the full height parent */
}

/* Structural Fix: Ensure Sidebar Column fills the Row Height */
body.single-post .row.row-divided {
  display: flex;
  /* Should already be flex, but ensure it */
  flex-wrap: wrap;
}

body.single-post .post-sidebar {
  display: flex;
  flex-direction: column;
}

body.single-post #secondary {
  flex: 1;
  /* Grow to fill column */
  display: flex;
  flex-direction: column;
}

/* Fix for Sticky in Flatsome (Force Overflow Visible on Ancestors) */
body.single-post #content,
body.single-post .page-wrapper,
body.single-post .row,
body.single-post .row-large,
body.single-post .post-sidebar,
body.single-post .col {
  overflow: visible !important;
  clip-path: none !important;
}

.momo-toc {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  scrollbar-width: thin;
}

@media (max-width: 768px) {
  .momo-toc {
    max-height: 85vh;
    overflow-y: auto;
  }
}

.momo-toc-header {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  color: #888;
  /* Muted Header */
  margin-bottom: 0px;
  letter-spacing: 0.5px;
}

.momo-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 1px solid #e0e0e0;
  /* The Gray Vertical Line */
  margin-left: 0px;
  /* Slight offset */
}

.momo-toc-list li {
  margin-bottom: 0;
  /* Continuous look */
}

.momo-toc-list li a {
  color: #555;
  text-decoration: none;
  font-size: 14px;
  display: block;
  padding: 7px 8px;
  /* Spacing for items */
  transition: all 0.2s;
  border-left: 2px solid transparent;
  /* Placeholder for active border */
  margin-left: -1px;
  /* Center on the 1px line? Or -2px? -1px aligns well with 1px border */
}

.momo-toc-list li a:hover {
  color: #d82d8b;
}

.momo-toc-list li a.active {
  color: #d82d8b;
  font-weight: 700;
  /* Bold */
  background: #fff5f9;
  /* Light Pink Background */
  border-left: 2px solid #d82d8b;
  /* Pink Line Overlap */
}

/* Indentation for H3 (Visual only, keep border flush left) */
.momo-toc-list li.toc-h3 {
  margin-left: 0 !important;
  padding-left: 0 !important;
}

.momo-toc-list li.toc-h3 a {
  padding-left: 30px;
  /* 15px base + 15px indent */
  font-size: 13px;
  /* Slightly smaller for hierarchy */
}

/* Mobile Sticky Bar */
.momo-toc-mobile-bar {
  display: none;
  /* Desktop hidden */
}

/* ==================================================
   10. REDESIGNED COMMENT SYSTEM
   ================================================== */
.momo-comments-area {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid #f1f1f1;
  font-family: "Inter", sans-serif;
}

.momo-comments-header .title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 25px;
  text-transform: uppercase;
  color: #333;
  border-bottom: 2px solid #333;
  display: inline-block;
  padding-bottom: 5px;
}

/* LIST STYLES */
.momo-comment-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.momo-comment-item {
  margin-bottom: 20px;
}

.momo-comment-body {
  display: flex;
  gap: 15px;
}

.momo-comment-avatar img {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.momo-comment-bubble {
  flex: 1;
  background: #f8f9fa;
  border-radius: 12px;
  border-top-left-radius: 0;
  /* Chat bubble effect */
  padding: 15px;
  position: relative;
  border: 1px solid #eee;
}

/* Mod/Admin Highlighting */
.momo-comment-item.is-admin .momo-comment-bubble {
  background: #fff5f9;
  /* Pink Tint */
  border-color: #ffdceb;
}

.momo-comment-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 13px;
}

.momo-author-name {
  font-weight: 700;
  color: #333;
  font-size: 14px;
}

.badge-mod {
  background: #d82d8b;
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: bold;
  text-transform: uppercase;
}

.momo-comment-time a {
  color: #999;
  text-decoration: none;
  font-size: 12px;
}

.momo-comment-content {
  font-size: 14px;
  line-height: 1.5;
  color: #444;
}

.momo-comment-content p {
  margin-bottom: 0.5em;
}

.momo-comment-content p:last-child {
  margin-bottom: 0;
}

.momo-comment-actions {
  margin-top: 8px;
  text-align: right;
}

.momo-comment-actions a {
  font-size: 12px;
  color: #777;
  font-weight: 600;
  text-transform: uppercase;
  text-decoration: none;
}

.momo-comment-actions a:hover {
  color: #d82d8b;
}

/* Children Indent */
.momo-comment-list .children {
  list-style: none;
  padding-left: 0;
  margin-left: 60px;
  /* Indent below content */
  border-left: 2px solid #eee;
  padding-left: 15px;
}

/* FORM STYLES (Modern Material Filled) */
.momo-comment-respond {
  margin-top: 40px;
  padding: 30px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

.momo-comment-form {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.momo-form-row {
  position: relative;
}

/* Input Group - Filled Style */
.momo-input-group {
  position: relative;
  background: #f7f9fc;
  /* Light Gray Fill */
  border-radius: 8px 8px 0 0;
  overflow: hidden;
  /* Contain bottom border */
  border-bottom: 2px solid #ddd;
  transition: all 0.3s;
}

.momo-input-group:focus-within {
  background: #fff;
  border-color: #d82d8b;
  box-shadow: 0 4px 15px rgba(216, 45, 139, 0.1);
}

.momo-input {
  width: 100%;
  padding: 25px 15px 8px 15px !important;
  /* Space for Label */
  border: none !important;
  outline: none !important;
  font-size: 15px;
  background: transparent !important;
  color: #333;
  margin: 0;
  box-shadow: none !important;
  border-radius: 0;
}

.momo-input-group label {
  position: absolute;
  top: 50%;
  left: 15px;
  transform: translateY(-50%);
  color: #888;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease-out;
  pointer-events: none;
  transform-origin: left top;
}

/* Floating Label Logic */
.momo-input:focus ~ label,
.momo-input:not(:placeholder-shown) ~ label {
  top: 8px;
  transform: none;
  font-size: 11px;
  color: #d82d8b;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Error Message */
.momo-error-msg {
  color: #e74c3c;
  font-size: 12px;
  margin-top: 5px;
  margin-left: 2px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(-5px);
  transition: all 0.3s;
  height: 0;
  overflow: hidden;
}

.momo-input-group.has-error .momo-error-msg {
  opacity: 1;
  height: auto;
  transform: translateY(0);
  padding-top: 5px;
}

.momo-input-group.has-error {
  border-color: #e74c3c;
  background: #fff5f5;
}

/* Markdown Toolbar (Polished) */
.momo-markdown-toolbar {
  display: flex;
  gap: 5px;
  align-items: center;
  margin-top: -20px;
  /* Overlap input bottom */
  padding: 5px 10px;
  background: transparent;
  z-index: 2;
  position: relative;
  justify-content: flex-end;
  /* Right align features */
}

.momo-markdown-toolbar button {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 6px;
  cursor: pointer;
  padding: 4px 10px;
  font-size: 13px;
  color: #666;
  min-width: 32px;
  transition: all 0.2s;
  font-weight: 600;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.momo-markdown-toolbar button:hover {
  background: #d82d8b;
  color: #fff;
  border-color: #d82d8b;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(216, 45, 139, 0.2);
}

.momo-char-count {
  margin-right: auto;
  /* Push buttons right, keep text left */
  font-size: 11px;
  color: #aaa;
  font-weight: 600;
  padding-left: 5px;
}

/* Checkbox (Fixed Layout) */
.momo-checkbox {
  display: flex;
  align-items: center;
  /* Vertical center */
  cursor: pointer;
  font-size: 14px;
  color: #666;
  user-select: none;
  background: #f9f9f9;
  transition: all 0.2s;
  border: 1px solid transparent;
}

/* FIX MENU AUTOMATIC STYLES */
/* 1. Prevent Uppercase */
.nav > li > a {
  text-transform: none !important;
}

/* 2. Center Dropdown (Level 1 only) */
@media (min-width: 850px) {
  .nav > li.menu-item-has-children > .nav-dropdown {
    left: 50% !important;
    transform: translateX(-50%) !important;
  }

  /* Reset for Level 2+ (flyout right) */
  .nav-dropdown .nav-dropdown {
    left: 100% !important;
    transform: none !important;
    top: 0;
  }
}

/* 3. Spacing for Level 0 Categories in Menu */
.momo-auto-cat-depth-0 {
  margin-right: 15px !important;
  display: inline-block;
  /* Ensure it flows horizontally */
}

.momo-auto-cat-depth-0:last-child {
  margin-right: 0px !important;
}

.momo-checkbox:hover {
  background: #fff;
  border-color: #ddd;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.momo-checkbox input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.momo-checkbox .checkmark {
  height: 20px;
  width: 20px;
  min-width: 20px;
  /* Prevent shrinking */
  background-color: #fff;
  border-radius: 5px;
  margin-right: 12px;
  position: relative;
  border: 2px solid #ddd;
  transition: all 0.2s;
  flex-shrink: 0;
  /* Critical Fix */
}

.momo-checkbox input:checked ~ .checkmark {
  background-color: #d82d8b;
  border-color: #d82d8b;
}

.momo-checkbox .checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.momo-checkbox input:checked ~ .checkmark:after {
  display: block;
}

/* Submit Button (Gradient) */
.momo-comment-form .submit {
  background: linear-gradient(135deg, #d82d8b 0%, #aa236d 100%);
  color: #fff;
  border: none;
  padding: 12px 35px;
  border-radius: 99px;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 5px 15px rgba(216, 45, 139, 0.3);
  letter-spacing: 1px;
  width: auto;
  align-self: flex-start;
  /* Don't stretch */
}

.momo-comment-form .submit:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(216, 45, 139, 0.5);
  filter: brightness(1.1);
}

.momo-comment-form .submit:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* TOAST NOTIFICATION STYLES */
.momo-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #fff;
  color: #333;
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
  border-left: 4px solid #333;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.momo-toast.show {
  opacity: 1;
  transform: translateX(0);
}

.momo-toast.type-error {
  border-color: #e74c3c;
}

.momo-toast.type-error i {
  color: #e74c3c;
}

.momo-toast.type-success {
  border-color: #2ecc71;
}

.momo-toast.type-success i {
  color: #2ecc71;
}

.momo-toast.type-info {
  border-color: #3498db;
}

.momo-toast.type-info i {
  color: #3498db;
}

/* Shake Animation */
@keyframes shake {
  0% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-5px);
  }

  50% {
    transform: translateX(5px);
  }

  75% {
    transform: translateX(-5px);
  }

  100% {
    transform: translateX(0);
  }
}

.shake {
  animation: shake 0.4s ease-in-out;
}

@media (max-width: 992px) {
  /* Hide Desktop TOC */
  .post-sidebar .momo-toc-wrapper {
    display: none;
  }

  /* Mobile Bar Logic */
  .momo-toc-mobile-bar {
    display: none;
    position: fixed;
    top: 0;
    /* Sticky to TOP as per screenshot which looks like a header */
    left: 0;
    width: 100%;
    background: #fff;
    z-index: 99999;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    transform: translateY(-100%);
    /* Start off-screen top */
    opacity: 0;
  }

  .momo-toc-mobile-bar.has-toc {
    display: block;
    /* Show only if TOC exists */
  }

  .momo-toc-mobile-bar.visible {
    display: block;
    transform: translateY(0);
    opacity: 1;
  }

  .momo-toc-mobile-header {
    padding: 12px 15px;
    font-size: 14px;
    /* Request 3: Cỡ chữ nhỏ lại (15->14) */
    font-weight: 700 !important;
    /* Forces Bold */
    /* Request 3: In đậm */
    color: #d82d8b;
    /* Request 3: Màu hồng */
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Arrow Right */
    background: #fff;
    cursor: pointer;
  }

  .momo-toc-mobile-header .momo-toc-arrow {
    font-size: 18px;
    color: #666;
  }

  /* Active Heading Text */
  .momo-toc-mobile-header.active .momo-active-heading {
    color: #d82d8b;
    font-weight: 700 !important;
    /* Forces Bold */
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90%;
  }
}

/* Request: Disable Theme Sticky Header if TOC is present (Mobile Only) */
@media (max-width: 992px) {
  /* Aggressive Hiding of Sticky Header */
  body.momo-toc-visible .header-wrapper.stuck,
    body.momo-toc-visible .header-wrapper.is-stuck,
    body.momo-toc-visible #header.stuck,
    body.momo-toc-visible .stuck,
    body.momo-toc-visible .header-main.stuck,
    body.momo-toc-visible #masthead.stuck,
    /* Hide ANY fixed element at the top that isn't our TOC */
    body.momo-toc-visible .header-wrapper[style*="fixed"],
    body.momo-toc-visible div[class*="header"][class*="stuck"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    height: 0 !important;
    overflow: hidden !important;
  }
}

@media (max-width: 992px) {
  .momo-toc-mobile-content {
    display: none;
    background: #fff;
    max-height: 70vh;
    overflow-y: auto;
    padding: 0 15px 15px 0px;
    border-top: 1px solid #eee;
  }

  /* TOC Items in Mobile */
  .momo-toc-mobile-content h4 {
    display: none;
  }

  /* Hide duplicate title */
  .momo-toc-mobile-content ul {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .momo-toc-mobile-content li a {
    display: block;
    padding: 10px 10px;
    border-bottom: 1px dashed #eee;
    color: #555;
    font-size: 14px;
    font-weight: 400;
  }

  .momo-toc-mobile-content li a.active {
    color: #d82d8b;
    font-weight: 700;
  }
}

/* Adjust padding for fixed header overlap if needed */
/* .admin-bar .momo-toc-mobile-bar { top: 32px; } */

/* ==================================================
   SINGLE HERO HEADER
   ================================================== */
.momo-hero-header {
  position: relative;
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
  display: flex;
  /* Ensure it behaves as a container */
}

/* Flex Utilities for Custom Header */
.momo-flex-row {
  display: flex;
}

.momo-flex-wrap {
  flex-wrap: wrap;
}

.momo-align-middle {
  align-items: center;
}

.momo-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.6) 0%,
    rgba(0, 0, 0, 0.8) 100%
  ) !important;
  z-index: 1;
}

.momo-hero-content {
  position: relative;
  z-index: 2;
  /* Above overlay */
  padding: 60px 0;
  /* Vertical padding only */
  color: #222 !important;
  /* switch to dark text */
  width: 100%;
}

/* Typography Overrides (Minimal Style) */
.momo-hero-content .momo-main-title,
.momo-hero-content h1,
.momo-hero-content h2,
.momo-hero-content h3,
.momo-hero-content p,
.momo-hero-content span,
.momo-hero-content strong,
.momo-hero-content div,
.momo-hero-content a {
  color: #222 !important;
  /* switch to dark text */
  text-shadow: none;
  /* remove shadow */
}

.momo-main-title {
  /* Removed .text-white requirement */
  font-size: 32px;
  line-height: 1.3;
  margin-bottom: 20px;
  font-weight: 700 !important;
  /* Bold Title */
}

/* Mobile: Smaller title */
@media (max-width: 768px) {
  .momo-main-title {
    font-size: 26px !important;
    line-height: 1.35 !important;
  }
  .momo-entry-content h2 {
    font-size: 23px;
    color: #d82d8b;
    border-left: 0px solid #d82d8b;
    padding-left: 0px;
  }
}

/* Ensure Stars Color handled by specific classes */
.momo-stars-display span.star-active {
  color: #fca120 !important;
}

.momo-stars-display span.star-inactive {
  color: #ddd !important;
}

.momo-hero-content a:hover {
  text-decoration: underline;
  opacity: 0.9;
  color: #000 !important;
}

/* Meta Row Items */
.momo-hero-meta-row {
  gap: 15px;
  margin-bottom: 20px;
}

.momo-hero-meta-row .meta-item {
  font-size: 14px;
  background: #f1f1f1;
  /* Light gray pill */
  padding: 4px 10px;
  border-radius: 15px;
  /* backdrop-filter: blur(4px); Removed need for blur */
  color: #555 !important;
}

.momo-hero-author-row {
  margin-top: 10px;
}

/* Breadcrumb Responsive Title Truncation (Smart Flex) */
.momo-breadcrumbs-body .breadcrumb-title {
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  /* Flex magic: Fill remaining space, but allow shrinking */
  flex: 1;
  min-width: 0;
  margin-left: 5px;
  /* Spacing from icon */
}

.momo-hero-author-row .author-avatar img {
  border: 2px solid #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: block;
}

/* Spacing Helpers */
.mr-large {
  margin-right: 0px;
}

.mr-small {
  margin-right: 10px;
}

.mt-half {
  margin-top: 15px;
}

.mt {
  margin-top: 30px;
}

/* Mobile Adjustments */
@media (max-width: 550px) {
  .momo-hero-content {
    padding: 30px 20px;
  }

  .momo-main-title.text-white {
    font-size: 24px !important;
  }

  .momo-hero-meta-row {
    gap: 8px;
  }

  .meta-item {
    font-size: 12px;
  }

  .momo-hero-author-row {
    margin-top: 15px;
  }
}

.entry-content {
  padding-top: 0em !important;
}

.page-wrapper {
  padding-top: 10px !important;
}

/* Dùng body để tăng sức mạnh, ghi đè luật last-child của theme */
body .nav > li.left-margin {
  margin-left: auto !important;
  margin-right: 30px !important;
  /* Giờ nó sẽ nhận lệnh này */
}

/* 2. Đổi MÀU CHỮ cho mục này */
body .nav > li.left-margin > a {
  color: #c31432 !important;
  /* Màu hồng MoMo */
  font-weight: bold !important;
  /* In đậm cho nổi */
}

/* 3. Đổi màu khi di chuột vào (Hover) */
body .nav > li.left-margin > a:hover {
  color: #c31432 !important;
  /* Đổi sang đỏ tím khi hover */
  opacity: 0.8;
}

/* ==========================================================================
   MOBILE BOTTOM NAVIGATION BAR
   ========================================================================== */

/* Bottom Nav Bar */
.momo-bottom-nav {
  display: none; /* Hidden on desktop */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(56px + env(safe-area-inset-bottom, 0px));
  background: #fff;
  box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.08);
  z-index: 9999;
  justify-content: space-around;
  align-items: flex-start;
  padding: 0;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  transition: transform 0.3s ease;
}

/* Hidden when popup/modal is open */
.momo-bottom-nav.momo-nav-hidden {
  transform: translateY(100%);
  pointer-events: none;
}

/* Hide menu and logout when course popup is visible */
body:has(.py-course-popup-overlay) .momo-bottom-nav,
body:has(#py-archive-popup-overlay[style*="flex"]) .momo-bottom-nav {
  transform: translateY(100%) !important;
  pointer-events: none;
}

body:has(.py-course-popup-overlay) .py-user-bubble,
body:has(#py-archive-popup-overlay[style*="flex"]) .py-user-bubble {
  display: none !important;
}

/* LMS User bubble should float above mobile nav */
@media (max-width: 1024px) {
  .py-user-bubble {
    z-index: 10001 !important;
    bottom: calc(70px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* Show on mobile and tablet */
@media (max-width: 1024px) {
  .momo-bottom-nav {
    display: flex;
  }

  /* Add padding to body to prevent content being hidden behind nav */
  body {
    padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* Hide when TOC is visible */
  .momo-bottom-nav.hidden {
    transform: translateY(100%);
    transition: transform 0.3s ease;
  }
}

/* Nav Items - ensure button and a elements have same height */
.momo-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  height: 56px;
  padding: 6px 5px;
  margin: 0;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  cursor: pointer;
  text-decoration: none !important;
  color: #888;
  transition: color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  box-shadow: none !important;
  font-family: inherit;
  line-height: 1;
}

/* Reset button specific styles */
button.momo-bottom-nav-item {
  -webkit-appearance: none;
  appearance: none;
}

.momo-bottom-nav-item:hover,
.momo-bottom-nav-item:focus,
.momo-bottom-nav-item:active {
  color: #d82d8b;
  background: transparent !important;
  outline: none !important;
  box-shadow: none !important;
}

.momo-bottom-nav-item.active {
  color: #d82d8b;
}

/* Active indicator dot */
.momo-bottom-nav-item.active::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: #d82d8b;
  border-radius: 50%;
}

.momo-bottom-nav-item .nav-icon {
  width: 22px;
  height: 22px;
  margin-bottom: 4px;
  stroke: currentColor;
  transition: transform 0.15s ease;
  display: block;
  border: none !important;
  background: none !important;
  flex-shrink: 0;
}

.momo-bottom-nav-item:active .nav-icon {
  transform: scale(0.9);
}

.momo-bottom-nav-item .nav-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2px;
  color: inherit;
  line-height: 1;
  white-space: nowrap;
}

/* Category Panel (Slide Up) */
.momo-category-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 70vh;
  background: #fff;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.15);
  z-index: 10001;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.momo-category-panel.open {
  transform: translateY(0);
}

/* Panel Header */
.momo-category-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 20px 15px;
  border-bottom: 1px solid #eee;
  background: #fafafa;
  position: relative;
  touch-action: none;
}

.momo-category-panel-header h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #333;
}

.momo-category-close {
  width: 32px;
  height: 32px;
  border: none;
  background: #f0f0f0;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  transition: all 0.2s;
}

.momo-category-close:hover {
  background: #e0e0e0;
  color: #333;
}

/* Panel Body */
.momo-category-panel-body {
  padding: 15px;
  max-height: calc(70vh - 60px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Resources Panel */
.momo-resources-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.15);
  z-index: 10001;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.momo-resources-panel.open {
  transform: translateY(0);
}

.momo-resources-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid #eee;
  background: #fafafa;
}

.momo-resources-panel-header h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #333;
}

.momo-resources-close {
  width: 32px;
  height: 32px;
  border: none;
  background: #f0f0f0;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  transition: all 0.2s;
}

.momo-resources-close:hover {
  background: #e0e0e0;
  color: #333;
}

.momo-resources-panel-body {
  padding: 15px;
  max-height: 60vh;
  overflow-y: auto;
}

.momo-resource-item {
  display: flex;
  align-items: center;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 12px;
  margin-bottom: 10px;
  text-decoration: none;
  color: #333;
  transition: all 0.2s;
}

.momo-resource-item:hover {
  background: #f0f0f0;
  transform: translateX(5px);
}

.momo-resource-item .resource-icon {
  font-size: 28px;
  margin-right: 15px;
  flex-shrink: 0;
}

.momo-resource-item .resource-info {
  flex: 1;
  min-width: 0;
}

.momo-resource-item .resource-name {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #222;
  margin-bottom: 3px;
}

.momo-resource-item .resource-desc {
  display: block;
  font-size: 12px;
  color: #888;
}

.momo-resource-item .resource-arrow {
  width: 20px;
  height: 20px;
  color: #ccc;
  flex-shrink: 0;
  margin-left: 10px;
}

/* Swipe Handle */
.momo-swipe-handle {
  width: 40px;
  height: 4px;
  background: #ddd;
  border-radius: 2px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
}

.momo-resources-panel-header {
  position: relative;
  padding-top: 20px;
  touch-action: none;
  cursor: grab;
}

/* Empty State */
.momo-resources-empty {
  text-align: center;
  padding: 40px 20px;
  color: #888;
}

.momo-resources-empty .empty-icon {
  font-size: 48px;
  margin-bottom: 15px;
}

.momo-resources-empty p {
  font-size: 16px;
  font-weight: 600;
  color: #555;
  margin: 0 0 5px;
}

.momo-resources-empty span {
  font-size: 13px;
  color: #999;
}

/* Category Tabs Grid */
.momo-category-tabs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.momo-category-tab-item {
  background: #f8f8f8;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s;
  position: relative;
}

.momo-category-tab-item:hover {
  background: #f0f0f0;
}

/* Parent Row - Flex container for link + button */
.momo-category-tab-item.has-children {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

/* Parent Category Link */
.momo-category-parent {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 600;
  color: #333;
  text-decoration: none;
  flex: 1;
  min-width: 0; /* Allow text truncate */
}

.momo-category-parent:hover {
  color: #d82d8b;
}

.momo-category-parent .cat-count {
  font-size: 12px;
  color: #999;
  font-weight: 400;
  margin-left: 5px;
  flex-shrink: 0;
}

/* Expand Button - Inline, not absolute */
.momo-category-expand {
  width: 44px;
  height: 44px;
  border: none;
  background: rgba(0, 0, 0, 0.05);
  font-size: 12px;
  color: #666;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  border-radius: 8px;
}

.momo-category-expand:hover {
  background: rgba(0, 0, 0, 0.1);
}

.momo-category-tab-item.expanded .momo-category-expand {
  transform: rotate(180deg);
}

/* Children Categories - Full width below parent */
.momo-category-children {
  display: none;
  width: 100%;
  padding: 0 12px 12px 12px;
  background: #fff;
  margin: 0 8px 8px 8px;
  border-radius: 8px;
  box-sizing: border-box;
}

.momo-category-child {
  display: block;
  padding: 10px 12px;
  font-size: 14px;
  color: #555;
  text-decoration: none;
  border-bottom: 1px solid #f0f0f0;
}

.momo-category-child:last-child {
  border-bottom: none;
}

.momo-category-child:hover {
  color: #d82d8b;
}

.momo-category-child .cat-count {
  font-size: 11px;
  color: #bbb;
  margin-left: 4px;
}

/* Overlay */
.momo-category-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.momo-category-overlay.visible {
  opacity: 1;
  visibility: visible;
}

/* Body lock when panel open */
body.momo-panel-open {
  overflow: hidden !important;
  position: fixed;
  width: 100%;
  touch-action: none;
}

/* Hide on desktop */
@media (min-width: 850px) {
  .momo-category-panel,
  .momo-category-overlay {
    display: none !important;
  }
}

/* ==========================================================================
   MEGA MENU GRID STYLE
   ========================================================================== */

.momo-mega-menu-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Each Category Item */
.momo-mega-item {
  background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
  border: 1px solid #eee;
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.momo-mega-item:hover {
  border-color: #d82d8b;
  box-shadow: 0 4px 15px rgba(216, 45, 139, 0.1);
  transform: translateY(-1px);
}

/* Row wrapper for link + expand */
.momo-mega-row {
  display: flex;
  align-items: center;
  gap: 0;
}

/* Icon wrapper - consistent for all items */
.momo-mega-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  flex-shrink: 0;
}

.momo-mega-icon .mega-icon {
  font-size: 28px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #fff 0%, #f5f5f5 100%);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Category name link - only wrap text, not expand to fill */
.momo-mega-link {
  display: flex;
  flex-direction: column;
  padding: 14px 10px;
  text-decoration: none;
  color: #333;
  gap: 2px;
}

.momo-mega-link:hover {
  color: #d82d8b;
}

.momo-mega-link .mega-name {
  font-size: 15px;
  font-weight: 700;
  color: inherit;
  white-space: nowrap;
}

.momo-mega-link .mega-count {
  font-size: 12px;
  color: #888;
  font-weight: 400;
}

/* Expandable area - fills remaining space */
.momo-mega-item.has-sub .momo-mega-row {
  position: relative;
}

/* Invisible expand trigger covering empty space */
.momo-mega-item.has-sub .momo-mega-row::before {
  content: "";
  position: absolute;
  top: 0;
  left: 60px;
  right: 0;
  bottom: 0;
  z-index: 0;
  cursor: pointer;
}

/* Spacer for items without children to match expand button width */
.momo-mega-item:not(.has-sub) .momo-mega-row::after {
  content: "";
  width: 50px;
  flex-shrink: 0;
}

.momo-mega-icon,
.momo-mega-link,
.momo-mega-expand {
  position: relative;
  z-index: 1;
}

/* Expand Button - positioned at right edge */
.momo-mega-expand {
  width: 50px;
  height: 60px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #999;
  transition: all 0.2s;
  flex-shrink: 0;
  margin-left: auto; /* Push to right edge */
}

.momo-mega-expand svg {
  width: 18px;
  height: 18px;
  transition: transform 0.2s;
}

.momo-mega-expand:hover {
  color: #d82d8b;
  background: rgba(216, 45, 139, 0.05);
}

.momo-mega-item.expanded .momo-mega-expand svg {
  transform: rotate(180deg);
}

/* Sub Categories - Horizontal Chips Layout */
.momo-mega-sub {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 16px 16px;
}

/* When expanded, show as flex */
.momo-mega-item.expanded .momo-mega-sub {
  display: flex;
}

.momo-mega-child {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #f5f5f5;
  border-radius: 20px;
  text-decoration: none;
  color: #555;
  font-size: 13px;
  transition: all 0.15s;
  white-space: nowrap;
}

.momo-mega-child:hover,
.momo-mega-child:active {
  background: #fce4ec;
  color: #d82d8b;
}

.momo-mega-child .child-name {
  font-weight: 500;
}

.momo-mega-child .child-count {
  font-size: 11px;
  color: #999;
  font-weight: 500;
}

.momo-mega-child:hover .child-count {
  color: #d82d8b;
}

/* Children with grandchildren - has-more indicator */
.momo-mega-child.has-more {
  background: #e8f5e9;
  border: 1px solid #c8e6c9;
}

.momo-mega-child.has-more:hover {
  background: #c8e6c9;
  color: #2e7d32;
}

.momo-mega-child .child-arrow {
  font-size: 16px;
  font-weight: bold;
  color: #66bb6a;
  margin-left: 2px;
}

.momo-mega-child.has-more:hover .child-arrow {
  color: #2e7d32;
}

/* ======================================
   DRILL-DOWN NAVIGATION (Shopee Style)
   ====================================== */

.momo-drill-container {
  position: relative;
  overflow: hidden;
  height: calc(100vh - 200px);
  max-height: 500px;
}

.momo-drill-level {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  transform: translateX(100%);
  visibility: hidden;
  background: #fff;
  overflow-y: auto;
  overflow-x: hidden;
  will-change: transform;
}

.momo-drill-level.active {
  transform: translateX(0);
  visibility: visible;
  z-index: 1;
  transition: transform 0.25s ease-out;
}

/* Slide animations - smoother */
.momo-drill-level.slide-left {
  transform: translateX(-100%);
  visibility: hidden;
  z-index: 0;
  transition: transform 0.25s ease-out;
}

.momo-drill-level.slide-right {
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.25s ease-out;
}

.momo-drill-level.slide-in-left {
  transform: translateX(0);
  visibility: visible;
  z-index: 1;
  transition: transform 0.25s ease-out;
}

.momo-drill-level.slide-in-right {
  transform: translateX(0);
  visibility: visible;
  z-index: 1;
  transition: transform 0.25s ease-out;
}

/* Back button - clean and simple */
.momo-drill-back {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 14px 16px;
  border: none;
  background: #f5f5f5;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  text-align: left;
}

.momo-drill-back:active {
  background: #e8e8e8;
}

.momo-drill-back svg {
  width: 18px;
  height: 18px;
  color: #d82d8b;
  flex-shrink: 0;
}

.momo-drill-back span {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

/* Drill items container */
.momo-drill-items {
  padding: 12px;
}

/* Individual item */
.momo-drill-item {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 12px;
  margin-bottom: 8px;
  box-shadow: 0 0 0 1px #eee;
  transition: all 0.2s;
  overflow: hidden;
}

/* Hover chỉ áp dụng trên desktop (có mouse) */
@media (hover: hover) and (pointer: fine) {
  .momo-drill-item:hover {
    box-shadow:
      0 0 0 1px #d82d8b,
      0 2px 8px rgba(216, 45, 139, 0.1);
  }
}

/* Item link - only wraps content, doesn't expand */
.momo-drill-link {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  text-decoration: none;
  color: #333;
  gap: 12px;
  min-width: 0;
}

.momo-drill-link:hover {
  color: #d82d8b;
}

.momo-drill-link .drill-icon {
  font-size: 24px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #fff 0%, #f5f5f5 100%);
  border-radius: 10px;
  flex-shrink: 0;
}

.momo-drill-link .drill-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.momo-drill-link .drill-name {
  font-size: 14px;
  font-weight: 600;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.momo-drill-link .drill-count {
  font-size: 12px;
  color: #888;
}

/* Expand zone for items with children - takes remaining space */
.momo-drill-expand {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
  min-height: 64px;
  padding-right: 16px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #d82d8b;
  transition: all 0.2s;
}

/* Hover chỉ trên desktop */
@media (hover: hover) and (pointer: fine) {
  .momo-drill-expand:hover {
    background: linear-gradient(90deg, transparent 0%, #fce4ec 100%);
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
  }
}

.momo-drill-expand:active {
  background: linear-gradient(90deg, transparent 0%, #f8bbd0 100%);
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}

.momo-drill-expand svg {
  width: 22px;
  height: 22px;
  padding: 6px;
  background: linear-gradient(135deg, #fce4ec 0%, #fff5f8 100%);
  border-radius: 8px;
  box-sizing: content-box;
}

.momo-drill-expand:hover svg {
  background: linear-gradient(135deg, #f8bbd0 0%, #fce4ec 100%);
}

/* Hide expand zone for items without children */
.momo-drill-item:not(.has-sub) .momo-drill-expand {
  display: none;
}

/* ======================================
   AJAX SEARCH PANEL
   ====================================== */

.momo-search-panel {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  opacity: 0;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

.momo-search-panel.active {
  transform: translateY(0);
  opacity: 1;
}

/* Search Header */
.momo-search-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
  background: #fff;
  border-bottom: 1px solid #eee !important;
}

#momo-search-panel .momo-search-input-wrap {
  flex: 1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  background: #f8f8f8 !important;
  border-radius: 10px !important;
  padding: 0 14px !important;
  gap: 10px !important;
  border: 1px solid #e0e0e0 !important;
  transition: all 0.2s !important;
  height: 44px !important;
  box-sizing: border-box !important;
  margin: 0 !important;
}

#momo-search-panel .momo-search-input-wrap:focus-within {
  background: #fff !important;
  border-color: #ccc !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

#momo-search-panel .momo-search-input-wrap .search-icon {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  color: #888 !important;
  flex-shrink: 0 !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
}

#momo-search-panel .momo-search-input-wrap:focus-within .search-icon {
  color: #666 !important;
}

#momo-search-panel .momo-search-input {
  flex: 1 !important;
  height: 42px !important;
  line-height: 42px !important;
  border: none !important;
  background: transparent !important;
  font-size: 16px !important;
  color: #333 !important;
  outline: none !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
}

#momo-search-panel .momo-search-input::placeholder {
  color: #999 !important;
}

#momo-search-panel .momo-search-clear {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
  border: none !important;
  background: #ddd !important;
  border-radius: 50% !important;
  color: #666 !important;
  font-size: 11px !important;
  cursor: pointer !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 1 !important;
}

#momo-search-panel .momo-search-clear.visible {
  display: flex !important;
}

#momo-search-panel .momo-search-cancel {
  border: none !important;
  background: transparent !important;
  color: #d82d8b !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  padding: 0 8px !important;
  margin: 0 !important;
  white-space: nowrap !important;
  height: 44px !important;
  line-height: 44px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Search Body */
.momo-search-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
}

/* Hint State */
.momo-search-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.momo-search-hint .hint-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.6;
}

.momo-search-hint p {
  color: #888;
  font-size: 15px;
  margin: 0;
}

/* Loading State */
.momo-search-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f0f0f0;
  border-top-color: #667eea;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.momo-search-loading p {
  color: #888;
  margin-top: 16px;
  font-size: 14px;
}

/* No Results State */
.momo-search-no-results {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px;
  text-align: center;
}

.momo-search-no-results .no-results-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.momo-search-no-results p {
  color: #888;
  font-size: 15px;
  margin: 0;
}

/* Search Results */
.momo-search-results {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.momo-search-result-item {
  display: flex;
  gap: 14px;
  padding: 14px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #eee;
  text-decoration: none;
  transition: all 0.2s;
}

.momo-search-result-item:hover {
  border-color: #d82d8b;
  box-shadow: 0 4px 15px rgba(216, 45, 139, 0.15);
}

.momo-search-result-info {
  flex: 1;
  min-width: 0;
}

.momo-search-result-title {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  line-height: 1.5;
}

.momo-search-result-title strong {
  color: #d82d8b;
  font-weight: 600;
}

.momo-search-result-title .search-excerpt-hack {
  display: block !important;
  font-size: 12px !important;
  color: #666 !important;
  font-weight: normal !important;
  margin-top: 6px !important;
  line-height: 1.4 !important;
}

/* ==========================================
   BOTTOM NAVIGATION BAR STYLING
   ========================================== */
@media (max-width: 849px) {
  #momo-bottom-nav,
  .momo-bottom-nav {
    background: #fff !important;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1) !important;
    border-top: 1px solid #eee !important;
  }
  
  .momo-bottom-nav-item {
    color: #999 !important;
  }
  
  .momo-bottom-nav-item.active {
    color: #d82d8b !important;
  }
  
  .momo-bottom-nav-item .nav-icon {
    color: inherit !important;
  }
  
  .momo-bottom-nav-item .nav-label {
    font-size: 11px !important;
    font-weight: 500 !important;
    color: inherit !important;
  }
}

/* 
 * =========================================
 * INLINE RELATED POST (Auto Insert)
 * =========================================
 */
.momo-inline-related-post {
  margin: 30px 0;
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  background: #fdfdfd;
  transition: box-shadow 0.2s;
}

.momo-inline-related-post:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.momo-related-link {
  display: flex !important; /* Force flex */
  text-decoration: none !important;
  color: inherit !important;
  align-items: stretch;
}

.momo-related-img {
  width: 120px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  min-height: 100px;
}

.momo-related-img.momo-no-img {
    background-color: #f1f1f1;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23ccc"><path d="M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"/></svg>');
    background-size: 40px;
    background-repeat: no-repeat;
    background-position: center;
}

.momo-related-content {
  padding: 15px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.momo-related-label {
  font-size: 11px;
  text-transform: uppercase;
  color: #d82d8b;
  font-weight: 700;
  margin-bottom: 5px;
  letter-spacing: 0.5px;
}

.momo-related-title {
  margin: 0 !important;
  font-size: 16px !important;
  line-height: 1.4 !important;
  font-weight: 600 !important;
  color: #333;
  transition: color 0.2s;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.momo-inline-related-post:hover .momo-related-title {
  color: #d82d8b;
}

.momo-related-meta {
  font-size: 12px;
  color: #999;
  margin-top: 5px;
}

@media (max-width: 480px) {
  .momo-related-img {
    width: 90px;
  }
  .momo-related-content {
    padding: 12px;
  }
}

/* --- Modern Code Block Styling (Mac Style) --- */
pre, .wp-block-code {
    position: relative;
    background: #282c34 !important; /* Dark Theme */
    color: #abb2bf !important;
    border-radius: 8px;
    padding: 40px 20px 20px 20px !important; /* Top padding for Mac header */
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    overflow-x: auto;
    font-family: 'Fira Code', Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    margin: 30px 0 !important;
    white-space: pre !important; /* Better for syntax highlighter */
    max-height: 500px; /* Limit height */
    overflow-y: auto;  /* Vertical scroll */
}

/* Reset code inside pre to avoid double boxes/padding */
pre code, .wp-block-code code {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    font-family: inherit !important;
    font-size: inherit !important;
    color: inherit !important;
    box-shadow: none !important;
    white-space: inherit !important;
}

/* Mac Window Header Dots */
pre::before, .wp-block-code::before {
    content: "•••"; 
    position: absolute;
    top: 5px;
    left: 15px;
    font-size: 36px; /* Big dots */
    letter-spacing: -2px;
    color: #ff5f56; /* Red dot */
    line-height: 1;
    text-shadow: 18px 0 #ffbd2e, 36px 0 #27c93f; /* Yellow & Green dots */
}

/* Scrollbar Styling */
pre::-webkit-scrollbar, .wp-block-code::-webkit-scrollbar {
    height: 8px;
}
pre::-webkit-scrollbar-thumb, .wp-block-code::-webkit-scrollbar-thumb {
    background: #4b5263;
    border-radius: 4px;
}
pre::-webkit-scrollbar-track, .wp-block-code::-webkit-scrollbar-track {
    background: transparent;
}

/* Copy Button */
.momo-copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s;
    font-family: sans-serif;
}
pre:hover .momo-copy-btn, .wp-block-code:hover .momo-copy-btn {
    opacity: 1;
}
.momo-copy-btn:hover {
    background: rgba(255,255,255,0.2);
}
.momo-copy-btn.copied {
    background: #27c93f;
    color: #fff;
}
