/**
 * Homepage academic calendar countdown.
 *
 * @package Kutby
 */

.home-calendar {
	overflow: hidden;
}

.home-cal-hero {
	background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 55%, #eef2ff 100%);
	border: 1px solid #dbeafe;
	border-radius: 14px;
	padding: 16px 16px 14px;
	margin-bottom: 14px;
}

.home-cal-hero__eyebrow {
	margin: 0 0 4px;
	font-size: 12px;
	font-weight: 600;
	color: #64748b;
}

.home-cal-hero__title {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	color: #1d4ed8;
	line-height: 1.35;
}

.home-cal-hero__body {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	margin-top: 14px;
}

.home-cal-next {
	min-width: min(100%, 260px);
	flex: 1 1 240px;
}

.home-cal-next__label {
	margin: 0 0 8px;
	font-size: 12px;
	font-weight: 600;
	color: #64748b;
}

.home-cal-next__row {
	display: flex;
	align-items: flex-start;
	gap: 10px;
}

.home-cal-next__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background: #fff;
	border: 1px solid #dbeafe;
	flex-shrink: 0;
}

.home-cal-next__name {
	margin: 0 0 4px;
	font-size: 16px;
	font-weight: 700;
	color: #0f172a;
}

.home-cal-next__dates {
	margin: 0;
	font-size: 12px;
	color: #64748b;
	line-height: 1.5;
}

.home-cal-timer {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	direction: ltr;
}

.home-cal-timer__unit {
	min-width: 58px;
	padding: 10px 8px 8px;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	text-align: center;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.home-cal-timer__value {
	display: block;
	font-size: 22px;
	font-weight: 700;
	color: #2563eb;
	line-height: 1.1;
	font-variant-numeric: tabular-nums;
}

.home-cal-timer__label {
	display: block;
	margin-top: 4px;
	font-size: 11px;
	font-weight: 600;
	color: #64748b;
}

.home-cal-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
}

.home-cal-card {
	position: relative;
	background: #fff;
	border: 1px solid #e8eaed;
	border-radius: 12px;
	padding: 12px 12px 12px 14px;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
	overflow: hidden;
}

.home-cal-card::before {
	content: "";
	position: absolute;
	inset-block: 0;
	inset-inline-end: 0;
	width: 4px;
	background: #2563eb;
}

.home-cal-card--holiday::before {
	background: linear-gradient(180deg, #2563eb 0%, #f59e0b 100%);
}

.home-cal-card--exam::before {
	background: #7c3aed;
}

.home-cal-card--study::before {
	background: #2563eb;
}

.home-cal-card__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 10px;
}

.home-cal-card__index {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 999px;
	background: #2563eb;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
}

.home-cal-card__badge {
	display: inline-flex;
	align-items: center;
	padding: 3px 8px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	background: #eff6ff;
	color: #1d4ed8;
}

.home-cal-card__badge--later {
	background: #f8fafc;
	color: #64748b;
}

.home-cal-card__title {
	margin: 0 0 6px;
	font-size: 14px;
	font-weight: 700;
	color: #1e3a8a;
	line-height: 1.35;
}

.home-cal-card__dates {
	margin: 0 0 12px;
	font-size: 11px;
	color: #64748b;
	line-height: 1.5;
	min-height: 2.8em;
}

.home-cal-card__remain {
	margin: 0;
	padding-top: 10px;
	border-top: 1px dashed #e2e8f0;
	font-size: 12px;
	font-weight: 700;
	color: #334155;
}

@media (max-width: 1100px) {
	.home-cal-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.home-cal-hero__title {
		font-size: 16px;
	}

	.home-cal-timer__unit {
		min-width: 52px;
		padding: 8px 6px;
	}

	.home-cal-timer__value {
		font-size: 18px;
	}

	.home-cal-grid {
		grid-template-columns: 1fr;
	}
}
