/**
 * TM Event Calendar - single event page styles.
 *
 * Calendar grid/component styles live in assets/css/calendar/
 * (variables.css, layout.css, components.css). Shared tokens and
 * primitives (.tec-card, .tec-btn, .tec-badge) live in
 * assets/css/design-system.css, loaded before this file.
 *
 * Mobile-first: base rules target small screens, min-width media
 * queries layer on tablet/desktop layout (CSS Grid for the two-column
 * body and the related-events grid).
 */

.tmec-single-event {
	max-width: 1180px;
	margin: 0 auto var(--tec-space-8);
	padding-inline: var(--tec-space-4);
	font-family: var(--tec-font-family);
	color: var(--tec-text);
}

/* ---------------------------------------------------------------------- */
/* Hero                                                                  */
/* ---------------------------------------------------------------------- */

.tmec-single-event__hero {
	position: relative;
	margin-inline: calc(var(--tec-space-4) * -1);
	margin-bottom: var(--tec-space-6);
	overflow: hidden;
	background: linear-gradient(135deg, var(--tec-primary), var(--tec-secondary));
}

@media (min-width: 600px) {
	.tmec-single-event__hero {
		margin-inline: 0;
		border-radius: var(--tec-radius-xl);
	}
}

.tmec-single-event__hero-image {
	position: relative;
	height: 320px;
}

@media (min-width: 600px) {
	.tmec-single-event__hero-image {
		height: 420px;
	}
}

.tmec-single-event__hero-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Premium dark overlay: stronger gradient than a flat tint so the hero
   content (title, meta, CTA) stays legible against any photo. */
.tmec-single-event__hero-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(15, 23, 42, 0.15) 0%, rgba(15, 23, 42, 0.45) 55%, rgba(15, 23, 42, 0.92) 100%);
}

.tmec-single-event__hero-content {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--tec-space-3);
	padding: var(--tec-space-6) var(--tec-space-4);
	color: var(--tec-on-primary);
}

@media (min-width: 600px) {
	.tmec-single-event__hero-content {
		padding: var(--tec-space-8) var(--tec-space-6);
	}
}

.tmec-single-event__hero--has-image .tmec-single-event__hero-content {
	position: absolute;
	inset: auto 0 0 0;
}

.tmec-single-event__hero--no-image .tmec-single-event__hero-content {
	padding-top: var(--tec-space-8);
}

/* ---------------------------------------------------------------------- */
/* Breadcrumb                                                            */
/* ---------------------------------------------------------------------- */

.tmec-single-event__breadcrumb {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--tec-space-1);
	font-size: var(--tec-font-size-xs);
	font-weight: var(--tec-font-weight-semibold);
}

.tmec-single-event__breadcrumb a {
	color: inherit;
	text-decoration: none;
	opacity: 0.85;
	border-radius: var(--tec-radius-sm);
	transition: opacity var(--tec-transition-fast);
}

.tmec-single-event__breadcrumb a:hover {
	opacity: 1;
	text-decoration: underline;
}

.tmec-single-event__breadcrumb a:focus-visible {
	outline: 2px solid var(--tec-on-primary);
	outline-offset: 2px;
	opacity: 1;
}

.tmec-single-event__breadcrumb-separator {
	opacity: 0.6;
}

.tmec-single-event__breadcrumb-current {
	opacity: 0.75;
	max-width: 40ch;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* ---------------------------------------------------------------------- */
/* Category Badge & Title                                                */
/* ---------------------------------------------------------------------- */

.tmec-single-event__category-badge {
	box-shadow: var(--tec-shadow-sm);
}

.tmec-single-event__title {
	margin: 0;
	font-size: var(--tec-font-size-2xl);
	line-height: var(--tec-line-height-tight);
	font-weight: var(--tec-font-weight-extrabold);
	letter-spacing: -0.02em;
	text-wrap: balance;
}

@media (min-width: 600px) {
	.tmec-single-event__title {
		font-size: var(--tec-font-size-3xl);
	}
}

/* ---------------------------------------------------------------------- */
/* Hero meta row                                                         */
/* ---------------------------------------------------------------------- */

.tmec-single-event__hero-meta {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: var(--tec-space-2) var(--tec-space-5);
	font-size: var(--tec-font-size-sm);
	font-weight: var(--tec-font-weight-medium);
}

.tmec-single-event__hero-meta-item {
	display: inline-flex;
	align-items: center;
	gap: var(--tec-space-2);
}

.tmec-single-event__hero-meta-icon {
	flex: 0 0 auto;
	opacity: 0.9;
}

/* ---------------------------------------------------------------------- */
/* Hero registration CTA                                                 */
/* ---------------------------------------------------------------------- */

.tmec-single-event__registration--hero {
	margin-top: var(--tec-space-2);
}

.tmec-single-event__registration--hero .tmec-single-event__registration-button {
	padding: 0.75rem 1.75rem;
	box-shadow: var(--tec-shadow-lg);
}

/* ---------------------------------------------------------------------- */
/* Body layout: main content + sticky sidebar (CSS Grid)                */
/* ---------------------------------------------------------------------- */

.tmec-single-event__body {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--tec-space-6);
	align-items: start;
}

