/* ===== ZAE PREMIUM LAYER =====
   Nadbudowa wizualna na istniejącym stylu i palecie (--primary-color, --secondary-color).
   Ładowana po style.css. Nie zmienia struktury HTML. */

:root {
    --p-radius: 16px;
    --p-radius-lg: 22px;
    --p-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
    --p-shadow-1: 0 1px 2px rgba(11, 25, 38, 0.06), 0 8px 24px rgba(11, 25, 38, 0.08);
    --p-shadow-2: 0 2px 4px rgba(11, 25, 38, 0.06), 0 16px 40px rgba(11, 25, 38, 0.12);
    --p-shadow-3: 0 4px 8px rgba(11, 25, 38, 0.08), 0 28px 64px rgba(11, 25, 38, 0.16);
    --p-glow: 0 10px 30px rgba(224, 43, 32, 0.28);
    --p-navy-1: #0b1926;
    --p-navy-2: #12283c;
    --p-hairline: rgba(11, 25, 38, 0.08);
}

/* --- Typografia --- */
h1, h2, h3 {
    letter-spacing: -0.02em;
    font-weight: 800;
    color: var(--secondary-color);
}

h2 {
    line-height: 1.15;
}

body {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.lead {
    line-height: 1.7;
    font-weight: 400;
}

.hero-copy .lead {
    color: rgba(255, 255, 255, 0.92);
}

.eyebrow {
    letter-spacing: 0.22em;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.78rem;
}

::selection {
    background: var(--primary-color);
    color: #fff;
}

/* --- Nagłówek: szkło po przewinięciu --- */
.main-header {
    transition: background-color 0.35s var(--p-ease), box-shadow 0.35s var(--p-ease), backdrop-filter 0.35s var(--p-ease);
}

.main-header.scrolled {
    background-color: rgba(255, 255, 255, 0.86) !important;
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    box-shadow: 0 1px 0 var(--p-hairline), 0 10px 30px rgba(11, 25, 38, 0.10) !important;
}

.nav-links a {
    letter-spacing: 0.04em;
    font-weight: 700;
}

/* --- Hero: głębszy cień z zachowaniem kierunku oryginału (tekst po prawej / po lewej) --- */
.hero-shade {
    background:
        linear-gradient(90deg, rgba(11, 25, 38, 0.10) 0%, rgba(11, 25, 38, 0.40) 40%, rgba(11, 25, 38, 0.88) 72%, rgba(11, 25, 38, 0.96) 100%),
        linear-gradient(0deg, rgba(11, 25, 38, 0.50), rgba(11, 25, 38, 0.06));
}

.subpage-hero-shade {
    background:
        linear-gradient(90deg, rgba(11, 25, 38, 0.96) 0%, rgba(11, 25, 38, 0.82) 48%, rgba(11, 25, 38, 0.34) 100%),
        linear-gradient(0deg, rgba(11, 25, 38, 0.50), rgba(11, 25, 38, 0.06));
}

.hero-copy h1,
.subpage-hero-content h1 {
    letter-spacing: -0.03em;
    text-shadow: 0 2px 24px rgba(11, 25, 38, 0.45);
}

/* Znak zastrzeżony ® proporcjonalnie do otaczającej czcionki (hero, treść podstron, kafelki) */
.subpage-hero-content h1 sup,
.subpage-content sup,
.home-page .product-tile sup {
    font-size: 0.56em;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    vertical-align: super;
    margin-left: 0.06em;
}

.home-page .value-item strong sup {
    font-size: 0.34em;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0;
    vertical-align: super;
    margin-left: 0.06em;
}

@media (max-width: 400px) {
    .subpage-hero-content h1 sup {
        font-size: 0.40em;
    }
}

/* Zbalansowane zawijanie nagłówków sekcji — znak ® nie zostawia sieroty w ostatniej linii */
.subpage-content h2 {
    text-wrap: balance;
}

.hero-copy .eyebrow,
.subpage-hero-content .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.hero-copy .eyebrow::before,
.subpage-hero-content .eyebrow::before {
    content: "";
    width: 34px;
    height: 2px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* --- Hero mobilny: treść może wydłużyć sekcję, zamiast ucinać dolny padding przy sztywnych 85vh --- */
@media (max-width: 992px) {
    .home-hero {
        height: auto;
        min-height: 85vh;
    }
}

/* --- Hamburger w kolorach marki i bez kreski przy zawijającym eyebrow (menu mobilne pojawia się już ≤992px) --- */
@media (max-width: 992px) {
    .mobile-menu-toggle span {
        background-color: var(--secondary-color) !important;
    }

    .mobile-menu-toggle.active span {
        background-color: var(--primary-color) !important;
    }

    .hero-copy .eyebrow::before {
        display: none;
    }
}

/* --- Sekcje: więcej powietrza --- */
.home-section {
    padding: 96px 0;
}

.subpage-content-section {
    padding: 72px 0 96px;
}

.section-header h2::after {
    background: linear-gradient(90deg, var(--primary-color), rgba(224, 43, 32, 0));
    height: 3px;
    border-radius: 3px;
}

/* --- Kafelki produktów: premium hover --- */
.product-tile {
    border-radius: var(--p-radius-lg);
    overflow: hidden;
    box-shadow: var(--p-shadow-1);
    transition: transform 0.45s var(--p-ease), box-shadow 0.45s var(--p-ease);
    background: var(--secondary-color);
}

@media (hover: hover) {
    .product-tile:hover {
        transform: translateY(-8px);
        box-shadow: var(--p-shadow-3);
    }

    .product-tile:hover img {
        transform: scale(1.06);
    }
}

.product-tile img {
    transition: transform 0.7s var(--p-ease);
}

.product-tile::after {
    background: linear-gradient(180deg, rgba(11, 25, 38, 0) 30%, rgba(11, 25, 38, 0.55) 68%, rgba(11, 25, 38, 0.92) 100%);
}

.product-tile h3 {
    color: #fff;
}

.product-tile h3 .tile-model {
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    text-transform: none;
    margin-bottom: 0;
    white-space: nowrap;
}

/* --- Karty i panele --- */
.card,
.contact-panel,
.contact-grid > div,
.service-list a {
    border-radius: var(--p-radius);
    box-shadow: var(--p-shadow-1);
    border: 1px solid var(--p-hairline);
    transition: transform 0.35s var(--p-ease), box-shadow 0.35s var(--p-ease), border-color 0.35s var(--p-ease);
}

.contact-grid > div:first-child {
    padding: 42px;
    background: var(--white);
}

.contact-grid > div:first-child h2 {
    margin-bottom: 18px;
}

@media (max-width: 768px) {
    .contact-grid > div:first-child {
        padding: 28px;
    }
}

@media (hover: hover) {
    .card:hover,
    .service-list a:hover {
        transform: translateY(-4px);
        box-shadow: var(--p-shadow-2);
        border-color: rgba(224, 43, 32, 0.25);
    }
}

.content-image img,
.img-fluid {
    border-radius: var(--p-radius);
    box-shadow: var(--p-shadow-2);
}

/* --- Panele CTA: granatowy panel premium (również desktop) --- */
.info-banner,
.cta-panel {
    background: linear-gradient(135deg, var(--p-navy-1) 0%, var(--p-navy-2) 100%) !important;
    border-radius: var(--p-radius-lg) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    box-shadow: var(--p-shadow-3) !important;
    color: #fff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 40px !important;
    padding: 56px !important;
    position: relative;
    overflow: hidden;
}

.info-banner::before,
.cta-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(600px 220px at 85% 0%, rgba(224, 43, 32, 0.22), transparent 70%);
    pointer-events: none;
}

.info-banner h2,
.cta-panel h2 {
    color: #fff !important;
}

.info-banner .btn,
.cta-panel .btn {
    margin: 0 !important;
    flex-shrink: 0;
}

.info-banner p,
.cta-panel p {
    color: rgba(255, 255, 255, 0.82) !important;
}

@media (max-width: 768px) {
    .info-banner,
    .cta-panel {
        flex-direction: column !important;
        text-align: center !important;
        padding: 40px 24px !important;
        gap: 24px !important;
    }
}

/* --- Przyciski: gradient + połysk --- */
.btn {
    border-radius: 12px;
    letter-spacing: 0.08em;
    position: relative;
    overflow: hidden;
}

.home-page .btn-primary,
.subpage .btn-primary,
.btn-primary {
    background-image: linear-gradient(135deg, #ef3a2e 0%, var(--primary-color) 45%, var(--primary-dark) 100%) !important;
    background-color: var(--primary-color) !important;
    box-shadow: var(--p-glow) !important;
    border: none !important;
}

.home-page .btn-primary::after,
.subpage .btn-primary::after,
.btn-primary::after {
    content: "";
    position: absolute;
    top: 0;
    left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transform: skewX(-20deg);
    transition: left 0.55s var(--p-ease);
}

@media (hover: hover) {
    .home-page .btn-primary:hover::after,
    .subpage .btn-primary:hover::after,
    .btn-primary:hover::after {
        left: 120%;
    }

    .home-page .btn-primary:hover,
    .subpage .btn-primary:hover,
    .btn-primary:hover {
        box-shadow: 0 14px 36px rgba(224, 43, 32, 0.4) !important;
    }
}

.home-page .btn-secondary,
.subpage .btn-secondary,
.btn-secondary {
    border: 2px solid rgba(224, 43, 32, 0.55) !important;
    color: var(--primary-color) !important;
    background: transparent !important;
}

@media (hover: hover) {
    .home-page .btn-secondary:hover,
    .subpage .btn-secondary:hover,
    .btn-secondary:hover {
        background: var(--primary-color) !important;
        color: #fff !important;
        border-color: var(--primary-color) !important;
    }
}

.btn:focus-visible {
    outline: 3px solid rgba(224, 43, 32, 0.4);
    outline-offset: 3px;
}

/* --- Lista kontrolna --- */
.check-list li::before {
    color: var(--primary-color);
    font-weight: 800;
}

/* --- Wartości / statystyki: granatowy panel z czerwonym akcentem --- */
.value-row {
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--p-radius-lg);
    background: linear-gradient(135deg, var(--p-navy-1) 0%, var(--p-navy-2) 100%);
    box-shadow: var(--p-shadow-3);
    overflow: hidden;
    isolation: isolate;
}

.value-row::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(520px 240px at 12% 0%, rgba(224, 43, 32, 0.22), transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.value-item {
    padding: 38px 32px;
    border-right: 1px solid rgba(255, 255, 255, 0.10);
}

.value-item:last-child {
    border-right: none;
}

.value-item::before {
    content: "";
    display: block;
    width: 30px;
    height: 3px;
    border-radius: 3px;
    background: var(--primary-color);
    margin-bottom: 18px;
}

.value-item strong {
    display: block;
    color: #fff;
    font-size: clamp(2.3rem, 4vw, 3.4rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.value-item span {
    display: block;
    color: rgba(255, 255, 255, 0.70);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    line-height: 1.5;
}

@media (min-width: 577px) and (max-width: 992px) {
    .value-item {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.10);
    }

    .value-item:nth-child(odd) {
        border-right: 1px solid rgba(255, 255, 255, 0.10);
    }

    .value-item:nth-child(3),
    .value-item:nth-child(4) {
        border-bottom: none;
    }
}

@media (max-width: 576px) {
    .value-item {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.10);
        text-align: center;
        padding: 26px 20px;
    }

    .value-item::before {
        margin-left: auto;
        margin-right: auto;
    }

    .value-item:last-child {
        border-bottom: none;
    }
}

/* --- Stopka: subtelna linia i poświata ikon --- */
.main-footer {
    position: relative;
}

.main-footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(224, 43, 32, 0.5), transparent);
}

