/* LinkedIn Feed Widget – front-end styles
   ========================================= */

/* ---- Wrapper ---- */
.lfw-wrapper {
  position: relative;
}

/* ---- Track outer: clips the sliding track ---- */
.lfw-track-outer {
  overflow: hidden;
}

/* ---- Track: always a flex row of posts ---- */
.lfw-track {
  display: flex;
  gap: 0;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

/* ---- Without carousel: simple 3-col grid ---- */
.lfw-wrapper:not(.lfw-wrapper--carousel) .lfw-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  transform: none !important;
}

/* ---- With carousel: each "page" is exactly 100% wide,
        each post is 1/3 of that (minus gaps) ---- */
.lfw-wrapper--carousel .lfw-track {
  gap: 1.25rem;
}

.lfw-wrapper--carousel .lfw-post {
  flex: 0 0 calc(33.333% - 0.834rem); /* (100% - 2 gaps of 1.25rem) / 3 */
  min-width: calc(33.333% - 0.834rem);
  border-top-left-radius: 30px;
    border-bottom-right-radius: 30px;
}

/* Group posts into pages by keeping them as a flat list;
   JS handles translateX by 100% of the outer container per page.
   We need each page to be exactly the outer width, so we set
   the track to be (pages * 100%) wide and each post 1/(3*pages). */
.lfw-wrapper--carousel .lfw-track {
  width: 100%;
}

/* ---- Single post card ---- */
.lfw-post {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  transition: box-shadow .2s ease;
  display: flex;
  flex-direction: column;
}

.lfw-post:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
}

/* ---- Image ---- */
.lfw-post__image-link {
  display: block;
  flex-shrink: 0;
}

.lfw-post__image {
  display: block;
  width: 100%;
  height: 230px;
  object-fit: cover;
  border-top-left-radius:30px;
  z-index: 10;
  position: relative;
  margin-bottom:-30px
}

/* ---- Body ---- */
.lfw-post__body {
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  border-top-left-radius: 30px;

z-index: 100;
position: relative;
background: white;
}

.lfw-post__text {
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: #333;
  flex: 1;
}

/* ---- Footer ---- */
.lfw-post__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: auto;
}

.lfw-post__date {
  font-size: 0.8rem;
  color: #767676;
}

.lfw-post__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  background: #0a66c2;
  color: #fff !important;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: background .15s ease;
}

.lfw-post__link:hover {
  background: #004182;
  text-decoration: none !important;
}

/* ---- Carousel arrows ---- */
.lfw-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid #e0e0e0;
  background: #fff;
  color: #333;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
  transition: background .15s ease, box-shadow .15s ease, opacity .15s ease;
  padding: 0;
}

.lfw-arrow:hover:not(:disabled) {
  background: #0a66c2;
  color: #fff;
  border-color: #0a66c2;
  box-shadow: 0 4px 10px rgba(10,102,194,.3);
}

.lfw-arrow:disabled {
  opacity: 0.35;
  cursor: default;
}

.lfw-arrow--prev {
  left: -19px;
}

.lfw-arrow--next {
  right: -19px;
}

/* ---- Dot indicators ---- */
.lfw-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 1rem;
}

.lfw-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: #d0d0d0;
  cursor: pointer;
  padding: 0;
  transition: background .2s ease, transform .2s ease;
}

.lfw-dot--active {
  background: #0a66c2;
  transform: scale(1.3);
}

/* ---- States ---- */
.lfw-error,
.lfw-empty {
  padding: 0.75rem 1rem;
  border-left: 3px solid #0a66c2;
  background: #f0f7ff;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #333;
}

.lfw-error {
  border-color: #d93025;
  background: #fff0ef;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .lfw-wrapper:not(.lfw-wrapper--carousel) .lfw-track {
    grid-template-columns: 1fr;
  }

  .lfw-wrapper--carousel .lfw-post {
    flex: 0 0 100%;
    min-width: 100%;
  }

  .lfw-wrapper--carousel .lfw-track {
    gap: 0;
  }

  .lfw-arrow--prev { left: 0; }
  .lfw-arrow--next { right: 0; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .lfw-wrapper:not(.lfw-wrapper--carousel) .lfw-track {
    grid-template-columns: repeat(2, 1fr);
  }

  .lfw-wrapper--carousel .lfw-post {
    flex: 0 0 calc(50% - 0.625rem);
    min-width: calc(50% - 0.625rem);
  }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .lfw-track { transition: none; }
  .lfw-arrow, .lfw-dot { transition: none; }
}
