/**
 * Logicrays Loop Builder — Stylesheet
 *
 * @package Logicrays_Loop_Builder_For_Elementor
 */

/* ==========================================================================
   CSS Custom Properties
   ========================================================================== */

:root {
  --llbe-primary: #0073aa;
  --llbe-primary-hover: #005d8c;
  --llbe-text: #333333;
  --llbe-muted: #767676;
  --llbe-border: #e0e0e0;
  --llbe-radius: 6px;
  --llbe-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --llbe-transition: 0.2s ease;
  --llbe-card-bg: #ffffff;
  --llbe-card-padding: 20px;
  --llbe-gap: 24px;
  --llbe-filter-btn-bg: #f0f0f0;
  --llbe-spinner-color: #0073aa;
}

/* ==========================================================================
   Loop Grid / List Containers
   ========================================================================== */
body .llbe-loop-wrapper-custom a {
  text-decoration: none;
}

.llbe-loop-wrapper {
  position: relative;
  width: 100%;
  margin: 30px 0;
}

.llbe-loop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--llbe-gap);
  width: 100%;
}

.llbe-loop-list {
  display: flex;
  flex-direction: column;
  gap: var(--llbe-gap);
  width: 100%;
}

/* ==========================================================================
   Post Cards
   ========================================================================== */

.llbe-post-card {
  background-color: var(--llbe-card-bg);
  border-radius: var(--llbe-radius);
  box-shadow: var(--llbe-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--llbe-transition);
}

/* List card — horizontal */
.llbe-post-card--list {
  flex-direction: row;
}

.llbe-post-card--list .llbe-post-card__thumbnail {
  flex: 0 0 280px;
  max-width: 280px;
}

/* --- Thumbnail --- */
.llbe-post-card__thumbnail {
  overflow: hidden;
  background-color: var(--llbe-border);
}

.llbe-post-card__thumbnail a {
  display: block;
  height: 100%;
}

body .llbe-loop-wrapper-custom .llbe-post-card__img {
  height: 270px;
}
.llbe-post-card__img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform 0.4s ease;
  /* max-height: 350px;
  min-height: 270px; */
}

html body .llbe-loop-wrapper-custom .llbe-post-card--list .llbe-post-card__img {
  height: 100%;
  min-height: 180px;
}

html
  body
  .llbe-loop-wrapper-custom
  .llbe-post-card--featured-main
  .llbe-post-card__img {
  height: 100%;
}
/* --- Body --- */
.llbe-post-card__body {
  padding: var(--llbe-card-padding);
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* --- Meta (date / author) --- */
.llbe-post-card__meta {
  display: flex;
  align-items: center;
  gap: 5px 13px;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--llbe-muted);
  flex-wrap: wrap;
}

.llbe-post-card__date,
.llbe-post-card__author {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-transform: capitalize;
}

span.llbe-post-card__date {
  position: relative;
  margin-left: 13px;
}

.llbe-post-card__author + .llbe-post-card__date::before {
  content: "|";
  position: absolute;
  left: -13px;
}

.llbe-post-card__date {
  margin-left: 0 !important;
}

.llbe-post-card__author ~ .llbe-post-card__date {
  margin-left: 13px !important;
}

.llbe-post-card__meta svg {
  flex-shrink: 0;
  color: inherit;
  opacity: 0.7;
}

/* --- Title --- */
.llbe-post-card__title {
  font-weight: 500;
  margin: 0 0 4px !important;
  font-size: 16px;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  display: -webkit-box;
}

.llbe-loop-wrapper-custom .llbe-post-card__title a {
  text-decoration: none;
  display: -webkit-box;
}

