/**
 * ====================================
 * KARTY MASTERCLASS - PREMIUM DESIGN
 * ====================================
 * 
 * Design Philosophy:
 * - Poziomy layout (landscape) - lewa: obraz, prawa: treść
 * - Premium kolorystyka: granat + złoto + burgundy
 * - Eleganckie, minimalistyczne formy
 * - Nacisk na eksperta i wartość wydarzenia
 * 
 * Kolory:
 * - Navy: #1a2332 (tło główne)
 * - Gold: #d4af37 (akcenty premium)
 * - Burgundy: #8b3a3a (akcenty CTA)
 * - Light: #f8f6f1 (tło kart)
 * - Text: #2d2d2d (tekst główny)
 */

/* ====================================
   KONTENER GŁÓWNY
   ==================================== */

.ew-masterclass-wrapper {
	width: 100%;
	max-width: 1400px;
	margin: 0 auto;
	padding: 20px;
}

.ew-masterclass-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 30px;
	margin-top: 20px;
}

/* Desktop: 1 karta na rząd (szeroka) */
@media (min-width: 768px) {
	.ew-masterclass-grid {
		gap: 40px;
	}
}

/* ====================================
   KARTA MASTERCLASS - LAYOUT POZIOMY
   ==================================== */

.karta-masterclass {
	display: grid;
	grid-template-columns: 1fr;
	background: #ffffff;
	border: 1px solid #e8dfd4;
	overflow: hidden;
	position: relative;
	transition: all 0.3s ease;
	box-shadow: 0 2px 8px rgba(26, 35, 50, 0.08);
}

.karta-masterclass:hover {
	box-shadow: 0 8px 24px rgba(26, 35, 50, 0.15);
	transform: translateY(-4px);
}

/* Desktop: layout poziomy 40/60 */
@media (min-width: 768px) {
	.karta-masterclass {
		grid-template-columns: 40% 60%;
		min-height: 450px;
	}
}

/* ====================================
   LEWA SEKCJA: WIZUALNA
   ==================================== */

.masterclass-visual {
	position: relative;
	background: linear-gradient(135deg, #1a2332 0%, #2d3e50 100%);
	display: flex;
	flex-direction: column;
}

.masterclass-badge {
	position: absolute;
	top: 20px;
	left: 20px;
	background: #d4af37;
	color: #1a2332;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 1.5px;
	padding: 8px 16px;
	z-index: 10;
	text-transform: uppercase;
	font-family: 'Montserrat', sans-serif;
}

.masterclass-badge.badge-second {
	top: 70px;
}

.masterclass-badge.benefits-title {
	top: 60px;
}

.masterclass-image {
	flex: 1;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	position: relative;
	min-height: 250px;
}

.masterclass-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(to bottom,
			rgba(26, 35, 50, 0.3) 0%,
			rgba(26, 35, 50, 0.7) 100%);
}

/* Box eksperta na dole lewej sekcji */
.masterclass-ekspert-box {
	background: rgba(26, 35, 50, 0.95);
	padding: 20px;
	display: flex;
	align-items: center;
	gap: 15px;
	border-top: 2px solid #d4af37;
	text-decoration: none;
	color: inherit;
	transition: background 0.3s ease, border-color 0.3s ease;
}

/* Gdy jest linkiem - dodaj efekt hover */
a.masterclass-ekspert-box:hover {
	background: rgba(26, 35, 50, 1);
	border-top-color: #ffffff;
	cursor: pointer;
}

a.masterclass-ekspert-box:hover .ekspert-name {
	color: #d4af37 !important;
}

.ekspert-avatar {
	flex-shrink: 0;
	width: 70px !important;
	height: 70px !important;
}

.ekspert-avatar img {
	width: 70px !important;
	height: 70px !important;
	border-radius: 50%;
	border: 3px solid #d4af37;
	object-fit: cover;
	display: block;
}

.ekspert-info {
	flex: 1;
}

.ekspert-name {
	color: #ffffff !important;
	font-size: 16px;
	font-weight: 600;
	margin: 0 0 4px 0;
	font-family: 'Playfair Display', serif;
}

.ekspert-role {
	color: #d4af37;
	font-size: 12px;
	font-style: italic;
	margin: 0;
}

/* ====================================
   PRAWA SEKCJA: CONTENT
   ==================================== */

.masterclass-content {
	padding: 30px;
	display: flex;
	flex-direction: column;
	gap: 20px;
	position: relative;
	background: #f8f6f1;
}

/* Header z tytułem */
.masterclass-header {
	border-bottom: 1px solid #e8dfd4;
	padding-bottom: 15px;
}

.masterclass-title {
	font-family: 'Playfair Display', serif;
	font-size: 24px;
	font-weight: 700 !important;
	color: #1a2332;
	margin: 0 0 12px 0;
	line-height: 1.3;
}

.masterclass-title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.3s ease;
}

.masterclass-title a:hover {
	color: #8b3a3a;
}

