/* ======================================================================
   LinkedIn Feed Connect — Frontend Styles
   Version: 1.0.0 | Author: Jean Andrade | actmob.com
   ====================================================================== */

/* ── Variables ─────────────────────────────────────────────────────── */
:root {
  --lfc-primary:       #0077B5;
  --lfc-primary-dark:  #005f8e;
  --lfc-text:          #1a1a1a;
  --lfc-muted:         #666;
  --lfc-border:        #e0e0e0;
  --lfc-bg-card:       #fff;
  --lfc-radius:        8px;
  --lfc-shadow:        0 2px 12px rgba(0,0,0,.08);
  --lfc-transition:    .2s ease;
}

/* ── Base ──────────────────────────────────────────────────────────── */
.lfc-feed {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── Grid ──────────────────────────────────────────────────────────── */
.lfc-feed-grid {
  display: grid;
  grid-template-columns: repeat(var(--lfc-cols, 3), 1fr);
}
.lfc-cols-1 { --lfc-cols: 1; }
.lfc-cols-2 { --lfc-cols: 2; }
.lfc-cols-3 { --lfc-cols: 3; }
.lfc-cols-4 { --lfc-cols: 4; }
.lfc-cols-5 { --lfc-cols: 5; }
.lfc-cols-6 { --lfc-cols: 6; }

/* ── Card ──────────────────────────────────────────────────────────── */
.lfc-post-card {
  background: var(--lfc-bg-card);
  border: 1px solid var(--lfc-border);
  border-radius: var(--lfc-radius);
  box-shadow: var(--lfc-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--lfc-transition), box-shadow var(--lfc-transition);
}
.lfc-post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(0,0,0,.13);
}

/* ── Image ─────────────────────────────────────────────────────────── */
.lfc-post-image {
  width: 100%;
  height: 200px;
  background-size: cover;
  background-position: center;
  background-color: #f0f0f0;
}
.lfc-post-image-link { display: block; }

.lfc-post-img-list {
  width: 140px;
  height: 100px;
  object-fit: cover;
  border-radius: var(--lfc-radius) 0 0 var(--lfc-radius);
  flex-shrink: 0;
}

/* ── List layout ───────────────────────────────────────────────────── */
.lfc-feed-list { display: flex; flex-direction: column; }
.lfc-post-card--list {
  flex-direction: row;
  align-items: flex-start;
}
.lfc-post-image-wrap { flex-shrink: 0; }

/* ── Body ──────────────────────────────────────────────────────────── */
.lfc-post-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
}

.lfc-post-date {
  font-size: .75rem;
  color: var(--lfc-muted);
  display: block;
}

.lfc-post-text {
  font-size: .9rem;
  color: var(--lfc-text);
  line-height: 1.55;
  /* Clamp to 5 lines */
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Footer ────────────────────────────────────────────────────────── */
.lfc-post-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--lfc-border);
  gap: 8px;
  flex-wrap: wrap;
}

.lfc-post-meta {
  display: flex;
  gap: 12px;
  font-size: .82rem;
  color: var(--lfc-muted);
}
.lfc-likes, .lfc-comments { white-space: nowrap; }

.lfc-read-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--lfc-primary);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--lfc-transition);
}
.lfc-read-more:hover { color: var(--lfc-primary-dark); text-decoration: underline; }

/* ── Carousel ──────────────────────────────────────────────────────── */
.lfc-feed-carousel { position: relative; overflow: hidden; }
.lfc-carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.lfc-carousel-track::-webkit-scrollbar { display: none; }
.lfc-carousel-item {
  scroll-snap-align: start;
  flex: 0 0 clamp(280px, 30%, 360px);
}
.lfc-carousel-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}
.lfc-carousel-prev,
.lfc-carousel-next {
  background: var(--lfc-primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--lfc-transition);
}
.lfc-carousel-prev:hover,
.lfc-carousel-next:hover { background: var(--lfc-primary-dark); }

/* ── Empty state ───────────────────────────────────────────────────── */
.lfc-feed-empty { display: flex; justify-content: center; }
.lfc-empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--lfc-muted);
}
.lfc-empty-icon  { font-size: 2.5rem; display: block; margin-bottom: 12px; }
.lfc-empty-title { font-size: 1.1rem; margin: 0 0 8px; }
.lfc-empty-text  { font-size: .9rem; margin: 0; }

/* ── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .lfc-cols-4 { --lfc-cols: 2; }
  .lfc-cols-5 { --lfc-cols: 2; }
  .lfc-cols-6 { --lfc-cols: 3; }
}
@media (max-width: 600px) {
  .lfc-feed-grid  { --lfc-cols: 1 !important; }
  .lfc-post-card--list { flex-direction: column; }
  .lfc-post-img-list { width: 100%; height: 180px; border-radius: var(--lfc-radius) var(--lfc-radius) 0 0; }
}