.widget-icon {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 8px 24px rgba(224, 43, 32, 0.18);
}

/* --- Logotypy partnerów: bez powiększania, podgląd w lightboxie --- */
.proof-section:has(.logo-track img:hover) {
    overflow: hidden;
}

.logo-marquee:has(.logo-track img:hover) {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
    position: static;
    z-index: auto;
}

@media (hover: hover) {
    .logo-marquee .logo-track img:hover {
        transform: none !important;
        border-color: var(--home-line) !important;
        box-shadow: 0 12px 28px rgba(16, 24, 32, 0.08) !important;
    }
}

/* --- Sygnalizatory CPZ: karty wariantów i panel technologii --- */
.cpz-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.subpage-content a.cpz-card {
    display: flex;
    align-items: stretch;
    gap: 26px;
    padding: 24px;
    background: #ffffff;
    border: 1px solid var(--p-hairline);
    border-radius: var(--p-radius-lg);
    box-shadow: var(--p-shadow-1);
    color: var(--home-ink);
    font-weight: 400;
    transition: transform 0.35s var(--p-ease), box-shadow 0.35s var(--p-ease), border-color 0.35s var(--p-ease);
}

@media (hover: hover) {
    .subpage-content a.cpz-card:hover {
        transform: translateY(-4px);
        border-color: rgba(224, 43, 32, 0.35);
        box-shadow: var(--p-shadow-2);
        color: var(--home-ink);
    }
}

