/* =========================================
   KB Docs Grid - Frontend CSS
   ========================================= */

.page-id-24530 #page-header,
.page-id-24539 #page-header,
.page-id-24541 #page-header{
	display:none !important;
}

.single-docs .sd-info-col .sd-share{
	display:none;
}



#um-submit-btn {
  border-radius: 9px 9px 9px 9px !important;
  padding: 17px 20px 17px 20px !important;
  background-color: #40BFB9;
	font-weight: 700 !important;
}
.um-button.um-alt {
	background: #F3FCFA !important;
	font-weight: 700 !important;
}	

#um-submit-btn:hover {
	background-color: #160647 !important;
}

/* ---------- Filter Bar ---------- */
.kb-filter-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 4px; 
	justify-content:center; 
	margin-bottom: 40px; 
	margin-top: 40px; 
}

.kb-filter-bar .keydesign-portfolio-grid__filters{
    margin-bottom: 0px;
}

.kb-filter-bar > ul > li{
	margin: 5px 0px !important;
}

.kb-filter-bar > ul {
	    gap: 15px !important;
}

/* ---------- Search Bar ---------- */
.kb-search-bar {
	display: flex;
	justify-content: center;
	width: 100%;
}
 
.kb-search-input {
	width: 100% !important;
	max-width: 450px !important;
    padding: 11px 18px 11px 44px !important;
    border: 2px solid #dde3ea !important;
    border-radius: 30px !important;
    font-size: 18px !important;
    color: #1a1a2e !important;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") no-repeat 14px center !important;
    background-size: 18px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s !important;
    box-sizing: border-box;
	height: 55px !important;
}

.kb-search-input:focus {
	border-color: #2b7a97;
	box-shadow: 0 0 0 3px rgba(43, 122, 151, 0.15);
}

.kb-search-input::placeholder {
	color: #aab4be;
}

/* ---------- No results ---------- */
.kb-no-results {
	text-align: center;
	color: #6b7280;
	font-size: 16px;
	padding: 40px 0 20px;
	width: 100%;
}

/* ---------- Grid ---------- */
.kb-grid-container {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 25px;
	padding: 0 0 20px;
}

/* Category groups are transparent to the CSS grid so cards still flow
   as direct grid items, but hiding the group hides all its cards. */
.kb-category-group {
	display: contents;
}

.kb-category-group--hidden {
	display: none;
}

/* ---------- Card ---------- */
.kb-card {
	border-radius: 12px;
	padding: 20px;
	display: flex; 
	flex-direction: column;
	color: #1a1a2e;
	background-color: #F3FCFA;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
	transition: transform 0.25s, box-shadow 0.25s;
	min-height: 400px;
        text-align: center;
    align-items: center;
    position: relative;
	margin-top: 20px;
}

.kb-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.kb-card--hidden {
	display: none;
}

/* ---------- Title ---------- */
.kb-link {
	text-decoration: none;
	color: inherit;
}
 

.kb-card h3 {
    font-size: 18px;
    line-height: 23px;
    color: #1a1a2e;
    margin: 0 0 5px 0;
    font-weight: 700;
    text-align: center;
    width: 100%;
    min-height: calc(24px * 1.4 * 3); /* reserve space for up to 3 lines */
    display: flex;
    align-items: center;
    justify-content: center;
	font-family: 'Inter', sans-serif !important;
}

/* ---------- Image wrapper ---------- */
.kb-img-wrap {
	display: block;
	flex: 0 0 auto;
	overflow: hidden;
	border-radius: 8px;
	margin-bottom: 16px;
	height: 210px;
}

.kb-img-wrap img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block; 
}

.kb-img-placeholder {
	width: 100%;
	height: 100%;
	min-height: 190px;
	background: #dde3ea;
	border-radius: 8px;
}

/* ---------- Icon wrap (used instead of image) ---------- */
.kb-icon-wrap {
	display: flex !important;
	align-items: center;
	justify-content: center;
	background: #e2e7ef;
}

