/* .fixed-top {
  top: -0px;
  transform: translateY(0px);
  transition: transform .3s;
} */

#div_my_widget_area_for_translate_plugin > p:empty {
  display: none;
}

.logged-in.admin-bar {
  /*Put code*/
  top: -140px;
}
body.logged-in > header {
  margin-top: 32px;
}

/* .my_tool_menu_style {
  background-color: #f9f9f9;
}

@media screen and (max-width: 600px) {
  div.my_tool_menu_style {
    display: none;
  }
} */
#my-menu {
  /* display: flex; */
  /* flex-basis: auto; */
  display: inline-block;
}
#my-main-menu {
  background-color: #ffffff;
  /* flex-basis: auto; */
}

#my-sub-menu {
  background-color: #ffffff;
  /* flex-basis: auto; */
}

.card {
  border: 1px solid #ccc;
  /* background-color: rgb(240, 242, 241); */
  margin-left: -12px;
  margin-bottom: 5px;
}

.card-header {
  border: 0px;
  background-color: rgb(240, 242, 241);
}

.card-body {
  border: 0px;
  /* background-color: rgb(242, 242, 200); */
}

.entry-content {
  margin-top: -15px;
}

.card-title {
  color: #0d6efd;
  font-size: 18px;
}

.div_Button_Detail {
  background-color: green;
}

.Meta_Data_Style {
  padding-bottom: 5px;
}

.Meta_Data_Style .City {
  font-weight: bold;
}

.Meta_Data_Style .State {
  font-weight: bold;
}

/* CSS for single post */
.my-single-post .entry-header .entry-title {
  color: #0d6efd;
  font-size: 28px;
  font-weight: bold;
  text-transform: Uppercase;
}

.my-single-post .entry-meta {
  font-size: 16px;
}

.my-single-post .entry-content .Phone {
  font-size: 16px;
  font-weight: bold;
}

.my-single-post .entry-content .City {
  font-size: 16px;
  font-weight: bold;
}

.my-single-post .entry-content .State {
  font-size: 16px;
  font-weight: bold;
}

.css_Div_my_post_view {
  display: inline;
}
.css_Div_my_post_view .post-views {
  display: inline;
}
/* --------- End of CSS for single post --------- */

/* CSS for title of categories */
.div_Title_of_Category {
  padding-top: 10px;
}
.Title_of_Category_style {
  border-radius: 15px;
  background: #95dcf8;
  padding: 10px;
  width: 250px;
  height: 40px;
  font-size: 18px;
  font-weight: bold;
  color: #c9010b;
}

.liner {
  display: flex;
  align-items: flex-start;
  text-align: left;
}
.liner:after {
  content: "";
  flex-grow: 1;
  height: 1px;
  background: #d66853;
  min-width: 20px;
  margin: auto;
}
.liner:after {
  margin-left: 20px;
}

/* Pageination */
.div_pagination .page-numbers {
  display: inline-block;
  padding: 5px 20px;
  color: #333;
  border-radius: 4px;
}
.div_pagination .pagination_bar {
  margin: 10px auto;
}
.div_pagination .pagination_bar .current {
  background: #007bff;
  padding: 5px 20px;
  color: #fff;
  border-radius: 4px;
}

/* Archive Category */
h1.my_page_title {
  position: relative;
  margin: 15px 0px 0px 0px;
  padding-left: 15px;
  font-size: 32px;
  background: #0088aa;
  color: #ffffff;
  text-shadow: 1px 1px 0px #1a5d6e;
  box-shadow: 0 0 10px #aaa;
  margin-bottom: 20px;
}

h1.my_page_title:before {
  content: "";
  display: block;
  position: absolute;
  bottom: -15px;
  width: 0;
  height: 0;
  border-style: solid;
  border-color: #1a5d6e transparent;
  border-width: 15px 0 0 15px;
  left: 0;
}
/* --------- End of CSS for Archive Category --------- */

/* --------- CSS for Sidebar --------- */
.divFrontPage_RightSide h3 {
  background: #2b6695;
  border-radius: 6px 6px 6px 6px;
  box-shadow:
    0 0 0 1px #5f5a4b,
    1px 1px 6px 1px rgba(10, 10, 0, 0.5);
  color: #ffffff;
  font-family: "Microsoft YaHei", "Tahoma", "boldface", Arial;
  font-size: 18px;
  font-weight: bold;
  height: 35px;
  line-height: 20px;
  margin: 18px 0 !important;
  padding: 8px 0 5px 15px;
  text-shadow: 2px 2px 3px #222222;
}