/* Meta badges */
.masterclass-meta {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.meta-badge {
	display: inline-block;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	padding: 5px 12px;
	border-radius: 0;
}

.meta-tryb {
	background: #1a2332;
	color: #d4af37;
}

.meta-poziom {
	background: #8b3a3a;
	color: #ffffff;
}

/* Excerpt */
.masterclass-excerpt {
	color: #5d5d5d;
	font-size: 14px;
	line-height: 1.6;
}

/* ====================================
   STATYSTYKI WYDARZENIA
   ==================================== */

.masterclass-stats {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
	padding: 15px 0;
	border-bottom: 1px solid #e8dfd4;
}

@media (min-width: 480px) {
	.masterclass-stats {
		grid-template-columns: repeat(2, 1fr);
	}
}

.stat-item {
	display: flex;
	align-items: center;
	gap: 10px;
	color: #1a2332;
	font-size: 13px;
	font-weight: 500;
}

.stat-item svg {
	color: #d4af37;
	flex-shrink: 0;
}

.stat-date svg {
	color: #8b3a3a;
}

.stat-duration svg {
	color: #d4af37;
}

.stat-participants svg {
	color: #1a2332;
}

/* ====================================
   KORZYŚCI (BULLET POINTS)
   ==================================== */

.masterclass-benefits {
	flex: 1;
}

.benefits-title {
	font-family: 'Playfair Display', serif;
	font-size: 16px;
	font-weight: 600;
	color: #1a2332;
	margin: 0 0 12px 0;
}

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

.benefits-list li {
	position: relative;
	padding-left: 25px;
	margin-bottom: 10px;
	color: #2d2d2d;
	font-size: 13px;
	line-height: 1.5;
}

.benefits-list li::before {
	content: '✓';
	position: absolute;
	left: 0;
	top: 0;
	color: #d4af37;
	font-weight: 700;
	font-size: 16px;
}

/* ====================================
   FOOTER: CENA + CTA
   ==================================== */

.masterclass-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding-top: 15px;
	border-top: 2px solid #d4af37;
	margin-top: auto;
}

.masterclass-price-box {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.price-label {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #7d7d7d;
	font-weight: 600;
}

.price-value {
	font-family: 'Playfair Display', serif;
	font-size: 28px;
	font-weight: 700;
	color: #1a2332;
}

.price-value .woocommerce-Price-amount {
	color: #1a2332;
}

/* Przycisk CTA */
.masterclass-cta {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: #8b3a3a;
	color: #ffffff !important;
	font-size: 14px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	padding: 14px 28px;
	text-decoration: none;
	transition: all 0.3s ease;
	border: 2px solid #8b3a3a;
	font-family: 'Montserrat', sans-serif;
	white-space: nowrap;
}

.masterclass-cta svg {
	transition: transform 0.3s ease;
}

.masterclass-cta:hover {
	background: #1a2332;
	border-color: #1a2332;
	color: #d4af37;
	transform: translateX(4px);
}

.masterclass-cta:hover svg {
	transform: translateX(4px);
}

/* ====================================
   BADGE "WYPRZEDANE"
   ==================================== */

.karta-masterclass.sold-out {
	opacity: 0.85;
}

.masterclass-soldout-badge {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) rotate(-15deg);
	background: #8b3a3a;
	color: #ffffff;
	font-size: 32px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 4px;
	padding: 20px 60px;
	z-index: 20;
	border: 4px solid #ffffff;
	box-shadow: 0 8px 24px rgba(139, 58, 58, 0.4);
	pointer-events: none;
}

@media (max-width: 767px) {
	.masterclass-soldout-badge {
		font-size: 24px;
		padding: 15px 40px;
		letter-spacing: 2px;
	}
}

/* ====================================
   BRAK MASTERCLASS
   ==================================== */

.ew-masterclass-brak {
	text-align: center;
	padding: 60px 20px;
	background: #f8f6f1;
	border: 1px solid #e8dfd4;
}

.ew-masterclass-brak p {
	color: #7d7d7d;
	font-size: 16px;
	margin: 0;
}

/* ====================================
   RESPONSYWNOŚĆ
   ==================================== */

/* Mobile optymalizacja */
@media (max-width: 767px) {
	.ew-masterclass-wrapper {
		padding: 15px;
	}

	.ew-masterclass-grid {
		gap: 25px;
	}

	.masterclass-content {
		padding: 20px;
		gap: 15px;
	}

	.masterclass-title {
		font-size: 20px;
	}

	.masterclass-footer {
		flex-direction: column;
		align-items: flex-start;
		gap: 15px;
	}

	.masterclass-cta {
		width: 100%;
		justify-content: center;
		padding: 16px 24px;
	}

	.price-value {
		font-size: 24px;
	}

	.ekspert-avatar {
		width: 70px;
		height: 70px;
	}

	.ekspert-avatar img {
		width: 70px;
		height: 70px;
		object-fit: cover;
		display: block;
	}

	.masterclass-ekspert-box {
		padding: 15px;
	}
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1023px) {
	.masterclass-title {
		font-size: 22px;
	}

	.masterclass-content {
		padding: 25px;
	}
}

/* Large desktop */
@media (min-width: 1400px) {
	.ew-masterclass-wrapper {
		max-width: 1600px;
	}
}

/* ====================================
   PRINT STYLES
   ==================================== */

@media print {

	.masterclass-cta,
	.masterclass-badge,
	.masterclass-soldout-badge {
		display: none;
	}

	.karta-masterclass {
		page-break-inside: avoid;
		box-shadow: none;
		border: 1px solid #000;
	}
}

/* ====================================
   DARK MODE SUPPORT (opcjonalnie)
   ==================================== */

@media (prefers-color-scheme: dark) {
	.ew-masterclass-wrapper {
		/* Można dodać dark mode jeśli strona to wspiera */
	}
}