/* === LAYOUT === */
.page-wrap { background: #f5f5f5; padding: 15px 15px 0; }
.container { width: 100%; padding: 0; }
.section { padding: 0; }
.section--gray { background: transparent; }
.section--orange { background: transparent; color: #fff; }
.section--dark { background: transparent; color: #fff; }

/* Card wrapper for sections */
.section-card {
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 12px rgba(0,0,0,0.08);
	overflow: hidden;
}
.section-card-header {
	background: #dc0000;
	color: #fff;
	padding: 18px 24px;
	display: flex;
	align-items: center;
	gap: 12px;
	font-family: 'Lato', sans-serif;
	font-size: 18px;
	font-weight: 700;
}
.section-card-header .header-icon {
	font-size: 22px;
	width: 36px;
	height: 36px;
	background: rgba(255,255,255,0.2);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
.section-card-body { padding: 28px 24px; }

/* Section + column layout */
.lbm-section { margin-bottom: 15px; display: flex; flex-direction: column; gap: 15px; }
.lbm-columns {
	display: flex !important;
	gap: 15px;
	flex-wrap: nowrap !important;
}
.lbm-col { min-width: 0; flex-shrink: 1; box-sizing: border-box; display: flex; flex-direction: column; gap: 15px; }
.lbm-columns .section-card { flex: 1; display: flex; flex-direction: column; }
.lbm-columns .section-card-body { flex: 1; display: flex; flex-direction: column; }
.kim-body {
	display: flex !important;
	flex-direction: row !important;
	gap: 0;
	padding: 0 !important;
}
.kim-text {
	flex: 1;
	padding: 28px 24px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}
.kim-text .section-card-subtitle { margin-bottom: 0; }
.kim-stats {
	display: flex;
	flex-direction: column;
	flex-shrink: 0;
	width: 140px;
}
.kim-stats .stat-box {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 16px 12px;
}
.kim-stats .stat-box:nth-child(1) { background: #181d39; }
.kim-stats .stat-box:nth-child(2) { background: #5a2134; }
.kim-stats .stat-box:nth-child(3) { background: #9c262f; }
.kim-stats .stat-box:nth-child(4) { background: #dd2a2a; }
.kim-stats .stat-number { font-size: clamp(24px, 4vw, 36px); }
.kim-stats .stat-label { font-size: 11px; }
.kim-stats .stat-label { color: #fff; } /* kontrast WCAG AA także na ostatnim (jaśniejszym) kafelku */

.section-card-subtitle {
	text-align: center;
	margin-bottom: 32px;
	font-family: 'Lato', sans-serif;
	font-size: 20px;
	line-height: 1.7;
	color: #363636;
	max-width: 860px;
	margin-left: auto;
	margin-right: auto;
	font-weight: 400;
}
.section-card-subtitle .accent {
	font-weight: 700;
	color: #dc0000;
}
.section-card-body--dark { background: #333; }
.section-card-body--orange { background: #dc0000; }

.section-header { text-align: center; margin-bottom: 40px; }
.section-header h2 {
	font-size: clamp(28px, 5vw, 48px);
	font-weight: 400;
	margin-bottom: 12px;
	color: #363636;
}
.section-card-body--orange .section-header h2,
.section-card-body--dark .section-header h2 { color: #fff; }
.section-header p {
	font-family: 'Lato', sans-serif;
	font-size: clamp(15px, 2.5vw, 18px);
	line-height: 1.5;
	max-width: 800px;
	margin: 0 auto 16px;
	color: #555;
}
.section-card-body--orange .section-header p { color: rgba(255,255,255,0.9); }
.section-header .divider {
	display: inline-block;
	width: 80px;
	height: 3px;
	background: #dc0000;
	margin-top: 8px;
}
.section-card-body--orange .section-header .divider { background: #fff; }

/* === STATS BAR === */
.stats-bar {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.stat-box {
	padding: 32px 16px;
	text-align: center;
}
.stat-box:nth-child(1) { background: #dc0000; }
.stat-box:nth-child(2) { background: #ed9164; }
.stat-box:nth-child(3) { background: #f09a70; }
.stat-box:nth-child(4) { background: #dc0000; }
.stat-number {
	font-family: 'Lato', sans-serif;
	font-size: clamp(36px, 6vw, 56px);
	font-weight: 700;
	color: #fff;
}
.stat-label {
	font-size: 14px;
	color: rgba(255,255,255,0.9);
	margin-top: 4px;
}

/* === SERVICES GRID === */
.services-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 24px;
}
.service-card {
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
	border-bottom: 3px solid #dc0000;
	box-shadow: 0 2px 12px rgba(0,0,0,0.06);
	transition: transform 0.25s, box-shadow 0.25s;
}
.service-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.service-card img {
	width: 100%;
	height: 180px;
	object-fit: cover;
}
.service-card-body { padding: 24px; }
.service-card-icon {
	color: #dc0000;
	font-size: 24px;
	margin-bottom: 12px;
}
.service-card h4 {
	font-size: 16px;
	font-weight: 700;
	margin-bottom: 8px;
	line-height: 1.4;
}
.service-card p { font-size: 14px; color: #666; }

/* === EQUIPMENT === */
.equipment-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 20px;
}
/* stała liczba kolumn kafelków (parametr columns); węższe ekrany: 2 i 1 kolumna */
.equipment-grid[data-columns="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .equipment-grid[data-columns="3"] { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .equipment-grid[data-columns="3"] { grid-template-columns: minmax(0, 1fr); } }
.equip-item {
	display: flex;
	gap: 16px;
	padding: 20px;
	background: #fff;
	border-radius: 8px;
	border-left: 4px solid #dc0000;
	box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}
.equip-icon {
	flex-shrink: 0;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: #dc0000;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
}
.equip-item h2, .equip-item h3 {
	font-size: 16px;
	font-weight: 700;
	color: #414247;
	margin-bottom: 6px;
}
.equip-item p { font-size: 14px; color: #555; line-height: 1.5; }

/* === TEAM === */
.team-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
	align-items: stretch;
}
.team-card {
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 2px 12px rgba(0,0,0,0.07);
	transition: transform 0.25s, box-shadow 0.25s;
	display: flex;
	flex-direction: column;
}
.team-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 28px rgba(0,0,0,0.12);
}
.team-card-top {
	display: none;
}
.team-card-photo {
	width: 120px;
	height: 120px;
	border-radius: 50%;
	object-fit: cover;
	border: 4px solid #dc0000;
	margin: 24px auto 0;
	display: block;
	box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.team-card-body {
	flex: 1;
	padding: 16px 20px 24px;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
}
.team-card-body .degree {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1.5px;
	color: #dc0000;
	margin-bottom: 2px;
}
.team-card-body .first-name {
	font-size: 16px;
	font-weight: 300;
	color: #555;
	line-height: 1.2;
}
.team-card-body .last-name {
	font-size: 18px;
	font-weight: 700;
	color: #000;
	line-height: 1.2;
	margin-bottom: 6px;
}
.team-card-body .role {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: #dc0000;
	background: #ffeaea;
	display: inline-block;
	padding: 3px 12px;
	border-radius: 12px;
	margin-bottom: 14px;
}
.team-card-body .bio {
	font-size: 13px;
	color: #555;
	line-height: 1.5;
	text-align: left;
	flex: 1;
}
.bio-toggle {
	display: inline-flex;
	align-items: center;
	gap: 0;
	margin-top: 10px;
	font-size: 13px;
	color: #fff;
	cursor: pointer;
	font-weight: 600;
	border: none;
	background: #dc0000;
	padding: 5px 14px;
	border-radius: 4px;
	font-family: 'Open Sans', sans-serif;
	transition: background 0.2s;
}
.bio-toggle:hover { background: #b80000; text-decoration: none; }
.bio-toggle.hidden { display: none; }
.bio-toggle svg { margin-left: 6px; transition: transform 0.2s; }
.bio-toggle.expanded svg { transform: rotate(180deg); }

/* „Przejdź do profilu” – podstrona osoby (wpis w kategorii Autorzy/Recenzenci) */
.team-card-profile-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 10px;
	padding: 6px 16px;
	font-size: 13px;
	font-weight: 700;
	color: #fff;
	background: #181d39;
	border-radius: 4px;
	text-decoration: none;
}
.team-card-profile-btn:hover, .team-card-profile-btn:focus-visible { background: #dc0000; color: #fff; text-decoration: none; }
.team-card-profile-btn:focus-visible { outline: 3px solid #181d39; outline-offset: 2px; }
.team-card-links {
	display: flex;
	justify-content: center;
	gap: 12px;
	padding: 16px;
	border-top: 1px solid #eee;
	margin-top: auto;
	flex-wrap: nowrap;
}
.team-card-links a {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: #f5f5f5;
	color: #6b6b6b;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s, color 0.2s;
	font-size: 14px;
}
.team-card-links a:hover { background: #dc0000; color: #fff; }

/* === PROGRAMS === */
.programs-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 24px;
}
.program-card {
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 12px rgba(0,0,0,0.06);
	position: relative;
}
.program-card-graphic {
	height: 8px;
	background: linear-gradient(90deg, #dc0000 0%, #ff9a5c 50%, #dc0000 100%);
}
.program-card-content {
	padding: 28px;
}
.program-card-icon {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: #ffeaea;
	color: #dc0000;
	font-size: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 16px;
	border: 2px solid #dc0000;
}
.program-card h4 {
	font-size: 16px;
	font-weight: 700;
	margin-bottom: 10px;
	line-height: 1.4;
}
.program-card .program-year {
	display: inline-block;
	background: #dc0000;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	padding: 2px 10px;
	border-radius: 10px;
	margin-bottom: 12px;
	letter-spacing: 0.5px;
}
.program-card p { font-size: 14px; color: #666; line-height: 1.5; }

/* === CTA BUTTONS === */
.cta-row {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	justify-content: center;
}
.cta-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 16px 32px;
	background: #dc0000;
	color: #fff;
	font-family: 'Lato', sans-serif;
	font-size: 15px;
	font-weight: 700;
	border-radius: 6px;
	transition: background 0.2s, transform 0.15s;
	text-align: center;
	line-height: 1.3;
}
.cta-btn:hover { background: #b80000; transform: translateY(-2px); text-decoration: none; color: #fff; }
.cta-row--vertical { flex-direction: column; align-items: center; }

/* === GALLERY === */
.gallery-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 8px;
}
.gallery-item {
	position: relative;
	overflow: hidden;
	border-radius: 6px;
}
.gallery-item img {
	width: 100%;
	height: 180px;
	object-fit: cover;
	display: block;
	cursor: pointer;
	transition: transform 0.2s, opacity 0.2s;
}
.gallery-item:hover img { transform: scale(1.03); opacity: 0.9; }
.gallery-expand {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 32px;
	height: 32px;
	background: rgba(0,0,0,0.55);
	color: #fff;
	border: none;
	border-radius: 4px;
	font-size: 18px;
	line-height: 32px;
	text-align: center;
	cursor: pointer;
	z-index: 2;
	opacity: 0;
	transition: opacity 0.2s;
	padding: 0;
}
.gallery-item:hover .gallery-expand { opacity: 1; }

/* === LIGHTBOX === */
.lightbox-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,0.9);
	z-index: 2000;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s;
}
.lightbox-overlay.active { opacity: 1; pointer-events: auto; }
.lightbox-overlay img {
	max-width: 90vw;
	max-height: 85vh;
	border-radius: 6px;
	box-shadow: 0 8px 40px rgba(0,0,0,0.5);
	transform: scale(0.9);
	transition: transform 0.3s;
}
.lightbox-overlay.active img { transform: scale(1); }
.lightbox-close {
	position: absolute;
	top: 20px;
	right: 24px;
	background: none;
	border: none;
	color: #fff;
	font-size: 36px;
	cursor: pointer;
	line-height: 1;
	opacity: 0.7;
	transition: opacity 0.2s;
}
.lightbox-close:hover { opacity: 1; }
.lightbox-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(255,255,255,0.15);
	border: none;
	color: #fff;
	font-size: 28px;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.3); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-counter {
	position: absolute;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%);
	color: rgba(255,255,255,0.7);
	font-size: 14px;
	font-family: 'Lato', sans-serif;
}

/* === READ MORE BUTTON === */
.lbm-readmore {
	display: inline-flex;
	align-items: center;
	gap: 0;
	margin-top: 16px;
	font-size: 13px;
	color: #fff;
	cursor: pointer;
	font-weight: 600;
	border: none;
	background: #dc0000;
	padding: 5px 14px;
	border-radius: 4px;
	font-family: 'Open Sans', sans-serif;
	transition: background 0.2s;
	text-decoration: none;
}
.lbm-readmore:hover { background: #b80000; text-decoration: none; color: #fff; }
.lbm-readmore svg { margin-left: 6px; }

/* === VIDEO PLAYER === */
.lbm-video-player {
	position: relative;
	width: 100%;
	overflow: hidden;
	border-radius: 8px;
	background: #000;
}
.lbm-video-player iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 0;
}
/* Video switcher list */
.lbm-video-switcher {
	display: flex;
	flex-direction: column;
	gap: 0;
	margin-top: 16px;
	border: 1px solid #e8e8e8;
	border-radius: 8px;
	overflow: hidden;
}
.lbm-vs-item {
	display: flex;
	align-items: stretch;
	gap: 0;
	border: none;
	border-bottom: 1px solid #eee;
	background: #fff;
	cursor: pointer;
	padding: 0;
	text-align: left;
	font-family: 'Lato', sans-serif;
	transition: background 0.15s;
	width: 100%;
}
.lbm-vs-item:last-child { border-bottom: none; }
.lbm-vs-item:hover { background: #fef6f1; }
.lbm-vs-item.active { background: #ffeaea; }
.lbm-vs-item.active .lbm-vs-num {
	background: #dc0000;
	color: #fff;
}
.lbm-vs-item.active .lbm-vs-title { color: #dc0000; }
.lbm-vs-thumb {
	position: relative;
	flex-shrink: 0;
	width: 160px;
	overflow: hidden;
}
.lbm-vs-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: opacity 0.15s;
}
.lbm-vs-item:hover .lbm-vs-thumb img { opacity: 0.85; }
.lbm-vs-play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 32px;
	height: 32px;
	background: rgba(0,0,0,0.6);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 12px;
	opacity: 0;
	transition: opacity 0.15s;
}
.lbm-vs-item:hover .lbm-vs-play { opacity: 1; }
.lbm-vs-item.active .lbm-vs-play {
	opacity: 1;
	background: #dc0000;
}
.lbm-vs-num {
	position: absolute;
	top: 6px;
	left: 6px;
	min-width: 22px;
	height: 22px;
	background: rgba(0,0,0,0.55);
	color: #fff;
	border-radius: 4px;
	font-size: 11px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 5px;
}
.lbm-vs-info {
	flex: 1;
	padding: 12px 16px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-width: 0;
}
.lbm-vs-title {
	font-size: 14px;
	font-weight: 700;
	color: #363636;
	line-height: 1.3;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.lbm-vs-desc {
	font-size: 12px;
	color: #777;
	line-height: 1.4;
	margin-top: 4px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.lbm-video-single-desc {
	margin-top: 12px;
	font-size: 14px;
	color: #555;
	line-height: 1.6;
}

/* === BACK TO TOP === */
.back-to-top {
	position: fixed;
	bottom: 20px;
	right: 20px;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: #dc0000;
	color: #fff;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.3s, transform 0.3s;
	box-shadow: 0 2px 8px rgba(0,0,0,0.2);
	z-index: 1000;
}
.back-to-top.visible { opacity: 1; transform: translateY(0); }
.back-to-top:hover { background: #b80000; }

/* === RESPONSIVE === */
@media (max-width: 1024px) {
	.team-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
	.lbm-columns { flex-direction: column; }
	.aside-last .lbm-columns { flex-direction: column-reverse; } /* kolumna boczna (np. załączniki) pod główną na telefonie */
	.lbm-col { width: 100% !important; }
	.kim-body { flex-direction: column !important; }
	.kim-stats {
		width: 100%;
		flex-direction: row;
	}
}

@media (max-width: 768px) {
	.stats-bar { grid-template-columns: repeat(2, 1fr); }
	.lbm-vs-thumb { width: 120px; min-width: 120px; }
	.lbm-vs-title { font-size: 13px; }
	.lbm-vs-desc { font-size: 12px; }
}

@media (max-width: 600px) {
	.team-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
	.stats-bar { grid-template-columns: 1fr 1fr; }
	.gallery-grid { grid-template-columns: repeat(2, 1fr); }
	.lbm-vs-item { flex-direction: column; align-items: stretch; }
	.lbm-vs-thumb { width: 100%; min-width: 0; }
	.lbm-vs-info { padding: 8px 12px; }
}

/* Collapsible subtitle (param collapse_after) */
.lbm-more[hidden] { display: none; }
.lbm-more-toggle {
	display: inline-flex;
	align-items: center;
	margin-top: 14px;
	font-size: 14px;
	color: #fff;
	cursor: pointer;
	font-weight: 600;
	border: none;
	background: #dc0000;
	padding: 6px 18px;
	border-radius: 4px;
	font-family: 'Open Sans', sans-serif;
	transition: background 0.2s;
}
.lbm-more-toggle:hover, .lbm-more-toggle:focus-visible { background: #b80000; }

/* Karty rozwijane (extra_after): odstęp od kart głównych */
.lbm-extra { margin-top: 20px; }

/* Collapsible subtitle - list mode (text with <li>) */
.lbm-intro { display: block; }
.lbm-list {
	margin: 14px 0 0;
	padding-left: 1.4em;
	list-style: disc;
	text-align: left;
	font-size: 17px;
}
.lbm-list li { margin: 0 0 8px; line-height: 1.5; }
.lbm-list.lbm-more[hidden] { display: none; }

/* Przycisk "Pokaż więcej/badania" w komponencie tekstowym - na dole po prawej */
.lbm-readmore-row { display: flex; justify-content: flex-end; margin-top: 18px; }
.lbm-readmore-row .lbm-readmore { margin-top: 0; }
