/* ============================================================
   Infojar – styl strony publicznej (Bootstrap 5.3 + własne)
   Układ „bento”: ciemne tło, zaokrąglone karty, Poppins.
   Kolor wiodący: stonowana czerwień z infojar.pl, akcent: niebieski.
   ============================================================ */
:root {
    --ij-bg: #171c22;
    --ij-card: #20262d;
    --ij-card-2: #29313a;
    --ij-border: rgba(140, 152, 166, .22);
    --ij-text: #a9b1b9;
    --ij-light: #cfd4d8;
    --ij-heading: #ffffff;
    --ij-red: #c24a44;
    --ij-red-hover: #d65f58;
    --ij-red-soft: rgba(194, 74, 68, .14);
    --ij-blue: #629dd1;
    --ij-radius: 20px;
    --ij-radius-sm: 14px;
    --ij-card-shadow: inset 0 .36px .65px -1px rgba(255, 255, 255, .025), inset 0 3px 5.4px -2px rgba(255, 255, 255, .036);

    --bs-body-font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
    --bs-body-bg: var(--ij-bg);
    --bs-body-color: var(--ij-text);
    --bs-heading-color: var(--ij-heading);
    --bs-border-color: var(--ij-border);
    --bs-link-color: var(--ij-light);
    --bs-link-color-rgb: 207, 212, 216;
    --bs-link-hover-color: var(--ij-red-hover);
    --bs-link-hover-color-rgb: 214, 95, 88;
}

body { font-family: var(--bs-body-font-family); background: var(--ij-bg); color: var(--ij-text); font-size: 1rem; line-height: 1.85;
    -webkit-font-smoothing: antialiased; padding-top: 92px; }
