#sobytiya-wrap {
	--sc-accent: #5b6cff;
	max-width: 1040px;
	margin: 28px auto;
	font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: #1f2333;
}

.sobytiya-title {
	font-size: 1.6rem;
	font-weight: 700;
	margin: 0 0 18px;
	text-align: center;
}

.sobytiya-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 18px;
	justify-content: center;
}
.sc-filter-btn {
	background: #f3f4fb;
	border: none;
	color: #1f2333;
	font-weight: 600;
	border-radius: 10px;
	padding: 8px 14px;
	cursor: pointer;
	transition:
		background 0.15s ease,
		color 0.15s ease;
	font-size: 0.9rem;
}
.sc-filter-btn:hover {
	background: #e6e8f7;
}
.sc-filter-btn.active {
	background: var(--sc-accent);
	color: #fff;
}

#sobytiya-calendar {
	background: #fff;
	border: 1px solid #eef0f6;
	border-radius: 18px;
	padding: 22px;
	box-shadow: 0 12px 40px rgba(40, 46, 89, 0.07);
}

#sobytiya-calendar .fc-toolbar-title {
	font-size: 1.4rem !important;
	font-weight: 700;
	text-transform: capitalize;
}

#sobytiya-calendar .fc .fc-button {
	background: #f3f4fb;
	border: none;
	color: #1f2333;
	font-weight: 600;
	border-radius: 10px;
	padding: 8px 14px;
	box-shadow: none;
	text-transform: none;
	transition:
		background 0.15s ease,
		color 0.15s ease;
}
#sobytiya-calendar .fc .fc-button:hover {
	background: #e6e8f7;
}
#sobytiya-calendar .fc .fc-button-primary:not(:disabled).fc-button-active,
#sobytiya-calendar .fc .fc-button-primary:not(:disabled):active {
	background: var(--sc-accent);
	color: #fff;
}
#sobytiya-calendar .fc .fc-button:focus {
	box-shadow: 0 0 0 3px rgba(91, 108, 255, 0.25);
}
#sobytiya-calendar .fc-toolbar.fc-header-toolbar {
	margin-bottom: 1.4em;
}

#sobytiya-calendar .fc-theme-standard td,
#sobytiya-calendar .fc-theme-standard th {
	border-color: #eef0f6;
}
#sobytiya-calendar .fc-theme-standard .fc-scrollgrid {
	border-color: #eef0f6;
	border-radius: 12px;
	overflow: hidden;
}
#sobytiya-calendar .fc-col-header-cell {
	background: #fafbff;
	padding: 10px 0;
}
#sobytiya-calendar .fc-col-header-cell-cushion {
	color: #8a90a6;
	font-weight: 600;
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	text-decoration: none;
}
#sobytiya-calendar .fc-daygrid-day-number {
	color: #1f2333;
	font-weight: 500;
	padding: 8px 10px;
	text-decoration: none;
}
#sobytiya-calendar .fc-day-today {
	background: rgba(91, 108, 255, 0.06) !important;
}
#sobytiya-calendar .fc-day-today .fc-daygrid-day-number {
	background: var(--sc-accent);
	color: #fff;
	border-radius: 50%;
	width: 28px;
	height: 28px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 4px;
	padding: 0;
}

/* =========================================================
   ✅ СОБЫТИЯ С КАРТИНКАМИ НА ВСЮ ЯЧЕЙКУ
   ========================================================= */
#sobytiya-calendar .fc-event {
	border: none;
	border-radius: 8px;
	padding: 0;
	font-size: 0.8rem;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 2px 6px rgba(40, 46, 89, 0.12);
	transition:
		transform 0.12s ease,
		box-shadow 0.12s ease;
	overflow: hidden;
}
#sobytiya-calendar .fc-event:hover {
	transform: translateY(-1px);
	box-shadow: 0 5px 14px rgba(40, 46, 89, 0.22);
}

/* Контейнер для картинки */
.fc-event-image {
	position: relative;
	width: 100%;
	height: 100%;
	min-height: 80px;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	border-radius: 8px;
	overflow: hidden;
	display: flex;
	align-items: flex-end;
}