.cpz-card-media {
    position: relative;
    flex: 0 0 184px;
    min-height: 184px;
    display: grid;
    place-items: center;
    padding: 16px;
    background: linear-gradient(160deg, #f7f9fa 0%, #eef2f6 100%);
    border: 1px solid var(--p-hairline);
    border-radius: var(--p-radius);
    overflow: hidden;
}

.subpage-content .cpz-card-media img {
    max-height: 150px !important;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: none;
    transition: transform 0.45s var(--p-ease);
}

@media (hover: hover) {
    .subpage-content a.cpz-card:hover .cpz-card-media img {
        transform: scale(1.05);
    }
}

.cpz-card-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.subpage-content .cpz-card h3 {
    margin: 2px 0 8px !important;
    font-size: 1.42rem !important;
    line-height: 1.2;
}

.cpz-card-desc {
    color: #4d5b68;
    font-size: 0.96rem;
    line-height: 1.62;
}

.cpz-card-more {
    margin-top: auto;
    padding-top: 16px;
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary-color);
}

.cpz-card-more::after {
    content: "→";
    margin-left: 8px;
    transition: transform 0.3s var(--p-ease);
}

.subpage-content a.cpz-card:hover .cpz-card-more::after {
    transform: translateX(4px);
}

.cpz-card-media--scada {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    background:
        radial-gradient(120% 120% at 18% 0%, rgba(224, 43, 32, 0.5) 0%, rgba(224, 43, 32, 0) 58%),
        linear-gradient(150deg, var(--p-navy-1), var(--p-navy-2));
    border-color: rgba(255, 255, 255, 0.08);
}

