/* =====================================================================
   Repetytorium 2027 — sekcje spoza core.css (core.css zostaje 1:1 z redesignu)
   oraz ujednolicenie treści z edytora WYSIWYG: inline kolory i rozmiary
   ze starej strony (np. #182a5a, #eda543, 30/50 px) ustępują tokenom motywu.
   ===================================================================== */

@layer components {

	/* ---------- Treści z edytora ---------- */
	.anchor { scroll-margin-top: 110px; }
	.rich p { margin: 0; }
	.rich :is(p, span, strong, b, em, font) { font-size: inherit !important; color: inherit !important; background-color: transparent !important; }
	.rich p { text-align: inherit !important; }
	.section-head--center .rich { text-align: center; }

	.prose { display: flex; flex-direction: column; gap: 1em; color: var(--c-body); font-size: 1.0625rem; line-height: 1.7; }
	.prose > * { margin: 0; }
	.prose :is(ul, ol) { padding-left: 1.25em; display: flex; flex-direction: column; gap: .35em; }
	.prose a { color: var(--c-brand); font-weight: 600; }
	.prose img { height: auto; border-radius: var(--radius); }
	.prose img[style*="float: right"] { margin: 0 0 1rem 1.5rem; max-width: min(45%, 400px); }
	.prose table { width: 100% !important; height: auto !important; border-collapse: collapse; }
	.prose [style*="background-color"] { background-color: transparent !important; }
	.prose :is([style^="color"], [style*=" color"], [style*=";color"]) { color: var(--c-brand) !important; }
	.prose :is([style*="color: #000"], [style*="color: rgb(0, 0, 0)"]) { color: inherit !important; }
	.prose [style*="font-size"] { font-size: inherit !important; }
	.section--dark .prose { color: rgb(255 255 255 / .86); }
	.section--dark .prose :is([style^="color"], [style*=" color"], [style*=";color"]) { color: var(--c-soft) !important; }
	.section--dark .prose a { color: #fff; }
	.img-right__solo { max-width: 920px; }
	.intro__text .prose p { font-size: inherit; }

	/* ---------- Top ---------- */
	.top-main .hero__title span { color: var(--c-soft); }
	.top-main .hero__badge { color: #fff; }
	/* grafika wydarzenia ma ciemne tło — pas pod menu w tym samym kolorze zamiast jasnego --c-tint */
	.top-main.hero--image-only { background: var(--c-deep); }

	/* ---------- Komitety ---------- */
	.committee__cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
	.committee__cols--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.committee__cols:not(.committee__cols--two) { max-width: 760px; }
	.committee__list { padding: 32px 36px; border-radius: var(--radius-lg); background: rgb(255 255 255 / .06); border: 1px solid rgb(255 255 255 / .12); }
	.committee__list strong { color: #fff; }
	.committee__list ul { list-style: none; padding: 0; gap: 0; }
	.committee__list li { padding: 12px 0; border-bottom: 1px solid rgb(255 255 255 / .12); text-align: left !important; }
	.committee__list li:last-child { border-bottom: 0; }
	.committee--light .committee__list { background: #fff; border-color: var(--c-line); }
	.committee--light .committee__list strong { color: var(--c-heading); }
	.committee--light .committee__list li { border-color: var(--c-line); }
	@media (max-width: 767px) { .committee__cols--two { grid-template-columns: minmax(0, 1fr); } .committee__list { padding: 24px; } }

	/* ---------- Cennik z modułu ---------- */
	.prices--fees { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); max-width: calc(var(--cols, 3) * 380px + (var(--cols, 3) - 1) * 20px); width: 100%; margin-inline: auto; }
	.prices--fees .price__name { font-size: 1rem; line-height: 1.45; }
	.price__tiers { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 0; padding: 12px 0 0; list-style: none; border-top: 1px solid var(--c-line); font-size: .875rem; color: var(--c-muted); }
	.price__tiers li { display: flex; justify-content: space-between; gap: 12px; }
	.price--featured .price__tiers { border-color: rgb(255 255 255 / .2); color: rgb(255 255 255 / .75); }
	.price--disabled { opacity: .55; }
	.prices-row__desc { max-width: 760px; margin-inline: auto; text-align: center; }
	.prices-row__cta { display: flex; justify-content: center; }
	.prices-row .price { align-items: center; text-align: center; }
	.prices-row .price .btn { align-self: center; }

	/* ---------- Program (dzień → sala → sesja → punkt) ---------- */
	.program-day__name { margin-bottom: 20px; font-size: var(--fs-h3); color: var(--c-heading); }
	.program-day__halls { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 32px; align-items: start; }
	.program-hall { display: flex; flex-direction: column; gap: 16px; }
	.program-hall__name { padding: 14px 22px; border-radius: 16px; background: var(--c-deep); color: #fff; font-size: 1.25rem; }
	.program-nip .agenda__row { grid-template-columns: 120px minmax(0, 1fr); padding: 18px 22px; }
	.agenda__row--session { background: color-mix(in oklab, var(--c-brand) 10%, white); }
	.agenda__row--session .agenda__title { color: var(--c-heading); font-size: 1.0625rem; }
	.agenda__row--highlight { box-shadow: inset 4px 0 0 var(--c-accent); }
	.agenda__extra { font-style: italic; }
	@media (max-width: 767px) { .program-nip .agenda__row { grid-template-columns: minmax(0, 1fr); } }

	/* ---------- Nagłówek podstrony ze zdjęciem ---------- */
	.page-head--photo .page-head__photo { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; opacity: .28; }

	/* ---------- Rejestracja / logowanie ---------- */
	.reg-head__title { font-size: var(--fs-h3); color: var(--c-heading); }
	main > section.register:first-child { padding-top: 150px; }
	.reg--narrow { max-width: 560px; }
	.reg-login { --stack-gap: 20px; }
	.reg-login__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 8px; }
	.reg-fee__tiers { display: flex; flex-direction: column; gap: 2px; font-size: .8125rem; color: var(--c-muted); }

	/* ---------- Wykładowcy (pasek przewijany) ---------- */
	.people-rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, calc((100% - 3 * 24px) / 4)); gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; scrollbar-color: var(--c-line-strong) transparent; }
	.person-card { scroll-snap-align: start; display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; background: #fff; border: 1px solid var(--c-line); box-shadow: var(--shadow-card); }
	.person-card__photo { aspect-ratio: 1; background: linear-gradient(135deg, var(--c-soft), color-mix(in oklab, var(--c-brand) 55%, white)); }
	.person-card__photo img { width: 100%; height: 100%; object-fit: cover; }
	.person-card__body { display: flex; flex-direction: column; gap: 6px; padding: 20px 22px 24px; }
	.person-card__spec { color: var(--c-brand); font-size: .9375rem; font-weight: 600; }
	@media (max-width: 991px) { .people-rail { grid-auto-columns: minmax(220px, 70%); } }

	/* ---------- Karta zdjęcie + tekst (wykłady, postery) ---------- */
	.split-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 40px; align-items: start; padding: 32px; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--c-line); }
	.split-card--small { grid-template-columns: minmax(0, 1fr) minmax(0, 4fr); }
	.split-card__media { margin: 0; border-radius: var(--radius); overflow: hidden; }
	.split-card__media img { width: 100%; height: auto; }
	@media (max-width: 767px) { .split-card, .split-card--small { grid-template-columns: minmax(0, 1fr); padding: 24px; gap: 24px; } }
	.card--media { padding: 0; overflow: hidden; }
	.card--media > :not(.card__media) { padding-inline: 28px; }
	.card--media > :last-child { padding-bottom: 28px; }
	.card__media { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }

	/* ---------- Postery lista ---------- */
	.posters-list { list-style: none; padding: 0; }
	.posters-list__item { grid-template-columns: 48px minmax(0, 1fr); }
	.posters-list__num { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--c-tint); color: var(--c-brand); font-weight: 800; }

	/* ---------- Artykuł ---------- */
	.article__inner { max-width: 880px; }

	/* ---------- Galeria + podgląd ---------- */
	.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
	.gallery__item { display: block; aspect-ratio: 1; border-radius: 18px; overflow: hidden; background: var(--c-tint); }
	.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
	.gallery__item:hover img { transform: scale(1.04); }
	@media (max-width: 767px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
	.lightbox { width: min(92vw, 1200px); max-height: 92vh; padding: 0; border: 0; border-radius: var(--radius); background: transparent; }
	.lightbox::backdrop { background: color-mix(in oklab, var(--c-deep) 88%, transparent); }
	.lightbox img { width: 100%; max-height: 86vh; object-fit: contain; }
	.lightbox__bar { display: flex; justify-content: center; gap: 8px; padding-top: 12px; }
	.lightbox__btn { width: 48px; height: 48px; border: 0; border-radius: 50%; display: grid; place-items: center; background: rgb(255 255 255 / .14); color: #fff; cursor: pointer; }
	.lightbox__btn svg { width: 22px; height: 22px; }
	.lightbox__btn--prev svg { transform: rotate(180deg); }

	/* ---------- Pasek CTA z treścią z edytora ---------- */
	.rich-light, .rich-light :is(p, span, strong, h2, h3) { color: #fff !important; }
	.rich-light :is(h2, h3) { font-family: var(--font-display); font-weight: var(--dw); font-size: clamp(1.9rem, 2vw + 1rem, 2.75rem); line-height: 1.1; }

	/* ---------- Stopka (kolumny z edytora) ---------- */
	.site-footer__rich { --stack-gap: 14px; line-height: 1.55; overflow-wrap: anywhere; }
	.site-footer__rich :is(p, span, strong) { text-align: left !important; font-size: inherit !important; color: inherit !important; }
	.site-footer__rich > p:first-child:not(:has(a)) { font-size: .875rem !important; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--c-soft) !important; }
	.site-footer__rich > p:first-child:not(:has(a)) :is(span, strong) { color: inherit !important; }
	.site-footer__rich strong { color: #fff !important; }
	.site-footer__rich > p:first-child:not(:has(a)) strong { color: inherit !important; }
	.site-footer__rich a { text-decoration: underline; text-decoration-color: rgb(255 255 255 / .35); text-underline-offset: 3px; }

	/* ---------- Top: przycisk i logo pulmonologii ---------- */
	.top-main__extras { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
	.top-main__extra-link img { height: 56px; width: auto; }
	.hero--image-only .top-main__extras { justify-content: flex-end; }
	.top-main .hero__title.rich :is(p, span, strong) { line-height: inherit; }

	/* ---------- Stoiska partnerów ---------- */
	.logos--stands { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
	.logos--stands .logos__item { height: 140px; background: #fff; border: 1px solid var(--c-line); }
	.logos--stands .logos__item img { filter: none; opacity: 1; }
	.statement-dialog { max-width: 560px; border: 0; }
	.statement-dialog::backdrop { background: color-mix(in oklab, var(--c-deep) 70%, transparent); }
	.exhibition__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: center; padding: 32px; border-radius: var(--radius-lg); background: var(--c-tint); }
	.exhibition__logo img { max-height: 160px; width: auto; margin-inline: auto; }
	.exhibition__only-logo { align-items: center; text-align: center; }
	.exhibition__drugs { display: flex; flex-wrap: wrap; gap: 16px; }
	.exhibition__drugs img { max-height: 64px; width: auto; }
	.exhibition__consultant { --stack-gap: 12px; padding: 28px; border-radius: var(--radius-lg); background: var(--c-deep); color: #fff; }
	.exhibition__consultant-photo { aspect-ratio: 1; max-width: 200px; border-radius: 50%; overflow: hidden; background: linear-gradient(135deg, var(--c-soft), var(--c-brand)); }
	.exhibition__consultant-photo img { width: 100%; height: 100%; object-fit: cover; }
	.exhibition__consultant-item { display: flex; flex-direction: column; padding: 14px 18px; border-radius: 16px; background: rgb(255 255 255 / .08); color: #fff; text-decoration: none; }
	.exhibition__consultant-item small { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--c-soft); font-weight: 700; }
	.exhibition__material-links { display: flex; gap: 16px; }
	.card--media > .card__media-link { padding: 0; }
	@media (max-width: 991px) { .exhibition__head { grid-template-columns: minmax(0, 1fr); text-align: center; } .exhibition__drugs { justify-content: center; } }

	/* ---------- Sesje ---------- */
	.sessions-form__lectures { margin-top: 40px; }
	.sessions-form__row { padding-bottom: 16px; border-bottom: 1px solid var(--c-line); }
	.sessions-form__add { margin-top: 20px; }
	.sessions-panel__group { width: 100%; max-width: 980px; }
	.sessions-panel__summary { display: flex; align-items: center; gap: 12px; cursor: pointer; list-style: none; }
	.sessions-panel__summary::-webkit-details-marker { display: none; }
	.sessions-panel__toggle { margin-left: auto; color: var(--c-brand); font-weight: 700; font-size: .9375rem; }
	.sessions-panel__group[open] .sessions-panel__summary { margin-bottom: 24px; }
	.sessions-panel__item { grid-template-columns: minmax(0, 1fr) auto; background: var(--c-tint); }
	.sessions-review__form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; }
	@media (max-width: 767px) { .sessions-panel__item { grid-template-columns: minmax(0, 1fr); } }

	/* ---------- Formularz modułu (sekcja wskazująca szablon modułu Wydarzenia — znaczniki Bootstrapa) ---------- */
	section.register:not(.section) { padding-block: clamp(40px, 5vw, 72px) var(--section-y); background: var(--c-tint); }
	section.register:not(.section) > .container > div { max-width: 980px; margin-inline: auto; padding: clamp(24px, 4vw, 56px); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-card); }
	section.register:not(.section) .title { margin-bottom: 24px; font-family: var(--font-display); font-weight: var(--dw); font-size: var(--fs-h3); color: var(--c-heading); }
	section.register:not(.section) :is(h3, h4) { margin: 24px 0 12px; font-family: var(--font-display); font-weight: var(--dw); color: var(--c-heading); }
	section.register:not(.section) .row { display: flex; flex-wrap: wrap; gap: 0 24px; }
	section.register:not(.section) .row > [class*="col"] { flex: 1 1 260px; min-width: 0; }
	section.register:not(.section) .form-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
	section.register:not(.section) :is(label, .control-label) { font-size: .9375rem; font-weight: 700; color: var(--c-ink); }
	section.register:not(.section) .zgody label, section.register:not(.section) .checkbox label { font-weight: 400; color: var(--c-body); }
	section.register:not(.section) .form-control { width: 100%; min-height: 52px; padding: 12px 16px; border: 1.5px solid var(--c-line-strong); border-radius: 14px; background: #fff; color: var(--c-ink); font-size: 1rem; }
	section.register:not(.section) .form-control:focus { outline: none; border-color: var(--c-brand); box-shadow: 0 0 0 4px color-mix(in oklab, var(--c-brand) 18%, transparent); }
	section.register:not(.section) input[type="checkbox"], section.register:not(.section) input[type="radio"] { width: 20px; height: 20px; accent-color: var(--c-brand); vertical-align: middle; margin-right: 8px; }
	section.register:not(.section) .btn { background: var(--c-accent); border-color: var(--c-accent); color: var(--c-on-accent); }
	section.register:not(.section) .btn:empty { display: none; }
	section.register:not(.section) .text-center { text-align: center; }
	section.register:not(.section) :is(.text-danger, .has-error label) { color: var(--c-error); }
	section.register:not(.section) .has-error .form-control { border-color: var(--c-error); }
	section.register:not(.section) .hidden { display: none !important; }
	section.register:not(.section) .fee_price { font-family: var(--font-display); font-weight: var(--dw); color: var(--c-brand); }

	/* ---------- Top — kompozycja z warstw PSD 1920×1080 (--s = 1 px projektu); każdy element animowany osobno ---------- */
	.top-comp {
		--s: calc(100vw / 1920);
		--tc-ease: cubic-bezier(.2, .7, .2, 1);
		position: relative;
		isolation: isolate;
		overflow: hidden;
		aspect-ratio: 1920 / 1080;
		background: var(--c-deep);
		color: #fff;
	}
	body:has(.top-comp) .site-nav:not(.is-open) { background: color-mix(in oklab, var(--c-deep) 60%, transparent); }
	.top-comp__bg { position: absolute; inset: 0; z-index: -1; }
	.top-comp__bg img { width: 100%; height: 100%; object-fit: cover; object-position: left center; }
	.top-comp__inner { position: absolute; top: calc(318 * var(--s)); right: calc(68 * var(--s)); display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
	.top-comp__title { display: flex; flex-direction: column; align-items: flex-end; margin: 0; font-family: "Russo One", var(--font-body); font-weight: 400; letter-spacing: 0; line-height: 1; text-shadow: 0 calc(4 * var(--s)) calc(16 * var(--s)) rgb(0 0 0 / .35); }
	.top-comp__eyebrow { font-size: calc(35.6 * var(--s)); color: #fff; }
	.top-comp__line { margin-top: calc(-2 * var(--s)); font-size: calc(95 * var(--s)); line-height: .97; color: var(--c-soft); }
	.top-comp__eyebrow + .top-comp__line { margin-top: calc(22 * var(--s)); }
	.top-comp__subtitle { margin-top: calc(6 * var(--s)); font-size: calc(60 * var(--s)); color: color-mix(in oklab, var(--c-soft) 72%, white); }
	.top-comp__date { margin: calc(36 * var(--s)) 0 0; font-family: "Russo One", var(--font-body); font-size: calc(42.5 * var(--s)); line-height: 1; text-transform: uppercase; text-shadow: 0 calc(4 * var(--s)) calc(16 * var(--s)) rgb(0 0 0 / .35); }
	.top-comp__extras { display: flex; flex-direction: row-reverse; flex-wrap: wrap; align-items: center; gap: calc(28 * var(--s)); margin-top: calc(74 * var(--s)); }
	.top-comp__logo { display: block; }
	.top-comp__logo img { width: calc(378 * var(--s)); height: auto; }

	@media (max-width: 991px) {
		.top-comp { --s: calc((100vw - 32px) / 1060); aspect-ratio: auto; padding-top: 68px; }
		.top-comp__bg { position: relative; inset: auto; z-index: 0; display: block; }
		.top-comp__bg img { height: auto; aspect-ratio: 4 / 3; object-position: 12% center; -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent); mask-image: linear-gradient(to bottom, #000 60%, transparent); }
		.top-comp__inner { position: relative; top: auto; right: auto; margin-top: -12px; padding: 0 16px 40px; }
		.top-comp__extras { flex-direction: column; align-items: flex-end; gap: 20px; margin-top: 28px; }
		.top-comp__logo img { width: min(60vw, 260px); }
	}

	@media (prefers-reduced-motion: no-preference) {
		.top-comp--anim .top-comp__bg img { animation: te-photo 1.6s var(--tc-ease) both; }
		.top-comp--anim .top-comp__eyebrow { animation: te-blur .9s ease .3s both; }
		.top-comp--anim .top-comp__line { animation: te-unmask .8s var(--tc-ease) .45s both; }
		.top-comp--anim .top-comp__line + .top-comp__line { animation-delay: .6s; }
		.top-comp--anim .top-comp__subtitle { animation: te-rise .8s var(--tc-ease) .8s both; }
		.top-comp--anim .top-comp__date { animation: te-wipe .9s var(--tc-ease) 1s both; }
		.top-comp--anim .top-comp__logo { animation: te-rise .8s var(--tc-ease) 1.25s both; }
		.top-comp--anim .top-comp__cta { animation: te-rise .7s var(--tc-ease) 1.45s both; }
	}

	/* ---------- Nagłówek podstrony — wejście ---------- */
	@media (prefers-reduced-motion: no-preference) {
		.page-head__title { animation: te-rise .8s cubic-bezier(.2, .7, .2, 1) .1s both; }
		.page-head__photo { animation: te-fade 1.2s ease both; }
	}
}