#mydiv_SearchBox {
  /* visibility: hidden; */
  display: none;
}

#mydiv_main_searchbox {
  /* visibility:visible; */
  display: flex;
}

#my-sub-menu {
  flex-direction: row-reverse;
}

.rt-img-holder img {
  cursor: -webkit-zoom-in;
  cursor: zoom-in;
  box-shadow: 0 8px 6px -6px black;
  border-radius: 8%;
}

.post-thumbnail img {
  cursor: -webkit-zoom-in;
  cursor: zoom-in;
  box-shadow: 0 8px 6px -6px silver;
  border-radius: 5%;
}

/* -------------------------- */
/* Plugin metaslider */
.metaslider .caption,
.metaslider .cs-title,
.metaslider .nivo-caption,
.metaslider .caption-wrap {
  font-size: 1.3em; /* adjust as necessary */
  color: red;
}
/* -------------------------- */

.fb_congdongus {
  color: rgb(189, 57, 55);
}

/* -------------------------- */

/* -------------------------- */
/* Plugin CALENDAR */

.div_my_calendar {
  font-size: 16px;
  font-weight: bold;
}

/* -------------------------- */

@media (max-width: 576px) {
  /* .xs {color:red;font-weight:bold;} */
  #mydiv_SearchBox {
    /* visibility:visible; */
    display: inline-block;
    justify-content: center;
  }
  #mydiv_main_searchbox {
    /* visibility:visible; */
    display: none;
  }
  #my-sub-menu {
    flex-direction: row;
  }

  #mydiv-mysub-menu-login .navbar-nav {
    flex-direction: row;
    text-align: right;
  }

  #mydiv-mysub-menu-login .navbar-nav .menu-item {
    padding-left: 8px;
  }

  a {
    /* These are technically the same, but use both */
    overflow-wrap: break-word;
    word-wrap: break-word;

    -ms-word-break: break-all;
    /* This is the dangerous one in WebKit, as it breaks things wherever */
    word-break: break-all;
    /* Instead use this non-standard one: */
    word-break: break-word;

    /* Adds a hyphen where the word breaks, if supported (No Blink) */
    -ms-hyphens: auto;
    -moz-hyphens: auto;
    -webkit-hyphens: auto;
    hyphens: auto;
  }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 768px) {
  /* .sm {color:red;font-weight:bold;} */
  #mydiv_SearchBox {
    /* visibility:visible; */
    display: inline-block;
    justify-content: center;
  }
  #mydiv_main_searchbox {
    /* visibility:visible; */
    display: none;
  }
  #my-sub-menu {
    flex-direction: row;
  }

  #mydiv-mysub-menu-login .navbar-nav {
    flex-direction: row;
    text-align: right;
  }

  #mydiv-mysub-menu-login .navbar-nav .menu-item {
    padding-left: 8px;
  }
}

/* Medium devices (tablets, 768px and up) The navbar toggle appears at this breakpoint */
@media (min-width: 768px) and (max-width: 992px) {
  /* .md {color:red;font-weight:bold;} */
  #mydiv_SearchBox {
    /* visibility:visible; */
    display: inline-block;
    justify-content: center;
  }
  #mydiv_main_searchbox {
    /* visibility:visible; */
    display: none;
  }
  #my-sub-menu {
    flex-direction: row;
  }

  #mydiv-mysub-menu-login .navbar-nav {
    flex-direction: row;
    text-align: right;
  }

  #mydiv-mysub-menu-login .navbar-nav .menu-item {
    padding-left: 8px;
  }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1200px) {
  /* .lg {color:red;font-weight:bold;} */
  .post-thumbnail img {
    max-width: 350px;
  }

  #divSinglePage_RightSide img {
    max-width: 350px;
  }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  /* .xl {color:red;font-weight:bold;} */
  .post-thumbnail img {
    max-width: 350px;
  }

  #divSinglePage_RightSide img {
    max-width: 350px;
  }
}

/* CSS */
.my-advance-buttons {
  padding-top: 5px;
  padding-bottom: 5px;
}

.container-button {
  display: flex; /* Use flexbox to align divs */
}

.b1,
.b2,
.b3 {
  margin-right: 13px; /* Adjust spacing between divs */
}

