.calendar-wrapper {
	max-width: 1300px;
	width: 100%;
	background: white;
	overflow: hidden;
	position: relative;
	font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ШАПКА СО СТРЕЛКАМИ */
.calendar-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 28px;
	padding-left: 4px;
	padding-right: 4px;
}

.month-nav {
	display: flex;
	align-items: center;
	gap: 20px;
}

.calendar-main-container a.nav-arrow {
	background: #eef3f8;
	border: none;
	width: 48px;
	height: 48px;
	border-radius: 60px;
	font-size: 2rem;
	line-height: 1;
	font-weight: 400;
	color: #1a4b6d;
	cursor: default;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 8px rgba(0, 30, 60, 0.08);
	user-select: none;
	outline: none;
	opacity: 0.5;
	text-decoration: none;
}

.month-header {
	font-size: 1.5rem;
	font-weight: 600;
	color: #0a2638;
	padding-left: 0;
	letter-spacing: -0.3px;
	margin: 0;
	line-height: 1.3;
}

/* КОНТЕЙНЕР С ГОРИЗОНТАЛЬНЫМ СКРОЛЛОМ */
.table-container {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
	border-radius: 20px;
	position: relative;
	scroll-behavior: smooth;
}

.calendar-grid {
	display: flex;
	flex-direction: column;
	min-width: 900px;
}

.weekdays-row {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 10px;
	margin-bottom: 12px;
	padding: 0 6px;
}

.weekday-cell {
	text-align: center;
	font-weight: 700;
	font-size: 1.1rem;
	text-transform: uppercase;
	letter-spacing: 0.6px;
	color: #1f4868;
	background: #dee9f2;
	padding: 16px 8px;
	border-radius: 24px;
	box-shadow: inset 0 1px 3px rgba(0,0,0,0.03);
}

.week-row {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 10px;
	margin-bottom: 10px;
}

.day-card {
	background: #ffffff;
	border: 1.5px solid #d6e2ed;
	border-radius: 28px;
	padding: 16px 10px 14px 10px;
	min-height: 160px;
	display: flex;
	flex-direction: column;
	transition: all 0.15s;
	box-shadow: 0 4px 8px rgba(0, 20, 40, 0.02);
}

.day-card.NewsCalToday {
	background: #f0f9ec;
	border: 3px solid #2e7d32;
	box-shadow: 0 8px 18px -6px #2e7d3240;
	scroll-margin: 0 20px;
}
.day-card.NewsCalToday .day-number {
	color: #1b5e20;
	font-weight: 700;
}

.day-number {
	font-size: 1.6rem;
	font-weight: 600;
	color: #0f334d;
	line-height: 1.2;
	margin-bottom: 14px;
	padding-left: 8px;
}

.events-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1;
	overflow-y: auto;
	max-height: 180px;
	scrollbar-width: thin;
}

.calendar-main-container a.event-link {
	text-decoration: none;
	color: inherit;
	display: block;
	outline: none;
	cursor: pointer;
}

.event-item {
	background: #e1effb;
	border-radius: 15px;
	padding: 8px 14px;
	font-size: 0.88rem;
	font-weight: 400;
	line-height: 1.35;
	color: white;
	box-shadow: 0 2px 4px rgba(0, 35, 70, 0.08);
	word-break: break-word;
	transition: background 0.2s;
}

.event-time {
	font-weight: 800;
	color: white;
	padding: 3px;
	border-radius: 10px;
	display: inline-block;
	white-space: nowrap;
	border: 1px solid;
}

.event-highlight {
	background: #d4ecd1;
}
.event-highlight .event-time {
	background: rgba(47, 130, 48, 0.2);
}

.day-card.NewsCalOtherMonth {
	background: #f3f7fc;
	border-color: #dbe2ea;
	opacity: 0.8;
}
.day-card.NewsCalOtherMonth .day-number {
	color: #6f8ba3;
}

/* СТРЕЛКИ ДЛЯ СКРОЛЛА — по умолчанию скрыты на десктопе */
.scroll-arrow {
	display: none;
}

/* ПОПАП */
.popup-overlay {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	z-index: 2000;
	justify-content: center;
	align-items: center;
	backdrop-filter: blur(3px);
}

.popup-content {
	background: white;
	border-radius: 10px 0 0 10px;
	max-width: 500px;
	width: 90%;
	max-height: 80vh;
	overflow-y: auto;
	position: relative;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);

	scrollbar-width: thin; /* "auto" или "thin" */
	scrollbar-color: #888 #f1f1f1; /* цвет ползунка и фона */
}

