/* Three Events Showcase — Frontend Styles
   Design tokens are also exposed as CSS custom properties and can be
   overridden from Settings (see Tes_Helpers::generate_dynamic_css). */

:root {
	--tes-primary: #5B21B6;
	--tes-secondary: #7C3AED;
	--tes-bg: #F8F8FC;
	--tes-white: #ffffff;
	--tes-text: #1F1235;
	--tes-text-muted: #6b6580;
	--tes-border: #ECEAF5;
	--tes-radius: 20px;
	--tes-radius-sm: 12px;
	--tes-container: 1200px;
	--tes-shadow: 0 10px 30px rgba(91, 33, 182, 0.08);
	--tes-shadow-hover: 0 16px 40px rgba(91, 33, 182, 0.16);
	--tes-transition: 0.25s;
	--tes-font: "Poppins", sans-serif;
}

.tes-wrapper,
.tes-wrapper * {
	box-sizing: border-box;
}

.tes-wrapper {
	font-family: var(--tes-font);
	color: var(--tes-text);
	background: var(--tes-bg);
	padding: 40px 0;
	line-height: 1.5;
}

.tes-container {
	max-width: var(--tes-container);
	margin: 0 auto;
	padding: 0 24px;
}

.tes-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 14px 26px;
	border-radius: 12px;
	font-weight: 600;
	font-size: 14px;
	text-decoration: none;
	border: 2px solid transparent;
	cursor: pointer;
	transition: transform var(--tes-transition) ease, box-shadow var(--tes-transition) ease, background var(--tes-transition) ease;
	white-space: nowrap;
}

.tes-btn--primary {
	background: var(--tes-white);
	color: var(--tes-primary);
}
.tes-btn--primary:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.tes-btn--outline {
	background: transparent;
	color: var(--tes-primary);
	border-color: var(--tes-primary);
}
.tes-btn--outline:hover {
	background: var(--tes-primary);
	color: var(--tes-white);
	transform: translateY(-2px);
}

.tes-btn--small {
	padding: 9px 16px;
	font-size: 13px;
}

/* ============ Two-column layout ============ */
.tes-three-events {
	display: grid;
	grid-template-columns: 380px 1fr;
	gap: 28px;
	align-items: start;
}

.tes-col--calendar,
.tes-col--event {
	min-width: 0;
}

/* ============ Calendar ============ */
.tes-calendar {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0;
}

.tes-timeline-item {
	position: relative;
	display: flex;
	gap: 16px;
	padding-bottom: 28px;
}

.tes-timeline-item::before {
	content: "";
	position: absolute;
	top: 40px;
	left: 19px;
	width: 2px;
	bottom: -8px;
	background: var(--tes-primary);
	opacity: 0.25;
}

.tes-timeline-item:last-child::before {
	display: none;
}

.tes-timeline-dot {
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--tes-primary);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	box-shadow: 0 6px 16px rgba(91, 33, 182, 0.35);
	z-index: 1;
}

.tes-timeline-dot .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
}

.tes-month-card {
	flex: 1;
	background: var(--tes-white);
	border-radius: var(--tes-radius);
	box-shadow: var(--tes-shadow);
	padding: 20px;
}

.tes-month-title {
	margin: 0 0 14px;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.06em;
	color: var(--tes-primary);
}

.tes-week-row {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	text-align: center;
}

.tes-week-labels span {
	font-size: 11px;
	font-weight: 600;
	color: var(--tes-text-muted);
	text-transform: uppercase;
	padding-bottom: 6px;
}

.tes-days-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	row-gap: 6px;
}

.tes-day {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 34px;
	font-size: 13px;
	color: var(--tes-text);
	border-radius: 50%;
	position: relative;
}

.tes-day--muted {
	color: #cfcbdd;
}

.tes-day--today {
	background: var(--tes-primary);
	color: #fff;
	font-weight: 700;
}

.tes-day--has-event {
	cursor: pointer;
	font-weight: 600;
	transition: background var(--tes-transition) ease, color var(--tes-transition) ease;
}

.tes-day--has-event:hover,
.tes-day--has-event:focus-visible {
	background: var(--tes-secondary);
	color: #fff;
	outline: none;
}

.tes-day--upcoming.tes-day--has-event:not(.tes-day--today) {
	box-shadow: inset 0 0 0 2px var(--tes-primary);
}

.tes-day--past.tes-day--has-event:not(.tes-day--today) {
	box-shadow: inset 0 0 0 2px #c9c4dd;
	color: var(--tes-text-muted);
}