.llbe-loop-wrapper-custom h3.llbe-post-card__title a {
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.llbe-post-card__title a {
  color: var(--llbe-text);
}

.llbe-post-card__title a:hover {
  color: var(--llbe-primary);
}

/* --- Excerpt --- */
.llbe-post-card__excerpt {
  color: var(--llbe-muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 14px;
  /* flex: 1; */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Term Badges --- */
.llbe-post-card__terms {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

body .llbe-loop-wrapper-custom .llbe-term-badge {
  text-decoration: none;
}

.llbe-term-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--llbe-border);
  font-size: 12px;
  font-weight: 500;
  transition: opacity var(--llbe-transition);
}

.llbe-term-badge--cat {
  background-color: #e8f4fd;
  color: #0073aa;
  text-transform: capitalize;
}

.llbe-term-badge--tag {
  background-color: #f0f0f0;
  color: var(--llbe-muted);
}

.llbe-term-badge:hover {
  opacity: 0.8;
  color: var(--llbe-primary-hover);
}

/* --- Read More Button --- */

body .llbe-loop-wrapper-custom .llbe-post-card__readmore {
  text-decoration: none;
}

.llbe-post-card__readmore {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  background-color: transparent;
  color: var(--llbe-primary);
  border-radius: var(--llbe-radius);
  font-size: 14px;
  font-weight: 500;
  align-self: flex-start;
  transition:
    background-color var(--llbe-transition),
    color var(--llbe-transition);
}

.llbe-post-card__readmore:hover {
  color: var(--llbe-primary-hover);
}

.llbe-readmore-arrow {
  flex-shrink: 0;
  transition: transform var(--llbe-transition);
}

.llbe-post-card__readmore:hover .llbe-readmore-arrow {
  transform: translateX(3px);
}

.llbe-post-card__readmore svg {
  width: 20px;
}

/* ==========================================================================
   Loading States
   ========================================================================== */

.llbe-posts-container.llbe-loading {
  opacity: 0.4;
  pointer-events: none;
  transition: opacity var(--llbe-transition);
}

.llbe-spinner {
  display: inline-block;
  width: 28px;
  height: 28px;
  border: 3px solid var(--llbe-border);
  border-top-color: var(--llbe-spinner-color);
  border-radius: 50%;
  animation: llbe-spin 0.7s linear infinite;
}

@keyframes llbe-spin {
  to {
    transform: rotate(360deg);
  }
}

.llbe-infinite-loader {
  text-align: center;
  padding: 24px 0 8px;
}

/* ==========================================================================
   Load More Button
   ========================================================================== */

.llbe-load-more-wrap {
  text-align: center;
  margin-top: 40px;
}

.llbe-load-more-btn {
  display: inline-block;
  padding: 12px 32px;
  background-color: var(--llbe-primary);
  color: #ffffff;
  border: none;
  border-radius: var(--llbe-radius);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition:
    background-color var(--llbe-transition),
    opacity var(--llbe-transition);
}

.llbe-load-more-btn:hover {
  background-color: var(--llbe-primary-hover);
  color: #ffffff;
}

.llbe-load-more-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.llbe-pagination--numbers {
  position: relative;
  z-index: 10;
  margin-top: 40px;
}

/* ==========================================================================
   Numbered Pagination
   ========================================================================== */

.llbe-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 40px;
  position: relative;
  z-index: 10;
  clear: both;
}

.llbe-pagination--numbers .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--llbe-border);
  border-radius: var(--llbe-radius);
  font-size: 14px;
  color: var(--llbe-text);
  text-decoration: none;
  transition:
    background-color var(--llbe-transition),
    border-color var(--llbe-transition),
    color var(--llbe-transition);
  cursor: pointer;
}

.llbe-pagination--numbers a.page-numbers:hover {
  background-color: var(--llbe-primary);
  border-color: var(--llbe-primary);
  color: #ffffff;
}

.llbe-pagination--numbers .page-numbers.current {
  background-color: var(--llbe-primary);
  border-color: var(--llbe-primary);
  color: #ffffff;
  cursor: default;
}

.llbe-pagination--numbers .page-numbers.dots {
  border: none;
  background: none;
  cursor: default;
}

