/**
 * kb-news-sections.css — layouts for server-rendered homepage news sections
 * (inc/news-sections.php). Plain CSS so it never depends on which Tailwind
 * utilities are compiled into koora-widgets.css. RTL-first.
 */

.kb-sec {
  margin-bottom: 0;
}

/* ---- Section header ---- */
.kb-sec__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  border-bottom: 2px solid #a8ff03;
  padding-bottom: 12px;
}

.kb-sec__title {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  color: #0a2750;
  line-height: 1.2;
}

.dark .kb-sec__title {
  color: #fff;
}

.kb-sec__desc {
  margin: 6px 0 0;
  font-size: 14px;
  color: #6d747b;
  line-height: 1.6;
}

.kb-sec__more {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 700;
  color: #669c02;
  text-decoration: none;
  white-space: nowrap;
  transition: color .15s;
}

.kb-sec__more:hover {
  color: #a8ff03;
}

.kb-sec__more span {
  display: inline-block;
}

/* ---- grid ---- */
.kb-sec__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

@media (min-width: 768px) {
  .kb-sec__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }
}

/* ---- list ---- */
.kb-sec__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kb-sec__row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--kb-card, #fff);
  border: 1px solid var(--kb-line, #e8e8e8);
  border-radius: 12px;
  padding: 10px;
  text-decoration: none;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}

.kb-sec__row:hover {
  border-color: #a8ff03;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .07);
  transform: translateY(-2px);
}

.dark .kb-sec__row {
  background: var(--color-dark-surface, #222);
  border-color: rgba(255, 255, 255, .06);
}

.kb-sec__row-thumb {
  width: 116px;
  height: 78px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.kb-sec__row-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.kb-sec__row-cat {
  align-self: flex-start;
  background: #a8ff03;
  color: #13151f;
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  padding: 2px 8px;
}

.kb-sec__row-title {
  font-size: 15px;
  font-weight: 700;
  color: #212529;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dark .kb-sec__row-title {
  color: #f1f1f1;
}

/* ---- magazine ---- */
.kb-sec__mag {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 1024px) {
  .kb-sec__mag {
    grid-template-columns: 1.4fr 1fr;
    gap: 24px;
  }
}

.kb-sec__mag-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ---- carousel ---- */
.kb-sec__carousel {
  position: relative;
}

.kb-sec__track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.kb-sec__track::-webkit-scrollbar {
  display: none;
}

.kb-sec__slide {
  scroll-snap-align: start;
  flex: 0 0 220px;
}

@media (min-width: 768px) {
  .kb-sec__slide {
    flex-basis: 280px;
  }
}

.kb-sec__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--kb-line, #e2e8f0);
  background: #fff;
  color: #0a2750;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
  display: none;
}

.kb-sec__nav--prev { right: -8px; }
.kb-sec__nav--next { left: -8px; }

@media (min-width: 1024px) {
  .kb-sec__carousel:hover .kb-sec__nav {
    display: block;
  }
}

.kb-sec__nav:hover {
  background: #a8ff03;
  border-color: #a8ff03;
}
