/* =================================================
   E-Med Seminars — frontend
   ================================================= */

/* Force RTL on plugin's own containers — independent of site direction. */
.emed-archive,
.emed-single {
	direction: rtl;
	text-align: right;
	width: 100%;
	border-top: 1px solid #1e293b52;
}

.emed-archive .container,
.emed-single .container {
	max-width: 1750px;
	margin: 0 auto;
	padding: 0 20px;
}

/* ---------- Archive ---------- */
.emed-archive {
	padding: 40px 0;
}

.emed-archive-header {
	margin-bottom: 24px;
}

.emed-archive-title {
	margin: 0 0 8px;
}

.emed-archive-filters {
	display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    padding: 10px 30px;
    margin-bottom: 40px;
    border: 1px solid #dedede;
    border-radius: 35px;
    justify-content: space-between;
}

.emed-filter input,
.emed-filter select {
	min-height: 38px;
	padding: 6px 10px;
	border: 1px solid #dedede;
	border-radius: 4px;
	background: #fff;
}
.emed-filter select {
	appearance: none;
	    padding-left: 30px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236b7280'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z' clip-rule='evenodd'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: left 8px center;
	background-size: 16px;
	min-width: 240px;
	max-width: 240px;
	font-size: 15px;
}

.emed-filter-search input {
	min-width: 240px;
}
.emed-filter-search input:focus, .emed-filter select:focus, .emed-filter input:focus, .emed-filter-search input:hover, .emed-filter select:hover, .emed-filter input:hover {
	outline: none;
    box-shadow: none; /* מונע גם צללים כחולים/אפורים בחלק מהדפדפנים */
}

.emed-filter-reset {
	margin-left: 4px;
	color: #6b7280;
	font-size: 13px;
}

/* Grid */
.emed-grid {
	--grid-row-gap: 35px;
	--grid-column-gap: 30px;
	margin: 0;
	padding: 0;
	display: grid;
	box-sizing: border-box;
	align-items: stretch;
	grid-template-columns: repeat(4, 1fr);
	grid-row-gap: var(--grid-row-gap);
	grid-column-gap: var(--grid-column-gap);
}


/* Card — mirrors the Elementor post card used elsewhere on the site so
   the seminars archive is visually consistent with the rest of E-med. */
.emed-grid .emed_seminars-post {
	display: flex;
	margin: 0;
	padding: 0;
	min-width: 0;
	clear: both;
	width: 100%;
	float: left;
	position: relative;
	border: 0;
	vertical-align: baseline;
}

.emed-grid .emed_seminars-post__card {
	border-radius: 14px;
	box-shadow: 0 0 10px 0 rgba(0, 0, 0, .15);
	background-color: #fff;
	border: 0 solid #69727d;
	display: flex;
	flex-direction: column;
	min-height: 100%;
	overflow: hidden;
	position: relative;
	transition: all .25s;
	width: 100%;
}

.emed-grid .emed_seminars-post__thumbnail-wrap {
	position: relative;
}

.emed-grid .emed_seminars-post__thumbnail-link {
	margin-bottom: 20px;
	max-height: 240px;
	overflow: hidden;
	border-radius: 14px 14px 0 0;
	width: 100%;
	display: block;
	position: relative;
	color: #1D488F;
	font-family: "Noto Sans Hebrew", "Noto Sans Hebrew", sans-serif;
}

.emed-grid .emed_seminars-post__thumbnail {
	padding-bottom: calc(0.66 * 100%);
	position: relative;
	-webkit-transform-style: preserve-3d;
	transform-style: preserve-3d;
	overflow: hidden;
}

.emed-grid .emed_seminars-post__thumbnail img {
	width: calc(100% + 1px);
	display: block;
	max-height: none;
	max-width: none;
	transition: filter .3s;
	border: none;
	border-radius: 0;
	box-shadow: none;
	height: auto;
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	object-fit: cover;
	min-height: 100%;
}

.emed-grid .emed-card-thumb-placeholder {
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, #eef2ff, #e0e7ff);
}

/* Category badges — top of the thumbnail, one chip per category.
   Rendered as a sibling of the thumbnail link (not nested) to keep the HTML
   valid; the wrap is the positioned ancestor. */
/* Category badges container — top-right of the thumbnail. Pill chips per
   category (rendered as <span> siblings of the thumbnail link). */
