/* =========================
   News Slider custom element
   ========================= */

.news-slider {
  position: relative;
  width: 100%;
}

/* Header: heading left, link + arrows right */
.news-slider__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 5rem;
  border-bottom: 1px solid #001538;
  padding-bottom: 2rem;
}

.news-slider__header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

/* Header link button — visuals come from .bricks-button.bricks-background-secondary.
   Only layout-specific tweaks here. */
.news-slider__button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  text-decoration: none;
}

/* External arrows — visuals come from .bricks-button.bricks-background-secondary.
   Only sizing + icon centering here. No transforms. */
.news-slider__arrows {
  display: flex;
  gap: 8px;
}

/* Let Bricks .md size dictate vertical padding/font-size; we only force
   equal horizontal padding so the box stays square (= circle).
   Selector specificity (0,2,0) wins over Bricks `.md` (0,1,0). */
.news-slider .news-slider__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-inline: var(--news-arrow-pad, 10px);
  min-width: 0;
  aspect-ratio: 1;
  border-radius: 50%;
  cursor: pointer;
}

.news-slider .news-slider__arrow svg {
  width: 1.25em;
  height: 1.25em;
}

.news-slider .news-slider__arrow:disabled {
  opacity: 0.35;
  cursor: default;
}

/* Slider stays within container — no right bleed */
.news-slider__splide {
  overflow: hidden;
}

/* Reset list styles */
.news-slider__splide .splide__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.news-slider__splide .splide__slide {
  list-style: none;
  margin: 0;
  padding: 0;
}

.news-slider__splide .splide__slide::before,
.news-slider__splide .splide__slide::marker {
  content: none;
  display: none;
}

/* Fallback layout before Splide mounts */
.news-slider__splide:not(.is-initialized) .splide__list {
  display: flex;
  flex-direction: row;
  gap: 32px;
  overflow-x: auto;
}

.news-slider__splide:not(.is-initialized) .splide__slide {
  flex: 0 0 calc(33.333% - 22px);
  min-width: 0;
}

/* Cards */
.news-slider__card {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* Image wrapper */
.news-slider__image-wrap {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  margin-bottom: 1rem;
}

.news-slider__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.news-slider__card:hover .news-slider__img {
  transform: scale(1.05);
}

/* Category tag — top-left of image */
.news-slider__category {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #0a1a3a;
  color: #fff;
  padding: 10px 14px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}

.news-slider__category--blogi {
  background: #42b0fd;
  color: #001538;
}

/* Text content below image */
.news-slider__content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 2rem;
}

.news-slider__title {
  font-size: 2.5rem;
  font-weight: 600;
  line-height: 1.2;
  margin: 0;
  font-family: Inter;
  margin-bottom: 2rem;
}

/* Mobile */
@media (max-width: 900px) {
  .news-slider__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}