h1, h2, h3, h4 { color: var(--ij-heading); font-weight: 500; line-height: 1.3; }
a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
::selection { background: var(--ij-red); color: #fff; }
.text-muted { color: var(--ij-text) !important; opacity: .8; }

/* ---------- Karta bazowa (bento) ---------- */
.bento { background: var(--ij-card); border: 1px solid rgba(0, 0, 0, .05); border-radius: var(--ij-radius); box-shadow: var(--ij-card-shadow); padding: 40px; }
.bento + .bento { margin-top: 30px; }
.bento-title { font-size: 1.35rem; margin-bottom: 1.5rem; }

/* ---------- Logo ---------- */
.logo { font-weight: 700; font-size: 1.6rem; letter-spacing: -0.04em; text-decoration: none; line-height: 1; }
.logo-info { color: #fff; }
.logo-jar { color: var(--ij-red); }
.site-header .logo { font-size: 2rem; }

/* ---------- Przyciski ---------- */
.btn-accent, .btn-ghost { display: inline-flex; align-items: center; gap: .5rem; border-radius: 15px; padding: 12px 24px; font-size: .9rem;
    font-weight: 500; line-height: 20px; border: 1px solid var(--ij-border); transition: .3s; text-decoration: none; }
.btn-accent { background: var(--ij-red); color: #fff; }
.btn-accent:hover, .btn-accent:focus-visible { background: var(--ij-red-hover); color: #fff; }
.btn-ghost { background: transparent; color: var(--ij-light); }
.btn-ghost:hover, .btn-ghost:focus-visible { background: var(--ij-red); border-color: var(--ij-red); color: #fff; }
.btn-accent.btn-sm, .btn-ghost.btn-sm { padding: 8px 16px; font-size: .82rem; border-radius: 12px; }
.btn-accent i, .btn-ghost i { transition: transform .3s; }
.btn-accent:hover i, .btn-ghost:hover i { transform: translateX(3px); }
.link-arrow { font-weight: 500; text-decoration: none; color: var(--ij-light); display: inline-flex; gap: .4rem; align-items: center; }
.link-arrow:hover { color: var(--ij-red-hover); }
.link-arrow i { transition: transform .2s; }
.link-arrow:hover i { transform: translateX(3px); }

/* ---------- Nagłówek strony (stały) ---------- */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 1030; background: var(--ij-bg); transition: padding .4s, border-color .4s;
    padding: 24px 0; border-bottom: 1px solid transparent; }
.site-header.is-scrolled { padding: 10px 0; border-bottom-color: var(--ij-border); }
.site-header .navbar { padding: 0; }
.site-header .navbar-nav .nav-link { color: var(--ij-light); font-size: .95rem; padding: .4rem 1rem; transition: color .2s; }
.site-header .navbar-nav .nav-link:hover, .site-header .navbar-nav .nav-link.active { color: var(--ij-red-hover); }
.site-header .navbar-toggler { border: 1px solid var(--ij-border); border-radius: 10px; padding: .4rem .6rem; color: var(--ij-light); }
.site-header .navbar-toggler:focus { box-shadow: 0 0 0 2px var(--ij-red-soft); }

/* ---------- Strona główna: wizytówka + powitanie ---------- */
.intro-area { padding-top: 20px; }
.profile-card { text-align: center; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
    /* Tło: grafika z bryłami, przyciemniana ku dołowi, by nazwa i ikony były czytelne */
    background: linear-gradient(to bottom, rgba(23, 28, 34, .15) 0%, rgba(23, 28, 34, .35) 45%, rgba(32, 38, 45, .94) 78%, var(--ij-card) 100%),
                url("../img/profile-bg.jpg") center / cover no-repeat, var(--ij-card); }
/* Logo na jasnym, półprzezroczystym kafelku – niebieskie litery muszą mieć jasne tło */
.profile-logo { width: 240px; max-width: 100%; height: auto; margin-bottom: 1.75rem; padding: 24px;
    background: rgba(255, 255, 255, .8); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    border-radius: var(--ij-radius); border: 1px solid rgba(255, 255, 255, .6);
    box-shadow: 0 18px 36px -16px rgba(0, 0, 0, .55); }
.profile-card h2 { text-shadow: 0 2px 12px rgba(0, 0, 0, .35); }
.profile-card h2 { font-size: 2.1rem; margin-bottom: .35rem; }
.profile-card p { margin: 0; }
.social-icons { display: flex; justify-content: center; gap: .75rem; margin-top: 1.75rem; flex-wrap: wrap; }
.social-icons a { width: 2.75rem; height: 2.75rem; display: grid; place-items: center; font-size: 1.15rem; color: var(--ij-light);
    border: 1px solid rgba(255, 255, 255, .06); border-radius: 10px; text-decoration: none; transition: .3s; }
.social-icons a:hover { background: var(--ij-red); border-color: var(--ij-red); color: #fff; }

.hello { font-size: 1.05rem; color: var(--ij-light); margin-bottom: .5rem; }
.hero-title { font-size: clamp(1.9rem, 3.6vw, 2.6rem); font-weight: 400; line-height: 1.3; margin-bottom: 1.25rem; }
.hero-lead { font-size: 1.05rem; margin-bottom: 1.5rem; }
.status-line { display: flex; align-items: center; gap: .6rem; color: var(--ij-light); margin-bottom: 1rem; }
.status-dot { width: .6rem; height: .6rem; border-radius: 50%; background: var(--ij-blue); box-shadow: 0 0 0 4px rgba(98, 157, 209, .18); flex: none; }
.area-tags { display: flex; flex-wrap: wrap; gap: .6rem; list-style: none; padding: 0; margin: 0; }
.area-tags li { display: inline-flex; align-items: center; gap: .5rem; font-size: .88rem; color: var(--ij-light); padding: .45rem .9rem;
    border: 1px solid var(--ij-border); border-radius: 12px; line-height: 1.4; }
.area-tags i { color: var(--ij-red); }
.hero-btns { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

/* Przewijany pasek partnerów (treść z sekcji CMS „partners”) */
.scroller { overflow: hidden; -webkit-mask: linear-gradient(90deg, transparent, #fff 15%, #fff 85%, transparent);
    mask: linear-gradient(90deg, transparent, #fff 15%, #fff 85%, transparent); }
.scroller-inner { display: flex; width: max-content; gap: 1rem; animation: ij-scroll 40s linear infinite; }
.scroller:hover .scroller-inner { animation-play-state: paused; }
.scroller-inner ul { display: flex; gap: 1rem; list-style: none; padding: 0; margin: 0; }
.scroller-inner p { margin: 0; }
.scroller-inner li a, .scroller-inner li { white-space: nowrap; }
.scroller-inner li a { display: block; padding: .7rem 1.4rem; font-weight: 500; color: var(--ij-light); text-decoration: none;
    background: var(--ij-card-2); border: 1px solid var(--ij-border); border-radius: var(--ij-radius-sm); transition: .3s; }
.scroller-inner li a:hover { color: #fff; border-color: var(--ij-red); }
@keyframes ij-scroll { to { transform: translateX(calc(-50% - .5rem)); } }

/* ---------- Sekcje ---------- */
.section { padding: 15px 0; }
.section-block { margin-top: 30px; }
.section-title { text-align: center; margin: 70px auto 40px; max-width: 46rem; }
.section-title h2 { font-size: clamp(1.9rem, 3.4vw, 2.8rem); margin-bottom: .75rem; }
.section-title h2 span { color: var(--ij-red); }
.section-title p { margin: 0; }
.eyebrow { font-size: .9rem; font-weight: 500; color: var(--ij-red-hover); margin-bottom: .5rem; }
.prose p:last-child { margin-bottom: 0; }
.prose a { color: var(--ij-light); }
.prose a:hover { color: var(--ij-red-hover); }
.prose strong { color: var(--ij-light); font-weight: 600; }
.lead-prose { font-size: 1.02rem; }

.stats-card { display: flex; flex-direction: column; justify-content: center; gap: 1.5rem; height: 100%; }
.stats-card div { padding-bottom: 1.5rem; border-bottom: 1px solid var(--ij-border); }
.stats-card div:last-child { padding-bottom: 0; border-bottom: 0; }
.stats-card strong { display: block; font-size: 2.6rem; font-weight: 500; color: #fff; line-height: 1.1; }
.stats-card strong span { color: var(--ij-red); }
.stats-card div > span { font-size: .9rem; }

/* ---------- Karty „projektów”: oferta i aktualności ---------- */
.item-card { background: var(--ij-card); border: 1px solid var(--ij-border); border-radius: 16px; height: 100%; display: flex; flex-direction: column;
    overflow: hidden; transition: border-color .3s, transform .3s; }
.item-card:hover { border-color: rgba(194, 74, 68, .45); transform: translateY(-4px); }
.item-media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; margin: 10px 10px 0; border-radius: 12px; background: var(--ij-card-2); }
.item-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.item-card:hover .item-media img { transform: scale(1.04); }
.item-media::before { content: ""; position: absolute; inset: 0; background: #000; opacity: 0; transition: .3s; z-index: 1; }
.item-card:hover .item-media::before { opacity: .55; }
.details-btn { position: absolute; left: 50%; top: 50%; z-index: 2; width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center;
    background: var(--ij-red); color: #fff; font-size: 1.3rem; opacity: 0; transform: translate(-50%, -50%) rotate(-45deg) scale(.8); transition: .3s; }
.item-card:hover .details-btn { opacity: 1; transform: translate(-50%, -50%) rotate(-45deg) scale(1); }
.item-media-empty { display: grid; place-items: center; text-decoration: none;
    background: radial-gradient(circle at 20% 20%, rgba(98, 157, 209, .18), transparent 55%),
                radial-gradient(circle at 80% 90%, rgba(194, 74, 68, .25), transparent 55%), var(--ij-card-2); }
.item-media-empty .logo { font-size: 2.2rem; }
.item-body { padding: 18px 22px 24px; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.sub-title { font-size: .85rem; color: #8c959e; }
.item-body h3 { font-size: 1.2rem; margin: 0; color: var(--ij-light); }
.item-body h3 a { color: inherit; text-decoration: none; }
.item-body h3 a:hover { color: #fff; }
.item-body .prose, .item-summary { font-size: .93rem; line-height: 1.75; margin: 0; }
.item-body .link-arrow { margin-top: auto; padding-top: .75rem; }

/* ---------- Oferta ---------- */
.offer-card { height: 100%; display: flex; flex-direction: column; gap: .5rem; border-color: var(--ij-border); transition: border-color .3s; }
.offer-card:hover { border-color: rgba(194, 74, 68, .45); }
.offer-icon { width: 3.5rem; height: 3.5rem; display: grid; place-items: center; border-radius: var(--ij-radius-sm); margin-bottom: 1rem;
    background: var(--ij-red-soft); color: var(--ij-red-hover); font-size: 1.6rem; }
.offer-card h3 { font-size: 1.35rem; margin: 0; }
.offer-card .prose { font-size: .95rem; line-height: 1.75; }
.offer-card .link-arrow { margin-top: auto; padding-top: .75rem; }

/* ---------- Szkolenia ---------- */
.training-row { display: flex; align-items: center; gap: 1.25rem; padding: 1.1rem 0; border-bottom: 1px solid var(--ij-border); text-decoration: none; color: inherit; }
.training-row:first-of-type { padding-top: 0; }
.training-row:last-child { border-bottom: 0; padding-bottom: 0; }
.training-row:hover .training-row-title { color: var(--ij-red-hover); }
.training-row-title { color: var(--ij-light); font-weight: 500; transition: color .2s; }
.training-row .bi-arrow-up-right { width: 2.6rem; height: 2.6rem; flex: none; display: grid; place-items: center; border-radius: 50%;
    border: 1px solid var(--ij-border); color: var(--ij-light); transition: .3s; }
.training-row:hover .bi-arrow-up-right { background: var(--ij-red); border-color: var(--ij-red); color: #fff; }
.date-chip { width: 4rem; flex: none; text-align: center; border-radius: var(--ij-radius-sm); background: var(--ij-card-2); border: 1px solid var(--ij-border);
    color: #fff; padding: .5rem 0; line-height: 1.1; }
.date-chip .day { display: block; font-size: 1.4rem; font-weight: 600; }
.date-chip .month { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ij-red-hover); font-weight: 600; }
.training-card { scroll-margin-top: 110px; height: 100%; display: flex; flex-direction: column; }
.training-card:target { border: 1px solid var(--ij-red); }
.training-card h3 { font-size: 1.3rem; }
.format-badge { display: inline-block; align-self: flex-start; font-size: .78rem; font-weight: 500; color: var(--ij-light); padding: .2rem .75rem;
    border: 1px solid var(--ij-border); border-radius: 10px; margin-bottom: .9rem; }
.training-sub { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: #8c959e; margin: 1.25rem 0 .5rem; font-weight: 500; }
.date-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.date-list li { display: flex; gap: .6rem; align-items: center; padding: .55rem 0; border-bottom: 1px dashed var(--ij-border); }
.date-list li i { color: var(--ij-red-hover); }
.date-list li strong { margin-left: auto; color: var(--ij-light); font-weight: 500; }
.training-contact { margin-top: auto; display: flex; align-items: center; gap: .5rem; font-size: .92rem; padding-top: 1.25rem; flex-wrap: wrap; }
.empty-state { text-align: center; padding: 3rem 1rem; }
.empty-state i { font-size: 2.5rem; display: block; margin-bottom: .75rem; color: var(--ij-red); opacity: .6; }

/* ---------- Kontakt / CTA ---------- */
.cta-card { text-align: center; padding: 60px; }
.cta-card h2 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); font-weight: 400; max-width: 40rem; margin: 0 auto 1rem; }
.cta-card .hero-btns { justify-content: center; }
.contact-card h3 { font-size: 1.1rem; margin: 1.5rem 0 .75rem; }
.contact-card h3:first-child { margin-top: 0; }
.map-frame { overflow: hidden; height: 100%; min-height: 380px; border-radius: var(--ij-radius); border: 1px solid var(--ij-border); }
.map-frame iframe { width: 100%; height: 100%; min-height: 380px; border: 0; display: block; filter: grayscale(.85) invert(.9) hue-rotate(180deg) contrast(.9); }
.map-placeholder { height: 100%; min-height: 380px; display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding: 30px; color: var(--ij-text);
    background: radial-gradient(circle at 20% 20%, rgba(98, 157, 209, .14), transparent 55%),
                radial-gradient(circle at 80% 90%, rgba(194, 74, 68, .18), transparent 55%), var(--ij-card); }
.map-placeholder > .bi { font-size: 2.6rem; color: var(--ij-red-hover); margin-bottom: .75rem; }
.map-placeholder p { max-width: 30rem; color: var(--ij-light); }
.map-placeholder .small { color: var(--ij-text); }

/* ---------- Nagłówek podstron i artykuł ---------- */
.page-header { padding: 50px 40px; }
.page-header h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 400; margin: 0; }
.page-header-lead { max-width: 46rem; margin-top: 1rem; }
.back-link { color: var(--ij-text); text-decoration: none; display: inline-flex; gap: .4rem; margin-bottom: 1rem; font-size: .92rem; }
.back-link:hover { color: var(--ij-red-hover); }
.news-date { font-size: .88rem; }
.narrow { max-width: 860px; }
.article-image { margin: 0 0 30px; }
.article-image img { width: 100%; border-radius: var(--ij-radius); }
.article-lead { font-size: 1.2rem; color: var(--ij-light); line-height: 1.7; }
.article-body .prose { font-size: 1.03rem; }
.article-body .prose img { max-width: 100%; border-radius: var(--ij-radius-sm); }
.article-body .prose h2, .article-body .prose h3 { margin-top: 2rem; }
.article-body .prose blockquote { border-left: 3px solid var(--ij-red); padding-left: 1rem; color: var(--ij-light); }
.share-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--ij-border); }

/* ---------- Paginacja ---------- */
.pagination { --bs-pagination-bg: var(--ij-card); --bs-pagination-color: var(--ij-light); --bs-pagination-border-color: var(--ij-border);
    --bs-pagination-hover-bg: var(--ij-card-2); --bs-pagination-hover-color: #fff; --bs-pagination-hover-border-color: var(--ij-border);
    --bs-pagination-focus-bg: var(--ij-card-2); --bs-pagination-focus-color: #fff; --bs-pagination-focus-box-shadow: 0 0 0 2px var(--ij-red-soft);
    --bs-pagination-active-bg: var(--ij-red); --bs-pagination-active-border-color: var(--ij-red);
    --bs-pagination-disabled-bg: var(--ij-bg); --bs-pagination-disabled-color: #66707a; --bs-pagination-disabled-border-color: var(--ij-border);
    --bs-pagination-border-radius: 12px; gap: .4rem; }
.pagination .page-link { border-radius: 12px !important; }

/* ---------- Stopka ---------- */
.site-footer { padding: 30px 0 0; margin-top: 30px; }
.footer-card { padding: 40px; }
.footer-heading { font-size: 1rem; color: #fff; margin-bottom: 1rem; font-weight: 500; }
.footer-links ul, .footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .35rem; }
.footer-links a, .footer-text a { color: var(--ij-text); text-decoration: none; }
.footer-links a:hover, .footer-text a:hover { color: var(--ij-red-hover); }
.footer-card .social-icons { justify-content: flex-start; margin-top: 1rem; }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 40px 0; font-size: .9rem; }
.footer-bottom a { color: var(--ij-light); text-decoration: none; }
.footer-bottom a:hover { color: var(--ij-red-hover); }
.footer-legal { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.link-button { background: none; border: 0; padding: 0; color: var(--ij-light); font: inherit; cursor: pointer; }
.link-button:hover { color: var(--ij-red-hover); }

/* ---------- Baner zgody na cookies ---------- */
.cookie-banner { position: fixed; z-index: 1080; left: 16px; right: 16px; bottom: 16px; max-width: 44rem; margin: 0 auto;
    display: flex; gap: 1.25rem; align-items: center; padding: 20px 24px; font-size: .9rem; line-height: 1.6;
    background: var(--ij-card-2); color: var(--ij-text); border: 1px solid var(--ij-border); border-radius: var(--ij-radius);
    box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .7); }
.cookie-banner[hidden] { display: none; }
.cookie-banner strong { color: #fff; }
.cookie-banner a { color: var(--ij-light); }
.cookie-actions { display: flex; gap: .6rem; flex: none; }
@media (max-width: 575.98px) {
    .cookie-banner { flex-direction: column; align-items: stretch; }
    .cookie-actions > * { flex: 1; justify-content: center; }
}

.error-page { min-height: 100vh; display: grid; place-items: center; padding: 1rem !important; }
.error-page .bento { text-align: center; max-width: 34rem; }
.error-page h1 { font-size: 4rem; font-weight: 500; }

/* ---------- Animacja pojawiania się (tylko z JS, bez przy ograniczonym ruchu) ---------- */
@media (prefers-reduced-motion: no-preference) {
    .js .reveal { opacity: 0; transform: translateY(40px); transition: opacity .8s ease, transform .8s ease; }
    .js .reveal.is-visible { opacity: 1; transform: none; }
}

@media (max-width: 991.98px) {
    body { padding-top: 76px; }
    .site-header { padding: 14px 0; }
    .site-header .navbar-collapse { padding: 1rem 0 .5rem; }
    .site-header .navbar-nav .nav-link { padding: .5rem 0; }
    .section-title { margin-top: 50px; }
}
@media (max-width: 575.98px) {
    .bento, .footer-card { padding: 26px; }
    .cta-card { padding: 34px 22px; }
    .page-header { padding: 34px 24px; }
}
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
    .scroller-inner { flex-wrap: wrap; width: auto; }
    .scroller-inner > [aria-hidden] { display: none; }
}