.cpz-scada-icon {
    width: 52px;
    height: 52px;
    color: #ffffff;
    opacity: 0.94;
}

.cpz-scada-label {
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
    text-align: center;
}

.cpz-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 5px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #ffffff;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    box-shadow: var(--p-glow);
}

.cpz-tech {
    display: flex;
    align-items: flex-start;
    gap: 26px;
    margin-top: 40px;
    padding: 32px;
    background: linear-gradient(135deg, #f7f9fa 0%, #ffffff 60%);
    border: 1px solid var(--p-hairline);
    border-radius: var(--p-radius-lg);
    box-shadow: var(--p-shadow-1);
}

.cpz-tech-icon {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(150deg, var(--p-navy-1), var(--p-navy-2));
    color: #ffffff;
    box-shadow: 0 12px 26px rgba(11, 25, 38, 0.22);
}

.cpz-tech-icon svg {
    width: 32px;
    height: 32px;
}

.subpage-content .cpz-tech h3 {
    margin: 2px 0 10px !important;
    font-size: 1.42rem !important;
}

.subpage-content .cpz-tech p {
    margin: 0;
    color: #4d5b68 !important;
    font-size: 1rem !important;
    line-height: 1.65;
}

@media (max-width: 991px) {
    .cpz-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 679px) {
    .cpz-card {
        flex-direction: column;
        gap: 20px;
    }

    .cpz-card-media {
        flex: none;
        min-height: 210px;
    }

    .subpage-content .cpz-card-media img {
        max-height: 180px !important;
    }

    .cpz-tech {
        flex-direction: column;
        padding: 26px;
    }
}

/* --- Podstrony produktowe: wspólny rytm i komponenty --- */
.product-page .subpage-content-section {
    padding: 64px 0 96px;
}

.product-intro {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
    gap: clamp(32px, 5vw, 64px);
    align-items: center;
}

.product-intro-copy h2 {
    margin: 0 0 18px !important;
    font-size: clamp(1.9rem, 3.2vw, 2.8rem) !important;
}

.product-page .product-intro-copy .lead {
    margin-bottom: 18px;
    color: #3f4d5a !important;
}

.product-intro-media {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 340px;
    padding: 26px;
    background:
        radial-gradient(120% 120% at 12% 0%, rgba(224, 43, 32, 0.10), transparent 58%),
        linear-gradient(160deg, #f8fafb 0%, #e9eef3 100%);
    border: 1px solid var(--p-hairline);
    border-radius: var(--p-radius-lg);
    box-shadow: var(--p-shadow-1);
    overflow: hidden;
}

.product-page .product-intro-media img {
    width: auto;
    max-width: 100%;
    max-height: 330px !important;
    height: auto;
    object-fit: contain;
    margin: 0;
    border-radius: 12px;
    box-shadow: none;
}

.product-intro-media--navy {
    align-content: center;
    justify-items: center;
    gap: 18px;
    text-align: center;
    background:
        radial-gradient(120% 120% at 18% 0%, rgba(224, 43, 32, 0.46) 0%, rgba(224, 43, 32, 0) 58%),
        linear-gradient(150deg, var(--p-navy-1), var(--p-navy-2));
    border-color: rgba(255, 255, 255, 0.08);
}

.product-intro-media--navy svg {
    width: 58px;
    height: 58px;
    color: #ffffff;
    opacity: 0.95;
}

.product-intro-media--navy span {
    font-size: 0.66rem !important;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.74) !important;
}

.product-intro-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.product-intro-actions .btn {
    margin: 0 !important;
}

.product-section {
    margin-top: clamp(48px, 6vw, 76px);
}

.product-section > h2 {
    margin-top: 0 !important;
}

.product-section > p,
.product-section > .lead {
    max-width: 820px;
}

.product-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--primary-color) !important;
}

