/**
 * Course Card (Elementor): teacher rows match admin preview — flex row, vertical center.
 * Photo radius / size come from Elementor dynamic CSS where possible.
 */
.webuni-course-card .webuni-course-teachers ul > li,
.webuni-course-card .webuni-course-teachers .webuni-teacher-item {
	display: flex;
	align-items: center;
	flex-wrap: nowrap;
	gap: 10px;
	margin: 0;
}

.webuni-course-card .webuni-course-teachers ul > li::before,
.webuni-course-card .webuni-course-teachers ul > li::after {
	content: none;
	display: none;
}

.webuni-course-card .webuni-teacher-photo {
	display: block;
	flex-shrink: 0;
	object-fit: cover;
	border-radius: 50%;
}

/* Standalone “Course Teachers” Elementor widget — same row layout */
.elementor-widget-webuni-teachers .webuni-course-teachers ul > li,
.elementor-widget-webuni-teachers .webuni-teacher-item {
	display: flex;
	align-items: center;
	flex-wrap: nowrap;
	gap: 10px;
	margin: 0;
}

.elementor-widget-webuni-teachers .webuni-course-teachers ul > li::before,
.elementor-widget-webuni-teachers .webuni-course-teachers ul > li::after {
	content: none;
	display: none;
}

.elementor-widget-webuni-teachers .webuni-teacher-photo {
	display: block;
	flex-shrink: 0;
	object-fit: cover;
	border-radius: 50%;
}

.elementor-widget-webuni-teachers .webuni-teacher-name {
	display: inline-block;
	margin: 0;
	line-height: 1.3;
}

.webuni-course-card .webuni-teacher-name {
	display: inline-block;
	margin: 0;
	line-height: 1.3;
}

/* ===== New elements: base look (card + standalone widgets) ===== */
/* Sensible defaults so price/video/buttons look right out of the box; Elementor controls override. */
.webuni-course-price {
	font-weight: 600;
	margin: 8px 0;
}

.webuni-promo-video {
	margin: 12px 0;
}
.webuni-promo-video video {
	width: 100%;
	max-width: 100%;
	height: auto;
	display: inline-block;
	border-radius: 4px;
}
/* YouTube / Vimeo embeds: responsive 16:9 box (max-width is the Elementor-controllable knob). */
.webuni-promo-video .webuni-promo-video-embed {
	position: relative;
	width: 100%;
	max-width: 100%;
	aspect-ratio: 16 / 9;
	margin: 0 auto;
	border-radius: 4px;
	overflow: hidden;
}
.webuni-promo-video .webuni-promo-video-embed iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.webuni-link-wrap {
	margin: 10px 0;
}
.webuni-link-button {
	display: inline-block;
	padding: 10px 18px;
	border-radius: 4px;
	text-decoration: none;
	line-height: 1.2;
	cursor: pointer;
	background-color: #2271b1;
	color: #ffffff;
	transition: opacity 0.15s ease;
}
.webuni-link-button:hover {
	opacity: 0.9;
	color: #ffffff;
}
.webuni-checkout-button {
	background-color: #1a7f37;
}

.webuni-teacher-introduction {
	margin: 4px 0 8px;
	font-style: italic;
}

/* ===== Gutenberg blocks: front-end baseline =====
 * The Gutenberg blocks have no style controls (unlike the Elementor widgets, which pull the
 * "Course/Teacher Widget Default" styles), so they need a sensible out-of-the-box look. Every
 * Webuni Gutenberg block wrapper carries the .webuni-gb marker class; all rules below are scoped
 * to it so these fixed sizes never leak onto the Elementor widgets, which share the same inner
 * .webuni-* classes but get their sizing from Elementor controls / dynamic CSS.
 */

/* Safety net: never let a block image overflow its container. */
.webuni-gb img {
	max-width: 100%;
	height: auto;
}

/* Course cover: responsive, never wider than the container. */
.webuni-gb .webuni-course-cover img,
.webuni-gb.webuni-course-cover img {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
}

/* Teacher photos: rounded square (not a circle), image covers the box like a background-image. */
.webuni-gb .webuni-teacher-photo {
	border-radius: 8px;
	object-fit: cover;
	object-position: center;
}

/* Inside the course card / Course Teachers block: compact 100px square avatars. */
.webuni-gb .webuni-course-teachers .webuni-teacher-photo,
.webuni-gb.webuni-teachers .webuni-teacher-photo {
	width: 100px;
	height: 100px;
	max-width: 100px;
	border-radius: 8px;
}

/* Course-card teacher list: wrap nicely, vertically centred rows. */
.webuni-gb .webuni-course-teachers ul,
.webuni-gb.webuni-teachers ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}
.webuni-gb .webuni-course-teachers li,
.webuni-gb.webuni-teachers li {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
}

/* Standalone Teacher Card / Teacher Photo block: a larger rounded-square portrait (capped). */
.webuni-gb.webuni-teacher-card .webuni-teacher-photo,
.webuni-gb.webuni-teacher-photo-wrap .webuni-teacher-photo {
	width: 160px;
	height: 160px;
	max-width: 100%;
}

/* Standalone Teacher Card: readable vertical stack. */
.webuni-gb.webuni-teacher-card {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.webuni-gb .webuni-teacher-name {
	font-weight: 600;
}
.webuni-gb .webuni-teacher-bio {
	line-height: 1.6;
}

/* Course Card block: a light card frame + inner spacing (the editor-only
 * gutenberg-blocks.css had this, but it never loaded on the front end). */
.webuni-gb.webuni-course-card {
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
}
.webuni-gb.webuni-course-card .webuni-course-cover {
	width: 100%;
}
.webuni-gb.webuni-course-card .webuni-course-title {
	margin: 16px 20px 0;
	font-size: 22px;
	font-weight: 600;
	line-height: 1.3;
}
.webuni-gb.webuni-course-card .webuni-course-description {
	margin: 8px 20px 0;
	line-height: 1.6;
}
.webuni-gb.webuni-course-card .webuni-course-teachers {
	margin: 16px 20px 0;
	padding-top: 16px;
	border-top: 1px solid #eee;
}
.webuni-gb.webuni-course-card .webuni-course-teachers h4 {
	margin: 0 0 12px;
}
.webuni-gb.webuni-course-card .webuni-course-price,
.webuni-gb.webuni-course-card .webuni-promo-video,
.webuni-gb.webuni-course-card .webuni-link-wrap {
	margin-left: 20px;
	margin-right: 20px;
}
.webuni-gb.webuni-course-card .webuni-link-wrap:last-child {
	margin-bottom: 20px;
}
