/* ---------------------------------
   Standard post card carousels
--------------------------------- */

/* Widget viewport */
.post-card-carousel {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

.post-card-carousel > .elementor-widget-container,
.post-card-carousel .theme-news-post-block-wrapper {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
}

/* The second row contains the cards */
.post-card-carousel
.theme-news-post-block-wrapper
> .row:nth-child(2) {
  display: flex !important;
  flex-wrap: nowrap !important;
  justify-content: flex-start !important;
  align-items: stretch !important;
  gap: 24px !important;

  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;

  margin: 0 !important;
  padding: 0 24px 4px 0 !important;

  overflow-x: auto !important;
  overflow-y: hidden !important;
  touch-action: pan-x !important;
  scroll-behavior: smooth !important;
  scroll-snap-type: x proximity !important;
  -webkit-overflow-scrolling: touch !important;

  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.post-card-carousel
.theme-news-post-block-wrapper
> .row:nth-child(2)::-webkit-scrollbar {
  display: none !important;
}


.theme-news-post-block-wrapper.theme-post-grid-style.theme-post-grid-design-one > .row:nth-of-type(2) .grid-style-one-inner {
  padding-right: 0px !important;
}

@media (min-width: 768px) {
  .post-card-carousel
  .theme-news-post-block-wrapper
  > .row:nth-child(2)
  > .col-lg-4 {
    display: block !important;
    float: none !important;
    position: relative !important;
    box-sizing: border-box !important;

    flex: 0 0 clamp(360px, 32vw, 500px) !important;
    width: clamp(360px, 32vw, 500px) !important;
    min-width: clamp(360px, 32vw, 500px) !important;
    max-width: clamp(360px, 32vw, 500px) !important;

    /* Add horizontal gap */
    margin: 0 !important;
    padding-left: 0px !important;
    padding-right: 0px !important;
  }

  .post-card-carousel .theme-news-post-block-wrapper > .row:nth-child(2) {
    margin-left: 0px !important;
    margin-right: 0px !important;
    gap: 20px !important;
  }

  .post-card-carousel .theme-news-post-block-wrapper > .row:nth-child(2) > .col-lg-4 {
    padding-left: 0px !important;
    padding-right: 0px !important;
  }
}

/* Image area */
.post-card-carousel .theme-news-post-block-wrapper > .row:nth-child(2) .news-post-grid-thumbnail {
  width: 100% !important;
  height: 320px !important;
  overflow: hidden !important;
}

.post-card-carousel .theme-news-post-block-wrapper > .row:nth-child(2) > .col-lg-4 > .grid-style-one-inner {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  margin: 0 !important;
}

.post-card-carousel .theme-news-post-block-wrapper > .row:nth-child(2) .news-post-grid-thumbnail-wrap,
.post-card-carousel .theme-news-post-block-wrapper > .row:nth-child(2) .news-post-grid-thumbnail img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
}

.post-card-carousel .theme-news-post-block-wrapper > .row:nth-child(2) .news-post-grid-thumbnail img {
  object-fit: cover !important;
  object-position: center center !important;
}

/* Content spacing */
.post-card-carousel .theme-news-post-block-wrapper > .row:nth-child(2) .news-post-grid-content,
.post-card-carousel .theme-news-post-block-wrapper > .row:nth-child(2) .post-excerpt-box {
  flex: 1 1 auto !important;
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

/* Optional: ensure the right column behaves normally */
.col-lg-3 {
  width: auto;
 flex: 0 0 auto;
}

/* ---------------------------------
   Mobile: stack carousel cards vertically
--------------------------------- */

@media (max-width: 767px) {
  /* Stack carousel cards vertically on mobile */
  .post-card-carousel .theme-news-post-block-wrapper > .row:nth-child(2) {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 28px !important;

    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;

    overflow-x: visible !important;
    overflow-y: visible !important;
    scroll-snap-type: none !important;
    touch-action: auto !important;
  }

  .post-card-carousel .theme-news-post-block-wrapper > .row:nth-child(2) > .col-lg-4 {
    display: block !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .post-card-carousel .theme-news-post-block-wrapper > .row:nth-child(2) > .col-lg-4 > .grid-style-one-inner {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-width: none !important;
    margin: 0 !important;
  }

  /* Ensure the second row cards are not narrower than the first */
  .post-card-carousel,
  .post-card-carousel .theme-news-post-block-wrapper,
  .post-card-carousel .theme-news-post-block-wrapper > .row:nth-child(2),
  .post-card-carousel .theme-news-post-block-wrapper > .row:nth-child(2) > .col-lg-4,
  .post-card-carousel .theme-news-post-block-wrapper > .row:nth-child(2) > .col-lg-4 > .grid-style-one-inner {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Keep images aligned to full width */
  .post-card-carousel .theme-news-post-block-wrapper > .row:nth-child(2) .news-post-grid-thumbnail,
  .post-card-carousel .theme-news-post-block-wrapper > .row:nth-child(2) .news-post-grid-thumbnail-wrap {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Thumbnail full-width */
  .post-card-carousel .theme-news-post-block-wrapper > .row:nth-child(2) .news-post-grid-thumbnail {
    width: 100% !important;
    height: 240px !important;
    overflow: hidden !important;
  }

  .post-card-carousel .theme-news-post-block-wrapper > .row:nth-child(2) .news-post-grid-thumbnail img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  /* CONTENT full-width under the image */
  .post-card-carousel .theme-news-post-block-wrapper > .row:nth-child(2) .news-post-grid-content {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .post-card-carousel,
  .post-card-carousel .theme-news-post-block-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow: visible !important;
  }

  /* Ensure all post-card-carousel widgets inside are full-width */
  .elementor-element-933ab81 .post-card-carousel,
  .elementor-element-933ab81 .post-card-carousel > .elementor-widget-container,
  .elementor-element-933ab81 .post-card-carousel .theme-news-post-block-wrapper,
  .elementor-element-933ab81 .post-card-carousel .theme-news-post-block-wrapper > .row,
  .elementor-element-933ab81 .post-card-carousel .theme-news-post-block-wrapper > .row:nth-child(2),
  .elementor-element-933ab81 .post-card-carousel .theme-news-post-block-wrapper > .row:nth-child(2) > .col-lg-4,
  .elementor-element-933ab81 .post-card-carousel .theme-news-post-block-wrapper > .row:nth-child(2) > .col-lg-4 > .grid-style-one-inner {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .elementor-element.elementor-element-559ec4d.e-flex.e-con-boxed.e-con.e-child {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}
