/**
 * Gut Altona | Events – Frontend
 * Bewusst zurückhaltend: erbt Schriften/Farben von Avada, wo möglich.
 */

/* Nur Fallbacks. --tie-farbe und --tie-radius setzt das Plugin per <style id="tie-farbe">
   direkt im <head> erneut auf :root (globale Einstellung bzw. Farbe der Eventreihe);
   da dieser Block nach der Datei ausgegeben wird, gewinnt er. Einzelne Reihen
   überschreiben --tie-farbe zusätzlich inline auf .tie-event. */
:root {
	--tie-farbe: #a91c1c;
	--tie-radius: 10px;
	--tie-border: #e8e8e8;
	--tie-muted: #6b6b6b;
	--tie-bg: #fff;
}

/* ----------------------------------------------------------- Übersicht */

.tie-events {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: 24px;
	margin: 24px 0;
}

.tie-events.tie-cols-1 { grid-template-columns: 1fr; }
.tie-events.tie-cols-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.tie-events.tie-cols-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.tie-event {
	background: var(--tie-bg);
	border: 1px solid var(--tie-border);
	border-radius: var(--tie-radius);
	overflow: hidden;
	box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
	transition: box-shadow .25s ease;
	align-self: start;
}

.tie-event[open] {
	box-shadow: 0 6px 24px rgba(0, 0, 0, .12);
}

.tie-event summary {
	cursor: pointer;
	list-style: none;
	display: block;
	position: relative;
	transition: background .2s ease;
}

.tie-event summary::-webkit-details-marker { display: none; }
.tie-event summary::marker { content: ''; }
.tie-event summary:hover { background: #fafafa; }

.tie-event summary:focus-visible {
	outline: 2px solid var(--tie-farbe);
	outline-offset: -2px;
}

.tie-event .tie-img {
	width: 100%;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: #eee;
}

.tie-event .tie-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .4s ease;
}

.tie-event summary:hover .tie-img img { transform: scale(1.04); }

