/* LinkedIn Page Feed – wrapper, company profile, list and carousel */

.li-wrapper {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

/* Company profile header (above posts) – logo, name, metadata line, View company page */
.li-company-profile {
	margin-bottom: 1.25rem;
	padding-bottom: 1.25rem;
	border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.li-company-profile-inner {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-end;
	gap: 1.25rem;
}

.li-company-profile-header {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.li-company-logo-wrap {
	display: flex;
	flex-shrink: 0;
	width: 56px;
	height: 56px;
	border-radius: .5rem;
	overflow: hidden;
	border: 2px solid rgba(0, 0, 0, 0.08);
	background: #f3f2ef;
}

.li-company-logo {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.li-company-profile-text {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-width: 0;
}

.li-company-name {
	font-weight: 600;
	font-size: 1.5rem;
	line-height: 1.3;
}

.li-company-meta {
	font-size: 16px;
	opacity: 0.85;
	line-height: 1.4;
}

.li-company-page-btn {
	flex-shrink: 0;
}

/* Posts container */
.li-company-posts {
	width: 100%;
}

.li-pf {
	width: 100%;
}

/* Post cards */
.li-pf-item,
.li-pf-slide {
	/* border: 1px solid rgba(0, 0, 0, 0.12); */
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
	display: flex;
	flex-direction: column;
}

.li-pf-card-meta {
	opacity: 0.75;
	font-size: 0.8125rem;
	padding: 12px 16px 0;
	margin-bottom: 4px;
}

.li-pf-edited {
	opacity: 0.8;
}

.li-pf-card-body {
	padding: 0 16px 16px;
	flex: 1;
}

.li-pf-text {
	font-size: .875rem;
	line-height: 1.33;
	word-wrap: break-word;
}

.li-pf-text a {
	color: var(--wp--preset--color--accent);
	text-decoration: none;
}

.li-pf-text a:hover {
	text-decoration: underline;
}

/* Read more / show less */
.li-pf-text-wrap {
	display: block;
}

.li-pf-text-excerpt,
.li-pf-text-full {
	font-size: 0.875rem;
	line-height: 1.33;
	word-wrap: break-word;
}

.li-pf-text-excerpt a,
.li-pf-text-full a {
	color: var(--wp--preset--color--accent);
	text-decoration: none;
}

.li-pf-text-excerpt a:hover,
.li-pf-text-full a:hover {
	text-decoration: underline;
}

.li-pf-text-full--hidden {
	display: none;
}

.li-pf-show-less--hidden {
	display: none;
}

.li-pf-read-more,
.li-pf-show-less {
	color: var(--wp--preset--color--accent);
	text-decoration: none;
	cursor: pointer;
	font-size: 0.875rem;
	white-space: nowrap;
}

.li-pf-read-more:hover,
.li-pf-show-less:hover {
	text-decoration: underline;
}

.li-pf-text-wrap--expanded .li-pf-text-excerpt,
.li-pf-text-wrap--expanded .li-pf-read-more {
	display: none;
}

.li-pf-text-wrap--expanded .li-pf-text-full,
.li-pf-text-wrap--expanded .li-pf-text-full--hidden {
	display: block;
}

.li-pf-text-wrap--expanded .li-pf-show-less,
.li-pf-text-wrap--expanded .li-pf-show-less--hidden {
	display: inline;
}

.li-pf-card-media {
	margin-top: 12px;
	border-radius: 6px;
	overflow: hidden;
	background: #f3f2ef;
}

.li-pf-image {
	display: block;
	width: 100%;
	height: auto;
	vertical-align: middle;
}

/* Multi-image gallery: main image + thumbnail strip */
.li-pf-card-media--gallery {
	cursor: pointer;
}

.li-pf-card-media--gallery .li-pf-gallery-main {
	position: relative;
}

.li-pf-card-media--gallery .li-pf-gallery-main .li-pf-image {
	width: 100%;
}

.li-pf-gallery-thumbnails {
	display: flex;
	flex-wrap: nowrap;
	gap: 4px;
	margin-top: 4px;
	padding: 0 0 2px;
}

.li-pf-gallery-thumb {
	position: relative;
	flex: 0 0 auto;
	width: calc((100% - 8px) / 3);
	max-width: 80px;
	height: 52px;
	border-radius: 4px;
	overflow: hidden;
	background: #f3f2ef;
}

.li-pf-gallery-thumb .li-pf-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.li-pf-gallery-thumb--more::after {
	content: '';
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	pointer-events: none;
}

.li-pf-gallery-more {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1rem;
	font-weight: 600;
	color: #fff;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
	pointer-events: none;
}

/* Lightbox overlay */
.li-pf-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.85);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, visibility 0.2s ease;
}

.li-pf-lightbox.is-open {
	opacity: 1;
	visibility: visible;
}

.li-pf-lightbox__inner {
	position: relative;
	max-width: 90vw;
	max-height: 90vh;
	display: flex;
	align-items: center;
	justify-content: center;
}

.li-pf-lightbox__inner img {
	max-width: 100%;
	max-height: 85vh;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 4px;
}

.li-pf-lightbox__close,
.li-pf-lightbox__prev,
.li-pf-lightbox__next {
	position: absolute;
	border: none;
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
	cursor: pointer;
	border-radius: 8px;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.5rem;
	line-height: 1;
	transition: background 0.15s ease;
}

.li-pf-lightbox__close:hover,
.li-pf-lightbox__prev:hover,
.li-pf-lightbox__next:hover {
	background: rgba(255, 255, 255, 0.25);
}

.li-pf-lightbox__close:focus,
.li-pf-lightbox__prev:focus,
.li-pf-lightbox__next:focus {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.li-pf-lightbox__close {
	top: -52px;
	right: 0;
}

.li-pf-lightbox__prev {
	left: -52px;
	top: 50%;
	transform: translateY(-50%);
}

.li-pf-lightbox__next {
	right: -52px;
	top: 50%;
	transform: translateY(-50%);
}

.li-pf-lightbox__counter {
	position: absolute;
	top: -52px;
	left: 0;
	color: #fff;
	font-size: 0.875rem;
	opacity: 0.9;
}

.li-pf-card-footer {
	padding: 10px 16px 14px;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.li-pf-engagement {
	font-size: 0.8125rem;
	opacity: 0.85;
	margin-bottom: 6px;
}

.li-pf-view-post {
	font-size: 0.8125rem;
	color: var(--wp--preset--color--accent);
	text-decoration: none;
	font-weight: 500;
}

.li-pf-view-post:hover {
	text-decoration: underline;
}

/* List: base; grid or masonry (masonry via CSS columns) */
.li-pf-list {
	width: 100%;
	box-sizing: border-box;
}

/* Grid layout: responsive columns */
.li-pf-list--grid {
	display: grid;
	gap: 16px;
	grid-template-columns: repeat(var(--li-cols-mobile, 1), 1fr);
}

.li-pf-list--grid .li-pf-item {
	min-width: 0;
}

@media (min-width: 640px) {
	.li-pf-list--grid {
		grid-template-columns: repeat(var(--li-cols-tablet, 2), 1fr);
	}
}

@media (min-width: 1024px) {
	.li-pf-list--grid {
		grid-template-columns: repeat(var(--li-cols-desktop, 4), 1fr);
	}
}

/* Masonry: flex row of columns (horizontal order, no JS) */
.li-pf-list--masonry {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
}

.li-pf-masonry-col {
	flex: 0 0 calc((100% - (var(--li-masonry-cols, 4) - 1) * 16px) / var(--li-masonry-cols, 4));
	min-width: 0;
}

.li-pf-masonry-col:empty {
	display: none;
}

.li-pf-list--masonry .li-pf-item {
	box-sizing: border-box;
	margin-bottom: 16px;
}

/* Carousel: Swiper container with prev/next (slide width is dynamic via Swiper) */
.li-pf-carousel {
	display: grid;
	gap: 12px;
	align-items: center;
}

.li-pf-carousel .li-pf-swiper,
.li-pf-carousel .swiper {
	width: 100%;
	overflow: hidden;
	min-width: 0;
}

.li-pf-carousel .swiper-slide {
	height: auto;
	box-sizing: border-box;
}

.li-pf-carousel .swiper-slide .li-pf-slide {
	min-width: 0;
}

.li-pf-carousel .swiper-scrollbar {
	display: none;
}

.li-pf-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	border: 1px solid rgba(0, 0, 0, 0.2);
	background: #fff;
	border-radius: 999px;
	width: 44px;
	height: 44px;
	cursor: pointer;
	flex-shrink: 0;
	font-size: 1.25rem;
	line-height: 1;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.li-pf-next {
	right: -48px;
}

.li-pf-prev {
	left: -48px;
}

.li-pf-nav:hover {
	background: #f3f2ef;
	border-color: rgba(0, 0, 0, 0.3);
}

.li-pf-nav:focus {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
}

/* List pagination (li-page query param) */
.li-pf-pagination {
	margin-top: 24px;
}

.li-pf-pagination__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 0.75rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.li-pf-pagination__list li {
	margin: 0;
	padding: 0;
}

.li-pf-pagination__prev,
.li-pf-pagination__next {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 36px;
	min-width: 36px;
	text-decoration: none;
	color: #333;
	padding: 0.25rem 0.5rem;
}
@media (min-width: 640px) {
	.li-pf-pagination__prev,
	.li-pf-pagination__next {
		height: 48px;
		min-width: 48px;
	}
}

.li-pf-pagination__prev:not(.li-pf-pagination__disabled):hover,
.li-pf-pagination__next:not(.li-pf-pagination__disabled):hover {
	color: #111;
}

.li-pf-pagination__page {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	color: #333;
	padding: 0.25rem 0.5rem;
	height: 36px;
	min-width: 36px;
	border-radius: 4px;
	transition: background-color 0.3s ease;
}
@media (min-width: 640px) {
	.li-pf-pagination__prev,
	.li-pf-pagination__next {
		height: 48px;
		min-width: 48px;
	}
}

.li-pf-pagination__page:hover {
	color: #111;
	background-color: #fff;
}

.li-pf-pagination__current {
	font-weight: bold;
	color: #fff;
	background-color: #0d9488;
}

.li-pf-pagination__current:hover {
	color: #fff;
	background-color: #0d9488 !important;
}

.li-pf-pagination__disabled {
	cursor: default;
	pointer-events: none;
	color: #999;
}

.li-pf-pagination__dots {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 24px;
	color: #666;
	cursor: default;
	user-select: none;
}

/* Video post: thumbnail with play-button overlay */
.li-pf-card-media--video {
	position: relative;
}

.li-pf-video-play-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.18);
	transition: background 0.2s ease;
	text-decoration: none;
}

.li-pf-video-play-overlay:hover {
	background: rgba(0, 0, 0, 0.32);
}

.li-pf-video-play-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.92);
	flex-shrink: 0;
}

.li-pf-video-play-btn::after {
	content: '';
	display: block;
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 10px 0 10px 18px;
	border-color: transparent transparent transparent #0a66c2;
	margin-left: 4px;
}

.li-pf-card-media--video-no-thumb {
	background: #e9e5df;
	min-height: 180px;
}
