/**
 * AcademyFlow Profile and Jobs - Public Styles
 * Modern professional profile design with RTL support
 */

/* ===========================
   Variables & Reset
   =========================== */
:root {
	--afp-primary: #2563eb;
	--afp-primary-hover: #1d4ed8;
	--afp-primary-light: #eff6ff;
	--afp-primary-border: #bfdbfe;
	--afp-text: #111827;
	--afp-text-light: #6b7280;
	--afp-text-muted: #9ca3af;
	--afp-border: #e5e7eb;
	--afp-border-hover: #d1d5db;
	--afp-bg: #ffffff;
	--afp-bg-page: #f8fafc;
	--afp-bg-disabled: #f9fafb;
	--afp-danger: #ef4444;
	--afp-success: #10b981;
	--afp-warning: #f59e0b;
	--afp-radius: 10px;
	--afp-radius-lg: 16px;
	--afp-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
	--afp-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
	--afp-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
	--afp-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
	--afp-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.afp-profile-container,
.afp-login-container {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	box-sizing: border-box;
}

.afp-profile-container *,
.afp-login-container * {
	box-sizing: border-box;
}

/* ===========================
   Containers
   =========================== */
.afp-login-container {
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 400px;
	padding: 20px;
}

.afp-profile-container {
	display: flex;
	justify-content: center;
	padding: 32px 20px;
	background-color: var(--afp-bg-page);
	min-height: 80vh;
}

.afp-login-form,
.afp-profile-form {
	width: 100%;
	background: var(--afp-bg);
	border-radius: var(--afp-radius-lg);
	box-shadow: var(--afp-shadow-md);
	overflow: hidden;
}

.afp-login-form {
	max-width: 400px;
	padding: 40px;
}

.afp-profile-form {
	max-width: 860px;
	padding: 0;
}

.afp-profile-form .afp-form {
	padding: 0 40px 40px;
}

/* ===========================
   Typography
   =========================== */
.afp-profile-title,
.afp-login-title {
	margin: 0 0 8px 0;
	font-size: 22px;
	font-weight: 700;
	color: var(--afp-text);
	text-align: center;
	letter-spacing: -0.02em;
}

.afp-section-title {
	font-size: 16px;
	font-weight: 600;
	color: var(--afp-text);
	margin: 0 0 20px 0;
	padding-bottom: 12px;
	border-bottom: 2px solid var(--afp-border);
	letter-spacing: -0.01em;
}

.afp-profile-description {
	margin: 0 0 30px 0;
	font-size: 14px;
	color: var(--afp-text-light);
	text-align: center;
	line-height: 1.6;
}

/* ===========================
   Tabs
   =========================== */
.afp-tabs {
	display: flex;
	gap: 0;
	border-bottom: 2px solid var(--afp-border);
	margin-bottom: 0;
	padding: 0 40px;
	background: linear-gradient(to bottom, #f8fafc, #ffffff);
}

.afp-tab-link {
	padding: 14px 28px;
	font-weight: 600;
	font-size: 14px;
	color: var(--afp-text-light);
	cursor: pointer;
	border-bottom: 2px solid transparent;
	margin-bottom: -2px;
	transition: all var(--afp-transition);
	user-select: none;
	letter-spacing: 0.01em;
	white-space: nowrap;
}

.afp-tab-link:hover {
	color: var(--afp-primary);
	background-color: var(--afp-primary-light);
}

.afp-tab-link.active {
	color: var(--afp-primary);
	border-bottom-color: var(--afp-primary);
	background-color: transparent;
}

.afp-tab-content {
	display: none;
	animation: fadeIn 0.3s ease;
	padding-top: 28px;
}

.afp-tab-content.active {
	display: block;
}

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

/* ===========================
   Profile Picture Upload
   =========================== */
.afp-profile-picture-wrapper {
	text-align: center;
	margin-bottom: 30px;
	position: relative;
	width: 120px;
	height: 120px;
	margin-left: auto;
	margin-right: auto;
}

.afp-profile-picture-img {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
	border: 4px solid white;
	box-shadow: var(--afp-shadow-md);
}

.afp-profile-picture-upload-btn {
	position: absolute;
	bottom: 0;
	right: 0;
	background: var(--afp-primary);
	color: white;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all var(--afp-transition);
	box-shadow: var(--afp-shadow-md);
	border: 2px solid white;
}

.afp-profile-picture-upload-btn:hover {
	background: var(--afp-primary-hover);
	transform: scale(1.1);
}

.afp-profile-picture-upload-btn svg {
	width: 16px;
	height: 16px;
}

.afp-hidden-file-input {
	display: none;
}

/* ===========================
   Layout & Grid
   =========================== */
.afp-form-section {
	margin-bottom: 30px;
}

.afp-form-separator {
	height: 1px;
	background: linear-gradient(to right, transparent, var(--afp-border), transparent);
	margin: 32px 0;
}

.afp-grid-row {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
}

@media (min-width: 640px) {
	.afp-grid-row {
		grid-template-columns: 1fr 1fr;
	}
	
	.afp-full-width {
		grid-column: 1 / -1;
	}
}

/* ===========================
   Form Elements
   =========================== */
.afp-form-group {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.afp-form-label {
	font-size: 13px;
	font-weight: 600;
	color: #374151;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.afp-input-wrapper {
	position: relative;
	display: flex;
	align-items: center;
}

.afp-form-input,
.afp-form-select {
	width: 100%;
	padding: 11px 14px;
	border: 1.5px solid var(--afp-border);
	border-radius: var(--afp-radius);
	font-size: 14px;
	color: var(--afp-text);
	background: var(--afp-bg);
	transition: all var(--afp-transition);
	outline: none;
}

.afp-form-input:focus,
.afp-form-select:focus {
	border-color: var(--afp-primary);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.afp-form-input::placeholder {
	color: var(--afp-text-muted);
}

.afp-form-input.afp-disabled {
	background-color: var(--afp-bg-disabled);
	color: #6b7280;
	cursor: not-allowed;
	padding-right: 40px; /* Space for lock icon */
	border-style: dashed;
}

/* RTL Support for Input Padding */
[dir="rtl"] .afp-form-input.afp-disabled {
	padding-right: 14px;
	padding-left: 40px;
}

.afp-lock-icon {
	position: absolute;
	right: 12px;
	color: #9ca3af;
	display: flex;
	align-items: center;
	pointer-events: none;
}

[dir="rtl"] .afp-lock-icon {
	right: auto;
	left: 12px;
}

.afp-form-help {
	font-size: 12px;
	color: var(--afp-text-light);
	margin: 2px 0 0 0;
}

/* ===========================
   Buttons
   =========================== */
.afp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 11px 24px;
	border-radius: var(--afp-radius);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all var(--afp-transition);
	border: 1.5px solid transparent;
	text-decoration: none;
	letter-spacing: 0.01em;
}

.afp-btn-sm {
	padding: 8px 16px;
	font-size: 13px;
}

.afp-btn-primary {
	background: var(--afp-primary);
	color: white;
	width: 100%;
	box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3);
}

.afp-btn-primary:hover {
	background: var(--afp-primary-hover);
	box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
	transform: translateY(-1px);
}

.afp-btn-primary:active {
	transform: translateY(0);
}

.afp-btn-primary:disabled {
	opacity: 0.7;
	cursor: wait;
	transform: none;
}

.afp-btn-outline {
	background-color: transparent;
	border: 1.5px solid var(--afp-border);
	color: var(--afp-text);
}

.afp-btn-outline:hover {
	background-color: var(--afp-bg-page);
	border-color: var(--afp-border-hover);
}

/* Social Buttons */
.afp-social-buttons {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.afp-btn-google,
.afp-btn-linkedin {
	background: white;
	border-color: var(--afp-border);
	color: var(--afp-text);
	width: 100%;
}

.afp-btn-google:hover,
.afp-btn-linkedin:hover {
	background-color: #f9fafb;
	border-color: #9ca3af;
}

.afp-btn-icon {
	width: 20px;
	height: 20px;
	margin-right: 12px;
}

[dir="rtl"] .afp-btn-icon {
	margin-right: 0;
	margin-left: 12px;
}

/* ===========================
   Messages
   =========================== */
.afp-form-message {
	margin-top: 20px;
	padding: 14px 16px;
	border-radius: var(--afp-radius);
	font-size: 14px;
	text-align: center;
	font-weight: 500;
}

.afp-form-message.success {
	background-color: #ecfdf5;
	color: #065f46;
	border: 1px solid #a7f3d0;
}

.afp-form-message.error {
	background-color: #fef2f2;
	color: #991b1b;
	border: 1px solid #fecaca;
}

.afp-alert {
	padding: 14px 18px;
	border-radius: var(--afp-radius);
	margin-bottom: 24px;
	font-size: 14px;
	line-height: 1.6;
	display: flex;
	align-items: center;
	gap: 10px;
}

.afp-alert-success {
	background-color: #d1fae5;
	color: #065f46;
	border: 1px solid #a7f3d0;
}

.afp-alert-warning {
	background-color: #fffbeb;
	color: #92400e;
	border: 1px solid #fde68a;
}

.afp-alert-danger {
	background-color: #fee2e2;
	color: #991b1b;
	border: 1px solid #fecaca;
}

.afp-alert-info {
	background-color: #eff6ff;
	color: #1e40af;
	border: 1px solid #bfdbfe;
}

/* ===========================
   My Courses
   =========================== */
.afp-courses-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); /* Reduced from 240px */
	gap: 20px;
}

.afp-course-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--afp-border);
	border-radius: var(--afp-radius);
	overflow: hidden;
	text-decoration: none;
	transition: all 0.2s ease;
	color: var(--afp-text);
}

