/* Делаем весь блок кликабельным, убираем стандартное подчеркивание */
.calendar-macro-item-link {
    text-decoration: none;
    color: inherit;
    display: block;
    border-radius: 8px; /* Опционально: скругление углов при наведении */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

/* Эффект при наведении на весь блок */
.calendar-macro-item-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

/* Подсветка названия (бывшей ссылки) при наведении на блок */
.calendar-macro-item-link:hover .calendar-macro-item-title-text {
    color: #fe5000; /* Цвет подсветки (замените на ваш брендовый, если нужно) */
    text-decoration: underline;
    transition: color 0.2s ease;
}





.calendarsec {
	padding: 72px 0;
	background: linear-gradient(180deg, #EBECEF 0%, #F1F2F4 100%);
	border-radius: 72px;
}

.calendar-header {
	margin-bottom: 15px;
}

.calendar-header-title {
	font-size: 32px;
	font-weight: 700;
	margin-bottom: 24px;
}

.calendar-toolbar {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
}

.calendar-toolbar .events__filter {
	margin-bottom: 0;
}

.calendar-toolbar .label-checkbox4__wrap {
	background-color: #fff;
}

.calendar-toolbar .restaurant__btn {
	background-color: #fff;
}

.calendar-toolbar .type__btn {
	background-color: #fff;
}

.calendar-month-wrapper {
	margin-bottom: 4px;
}

.calendar-grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
}

.calendar-grid > * {
	width: 14.285%;
}

.calendar-grid > *:nth-child(8) {
	border-radius: 24px 0 0 0;
}

.calendar-grid > *:nth-child(14) {
	border-radius: 0 24px 0 0;
}

.calendar-grid > *:nth-child(36) {
	border-radius: 0 0 0 24px;
}

.calendar-grid > *:last-child {
	border-radius: 0 0 24px 0;
}

.calendar-day-header {
	min-height: 52px;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	font-size: 20px;
	font-weight: 400;
	padding: 5px;
}

.calendar-day {
	border: 1px solid #e2e4e9;
	min-height: 227px;
	display: flex;
	flex-direction: column;
	padding: 16px 10px 16px 16px;
	background-color: #fff;
}

.calendar-day-prev,
.calendar-day-next
{
	color: #8d95a5;
	background-color: #f6f7f8;
}

.calendar-day-number {
	font-size: 20px;
	font-weight: 400;
	margin-bottom: 14px;
}

.calendar-event {
	position: relative;
	padding-left: 16px;
	font-size: 14px;
	line-height: 1.1;
	margin-bottom: 12px;
}

.calendar-event-dot {
	position: absolute;
	top: 3px;
	left: 0;
	width: 8px;
	height: 8px;
	border-radius: 50%;
}

.calendar-day-venues {
	font-size: 14px;
	color: #8d95a5;
	margin-top: auto;
}

.calendar-day--has-events {
	cursor: pointer;
	transition: border 0.3s;
}

@media (hover: hover) {
	.calendar-day--has-events:hover {
		border: 1px solid #fe5000;
	}
}

.calendar-event-more {
	margin-top: 16px;
	margin-bottom: 12px;
	font-size: 14px;
	line-height: 1.1;
	color: #fe5000;
}

.calendar-legend {
	padding: 24px;
	border: 1px solid #e2e4e9;
	border-radius: 24px;
	background-color: #fff;
}

.calendar-legend-title {
	text-align: center;
	font-size: 18px;
	margin-bottom: 12px;
}

.calendar-legend-list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 20px
}

.calendar-legend-item {
	position: relative;
	padding-left: 20px;
	font-size: 14px;
}

.calendar-legend-color {
	position: absolute;
	top: 2px;
	left: 0;
	width: 12px;
	height: 12px;
	border-radius: 50%;
}

.calendar-nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	flex-shrink: 0;
}

.calendar-nav-prev,
.calendar-nav-next {
	position: relative;
	top: -1px;
	width: 20px;
	height: 20px;
	background: url('../img/arrow2.svg') center / contain no-repeat;
	cursor: pointer;
	font-size: 0;
}

.calendar-nav-prev::after,
.calendar-nav-next::after {
	content: '';
	position: absolute;
	inset: -4px;
	border: 1px solid #fe5000;
	opacity: 0;
	border-radius: 6px;
	transition: opacity 0.3s;
}

@media (hover: hover) {
	.calendar-nav-prev:hover::after,
	.calendar-nav-next:hover::after {
		opacity: 1;
	}
}

.calendar-nav-prev {
	transform: rotate(180deg);
}

.calendar-nav-disabled {
	opacity: 0.5;
	pointer-events: none;
}

body .calendar-popup-container {
	max-width: 1160px;
	max-width: 840px;
	width: 100%;
	flex-direction: column;
	border: 1px solid #e2e4e9;
	border-radius: 32px;
	background-color: #f6f7f8;
	padding: 48px;
}

body .calendar-popup-container .f-button.is-close-button {
	top: 24px;
	right: 24px;
	width: 24px;
	height: 24px;
}

.calendar-macro-header-date {
	font-size: 32px;
	font-weight: 700;
	margin-bottom: 8px;
}

.calendar-macro-header-count {
	font-size: 14px;
	line-height: 1.1;
	color: #8d95a5;
}

.calendar-macro-header {
	margin-bottom: 15px;
}

.calendar-macro-list {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	grid-template-columns: repeat(2, 1fr);
	gap: 15px;
}

.calendar-macro-item {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-start;
	padding: 4px;
	padding-right: 12px;
	border-radius: 16px;
	background-color: #fff;
}