.button-53 {
  background-color: #3dd1e7;
  border: 0 solid #e5e7eb;
  box-sizing: border-box;
  color: #000000;
  display: flex;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    system-ui,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    "Noto Sans",
    sans-serif,
    "Apple Color Emoji",
    "Segoe UI Emoji",
    "Segoe UI Symbol",
    "Noto Color Emoji";
  font-size: 1rem;
  font-weight: 700;
  justify-content: center;
  line-height: 1.3rem;
  padding: 0.45rem 0.85rem;
  position: relative;
  text-align: center;
  text-decoration: none #000000 solid;
  text-decoration-thickness: auto;
  /* width: 100%; */
  width: 80px;

  cursor: pointer;
  transform: rotate(-2deg);
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.button-53-room {
  background-color: #b8e4fc;
}

.button-53-house {
  background-color: #fdd3ae;
}

.button-53-job {
  background-color: #82e0a8;
}

.button-53:focus {
  outline: 0;
}

.button-53:after {
  content: "";
  position: absolute;
  border: 1px solid #000000;
  bottom: 4px;
  left: 4px;
  width: calc(100% - 1px);
  height: calc(100% - 1px);
}

.button-53:hover:after {
  bottom: 2px;
  left: 2px;
}

/* @media (min-width: 768px) {
  .button-53 {
    padding: .75rem 3rem;
  }
} */

/* Update 2025-10-01 */
.my-img-shadow-border {
  border: 2px solid #ccc; /* viền xám nhạt */
  border-radius: 8px; /* bo góc */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25); /* đổ bóng */
  padding: 4px; /* khoảng cách viền */
  display: inline-block; /* tránh ảnh dính sát text */
}

/* Container tổng */
.post-container {
  font-family: "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: #333;
  max-width: 100%;
}

/* Thông tin chi tiết */
.post-detail-box {
  background: #f8f9fa;
  border-left: 4px solid #007bff;
  padding: 15px;
  margin: 20px 0;
  border-radius: 4px;
}

.post-detail-box h3 {
  margin-top: 0;
  font-size: 1.1rem;
  color: #007bff;
}

.detail-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(200px, 1fr)
  ); /* Tự động chia cột trên PC, xuống dòng trên Mobile */
  gap: 10px;
}

/* Container & Nội dung chính */
.post-container {
  max-width: 100%;
  line-height: 1.6;
  color: #2d3436;
}
.post-main-content {
  margin-bottom: 25px;
  font-size: 16px;
}

