html, body,
body * {
/*   font-family: "Kanit", sans-serif !important; */
}

h1, h2, h3, h4, h5, h6,
span,
p,
ul, ol, li {
  font-family: "Kanit", sans-serif !important;
}

.menu-item-342 .sub-menu {
  background-color: var(--e-global-color-primary); !important;  /* <-- Change to any color */
  padding: 10px 0;
  z-index: 9999;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Optional: style submenu links */
.menu-item-342 .sub-menu li a {
  color: #ffffff !important;
  padding: 8px 16px;
  display: block;
}

/* Optional: hover effect */
.menu-item-342 .sub-menu li a:hover {
  background-color: var(--e-global-color-secondary);;
  color: #ffffff;
}

/* 1) Make the grid exactly 3 columns on desktop, 2 on tablet, 1 on mobile */
.my-post-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5em;
  align-items: stretch;      /* ensure children stretch to fill row height */
  grid-auto-rows: 1fr;       /* make every row track equal height */
}
@media (max-width: 1023px) and (min-width: 768px) {
  .my-post-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  .my-post-list { grid-template-columns: 1fr; gap: 1em; }
}

/* 2) Ensure the shortcode wrapper can span full width of its column */
.elementor-shortcode,
.elementor-shortcode .my-post-list {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* 3) Your card styling remains */
.my-post-list .listing-item {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}

/* 4) Image zoom on hover */
.my-post-list .listing-item .image {
  overflow: hidden;
}
.my-post-list .listing-item .image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.my-post-list .listing-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.my-post-list .listing-item:hover .image img {
  transform: scale(1.1);
}

/* 5) Bold title on its own line */
.my-post-list .listing-item .title {
  font-weight: bold;
  font-size: 1.1rem;
  margin: 1em;
  color: #333;
  text-decoration: none;
}

/* 6) Clamp the excerpt to 3 lines to keep all cards a similar height */
.my-post-list .listing-item .excerpt {
  margin: 0 1em 1em;
  font-size: 0.95rem;
  color: #555;
  display: -webkit-box;
  -webkit-line-clamp: 3;        /* show only 3 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 7) Hide the dash separator */
.my-post-list .listing-item .excerpt-dash {
  display: none;
}