.afp-course-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--afp-shadow-lg);
	border-color: var(--afp-primary);
}

.afp-course-image {
	height: 120px; /* Reduced from 140px */
	background-color: #f3f4f6;
	overflow: hidden;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
}

.afp-course-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.afp-course-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	color: #9ca3af;
}

.afp-course-placeholder svg {
	width: 40px; /* Reduced from 48px */
	height: 40px;
}

.afp-course-content {
	padding: 16px;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.afp-course-title {
	margin: 0 0 12px 0;
	font-size: 15px; /* Reduced from 16px */
	font-weight: 600;
	line-height: 1.4;
	color: var(--afp-text);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.afp-course-progress {
	margin-top: auto;
}

.afp-progress-bar {
	height: 6px;
	background-color: #e5e7eb;
	border-radius: 3px;
	overflow: hidden;
	margin-bottom: 6px;
}

.afp-progress-fill {
	height: 100%;
	background-color: var(--afp-success);
	border-radius: 3px;
	transition: width 0.3s ease;
}

.afp-progress-text {
	font-size: 12px;
	color: var(--afp-text-light);
	font-weight: 500;
}

/* ===========================
   Certificates
   =========================== */
.afp-certificates-list {
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.afp-certificate-item {
	display: flex;
	align-items: center;
	padding: 20px;
	background: #fff;
	border: 1px solid var(--afp-border);
	border-radius: var(--afp-radius);
	transition: all 0.2s ease;
}

.afp-certificate-item:hover {
	transform: translateY(-2px);
	box-shadow: var(--afp-shadow);
	border-color: var(--afp-primary);
}

.afp-cert-icon {
	flex-shrink: 0;
	width: 48px;
	height: 48px;
	background-color: #eff6ff;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-right: 20px;
	color: var(--afp-primary);
}

.afp-cert-details {
	flex: 1;
	margin-right: 20px;
}

.afp-cert-title {
	margin: 0 0 5px 0;
	font-size: 16px;
	font-weight: 600;
	color: var(--afp-text);
}

.afp-cert-date {
	font-size: 13px;
	color: var(--afp-text-light);
}

.afp-certificate-item .afp-btn svg {
	margin-right: 8px;
}

.afp-no-content {
	text-align: center;
	padding: 40px 20px;
	color: var(--afp-text-light);
}

.afp-no-content-icon {
	margin-bottom: 15px;
	color: #d1d5db;
}

/* RTL Overrides */
[dir="rtl"] .afp-form-select {
	background-position: left 12px center;
	padding-right: 14px;
	padding-left: 40px;
}

[dir="rtl"] .afp-profile-title,
[dir="rtl"] .afp-login-title,
[dir="rtl"] .afp-section-title,
[dir="rtl"] .afp-form-label,
[dir="rtl"] .afp-form-help {
	text-align: right;
}

[dir="rtl"] .afp-profile-picture-upload-btn {
	right: auto;
	left: 0;
}

[dir="rtl"] .afp-cert-icon {
	margin-right: 0;
	margin-left: 20px;
}

[dir="rtl"] .afp-cert-details {
	margin-right: 0;
	margin-left: 20px;
}

[dir="rtl"] .afp-certificate-item .afp-btn svg {
	margin-right: 0;
	margin-left: 8px;
}

/* ===========================
   Repeater Fields
   =========================== */
.afp-section-header-row {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
border-bottom: 1px solid #e5e7eb;
padding-bottom: 10px;
}

.afp-section-header-row .afp-section-title {
margin: 0;
border: none;
padding: 0;
}

.afp-repeater-container {
display: flex;
flex-direction: column;
gap: 20px;
}

.afp-repeater-item {
background: #fff;
border: 1px solid var(--afp-border);
border-radius: var(--afp-radius);
overflow: hidden;
}

.afp-repeater-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 15px 20px;
background: #f9fafb;
border-bottom: 1px solid var(--afp-border);
}

.afp-repeater-title {
font-weight: 600;
color: var(--afp-text);
}

.afp-remove-item-btn {
background: transparent;
border: none;
color: var(--afp-danger);
cursor: pointer;
padding: 5px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 4px;
transition: all 0.2s ease;
}

.afp-remove-item-btn:hover {
background: #fee2e2;
}

.afp-repeater-content {
padding: 20px;
}

.afp-checkbox-label {
display: flex;
align-items: center;
gap: 8px;
margin-top: 8px;
font-size: 14px;
color: var(--afp-text);
cursor: pointer;
}

/* ===========================
   Cover Image Upload (Edit Form)
   =========================== */
.afp-cover-image-wrapper {
	position: relative;
	width: 100%;
	height: 220px;
	border-radius: var(--afp-radius-lg) var(--afp-radius-lg) 0 0;
	overflow: hidden;
	margin-bottom: 0;
	background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 50%, #7c3aed 100%);
}

.afp-cover-image-wrapper img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.afp-cover-upload-btn {
	position: absolute;
	bottom: 14px;
	right: 14px;
	background: rgba(0, 0, 0, 0.55);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	color: white;
	padding: 8px 16px;
	border-radius: var(--afp-radius);
	cursor: pointer;
	font-size: 13px;
	font-weight: 500;
	display: flex;
	align-items: center;
	gap: 6px;
	transition: all var(--afp-transition);
	border: 1px solid rgba(255, 255, 255, 0.15);
}

.afp-cover-upload-btn:hover {
	background: rgba(0, 0, 0, 0.75);
}

.afp-cover-upload-btn svg {
	width: 16px;
	height: 16px;
}

[dir="rtl"] .afp-cover-upload-btn {
	right: auto;
	left: 12px;
}

/* Profile picture overlapping cover */
.afp-has-cover .afp-profile-picture-wrapper {
	margin-top: -60px;
	z-index: 2;
	position: relative;
}

/* ===========================
   About / Bio Section
   =========================== */
.afp-about-textarea {
	width: 100%;
	min-height: 120px;
	padding: 14px;
	border: 1px solid var(--afp-border);
	border-radius: var(--afp-radius);
	font-size: 15px;
	color: var(--afp-text);
	background: var(--afp-bg);
	font-family: inherit;
	line-height: 1.6;
	resize: vertical;
	transition: border-color 0.2s ease;
	outline: none;
}

.afp-about-textarea:focus {
	border-color: var(--afp-primary);
	box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.afp-char-count {
	font-size: 12px;
	color: var(--afp-text-light);
	text-align: right;
	margin-top: 4px;
}

/* ===========================
   Skills Section
   =========================== */
.afp-skills-input-wrapper {
	display: flex;
	gap: 10px;
	margin-bottom: 15px;
}

.afp-skills-input-wrapper .afp-form-input {
	flex: 1;
}

.afp-skills-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.afp-skill-tag {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 14px;
	background: #eff6ff;
	color: var(--afp-primary);
	border: 1px solid #bfdbfe;
	border-radius: 20px;
	font-size: 13px;
	font-weight: 500;
}

.afp-skill-remove {
	background: none;
	border: none;
	color: var(--afp-primary);
	cursor: pointer;
	padding: 0;
	display: flex;
	align-items: center;
	opacity: 0.6;
	transition: opacity 0.2s;
}

.afp-skill-remove:hover {
	opacity: 1;
}

.afp-skill-remove svg {
	width: 14px;
	height: 14px;
}

.afp-btn-add-skill {
	flex-shrink: 0;
}

/* ===========================
   Public Profile - LinkedIn-like Cards
   =========================== */
.afp-public-profile-wrapper {
	max-width: 900px;
	margin: 0 auto;
	padding: 20px;
	background: #f4f2ee;
	min-height: 100vh;
}

.afp-public-card {
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.05);
	margin-bottom: 8px;
}

/* Public Cover Image */
.afp-public-cover {
	width: 100%;
	height: 200px;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	border-radius: 8px 8px 0 0;
	overflow: hidden;
}

.afp-public-cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Public Header (below cover) */
.afp-public-header-content {
	padding: 0 24px 24px;
	position: relative;
}

.afp-public-avatar {
	width: 152px;
	height: 152px;
	border-radius: 50%;
	object-fit: cover;
	border: 4px solid #fff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	margin-top: -76px;
	display: block;
}

.afp-public-name {
	font-size: 24px;
	font-weight: 600;
	margin: 16px 0 4px;
	color: rgba(0, 0, 0, 0.9);
	display: flex;
	align-items: center;
	gap: 8px;
}

.afp-verified-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	background: var(--afp-primary);
	color: white;
	border-radius: 50%;
	font-size: 12px;
	font-weight: 700;
}

.afp-public-headline {
	font-size: 16px;
	color: rgba(0, 0, 0, 0.9);
	margin: 0 0 8px;
	line-height: 1.4;
}

.afp-public-location {
	font-size: 14px;
	color: rgba(0, 0, 0, 0.6);
	display: flex;
	align-items: center;
	gap: 4px;
}

.afp-public-meta-row {
	display: flex;
	gap: 16px;
	margin-top: 4px;
	font-size: 14px;
	color: rgba(0, 0, 0, 0.6);
}

/* Public Section Styling */
.afp-public-card .afp-section-heading {
	font-size: 20px;
	font-weight: 600;
	margin: 0 0 16px;
	padding: 24px 24px 0;
	color: rgba(0, 0, 0, 0.9);
	border: none;
}

.afp-public-card .afp-public-item {
	padding: 12px 24px 16px;
	border-bottom: 1px solid #e0e0e0;
}

.afp-public-card .afp-public-item:last-child {
	border-bottom: none;
	padding-bottom: 24px;
}

.afp-public-item .afp-item-title {
	font-weight: 600;
	font-size: 16px;
	color: rgba(0, 0, 0, 0.9);
	margin: 0 0 4px;
}

.afp-public-item .afp-item-subtitle {
	color: rgba(0, 0, 0, 0.9);
	font-size: 14px;
	margin: 0 0 2px;
}

.afp-public-item .afp-item-date {
	color: rgba(0, 0, 0, 0.6);
	font-size: 14px;
	margin-bottom: 8px;
	display: block;
}

.afp-public-item .afp-item-desc {
	color: rgba(0, 0, 0, 0.9);
	font-size: 14px;
	line-height: 1.5;
	white-space: pre-line;
}

/* Public About Section */
.afp-public-about {
	padding: 24px;
	font-size: 14px;
	line-height: 1.6;
	color: rgba(0, 0, 0, 0.9);
	white-space: pre-line;
}

/* Public Skills */
.afp-public-skills {
	padding: 0 24px 24px;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.afp-public-skill-pill {
	display: inline-block;
	padding: 6px 16px;
	background: #f3f2ef;
	color: rgba(0, 0, 0, 0.9);
	border-radius: 16px;
	font-size: 14px;
	font-weight: 600;
	border: 1px solid #e0e0e0;
}

/* Public Project Image */
.afp-project-img {
	width: 100%;
	max-height: 300px;
	object-fit: cover;
	border-radius: 8px;
	margin: 10px 0;
	border: 1px solid #e0e0e0;
}

.afp-project-link {
	display: inline-block;
	margin-top: 8px;
	color: var(--afp-primary);
	text-decoration: none;
	font-size: 14px;
	font-weight: 600;
}

.afp-project-link:hover {
	text-decoration: underline;
}

/* Public Courses Grid */
.afp-public-courses-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 16px;
	padding: 0 24px 24px;
}

.afp-public-course-card {
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	display: block;
	transition: box-shadow 0.2s;
}

.afp-public-course-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.afp-public-course-img {
	width: 100%;
	height: 120px;
	object-fit: cover;
	background: #f3f2ef;
}

.afp-public-course-info {
	padding: 12px;
}

.afp-public-course-name {
	font-weight: 600;
	font-size: 14px;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Responsive */
@media (max-width: 640px) {
	.afp-public-avatar {
		width: 100px;
		height: 100px;
		margin-top: -50px;
	}

	.afp-public-cover {
		height: 150px;
	}

	.afp-cover-image-wrapper {
		height: 150px;
	}

	.afp-public-name {
		font-size: 20px;
	}

	.afp-tabs {
		padding: 0 20px;
		overflow-x: auto;
	}

	.afp-tab-link {
		padding: 12px 18px;
		font-size: 13px;
	}

	.afp-profile-form .afp-form {
		padding: 0 20px 28px;
	}

	.afp-profile-header-row {
		flex-direction: column;
		align-items: stretch;
	}

	.afp-share-dropdown {
		right: auto;
		left: 0;
	}
}

/* ===========================
   Profile Header Row (Visibility + URL + Share)
   =========================== */
.afp-profile-header-row {
	display: flex;
	align-items: flex-start;
	gap: 20px;
	padding: 20px 40px 0;
	margin-bottom: 0;
}

@media (max-width: 640px) {
	.afp-profile-header-row {
		padding: 16px 20px 0;
	}
}

.afp-profile-header-row .afp-form-group {
	flex: 1;
	min-width: 0;
}

/* ===========================
   Share Button & Dropdown
   =========================== */
.afp-share-wrapper {
	position: relative;
	display: inline-flex;
}

.afp-share-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 8px 14px;
	background: var(--afp-primary-light);
	color: var(--afp-primary);
	border: 1.5px solid var(--afp-primary-border);
	border-radius: var(--afp-radius);
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
	transition: all var(--afp-transition);
	white-space: nowrap;
}

.afp-share-btn:hover {
	background: var(--afp-primary);
	color: white;
	border-color: var(--afp-primary);
}

.afp-share-btn svg {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
}

.afp-share-dropdown {
	display: none;
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	background: var(--afp-bg);
	border: 1px solid var(--afp-border);
	border-radius: 12px;
	box-shadow: var(--afp-shadow-lg);
	min-width: 220px;
	z-index: 1000;
	padding: 6px;
	animation: afpDropIn 0.2s ease;
}

.afp-share-dropdown.active {
	display: block;
}

@keyframes afpDropIn {
	from { opacity: 0; transform: translateY(-6px); }
	to { opacity: 1; transform: translateY(0); }
}

.afp-share-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 14px;
	border-radius: 8px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
	color: var(--afp-text);
	transition: background var(--afp-transition);
	text-decoration: none;
	border: none;
	background: none;
	width: 100%;
	text-align: left;
}