.llbe-pagination--numbers .page-numbers.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  color: var(--llbe-muted);
  background-color: #fafafa;
  pointer-events: none;
}

/* ==========================================================================
   No Results
   ========================================================================== */

.llbe-no-results {
  text-align: center;
  color: var(--llbe-muted);
  padding: 48px 0;
  width: 100%;
}

/* ==========================================================================
   Filter Bar
   ========================================================================== */

.llbe-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 12px;
  padding: 16px 0;
  background-color: transparent;
  margin-bottom: 28px;
}

/* --- Search --- */
.llbe-filter-bar__search {
  flex: 1 1 auto;
}

.llbe-loop-wrapper-custom .llbe-filter-bar__search .llbe-search-input {
  border: 1px solid var(--llbe-border);
}

.llbe-search-input {
  width: 100%;
  padding: 9px 14px;
  border-radius: var(--llbe-radius);
  font-size: 14px;
  color: #000;
  background-color: #ffffff;
  height: 40px;
  box-shadow: none;
}

body .llbe-loop-wrapper-custom .llbe-search-input:focus {
  outline: none;
  border: 1px solid var(--llbe-muted);
  border-style: solid;
  border-radius: 0;
}
.llbe-search-input:focus-visible {
  outline: 0;
}
/* --- Taxonomy filter area --- */
.llbe-filter-bar__taxonomy {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.llbe-filter-bar__taxonomy.checkbox,
.llbe-filter-bar__taxonomy.buttons {
  order: 1;
  flex: 0 0 100%;
}

/* Filter buttons */
.llbe-filter-btn {
  padding: 8px 22px;
  background-color: var(--llbe-filter-btn-bg);
  border: 1px solid var(--llbe-border);
  font-size: 14px;
  cursor: pointer;
  transition:
    background-color var(--llbe-transition),
    border-color var(--llbe-transition),
    color var(--llbe-transition);
  color: var(--llbe-text);
  line-height: 1.2;
  border-radius: var(--llbe-radius);
}

.llbe-filter-btn:hover,
.llbe-filter-btn.is-active {
  background-color: var(--llbe-primary);
  border-color: var(--llbe-primary);
  color: #ffffff;
}

.llbe-filter-btn__count {
  opacity: 0.75;
  font-size: 12px;
  margin-left: 2px;
}

/* Filter dropdown / sort */
.llbe-filter-select,
.llbe-sort-select {
  padding: 9px 36px 9px 14px;
  border: 1px solid var(--llbe-border);
  border-radius: var(--llbe-radius);
  font-size: 14px;
  color: var(--llbe-text);
  background-color: #ffffff;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23767676' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
  min-width: 160px;
  height: 40px;
  transition: border-color var(--llbe-transition);
}

.llbe-filter-select:focus,
.llbe-sort-select:focus {
  outline: none;
  border-color: var(--llbe-muted);
  border-radius: 6px;
}
select.llbe-sort-select.is-open,
select.llbe-filter-select.is-open {
  border-radius: 0;
}

.llbe-filter-select option,
.llbe-sort-select option {
  color: var(--llbe-muted);
}

.llbe-filter-select option:hover,
.llbe-sort-select option:hover {
  color: var(--llbe-text);
  background: #e8f4fd;
}

/* --- Checkboxes --- */
.llbe-filter-checkboxes {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.llbe-filter-checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 14px;
  color: var(--llbe-text);
  font-weight: 400;
}

.llbe-filter-checkbox-label:hover {
  color: var(--llbe-muted);
}

.llbe-filter-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--llbe-primary);
  cursor: pointer;
  flex-shrink: 0;
}

.llbe-filter-checkbox__count {
  opacity: 0.6;
  font-size: 12px;
}

/* ==========================================================================
   Range Slider (Rating)
   ========================================================================== */

.llbe-filter-bar__range {
  flex: 1 1 200px;
  padding: 4px 0;
}

.llbe-range-label {
  display: block;
  font-size: 14px;
  color: var(--llbe-text);
  margin-bottom: 10px;
}