/* ============ Next Event card ============ */
.tes-next-event {
	position: relative;
}

.tes-event-card {
	position: relative;
	background: var(--tes-white);
	border-radius: var(--tes-radius);
	box-shadow: var(--tes-shadow);
	overflow: hidden;
	transition: box-shadow var(--tes-transition) ease;
}

.tes-event-card:hover {
	box-shadow: var(--tes-shadow-hover);
}

.tes-ribbon {
	position: absolute;
	top: 24px;
	left: 0;
	background: var(--tes-primary);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	padding: 8px 18px 8px 16px;
	border-radius: 0 8px 8px 0;
	z-index: 2;
}

.tes-featured-badge {
	position: absolute;
	top: 20px;
	right: 20px;
	width: 40px;
	height: 40px;
	background: var(--tes-white);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--tes-primary);
	box-shadow: var(--tes-shadow);
	z-index: 2;
	font-size: 18px;
}

.tes-event-card__body {
	display: grid;
	grid-template-columns: 46% 54%;
	gap: 0;
	padding: 32px;
	padding-top: 56px;
}

.tes-event-card__media {
	border-radius: var(--tes-radius-sm);
	overflow: hidden;
	background: var(--tes-bg);
	align-self: start;
}

.tes-event-card__media img {
	display: block;
	width: 100%;
	height: auto;
}

.tes-event-card__media-placeholder {
	width: 100%;
	aspect-ratio: 4 / 3;
	background: linear-gradient(135deg, var(--tes-primary), var(--tes-secondary));
	opacity: 0.15;
}

.tes-event-card__content {
	padding-left: 32px;
}

.tes-event-card__title {
	margin: 0 0 14px;
	font-size: 28px;
	font-weight: 800;
	color: var(--tes-primary);
	line-height: 1.2;
}

.tes-event-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 8px;
	font-size: 14px;
	color: var(--tes-text);
}

.tes-event-meta .dashicons {
	color: var(--tes-primary);
	font-size: 18px;
	width: 18px;
	height: 18px;
}

.tes-event-desc {
	margin: 14px 0 20px;
	font-size: 14px;
	color: var(--tes-text-muted);
}

.tes-features-title {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	color: var(--tes-primary);
	margin: 0 0 12px;
}

.tes-features-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
}

.tes-feature {
	display: flex;
	align-items: center;
	gap: 8px;
	background: var(--tes-bg);
	border-radius: 10px;
	padding: 10px 12px;
	font-size: 12.5px;
	font-weight: 500;
	transition: background var(--tes-transition) ease, transform var(--tes-transition) ease;
}

.tes-feature:hover {
	background: #EFE9FB;
	transform: translateY(-2px);
}

.tes-feature .dashicons {
	color: var(--tes-primary);
	font-size: 18px;
	width: 18px;
	height: 18px;
	flex: 0 0 auto;
}

.tes-event-card__cta {
	background: linear-gradient(135deg, var(--tes-primary), var(--tes-secondary));
	color: #fff;
	padding: 24px 32px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	flex-wrap: wrap;
}

.tes-event-card__cta-text {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	max-width: 460px;
}

.tes-event-card__cta-text .dashicons {
	font-size: 30px;
	width: 30px;
	height: 30px;
	opacity: 0.9;
}

.tes-event-card__cta-text strong {
	display: block;
	font-size: 16px;
	margin-bottom: 4px;
}

.tes-event-card__cta-text p {
	margin: 0;
	font-size: 13px;
	opacity: 0.9;
}

/* ============ More events strip ============ */
.tes-more-events {
	margin-top: 24px;
	background: #EFE9FB;
	border-radius: var(--tes-radius);
	padding: 22px 28px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
}

.tes-more-events__text {
	display: flex;
	align-items: center;
	gap: 14px;
}

.tes-more-events__icon {
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: var(--tes-primary);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	flex: 0 0 auto;
}

.tes-more-events__text strong {
	display: block;
	color: var(--tes-primary);
	font-size: 15px;
}

.tes-more-events__text p {
	margin: 2px 0 0;
	font-size: 13px;
	color: var(--tes-text-muted);
}

/* ============ Events grid (All Events page) ============ */
.tes-events-toolbar {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 28px;
}

.tes-search-field {
	position: relative;
	flex: 1 1 240px;
}

.tes-search-field .dashicons {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--tes-text-muted);
}

.tes-search-field input,
.tes-events-toolbar select {
	width: 100%;
	padding: 12px 16px;
	border-radius: 12px;
	border: 1px solid var(--tes-border);
	background: var(--tes-white);
	font-family: var(--tes-font);
	font-size: 14px;
}

