
/* ==========================================================================
   Travel Rethink Ways – Brand Story cards
   Tailwind layout re-created as plain CSS for the JNews (WordPress) markup.
   Breakpoints match Tailwind:  md = 768px,  lg = 1024px
   Add in: Appearance > Customize > Additional CSS (or child-theme style.css)
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&family=Yeseva+One&display=swap");

/* ---------- Grid (mt-5 grid grid-cols-1 gap-[30px] md:grid-cols-2 lg:grid-cols-3) ---------- */
.jnews_category_content_wrapper .jeg_postblock .jeg_posts {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 30px;
  margin: 20px 0 0;          /* mt-5 */
  padding: 0;
}

@media (min-width: 768px) {
  .jnews_category_content_wrapper .jeg_postblock .jeg_posts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .jnews_category_content_wrapper .jeg_postblock .jeg_posts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- Card (article) ---------- */
.jnews_category_content_wrapper .jeg_postblock .jeg_posts > .jeg_post {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  float: none;
  margin: 0;
  padding: 18px;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background-color: #f8f9fa;
  content-visibility: auto;
  contain-intrinsic-size: 460px;
  transition: background-color .3s, color .3s, transform .3s;
}

.trw-dark-mode .jnews_category_content_wrapper .jeg_postblock .jeg_posts > .jeg_post {
  border: 1px solid #2a2d31;
  background-color: #1d1f22;
}

/* Things the Tailwind card does not show */
.jnews_category_content_wrapper .jeg_post .jnews-edit-post,
.jnews_category_content_wrapper .jeg_post .jeg_post_meta,
.jnews_category_content_wrapper .jeg_post .jeg_post_excerpt > p {
  display: none !important;
}

/* ---------- Image wrapper (aspect-[1.38], rounded-[20px], mb-4) ---------- */
.jnews_category_content_wrapper .jeg_post .jeg_thumb {
  position: relative;
  float: none;
  width: 100%;
  margin: 0 0 16px;
  aspect-ratio: 1.38;
  overflow: hidden;
  border-radius: 20px;
  background-color: #fff;
}

.trw-dark-mode .jnews_category_content_wrapper .jeg_post .jeg_thumb {
  background-color: #1d1f22;
}

.jnews_category_content_wrapper .jeg_post .jeg_thumb > a:not(.jnews-edit-post) {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.jnews_category_content_wrapper .jeg_post .jeg_thumb .thumbnail-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding-bottom: 0 !important;
}

.jnews_category_content_wrapper .jeg_post .jeg_thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  border-radius: 20px;
  object-fit: cover;
  object-position: left top;
  opacity: 1;
  transition: opacity .18s;
}

/* ---------- Red category badge (absolute left-[14px] top-0) ----------
   Card padding is 18px, so badge sits at 18px top / 18+14 = 32px left */
.jnews_category_content_wrapper .jeg_post .jeg_post_category {
  position: absolute;
  top: 18px;
  left: 32px;
  z-index: 2;
  margin: 0;
  padding: 0;
}

.jnews_category_content_wrapper .jeg_post .jeg_post_category span {
  display: block;
  margin: 0;
  padding: 0;
}

.jnews_category_content_wrapper .jeg_post .jeg_post_category a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  background-color: #d02525;
  color: #fff;
  font-family: "Poppins", sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 12px;
  text-transform: uppercase;
  text-decoration: none;
}

/* ---------- Content column (flex-1 flex-col gap-4 pt-4 text-center md:text-left) ---------- */
.jnews_category_content_wrapper .jeg_post .jeg_postblock_content {
  display: flex;
  flex: 1 1 0%;
  flex-direction: column;
  gap: 16px;
  margin: 0;
  padding: 16px 0 0;
  text-align: center;
}

@media (min-width: 768px) {
  .jnews_category_content_wrapper .jeg_post .jeg_postblock_content {
    text-align: left;
  }
}

/* ---------- Title (18px mobile -> 26px md+, Poppins -> Yeseva One) ---------- */
.jnews_category_content_wrapper .jeg_post .jeg_post_title {
  margin: 0;
  padding: 0;
  font-family: "Poppins", sans-serif;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: normal;
}

.jnews_category_content_wrapper .jeg_post .jeg_post_title a {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  color: #000;
  text-decoration: none;
  transition: color .2s;
}

.jnews_category_content_wrapper .jeg_post:hover .jeg_post_title a {
  color: #dc2626;               /* group-hover:text-red-600 */
}

.trw-dark-mode .jnews_category_content_wrapper .jeg_post .jeg_post_title a {
  color: #f8fafc;
}

.trw-dark-mode .jnews_category_content_wrapper .jeg_post:hover .jeg_post_title a {
  color: #dc2626;
}

@media (min-width: 768px) {
  .jnews_category_content_wrapper .jeg_post .jeg_post_title {
    font-family: "Yeseva One", serif;
    font-size: 26px;
    font-weight: 400;
    line-height: 35px;
  }
}

/* ---------- Excerpt wrapper only holds the button now ---------- */
.jnews_category_content_wrapper .jeg_post .jeg_post_excerpt {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  margin: 0;
  padding: 0;
}

/* ---------- READ MORE pill button ---------- */
.jnews_category_content_wrapper .jeg_post .jeg_readmore {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: auto auto 0;          /* mt-auto mx-auto */
  padding: 10px 24px;
  border: 2px solid #d02525;
  border-radius: 9999px;
  background-color: #d02525;
  color: #fff;
  font-family: "Poppins", sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .04em;
  line-height: 1.5;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color .2s;
}

.jnews_category_content_wrapper .jeg_post:hover .jeg_readmore {
  background-color: #000;       /* group-hover:bg-black */
}

@media (min-width: 768px) {
  .jnews_category_content_wrapper .jeg_post .jeg_readmore {
    margin-left: auto;          /* md:ml-auto md:mr-0 -> button on the right */
    margin-right: 0;
  }
}

/* Arrow: replace the Material icon text with the same SVG arrow Tailwind used.
   Rotated -45deg, straightens to 0deg on card hover. */
.jnews_category_content_wrapper .jeg_post .jeg_readmore .arrow {
  order: -1;                    /* arrow before the text */
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  overflow: hidden;
  font-size: 0;
  line-height: 0;
  color: transparent;
  background-color: currentColor;
  -webkit-mask: var(--trw-arrow) center / contain no-repeat;
          mask: var(--trw-arrow) center / contain no-repeat;
  transform: rotate(-45deg);
  transition: transform .3s;
  --trw-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 105 86'%3E%3Cpath d='M74.98 50.91 8 50.86c-2.92 0-5.23-2.27-5.41-5.09-.11-1.82-.11-3.63-.03-5.46.13-2.9 2.48-5.05 5.45-5.05l66.74-.03-20.81-20.93c-2.31-2.32-2.32-5.79-.02-8.08l2.92-2.94c2.33-2.34 5.78-2.36 8.15.01L100.86 39c2.17 2.17 2.18 5.61 0 7.79L64.99 82.67c-2.26 2.26-5.66 2.43-7.94.19l-3.35-3.29c-2.09-2.35-2.02-5.67.3-7.85l20.96-20.97Z'/%3E%3C/svg%3E");
}

.jnews_category_content_wrapper .jeg_post .jeg_readmore .arrow,
.jnews_category_content_wrapper .jeg_post .jeg_readmore .arrow::before {
  color: #fff;
}

.jnews_category_content_wrapper .jeg_post:hover .jeg_readmore .arrow {
  transform: rotate(0deg);
}