.llbe-range-display {
  font-weight: 500;
  color: var(--llbe-primary);
  margin-left: 6px;
}

/* jQuery UI slider overrides */
.llbe-filter-bar__range .ui-slider {
  margin: 0 8px;
}

.llbe-filter-bar__range .ui-slider-horizontal {
  height: 5px;
  background: var(--llbe-border);
  border: none;
  border-radius: 3px;
}

.llbe-filter-bar__range .ui-slider-range {
  background: var(--llbe-primary);
  border-radius: 3px;
}

.llbe-filter-bar__range .ui-slider-handle {
  width: 18px;
  height: 18px;
  background: #ffffff;
  border: 2px solid var(--llbe-primary);
  border-radius: 50%;
  top: -7px;
  cursor: grab;
  transition: box-shadow var(--llbe-transition);
}

.llbe-filter-bar__range .ui-slider-handle:focus,
.llbe-filter-bar__range .ui-slider-handle:active {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.25);
  cursor: grabbing;
}

/* ==========================================================================
   Sort & Reset
   ========================================================================== */

.llbe-filter-bar__sort,
.llbe-filter-bar__reset {
  flex: 0 0 auto;
}

.llbe-reset-btn {
  padding: 9px 18px;
  background-color: transparent;
  border: 1px solid var(--llbe-border);
  border-radius: var(--llbe-radius);
  color: var(--llbe-muted);
  font-size: 14px;
  cursor: pointer;
  transition: all var(--llbe-transition);
  line-height: 24px;
  font-weight: 400;
  height: 40px;
  box-shadow: none;
}

button.llbe-reset-btn {
  background: none;
  color: var(--llbe-muted);
  border: 1px solid var(--llbe-border);
}

button.llbe-reset-btn:focus {
  border-color: var(--llbe-muted);
  background: #fff;
  color: var(--llbe-text);
  border-radius: 0;
}

button.llbe-reset-btn:hover {
  border-color: var(--llbe-border);
  color: var(--llbe-text);
  background: #fff;
}

/* Results count */
.llbe-filter-bar__results-count {
  flex: 0 0 100%;
  font-size: 16px;
  color: var(--llbe-muted);
  order: 2;
}

/* ==========================================================================
   Infinite Scroll Sentinel
   ========================================================================== */

.llbe-infinite-scroll-sentinel {
  height: 1px;
  visibility: hidden;
}

.llbe-error {
  color: #dc3232;
  font-size: 12px;
  margin-top: 4px;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 1024px) {
  .llbe-loop-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .llbe-loop-grid {
    grid-template-columns: 1fr;
  }

  .llbe-post-card--list {
    flex-direction: column;
  }

  .llbe-post-card--list .llbe-post-card__thumbnail {
    flex: none;
    max-width: 100%;
  }

  .llbe-filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .llbe-filter-bar__search,
  .llbe-filter-bar__sort,
  .llbe-filter-bar__reset {
    flex: 1 1 100%;
  }

  .llbe-filter-select,
  .llbe-sort-select {
    width: 100%;
  }

  .llbe-pagination--numbers {
    gap: 4px;
  }
  .llbe-filter-bar__reset {
    order: 2;
  }
}

/* ==========================================================================
   Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .llbe-post-card,
  .llbe-post-card__img,
  .llbe-load-more-btn,
  .llbe-filter-btn,
  .llbe-posts-container,
  .llbe-readmore-arrow {
    transition: none !important;
    animation: none !important;
  }

  .llbe-post-card:hover {
    transform: none;
  }

  .llbe-post-card:hover .llbe-post-card__img {
    transform: none;
  }

  .llbe-post-card__readmore:hover .llbe-readmore-arrow {
    transform: none;
  }
}

/* ==========================================================================
   LLBE – Featured + Grid Layout
   Add this file to your plugin (enqueue it) or paste into
   Elementor > Site Settings > Custom CSS / your theme's style.css
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Featured wrapper
   The outer .llbe-loop-featured is a flex column so the hero sits above
   the sub-grid. Gap is injected by Elementor's gap control selector.
   -------------------------------------------------------------------------- */