@media (min-width: 960px) {
	.tmec-single-event__body {
		grid-template-columns: minmax(0, 1fr) 340px;
	}
}

.tmec-single-event__main {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: var(--tec-space-6);
}

.tmec-single-event__sidebar-inner {
	position: sticky;
	top: var(--tec-space-6);
	display: flex;
	flex-direction: column;
	gap: var(--tec-space-5);
}

@media (max-width: 959px) {
	.tmec-single-event__sidebar-inner {
		position: static;
	}
}

/* ---------------------------------------------------------------------- */
/* Content section (About / Agenda / Speakers / Venue) — shared shell   */
/* ---------------------------------------------------------------------- */

.tmec-single-event__section {
	background: var(--tec-bg);
	border: 1px solid var(--tec-border);
	border-radius: var(--tec-radius-lg);
	box-shadow: var(--tec-shadow-sm);
	padding: var(--tec-space-5);
}

@media (min-width: 600px) {
	.tmec-single-event__section {
		padding: var(--tec-space-6);
	}
}

.tmec-single-event__section-title {
	margin: 0 0 var(--tec-space-4);
	font-size: var(--tec-font-size-xl);
	font-weight: var(--tec-font-weight-bold);
	color: var(--tec-text);
	letter-spacing: -0.01em;
}

/* ---------------------------------------------------------------------- */
/* Description (About This Event)                                       */
/* ---------------------------------------------------------------------- */

.tmec-single-event__description {
	font-size: var(--tec-font-size-base);
	line-height: var(--tec-line-height-base);
	color: var(--tec-text);
}

.tmec-single-event__description :first-child {
	margin-top: 0;
}

.tmec-single-event__description :last-child {
	margin-bottom: 0;
}

.tmec-single-event__description a {
	color: var(--tec-primary);
}

.tmec-single-event__description img {
	max-width: 100%;
	height: auto;
	border-radius: var(--tec-radius-md);
}

/* ---------------------------------------------------------------------- */
/* Agenda                                                                */
/* ---------------------------------------------------------------------- */

.tmec-single-event__agenda-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: var(--tec-space-4);
}

.tmec-single-event__agenda-item {
	display: flex;
	flex-wrap: wrap;
	gap: var(--tec-space-1) var(--tec-space-4);
	padding-bottom: var(--tec-space-4);
	border-bottom: 1px solid var(--tec-border);
}

.tmec-single-event__agenda-item:last-child {
	padding-bottom: 0;
	border-bottom: none;
}

.tmec-single-event__agenda-time {
	flex: 0 0 auto;
	min-width: 6rem;
	font-size: var(--tec-font-size-sm);
	font-weight: var(--tec-font-weight-bold);
	color: var(--tec-primary);
}

.tmec-single-event__agenda-body {
	flex: 1 1 240px;
	display: flex;
	flex-direction: column;
	gap: var(--tec-space-1);
}

.tmec-single-event__agenda-title {
	font-weight: var(--tec-font-weight-semibold);
	color: var(--tec-text);
}

.tmec-single-event__agenda-description {
	font-size: var(--tec-font-size-sm);
	color: var(--tec-muted);
}

/* ---------------------------------------------------------------------- */
/* Speakers                                                              */
/* ---------------------------------------------------------------------- */

.tmec-single-event__speaker-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: var(--tec-space-4);
}

.tmec-single-event__speaker-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--tec-space-2);
	padding: var(--tec-space-4);
	text-align: center;
}

