/**
 *  * Integration Partners - Frontend Styles
 *  * Modern, responsive card-based grid layout
 *  */

/* ========================================
 *    Container & Layout
 *    ======================================== */

.kinteg-partners-container {
	max-width: 1400px;
	margin: 0 auto;
	padding: 40px 20px;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* ========================================
 *    Search Bar
 *    ======================================== */

/* Used !important tag to implement the CSS for Search Bar.
 * Because I noticed your Theme Builder is forcing it's own CSS on the search bar.
 */
.kinteg-search-wrapper {
	position: relative !important;
	margin-bottom: 50px !important;
}

.kinteg-search-input {
	width: 100% !important;
	max-width: 100% !important;
	padding: 16px 50px 16px 20px !important;
	font-size: 16px !important;
	border: 2px solid #e0e0e0 !important;
	border-radius: 12px !important;
	background: #ffffff !important;
	transition: all 0.3s ease !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
	box-sizing: border-box !important;
}

.kinteg-search-input:focus {
	outline: none !important;
	border-color: #fff !important;
	box-shadow: 0 4px 16px rgba(124, 58, 237, 0.15) !important;
}

.kinteg-search-icon {
	position: absolute !important;
	right: 20px !important;
	top: 50% !important;
	transform: translateY(-50%) !important;
	color: #9ca3af !important;
	pointer-events: none !important;
	z-index: 1 !important;
}

/* ========================================
 *    Category Sections
 *    ======================================== */

.kinteg-category-section {
	margin-bottom: 60px;
}

.kinteg-category-section.hidden {
	display: none;
}

.kinteg-category-title {
	font-size: 20px;
	font-weight: 700;
	color: var(--kinteg-title-color, #7c3aed);
	margin-bottom: 30px;
	padding-bottom: 15px;
	border-bottom: 3px solid var(--kinteg-divider-color, #7c3aed);
}

/* ========================================
 *    Grid Layout
 *    ======================================== */

.kinteg-partners-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 30px;
}

/* ========================================
 *    Partner Cards
 *    ======================================== */

.kinteg-partner-card {
	background: #ffffff;
	border-radius: 16px;
	padding: 30px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
	transition: all 0.3s ease;
	display: flex;
	flex-direction: column;
	position: relative;
}

/* Card Badges Container (top-right corner) */
.kinteg-card-badges {
    position: absolute;
    top: 14px;
    right: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 2;
}

/* Featured Partner Badge */
.kinteg-featured-partner-badge {
	width: 34px;
	height: 34px;
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.92);
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
	border: 1px solid rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
}

/* "New" Pill Badge */
.kinteg-new-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    padding: 0 11px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.92);
    color: var(--kinteg-partner-badge-color, var(--kinteg-primary-btn, #7c3aed));
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
    white-space: nowrap;
    flex-shrink: 0;
}

.kinteg-featured-partner-icon {
	display: block;
	color: var(--kinteg-partner-badge-color, var(--kinteg-title-color, #7c3aed));
}

.kinteg-partner-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 30px rgba(124, 58, 237, 0.15);
}

.kinteg-partner-card.hidden {
	display: none;
}

/* Card Logo */
.kinteg-card-logo {
	margin-bottom: 20px;
	height: 80px;
	display: flex;
	align-items: center;
	justify-content: flex-start;
}

.kinteg-card-logo img {
	max-height: 80px;
	max-width: 80%;
	width: auto;
	height: auto;
	object-fit: contain;
}

/* Card Title */
.kinteg-card-title {
	font-size: 24px;
	font-weight: 700;
	color: #1f2937;
	margin: 0 0 15px 0;
	line-height: 1.3;
}

/* Card Description */
.kinteg-card-description {
	flex: 1;
	margin-bottom: 10px;
	color: #6b7280;
	font-size: 15px;
	line-height: 1.5;
}

.kinteg-card-excerpt {
	display: block;
}

.kinteg-card-full-content {
	display: none;
	margin-top: 15px;
}

.kinteg-card-description.expanded .kinteg-card-excerpt {
	display: none;
}

.kinteg-card-description.expanded .kinteg-card-full-content {
	display: block;
}

/* Card Actions */
.kinteg-card-actions {
	display: flex;
	gap: 12px;
	align-items: center;
	flex-wrap: wrap;
}

/* CTA Button (Primary) */
.kinteg-cta-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 15px;
	background: var(--kinteg-primary-btn, #7c3aed);
	color: #ffffff;
	text-decoration: none;
	border-radius: 8px;
	font-weight: 600;
	font-size: 14px;
	transition: all 0.3s ease;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	min-height: 48px; /* Forces identical height */
	box-sizing: border-box; /* Accounts for borders/padding */
}

.kinteg-cta-button:hover {
	opacity: 0.9;
	transform: translateY(-2px);
	color: #ffffff;
}

/* Read More Button (Secondary) */
.kinteg-read-more {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 10px 5px; /* Matched padding with primary */
	background: transparent;
	border: white;
	color: var(--kinteg-secondary-btn, #7c3aed);
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	transition: all 0.3s ease;
	min-height: 48px; /* Forces identical height */
	box-sizing: border-box; /* Accounts for borders/padding */
}

.kinteg-read-more:hover {
	color: #6c757d;
}

.kinteg-read-more .kinteg-arrow {
	transition: transform 0.3s ease;
}

.kinteg-read-more[data-expanded="true"] .kinteg-arrow {
	transform: rotate(180deg);
}

/* ========================================
 *    View More / View Less per Category
 *    ======================================== */

.kinteg-card-hidden-row {
    display: none;
}

.kinteg-view-more-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.kinteg-view-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 5px;
    background: transparent;
    border: white;
    color: var(--kinteg-secondary-btn, #7c3aed);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 48px;
    box-sizing: border-box;
}

.kinteg-view-more:hover {
    color: #6c757d;
}

.kinteg-view-more .kinteg-arrow {
    transition: transform 0.3s ease;
}

.kinteg-view-more[data-expanded="true"] .kinteg-arrow {
    transform: rotate(180deg);
}

/* ========================================
 *    No Results Message
 *    ======================================== */

.kinteg-no-results {
	text-align: center;
	padding: 60px 20px;
	background: #f9fafb;
	border-radius: 12px;
	margin-top: 30px;
}

.kinteg-no-results p {
	font-size: 18px;
	color: #6b7280;
	margin: 0;
}

/* ========================================
 *    Responsive Design
 *    ======================================== */

/* Tablet (768px - 1199px) */
@media screen and (max-width: 1199px) {
	.kinteg-partners-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 25px;
	}

	.kinteg-category-title {
		font-size: 28px;
	}

	.kinteg-card-title {
		font-size: 22px;
	}
}

/* Mobile (< 768px) */
@media screen and (max-width: 767px) {
	.kinteg-partners-container {
		padding: 30px 15px;
	}

	.kinteg-search-wrapper {
		margin-bottom: 25px;
	}

	.kinteg-search-input {
		padding: 12px 45px 12px 16px;
		font-size: 15px;
	}

	.kinteg-search-icon {
		right: 15px;
	}

	.kinteg-partners-grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.kinteg-category-section {
		margin-bottom: 40px;
	}

	.kinteg-category-title {
		font-size: 24px;
		margin-bottom: 20px;
		padding-bottom: 12px;
	}

	.kinteg-partner-card {
		padding: 20px;
	}

	.kinteg-card-logo {
		height: 60px;
		margin-bottom: 16px;
	}

	.kinteg-card-logo img {
		max-height: 60px;
		max-width: 140px;
	}

	.kinteg-card-title {
		font-size: 20px;
		margin-bottom: 10px;
	}

	.kinteg-card-description {
		font-size: 14px;
		margin-bottom: 16px;
	}

	.kinteg-card-actions {
		display: flex;
		flex-direction: row;
		flex-wrap: wrap;
		gap: 12px;
		width: 100%;
		align-items: stretch;
	}

	.kinteg-cta-button,
	.kinteg-read-more {
		flex: 1 1 calc(50% - 6px);
		width: auto;
		min-width: 130px;
		justify-content: center;
		padding: 12px 10px;
		font-size: 14px;
		white-space: nowrap;
	}
}

/* Small Mobile (< 480px) */
@media screen and (max-width: 479px) {
	.kinteg-partners-container {
		padding: 20px 10px;
	}

	.kinteg-category-title {
		font-size: 22px;
	}

	.kinteg-card-title {
		font-size: 18px;
	}

	.kinteg-cta-button,
	.kinteg-read-more {
		flex: 1 1 100%;
	}
}


/* ========================================
 * New Layout & Sidebar Styles
 * ======================================== */

.kinteg-layout-wrapper {
	display: flex;
	flex-wrap: wrap;
	gap: 40px;
	align-items: flex-start;
}

.kinteg-sidebar {
	width: 100%;
	max-width: 260px;
	padding: 15px;
	/* Makes the sidebar sticky so it stays visible while scrolling */
	position: sticky;
	top: 40px; 
}

.kinteg-main-content {
	flex: 1;
	min-width: 0;
}

.kinteg-widget-title {
	font-size: 16px;
	font-weight: 700;
	color: var(--kinteg-title-color, #1f2937);
	margin-top: 0;
	margin-bottom: 20px;
	padding-bottom: 12px;
	border-bottom: 2px solid var(--kinteg-divider-color, #7c3aed);
}

.kinteg-checkbox-group {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.kinteg-checkbox-label {
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	font-size: 13px;
	color: #4b5563;
	transition: color 0.2s ease;
}

.kinteg-checkbox-label:hover {
	color: var(--kinteg-title-color, #7c3aed);
}

.kinteg-checkbox-label input[type="checkbox"] {
	accent-color: var(--kinteg-primary-btn, #7c3aed);
	width: 18px;
	height: 18px;
	cursor: pointer;
	margin: 0;
}

/* Make it stack vertically on mobile */
@media screen and (max-width: 900px) {
	.kinteg-sidebar {
		max-width: 100%;
		position: static;
		margin-bottom: 20px;
	}
}

/* Sidebar Featured Partner Legend */
.kinteg-featured-partner-legend {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--kinteg-border-color, #e5e7eb);
    font-size: 14px;
}

.kinteg-featured-partner-badge--legend {
    position: static; /* override absolute positioning */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--kinteg-partner-badge-color, var(--kinteg-title-color, #7c3aed));
}

.kinteg-featured-partner-legend-text {
    font-weight: 500;
}