.emed-grid .emed_seminars-cat-badges {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 3;
	display: flex;
	flex-wrap: wrap;
	flex-direction: row;
	align-items: center;
	gap: 15px;
	justify-content: center;
}

.emed-grid .emed_seminars-cat-badges > span {
	border-radius: 14px;
    padding: 2px 15px;
    background: #1B81CF;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.emed-grid .emed-card-badge {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 10px;
	background: rgba(34, 197, 94, 0.95);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	border-radius: 999px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.emed-grid .emed_seminars-post.is-completed .emed_seminars-post__card {
	box-shadow: 0 0 0 2px #4caf50, 0 0 10px 0 rgba(0, 0, 0, .15);
}

.emed-grid .emed_seminars-post__text {
	margin-bottom: 0;
	margin-top: 20px;
	padding: 0 30px;
	width: 100%;
	display: var(--item-display, block);
	flex-direction: column;
	flex-grow: 1;
}

.emed-grid .emed_seminars-post__title {
	margin: 0;
	color: #000E26;
	font-size: 20px;
	line-height: 1.3;
	height: 55px;
    overflow: hidden;
}
.emed-grid .emed_seminars-post__title a {
	color: inherit;
	text-decoration: none;
}

.emed-grid .emed-cards-meta_wrapper {
	display: flex;
	flex-wrap: wrap;
	flex-direction: row;
	justify-content: flex-start;
	align-items: center;
	margin: 5px 0;
}

.emed-grid .emed-cards-author-row {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	gap: 10px;
	align-items: center;
	margin-left: 15px;
}

.emed-grid .emed-cards-author-image img {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	border: none;
	box-shadow: none;
	object-fit: cover;
}

.emed-grid .emed-cards-comments-row {
	font-size: 14px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.emed-grid .emed-cards-comments {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.emed-grid .emed-cards-meta-sep {
	color: #c7cdd6;
}

.emed-grid .emed_seminars-post__excerpt {
	margin-bottom: 10px !important;
	line-height: 1.7;
}

.emed-grid .emed_seminars-post__excerpt p {
	color: #4C536A;
	font-size: 16px;
	line-height: 1.5em;
	margin: 0;
}

.emed-grid .emed_seminars-post__read-more {
	display: flex;
	margin-bottom: 20px;
	justify-content: flex-end;
	font-size: 14px;
	font-weight: 700;
	color: #1D488F;
	box-shadow: none;
	text-decoration: none;
}

/* Legacy aliases — kept so old single-template / sidebar markup that may
   reuse these class names continues to render. */
.emed-card-btn {
	margin-top: auto;
	display: inline-block;
	padding: 8px 18px;
	background: #42A9F8;
	color: #fff;
	text-decoration: none;
	border-radius: 4px;
	text-align: center;
	font-weight: 600;
}
.emed-card-btn:hover {
	background: #1a5a8b;
	color: #fff;
}

.emed-archive-pagination {
	margin-top: 40px;
	text-align: center;
}
.emed-archive-pagination .nav-links {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 6px;
	justify-content: center;
	direction: ltr;
}
.emed-archive-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 10px;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	background: #fff;
	color: #1D488F;
	font-weight: 600;
	text-decoration: none;
	transition: background .2s, border-color .2s, color .2s;
}
.emed-archive-pagination .page-numbers:hover {
	background: #f1f5fb;
	border-color: #1D488F;
}
.emed-archive-pagination .page-numbers.current {
	background: #1D488F;
	border-color: #1D488F;
	color: #fff;
}
.emed-archive-pagination .page-numbers.dots {
	border: 0;
	background: transparent;
	color: #9ca3af;
}
.emed-archive-empty {
	padding: 40px;
	text-align: center;
	color: #6b7280;
	background: #f9fafb;
	border-radius: 8px;
}

/* ---------- Single (layout) ---------- */
.emed-single {
	padding: 40px 0;
}

.emed-single-layout {
	display: grid;
	grid-template-columns: 75% 25%;
	gap: 35px;
	align-items: start;
}

.emed-main {
	min-width: 0;
}

/* RTL-friendly sidebar position: kept on right via grid order */
.emed-sidebar-inner {
	position: sticky;
	top: 20px;
	border: 1px solid #6b728052;
	border-radius: 8px;
	padding: 18px;
}

.emed-sidebar-title {
	margin: 0 0 12px;
	font-size: 16px;
}

.emed-toc {
	list-style: none;
	padding: 0;
	margin: 0 0 16px;
}

.emed-toc-item {
	border-radius: 4px;
	margin-bottom: 4px;
	list-style: none;
}
.emed-toc-item.is-active {
	background: #eef2ff;
}
.emed-toc-item.is-done .emed-toc-label {
	color: #2271b1;
}
.emed-toc-radio input[type="radio" i]:disabled {
    background-color: initial;
}

.emed-toc-radio input:disabled {
    border-color: #2271b1;
}
.emed-toc-radio input:disabled:checked {
	background-color: #2271b1;
	border-color: #2271b1;
}
.emed-toc-quiz {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid #d1d5db;
}

.emed-toc-link {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 10px;
	color: #1f2937;
	text-decoration: none;
	font-size: 16px;
}
.emed-toc-link:hover {
	background: #eef2ff;
	border-radius: 4px;
}

.emed-toc-radio input {
	pointer-events: none;
	margin: 0;
}

.emed-toc-num {
	color: #9ca3af;
	margin-right: 4px;
}

.emed-back-link {
	display: block;
	margin-top: 10px;
	padding-top: 12px;
	border-top: 1px solid #e5e7eb;
	color: #6b7280;
	text-decoration: none;
	font-size: 15px;
}
.emed-back-link:hover { color: #1f2937; }

/* ---------- Progress bar (shared) ---------- */
.emed-progress { margin-bottom: 24px; }
.emed-progress-bar {
	position: relative;
	height: 10px;
	background: #e5e7eb;
	border-radius: 6px;
	overflow: hidden;
}
.emed-progress-fill {
	height: 100%;
	background: linear-gradient(90deg, #42A9F8, #2271b1);
	transition: width 0.4s ease;
}
.emed-progress-meta {
	display: flex;
	justify-content: space-between;
	margin-top: 6px;
	font-size: 12px;
	color: #6b7280;
}

/* ---------- Completion badge (landing) ---------- */
.emed-completion-badge {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px 18px;
	margin-bottom: 18px;
	background: linear-gradient(135deg, #d1fae5, #a7f3d0);
	border: 1px solid #6b728052;
	border-radius: 8px;
	color: #1f2937;
}
.emed-completion-icon { font-size: 32px; line-height: 1; }
.emed-completion-text { display: flex; flex-direction: column; }
.emed-completion-text strong { font-size: 16px; }
.emed-completion-text span { font-size: 13px; opacity: 0.85; }

/* ---------- Retake notice ---------- */
.emed-quiz-prev-score {
	margin: 0 0 16px;
	padding: 10px 14px;
	background: #fffbeb;
	border: 1px solid #fde68a;
	border-radius: 6px;
	color: #92400e;
	font-size: 14px;
}

.emed-retake-gate {
	padding: 24px;
	text-align: center;
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
}
.emed-retake-prev-score {
	margin: 0 0 6px;
	font-size: 1.3em;
	font-weight: 700;
	color: #1f2937;
}
.emed-retake-warning {
	margin: 0 0 18px;
	color: #6b7280;
	font-size: 14px;
}
.emed-quiz-form.is-hidden { display: none; }

/* ---------- Landing: first-lesson preview ---------- */
.emed-landing-lesson-preview {
	margin-bottom: 24px;
	border-radius: 8px;
	overflow: hidden;
}
.emed-landing-lesson-preview video,
.emed-landing-lesson-preview iframe, .emed-lesson-media iframe {
	width: 100%;
	max-width: 100%;
	display: block;
	max-height: 750px;
}

/* ---------- Landing view ---------- */
.emed-landing-header { margin-bottom: 16px; }
.emed-landing-title  { margin: 0; }
.emed-landing-date {
	margin-top: 6px;
	color: #6b7280;
	font-size: 14px;
}
.emed-landing-content { line-height: 1.7; margin-bottom: 24px; }
.emed-landing-thumb {
	margin-bottom: 24px;
	border-radius: 8px;
	overflow: hidden;
}
.emed-landing-thumb img { width: 100%; height: auto; display: block; }

.emed-landing-actions { text-align: center; }
.emed-start-btn {
	display: inline-block;
	padding: 7px 40px;
	background: #42A9F8;
	color: #fff !important;
	border-radius: 25px;
	text-decoration: none;
	font-weight: 600;
	font-size: 1.1em;
}
.emed-start-btn:hover { background: #1a5a8b; color: #fff; }

/* ---------- Breadcrumbs ---------- */
.emed-breadcrumbs {
	margin-top: 8px;
	font-size: 13px;
	color: #6b7280;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
}
.emed-breadcrumbs a {
	color: #2271b1;
	text-decoration: none;
}
.emed-breadcrumbs a:hover { text-decoration: underline; }
.emed-breadcrumbs-sep { color: #9ca3af; }
.emed-breadcrumbs-current { color: #1f2937; font-weight: 600; }

/* ---------- Lesson view ---------- */
.emed-lesson-header-bar { margin-bottom: 18px; }
.emed-lesson-meta {
	display: flex;
	gap: 12px;
	align-items: center;
	font-size: 13px;
	color: #6b7280;
	margin-bottom: 8px;
}
.emed-lesson-status {
	font-weight: 600;
	padding: 2px 10px;
	border-radius: 999px;
	font-size: 12px;
}
.emed-status-inprogress {
	background: #fef3c7;
	color: #92400e;
}
.emed-status-completed {
	background: #e3eef7;
	color: #2271b1;
}

.emed-lesson-h1 { margin: 0;
	font-size: 30px;
	line-height: 1.3;
}

.emed-lesson-subtitle { line-height: 1.7; margin-bottom: 20px; }
.emed-lesson-media { margin-bottom: 24px; max-height:780px; }
.emed-lesson-media video,
.emed-lesson-media audio,
.emed-lesson-media iframe {
	max-width: 100%;
}

/* ---------- Audio waveform ---------- */
.emed-waveform-wrap {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px 18px;
	background: #0f172a;
	border: 1px solid #1e293b;
	border-radius: 10px;
	direction: ltr;
	box-shadow: 0 4px 14px rgba(15, 23, 42, 0.15);
}

.emed-waveform-btn {
	flex: 0 0 auto;
	width: 46px;
	height: 46px;
	padding: 0 !important;
	border-radius: 50%;
	border: none;
	color: #fff;
	font-size: 15px;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s, transform 0.1s, opacity 0.15s;
}
.emed-waveform-btn:active                  { transform: scale(0.95); }
.emed-waveform-btn:focus                   { outline: 2px solid #9fbfd8; outline-offset: 2px; }
.emed-waveform-btn:disabled                { cursor: default; opacity: 0.45; transform: none; }
.emed-waveform-btn:disabled:hover          { background: inherit; }

.emed-waveform-play         { background: #14b8a6; }
.emed-waveform-play:hover   { background: #0d9488; }

.emed-waveform-pause        { background: #475569; }
.emed-waveform-pause:hover  { background: #334155; }

.emed-waveform-icon { display: inline-block; font-size: 14px; }
.emed-waveform-icon-pause { letter-spacing: -2px; }

.emed-waveform {
	flex: 1 1 auto;
	min-width: 0;
}

.emed-waveform-time {
	flex: 0 0 auto;
	font-size: 12px;
	color: #6b7280;
	font-variant-numeric: tabular-nums;
	min-width: 80px;
	text-align: right;
}

.emed-waveform-fallback {
	width: 100%;
	margin-top: 8px;
}

.emed-lesson-actions {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin-top: 28px;
	padding-top: 20px;
	border-top: 1px solid #e5e7eb;
}

.emed-btn, .emed-filter-submit.button {
	display: inline-block;
	padding: 7px 22px;
	border-radius: 25px !important;
	border: 1px solid transparent;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	font-size: 16px;
	
}
.emed-btn-primary {
	background: #42A9F8;
	color: #fff !important;
}
.emed-btn-primary:hover {
	background: #1a5a8b;
	color: #fff !important;
}
.emed-btn-secondary {
	background: #fff;
	color: #2271b1;
	border-color: #2271b1;
}
.emed-btn-secondary:disabled {
	background: #e3eef7;
	color: #2271b1;
	border-color: #bdccd8;
	cursor: default;
}

/* ---------- Quiz pager + result ---------- */
.emed-quiz-pager {
	margin-bottom: 16px;
	padding: 8px 14px;
	background: #eef2ff;
	border-radius: 4px;
	font-weight: 600;
	color: #2271b1;
	font-size: 15px;
}
.emed-quiz-current { font-weight: 700; }

.emed-quiz-result {
	text-align: center;
	padding: 30px 20px;
}
.emed-quiz-result .emed-quiz-score {
	font-size: 1.6em;
	margin-bottom: 18px;
}

/* ---------- Quiz ---------- */
.emed-quiz {
	margin-top: 8px;
	padding: 20px;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
}
.emed-quiz-question {
	margin: 0 0 20px;
	padding: 14px 18px;
	border: none;
	background: transparent;
}
.emed-quiz-question > legend {
	font-weight: 600;
	padding: 0 6px;
	margin-bottom: 0.5rem;
}
.emed-q-num { display: none; }

.emed-quiz-answer {
	display: block;
	padding: 8px 10px;
	margin: 6px 0;
	cursor: pointer;
	border: 1px solid #eee;
	border-radius: 6px;
	background: #fafafa;
}
.emed-quiz-answer:hover { background: #f0f0f0; }
.emed-quiz.is-done .emed-quiz-answer { cursor: default; }
.emed-quiz.is-done .emed-quiz-answer:hover { background: transparent; }
.emed-quiz-answer.is-correct {
	background: #d1fae5;
	border-left: 3px solid #4caf50;
}
.emed-quiz-answer.is-wrong {
	background: #fee2e2;
	border-left: 3px solid #e53935;
}
.emed-quiz-answer input { margin-right: 8px; }

.emed-quiz-actions {
	margin-top: 16px;
	text-align: right;
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 14px;
}
.emed-quiz-score {
	margin: 0;
	font-size: 1.2em;
	font-weight: 600;
	color: #1f2937;
}

/* ---------- Login gate ---------- */
.emed-seminar-locked {
	margin-top: 24px;
	padding: 20px;
	background: #fff8e1;
	border: 1px solid #ffe082;
	border-radius: 6px;
	text-align: center;
}
.emed-seminar-locked-btn {
	display: inline-block;
	margin-top: 8px;
	padding: 8px 16px;
	background: #42A9F8;
	color: #fff;
	text-decoration: none;
	border: 0;
	border-radius: 4px;
	font: inherit;
	cursor: pointer;
}
.emed-seminar-locked-btn:hover,
.emed-seminar-locked-btn:focus { background: #1a5a8b; color: #fff; }

/* ---------- RTL polish ---------- */
.emed-single .emed-toc-num,
.emed-single .emed-q-num { margin-left: 4px; margin-right: 0; }

.emed-single .emed-quiz-answer input { margin-left: 8px; margin-right: 0; }
.emed-single .emed-quiz-answer.is-correct {
	border-left: none;
	border-right: 3px solid #4caf50;
}
.emed-single .emed-quiz-answer.is-wrong {
	border-left: none;
	border-right: 3px solid #e53935;
}

.emed-single .emed-quiz-actions { justify-content: flex-start; }
.emed-single .emed-lesson-actions { flex-direction: row-reverse; justify-content: space-between; }


@media (max-width: 1400px) {
	.emed-grid { grid-template-columns: repeat(3, 1fr); }
	.emed-single-layout {
    grid-template-columns: 70% 28%;}
	.emed-landing-lesson-preview video, .emed-landing-lesson-preview iframe, .emed-lesson-media iframe {
   max-height: 600px;
}
}
@media (max-width: 1200px) {
	.emed-landing-lesson-preview video, .emed-landing-lesson-preview iframe, .emed-lesson-media iframe {
   max-height: 350px;
}
}

@media (max-width: 900px) {
	.emed-grid { grid-template-columns: repeat(2, 1fr); }
	.emed-landing-lesson-preview video, .emed-landing-lesson-preview iframe, .emed-lesson-media iframe {
   max-height: 450px;
}
	
	.emed-single-layout { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
	.emed-archive-filters { padding: 20px; border-radius: 30px; }
	.emed-lesson-h1 { margin: 0;
	font-size: 26px;
	line-height: 1.2; }
	.emed-archive-filters option { font-size: 14px;
}
}
@media (max-width: 600px) {
	.emed-grid { grid-template-columns: 1fr; }
	.emed-landing-lesson-preview video, .emed-landing-lesson-preview iframe, .emed-lesson-media iframe {
   max-height: 250px;
}
.emed-grid .emed_seminars-post__thumbnail-link{margin-bottom: 10px;}

}
