/* TK Galeria – zdjęcia z aplikacji. Wygląd ustawiasz w widżecie Elementora (zmienne CSS). */
.tkg {
	/* *-g = ustawienia z panelu / aplikacji (inline); widżet Elementora nadpisuje zmienne bez -g. */
	--tkg-cols: var(--tkg-cols-d, 3);
	--tkg-gap: var(--tkg-gap-g, 10px);
	--tkg-ratio: var(--tkg-ratio-g, 1 / 1);
	--tkg-radius: var(--tkg-radius-g, 10px);
	--tkg-accent: var(--tkg-accent-g, var(--e-global-color-primary, #b03a6f));
	--tkg-on-accent: var(--tkg-on-accent-g, #fff);
	--tkg-text: inherit;
}
@media (max-width: 1024px) { .tkg { --tkg-cols: var(--tkg-cols-t, 3); } }
@media (max-width: 767px) { .tkg { --tkg-cols: var(--tkg-cols-m, 2); } }
.tkg__filters[hidden] { display: none; }
.tkg__filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.tkg .tkg__filter, .tkg .tkg__more {
	min-height: 44px; padding: 8px 18px; border-radius: 999px; border: 1.5px solid var(--tkg-accent);
	background: transparent; color: var(--tkg-text); font: inherit; font-weight: 600; line-height: 1.2; cursor: pointer;
	text-transform: none; letter-spacing: normal; box-shadow: none;
}
.tkg .tkg__filter[aria-pressed="true"], .tkg .tkg__more { background: var(--tkg-accent); color: var(--tkg-on-accent); }
.tkg .tkg__filter:focus-visible, .tkg .tkg__more:focus-visible, .tkg__link:focus-visible { outline: 3px solid var(--tkg-accent); outline-offset: 2px; }
.tkg__grid { display: grid; grid-template-columns: repeat(var(--tkg-cols), minmax(0, 1fr)); gap: var(--tkg-gap); margin: 0; padding: 0; list-style: none; }
.tkg__item { margin: 0; padding: 0; }
.tkg__item[hidden] { display: none; }
.tkg__link { display: block; overflow: hidden; border-radius: var(--tkg-radius); background: rgba(0,0,0,.04); }
.tkg .tkg__img { display: block; width: 100%; height: auto; aspect-ratio: var(--tkg-ratio); object-fit: cover; border-radius: 0; transition: transform .35s ease; }
.tkg--zoom .tkg__link:hover .tkg__img { transform: scale(1.04); }
/* Nagłówek i opis pod zdjęciem – jak karty w sekcji „Inspiracje” (czcionki z ustawień Elementora). */
.tkg--texts { --tkg-row-gap: calc(var(--tkg-gap) + 18px); }
.tkg--texts .tkg__grid { row-gap: var(--tkg-row-gap); }
.tkg__body { display: none; }
.tkg--texts .tkg__body { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; }
.tkg .tkg__title {
	margin: 0; padding: 0; color: var(--tkg-title-color, var(--e-global-color-secondary, inherit));
	font-family: var(--e-global-typography-secondary-font-family, inherit), sans-serif;
	font-weight: var(--e-global-typography-secondary-font-weight, 600);
	font-size: 17px; line-height: 1.3; letter-spacing: normal; text-transform: none; overflow-wrap: anywhere;
}
.tkg .tkg__desc {
	margin: 0; padding: 0; color: var(--tkg-desc-color, var(--e-global-color-text, inherit));
	font-family: var(--e-global-typography-text-font-family, inherit), serif;
	font-weight: var(--e-global-typography-text-font-weight, 400);
	font-size: 14px; line-height: 1.65; white-space: pre-line; overflow-wrap: anywhere;
}
@media (max-width: 767px) {
	.tkg .tkg__title { font-size: 16px; }
	.tkg--texts .tkg__body { padding-top: 8px; gap: 4px; }
}
.tkg__more-wrap { display: flex; justify-content: center; margin-top: 18px; }
.tkg__more-wrap[hidden] { display: none; }
.tkg-empty { padding: 24px; border: 2px dashed #ccc; border-radius: 10px; text-align: center; color: #666; }

/* Powiększenie */
.tkg-box { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.9); }
.tkg-box[hidden] { display: none; }
.tkg-box figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; padding: 56px 12px 20px; }
.tkg-box img { max-width: 100%; max-height: calc(100vh - 120px); object-fit: contain; border-radius: 6px; }
.tkg-box figcaption { margin-top: 10px; color: #fff; font-size: 15px; line-height: 1.5; text-align: center; max-width: 640px; white-space: pre-line; }
.tkg-box figcaption strong { display: block; font-size: 17px; margin-bottom: 2px; }
.tkg-box button {
	position: absolute; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0;
	border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; font-size: 26px; line-height: 1; cursor: pointer;
}
.tkg-box button:focus-visible { outline: 3px solid #fff; }
.tkg-box .tkg-box__close { top: 12px; right: 12px; }
.tkg-box .tkg-box__prev { left: 12px; top: 50%; transform: translateY(-50%); }
.tkg-box .tkg-box__next { right: 12px; top: 50%; transform: translateY(-50%); }
.tkg-box__count { position: absolute; top: 24px; left: 16px; color: #fff; font-size: 14px; opacity: .8; }
@media (prefers-reduced-motion: reduce) { .tkg .tkg__img { transition: none; } }