.popup-content::-webkit-scrollbar {
	width: 10px; /* ширина всего скроллбара */
}

.popup-content::-webkit-scrollbar-track {
	background: #f1f1f1; /* цвет дорожки */
	border-radius: 10px;
}

.popup-content::-webkit-scrollbar-thumb {
	background: #888; /* цвет ползунка */
	border-radius: 10px; /* скругление */
}

.popup-content::-webkit-scrollbar-thumb:hover {
	background: #555; /* цвет при наведении */
}

/* Фиксированный крестик */
.popup-close-fixed {
	position: sticky;
	top: 0;
	width: 100%;
	height: 0;
	z-index: 10;
	pointer-events: none;
}

.popup-close-btn {
	position: absolute;
	top: 16px;
	right: 20px;
	font-size: 2.4rem;
	line-height: 1;
	cursor: pointer;
	color: #666;
	background: transparent;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: all 0.2s;
	pointer-events: auto;
	border: none;
	outline: none;
	padding: 0;
}

.popup-close-btn:hover {
	background: rgba(0, 0, 0, 0.05);
	color: #333;
}

.popup-inner {
	padding: 28px;
	padding-top: 40px;
}

.popup-title {
	font-size: 1.8rem;
	font-weight: 600;
	color: #0a2638;
	margin-bottom: 16px;
	padding-right: 40px;
	line-height: 1.3;
}

.popup-datetime {
	font-size: 1.2rem;
	font-weight: 500;
	color: #1f4868;
	margin-bottom: 20px;
	padding-bottom: 12px;
	border-bottom: 2px solid #e1effb;
}

.popup-description {
	font-size: 1.1rem;
	line-height: 1.6;
	color: #0f334d;
	background: #f5f9ff;
	padding: 16px 18px;
	border-radius: 20px;
	margin-bottom: 24px;
	border: 1px solid #d6e2ed;
	white-space: pre-line;
}
.popup-description a
{
	word-break: break-all;
}

.popup-field {
	margin-bottom: 16px;
}

.popup-field-label {
	font-weight: 700;
	color: #1f4868;
	margin-bottom: 4px;
	font-size: 0.9rem;
	text-transform: uppercase;
	letter-spacing: 0.3px;
}

.popup-field-value {
	font-size: 1.05rem;
	color: #0f334d;
	line-height: 1.5;
	background: #f5f9ff;
	padding: 10px 14px;
	border-radius: 16px;
	border: 1px solid #d6e2ed;
}

/* МОБИЛЬНАЯ ВЕРСИЯ */
@media (max-width: 700px) {
	.calendar-wrapper {
		padding: 16px 12px 20px 12px;
		border-radius: 24px;
	}

	.calendar-header {
		margin-bottom: 20px;
	}

	.nav-arrow {
		width: 44px;
		height: 44px;
		font-size: 1.8rem;
	}

	.month-header {
		font-size: 1.8rem;
		padding-left: 0;
		border-left: none;
	}

	.calendar-grid {
		min-width: 800px;
	}

	.weekday-cell {
		font-size: 1rem;
		padding: 14px 4px;
	}

	.day-card {
		min-height: 150px;
		padding: 14px 8px;
	}

	.day-number {
		font-size: 1.5rem;
		margin-bottom: 12px;
	}

	.event-item {
		border-radius: 14px;
		padding: 6px 10px;
		font-size: 0.85rem;
		background: #d9e8f7;
	}

	/* СТРЕЛКИ ДЛЯ СКРОЛЛА — показываем только на мобильных */
	.scroll-arrow {
		display: flex;
		position: fixed;
		top: 50%;
		transform: translateY(-50%);
		width: 80px;
		height: 280px;
		align-items: center;
		justify-content: center;
		font-size: 8rem;
		font-weight: 100;
		color: rgba(0, 0, 0, 0.25);
		cursor: pointer;
		z-index: 1000;
		transition: all 0.2s ease;
		user-select: none;
		text-shadow: 0 2px 10px rgba(0,0,0,0.1);
		background: transparent;
		border: none;
		font-family: 'Segoe UI', 'Arial', sans-serif;
		line-height: 1;
		letter-spacing: -5px;
		outline: none;
		-webkit-tap-highlight-color: transparent;
	}

	.scroll-arrow.disabled {
		opacity: 0.1;
		cursor: not-allowed;
		pointer-events: none;
	}

	.scroll-arrow:active:not(.disabled) {
		color: rgba(0, 0, 0, 0.45);
		transform: translateY(-50%) scale(1.05);
		text-shadow: 0 4px 15px rgba(0,0,0,0.15);
	}

	.scroll-arrow.left {
		left: -5px;
	}

	.scroll-arrow.right {
		right: -5px;
	}

	.popup-inner {
		padding: 20px;
		padding-top: 40px;
	}

	.popup-title {
		font-size: 1.5rem;
	}

	.popup-datetime {
		font-size: 1rem;
	}

	.popup-description {
		font-size: 1rem;
		padding: 12px 14px;
	}

	.popup-close-btn {
		top: 12px;
		right: 16px;
		font-size: 2.2rem;
	}
}