/* Box Thông tin chi tiết */
.post-detail-box {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 25px;
  border: 1px solid #e9ecef;
}
.post-detail-box h3 {
  margin-top: 0;
  font-size: 18px;
  color: #2d3436;
  border-bottom: 2px solid #dee2e6;
  padding-bottom: 10px;
  margin-bottom: 15px;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.detail-item {
  padding: 8px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Box VIP Notice */
.cdm-vip-notice {
  background: #fffcf0;
  border: 2px dashed #f39c12;
  border-radius: 12px;
  margin: 30px 0;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(243, 156, 18, 0.1);
}
.cdm-notice-header {
  background: linear-gradient(90deg, #f39c12, #e67e22);
  color: white;
  padding: 10px 15px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 10px;
}
.cdm-notice-body {
  padding: 15px;
}
.cdm-quote {
  display: block;
  font-size: 1.1rem;
  color: #d35400;
  margin: 10px 0;
  padding: 12px;
  background: white;
  border-radius: 8px;
  border-left: 5px solid #f39c12;
}
.cdm-benefit-list {
  list-style: none;
  padding: 0;
  margin-top: 15px;
}
.cdm-benefit-list li {
  font-size: 14px;
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.cdm-benefit-list i {
  color: #27ae60;
  margin-top: 3px;
}

/* Facebook Section */
.fb-community-section {
  background: #ffffff;
  border: 1px solid #e1e4e8;
  border-radius: 16px;
  padding: 20px;
  margin-top: 35px;
}
.fb-section-title {
  text-align: center;
  margin-bottom: 20px;
}
.fb-section-title h4 {
  margin: 5px 0;
  color: #1a202c;
  font-weight: 800;
}
.fb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 15px;
}
.fb-card-new {
  text-decoration: none !important;
  border-radius: 12px;
  transition: all 0.3s ease;
  border: 1px solid transparent;
  display: block;
}
.fb-card-body {
  display: flex;
  align-items: center;
  padding: 15px;
  gap: 15px;
}
.fb-icon-wrap {
  font-size: 28px;
  flex-shrink: 0;
}
.fb-text {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}
.tag-location {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.group-name {
  font-size: 15px;
  font-weight: bold;
  color: #1a202c;
}
.group-desc {
  font-size: 12px;
  color: #718096;
}
.fb-usa {
  background: #f0f7ff;
  border-color: #bee3f8;
}
.fb-usa i,
.fb-usa .tag-location {
  color: #3182ce;
}
.fb-dfw {
  background: #f0fff4;
  border-color: #c6f6d5;
}
.fb-dfw i,
.fb-dfw .tag-location {
  color: #38a169;
}

/* Hiệu ứng & Mobile */
.pulse-icon {
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}
.fb-card-new:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Ngăn chặn quảng cáo chèn vào giữa vùng này */
.google-anno-skip {
  position: relative;
  clear: both;
}

/* Các thẻ trực tiếp bên trong vùng an toàn sẽ không cho phép chèn quảng cáo sau chúng */
.google-anno-skip > div {
  margin-bottom: 20px;
  page-break-inside: avoid; /* Hỗ trợ ngăn ngắt quãng nội dung */
  break-inside: avoid;
}

/* Ẩn các khối quảng cáo tự động nếu chúng cố tình chèn vào trong Box Mẹo Nhỏ */
.cdm-vip-notice ins,
.cdm-vip-notice .adsbygoogle,
.fb-community-section ins {
  display: none !important;
  height: 0 !important;
  visibility: hidden !important;
}

/* Giữ nguyên các Style trước đó của bạn... */
.cdm-vip-notice {
  display: block;
  overflow: hidden;
  /* Đảm bảo nội dung luôn liền mạch */
}

/* Triệt tiêu các thẻ thừa do WordPress tự chèn vào Grid */
.fb-grid > p,
.fb-grid > br {
  display: none !important;
}

/* Đảm bảo nội dung chính và box của Andy cách nhau đẹp */
.post-main-content {
  margin-bottom: 25px;
}

@media (max-width: 600px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .fb-section-title h4 {
    font-size: 16px;
  }
  .cdm-quote {
    font-size: 15px;
  }
}

/* ==========================================================
   CDM Front Page Speed 5.4.4
   Responsive category navigation: no horizontal scrolling.
   ========================================================== */
.cdm-frontpage-category-nav {
    width: 100%;
    margin: 0 0 22px;
    padding: 16px;
    border: 1px solid #e9ecef;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 3px 16px rgba(0,0,0,.045);
    box-sizing: border-box;
}

.cdm-frontpage-category-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.cdm-frontpage-category-kicker {
    display: block;
    margin-bottom: 2px;
    font-size: 10px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: .14em;
    color: #dc3545;
}

.cdm-frontpage-category-heading h2 {
    margin: 0;
    font-size: 20px;
    line-height: 1.25;
    font-weight: 800;
    color: #212529;
}

.cdm-frontpage-category-hint {
    font-size: 12px;
    color: #6c757d;
    white-space: nowrap;
}

.cdm-frontpage-category-group {
    width: 100%;
}

.cdm-frontpage-category-group + .cdm-frontpage-category-group {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #f0f1f3;
}

.cdm-frontpage-category-group-title {
    margin: 0 0 8px;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 800;
    color: #495057;
}

.cdm-frontpage-category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
}

.cdm-frontpage-category-btn {
    position: relative;
    width: 100%;
    min-width: 0;
    min-height: 62px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 11px;
    border: 1px solid #e1e5e9;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    color: #343a40;
    border-radius: 11px;
    padding: 8px 10px;
    font-size: 13px;
    line-height: 1.25;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, opacity .15s ease, transform .15s ease;
}

.cdm-frontpage-category-icon {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: #f1f3f5;
    color: #495057;
    font-size: 25px;
    line-height: 1;
    transition: background-color .15s ease, color .15s ease, transform .15s ease;
}

.cdm-frontpage-category-label {
    min-width: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    word-break: break-word;
}

.cdm-frontpage-category-btn:hover {
    border-color: #dc3545;
    color: #dc3545;
    background: #fff;
}

.cdm-frontpage-category-btn:hover .cdm-frontpage-category-icon {
    background: #fff0f2;
    color: #dc3545;
    transform: translateY(-1px);
}

.cdm-frontpage-category-btn:hover,
.cdm-frontpage-category-btn.is-active {
    box-shadow: 0 2px 8px rgba(220,53,69,.12);
}

.cdm-frontpage-category-btn.is-active {
    border-color: #dc3545;
    background: #dc3545;
    color: #fff;
}

.cdm-frontpage-category-btn.is-active .cdm-frontpage-category-icon {
    background: rgba(255,255,255,.18);
    color: #fff;
}

.cdm-frontpage-category-btn:disabled {
    cursor: wait;
    opacity: .65;
}

.cdm-frontpage-category-btn.is-loading::after {
    content: ' …';
}

.cdm-frontpage-category-secondary-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.cdm-frontpage-category-secondary-head .cdm-frontpage-category-group-title {
    margin-bottom: 0;
}

.cdm-frontpage-category-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: #dc3545;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid #f0c7cc;
    border-radius: 8px;
    background: #fff7f8;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 800;
    cursor: pointer;
}

.cdm-frontpage-category-toggle-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-size: 14px;
    line-height: 1;
}

.cdm-frontpage-category-toggle[aria-expanded="true"] .cdm-frontpage-category-toggle-icon {
    transform: rotate(45deg);
}

.cdm-frontpage-category-results {
    position: relative;
    width: 100%;
    min-height: 20px;
    transition: opacity .15s ease;
}

.cdm-frontpage-category-results.is-loading {
    opacity: .72;
}

.cdm-frontpage-empty,
.cdm-frontpage-error {
    width: 100%;
    padding: 18px;
    margin: 10px 0 20px;
    border-radius: 8px;
    background: #f8f9fa;
    text-align: center;
    box-sizing: border-box;
}

.cdm-frontpage-error {
    color: #dc3545;
}

.post-thumbnail img.card-img-top {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
}

/* =========================================================
   CDM Front Page: responsive post grid + automatic loading
   ========================================================= */
.cdm-frontpage-post-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
    align-items: stretch;
}