/* Затемнение снизу для читаемости текста */
.fc-event-overlay {
	width: 100%;
	padding: 8px;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0) 100%);
	color: #fff;
}

/* Заголовок события поверх картинки */
.fc-event-title {
	font-size: 0.85rem;
	font-weight: 600;
	line-height: 1.3;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
	word-wrap: break-word;
}

/* Fallback для событий без картинок */
.fc-event-default {
	padding: 4px 8px;
	font-size: 0.8rem;
	font-weight: 600;
	color: #fff;
	background: var(--sc-accent);
	border-radius: 8px;
	min-height: 80px;
	display: flex;
	align-items: center;
}

/* Убираем стандартные стили FullCalendar */
.fc .fc-event-image {
	border: none !important;
	box-shadow: none !important;
}

/* Ховер-эффект */
.fc-event-image:hover {
	transform: scale(1.02);
	transition: transform 0.2s ease;
}

/* Адаптив */
@media (max-width: 640px) {
	#sobytiya-calendar {
		padding: 14px;
		border-radius: 14px;
	}
	#sobytiya-calendar .fc-toolbar.fc-header-toolbar {
		flex-direction: column;
		gap: 10px;
	}
	#sobytiya-calendar .fc-toolbar-title {
		font-size: 1.15rem !important;
	}
	.fc-event-image {
		min-height: 60px;
	}
	.fc-event-title {
		font-size: 0.75rem;
	}
}

/* Для вида "список" — миниатюра слева */
.fc-list-event-image {
	width: 50px;
	height: 50px;
	border-radius: 6px;
	background-size: cover;
	background-position: center;
	margin-right: 12px;
	flex-shrink: 0;
}

/* Модальное окно */
#sobytiya-modal {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(20, 24, 45, 0.55);
	z-index: 99999;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.2s ease;
}
#sobytiya-modal.is-open {
	opacity: 1;
}

#sobytiya-modal .sc-card {
	background: #fff;
	max-width: 440px;
	width: 90%;
	border-radius: 18px;
	padding: 0;
	position: relative;
	overflow: hidden;
	box-shadow: 0 24px 70px rgba(20, 24, 45, 0.35);
	transform: translateY(12px) scale(0.98);
	transition: transform 0.2s ease;
}
#sobytiya-modal.is-open .sc-card {
	transform: translateY(0) scale(1);
}

#sobytiya-modal .sc-head {
	height: 8px;
	background: var(--sc-accent);
}
#sobytiya-modal .sc-body {
	padding: 26px 28px 28px;
}

#sobytiya-close {
	position: absolute;
	top: 16px;
	right: 16px;
	border: none;
	background: rgba(255, 255, 255, 0.85);
	width: 30px;
	height: 30px;
	border-radius: 50%;
	font-size: 20px;
	cursor: pointer;
	line-height: 1;
	color: #444;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10;
}
#sobytiya-close:hover {
	background: #fff;
}

#sm-image-wrap {
	margin: -26px -28px 20px;
	width: calc(100% + 56px);
	max-height: 200px;
	overflow: hidden;
}
#sm-image {
	width: 100%;
	height: 200px;
	object-fit: cover;
	display: block;
}

#sm-title {
	margin: 0 0 14px;
	padding-right: 26px;
	font-size: 1.3rem;
	font-weight: 700;
}
#sm-date,
#sm-location {
	margin: 8px 0;
	color: #555;
	font-size: 0.95rem;
	display: flex;
	gap: 8px;
	align-items: flex-start;
}
#sm-desc {
	margin: 16px 0 0;
	color: #2a2e40;
	line-height: 1.6;
	font-size: 0.95rem;
}

.sc-link {
	display: inline-block;
	margin-top: 18px;
	background: var(--sc-accent);
	color: #fff !important;
	padding: 10px 18px;
	border-radius: 10px;
	text-decoration: none;
	font-weight: 600;
	transition: background 0.15s ease;
}
.sc-link:hover {
	background: #4854e0;
}