.llbe-loop-featured {
  display: flex;
  flex-direction: column;
}

/* --------------------------------------------------------------------------
   2. Hero card  –  image LEFT  /  content RIGHT
   -------------------------------------------------------------------------- */
.llbe-post-card--featured-main {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  background-color: #fff;
  overflow: hidden;
  border-radius: var(--llbe-radius);
}

/* Thumbnail column */
.llbe-post-card--featured-main .llbe-post-card__thumbnail {
  position: relative; /* anchor the absolutely-placed img */
  overflow: hidden;
  min-height: 270px;
  max-height: 380px;
}

.llbe-post-card--featured-main > * {
  flex: 1;
}

.llbe-post-card--featured-main .llbe-post-card__thumbnail .featured_hero_image {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.llbe-post-card--featured-main .llbe-post-card__thumbnail a {
  display: block;
  position: absolute;
  inset: 0; /* stretch the link to every edge */
}

.llbe-post-card--featured-main .llbe-post-card__img {
  position: absolute;
  inset: 0; /* pin all four edges to the cell */
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  object-position: top center;
  /*   max-height: 350px; */
}

/* Base opacity transition for ALL post card images (all layouts).
   Duration is overridden by the Elementor "Transition Duration" control. */
.llbe-post-card__img {
  transition: opacity 300ms ease;
}

/* Body / content column */
.llbe-post-card--featured-main .llbe-post-card__body {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 32px;
  min-width: 0;
}

/* Hero title – bump it up vs the grid cards' h3 */
.llbe-post-card--featured-main .llbe-post-card__title {
  font-size: 24px;
  line-height: 1.25;
  margin: 0;
}

.llbe-post-card--featured-main .llbe-post-card__title a {
  text-decoration: none;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.llbe-post-card--featured-main .llbe-post-card__title a:hover {
  opacity: 0.8;
}

/* Excerpt */
.llbe-post-card--featured-main .llbe-post-card__excerpt {
  margin: 0;
  line-height: 1.65;
  flex: 0 1 auto;
}

/* Meta row (date / author) */
.llbe-post-card--featured-main .llbe-post-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 13px;
  font-size: 12px;
  opacity: 0.75;
}

/* Read More – push to bottom of the column */
.llbe-post-card--featured-main .llbe-post-card__readmore {
  align-self: flex-start;
  margin-top: auto;
}

/* --------------------------------------------------------------------------
   3. Featured sub-grid  (posts 2 … N)
   .llbe-featured-sub-grid also carries .llbe-loop-grid so it inherits
   display:grid and the column / gap selectors Elementor injects there.
   -------------------------------------------------------------------------- */
.llbe-featured-sub-grid {
  display: grid;
  align-items: start;
  /* grid-template-columns is injected by Elementor via the Columns control */
}

/* Cards inside the sub-grid use the normal grid card styles; just make
   sure they don't accidentally inherit any featured-main rules. */
.llbe-post-card--featured-grid {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.llbe-post-card--featured-grid .llbe-post-card__body {
  flex: 1 1 auto;
  min-height: 0;
}

.llbe-post-card--featured-grid .llbe-post-card__excerpt {
  flex: 0 1 auto;
}

.llbe-post-card--featured-grid .llbe-post-card__readmore {
  flex-shrink: 0;
  margin-top: auto;
}

.llbe-post-card--featured-grid .llbe-post-card__img {
  width: 100%;
  object-fit: cover;
  display: block;
  min-height: 250px;
  max-height: 250px;
}

/* --------------------------------------------------------------------------
   4. Responsive
   -------------------------------------------------------------------------- */

/* Tablet: narrow the hero image column */
@media (max-width: 1024px) {
  .llbe-post-card--featured-main {
    grid-template-columns: 45% 55%;
  }
  .llbe-news-hero__img-wrap {
    max-height: 400px;
  }
}

/* Mobile: stack hero vertically */
@media (max-width: 767px) {
  .llbe-post-card--featured-main {
    flex-direction: column;
  }

  .llbe-post-card--featured-main .llbe-post-card__thumbnail {
    grid-column: 1;
    grid-row: 1;
    aspect-ratio: 16/9;
    max-height: 270px;
    width: 100%;
  }

  .llbe-post-card--featured-main .llbe-post-card__body {
    grid-column: 1;
    grid-row: 2;
    padding: 20px;
  }

  .llbe-post-card--featured-main .llbe-post-card__title {
    font-size: 20px;
  }

  /* Sub-grid collapses to 1 column on mobile */
  .llbe-featured-sub-grid {
    grid-template-columns: 1fr !important;
  }

  .llbe-post-card--featured-main .llbe-post-card__img,
  .llbe-post-card--featured-grid .llbe-post-card__img {
    max-height: 270px;
  }
}

/* =============================================================================
   LLBE NEWS LAYOUT
   Replaces masonry. Pure CSS Flexbox/Grid — no JS library needed.
   Scoped to .llbe-news-layout — does NOT touch grid / list / featured.
   ============================================================================= */

/* ── Outer wrapper ──────────────────────────────────────────────────────────── */
.llbe-news-layout {
  width: 100%;
}

/* ── Top section: 2 columns — Breaking News (left) + Popular Now (right) ───── */
.llbe-news-top {
  display: grid;
  grid-template-columns: 62% 1fr;
  gap: 28px;
  margin-bottom: 40px;
  align-items: start;
  align-items: stretch;
}

/* ── Section headings ────────────────────────────────────────────────────────── */
.llbe-news-section-title {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--llbe-primary, #e44d26);
  color: var(--llbe-text, #111);
}

/* ── Breaking News hero card ─────────────────────────────────────────────────── */
.llbe-news-hero {
  display: flex;
  /* flex-direction: column; */
  background: #fff;
  border-radius: var(--llbe-radius, 6px);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
  height: 100%;
}

.llbe-breaking-news {
  position: relative;
}
.llbe-breaking-news::after {
  content: "";
  background: #00000069;
  position: absolute;
  inset: 0;
  border-radius: var(--llbe-radius, 6px);
  pointer-events: none;
  z-index: 1;
}

.llbe-breaking-news .llbe-news-hero {
  position: relative;
  z-index: 2;
}

body .llbe-loop-wrapper-custom .llbe-news-hero__img-link {
  text-decoration: none;
  display: contents;
}

.llbe-news-popular-card__img-wrap .llbe-post-card__img {
  height: 100%;
}

.llbe-news-hero__img-wrap {
  position: relative;
  overflow: hidden;
  /* aspect-ratio: 16 / 10; */
  background: #111;
  width: 100%;
  height: 100%;
}

.llbe-news-hero__overlay {
  position: absolute;
  bottom: 50px;
  left: 50px;
  right: 50px;
  z-index: 2;
}

.llbe-news-hero__img-anchor {
  display: block;
  width: 100%;
  height: 100%;
}

.llbe-loop-wrapper-custom .llbe-news-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.llbe-news-hero:hover .llbe-news-hero__img {
  transform: scale(1.03);
}

/* BREAKING badge — top-left of image */
.llbe-news-badge--breaking {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  background: var(--llbe-primary, #e44d26);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 6px;
  text-transform: uppercase;
}

.llbe-news-hero__body {
  padding: 20px;
}

.llbe-breaking-news:has(.llbe-news-hero--no-thumb)::after {
  display: none;
}

.llbe-news-hero--no-thumb .llbe-news-hero__title {
  color: #111;
}

.llbe-news-hero--no-thumb .llbe-news-hero__date {
  color: #666;
}

.llbe-news-hero__cats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

/* Category label — hero and popular cards */
.llbe-news-cat {
  display: inline-block;
  background: #000;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
  text-decoration: none;
}

body .llbe-loop-wrapper-custom .llbe-news-cat {
  text-decoration: none;
}

.llbe-news-cat:hover {
  color: #fff;
  opacity: 0.85;
}

/* Overlay variant — sits on top of popular card images */
.llbe-news-popular-card__cats-overlay {
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.llbe-news-cat--overlay {
  margin: 0;
}

body .llbe-loop-wrapper-custom .llbe-news-hero__title a {
  text-decoration: none;
}

.llbe-news-hero__title {
  font-size: 24px;
  font-weight: 500;
  line-height: 1.25;
  margin: 0 0 5px 0;
  color: white;
}

.llbe-news-hero__title a {
  color: inherit;
  text-decoration: none;
}

.llbe-news-hero__title a:hover {
  color: var(--llbe-primary, #e44d26);
}

.llbe-news-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
}

.llbe-news-hero__author {
  font-size: 12px;
  color: #fff;
  opacity: 0.9;
}

.llbe-news-hero__overlay .llbe-news-hero__excerpt {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  line-height: 1.5;
  margin: 8px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.llbe-news-hero__overlay .llbe-post-card__readmore {
  color: #fff;
  margin-top: 10px;
}

.llbe-news-hero__overlay .llbe-news-hero__tags {
  margin-top: 8px;
}

.llbe-news-hero__overlay .llbe-term-badge--tag {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.llbe-news-hero__date {
  font-size: 12px;
  color: white;
  font-weight: 400;
  letter-spacing: 0.04em;
}

/* ── Popular Now 2×2 grid ─────────────────────────────────────────────────── */
.llbe-popular-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.llbe-news-popular-card {
  background: #fff;
  border-radius: var(--llbe-radius, 6px);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
}

.llbe-news-popular-card__img-link {
  display: block;
}

.llbe-news-popular-card__img-wrap {
  position: relative;
  overflow: hidden;
  /* aspect-ratio: 4 / 3; */
  background: #111;
}

.llbe-news-popular-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.llbe-news-popular-card:hover .llbe-news-popular-card__img {
  transform: scale(1.04);
}

.llbe-news-popular-card__body {
  padding: 12px;
  flex: 1;
}

.llbe-news-popular-card__title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 6px;
  color: var(--llbe-text, #111);
}

.llbe-news-popular-card__title a {
  color: inherit;
  text-decoration: none;
}

.llbe-news-popular-card__title a:hover {
  color: var(--llbe-primary, #e44d26);
}

.llbe-news-popular-card__excerpt {
  font-size: 14px;
  color: var(--llbe-muted, #888);
  line-height: 1.5;
  margin: 0;
}

.llbe-news-popular-card__body .llbe-post-card__meta {
  font-size: 12px;
  margin: 0 0 8px;
}

.llbe-news-popular-card__body .llbe-post-card__terms--tag {
  margin: 8px 0 0;
}

.llbe-news-popular-card__body .llbe-post-card__readmore {
  margin-top: 10px;
}

/* ── Bottom grid: remaining posts ─────────────────────────────────────────── */
.llbe-news-grid-wrap {
  margin-top: 8px;
}

.llbe-news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */

/* Tablet: stack top section, popular grid stays 2 col */
@media (max-width: 1024px) {
  .llbe-news-top {
    grid-template-columns: 1fr;
    margin-bottom: 16px;
    gap: 16px;
  }
  .llbe-news-hero {
    flex-direction: column;
  }
  .llbe-news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile: single column everything */
@media (max-width: 640px) {
  .llbe-popular-grid {
    grid-template-columns: 1fr;
  }

  .llbe-news-grid {
    grid-template-columns: 1fr;
  }

  .llbe-news-hero__title {
    font-size: 18px;
  }
  .llbe-news-hero__overlay {
    bottom: 16px;
    left: 16px;
    right: 16px;
  }
}