.tmec-single-event__speaker-photo {
	width: 4rem;
	height: 4rem;
	border-radius: 50%;
	object-fit: cover;
}

.tmec-single-event__speaker-photo--placeholder {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--tec-primary-soft);
	color: var(--tec-primary);
	font-size: var(--tec-font-size-lg);
	font-weight: var(--tec-font-weight-bold);
}

.tmec-single-event__speaker-name {
	font-weight: var(--tec-font-weight-semibold);
	color: var(--tec-text);
}

.tmec-single-event__speaker-title {
	font-size: var(--tec-font-size-xs);
	color: var(--tec-muted);
}

/* ---------------------------------------------------------------------- */
/* Venue & Map                                                           */
/* ---------------------------------------------------------------------- */

.tmec-single-event__venue-address {
	margin: 0 0 var(--tec-space-4);
	font-size: var(--tec-font-size-base);
	font-weight: var(--tec-font-weight-medium);
	color: var(--tec-muted);
}

.tmec-single-event__map {
	position: relative;
	overflow: hidden;
	border-radius: var(--tec-radius-lg);
	border: 1px solid var(--tec-border);
}

.tmec-single-event__map-frame {
	display: block;
	width: 100%;
	height: 280px;
	border: 0;
}

@media (min-width: 600px) {
	.tmec-single-event__map-frame {
		height: 340px;
	}
}

/* ---------------------------------------------------------------------- */
/* Meta card (sidebar)                                                   */
/* ---------------------------------------------------------------------- */

.tmec-single-event__meta-card {
	padding: var(--tec-space-5);
}

.tmec-single-event__meta {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: var(--tec-space-4);
}

.tmec-single-event__meta-item {
	display: flex;
	align-items: flex-start;
	gap: var(--tec-space-3);
}

.tmec-single-event__meta-icon {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: var(--tec-radius-md);
	background: var(--tec-primary-soft);
	color: var(--tec-primary);
	transition: background-color var(--tec-transition-fast), color var(--tec-transition-fast);
}

.tmec-single-event__meta-text {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}

.tmec-single-event__meta-label {
	font-size: var(--tec-font-size-xs);
	font-weight: var(--tec-font-weight-bold);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--tec-muted);
}

.tmec-single-event__meta-value {
	font-size: var(--tec-font-size-base);
	font-weight: var(--tec-font-weight-semibold);
	color: var(--tec-text);
}

/* ---------------------------------------------------------------------- */
/* Registration (sidebar)                                               */
/* ---------------------------------------------------------------------- */

.tmec-single-event__registration {
	margin-bottom: 0;
}

.tmec-single-event__registration-button {
	width: 100%;
	padding: 0.85rem 1.5rem;
	font-size: var(--tec-font-size-base);
	transition: background-color var(--tec-transition-fast), border-color var(--tec-transition-fast), box-shadow var(--tec-transition-fast), transform var(--tec-transition-fast);
}

.tmec-single-event__registration-button:hover {
	transform: translateY(-2px);
}

/* ---------------------------------------------------------------------- */
/* Share                                                                 */
/* ---------------------------------------------------------------------- */

.tmec-single-event__share {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: var(--tec-space-3);
}

.tmec-single-event__share-label {
	font-weight: var(--tec-font-weight-bold);
	font-size: var(--tec-font-size-sm);
	color: var(--tec-text);
}

.tmec-single-event__share-list {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: var(--tec-space-2);
	margin: 0;
	padding: 0;
}

.tmec-single-event__share-link {
	display: inline-flex;
	align-items: center;
	padding: 0.45rem 1rem;
	border: 1px solid var(--tec-border-strong);
	border-radius: var(--tec-radius-pill);
	color: var(--tec-text);
	text-decoration: none;
	font-size: var(--tec-font-size-xs);
	font-weight: var(--tec-font-weight-semibold);
	transition: background-color var(--tec-transition-fast), border-color var(--tec-transition-fast), color var(--tec-transition-fast), transform var(--tec-transition-fast);
}

.tmec-single-event__share-link:hover {
	background: var(--tec-primary);
	border-color: var(--tec-primary);
	color: var(--tec-on-primary);
	transform: translateY(-2px);
}

.tmec-single-event__share-link:focus-visible {
	outline: none;
	box-shadow: var(--tec-shadow-focus);
}

/* ---------------------------------------------------------------------- */
/* Previous / Next Navigation                                            */
/* ---------------------------------------------------------------------- */

