/* ============================================================================
 * ECG hero — inline SVG composition + hover-on-area + floating HTML labels.
 * Sekcja 1B (cytat) i sekcja 2 (Diagnoza vs Obietnica) też tu — to są style
 * "intro" landingu (od hero do split column), zanim wskoczymy w "ecg-sections".
 * ========================================================================== */

.ecg-hero {
    padding: 120px 0 60px;
    overflow: hidden;
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.ecg-hero-row {
    align-items: center;
    flex-wrap: nowrap; /* na desktop nigdy nie zawijamy */
}

/* --- LEFT column (headline + subcopy + CTA) --- */
.ecg-hero-content {
    padding-right: 40px;
    flex: 0 0 42%;
    max-width: 42%;
}

.ecg-hero-title {
    font-family: var(--bs-font-sans-serif, 'Inter', system-ui, sans-serif);
    font-size: clamp(2.5rem, 5.6vw, 5.5rem);
    line-height: 1.05;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 32px;
    color: #fff;
}

.ecg-hero-sub {
    font-size: clamp(1rem, 1.2vw, 1.125rem);
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.65);
    margin: 0 0 40px;
    max-width: 480px;
}

.ecg-hero-cta { display: inline-flex; align-items: center; gap: 12px; }

/* --- RIGHT column: SVG composition + floating labels --- */
.ecg-hero-svg-wrap {
    position: relative;
    width: 100%;
    flex: 0 0 58%;
    max-width: 58%;
}

.ecg-hero-svg {
    display: block;
    width: 100%;
    height: auto;
    max-width: 760px;
    margin-left: auto;
}

.svg-shape {
    transition:
        opacity 360ms cubic-bezier(0.22, 1, 0.36, 1),
        transform 360ms cubic-bezier(0.22, 1, 0.36, 1),
        filter 360ms ease;
    transform-origin: center;
    transform-box: fill-box;
}

.svg-fill {
    fill: #1E5BFF;
    stroke: none;
    opacity: 0.85;
}

.svg-stroke {
    /* fill: transparent (nie 'none') zeby caly obszar shape'u lapal hover, nie tylko stroke */
    fill: transparent;
    stroke: #3F5AF3;
    stroke-width: 2;
    opacity: 0.7;
    pointer-events: all;
}
.svg-fill, .svg-hub { pointer-events: all; }
.svg-area { pointer-events: bounding-box; }

.svg-hub {
    fill: #3F5AF3;
    opacity: 0.95;
}

