/* ==========================================================
   RE|FREQUENCY – rf-course-archive.css
   Kursübersicht / Course-Archive Skin (Dashboard-Niveau)
   ----------------------------------------------------------
   NUR Kurs-Archiv: post-type-archive-courses + course-category/-tag.
   Stylt .rf-archive-* (rf-course-archive.php) + native Tutor-Card-Schale.
   Quelle der Optik: rf-dashboard.css (Tokens). CD frozen. Kein Blau.
   ----------------------------------------------------------
   Version 1.1.0 — 2026-08-25
   · .rf-archive-btn--primary („Jetzt kaufen") von hart kodiertem
     rgba(155,245,232,0.50) auf --rf-btn-* umgestellt. Der halbtransparente
     Wert ließ den Kauf-Button auf der dunklen Karte mit dem Ghost-Button
     „Kursdetails" verschmelzen.
   · Hinweis: Der Strong-Fix vom 2026-08-25 betrifft .rf-course-access-btn
     auf der Kurs-DETAIL-Seite (rf-course.css) — nicht diese Kachel.
   ========================================================== */

/* ---------- 0) BÜHNE: Wasser-BG + Dark-Overlay (full-bleed) ---------- */
body.post-type-archive-courses,
body.tax-course-category,
body.tax-course-tag {
	background-color: var(--rf-color-ink);
	background-image:
		linear-gradient(var(--rf-overlay-dark-76), var(--rf-overlay-dark-76)),
		var(--rf-water-image);
	background-position: center center;
	background-size: cover;
	background-repeat: no-repeat;
	background-attachment: fixed;
}
.post-type-archive-courses .tutor-courses-wrap,
.post-type-archive-courses .tutor-wrap-parent,
.tax-course-category .tutor-courses-wrap,
.tax-course-tag .tutor-courses-wrap,
.course-archive-page {
	background: transparent !important;
	box-shadow: none !important;
}

/* ---------- 1) Hero (H1 + Subline) ---------- */
.rf-archive-hero {
	max-width: 940px;
	margin: 0 auto 64px;        /* mehr Abstand zu den Cards */
	padding: 8px 16px 0;
	text-align: center;
}
.rf-archive-hero-title {
	font-family: var(--rf-font-family);
	font-weight: 500;            /* weniger fett/blockig */
	font-size: clamp(22px, 2.6vw, 32px);
	line-height: 1.3;
	letter-spacing: 0;
	color: var(--rf-color-text-on-dark);
	margin: 0 0 24px;           /* Abstand Headline -> Subline */
}
.rf-archive-hero-sub {
	font-family: var(--rf-font-family);
	font-weight: 400;
	font-size: clamp(15px, 1.5vw, 17px);
	line-height: 1.65;
	color: var(--rf-color-text-on-dark-soft);
	margin: 6px auto 0;
	max-width: 780px;
}

/* ---------- 2) Karten: Petrol-Glas (= Dashboard-Panels) ---------- */
.course-archive-page .tutor-course-card {
	position: relative;
	background: var(--rf-surface-dark) !important;
	-webkit-backdrop-filter: blur(var(--rf-blur));
	backdrop-filter: blur(var(--rf-blur));
	border: var(--rf-surface-dark-border) !important;
	box-shadow: var(--rf-surface-dark-shadow) !important;
	border-radius: var(--rf-card-radius) !important;
	overflow: hidden;
}
.course-archive-page .tutor-card-body { background: transparent !important; border: 0 !important; }
.course-archive-page .tutor-card-footer {
	background: transparent !important;
	border: 0 !important;
	padding-bottom: 22px !important;   /* Luft unter den Buttons */
}

