/* Latest Posts Carousel (Swiper) - Theme version */
.lpcarousel{--card-radius:1rem;--card-shadow:0 10px 25px rgba(0,0,0,.15)}
.lpcarousel .swiper{padding:14px 8px}
.lpcarousel .swiper-slide{height:auto}
.lpc-card{position:relative;overflow:hidden;border-radius:var(--card-radius);box-shadow:var(--card-shadow);background:#111;color:#fff}
.lpc-media{position:relative;aspect-ratio:16/9;background:#222;overflow:hidden}
.lpc-media img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .6s cubic-bezier(.2,.65,.18,.98)}
.lpc-card:hover .lpc-media img{transform:scale(1.03)}
.lpc-gradient{position:absolute;inset:0;background:linear-gradient(180deg, rgba(0,0,0,.05) 10%, rgba(0,0,0,.55) 58%, rgba(0,0,0,.95) 100%)}
.lpc-badge{position:absolute;top:.75rem;left:.75rem;display:flex;gap:.5rem;z-index:3}
.lpc-badge a{padding:.25rem .5rem;border-radius:999px;background:rgba(255,255,255,.16);backdrop-filter:blur(6px);font-size:.75rem;color:#fff;text-decoration:none}
.lpc-badge a:hover{background:rgba(255,255,255,.25)}
.lpc-content{position:absolute;left:0;right:0;bottom:0;padding:1rem;z-index:3}
.lpc-title{margin:0 0 .35rem;font-size:clamp(1rem,2.1vw,1.25rem);line-height:1.2}
.lpc-title a{color:#fff;text-decoration:none}
.lpc-excerpt{margin:0 0 .75rem;font-size:.92rem;opacity:.9;display:-webkit-box;line-clamp:3;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.lpc-meta{font-size:.8rem;opacity:.85;display:flex;gap:.75rem;align-items:center;flex-wrap:wrap}
.lpc-readmore{margin-left:auto;padding:.42rem .72rem;border-radius:999px;background:#000;color:#111;text-decoration:none;font-weight:600}
.lpc-readmore:hover{background:#000}
.lpc-title a:focus-visible,.lpc-readmore:focus-visible,.lpc-badge a:focus-visible{outline:2px solid #fff;outline-offset:3px}
.lpcarousel .swiper-button-next,.lpcarousel .swiper-button-prev{color:#fff;filter:drop-shadow(0 8px 20px rgba(0,0,0,.35));opacity:.9;transition:opacity .2s ease;backdrop-filter: blur(2px);z-index:5}
.lpcarousel:hover .swiper-button-next,.lpcarousel:hover .swiper-button-prev{opacity:1}
.lpcarousel .swiper-pagination-bullet{opacity:.6}
.lpcarousel .swiper-pagination-bullet-active{opacity:1}

@media (max-width: 480px){
	.lpc-content{padding:.85rem}
	.lpc-meta{gap:.5rem}
}

/* Mobile comfort: bigger arrows and spacing */
@media (max-width: 768px){
  .lpcarousel .swiper{padding:12px 12px 28px}
  .lpcarousel .swiper-button-next,
  .lpcarousel .swiper-button-prev{width:44px;height:44px}
  .lpcarousel .swiper-button-next:after,
  .lpcarousel .swiper-button-prev:after{font-size:22px}
  .lpcarousel .swiper-pagination{bottom:2px}
}

/* Emphasize active slide slightly */
.lpcarousel .swiper-slide{transition:transform .25s ease, filter .25s ease}
.lpcarousel .swiper-slide-active{transform:scale(1.01)}

@media (prefers-reduced-motion: reduce){
  .lpc-card:hover .lpc-media img{transform:none}
  .lpcarousel .swiper-slide{transition:none}
}
.lpc-card {
  position: relative;
}

.lpc-stretched-link {
  position: absolute;
  inset: 0; /* topp, höger, botten, vänster */
  z-index: 1; /* under arrows (z=5) */
  text-indent: -9999px; /* döljer texten visuellt */
}

/* Säkerställ att övriga länkar i kortet ligger över stretched link */
.lpc-card .lpc-title a,
.lpc-card .lpc-meta a,
.lpc-card .lpc-badge a { position: relative; z-index: 3; }

/* Tangentbordsfokus */
.lpc-stretched-link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
  border-radius: inherit;
}