.cdm-frontpage-post-grid > article {
    width: auto !important;
    max-width: none !important;
    min-width: 0;
    margin: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    display: flex;
}

.cdm-frontpage-post-grid > article > .card {
    width: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.cdm-frontpage-post-grid .card-body {
    flex: 1 1 auto;
}

.cdm-frontpage-post-grid .post-thumbnail {
    width: 100%;
    aspect-ratio: 3 / 2;
    overflow: hidden;
}

.cdm-frontpage-post-grid .post-thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none !important;
    object-fit: cover;
}

.cdm-frontpage-load-sentinel {
    width: 100%;
    height: 1px;
    margin: 0;
    padding: 0;
}

.cdm-frontpage-category-results .cdm-ajax-category-title {
    grid-column: 1 / -1;
}

@media (max-width: 1199.98px) {
    .cdm-frontpage-category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .cdm-frontpage-post-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .cdm-frontpage-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cdm-frontpage-post-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* The secondary category panel is intentionally collapsed on both desktop and mobile.
   The toggle button controls the native [hidden] state so the same interaction works
   consistently across screen sizes. */

@media (max-width: 767.98px) {
    .cdm-frontpage-category-nav {
        margin-bottom: 18px;
        padding: 13px;
        border-radius: 12px;
    }

    .cdm-frontpage-category-heading {
        align-items: flex-start;
        margin-bottom: 12px;
    }

    .cdm-frontpage-category-heading h2 {
        font-size: 18px;
    }

    .cdm-frontpage-category-hint {
        display: none;
    }

    .cdm-frontpage-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .cdm-frontpage-category-btn {
        min-height: 44px;
        padding: 8px 7px;
        font-size: 12px;
        border-radius: 9px;
    }

    .cdm-frontpage-category-group + .cdm-frontpage-category-group {
        margin-top: 13px;
        padding-top: 12px;
    }

    .cdm-frontpage-post-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

@media (max-width: 767.98px) {
    .cdm-frontpage-category-btn {
        gap: 9px;
        min-height: 58px;
        padding: 8px 9px;
    }

    .cdm-frontpage-category-icon {
        flex-basis: 38px;
        width: 38px;
        height: 38px;
        border-radius: 10px;
        font-size: 22px;
    }

    .cdm-frontpage-category-label {
        font-size: 12.5px;
    }
}

@media (max-width: 360px) {
    .cdm-frontpage-category-nav {
        padding: 10px;
    }

    .cdm-frontpage-category-btn {
        min-height: 52px;
        font-size: 11.5px;
    }

    .cdm-frontpage-category-toggle-label {
        max-width: 135px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}


/* =========================================================
   CDM Front Page: sponsored/ad grid inserted per load batch
   Tag: cdm-quang-cao (configurable with cdm_frontpage_ad_tag_slug)
   ========================================================= */
.cdm-frontpage-ad-card {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    margin: 8px 0 10px;
    padding: 12px;
    box-sizing: border-box;
    border: 1px solid #ead9dc;
    border-radius: 16px;
    background: linear-gradient(145deg, #fff8f9 0%, #ffffff 52%, #fffdfd 100%);
    box-shadow: 0 5px 18px rgba(120, 30, 45, .08);
    overflow: hidden;
    position: relative;
}

.cdm-frontpage-ad-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: #dc3545;
}

.cdm-frontpage-ad-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 11px;
    padding: 0 2px 10px 4px;
    border-bottom: 1px solid #f0dfe2;
}

.cdm-frontpage-ad-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.cdm-frontpage-ad-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
    padding: 5px 8px;
    border-radius: 999px;
    background: #dc3545;
    color: #fff;
    font-size: 9px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: .06em;
}

.cdm-frontpage-ad-badge .material-icons {
    font-size: 14px;
}

.cdm-frontpage-ad-heading-text {
    min-width: 0;
    color: #343a40;
    font-size: 13px;
    line-height: 1.25;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cdm-frontpage-ad-count {
    flex: 0 0 auto;
    color: #8a5a61;
    font-size: 10px;
    line-height: 1.2;
    font-weight: 700;
}

.cdm-frontpage-ad-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
}

.cdm-frontpage-ad-item {
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #eee2e4;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 9px rgba(0,0,0,.035);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.cdm-frontpage-ad-item:hover {
    transform: translateY(-2px);
    border-color: #e7b9bf;
    box-shadow: 0 7px 18px rgba(120, 30, 45, .10);
}

.cdm-frontpage-ad-media {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f5f5f5;
}

.cdm-frontpage-ad-image {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none !important;
    object-fit: cover;
    transition: transform .2s ease;
}

.cdm-frontpage-ad-item:hover .cdm-frontpage-ad-image {
    transform: scale(1.025);
}

.cdm-frontpage-ad-content {
    min-width: 0;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 9px 10px 10px;
}

.cdm-frontpage-ad-title {
    margin: 0 0 5px;
    font-size: 14px;
    line-height: 1.32;
    font-weight: 800;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.cdm-frontpage-ad-title a {
    color: #212529;
    text-decoration: none;
}

.cdm-frontpage-ad-title a:hover {
    color: #dc3545;
}

.cdm-frontpage-ad-excerpt {
    color: #6c757d;
    font-size: 11.5px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.cdm-frontpage-ad-link {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
    width: 100%;
    margin-top: auto;
    padding-top: 8px;
    color: #dc3545;
    font-size: 11px;
    line-height: 1.2;
    font-weight: 900;
    text-decoration: none;
}

.cdm-frontpage-ad-link:hover {
    text-decoration: underline;
}

@media (max-width: 1199.98px) {
    .cdm-frontpage-ad-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .cdm-frontpage-ad-card {
        margin: 6px 0 8px;
        padding: 9px;
        border-radius: 13px;
    }

    .cdm-frontpage-ad-header {
        align-items: flex-start;
        gap: 7px;
        margin-bottom: 8px;
        padding-bottom: 8px;
    }

    .cdm-frontpage-ad-heading {
        gap: 6px;
    }

    .cdm-frontpage-ad-badge {
        padding: 4px 6px;
        font-size: 8px;
    }

    .cdm-frontpage-ad-badge .material-icons {
        font-size: 13px;
    }

    .cdm-frontpage-ad-heading-text {
        font-size: 11px;
    }

    .cdm-frontpage-ad-count {
        display: none;
    }

    .cdm-frontpage-ad-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .cdm-frontpage-ad-item {
        border-radius: 9px;
    }

    .cdm-frontpage-ad-content {
        padding: 7px 8px 8px;
    }

    .cdm-frontpage-ad-title {
        font-size: 12px;
        line-height: 1.3;
        margin-bottom: 3px;
    }

    .cdm-frontpage-ad-excerpt {
        font-size: 10px;
        line-height: 1.35;
        -webkit-line-clamp: 2;
    }

    .cdm-frontpage-ad-link {
        padding-top: 6px;
        font-size: 10px;
    }
}

@media (max-width: 380px) {
    .cdm-frontpage-ad-grid {
        gap: 6px;
    }

    .cdm-frontpage-ad-content {
        padding: 6px 7px 7px;
    }

    .cdm-frontpage-ad-title {
        font-size: 11px;
    }

    .cdm-frontpage-ad-excerpt {
        font-size: 9.5px;
    }

    .cdm-frontpage-ad-link {
        font-size: 9.5px;
    }
}
