/* ============================================================
   CENTRMED — Події (архів + сторінка події)
   ============================================================ */

.ev-section,
.ev-single { padding: 20px 0 60px; }

.ev-page-title,
.ev-single__title {
	font-size: 32px;
	font-weight: 700;
	color: #1a2340;
	line-height: 1.25;
	margin: 16px 0 28px;
}

.ev-empty {
	font-size: 16px;
	color: #556080;
	padding: 30px 0;
}

/* ---------- Блоки ---------- */
.ev-block { margin-bottom: 48px; }

.ev-block__title {
	font-size: 24px;
	font-weight: 700;
	color: #1a2340;
	margin: 0 0 22px;
	padding-bottom: 10px;
	border-bottom: 2px solid #d6eaff;
}

/* ---------- Сітка плиток ---------- */
.ev-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 22px;
}

/* ---------- Плитка ---------- */
.ev-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #d6eaff;
	border-radius: 16px;
	overflow: hidden;
	transition: box-shadow .2s, transform .2s;
}
.ev-card:hover {
	box-shadow: 0 4px 24px rgba(122,189,249,.18);
	transform: translateY(-3px);
}

.ev-card--current { border-color: #6fcf97; }
.ev-card--past { opacity: .82; }

.ev-card__img {
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #eef6ff;
}
.ev-card__img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ev-card__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	padding: 20px;
}