.tes-search-field input {
	padding-left: 40px;
}

.tes-events-toolbar select {
	flex: 1 1 160px;
}

.tes-events-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

.tes-events-grid__loading,
.tes-events-grid__empty {
	grid-column: 1 / -1;
	text-align: center;
	padding: 60px 0;
	color: var(--tes-text-muted);
}

.tes-event-grid-card {
	background: var(--tes-white);
	border-radius: var(--tes-radius);
	box-shadow: var(--tes-shadow);
	overflow: hidden;
	transition: transform var(--tes-transition) ease, box-shadow var(--tes-transition) ease;
}

.tes-event-grid-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--tes-shadow-hover);
}

.tes-event-grid-card__media {
	display: block;
	position: relative;
	aspect-ratio: 16 / 10;
	background: var(--tes-bg);
	overflow: hidden;
}

.tes-event-grid-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform var(--tes-transition) ease;
}

.tes-event-grid-card:hover .tes-event-grid-card__media img {
	transform: scale(1.05);
}

.tes-event-grid-card__media-placeholder {
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, var(--tes-primary), var(--tes-secondary));
	opacity: 0.15;
}

.tes-status-badge {
	position: absolute;
	top: 12px;
	right: 12px;
	padding: 5px 12px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	color: #fff;
}

.tes-status-badge--upcoming { background: var(--tes-primary); }
.tes-status-badge--today { background: #16A34A; }
.tes-status-badge--past { background: #9CA3AF; }

.tes-event-grid-card__body {
	padding: 20px;
}

.tes-event-grid-card__body h3 {
	margin: 0 0 10px;
	font-size: 17px;
}

.tes-event-grid-card__body h3 a {
	color: var(--tes-text);
	text-decoration: none;
}

.tes-event-grid-card__body h3 a:hover {
	color: var(--tes-primary);
}

.tes-event-grid-card__desc {
	font-size: 13px;
	color: var(--tes-text-muted);
	margin: 10px 0 16px;
}

.tes-events-grid__footer {
	text-align: center;
	margin-top: 32px;
}

/* ============ Single Event ============ */
.tes-single-event {
	padding-top: 0;
}

.tes-hero {
	position: relative;
	background-color: var(--tes-primary);
	background-size: cover;
	background-position: center;
	padding: 100px 0 60px;
	color: #fff;
}

.tes-hero__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(31,18,53,0.55), rgba(31,18,53,0.85));
}

.tes-hero__content {
	position: relative;
	z-index: 1;
}

.tes-hero__content h1 {
	font-size: 40px;
	font-weight: 800;
	margin: 14px 0 18px;
}

.tes-hero__meta {
	display: flex;
	gap: 22px;
	flex-wrap: wrap;
	font-size: 14px;
}

.tes-hero__meta span {
	display: flex;
	align-items: center;
	gap: 6px;
}

.tes-breadcrumbs {
	margin: 24px 0;
	font-size: 13px;
	color: var(--tes-text-muted);
}

.tes-breadcrumbs a {
	color: var(--tes-text-muted);
	text-decoration: none;
}

.tes-breadcrumbs a:hover {
	color: var(--tes-primary);
}

.tes-breadcrumbs span[aria-hidden] {
	margin: 0 6px;
}

.tes-back-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 24px;
	color: var(--tes-primary);
	text-decoration: none;
	font-weight: 600;
	font-size: 14px;
}

.tes-single-grid {
	display: grid;
	grid-template-columns: 1fr 340px;
	gap: 28px;
	align-items: start;
}

.tes-card {
	background: var(--tes-white);
	border-radius: var(--tes-radius);
	box-shadow: var(--tes-shadow);
}

.tes-card--pad {
	padding: 28px;
	margin-bottom: 24px;
}

.tes-card--pad h2 {
	margin-top: 0;
	font-size: 20px;
	color: var(--tes-primary);
}

.tes-single-description {
	font-size: 15px;
	color: var(--tes-text);
}

.tes-gallery-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
}

.tes-gallery-item img {
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: 12px;
	display: block;
	transition: transform var(--tes-transition) ease;
}

.tes-gallery-item:hover img {
	transform: scale(1.04);
}

.tes-map-embed iframe {
	width: 100%;
	height: 320px;
	border: 0;
	border-radius: var(--tes-radius-sm);
}