.calendar-macro-item-img-wrap {
	position: relative;
	width: 137px;
	height: 157px;
}

.calendar-macro-item-img-wrap img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 12px;
}

.calendar-macro-item-info {
	width: calc(100% - 153px);
}

.calendar-macro-item-meta {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 5px;
}

.calendar-macro-item-time {

}

.calendar-macro-item-tag {
	font-size: 13px;
	margin-left: auto;
	padding: 4px 6px;
	border-radius: 300px;
}

.calendar-macro-item-meta {
	margin-bottom: 10px;
}

.calendar-macro-item-title {
	font-weight: 700;
	margin-bottom: 5px;
}

.calendar-macro-item-title a {
	display: inline-block;
	transition: color 0.3s;
}

.calendar-macro-item-price {
	display: inline-block;
	padding: 3px 8px;
	background-color: #f1f2f4;
	border-radius: 300px;
	font-size: 14px;
	margin-bottom: 10px;
}

.calendar-macro-item-address {
	font-size: 14px;
	color: #8d95a5;
}

@media (hover: hover) {
	.calendar-macro-item-title a:hover {
		color: #fe5000;
	}
}

@media (max-width: 1200px) {
	.calendarsec {
		border-radius: 30px;
		padding: 50px 0;
	}

	.calendar-day-header {
		font-size: 18px;
		min-height: 40px;
	}

	.calendar-day-number {
		font-size: 18px;
	}

	.calendar-event {
		z-index: 1;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
		padding: 3px 5px;
		color: #fff;
		font-size: 12px;
		margin-bottom: 5px;
	}

	.calendar-event-dot {
		z-index: -1;
		inset: 0;
		border-radius: 0;
		width: auto;
		height: auto;
		border-radius: 2px;
	}

	.calendar-day {
		padding: 10px;
		min-height: 190px;
	}

	.calendar-nav {
		order: 1;
	}

	.calendar-day-venues {
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.calendar-event-more {
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
		margin: 5px 0;
	}

	.calendar-grid > *:nth-child(8) {
		border-radius: 12px 0 0 0;
	}

	.calendar-grid > *:nth-child(14) {
		border-radius: 0 12px 0 0;
	}

	.calendar-grid > *:nth-child(36) {
		border-radius: 0 0 0 12px;
	}

	.calendar-grid > *:last-child {
		border-radius: 0 0 12px 0;
	}

	.calendar-legend  {
		border-radius: 12px;
		padding: 15px;
	}

	.calendar-legend-title {
		text-align: left;
	}

	.calendar-legend-list {
		justify-content: flex-start;
		gap: 10px;
	}

	.calendar-legend-item {
		color: #fff;
		z-index: 1;
		padding: 3px 10px;
	}

	.calendar-legend-color {
		inset: 0;
		z-index: -1;
		width: auto;
		height: auto;
		border-radius: 2px;
	}

	body .calendar-popup-container {
		padding: 20px;
		border-radius: 24px;
	}

	.calendar-macro-header-date {
		font-size: 26px;
		padding-right: 40px;
	}

	.calendar-macro-list {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 750px) {
	.calendarsec {
		padding: 30px 0;
		border-radius: 16px;
	}

	.calendar-header-title {
		font-size: 18px;
		letter-spacing: -0.02em;
		margin-bottom: 12px;
	}

	.calendar-header {
		margin-bottom: 12px;
	}

	.calendar-month-wrapper {
		margin: 0 -15px;
		margin-bottom: 2px;
	}

	.calendar-day-header {
		font-size: 14px;
		min-height: 35px;
	}

	.calendar-day-number {
		font-size: 14px;
		line-height: 1.3;
		text-align: center;
		margin-bottom: 2px;
	}

	.calendar-day {
		min-height: 104px;
		padding: 3px;
		border: 0.5px solid #e2e4e9;
	}

	.calendar-event {
		font-size: 10px;
		padding: 1px 1px 0 1px;
		margin-bottom: 2px;
	}

	.calendar-event-more {
		margin: 4px 0;
		font-size: 10px;
	}

	.calendar-day-venues {
		font-size: 10px;
	}

	.calendar-legend {
		margin: 0 -15px;
	}

	.calendar-legend-title {
		font-size: 14px;
		margin-bottom: 4px;
	}

	.calendar-legend-item {
		font-size: 10px;
		padding: 3px 4px 1px 4px;
	}

	.calendar-legend-list {
		gap: 4px;
	}

	body .calendar-popup-container {
		padding: 24px 15px;
	}

	.calendar-macro-header-date {
		padding: 0 40px;
		font-size: 14px;
		margin-bottom: 5px;
	}

	.calendar-macro-header-count {
		font-size: 12px;
	}

	.calendar-macro-header {
		text-align: center;
		margin-bottom: 12px;
	}

	.calendar-macro-list {
		display: block;
	}

	.calendar-macro-item-img-wrap {
		width: 120px;
		height: 138px;
	}

	.calendar-macro-item-info {
		width: calc(100% - 132px);
	}

	body .calendar-popup-container .f-button.is-close-button {
		top: 23px;
		right: 15px;
		width: 20px;
		height: 20px;
	}

	.calendar-macro-item {
		font-size: 14px;
		margin-bottom: 4px;
	}

	.calendar-macro-item:last-child {
		margin-bottom: 0;
	}

	.calendar-macro-item-tag {
		font-size: 12px;
	}

	.calendar-macro-item-price {
		font-size: 12px;
	}

	.calendar-macro-item-address {
		font-size: 12px;
	}
}