/* Texte hell auf Petrol */
.course-archive-page .tutor-course-name,
.course-archive-page .tutor-course-name a {
	color: var(--rf-color-text-on-dark) !important;
	font-family: var(--rf-font-family);
}
/* Meta „Von / In / 20h" + Links lesbar (vorher grau/schwarz) */
.course-archive-page .tutor-meta,
.course-archive-page .tutor-meta-value,
.course-archive-page .tutor-meta span:not(.tutor-avatar-text) {
	color: var(--rf-color-text-on-dark-soft) !important;
	font-family: var(--rf-font-family);
}
.course-archive-page .tutor-meta a { color: var(--rf-color-mint-strong) !important; }
.course-archive-page .tutor-meta [class*="tutor-icon-"] { color: var(--rf-color-text-on-dark-soft) !important; }
.course-archive-page .tutor-avatar-text { color: var(--rf-color-ink) !important; } /* K bleibt dunkel auf Mint */

/* ---------- 3) CTA: Preis + Buttons ---------- */
.rf-archive-cta { display: flex; flex-direction: column; gap: 16px; }

/* Preis – etwas größer, hell, auch der NATIVE Tutor-Preis */
.rf-archive-price { display: flex; align-items: baseline; gap: 10px; font-family: var(--rf-font-family); }
.rf-archive-price-now,
.course-archive-page .rf-archive-price--native .list-item-price > span:first-child {
	font-weight: 700;
	font-size: 1.3rem;
	color: var(--rf-color-text-on-dark) !important;
}
.course-archive-page .rf-archive-price--native,
.course-archive-page .rf-archive-price--native .list-item-price,
.course-archive-page .rf-archive-price--native span {
	color: var(--rf-color-text-on-dark) !important;
}
.rf-archive-price-old,
.course-archive-page .rf-archive-price--native del {
	font-weight: 500;
	font-size: 0.95rem;
	color: var(--rf-color-text-on-dark-soft) !important;
	text-decoration: line-through;
	opacity: 0.7;
}

/* Button-Reihe */
.rf-archive-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 4px; }