.tes-faqs {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.tes-faq {
	border: 1px solid var(--tes-border);
	border-radius: 12px;
	padding: 14px 18px;
}

.tes-faq summary {
	cursor: pointer;
	font-weight: 600;
}

.tes-faq p {
	margin: 10px 0 0;
	color: var(--tes-text-muted);
	font-size: 14px;
}

.tes-contact-form {
	display: flex;
	flex-direction: column;
	gap: 14px;
	max-width: 480px;
}

.tes-form-row {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.tes-form-row label {
	font-size: 13px;
	font-weight: 600;
}

.tes-form-row input,
.tes-form-row textarea {
	padding: 12px 14px;
	border: 1px solid var(--tes-border);
	border-radius: 10px;
	font-family: var(--tes-font);
	font-size: 14px;
}

.tes-form-response {
	font-size: 13px;
	margin: 0;
}

.tes-form-response.is-success { color: #16A34A; }
.tes-form-response.is-error { color: #DC2626; }

.tes-sidebar-card h3 {
	margin-top: 0;
	color: var(--tes-primary);
	font-size: 16px;
}

.tes-detail-list {
	list-style: none;
	margin: 0 0 16px;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
	font-size: 14px;
}

.tes-detail-list li {
	display: flex;
	align-items: center;
	gap: 10px;
}

.tes-detail-list .dashicons {
	color: var(--tes-primary);
}

.tes-detail-list a {
	color: var(--tes-text);
	text-decoration: none;
}

.tes-social-icons {
	display: flex;
	gap: 10px;
}

.tes-social-icons a,
.tes-share-btn {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: var(--tes-bg);
	color: var(--tes-primary);
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	transition: background var(--tes-transition) ease, color var(--tes-transition) ease;
}

.tes-social-icons a:hover,
.tes-share-btn:hover {
	background: var(--tes-primary);
	color: #fff;
}

.tes-share-buttons {
	display: flex;
	gap: 10px;
}

.tes-related-events {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	margin: 20px 0 40px;
}

.tes-related-events__link {
	display: flex;
	align-items: center;
	gap: 12px;
	background: var(--tes-white);
	border-radius: var(--tes-radius-sm);
	box-shadow: var(--tes-shadow);
	padding: 18px 20px;
	text-decoration: none;
	color: var(--tes-text);
	transition: box-shadow var(--tes-transition) ease;
}

.tes-related-events__link:hover {
	box-shadow: var(--tes-shadow-hover);
}

.tes-related-events__link--next {
	justify-content: flex-end;
	text-align: right;
	grid-column: 2;
}

.tes-related-events__link small {
	display: block;
	color: var(--tes-text-muted);
	font-size: 11px;
	text-transform: uppercase;
}

.tes-related-events__link .dashicons {
	color: var(--tes-primary);
}

.tes-archive-header {
	padding: 60px 0 30px;
	background: linear-gradient(135deg, var(--tes-primary), var(--tes-secondary));
	color: #fff;
	text-align: center;
}

.tes-archive-header h1 {
	margin: 0;
	font-size: 32px;
	font-weight: 800;
}

.tes-status-pill {
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	color: #fff;
	text-transform: uppercase;
}
.tes-status-pill--upcoming { background: var(--tes-primary); }
.tes-status-pill--today { background: #16A34A; }
.tes-status-pill--past { background: #9CA3AF; }

/* ============ Responsive ============ */

/* Tablet: calendar on top, event below */
@media (max-width: 1024px) {
	.tes-three-events {
		grid-template-columns: 1fr;
	}

	.tes-event-card__body {
		grid-template-columns: 1fr;
	}

	.tes-event-card__content {
		padding-left: 0;
		padding-top: 24px;
	}

	.tes-single-grid {
		grid-template-columns: 1fr;
	}

	.tes-events-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* Mobile: everything stacked */
@media (max-width: 640px) {
	.tes-wrapper {
		padding: 24px 0;
	}

	.tes-container {
		padding: 0 16px;
	}

	.tes-event-card__body,
	.tes-event-card__cta,
	.tes-more-events {
		padding: 20px;
	}

	.tes-event-card__title {
		font-size: 22px;
	}

	.tes-features-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.tes-event-card__cta {
		flex-direction: column;
		align-items: flex-start;
	}

	.tes-events-grid {
		grid-template-columns: 1fr;
	}

	.tes-gallery-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.tes-related-events {
		grid-template-columns: 1fr;
	}

	.tes-related-events__link--next {
		grid-column: 1;
		justify-content: flex-start;
		text-align: left;
	}

	.tes-hero__content h1 {
		font-size: 28px;
	}

	.tes-events-toolbar {
		flex-direction: column;
	}
}
