/* ==========================================================================
   Kalendár akcií [afc_kalendar] + rámček Kedy/Kde v detaile článku
   Farby a zaoblenia z palety v style.css (--afc-*).
   ========================================================================== */

.afc-cal { color: var(--afc-text, #23282b); }

.afc-cal-month {
	margin: 34px 0 14px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--afc-teal, #0097b2);
}
.afc-cal-month:first-child { margin-top: 0; }

.afc-cal-list { display: grid; gap: 18px; }

/* Karta akcie: [fotka] [dátum] [text] */
.afc-cal-item {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 20px;
	align-items: start;
	padding: 20px;
	background: #fff;
	border: 1px solid var(--afc-border, #e5e9ea);
	border-radius: var(--afc-radius, 14px);
	box-shadow: var(--afc-shadow, 0 2px 14px rgba(20, 30, 32, .08));
	transition: transform .15s ease, box-shadow .2s ease;
}
.afc-cal-item:hover { transform: translateY(-2px); box-shadow: 0 8px 26px rgba(20, 30, 32, .12); }
.afc-cal-item.has-img { grid-template-columns: 220px auto 1fr; }

.afc-cal-img { display: block; align-self: stretch; margin: -20px 0 -20px -20px; overflow: hidden; border-radius: var(--afc-radius, 14px) 0 0 var(--afc-radius, 14px); }
.afc-cal-img img { display: block; width: 100%; height: 100%; min-height: 160px; object-fit: cover; }

/* Dátumový "lístok z kalendára" */
.afc-cal-date {
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 68px;
	padding: 8px 6px 10px;
	border-radius: 12px;
	background: var(--afc-bg-light, #f6f8f9);
	border-top: 4px solid var(--afc-teal, #0097b2);
	line-height: 1;
	text-align: center;
}
.afc-cal-wd, .afc-cal-mon { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--afc-text-light, #6b7579); }
.afc-cal-day { margin: 6px 0 5px; font-size: 30px; font-weight: 700; color: var(--afc-dark, #1b1d1f); }
.afc-cal-day small { font-size: 16px; font-weight: 600; }

/* Dva bloky: akcie klubu (tyrkysová) a udalosti členov zo sociálnej siete (fialová) */
.afc-cal-section + .afc-cal-section { margin-top: 48px; padding-top: 40px; border-top: 1px dashed var(--afc-border, #e5e9ea); }
.afc-cal-section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin-bottom: 22px; }
.afc-cal-section-head h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 4px; font-size: 24px; }
.afc-cal-section-head h3 .dashicons { width: 36px; height: 36px; font-size: 20px; line-height: 36px; text-align: center; border-radius: 10px; color: #fff; background: var(--afc-teal, #0097b2); }
.afc-cal-section--member .afc-cal-section-head h3 .dashicons { background: #7c5cd6; }
.afc-cal-section-head p { margin: 0; color: var(--afc-text-light, #6b7579); }
.afc-cal-section--member .afc-cal-month { color: #7c5cd6; }
.afc-cal-item.is-member .afc-cal-date { border-top-color: #7c5cd6; }
.afc-cal-item.is-member { border-left: 4px solid #7c5cd6; }

.afc-cal-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.afc-cal-tags .afc-cal-rel { margin-bottom: 0; }
.afc-cal-src { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.afc-cal-src--club { background: rgba(0, 151, 178, .14); color: #1f8a84; }
.afc-cal-src--member { background: rgba(124, 92, 214, .14); color: #5b3fb0; }
.afc-cal-empty a { color: inherit; font-weight: 600; text-decoration: underline; }

.afc-cal-body { min-width: 0; }
.afc-cal-rel {
	display: inline-block;
	margin-bottom: 6px;
	padding: 3px 10px;
	border-radius: 999px;
	background: rgba(242, 169, 59, .16);
	color: #a86a0c;
	font-size: 12px;
	font-weight: 700;
}
.afc-cal-name { margin: 0 0 8px; font-size: 20px; line-height: 1.3; }
.afc-cal-name a { color: var(--afc-dark, #1b1d1f); text-decoration: none; }
.afc-cal-name a:hover { color: var(--afc-teal, #0097b2); }

.afc-cal-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 14px; color: var(--afc-text-light, #6b7579); }
.afc-cal-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.afc-cal-meta .dashicons { width: 16px; height: 16px; font-size: 16px; color: var(--afc-teal, #0097b2); }

.afc-cal-excerpt { margin: 10px 0 0; font-size: 15px; line-height: 1.55; }
.afc-cal-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.afc-cal-actions .afc-btn { padding: 9px 20px; font-size: 14px; }
.afc-cal-actions .afc-btn-ghost { padding: 7px 18px; }

.afc-cal-empty {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 22px;
	border: 1px dashed var(--afc-border, #e5e9ea);
	border-radius: var(--afc-radius, 14px);
	background: var(--afc-bg-light, #f6f8f9);
	color: var(--afc-text-light, #6b7579);
}
.afc-cal-empty .dashicons { color: var(--afc-teal, #0097b2); }

/* Uplynulé akcie - tlmenejšie */
.afc-cal--past .afc-cal-date { border-top-color: var(--afc-text-light, #6b7579); }
.afc-cal--past .afc-cal-img img { filter: grayscale(.6); }

/* Kompaktný zoznam (bočný panel, úvodná stránka) */
.afc-cal--compact { display: grid; gap: 10px; }
.afc-cal--compact .afc-cal-item { gap: 14px; padding: 12px; color: inherit; text-decoration: none; box-shadow: none; }
.afc-cal--compact .afc-cal-date { min-width: 54px; padding: 6px 4px 8px; }
.afc-cal--compact .afc-cal-day { font-size: 22px; margin: 4px 0 3px; }
.afc-cal--compact .afc-cal-name { display: block; margin: 0 0 4px; font-size: 15px; color: var(--afc-dark, #1b1d1f); }
.afc-cal--compact .afc-cal-item:hover .afc-cal-name { color: var(--afc-teal, #0097b2); }
.afc-cal--compact .afc-cal-meta { font-size: 13px; flex-direction: column; }
.afc-cal--compact .afc-cal-rel { margin-bottom: 4px; font-size: 11px; }
.afc-cal-all { justify-self: start; font-weight: 600; color: var(--afc-teal, #0097b2); text-decoration: none; }
.afc-cal-all:hover { color: var(--afc-orange, #ffbd59); }

/* Rámček Kedy / Kde nad textom pozvánky */
.afc-event-box {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 28px;
	margin: 0 0 28px;
	padding: 16px 20px;
	border-radius: var(--afc-radius, 14px);
	background: linear-gradient(135deg, rgba(0, 151, 178, .10), rgba(242, 169, 59, .10)), var(--afc-bg-light, #f6f8f9);
	border-left: 4px solid var(--afc-teal, #0097b2);
}
.afc-event-box > div { display: flex; align-items: center; gap: 8px; }
.afc-event-box strong { margin-right: 4px; color: var(--afc-dark, #1b1d1f); }
.afc-event-box .dashicons { color: var(--afc-teal, #0097b2); }
.afc-event-box .afc-btn { margin-left: auto; padding: 7px 18px; font-size: 14px; }
.afc-event-box.is-past { border-left-color: var(--afc-text-light, #6b7579); }

.afc-cal { container-type: inline-size; }
/* Úzky stĺpec (1/2 v BeBuilderi): malé karty v mriežke po dvoch, dátum ako štítok na fotke */
@container (max-width: 700px) {
	.afc-cal:not(.afc-cal--compact) .afc-cal-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
	.afc-cal:not(.afc-cal--compact) .afc-cal-item,
	.afc-cal:not(.afc-cal--compact) .afc-cal-item.has-img { position: relative; display: flex; flex-direction: column; gap: 0; padding: 0; overflow: hidden; }
	/* Fialový pruh cez fotku (nie border), aby fotka začínala na rovnakej výške ako pri akcii klubu */
	.afc-cal-item.is-member { border-left: 1px solid var(--afc-border, #e5e9ea); }
	.afc-cal-item.is-member::before { content: ""; position: absolute; top: 0; left: 0; right: 0; z-index: 2; height: 3px; background: #7c5cd6; }
	/* Rovnaká výška kariet v oboch stĺpcoch: priestor na 3 riadky údajov, tlačidlá vždy dole */
	.afc-cal:not(.afc-cal--compact) .afc-cal-meta { min-height: 7.3em; }
	.afc-cal-name { min-height: 2.6em; }
	.afc-cal:not(.afc-cal--compact) .afc-cal-img { margin: 0; border-radius: 0; }
	.afc-cal:not(.afc-cal--compact) .afc-cal-img img { min-height: 0; height: auto; aspect-ratio: 3 / 2; }
	.afc-cal:not(.afc-cal--compact) .afc-cal-date { position: absolute; top: 10px; left: 10px; min-width: 46px; padding: 5px 4px 6px; border-top-width: 3px; box-shadow: 0 2px 8px rgba(0, 0, 0, .18); background: #fff; }
	.afc-cal:not(.afc-cal--compact) .afc-cal-item:not(.has-img) .afc-cal-date { position: static; align-self: flex-start; margin: 14px 14px 0; }
	.afc-cal:not(.afc-cal--compact) .afc-cal-wd,
	.afc-cal:not(.afc-cal--compact) .afc-cal-mon { font-size: 10px; }
	.afc-cal:not(.afc-cal--compact) .afc-cal-day { margin: 3px 0 2px; font-size: 20px; }
	.afc-cal:not(.afc-cal--compact) .afc-cal-day small { font-size: 12px; }
	.afc-cal:not(.afc-cal--compact) .afc-cal-body { display: flex; flex: 1; flex-direction: column; padding: 12px 14px 14px; }
	.afc-cal-tags { margin-bottom: 4px; }
	.afc-cal-src, .afc-cal-tags .afc-cal-rel { padding: 2px 8px; font-size: 11px; }
	.afc-cal-name { margin-bottom: 6px; font-size: 16px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
	.afc-cal-meta { flex-direction: column; gap: 3px; font-size: 12.5px; }
	.afc-cal-meta .dashicons { width: 14px; height: 14px; font-size: 14px; }
	.afc-cal-excerpt { display: none; }
	.afc-cal-actions { margin-top: auto; padding-top: 10px; gap: 6px; }
	.afc-cal-actions .afc-btn { padding: 6px 12px; font-size: 12.5px; }
	.afc-cal-actions .afc-btn-ghost { padding: 5px 11px; }
	.afc-cal-month { margin: 20px 0 10px; font-size: 12px; }
	.afc-cal-section-head { flex-wrap: nowrap; align-items: flex-start; min-height: 84px; margin-bottom: 14px; } /* rovnaká výška v oboch stĺpcoch */
	.afc-cal-section-head .afc-btn { flex-shrink: 0; }
	.afc-cal-section-head h3 { font-size: 20px; }
	.afc-cal-section-head .afc-btn { padding: 6px 14px; font-size: 13px; }
}
/* Veľmi úzke (mobil): jedna karta na riadok */
@container (max-width: 420px) {
	.afc-cal:not(.afc-cal--compact) .afc-cal-list { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
	.afc-cal-item, .afc-cal-item.has-img { grid-template-columns: auto 1fr; gap: 14px; padding: 16px; }
	.afc-cal-img { grid-column: 1 / -1; margin: -16px -16px 0; border-radius: var(--afc-radius, 14px) var(--afc-radius, 14px) 0 0; }
	.afc-cal-img img { min-height: 0; aspect-ratio: 16 / 9; }
	.afc-cal-name { font-size: 18px; }
	.afc-event-box .afc-btn { margin-left: 0; }
}