@media (max-width: 520px) {
	.calendar-grid {
		min-width: 750px;
	}
	.weekday-cell {
		font-size: 0.9rem;
		padding: 12px 2px;
	}
	.day-number {
		font-size: 1.4rem;
	}
	.event-item {
		font-size: 0.8rem;
		padding: 5px 8px;
	}
	.scroll-arrow {
		width: 70px;
		height: 240px;
		font-size: 7rem;
	}
}

@media (max-width: 380px) {
	.calendar-grid {
		min-width: 700px;
	}
	.weekday-cell {
		font-size: 0.8rem;
	}
	.day-number {
		font-size: 1.3rem;
	}
	.event-item {
		font-size: 0.75rem;
		padding: 4px 6px;
	}
	.scroll-arrow {
		width: 60px;
		height: 200px;
		font-size: 6rem;
	}
}

/*
разделы
*/

.sections-container {
	background-color: white;
	border-radius: 16px;
	/*box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);*/
	padding: 25px;
	margin-bottom: 30px;
}

.sections-row {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 16px;
}

.calendar-main-container .section-button {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	text-decoration: none;
	transition: all 0.3s ease;
	width: 140px;
}

.section-button:hover {
	transform: translateY(-3px);
}

.section-button:hover .button-oval {
	transform: scale(1.05);
	box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
}

.button-oval {
	width: 110px;
	height: 70px;
	border-radius: 35px; /* Овальная форма */
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 12px;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
	transition: all 0.3s ease;
	position: relative;
	overflow: hidden;
}

.button-oval::after {
	content: '';
	position: absolute;
	width: 100%;
	height: 100%;
	border-radius: 35px;
	background: rgba(255, 255, 255, 0.1);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.section-button:hover .button-oval::after {
	opacity: 1;
}

.button-icon {
	font-size: 1.6rem;
	color: white;
	transition: transform 0.3s ease;
}

.section-label {
	font-size: 1rem;
	font-weight: 600;
	color: #334155;
	text-align: center;
	transition: color 0.3s ease;
}

.section-button:hover .section-label {
	color: #3b82f6;
}

/* Цвета для разных разделов */
.color-sport { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.color-physical { background: linear-gradient(135deg, #10b981, #047857); }
.color-medical { background: linear-gradient(135deg, #f59e0b, #d97706); }
.color-other { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }

/* Индикатор активного раздела */
.section-button.active .button-oval {
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3), 0 4px 10px rgba(0, 0, 0, 0.08);
}

.section-button.active .section-label {
	color: #3b82f6;
	font-weight: 700;
}

/* Адаптивность */
@media (max-width: 768px) {
	.sections-row {
		gap: 12px;
	}

	.section-button {
		width: 120px;
	}

	.button-oval {
		width: 95px;
		height: 60px;
		border-radius: 30px;
	}

	.button-icon {
		font-size: 1.4rem;
	}

	.section-label {
		font-size: 0.9rem;
	}

	.section-header h1 {
		font-size: 1.8rem;
	}
}

@media (max-width: 576px) {
	.sections-row {
		gap: 10px;
	}

	.section-button {
		width: 105px;
	}

	.button-oval {
		width: 85px;
		height: 55px;
		border-radius: 28px;
	}

	.button-icon {
		font-size: 1.3rem;
	}

	.section-label {
		font-size: 0.85rem;
	}

	.sections-container {
		padding: 20px 15px;
	}
}

@media (max-width: 480px) {
	.sections-row {
		gap: 8px;
	}

	.section-button {
		width: calc(50% - 16px);
		max-width: 140px;
	}
}