.tmec-single-event__navigation {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--tec-space-4);
	margin: var(--tec-space-8) 0;
}

@media (min-width: 600px) {
	.tmec-single-event__navigation {
		grid-template-columns: 1fr 1fr;
	}
}

.tmec-single-event__nav-link {
	display: flex;
	flex-direction: column;
	gap: var(--tec-space-1);
	max-width: 100%;
	padding: var(--tec-space-4) var(--tec-space-5);
	border: 1px solid var(--tec-border);
	border-radius: var(--tec-radius-lg);
	background: var(--tec-bg);
	text-decoration: none;
	color: var(--tec-text);
	box-shadow: var(--tec-shadow-xs);
	transition: box-shadow var(--tec-transition-base), transform var(--tec-transition-base), border-color var(--tec-transition-base);
}

.tmec-single-event__nav-link:hover {
	border-color: var(--tec-primary);
	box-shadow: var(--tec-shadow-md);
	transform: translateY(-2px);
}

.tmec-single-event__nav-link:focus-visible {
	outline: none;
	box-shadow: var(--tec-shadow-focus);
}

@media (min-width: 600px) {
	.tmec-single-event__nav-link--next {
		text-align: right;
		align-items: flex-end;
	}
}

.tmec-single-event__nav-link--disabled {
	visibility: hidden;
	display: none;
}

@media (min-width: 600px) {
	.tmec-single-event__nav-link--disabled {
		display: flex;
	}
}

.tmec-single-event__nav-direction {
	font-size: var(--tec-font-size-xs);
	font-weight: var(--tec-font-weight-bold);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--tec-primary);
}

.tmec-single-event__nav-title {
	font-size: var(--tec-font-size-base);
	font-weight: var(--tec-font-weight-semibold);
}

/* ---------------------------------------------------------------------- */
/* Related Events (CSS Grid, card-based)                                 */
/* ---------------------------------------------------------------------- */

.tmec-single-event__related {
	margin-top: var(--tec-space-6);
}

.tmec-single-event__related-title {
	font-size: var(--tec-font-size-xl);
	font-weight: var(--tec-font-weight-bold);
	margin: 0 0 var(--tec-space-5);
	color: var(--tec-text);
}

.tmec-single-event__related-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: var(--tec-space-5);
}

.tmec-single-event__related-link {
	display: flex;
	flex-direction: column;
	gap: var(--tec-space-2);
	text-decoration: none;
	color: var(--tec-text);
	border: 1px solid var(--tec-border);
	border-radius: var(--tec-radius-lg);
	padding: var(--tec-space-4);
	background: var(--tec-bg);
	box-shadow: var(--tec-shadow-xs);
	transition: box-shadow var(--tec-transition-base), transform var(--tec-transition-base), border-color var(--tec-transition-base);
}

.tmec-single-event__related-link:hover {
	box-shadow: var(--tec-shadow-md);
	transform: translateY(-3px);
	border-color: var(--tec-border-strong);
}

.tmec-single-event__related-link:focus-visible {
	outline: none;
	box-shadow: var(--tec-shadow-focus);
}

.tmec-single-event__related-thumbnail {
	display: block;
	overflow: hidden;
	border-radius: var(--tec-radius-md);
}

.tmec-single-event__related-thumbnail img {
	width: 100%;
	height: 140px;
	object-fit: cover;
	display: block;
	transition: transform var(--tec-transition-slow);
}

.tmec-single-event__related-link:hover .tmec-single-event__related-thumbnail img {
	transform: scale(1.05);
}

.tmec-single-event__related-title-text {
	font-weight: var(--tec-font-weight-bold);
	font-size: var(--tec-font-size-base);
}

.tmec-single-event__related-date {
	font-size: var(--tec-font-size-xs);
	color: var(--tec-muted);
}

/* ---------------------------------------------------------------------- */
/* Accessibility: reduced motion                                        */
/* ---------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.tmec-single-event__breadcrumb a,
	.tmec-single-event__meta-icon,
	.tmec-single-event__registration-button,
	.tmec-single-event__share-link,
	.tmec-single-event__nav-link,
	.tmec-single-event__related-link,
	.tmec-single-event__related-thumbnail img {
		transition: none;
	}

	.tmec-single-event__related-link:hover .tmec-single-event__related-thumbnail img {
		transform: none;
	}
}