.product-kicker::before {
    content: "";
    width: 26px;
    height: 2px;
    border-radius: 2px;
    background: var(--primary-color);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.feature-grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feature-card {
    padding: 26px;
    background: linear-gradient(165deg, #ffffff 0%, #f7f9fa 100%);
    border: 1px solid var(--p-hairline);
    border-radius: var(--p-radius);
    box-shadow: var(--p-shadow-1);
}

.feature-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-bottom: 16px;
    border-radius: 13px;
    background: linear-gradient(150deg, var(--p-navy-1), var(--p-navy-2));
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(11, 25, 38, 0.20);
}

.feature-icon svg {
    width: 24px;
    height: 24px;
}

.product-page .feature-card h3 {
    margin: 0 0 8px !important;
    font-size: 1.14rem !important;
    line-height: 1.3;
}

.product-page .feature-card p {
    margin: 0;
    font-size: 0.97rem !important;
    line-height: 1.6;
    color: #4d5b68 !important;
}

.product-checklist {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 44px;
    margin-top: 30px;
    padding: 10px 32px;
    background: #f7f9fa;
    border: 1px solid var(--p-hairline);
    border-radius: var(--p-radius-lg);
}

.product-page .product-checklist .check-list {
    margin: 0;
}

.product-page .product-checklist .check-list li {
    margin: 0;
    padding: 14px 0 14px 32px;
    border-bottom: 1px solid var(--p-hairline);
    font-size: 1.02rem !important;
}

.product-page .product-checklist .check-list li:last-child {
    border-bottom: none;
}

.spec-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 30px 0 0;
}

.spec-item {
    padding: 20px 24px;
    background: #ffffff;
    border: 1px solid var(--p-hairline);
    border-left: 3px solid var(--primary-color);
    border-radius: var(--p-radius);
    box-shadow: 0 1px 2px rgba(11, 25, 38, 0.04);
}

.spec-item dt {
    margin-bottom: 6px;
    font-family: var(--font-heading);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #6b7885;
}

.spec-item dd {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.04rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--p-navy-1);
}

.product-page .value-row {
    margin-top: 40px;
}

.product-page .value-item span {
    color: rgba(255, 255, 255, 0.70) !important;
    font-size: 0.8rem !important;
}

.product-page .value-item strong {
    color: #ffffff !important;
}

.product-media-wide {
    margin-top: 32px;
    padding: 24px;
    background: #ffffff;
    border: 1px solid var(--p-hairline);
    border-radius: var(--p-radius-lg);
    box-shadow: var(--p-shadow-1);
}

.product-page .product-media-wide img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
    border-radius: 12px;
    box-shadow: none;
}

.product-figure {
    margin: 32px 0 0;
}

.product-figure figcaption {
    margin-top: 12px;
    font-size: 0.86rem !important;
    color: #6b7885 !important;
    text-align: center;
}

.product-page .product-note {
    margin-top: 26px;
    font-size: 0.86rem !important;
    line-height: 1.6;
    color: #6b7885 !important;
}

.product-callout {
    margin-top: 32px;
    padding: 30px 34px;
    background: linear-gradient(135deg, #f7f9fa 0%, #ffffff 70%);
    border: 1px solid var(--p-hairline);
    border-left: 4px solid var(--primary-color);
    border-radius: var(--p-radius-lg);
}

.product-callout p {
    margin: 0;
    font-size: 1.08rem !important;
    line-height: 1.65;
}

.product-award {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 32px;
    align-items: center;
    margin-top: 30px;
    padding: 40px 44px;
    background: linear-gradient(135deg, var(--p-navy-1) 0%, var(--p-navy-2) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--p-radius-lg);
    box-shadow: var(--p-shadow-3);
    overflow: hidden;
}

.product-award::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(520px 220px at 88% 0%, rgba(224, 43, 32, 0.24), transparent 70%);
    pointer-events: none;
}

