/* =====================================================================
   Kongres NiP 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 (#1f148c, #817abf, 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); }
	/* Zdjęcie opływane tekstem (float z edytora) nie działa we flexie — wtedy zwykły układ blokowy */
	.prose:has(img[style*="float"]) { display: flow-root; }
	.prose:has(img[style*="float"]) > * + * { margin-top: 1em; }
	@media (max-width: 639px) {
		.prose img[style*="float"] { float: none !important; display: block; margin: 0 auto; max-width: min(100%, 280px); }
		.prose [style*="justify"] { text-align: left !important; }
	}
	.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-nip .hero__title span { color: var(--c-soft); }
	.top-nip .hero__badge { color: #fff; }
	/* grafika kongresu ma ciemne tło — pas pod menu w tym samym kolorze zamiast jasnego --c-tint */
	.top-nip.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--fees .price { align-items: center; text-align: center; }
	.prices--fees .price .btn { align-self: center; }
	.prices--fees .price__tiers { align-self: stretch; text-align: left; }
	.prices-row__desc { max-width: 760px; margin-inline: auto; text-align: center; }
	.prices-row__cta { display: flex; justify-content: 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; }

	/* ---------- Wejście topu i nagłówka podstrony ---------- */
	@media (prefers-reduced-motion: no-preference) {
		.top-nip .hero__media img { animation: te-photo 1.6s cubic-bezier(.2, .7, .2, 1) both; }
		.top-nip .hero__text > * { animation: te-rise .8s cubic-bezier(.2, .7, .2, 1) .3s both; }
		.top-nip .hero__text > * + * { animation-delay: .45s; }
		.top-nip .hero__text > * + * + * { animation-delay: .6s; }
		.top-nip :is(.hero__actions, .hero__legacy-cta) { animation: te-rise .7s cubic-bezier(.2, .7, .2, 1) .8s both; }
		.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; }
	}
}
