/* LinkedIn Carousel with Flexbox */
.linkedin-carousel-section {
  padding: 5rem 0;
  background-color: #f8fafc;
  position: relative;
  overflow: hidden;
}

.linkedin-carousel-container {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.linkedin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding: 0 1rem;
}

.linkedin-header h2 {
  font-size: 2rem;
  color: var(--brand-dark);
  margin: 0;
}

.carousel-scroll {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  gap: 20px;
  padding: 1rem 0;
  scroll-padding: 0 20px;
  margin: 0 -1rem;
  padding: 1rem;
}

.carousel-scroll::-webkit-scrollbar {
  height: 8px;
  background: #f1f1f1;
  border-radius: 10px;
}

.carousel-scroll::-webkit-scrollbar-thumb {
  background: var(--brand-primary);
  border-radius: 10px;
}

.linkedin-post {
  flex: 0 0 320px;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  scroll-snap-align: start;
  position: relative;
  border: 1px solid #e5e7eb;
}

/* View All Card */
.view-all-card {
  flex: 0 0 320px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem;
  cursor: pointer;
  transition: all 0.3s ease;
  scroll-snap-align: start;
}

.view-all-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border-color: var(--brand-primary);
}

.view-all-card svg {
  width: 40px;
  height: 48px;
  margin-bottom: 0.1rem;
  color: var(--brand-primary);
  transition: transform 0.3s ease;
}

.view-all-card:hover svg {
  transform: scale(1.1);
}

.view-all-card h3 {
  color: var(--brand-dark);
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}

.view-all-card p {
  color: #64748b;
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
}

.view-all-btn {
  background: var(--brand-primary);
  color: white;
  border: none;
  padding: 1rem 0.75rem;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 40px;
  text-decoration: none;
}

.view-all-btn:hover {
  background: var(--brand-primary-600);
  transform: translateY(-2px);
}

/* Post Content */
.post-image {
  height: 180px;
  overflow: hidden;
  background: #f3f4f6;
  position: relative;
}

.post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.linkedin-post:hover .post-image img {
  transform: scale(1.05);
}

.post-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-text {
  color: #4b5563;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-grow: 1;
}

.post-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid #f1f5f9;
}

.post-date {
  color: #6b7280;
  font-size: 0.85rem;
}

.view-post {
  color: var(--brand-primary);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.3s ease;
}

.view-post:hover {
  color: var(--brand-primary-600);
  text-decoration: underline;
}

/* Navigation Buttons */
.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  border: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
  color: var(--brand-primary);
}

.carousel-nav:hover {
  background: var(--brand-primary);
  color: white;
  transform: translateY(-50%) scale(1.1);
}

.carousel-nav.prev {
  left: 0;
}

.carousel-nav.next {
  right: 0;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .carousel-scroll {
    padding: 1rem 0.5rem;
    gap: 15px;
  }
  
  .linkedin-post,
  .view-all-card {
    flex: 0 0 280px;
  }
  
  .carousel-nav {
    display: none;
  }
}

@media (max-width: 640px) {
  .linkedin-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .linkedin-header h2 {
    font-size: 1.75rem;
  }
  
  .carousel-scroll {
    padding: 1rem 0.5rem;
    gap: 12px;
  }
  
  .linkedin-post,
  .view-all-card {
    flex: 0 0 85%;
  }
  
  .post-image {
    height: 160px;
  }
  
  .post-content {
    padding: 1.25rem;
  }
}