/* Button-Basis */
.rf-archive-btn {
	font-family: var(--rf-font-family);
	font-weight: 500;                 /* weniger fett */
	letter-spacing: 0.01em;
	text-transform: none;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.9em 1.45em;            /* mehr Padding oben/unten */
	border-radius: 12px;
	line-height: 1.2;
	cursor: pointer;
	-webkit-backdrop-filter: blur(var(--rf-blur));
	backdrop-filter: blur(var(--rf-blur));
	transition: background 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

/* „Kursdetails" = Ghost – Text bleibt mint (nicht grau) */
.rf-archive-btn--ghost {
	background: var(--rf-btn-ghost-bg);
	color: var(--rf-color-mint-strong) !important;
	border: none;
	box-shadow: inset 0 0 0 1px rgba(155, 245, 232, 0.55);
}
.rf-archive-btn--ghost:hover {
	background: rgba(155, 245, 232, 0.18);
	color: var(--rf-color-mint-strong) !important;
}

/* „Jetzt kaufen" / „Weiterlernen" = Primary.
   1.1.0: vorher hart kodiertes rgba(155,245,232,0.50) — halbtransparent, dadurch
   auf der dunklen Karte grünlich-blass und kaum vom Ghost-Button zu unterscheiden.
   Jetzt Token-basiert wie jeder andere Primary im Projekt (Regel: rf-tokens.css ist
   die einzige Token-Quelle). Deckende Fläche, Ink-Text, kein Blur. */
.rf-archive-btn--primary {
	background: var(--rf-btn-bg) !important;
	color: var(--rf-btn-text) !important;
	border: var(--rf-btn-border);
	box-shadow: var(--rf-btn-shadow);
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
}
.rf-archive-btn--primary:hover {
	background: var(--rf-btn-bg-strong) !important;
	color: var(--rf-btn-text) !important;
	box-shadow: var(--rf-btn-shadow-hover);
}

/* ---------- 4) Enrolled-Markierung (A2) ---------- */
.course-archive-page .tutor-course-card:has(.rf-archive-cta--enrolled) {
	outline: 1px solid rgba(155, 245, 232, 0.42);
	outline-offset: 0;
}
.course-archive-page .tutor-course-card:has(.rf-archive-cta--enrolled)::before {
	content: "Gekauft";
	position: absolute; top: 12px; left: 12px; z-index: 3;
	font: 600 12px/1 var(--rf-font-family);
	letter-spacing: 0.02em;
	color: var(--rf-color-ink);
	background: linear-gradient(180deg, rgba(155,245,232,0.96) 0%, rgba(120,210,196,0.92) 100%);
	padding: 6px 11px; border-radius: 999px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}

/* ---------- 5) Filter-/Sortierleiste (Glas-Skin) ---------- */
/* Natives Tutor-Sort-Dropdown (.tutor-course-filter) ins RF-Glas.
   Markup: .tutor-js-form-select > .tutor-form-select-label
           + .tutor-form-select-dropdown > .tutor-form-select-options
           > .tutor-form-select-option(.is-active). Natives <select> bleibt
           per Tutor display:none. Nur Paint, keine Logik. */
.course-archive-page .tutor-course-filter { margin: 0 0 28px; }

.course-archive-page .tutor-js-form-select {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	padding: 0 42px 0 18px;            /* Platz rechts fuer Caret */
	background: var(--rf-surface-dark) !important;
	border: var(--rf-surface-dark-border) !important;
	box-shadow: var(--rf-surface-dark-shadow) !important;
	border-radius: 999px !important;
	-webkit-backdrop-filter: blur(var(--rf-blur));
	backdrop-filter: blur(var(--rf-blur));
	cursor: pointer;
	font-family: var(--rf-font-family);
}
.course-archive-page .tutor-form-select-label {
	color: var(--rf-color-text-on-dark) !important;
	font-size: 14.5px;
	font-weight: 500;
	line-height: 1.2;
	white-space: nowrap;
}
/* Caret (mint) - Tutor liefert im Markup kein eigenes Icon */
.course-archive-page .tutor-js-form-select::after {
	content: "";
	position: absolute;
	right: 18px; top: 50%;
	width: 8px; height: 8px;
	margin-top: -3px;
	border-right: 2px solid var(--rf-color-mint-strong);
	border-bottom: 2px solid var(--rf-color-mint-strong);
	transform: rotate(45deg);
	transition: transform 0.18s ease, margin-top 0.18s ease;
	pointer-events: none;
}
.course-archive-page .tutor-js-form-select.is-active::after,
.course-archive-page .tutor-js-form-select.tutor-active::after {
	transform: rotate(-135deg);
	margin-top: 1px;
}

/* Aufklapp-Panel */
.course-archive-page .tutor-form-select-dropdown {
	margin-top: 8px;
	padding: 6px;
	/* Deckend: Glas-Gradient ueber fast-opaker Ink-Basis -> kein Text-Durchschein */
	background: var(--rf-surface-dark), rgba(11, 31, 29, 0.96) !important;
	border: var(--rf-surface-dark-border) !important;
	box-shadow: var(--rf-surface-dark-shadow), 0 18px 40px rgba(0, 0, 0, 0.34) !important;
	border-radius: var(--rf-card-radius) !important;
	-webkit-backdrop-filter: blur(calc(var(--rf-blur) + 4px));
	backdrop-filter: blur(calc(var(--rf-blur) + 4px));
	z-index: 30;
	text-align: left;
}
.course-archive-page .tutor-form-select-option {
	padding: 9px 12px;
	border-radius: 10px;
	cursor: pointer;
}
.course-archive-page .tutor-form-select-option span {
	color: var(--rf-color-text-on-dark) !important;
	font-family: var(--rf-font-family);
	font-size: 14px;
	font-weight: 400;
}
.course-archive-page .tutor-form-select-option:hover {
	background: rgba(155, 245, 232, 0.14) !important;
}
.course-archive-page .tutor-form-select-option.is-active {
	background: rgba(155, 245, 232, 0.20) !important;
}
.course-archive-page .tutor-form-select-option.is-active span {
	color: var(--rf-color-mint-strong) !important;
	font-weight: 600;
}

/* ---------- 6) Mobile ---------- */
@media (max-width: 768px) {
	body.post-type-archive-courses,
	body.tax-course-category,
	body.tax-course-tag { background-attachment: scroll; }
}
@media (max-width: 575px) {
	.rf-archive-actions { width: 100%; }
	.rf-archive-btn { flex: 1 1 auto; }

	/* Sort-Dropdown full-width */
	.course-archive-page .tutor-js-form-select { width: 100%; justify-content: space-between; }
}

/* ---------- 7) Kategorie-Filter (Glas-Dropdown, <details> ohne JS) ---------- */
.rf-archive-toolbar { margin: 0 0 22px; text-align: left; }

.rf-archive-cat-filter { position: relative; display: inline-block; }

.rf-archive-cat-filter > summary {
	list-style: none;
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	max-width: 100%;
	overflow: hidden;
	padding: 0 42px 0 18px;
	background: var(--rf-surface-dark);
	border: var(--rf-surface-dark-border);
	box-shadow: var(--rf-surface-dark-shadow);
	border-radius: 999px;
	-webkit-backdrop-filter: blur(var(--rf-blur));
	backdrop-filter: blur(var(--rf-blur));
	cursor: pointer;
	font-family: var(--rf-font-family);
	font-size: 14.5px;
	font-weight: 500;
	color: var(--rf-color-text-on-dark);
	white-space: nowrap;
}
.rf-archive-cat-filter > summary::-webkit-details-marker { display: none; }
.rf-archive-cat-caption { flex: 0 0 auto; color: var(--rf-color-text-on-dark-soft); font-weight: 400; }
.rf-archive-cat-current {
	flex: 0 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: var(--rf-color-mint-strong);
}

/* Caret (mint), dreht beim Oeffnen */
.rf-archive-cat-filter > summary::after {
	content: "";
	position: absolute;
	right: 18px; top: 50%;
	width: 8px; height: 8px;
	margin-top: -3px;
	border-right: 2px solid var(--rf-color-mint-strong);
	border-bottom: 2px solid var(--rf-color-mint-strong);
	transform: rotate(45deg);
	transition: transform 0.18s ease, margin-top 0.18s ease;
	pointer-events: none;
}
.rf-archive-cat-filter[open] > summary::after { transform: rotate(-135deg); margin-top: 1px; }

/* Aufklapp-Panel (deckend wie Sort-Dropdown) */
.rf-archive-cat-menu {
	position: absolute;
	left: 0; top: calc(100% + 8px);
	z-index: 30;
	min-width: 260px;
	padding: 6px;
	display: flex;
	flex-direction: column;
	background: var(--rf-surface-dark), rgba(11, 31, 29, 0.96);
	border: var(--rf-surface-dark-border);
	box-shadow: var(--rf-surface-dark-shadow), 0 18px 40px rgba(0, 0, 0, 0.34);
	border-radius: var(--rf-card-radius);
	-webkit-backdrop-filter: blur(calc(var(--rf-blur) + 4px));
	backdrop-filter: blur(calc(var(--rf-blur) + 4px));
}
.rf-archive-cat-link {
	display: block;
	padding: 9px 12px;
	border-radius: 10px;
	font-family: var(--rf-font-family);
	font-size: 14px;
	font-weight: 400;
	color: var(--rf-color-text-on-dark) !important;
	text-decoration: none;
	white-space: normal;
	line-height: 1.35;
}
.rf-archive-cat-link:hover { background: rgba(155, 245, 232, 0.14); }
.rf-archive-cat-link.is-current {
	background: rgba(155, 245, 232, 0.20);
	color: var(--rf-color-mint-strong) !important;
	font-weight: 600;
}

@media (max-width: 575px) {
	.rf-archive-cat-filter,
	.rf-archive-cat-filter > summary { width: 100%; }
	.rf-archive-cat-filter > summary { justify-content: flex-start; }
	.rf-archive-cat-current { flex: 1 1 auto; }
	.rf-archive-cat-menu { min-width: 0; width: 100%; }
}