/* Church Events Calendar — front-end styles
   All colors/spacing exposed as CSS variables for easy overriding in a child theme
   or Additional CSS panel. */

.ce-cal-wrapper {
	--ce-primary: #1E3A8A;
	--ce-accent: #2563EB;
	--ce-text: #1f2937;
	--ce-text-muted: #6b7280;
	--ce-card-bg: #ffffff;
	--ce-page-bg: #f3efe8;
	--ce-radius-card: 16px;
	--ce-radius-img: 16px;
	--ce-radius-pill: 9999px;
	--ce-shadow: 0 4px 24px rgba(17, 24, 39, 0.06), 0 1px 2px rgba(17, 24, 39, 0.04);
	--ce-shadow-hover: 0 12px 32px rgba(17, 24, 39, 0.10), 0 2px 6px rgba(17, 24, 39, 0.06);
	--ce-gap: 32px;
	--ce-font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
	--ce-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

	font-family: var(--ce-font-body);
	color: var(--ce-text);
	box-sizing: border-box;
}
.ce-cal-wrapper *, .ce-cal-wrapper *::before, .ce-cal-wrapper *::after {
	box-sizing: inherit;
}

/* Optional heading block markup, in case a theme uses it around the shortcode */
.ce-cal-heading { text-align: center; margin: 0 0 48px; }
.ce-cal-eyebrow {
	display: block;
	font-family: var(--ce-font-body);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ce-accent);
	margin-bottom: 12px;
}
.ce-cal-title {
	font-family: var(--ce-font-heading);
	font-weight: 600;
	font-size: clamp(30px, 4vw, 44px);
	line-height: 1.15;
	margin: 0 0 14px;
	color: var(--ce-text);
}
.ce-cal-subtitle {
	font-size: 16px;
	color: var(--ce-text-muted);
	margin: 0;
}

/* Grid */
.ce-cal-grid {
	display: grid;
	grid-template-columns: repeat(var(--ce-columns, 3), minmax(0, 1fr));
	gap: var(--ce-gap);
	align-items: start;
}

.ce-cal-empty {
	text-align: center;
	color: var(--ce-text-muted);
	padding: 40px 0;
}

/* Card */
.ce-cal-card {
	background: var(--ce-card-bg);
	border-radius: var(--ce-radius-card);
	box-shadow: var(--ce-shadow);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.ce-cal-card:hover {
	box-shadow: var(--ce-shadow-hover);
	transform: translateY(-2px);
}

.ce-cal-card__media {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-top-left-radius: var(--ce-radius-img);
	border-top-right-radius: var(--ce-radius-img);
	background: #e5e0d6;
}
.ce-cal-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}
.ce-cal-card:hover .ce-cal-card__media img {
	transform: scale(1.04);
}
.ce-cal-card__placeholder {
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #e5e0d6 0%, #d8d2c4 100%);
}

/* Date badge */
.ce-cal-badge {
	position: absolute;
	top: 16px;
	left: 16px;
	background: #ffffff;
	border-radius: 8px;
	padding: 8px 14px;
	display: flex;
	flex-direction: column;
	align-items: center;
	line-height: 1;
	box-shadow: 0 4px 14px rgba(17, 24, 39, 0.14);
}
.ce-cal-badge__month {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ce-accent);
	margin-bottom: 3px;
}
.ce-cal-badge__day {
	font-size: 22px;
	font-weight: 800;
	color: var(--ce-text);
}

/* Recurring event chip */
.ce-cal-chip {
	position: absolute;
	top: 16px;
	right: 16px;
	background: var(--ce-accent);
	color: #ffffff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 5px 11px;
	border-radius: var(--ce-radius-pill);
	line-height: 1;
	box-shadow: 0 4px 14px rgba(17, 24, 39, 0.14);
}

/* Body */
.ce-cal-card__body {
	padding: 22px 22px 20px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.ce-cal-card__title {
	margin: 0 0 12px;
	font-size: 19px;
	font-weight: 600;
	line-height: 1.3;
}
.ce-cal-card__title a {
	color: var(--ce-text);
	text-decoration: none;
}
.ce-cal-card__title a:hover {
	color: var(--ce-accent);
}

.ce-cal-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: var(--ce-text-muted);
	margin-bottom: 8px;
}
.ce-cal-icon {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	color: var(--ce-text-muted);
}

.ce-cal-card__footer {
	margin-top: 16px;
	padding-top: 14px;
	border-top: 1px solid #eef0f2;
	display: flex;
	justify-content: flex-end;
}
.ce-cal-learnmore {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	font-weight: 600;
	color: var(--ce-text);
	text-decoration: none;
}
.ce-cal-learnmore svg {
	width: 15px;
	height: 15px;
	transition: transform 0.2s ease;
}
.ce-cal-learnmore:hover {
	color: var(--ce-accent);
}
.ce-cal-learnmore:hover svg {
	transform: translateX(3px);
}

/* CTA */
.ce-cal-cta {
	text-align: center;
	margin-top: 48px;
}
.ce-cal-btn {
	display: inline-block;
	background: var(--ce-primary);
	color: #ffffff;
	font-weight: 600;
	font-size: 15px;
	padding: 14px 34px;
	border-radius: var(--ce-radius-pill);
	text-decoration: none;
	transition: background 0.2s ease, transform 0.2s ease;
}
.ce-cal-btn:hover {
	background: var(--ce-accent);
	color: #ffffff;
	transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 992px) {
	.ce-cal-grid {
		grid-template-columns: repeat(min(2, var(--ce-columns, 3)), minmax(0, 1fr));
	}
}
@media (max-width: 640px) {
	.ce-cal-grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}
	.ce-cal-badge { top: 12px; left: 12px; }
	.ce-cal-chip { top: 12px; right: 12px; }
}