.tie-img-placeholder {
	background: linear-gradient(135deg, #f2f2f2, #e6e6e6);
}

.tie-event .tie-head {
	padding: 18px 22px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.tie-event .tie-titel {
	margin: 0 0 3px;
	font-size: 21px;
	line-height: 1.25;
	font-weight: 700;
}

.tie-event .tie-count {
	font-size: 14px;
	font-weight: 600;
	color: var(--tie-farbe);
}

.tie-event .tie-arrow {
	color: var(--tie-farbe);
	flex-shrink: 0;
	display: flex;
	transition: transform .25s ease;
}

.tie-event[open] .tie-arrow { transform: rotate(180deg); }

/* Terminliste */

.tie-dates {
	padding: 4px 22px 20px;
	border-top: 1px solid var(--tie-border);
}

.tie-dates-standalone {
	border-top: none;
	padding: 0;
}

.tie-serie-excerpt {
	margin: 14px 0 6px;
	color: var(--tie-muted);
	font-size: 15px;
}

.tie-dates ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.tie-dates li {
	border-bottom: 1px solid #f0f0f0;
}

.tie-dates li:last-child { border-bottom: none; }

.tie-dates li > a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 4px;
	text-decoration: none;
	color: inherit;
	border-radius: 6px;
	transition: background .18s ease, padding .18s ease;
	flex-wrap: wrap;
}

.tie-dates li > a:hover,
.tie-dates li > a:focus-visible {
	background: #fafafa;
	padding-left: 10px;
	padding-right: 10px;
}

.tie-date-main {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px 12px;
}

.tie-date {
	font-weight: 700;
	font-size: 16px;
}

.tie-time {
	color: var(--tie-muted);
	font-size: 14px;
}

.tie-cta {
	color: var(--tie-farbe);
	font-weight: 600;
	font-size: 14px;
	white-space: nowrap;
	opacity: .75;
	transition: opacity .18s ease;
}

.tie-dates li > a:hover .tie-cta { opacity: 1; }

.tie-dates li.tie-is-full > a { opacity: .6; }

.tie-mehr {
	margin: 12px 0 0;
	text-align: center;
}

.tie-mehr a {
	color: var(--tie-farbe);
	font-weight: 600;
	text-decoration: none;
	font-size: 14px;
}

/* Tags */

.tie-tag {
	display: inline-block;
	font-size: 12px;
	font-weight: 600;
	padding: 2px 8px;
	border-radius: 100px;
	line-height: 1.6;
	white-space: nowrap;
}

.tie-tag-full   { background: #f6e3e3; color: #a91c1c; }
.tie-tag-few    { background: #fdf2d9; color: #8a6100; }
.tie-tag-preis  { background: #f0f0f0; color: #444; }

.tie-leer {
	color: var(--tie-muted);
	font-style: italic;
	padding: 12px 0;
}

/* -------------------------------------------------- Termin-Einzelseite */

.tie-single-serie {
	margin: 0 0 16px;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: .06em;
	font-weight: 600;
}

.tie-single-serie a {
	color: var(--tie-farbe);
	text-decoration: none;
}

.tie-facts {
	list-style: none;
	margin: 0 0 28px;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 1px;
	background: var(--tie-border);
	border: 1px solid var(--tie-border);
	border-radius: var(--tie-radius);
	overflow: hidden;
}

.tie-facts li {
	background: #fff;
	padding: 14px 18px;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.tie-fact-label {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: var(--tie-muted);
	font-weight: 600;
}

.tie-fact-value {
	font-size: 16px;
	font-weight: 600;
}

.tie-single-text { margin-bottom: 32px; }

.tie-weitere {
	margin-top: 40px;
	padding-top: 24px;
	border-top: 1px solid var(--tie-border);
}

.tie-weitere h3 { margin-top: 0; font-size: 20px; }

.tie-weitere ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.tie-weitere li a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	border: 1px solid var(--tie-border);
	border-radius: 100px;
	text-decoration: none;
	color: inherit;
	font-size: 14px;
	transition: border-color .18s ease, color .18s ease;
}

.tie-weitere li a:hover {
	border-color: var(--tie-farbe);
	color: var(--tie-farbe);
}

.tie-weitere li.tie-is-full a { opacity: .55; }

.tie-serie-termine { margin-top: 32px; }

/* ------------------------------------------------------------ Formular */

/* Das Anmeldeformular kommt von Avada Forms und bringt sein eigenes Styling
   mit. Hier nur der Rahmen drumherum. */

.tie-anmeldung {
	background: #fafafa;
	border: 1px solid var(--tie-border);
	border-radius: var(--tie-radius);
	padding: 28px;
	margin: 32px 0;
	scroll-margin-top: 120px;
}

.tie-anmeldung-titel {
	margin: 0 0 6px;
	font-size: 22px;
}

.tie-restplaetze {
	margin: 0 0 18px;
	font-weight: 600;
	color: #8a6100;
	font-size: 14px;
}

/* Avada Form soll im Container nicht doppelt Abstand erzeugen */
.tie-anmeldung-avada .fusion-form-form-wrapper { margin: 0; }
.tie-anmeldung-avada .fusion-form-field:last-of-type { margin-bottom: 0; }

/* Meldungen */

.tie-alert {
	padding: 16px 20px;
	border-radius: var(--tie-radius);
	margin: 24px 0;
	border-left: 4px solid;
	scroll-margin-top: 120px;
}

.tie-alert p:last-child { margin-bottom: 0; }
.tie-alert strong + .tie-success-text { margin-top: 6px; }
.tie-success-text p:last-child { margin-bottom: 0; }


.tie-alert-success { background: #edf7ed; border-color: #2e7d32; color: #1b4d1e; }
.tie-alert-error   { background: #fdecea; border-color: #c62828; color: #7f1d1d; }
.tie-alert-warning { background: #fdf4e3; border-color: #ed9c28; color: #7a4a00; }
.tie-alert-info    { background: #eef4fb; border-color: #1976d2; color: #10396b; }

/* ------------------------------------------------------------- Mobile */

@media (max-width: 640px) {
	.tie-events { grid-template-columns: 1fr; gap: 18px; }
	.tie-anmeldung { padding: 20px; }
	.tie-event .tie-titel { font-size: 19px; }
	.tie-dates li > a { flex-direction: column; align-items: flex-start; gap: 6px; }
	.tie-cta { font-size: 13px; }
	.tie-facts { grid-template-columns: 1fr 1fr; }
}

/* Reduzierte Bewegung respektieren */
@media (prefers-reduced-motion: reduce) {
	.tie-event,
	.tie-event .tie-img img,
	.tie-arrow,
	.tie-dates li > a {
		transition: none !important;
	}
}