.ev-card__status {
	align-self: flex-start;
	font-size: 12px;
	font-weight: 700;
	padding: 4px 10px;
	border-radius: 999px;
	margin-bottom: 10px;
}
.ev-card__status--cancelled { background: #fde2e2; color: #c0392b; }
.ev-card__status--rescheduled { background: #fff3d6; color: #a06800; }

.ev-card__title {
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
	margin: 0 0 12px;
}
.ev-card__title a {
	color: #1a2340;
	text-decoration: none;
}
.ev-card__title a:hover { color: #2765b1; }

.ev-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
	margin-bottom: 12px;
}
.ev-card__meta span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	font-weight: 600;
	color: #2765b1;
}
.ev-card__meta svg { flex-shrink: 0; }

/* уривок — рівно 2 рядки */
.ev-card__excerpt {
	font-size: 14px;
	color: #556080;
	line-height: 1.6;
	margin-bottom: 18px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.ev-card__actions {
	display: flex;
	gap: 10px;
	margin-top: auto;
}

/* ---------- Кнопки ---------- */
.ev-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 11px 18px;
	font-size: 14px;
	font-weight: 600;
	border-radius: 999px;
	text-decoration: none;
	cursor: pointer;
	border: 1px solid transparent;
	transition: background-color .25s, color .25s, border-color .25s;
	font-family: inherit;
	white-space: nowrap;
}
.ev-btn--primary {
	background: #2765b1;
	color: #fff;
	border-color: #2765b1;
}
.ev-btn--primary:hover {
	background: #1d4f8c;
	border-color: #1d4f8c;
	color: #fff;
}
.ev-btn--outline {
	background: #fff;
	color: #2765b1;
	border-color: #2765b1;
}
.ev-btn--outline:hover {
	background: #eef6ff;
	color: #2765b1;
}
.ev-btn--full { width: 100%; }

/* ============================================================
   Сторінка події
   ============================================================ */

.ev-single__layout {
	display: grid;
	grid-template-columns: 1fr 340px;
	gap: 32px;
	align-items: start;
}

.ev-single__img {
	border-radius: 16px;
	overflow: hidden;
	margin-bottom: 24px;
}
.ev-single__img img {
	width: 100%;
	height: auto;
	display: block;
}

.ev-single__content { font-size: 16px; line-height: 1.7; color: #334060; }

/* ---------- Сайдбар: інфо ---------- */
.ev-info {
	background: #f3f8fb;
	border: 1px solid #d6eaff;
	border-radius: 16px;
	padding: 24px;
	position: sticky;
	top: 20px;
}

.ev-info__row {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	margin-bottom: 18px;
}

.ev-info__icon {
	width: 38px;
	height: 38px;
	flex-shrink: 0;
	border-radius: 50%;
	background: #fff;
	color: #2765b1;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ev-info__label {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: #7b8ca3;
	margin-bottom: 2px;
}
.ev-info__value {
	font-size: 15px;
	font-weight: 700;
	color: #1a2340;
	line-height: 1.4;
}

/* ---------- Сайдбар: лікар ---------- */
.ev-doctor {
	margin-top: 22px;
	background: #fff;
	border: 1px solid #d6eaff;
	border-radius: 16px;
	padding: 20px;
}
.ev-doctor__label {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: #7b8ca3;
	margin-bottom: 12px;
}
.ev-doctor__card { display: flex; gap: 14px; align-items: flex-start; }
.ev-doctor__photo { flex-shrink: 0; }
.ev-doctor__photo img {
	width: 76px;
	height: 76px;
	object-fit: cover;
	border-radius: 12px;
	display: block;
}
.ev-doctor__name {
	font-size: 16px;
	font-weight: 700;
	color: #1a2340;
	line-height: 1.3;
	margin-bottom: 8px;
}
.ev-doctor__name a { color: inherit; text-decoration: none; }
.ev-doctor__name a:hover { text-decoration: underline; }

.ev-doctor__specs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 8px;
}
.ev-doctor__spec {
	font-size: 12px;
	padding: 4px 9px;
	border-radius: 999px;
	background: #e1f0f8;
	color: #1f6f9c;
	line-height: 1;
}

.ev-doctor__meta {
	display: flex;
	flex-direction: column;
	gap: 2px;
	font-size: 13px;
	color: #556080;
	margin-bottom: 10px;
}

.ev-doctor__link {
	font-size: 13px;
	font-weight: 600;
	color: #2765b1;
	text-decoration: none;
}
.ev-doctor__link:hover { text-decoration: underline; }

/* ---------- Повідомлення ---------- */
.ev-notice {
	border-radius: 10px;
	padding: 14px 18px;
	font-size: 14px;
	line-height: 1.6;
	color: #334060;
	margin-bottom: 24px;
}
.ev-notice strong { color: #1a2340; }
.ev-notice--cancelled { background: #fff5f5; border-left: 3px solid #f9a8a8; }
.ev-notice--rescheduled { background: #fff8e6; border-left: 3px solid #f0b429; }
.ev-notice--past { background: #eef4ff; border-left: 3px solid #7abdf9; }
.ev-notice a { color: #2765b1; }

.ev-single__back { margin-top: 34px; }

/* ============================================================
   Адаптив
   ============================================================ */

/* планшет */
@media (max-width: 1100px) {
	.ev-grid { grid-template-columns: repeat(2, 1fr); }
	.ev-single__layout { grid-template-columns: 1fr 300px; gap: 24px; }
}

/* вузький планшет / великий телефон */
@media (max-width: 900px) {
	.ev-single__layout { grid-template-columns: 1fr; }
	.ev-info { position: static; }
	.ev-single__side { order: -1; }   /* інфо про подію — вище тексту */
}

@media (max-width: 768px) {
	.ev-page-title,
	.ev-single__title { font-size: 26px; }
	.ev-block__title { font-size: 21px; }
	.ev-section, .ev-single { padding: 14px 0 44px; }
	.ev-block { margin-bottom: 36px; }
}

/* телефон */
@media (max-width: 600px) {
	.ev-grid { grid-template-columns: 1fr; gap: 18px; }

	.ev-page-title,
	.ev-single__title { font-size: 23px; margin: 12px 0 20px; }

	.ev-card__body { padding: 16px; }
	.ev-card__title { font-size: 17px; }

	.ev-card__actions { flex-direction: column; }
	.ev-btn { width: 100%; padding: 12px 16px; }

	.ev-info { padding: 18px; }
	.ev-doctor { padding: 16px; }
	.ev-doctor__card { flex-direction: column; align-items: center; text-align: center; }
	.ev-doctor__specs, .ev-doctor__meta { justify-content: center; align-items: center; }
	.ev-doctor__photo img { width: 92px; height: 92px; }
}
/* ---------- Заголовок плитки: завжди рівно 2 рядки ---------- */
.ev-card__title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	/* фіксована висота під 2 рядки: font-size 18px * line-height 1.3 * 2 */
	min-height: calc(18px * 1.3 * 2);
}
.ev-card__title a {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

@media (max-width: 600px) {
	.ev-card__title { min-height: calc(17px * 1.3 * 2); }
}

/* ---------- Позначка «Подія завершилась» ---------- */
.ev-card__status--finished {
	background: #eef2f6;
	color: #6b7b8c;
}

.ev-card--past .ev-card__img { position: relative; }
.ev-card--past .ev-card__img::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(255,255,255,.45);
}
.ev-intro {
	max-width: 900px;
	margin: -10px 0 36px;
	font-size: 15px;
	line-height: 1.75;
	color: #556080;
}
.ev-intro p { margin: 0 0 14px; }
.ev-intro p:last-child { margin-bottom: 0; }

@media (max-width: 600px) {
	.ev-intro { font-size: 14px; margin-bottom: 28px; }
}