.svg-area { cursor: pointer; outline: none; }
.svg-area:focus-visible { outline: 2px solid #3F5AF3; outline-offset: 4px; }

/* HOVER ON AREA — gdy któraś grupa jest aktywna, dim niepowiązanych */
.ecg-hero-svg:has(.svg-area:hover) .svg-area:not(:hover) .svg-shape,
.ecg-hero-svg:has(.svg-area:focus-visible) .svg-area:not(:focus-visible) .svg-shape,
.ecg-hero-svg.is-area-active .svg-area:not(.is-active) .svg-shape {
    opacity: 0.18;
    filter: grayscale(0.55) brightness(0.7);
}

/* Aktywna grupa */
.svg-area:hover .svg-fill,
.svg-area:focus-visible .svg-fill,
.svg-area.is-active .svg-fill {
    opacity: 1;
    filter: brightness(1.15) drop-shadow(0 0 18px rgba(63, 90, 243, 0.45));
}
.svg-area:hover .svg-stroke,
.svg-area:focus-visible .svg-stroke,
.svg-area.is-active .svg-stroke {
    opacity: 1;
    stroke-width: 2.5;
    filter: drop-shadow(0 0 12px rgba(63, 90, 243, 0.4));
}
.svg-area:hover .svg-shape,
.svg-area:focus-visible .svg-shape,
.svg-area.is-active .svg-shape {
    transform: scale(1.04);
}

/* --- Floating labels (HTML, position absolute over SVG) --- */
.ecg-label {
    position: absolute;
    padding: 10px 18px;
    border-radius: 10px;
    background: rgba(20, 22, 30, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    font-family: var(--bs-font-sans-serif, 'Inter', system-ui, sans-serif);
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.3;
    cursor: pointer;
    z-index: 3;
    transition:
        opacity 220ms ease,
        transform 240ms cubic-bezier(0.22, 1, 0.36, 1),
        background 200ms ease,
        border-color 200ms ease,
        box-shadow 240ms ease;
    white-space: nowrap;
}
.ecg-label:hover,
.ecg-label:focus-visible,
.ecg-label.is-active {
    transform: translateY(-2px);
    background: rgba(28, 32, 44, 0.95);
    border-color: rgba(63, 90, 243, 0.5);
    box-shadow: 0 8px 24px rgba(63, 90, 243, 0.22);
    outline: none;
}
.ecg-label.is-dim { opacity: 0.35; }

.label-omnira    { top: 4%;  right: 6%;  }
.label-interim   { top: 6%;  left: 8%;   }
.label-ems       { top: 48%; right: 0;   }
.label-strategia { top: 60%; left: 4%;   }
.label-doradztwo { bottom: 4%; right: 4%; }

/* ============================================================================
 * Sekcja 1B — pojedynczy cytat foundera (redesign — eleganckie spacing)
 * ========================================================================== */
.ecg-quote-section { text-align: center; padding: 60px 0 100px; }

.ecg-quote-icon {
    color: var(--ecg-accent, #3F5AF3);
    margin: 0 auto 32px;
    display: inline-block;
    opacity: 0.85;
    filter: drop-shadow(0 0 24px rgba(63, 90, 243, 0.35));
}
.ecg-quote-icon svg { width: 56px; height: 42px; }

.ecg-quote {
    font-family: var(--bs-font-sans-serif, 'Inter', system-ui, sans-serif);
    font-size: clamp(1.5rem, 2.6vw, 2.5rem);
    line-height: 1.3;
    font-weight: 400;
    letter-spacing: -0.01em;
    color: #fff;
    margin: 0 auto;
    max-width: 820px;
    border: none;
    padding: 0;
}
.ecg-quote p {
    margin: 0 0 32px;
    font-style: italic;
}
.ecg-quote footer {
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    position: relative;
    padding-top: 24px;
}
.ecg-quote footer::before {
    content: "";
    display: block;
    width: 40px;
    height: 1px;
    background: var(--ecg-accent, #3F5AF3);
    margin: 0 auto 24px;
    opacity: 0.5;
}
.ecg-quote cite { font-style: normal; }

/* ============================================================================
 * Sekcja 2 — Diagnoza vs Obietnica (split column)
 * ========================================================================== */
.ecg-pain-promise .section-heading { margin-bottom: 32px; }

.ecg-pain-list {
    list-style: none; padding: 0; margin: 0;
    display: flex; flex-direction: column; gap: 16px;
}
.ecg-pain-item {
    display: flex; align-items: flex-start; gap: 16px;
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    transition: background 200ms ease, border-color 200ms ease, transform 200ms ease;
}
.ecg-pain-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(63, 90, 243, 0.3);
    transform: translateX(4px);
}
.ecg-pain-marker {
    font-family: Georgia, serif; font-size: 2.5rem; line-height: 1;
    color: #3F5AF3; flex-shrink: 0; margin-top: -6px;
}
.ecg-pain-item p {
    margin: 0; font-size: 1.0625rem; line-height: 1.5;
    color: rgba(255, 255, 255, 0.85); font-style: italic;
}

.ecg-promise-items { display: flex; flex-direction: column; gap: 24px; margin-bottom: 32px; }
.ecg-promise-item { display: flex; align-items: flex-start; gap: 18px; }
.ecg-promise-item .icon {
    flex-shrink: 0; width: 56px; height: 56px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(63, 90, 243, 0.12); border-radius: 12px;
    color: var(--ecg-accent, #3F5AF3);
    font-size: 1.5rem;
}
.ecg-promise-item .icon img { width: 30px; height: 30px; object-fit: contain; }
.ecg-promise-item .icon i { color: var(--ecg-accent, #3F5AF3); }
.ecg-promise-item .title { margin: 0 0 6px; font-size: 1.125rem; color: #fff; }
.ecg-promise-item .content p { margin: 0; color: rgba(255, 255, 255, 0.65); font-size: 0.9375rem; line-height: 1.5; }

/* ============================================================================
 * Mobile fallback (≤ 991px)
 * ========================================================================== */
@media (max-width: 991px) {
    .ecg-hero {
        padding-top: 100px;
        min-height: auto;
        display: block;
    }
    .ecg-hero-row { flex-wrap: wrap; }
    .ecg-hero-content,
    .ecg-hero-svg-wrap {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .ecg-hero-content { padding-right: 0; margin-bottom: 48px; }

    .ecg-hero-svg-wrap { margin-top: 24px; }
    .ecg-hero-svg { max-width: 100%; }

    .ecg-label {
        position: relative;
        top: auto !important; left: auto !important;
        right: auto !important; bottom: auto !important;
        display: inline-block;
        margin: 6px 4px;
        white-space: normal;
    }

    .ecg-hero-svg .svg-area:not(:hover) .svg-shape {
        opacity: 0.85; filter: none; transform: none;
    }
    .ecg-hero-svg .svg-stroke { opacity: 0.7; }
}

@media (max-width: 575px) {
    .ecg-hero-title { font-size: 2.25rem; }
    .ecg-pain-item { padding: 16px 18px; }
}

/* ============================================================================
 * Light mode override
 * ========================================================================== */
[data-theme="light"] .ecg-hero-title { color: #0a0a14; }
[data-theme="light"] .ecg-hero-sub { color: rgba(10, 10, 20, 0.65); }
[data-theme="light"] .ecg-label {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(10, 10, 20, 0.08);
    color: #0a0a14;
}
/* light-mode overrides celowo nieaktywne — strona w pełnym dark mode wymuszonym */
[data-theme="light"] .ecg-quote,
[data-theme="dark"] .ecg-quote { color: #fff; }
[data-theme="light"] .ecg-quote footer,
[data-theme="dark"] .ecg-quote footer,
[data-theme="light"] .ecg-quote cite,
[data-theme="dark"] .ecg-quote cite { color: rgba(255, 255, 255, 0.5) !important; }
[data-theme="light"] .ecg-pain-item {
    background: rgba(10, 10, 20, 0.03);
    border-color: rgba(10, 10, 20, 0.06);
}
[data-theme="light"] .ecg-pain-item p { color: rgba(10, 10, 20, 0.85); }
[data-theme="light"] .ecg-promise-item .title { color: #0a0a14; }
[data-theme="light"] .ecg-promise-item .content p { color: rgba(10, 10, 20, 0.65); }