.kb-icon-wrap .dashicons {
	font-size: 72px;
	width: 72px;
	height: 72px;
	color: #5b7fa6;
}

 
.kb-download-btn {
	display: block;
	position: relative;
	overflow: hidden;
	background: #56c4b2;
	color: #fff;
	text-align: center;
	padding: 13px 20px;
	border-radius: 6px;
	text-decoration: none;
	font-family: 'Inter', sans-serif !important;
	font-weight: 700;
	font-size: 15px;
	margin-top: auto;
	transition: background 0.25s, color 0.25s;
}

/* Duplicate text that slides in from below */
.kb-download-btn::before {
	content: attr(data-text);
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #56c4b2;
	color: #fff;
	transform: translateY(100%);
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Original text slides up and out */
.kb-download-btn span {
	display: block;
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.kb-download-btn:hover span {
	transform: translateY(-150%);
}

.kb-download-btn:hover::before {
	transform: translateY(0);
}

.kb-download-btn:hover {
	color: transparent;
	text-decoration: none;
}

/* ---------- Grid Responsive ---------- */
@media (max-width: 900px) {
	.kb-grid-container {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	.kb-grid-container {
		grid-template-columns: 1fr;
	}
}


/* =========================================
   Single Doc — Two-Column Layout
   ========================================= */

/* Keyframe: slide up from bottom on page load */
@keyframes sd-slide-up {
	from {
		opacity: 0;
		transform: translateY(40px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.sd-wrapper {
	padding: 50px 20px 60px;
	max-width: 1100px;
	margin: 0 auto;
}

.sd-container {
	display: flex;
	gap:30px;
	align-items: flex-start;
}

/* ---------- Left 60%: Image Column ---------- */
.sd-image-col {
	flex: 0 0 50%;
	max-width: 50%;
	border-radius: 12px;
	overflow: hidden;
}

.sd-animate-up {
	animation: sd-slide-up 0.6s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.sd-feature-img {
	display: block;
	width: 100%;
	height: auto;
	object-fit: cover;
	border-radius: 12px;
}

.sd-no-image {
	width: 100%;
	padding-top: 75%;
	background: #e8edf0;
	border-radius: 12px;
}

/* ---------- Right 40%: Info Column ---------- */
.sd-info-col {
	flex: 0 0 50%;
	max-width: 50%;
	padding-top: 8px;
}

.sd-title {
	font-size: 26px;
	line-height: 1.35;
	font-weight: 700;
	color: #1a1a2e;
	margin: 0 0 18px;
}

/* Full post content */
.sd-content {
	font-size: 15px;
	line-height: 1.75;
	color: #555;
	margin-bottom: 22px;
}

.sd-content p {
	margin: 0 0 12px;
}

.sd-content h2,
.sd-content h3,
.sd-content h4 {
	color: #1a1a2e;
	margin: 18px 0 8px;
    font-size: 24px;
}

/* Categories */
.sd-categories {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 10px;
}


.sd-info-col .sd-content .wp-block-button{
	margin-bottom: 10px;
}

.sd-cat-label {
	font-size: 12px;
	font-weight: 700;
	color: #555;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

/* Primary download button */
.sd-download-btn {
	display: inline-block;
	background: #56c4b2;
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	padding: 13px 32px;
	border-radius: 6px;
	text-decoration: none;
	transition: background 0.2s;
	margin-bottom: 26px;
}

.sd-download-btn:hover {
	background: #3daa98;
	color: #fff;
}

/* ---------- Attachments list ---------- */
.sd-attachments {
	margin-bottom: 26px;
}

.sd-attachments-heading {
	font-size: 15px;
	font-weight: 700;
	color: #1a1a2e;
	margin: 0 0 12px;
	padding-bottom: 8px;
	border-bottom: 1px solid #e9e9e9;
}

.sd-attachment-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.sd-attachment-item {
	margin-bottom: 8px;
}

.sd-attachment-link {
	display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 10px;
    border: 1px solid #e4e4e4;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    font-size: 13px;
    transition: border-color 0.2s, background 0.2s;
}

.sd-attachment-link:hover {
	border-color: #56c4b2;
	background: #f4fcfb;
	color: #333;
}

.sd-attachment-link svg {
	flex-shrink: 0;
	color: #56c4b2;
}

.sd-att-name {
	flex: 1 1 auto;
	word-break: break-all;
}

.sd-att-size {
	flex-shrink: 0;
	font-size: 12px;
	color: #888;
}

.sd-attachment-row {
	display: flex;
	align-items: center;
	gap: 8px;
}

.sd-attachment-row .sd-attachment-link {
	flex: 1 1 auto;
	border-radius: 6px 0 0 6px;
	border-right: none;
	display: none;
}

.sd-attachment-row .sd-attachment-link:hover {
	border-right: none;
}

.sd-att-download-btn {
	flex-shrink: 0;
	display: inline-block;
	background: #40BFB9;
	color: #fff;
	font-size: 16px;
	line-height: 15px;
	font-weight: 600;
	padding: 17px 20px 17px 20px;
	border-radius: 9px 9px 9px 9px;
	text-decoration: none;
	border: 1px solid #40BFB9;
	transition: background 0.2s;
	white-space: nowrap;
	font-family: 'Manrope', sans-serif !important;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.30);
}

.sd-att-download-btn:hover {
	background: #3daa98;
	border-color: #3daa98;
	color: #fff;
}

/* ---------- Share row ---------- */
.sd-share {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 4px;
}

.sd-share-label {
	font-size: 15px;
	font-weight: 600;
	color: #333;
}

.sd-share-icons {
	display: flex;
	gap: 8px;
}

.sd-share-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1.5px solid #ddd;
	color: #555;
	transition: border-color 0.2s, color 0.2s;
	text-decoration: none;
}

.sd-share-icon:hover {
	border-color: #56c4b2;
	color: #56c4b2;
}

/* ---------- Private Doc Access Gate ---------- */
.sd-access-gate {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 14px;
	background: #f7fafc;
	border: 1.5px solid #e2eaf0;
	border-radius: 12px;
	padding: 24px 22px;
	margin-top: 8px;
}

.sd-access-gate--pending {
	background: #fffbf2;
	border-color: #f5d87a;
}

.sd-gate-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: #e8f4f8;
	color: #2b7a97;
}

.sd-access-gate--pending .sd-gate-icon {
	background: #fff4d0;
	color: #b07c00;
}

.sd-gate-msg {
	font-size: 14px;
	color: #444;
	line-height: 1.6;
	margin: 0;
}

.sd-gate-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.sd-gate-btn {
	display: inline-block;
	padding: 10px 22px;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: opacity 0.2s;
}

.sd-gate-btn:hover {
	opacity: 0.85;
	text-decoration: none;
}

.sd-gate-btn--login {
	background: #56c4b2;
	color: #fff;
}
.sd-gate-btn--login:hover {	
	color: #fff !important;
}

.sd-gate-btn--register {
	background: transparent;
	color: #56c4b2;
	border: 1.5px solid #56c4b2;
}


/* Full-page gate when entire doc is restricted */
.sd-wrapper--gate-only {
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 60vh;
	padding: 60px 20px;
}

.sd-gate-standalone {
	max-width: 520px;
	width: 100%;
	text-align: center;
}

.sd-gate-standalone .sd-title {
	margin-bottom: 30px;
}

.sd-gate-standalone .sd-access-gate {
	align-items: center;
	text-align: center;
}

/* ---------- Single Doc Responsive ---------- */
@media (max-width: 820px) {
	.sd-container {
		flex-direction: column;
		gap: 30px;
	}

	.sd-image-col,
	.sd-info-col {
		flex: none;
		max-width: 100%;
		width: 100%;
	}
}