.product-award > * {
    position: relative;
    z-index: 1;
}

.product-page .product-award h3 {
    margin: 0 0 10px !important;
    color: #ffffff !important;
    font-size: clamp(1.4rem, 2.2vw, 1.9rem) !important;
}

.product-page .product-award p {
    margin: 0;
    color: rgba(255, 255, 255, 0.82) !important;
    font-size: 1.04rem !important;
}

.award-badge {
    display: grid;
    place-items: center;
    gap: 4px;
    min-width: 168px;
    padding: 22px 26px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    text-align: center;
}

.award-badge strong {
    font-family: var(--font-heading);
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #ffffff;
}

.award-badge span {
    font-size: 0.64rem !important;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.70) !important;
}

.product-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 26px;
}

.product-page .product-gallery img {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    margin: 0;
    border-radius: var(--p-radius);
    box-shadow: var(--p-shadow-2);
}

.product-family {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin-top: 56px;
    padding-top: 30px;
    border-top: 1px solid var(--p-hairline);
}

.product-family-label {
    margin-right: 4px;
    font-family: var(--font-heading);
    font-size: 0.7rem !important;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #6b7885 !important;
}

.subpage-content .product-family a {
    display: inline-block;
    padding: 9px 16px;
    border: 1px solid var(--p-hairline) !important;
    border-radius: 999px;
    background: #f7f9fa;
    color: var(--home-ink);
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: transform 0.3s var(--p-ease), border-color 0.3s var(--p-ease), background-color 0.3s var(--p-ease), color 0.3s var(--p-ease);
}

.subpage-content .product-family a::after {
    content: "→";
    margin-left: 8px;
    color: var(--primary-color);
    font-size: 0.9em;
}

@media (hover: hover) {
    .subpage-content .product-family a:hover {
        transform: translateY(-1px);
        border-color: rgba(224, 43, 32, 0.4) !important;
        background: #ffffff;
        color: var(--primary-color);
    }
}

.product-page .subpage-content > .info-banner {
    margin-top: 56px !important;
}

