/**
 * WP Free Content Manager - Premium Stylesheet
 */

/* Core grid layout */
.wp-fcm-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
	gap: 28px;
	margin: 20px 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Card Styling */
.wp-fcm-card {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
	transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
	display: flex;
	flex-direction: column;
	cursor: pointer;
	position: relative;
}

.wp-fcm-card:hover {
	transform: translateY(-8px);
	box-shadow: 0 16px 36px rgba(99, 102, 241, 0.12);
	border-color: rgba(99, 102, 241, 0.3);
}

/* Thumbnail and placeholders */
.wp-fcm-card-thumbnail {
	height: 180px;
	position: relative;
	overflow: hidden;
	background: #f1f5f9;
}

.wp-fcm-card-thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.wp-fcm-card:hover .wp-fcm-card-thumbnail img {
	transform: scale(1.06);
}

.wp-fcm-placeholder-thumb {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
}

.wp-fcm-placeholder-thumb .dashicons {
	font-size: 60px;
	width: 60px;
	height: 60px;
	transition: transform 0.4s ease;
}

.wp-fcm-card:hover .wp-fcm-placeholder-thumb .dashicons {
	transform: scale(1.15);
}

/* Placeholder gradients per type */
.wp-fcm-placeholder-thumb.type-video {
	background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
	color: #4f46e5;
}

