/* Content Library Grid — front-end styles */

.clg-wrapper {
	margin: 0 auto;
	/*padding: 30px 20px 50px;*/
}

/* Toolbar: dropdowns + search */
.clg-toolbar {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	margin-bottom: 30px;
}

.clg-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.clg-filter-btn {
	background: #004F4B;
	border: 1px solid #004F4B;
	color: #ffffff;
	padding: 10px 20px;
	font-size: 14px;
	font-weight: 600;
	border-radius: 3px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

/* Caret drawn with CSS borders (the ▾ text glyph was white-on-white and
   depends on the font). currentColor = same colour as the button text,
   so it stays visible even when the theme restyles the button. */
.clg-wrapper .clg-filter-btn {
	display: inline-flex !important;
	align-items: center !important;
	gap: 12px !important;
	line-height: 1.2 !important;
}

.clg-wrapper .clg-filter-btn .clg-label {
	display: inline-block;
	line-height: 1.2;
}

.clg-wrapper .clg-filter-btn .clg-caret {
	display: inline-block;
	position: relative;
	top: -3px;
	width: 7px;
	height: 7px;
	margin: 0;
	padding: 0;
	font-size: 0;
	line-height: 0;
	vertical-align: middle;
	color: inherit;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform 0.2s ease, top 0.2s ease;
	flex-shrink: 0;
}

.clg-wrapper .clg-filter-btn.is-open .clg-caret {
	top: 2px;
	transform: rotate(-135deg);
}

/* Dropdowns */
.clg-dropdown-group {
	position: relative;
	display: inline-block;
}

.clg-dropdown-menu {
	list-style: none;
	margin: 6px 0 0;
	padding: 6px 0;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 220px;
	background: #ffffff;
	border: 1px solid #d0d5d5;
	border-radius: 3px;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
	z-index: 20;
	display: none;
	max-height: 280px;
	overflow-y: auto;
}

.clg-dropdown-menu.is-open {
	display: block;
}

.clg-dropdown-item {
	padding: 9px 16px;
	font-size: 14px;
	color: #333;
	cursor: pointer;
	white-space: nowrap;
}

.clg-dropdown-item:hover {
	background: #e6efef;
}

.clg-dropdown-item.is-active {
	background: #1a4d4d;
	color: #ffffff;
	font-weight: 600;
}

/* Search */
.clg-search {
	position: relative;
	flex: 1 1 260px;
	max-width: 340px;
}

.clg-search input {
	width: 100%;
	padding: 10px 40px 10px 14px;
	border: 1px solid #d0d5d5;
	border-radius: 2px;
	font-size: 14px;
	box-sizing: border-box;
}

.clg-search__icon {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	opacity: 0.5;
	pointer-events: none;
}

/* ==========================================================================
   Featured card (latest post): image left, content right
   ========================================================================== */

.clg-featured {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 32px;
	margin-bottom: 24px;
}

.clg-featured__img-wrap {
	display: block !important;
	flex: 1 1 420px;
	max-width: 560px;
	height: 320px !important;
	overflow: hidden !important;
	line-height: 0 !important;
}

.clg-featured__img-wrap img,
.clg-featured__img {
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
	object-fit: cover !important;
	object-position: center !important;
	display: block !important;
}

.clg-featured__img--placeholder {
	width: 100% !important;
	height: 100% !important;
	background: #eef1f1 !important;
}

.clg-featured__body {
	flex: 1 1 320px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.clg-featured__type {
	color: #1a4d4d;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	margin-bottom: 10px;
}

.clg-featured__title {
	text-decoration: none;
	color: inherit;
}

.clg-featured__title h2 {
    margin: 0 0 8px;
    font-size: 25px;
    line-height: 1.35;
    color: #1a1a1a;
    font-weight: 700;
}

.clg-featured__tax {
	color: #FF6161;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.03em;
	margin-bottom: 10px;
}

.clg-featured__excerpt {
	color: #444;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0 0 16px;
}

.clg-featured__readmore {
	color: #1a4d4d;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	align-self: flex-start;
}

.clg-featured__readmore:hover {
	text-decoration: underline;
}

@media (max-width: 700px) {
	.clg-featured {
		flex-direction: column;
	}

	.clg-featured__img-wrap {
		max-width: 100%;
		height: 220px !important;
	}
}

/* ==========================================================================
   Cards grid (all other posts): image with content overlaid on top
   ========================================================================== */

.clg-cards {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

@media (max-width: 900px) {
	.clg-cards {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	.clg-cards {
		grid-template-columns: 1fr;
	}
}

.clg-card {
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
	overflow: hidden;
}

.clg-card__link {
	display: block;
	position: relative;
	color: inherit;
	text-decoration: none;
}

.clg-card__img-wrap {
	display: block !important;
	width: 100% !important;
	height: 360px !important;
	overflow: hidden !important;
	line-height: 0 !important;
}

.clg-card__img-wrap img,
.clg-card__img {
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
	object-fit: cover !important;
	object-position: center !important;
	display: block !important;
	transition: transform 0.3s ease;
}

.clg-card__link:hover .clg-card__img-wrap img {
	transform: scale(1.05);
}

.clg-card__img--placeholder {
	width: 100% !important;
	height: 100% !important;
	background: #eef1f1 !important;
}

.clg-card__overlay {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 20px 18px 18px;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.5) 55%, rgba(0, 0, 0, 0) 100%);
}

.clg-card__title {
	margin: 0 0 8px;
	font-size: 17px;
	line-height: 1.35;
	color: #ffffff;
	font-weight: 700;
}

.clg-card__tax {
	color: #FF6161;
	font-size: 12px;
	font-weight: 600;
	margin-bottom: 10px;
}

.clg-card__readmore {
	display: inline-block;
	color: #ffffff;
	font-size: 14px;
	font-weight: 700;
}

.clg-no-results {
	grid-column: 1 / -1;
	text-align: center;
	color: #666;
	padding: 40px 0;
}

.clg-loading {
	text-align: center;
	padding: 20px 0;
	color: #1a4d4d;
	font-weight: 600;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.clg-pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 36px;
}

.clg-page-numbers {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.clg-page-btn {
	background: #ffffff;
	border: 1px solid #d0d5d5;
	color: #1a4d4d;
	padding: 8px 14px;
	font-size: 14px;
	font-weight: 600;
	border-radius: 3px;
	cursor: pointer;
	line-height: 1.2;
}

.clg-page-btn:hover:not(:disabled):not(.is-active) {
    border:1px solid #004f4b;
    color:#004f4b;
	background: #e6efef;
	border-color: #1a4d4d;
}

.clg-page-btn.is-active {
	background: #004F4B;
	border-color: #004F4B;
	color: #ffffff;
	cursor: default;
}

.clg-page-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

@media (max-width: 480px) {
	.clg-page-numbers {
		order: 3;
		width: 100%;
		justify-content: center;
	}
}


/* ==========================================================================
   Content type badge (top right of image)
   ========================================================================== */

.clg-featured__img-wrap {
	position: relative !important;
}

.clg-badge {
	position: absolute;
	top: 7px;
	right: 7px;
	z-index: 2;
	background: #FFB031;
	color: #000;
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	padding: 6px 12px;
	border-radius: 0px;
	white-space: nowrap;
}


/* ==========================================================================
   Typography overrides (v1.0.1)
   Prefixed with .clg-wrapper so Elementor / theme heading styles
   can't override them.
   ========================================================================== */

/* Sub industry (taxonomy) – featured post + all cards */
.clg-wrapper .clg-featured__tax,
.clg-wrapper .clg-card__tax {
	font-size: 14px;
	font-weight: 700;
}

/* Card titles */
.clg-wrapper .clg-card__title {
	font-size: 19px;
	font-weight: 700;
}

/* Read More – featured post + all cards */
.clg-wrapper .clg-featured__readmore,
.clg-wrapper .clg-card__readmore {
	font-size: 16px;
	font-weight: 700;
}