@media (max-width: 991px) {
    .product-intro {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .product-intro-media {
        min-height: 260px;
        padding: 22px;
    }

    .product-page .product-intro-media img {
        max-height: 300px !important;
    }

    .feature-grid,
    .feature-grid--two {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 679px) {
    .product-intro-media {
        min-height: 220px;
    }

    .product-page .product-intro-media img {
        max-height: 240px !important;
    }

    .feature-grid,
    .feature-grid--two {
        grid-template-columns: 1fr;
    }

    .product-checklist {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 8px 22px;
    }

    .product-page .product-checklist .check-list li:last-child {
        border-bottom: 1px solid var(--p-hairline);
    }

    .product-page .product-checklist .check-list:last-child li:last-child {
        border-bottom: none;
    }

    .spec-grid {
        grid-template-columns: 1fr;
    }

    .product-award {
        grid-template-columns: 1fr;
        padding: 30px 24px;
        text-align: center;
    }

    .award-badge {
        justify-self: center;
    }

    .product-gallery {
        grid-template-columns: 1fr;
    }

    .product-page .product-gallery img {
        aspect-ratio: 16 / 10;
    }

    .product-family {
        margin-top: 44px;
    }

    .product-page .subpage-content > .info-banner {
        margin-top: 44px !important;
    }
}

/* --- Referencje: karty jako wyzwalacze podglądu --- */
.reference-card {
    cursor: zoom-in;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(20px, 4vw);
    background: rgba(11, 25, 38, 0.90);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s var(--p-ease), visibility 0.25s var(--p-ease);
}

.lightbox.open {
    opacity: 1;
    visibility: visible;
}

.lightbox img {
    max-width: min(94vw, 1000px);
    max-height: 82vh;
    width: auto;
    height: auto;
    object-fit: contain;
    background: #fff;
    padding: clamp(14px, 3vw, 32px);
    border-radius: var(--p-radius);
    box-shadow: var(--p-shadow-3);
}

.lightbox-close {
    position: absolute;
    top: clamp(12px, 3vw, 24px);
    right: clamp(12px, 3vw, 24px);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 1.7rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.25s ease, border-color 0.25s ease;
}

.lightbox-close:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

body.lightbox-open {
    overflow: hidden;
}

/* --- Pasek przewijania i redukcja ruchu --- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* --- Tryb ciemny: powierzchnie premium i kontrast tekstu (html[data-theme="dark"]) --- */

    /* Strona główna — karta intro sekcji Kontakt (wcześniej biała z białym nagłówkiem) */
    :where(html[data-theme="dark"]) .contact-grid > div:first-child {
        background: #242b35;
        border-color: #3d4652;
        box-shadow: var(--p-shadow-3);
    }

    :where(html[data-theme="dark"]) .contact-grid > div:first-child p {
        color: var(--home-muted) !important;
    }

    /* Podstrony produktowe */
    :where(html[data-theme="dark"]) .product-page .product-intro-copy .lead {
        color: #c3ced9 !important;
    }

    :where(html[data-theme="dark"]) .product-page .product-intro-media:not(.product-intro-media--navy) {
        background:
            radial-gradient(120% 120% at 12% 0%, rgba(224, 43, 32, 0.14), transparent 58%),
            linear-gradient(160deg, #1f2731 0%, #161d26 100%);
        border-color: #3d4652;
        box-shadow: var(--p-shadow-3);
    }

    :where(html[data-theme="dark"]) .product-page .feature-card {
        background: linear-gradient(165deg, #242b35 0%, #1c232c 100%);
        border-color: #3d4652;
    }

    :where(html[data-theme="dark"]) .product-page .feature-card p {
        color: #b9c5d1 !important;
    }

    :where(html[data-theme="dark"]) .product-page .product-checklist {
        background: #1f2731;
        border-color: #3d4652;
    }

    :where(html[data-theme="dark"]) .product-page .product-checklist .check-list li {
        border-bottom-color: #3d4652;
    }

    :where(html[data-theme="dark"]) .product-page .spec-item {
        background: #1f2731;
        border-color: #3d4652;
        border-left-color: var(--primary-color);
    }

    :where(html[data-theme="dark"]) .product-page .spec-item dt {
        color: #9fb0bf;
    }

    :where(html[data-theme="dark"]) .product-page .spec-item dd {
        color: #f0f6fc;
    }

    :where(html[data-theme="dark"]) .product-page .product-media-wide {
        background: #1f2731;
        border-color: #3d4652;
    }

    :where(html[data-theme="dark"]) .product-page .product-callout {
        background: linear-gradient(135deg, #242b35 0%, #1b222b 70%);
        border-color: #3d4652;
        border-left-color: var(--primary-color);
    }

    :where(html[data-theme="dark"]) .product-page .product-kicker {
        color: #ff8a80 !important;
    }

    :where(html[data-theme="dark"]) .product-page .product-kicker::before {
        background: #ff8a80;
    }

    :where(html[data-theme="dark"]) .product-page .product-family-label {
        color: #a1b0bd !important;
    }

    :where(html[data-theme="dark"]) .product-page .subpage-content .product-family a {
        background: rgba(255, 255, 255, 0.06) !important;
        border-color: #3d4652 !important;
        color: #f0f6fc !important;
    }

    :where(html[data-theme="dark"]) .product-page .subpage-content .product-family a::after {
        color: #ff8a80;
    }

    :where(html[data-theme="dark"]) .product-page .product-figure figcaption,
    :where(html[data-theme="dark"]) .product-page .product-note {
        color: #a1b0bd !important;
    }

    @media (hover: hover) {
        :where(html[data-theme="dark"]) .product-page .subpage-content .product-family a:hover {
            background: #2c3540 !important;
            border-color: rgba(224, 43, 32, 0.5) !important;
            color: #ff8a80 !important;
        }
    }

    /* Karty CPZ i karta technologiczna */
    :where(html[data-theme="dark"]) .subpage-content a.cpz-card {
        background: linear-gradient(165deg, #242b35 0%, #1b222b 100%);
        border-color: #3d4652;
        box-shadow: var(--p-shadow-2);
    }

    :where(html[data-theme="dark"]) .subpage-content .cpz-card-media:not(.cpz-card-media--scada) {
        background: linear-gradient(160deg, #1f2731 0%, #171e27 100%);
        border-color: #3d4652;
    }

    :where(html[data-theme="dark"]) .subpage-content .cpz-card-desc {
        color: #b9c5d1 !important;
    }

    :where(html[data-theme="dark"]) .subpage-content .cpz-card-more {
        color: #ff8a80 !important;
    }

    :where(html[data-theme="dark"]) .subpage-content .cpz-tech {
        background: linear-gradient(150deg, #242b35 0%, #1b222b 100%);
        border-color: #3d4652;
    }

    :where(html[data-theme="dark"]) .subpage-content .cpz-tech p {
        color: #b9c5d1 !important;
    }

    /* Profil działalności — sekcja Funduszy Europejskich */
    :where(html[data-theme="dark"]) .eu-projects-section {
        background-color: #1a1f26 !important;
        border-color: #3d4652;
    }

    :where(html[data-theme="dark"]) .eu-project-card {
        background: #242b35 !important;
        border-color: #3d4652 !important;
        box-shadow: var(--p-shadow-2);
    }

    :where(html[data-theme="dark"]) .eu-project-card h3 {
        color: #f0f6fc !important;
    }

    :where(html[data-theme="dark"]) .eu-project-card p {
        color: #b0bac5 !important;
    }

    :where(html[data-theme="dark"]) .eu-project-card .finance-grid {
        border-top-color: #3d4652;
    }

    :where(html[data-theme="dark"]) .eu-project-card .finance-item span {
        color: #a1b0bd !important;
    }

    :where(html[data-theme="dark"]) .eu-project-card .finance-item strong {
        color: #f0f6fc !important;
    }

    :where(html[data-theme="dark"]) .eu-project-card .hashtag {
        color: #a9d98d !important;
    }

    /* Karty kroków serwisowych pozostają białe — wymuszamy ciemny tekst także w boldach */
    :where(html[data-theme="dark"]) .subpage-content .service-step strong,
    :where(html[data-theme="dark"]) .subpage-content .service-step b {
        color: #0b1926 !important;
    }


/* --- Siatki dwukolumnowe: elementy nie mogą rozpychać kontenera --- */
.grid-layout-1-1 > *,
.grid-layout-2-1 > *,
.grid-layout-dominant-image > * {
    min-width: 0;
}

/* --- Mobile: karty Funduszy UE bez przycinania po prawej --- */
@media (max-width: 679px) {
    .eu-project-card {
        padding: 26px;
    }

    .eu-project-card h3 {
        font-size: 1.3rem;
        margin-bottom: 16px;
    }

    .eu-project-card p {
        margin-bottom: 24px;
    }

    .eu-project-card .finance-grid {
        grid-template-columns: 1fr;
        gap: 14px;
        padding-top: 22px;
    }

    .eu-project-card .finance-item strong {
        white-space: normal;
        font-size: 1.15rem;
    }

    .eu-project-card .hashtags {
        gap: 8px;
        margin-top: 18px;
    }
}

/* --- Przełącznik motywu jasny/ciemny w nagłówku --- */
.theme-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    flex: 0 0 auto;
    width: 56px;
    height: 30px;
    padding: 0 6px;
    margin-left: 28px;
    border: 1px solid #d9e2ea;
    border-radius: 999px;
    background: #eef3f7;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.theme-toggle::after {
    content: "";
    position: absolute;
    inset: -8px -6px;
}

.theme-toggle-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(11, 25, 38, 0.2);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.3s ease;
}

.theme-toggle-icon {
    position: relative;
    z-index: 1;
    display: inline-flex;
    width: 14px;
    height: 14px;
    color: #7d8b98;
    transition: color 0.3s ease;
}

.theme-toggle-icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

.theme-toggle-icon--sun {
    color: #b87a12;
}

html[data-theme="dark"] .theme-toggle {
    background: #12283c;
    border-color: #33475b;
}

html[data-theme="dark"] .theme-toggle-knob {
    transform: translateX(26px);
    background: #f0f6fc;
}

html[data-theme="dark"] .theme-toggle-icon--sun {
    color: #8fa0b0;
}

html[data-theme="dark"] .theme-toggle-icon--moon {
    color: #0b1926;
}

.theme-toggle:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 3px;
}

@media (hover: hover) {
    .theme-toggle:hover {
        border-color: rgba(224, 43, 32, 0.45);
    }
}

@media (min-width: 993px) {
    .nav-links {
        margin-left: auto;
    }
}

@media (max-width: 992px) {
    .theme-toggle {
        order: 1;
        margin-left: auto;
        margin-right: 8px;
        width: 50px;
        height: 28px;
        padding: 0 5px;
    }

    .theme-toggle-knob {
        width: 22px;
        height: 22px;
    }

    html[data-theme="dark"] .theme-toggle-knob {
        transform: translateX(22px);
    }

    .mobile-menu-toggle {
        order: 2;
    }
}