.wp-fcm-placeholder-thumb.type-pdf {
	background: linear-gradient(135deg, #ffe4e6 0%, #fecdd3 100%);
	color: #e11d48;
}

.wp-fcm-placeholder-thumb.type-tool {
	background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
	color: #059669;
}

/* Card Info */
.wp-fcm-card-content {
	padding: 24px;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

/* Badges */
.wp-fcm-badge {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 4px 10px;
	border-radius: 9999px;
	margin-bottom: 14px;
}

.wp-fcm-badge .dashicons {
	font-size: 14px;
	width: 14px;
	height: 14px;
}

.wp-fcm-badge.type-video {
	background: rgba(99, 102, 241, 0.08);
	color: #4f46e5;
	border: 1px solid rgba(99, 102, 241, 0.15);
}

.wp-fcm-badge.type-pdf {
	background: rgba(225, 29, 72, 0.08);
	color: #e11d48;
	border: 1px solid rgba(225, 29, 72, 0.15);
}

.wp-fcm-badge.type-tool {
	background: rgba(5, 150, 105, 0.08);
	color: #059669;
	border: 1px solid rgba(5, 150, 105, 0.15);
}

.wp-fcm-card-title {
	font-size: 18px;
	line-height: 1.4;
	font-weight: 600;
	color: #0f172a;
	margin: 0 0 10px 0;
	transition: color 0.3s ease;
}

.wp-fcm-card:hover .wp-fcm-card-title {
	color: #4f46e5;
}

.wp-fcm-card-excerpt {
	font-size: 14px;
	line-height: 1.6;
	color: #64748b;
	margin: 0 0 20px 0;
	flex-grow: 1;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Buttons and CTAs */
.wp-fcm-card-btn {
	background: #f8fafc;
	color: #475569;
	border: 1px solid #e2e8f0;
	padding: 10px 18px;
	font-size: 13px;
	font-weight: 600;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.2s ease;
	text-align: center;
	width: 100%;
}

.wp-fcm-card:hover .wp-fcm-card-btn {
	background: #4f46e5;
	color: #ffffff;
	border-color: #4f46e5;
}

/* ==========================================
   MODAL POPUP STYLES (Premium & Glassmorphic)
   ========================================== */
.wp-fcm-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
}

.wp-fcm-modal-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(15, 23, 42, 0.45);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	animation: wpFCMFadeIn 0.3s ease-out forwards;
}

.wp-fcm-modal-container {
	position: relative;
	background: #ffffff;
	border-radius: 24px;
	width: 90%;
	max-width: 540px;
	max-height: 85vh;
	box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
	overflow-y: auto;
	z-index: 2;
	animation: wpFCMSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
	display: flex;
	flex-direction: column;
	border: 1px solid rgba(255, 255, 255, 0.8);
}

.wp-fcm-modal-header {
	padding: 24px 28px 12px 28px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 1px solid #f1f5f9;
}

.wp-fcm-modal-close {
	background: #f1f5f9;
	border: none;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	color: #64748b;
	cursor: pointer;
	transition: all 0.2s ease;
}

.wp-fcm-modal-close:hover {
	background: #e2e8f0;
	color: #0f172a;
}

.wp-fcm-modal-body {
	padding: 24px 28px;
	flex-grow: 1;
}

.wp-fcm-modal-title {
	font-size: 22px;
	line-height: 1.4;
	font-weight: 700;
	color: #0f172a;
	margin: 0 0 16px 0;
}

.wp-fcm-modal-summary {
	font-size: 15px;
	line-height: 1.7;
	color: #334155;
	white-space: pre-line;
}

.wp-fcm-modal-footer {
	padding: 20px 28px 28px 28px;
	background: #f8fafc;
	border-top: 1px solid #f1f5f9;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

/* Action buttons in Modal Footer */
.wp-fcm-modal-btn {
	padding: 12px 24px;
	font-size: 14px;
	font-weight: 600;
	border-radius: 10px;
	cursor: pointer;
	text-decoration: none !important;
	text-align: center;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	transition: all 0.2s ease;
}

/* Primary View button */
.wp-fcm-modal-btn-primary {
	background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
	color: #ffffff !important;
	border: none;
	box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.wp-fcm-modal-btn-primary:hover {
	background: linear-gradient(135deg, #4338ca 0%, #3730a3 100%);
	box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
	transform: translateY(-1px);
}

/* Demo Register button */
.wp-fcm-modal-btn-register {
	background: linear-gradient(135deg, #10b981 0%, #059669 100%);
	color: #ffffff !important;
	border: none;
	box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.wp-fcm-modal-btn-register:hover {
	background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
	box-shadow: 0 6px 16px rgba(16, 185, 129, 0.3);
	transform: translateY(-1px);
}

/* Secondary Login button */
.wp-fcm-modal-btn-secondary {
	background: #ffffff;
	color: #334155 !important;
	border: 1px solid #d8e2ef;
}

.wp-fcm-modal-btn-secondary:hover {
	background: #f1f5f9;
	color: #0f172a !important;
	border-color: #cbd5e1;
}

/* Animations */
@keyframes wpFCMFadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes wpFCMSlideUp {
	from {
		opacity: 0;
		transform: translateY(30px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ==========================================
   SINGLE POST DETAIL INJECTIONS
   ========================================== */
.wp-fcm-video-container {
	position: relative;
	width: 100%;
	padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
	height: 0;
	overflow: hidden;
	border-radius: 16px;
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
	margin: 24px 0;
	background: #000;
}

.wp-fcm-video-container iframe,
.wp-fcm-video-container video,
.wp-fcm-video-container embed,
.wp-fcm-video-container object {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.wp-fcm-pdf-container {
	margin: 24px 0;
}

.wp-fcm-pdf-download-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
	color: #ffffff !important;
	padding: 14px 28px;
	border-radius: 12px;
	font-weight: 600;
	font-size: 16px;
	text-decoration: none !important;
	box-shadow: 0 4px 14px rgba(225, 29, 72, 0.25);
	transition: all 0.2s ease;
}

.wp-fcm-pdf-download-btn:hover {
	background: linear-gradient(135deg, #be123c 0%, #9f1239 100%);
	box-shadow: 0 6px 20px rgba(225, 29, 72, 0.35);
	transform: translateY(-1px);
}

.wp-fcm-pdf-download-btn .dashicons {
	font-size: 20px;
	width: 20px;
	height: 20px;
}

.wp-fcm-tool-container {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 16px;
	padding: 30px;
	margin: 24px 0;
	box-shadow: inset 0 2px 4px rgba(15, 23, 42, 0.02);
}

.wp-fcm-error {
	background: #fef2f2;
	border-left: 4px solid #ef4444;
	color: #991b1b;
	padding: 16px 20px;
	border-radius: 8px;
	font-size: 15px;
	margin: 20px 0;
}
.wp-fcm-error a {
	color: #b91c1c;
	text-decoration: underline;
	font-weight: 600;
}
.wp-fcm-error a:hover {
	color: #7f1d1d;
}

/* ==========================================
   SIDEBAR REMOVAL & FULL-WIDTH FOR SINGLE PAGES
   ========================================== */
.single-free_content #secondary,
.single-free_content .secondary,
.single-free_content #sidebar,
.single-free_content .sidebar,
.single-free_content #sidebar-left,
.single-free_content .sidebar-left,
.single-free_content #sidebar-right,
.single-free_content .sidebar-right,
.single-free_content .widget-area,
.single-free_content aside {
	display: none !important;
}

/* Center the main article wrapper for free content */
.single-free_content article.type-free_content,
.single-free_content article.free_content {
	max-width: 900px !important;
	width: 100% !important;
	margin-left: auto !important;
	margin-right: auto !important;
	float: none !important;
	padding-left: 20px !important;
	padding-right: 20px !important;
	box-sizing: border-box !important;
}

/* Stretch parent content containers to full width */
.single-free_content #primary,
.single-free_content .primary,
.single-free_content #main,
.single-free_content .main,
.single-free_content .content-area,
.single-free_content .site-main,
.single-free_content #wrap-content,
.single-free_content .wrap-content,
.single-free_content #content,
.single-free_content .site-content {
	width: 100% !important;
	max-width: 100% !important;
	flex: 0 0 100% !important;
	grid-column: 1 / -1 !important;
	float: none !important;
	border: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

.single-free_content .site-content,
.single-free_content .content-wrapper,
.single-free_content .row,
.single-free_content .container-wrapper,
.single-free_content .wrap-main {
	display: block !important;
}

/* Hide featured image/thumbnail on single free_content pages */
.single-free_content .post-thumbnail,
.single-free_content .featured-image,
.single-free_content .entry-featured-image,
.single-free_content .post-image,
.single-free_content .wp-post-image:not(.wp-fcm-card img),
.single-free_content .ast-single-post-banner,
.single-free_content .hero-section-featured-image,
.single-free_content .single-post-thumbnail {
	display: none !important;
}