[dir="rtl"] .afp-share-item {
	text-align: right;
}

.afp-share-item:hover {
	background-color: var(--afp-bg-page);
}

.afp-share-item svg {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
}

.afp-share-item .afp-share-icon-linkedin { color: #0A66C2; }
.afp-share-item .afp-share-icon-twitter { color: #1DA1F2; }
.afp-share-item .afp-share-icon-facebook { color: #1877F2; }
.afp-share-item .afp-share-icon-whatsapp { color: #25D366; }
.afp-share-item .afp-share-icon-copy { color: var(--afp-text-light); }

.afp-share-sep {
	height: 1px;
	background: var(--afp-border);
	margin: 4px 8px;
}

.afp-share-copied {
	color: var(--afp-success) !important;
	font-weight: 600;
}

/* ===========================
   Profile URL Row
   =========================== */
.afp-url-share-row {
	display: flex;
	align-items: stretch;
	gap: 10px;
}

.afp-url-share-row .afp-form-group {
	flex: 1;
	min-width: 0;
}

.afp-url-input-bar {
	display: flex;
	align-items: stretch;
	border: 1.5px solid var(--afp-border);
	border-radius: var(--afp-radius);
	overflow: hidden;
	background: var(--afp-bg);
	transition: border-color var(--afp-transition);
}

.afp-url-input-bar:focus-within {
	border-color: var(--afp-primary);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.afp-url-prefix {
	background: var(--afp-bg-page);
	border-right: 1px solid var(--afp-border);
	padding: 0 12px;
	color: var(--afp-text-light);
	font-size: 13px;
	display: flex;
	align-items: center;
	white-space: nowrap;
	height: 38px;
	flex-shrink: 0;
}

.afp-url-input-bar .afp-form-input {
	border: none;
	border-radius: 0;
	height: 38px;
	min-width: 100px;
	padding: 0 10px;
	font-size: 14px;
	box-shadow: none;
}

.afp-url-input-bar .afp-form-input:focus {
	box-shadow: none;
}

.afp-url-view-btn {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 0 12px;
	background: transparent;
	border: none;
	border-left: 1px solid var(--afp-border);
	color: var(--afp-primary);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
	text-decoration: none;
	transition: background var(--afp-transition);
}

.afp-url-view-btn:hover {
	background: var(--afp-primary-light);
}

/* ===========================
   Form Actions
   =========================== */
.afp-form-actions {
	margin-top: 32px;
}

.afp-form-actions .afp-btn-primary {
	padding: 14px 24px;
	font-size: 15px;
	border-radius: var(--afp-radius);
}

/* ===========================
   Public Profile - Share Bar
   =========================== */
.afp-public-share-bar {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 16px 24px;
	border-top: 1px solid #e0e0e0;
}

.afp-public-share-bar .afp-share-btn {
	font-size: 14px;
	padding: 10px 20px;
}

/* ===========================
   Course Advertisement Section
   =========================== */
.afp-courses-ad-card {
	background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
	border: 2px solid #e0e0e0 !important;
}

.afp-courses-ad-heading {
	display: flex;
	align-items: center;
	gap: 12px;
	color: var(--afp-primary) !important;
}

.afp-courses-ad-icon {
	width: 28px;
	height: 28px;
	color: var(--afp-primary);
	flex-shrink: 0;
}

.afp-courses-ad-subtitle {
	padding: 0 24px 16px;
	font-size: 14px;
	color: rgba(0, 0, 0, 0.6);
	margin: -8px 0 0 0;
	text-align: center;
}

.afp-courses-ad-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 20px;
	padding: 0 24px 24px;
}

.afp-course-ad-card {
	display: flex;
	flex-direction: column;
	background: white;
	border: 1.5px solid #e0e0e0;
	border-radius: 10px;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.afp-course-ad-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
	border-color: var(--afp-primary);
}

.afp-course-ad-image {
	width: 100%;
	height: 160px;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	overflow: hidden;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
}

.afp-course-ad-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.afp-course-ad-card:hover .afp-course-ad-image img {
	transform: scale(1.05);
}

.afp-course-ad-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	color: rgba(255, 255, 255, 0.7);
}

.afp-course-ad-placeholder svg {
	width: 48px;
	height: 48px;
}

.afp-course-ad-content {
	padding: 18px;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.afp-course-ad-title {
	font-size: 16px;
	font-weight: 600;
	color: rgba(0, 0, 0, 0.9);
	margin: 0 0 8px 0;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 44px;
}

.afp-course-ad-excerpt {
	font-size: 13px;
	color: rgba(0, 0, 0, 0.6);
	line-height: 1.5;
	margin: 0 0 12px 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	flex: 1;
}

.afp-course-ad-cta {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--afp-primary);
	font-size: 14px;
	font-weight: 600;
	margin-top: auto;
	transition: gap 0.2s ease;
}

.afp-course-ad-card:hover .afp-course-ad-cta {
	gap: 10px;
}

.afp-course-ad-cta svg {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	transition: transform 0.2s ease;
}

.afp-course-ad-card:hover .afp-course-ad-cta svg {
	transform: translateX(3px);
}

[dir="rtl"] .afp-course-ad-card:hover .afp-course-ad-cta svg {
	transform: translateX(-3px);
}

.afp-courses-ad-footer {
	padding: 0 24px 24px;
	text-align: center;
	border-top: 1px solid #e0e0e0;
	padding-top: 20px;
	margin-top: 4px;
}

.afp-courses-ad-view-all {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 28px;
	background: var(--afp-primary);
	color: white;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	transition: all 0.3s ease;
	box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.afp-courses-ad-view-all:hover {
	background: var(--afp-primary-hover);
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.afp-courses-ad-view-all svg {
	width: 18px;
	height: 18px;
	transition: transform 0.2s ease;
}

.afp-courses-ad-view-all:hover svg {
	transform: translateX(3px);
}

[dir="rtl"] .afp-courses-ad-view-all:hover svg {
	transform: translateX(-3px);
}

/* Responsive adjustments for course ads */
@media (max-width: 768px) {
	.afp-courses-ad-grid {
		grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
		gap: 16px;
	}

	.afp-course-ad-image {
		height: 140px;
	}

	.afp-course-ad-title {
		font-size: 15px;
	}
}

@media (max-width: 640px) {
	.afp-courses-ad-grid {
		grid-template-columns: 1fr;
		padding: 0 16px 20px;
	}

	.afp-courses-ad-subtitle {
		padding: 0 16px 12px;
	}

	.afp-courses-ad-footer {
		padding: 16px 16px 20px;
	}
}
