/* ============================================================================
 * ECG-specific overrides nad RunOK template.
 * Drobne tweaki typografii, spacing i akcentów żeby template wygląda jak ECG,
 * a nie generic agencyjny landing.
 * ========================================================================== */

/* Fix horizontal scroll — RunOK #sidebar-area (offcanvas) wystaje poza viewport.
   UWAGA: overflow-x:hidden na html/body PSUJE position:sticky w childrach
   (tworzy implicit scrolling container). Zamiast tego uzywamy overflow-x:clip
   ktore robi to samo dla x-overflow ale NIE blokuje sticky positioning. */
html, body {
    overflow-x: clip;
    max-width: 100vw;
}

/* Force dark mode bezwarunkowo — niezależnie od data-theme attribute.
   RunOK ma JS który auto-przełącza motyw na podstawie localStorage / prefers-color-scheme,
   co potrafi zostawić stronę w light mode (białe BG sekcji bez własnego dark BG, np. newsletter, kontakt).
   Dlatego forsujemy ciemne tło na html + body bez selektora data-theme. */
html,
html body {
    background-color: #02050A !important;
    color: rgba(255, 255, 255, 0.85);
}

/* ECG logo text-mark (placeholder zanim klient da finalne logo) */
.ecg-logo-text {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.ecg-logo-mark {
    display: inline-block;
    padding: 6px 12px;
    background: var(--ecg-accent, #3F5AF3);
    color: #fff;
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: 0.08em;
    border-radius: 6px;
    box-shadow: 0 0 24px rgba(63, 90, 243, 0.3);
}

/* Hide theme-toggle button — nie potrzebujemy switchera w iter 2.
   Klient może go włączyć później jeśli chce (decyzja produktowa). */
#theme-toogle { display: none !important; }

/* Sekcje bez własnego dark BG mogą domyślnie pokazywać białe tło z RunOK CSS.
   Wymuszam przezroczystość żeby body bg dominował. */
.newsletter-section,
.contact-section,
.ecg-newsletter,
.ecg-contact,
.sponsor-section-6,
.sponsor-section,
.about-section-2,
.ecg-pain-promise,
.ecg-segments-section,
.ecg-quote-section,
.ecg-cases-section,
.project-section {
    background-color: transparent !important;
}

/* Container-level white backgrounds + bordery wewnątrz sekcji (RunOK light styles) */
.ecg-contact .contact-content,
.ecg-contact .blog-contact-form,
.ecg-contact .blog-contact-form.form-2,
.ecg-contact .request-form {
    background-color: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
}

/* "bg-text" watermark (np. "NEWSLETTER" za nagłówkiem) — w dark mode subtle, nie pełny biały */
.section-heading .bg-text,
.ecg-newsletter .bg-text {
    color: rgba(255, 255, 255, 0.04) !important;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.06);
}

/* Tytuły kontaktu (EMAIL / GODZINY / LOKALIZACJA) — wymuszamy biały bo RunOK nadpisuje na ciemny */
.ecg-contact .list-item .title { color: #fff !important; }
.ecg-contact .list-item .content span,
.ecg-contact .list-item .content a { color: rgba(255, 255, 255, 0.75) !important; }
.ecg-contact .list-item .content a:hover { color: var(--ecg-accent) !important; }
.ecg-contact .section-heading p { color: rgba(255, 255, 255, 0.7); }

/* Form fields w kontakcie — RunOK domyślnie jasne; wymuszam dark variant */
.ecg-contact-form .form-control,
.ecg-contact-form .ecg-select,
.ecg-contact-form .form-control:focus,
.ecg-contact-form textarea {
    background-color: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
}
.ecg-contact-form .form-control::placeholder,
.ecg-contact-form textarea::placeholder { color: rgba(255, 255, 255, 0.4) !important; }

/* Newsletter form input override — analogicznie */
.ecg-newsletter .newsletter-form .form-control {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
}
.ecg-newsletter .newsletter-form .form-control::placeholder { color: rgba(255, 255, 255, 0.4) !important; }

/* Nice-select dropdown (RunOK plugin auto-applies na select.form-control) — dark mode */
.ecg-contact-form .nice-select {
    background-color: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: rgba(255, 255, 255, 0.85) !important;
    height: 50px !important;
    line-height: 48px !important;
    padding: 0 38px 0 18px !important;
    border-radius: 10px !important;
    font-size: 0.9375rem !important;
    margin-bottom: 12px;
}
.ecg-contact-form .nice-select::after {
    border-color: rgba(255, 255, 255, 0.55) !important;
    right: 18px !important;
}
.ecg-contact-form .nice-select.open {
    border-color: rgba(63, 90, 243, 0.5) !important;
}
.ecg-contact-form .nice-select .list {
    background-color: #0A0E18 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 10px !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6) !important;
    width: 100% !important;
    margin-top: 6px !important;
    padding: 6px 0 !important;
    max-height: 280px !important;
    overflow-y: auto !important;
}
.ecg-contact-form .nice-select .option {
    color: rgba(255, 255, 255, 0.78) !important;
    background-color: transparent !important;
    padding: 10px 18px !important;
    line-height: 1.4 !important;
    min-height: auto !important;
}
.ecg-contact-form .nice-select .option:hover,
.ecg-contact-form .nice-select .option.focus,
.ecg-contact-form .nice-select .option.selected.focus,
.ecg-contact-form .nice-select .option.selected {
    background-color: rgba(63, 90, 243, 0.18) !important;
    color: #fff !important;
}
.ecg-contact-form .nice-select .current { color: rgba(255, 255, 255, 0.85) !important; }

/* Section headings — wymuszamy white na nagłówkach sekcji (RunOK light styles override) */
section h2.section-title,
section .section-heading h2 { color: #fff !important; }
section .section-heading p { color: rgba(255, 255, 255, 0.65); }

/* Process section — tytuły kroków na ciemnym tle, RunOK je przyciemnia */
.ecg-process-card .ecg-process-title { color: #fff !important; }

/* Sticky obszary 6c — wymuszamy bialy na tytule prawej kolumny (RunOK ma h3 ciemny) */
.ecg-areas-detail-title,
.ecg-areas-detail h3 { color: #fff !important; }
.ecg-areas-detail-desc,
.ecg-areas-detail p { color: rgba(255, 255, 255, 0.75) !important; }

/* Case carousel cards titles */
.ecg-case-card .ecg-case-title,
.ecg-case-card h4 { color: #fff !important; }
.ecg-case-card p { color: rgba(255, 255, 255, 0.7) !important; }

/* Stats labels */
.ecg-stat-number { color: #fff !important; }
.ecg-stat-label { color: rgba(255, 255, 255, 0.65) !important; }

/* FAQ accordion */
.ecg-faq-content .accordion-button { color: #fff !important; }
.ecg-faq-content .accordion-body p { color: rgba(255, 255, 255, 0.7) !important; }

/* Cytat foundera — RunOK ma blockquote { display: grid; background: ...; padding: ... }
   co rozklada <p> i <footer> obok siebie + dodaje pudelko. Wymuszam czysty layout. */
.ecg-quote {
    display: block !important;
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    border-left: none !important;
    box-shadow: none !important;
}
.ecg-quote p,
.ecg-quote footer {
    display: block !important;
    text-align: center !important;
    width: 100%;
    max-width: none;
    background: transparent !important;
}

/* Hero — typografia bardziej zbalansowana, żeby SVG miało miejsce */
.ecg-hero-title {
    font-size: clamp(2rem, 4vw, 3.75rem) !important;
    color: #fff !important;
}
.ecg-hero-sub { color: rgba(255, 255, 255, 0.7) !important; }
.ecg-hero-row { min-height: auto !important; align-items: center; }
.ecg-hero-svg-wrap { min-height: 600px; }

/* Light-mode overrides w ecg-hero-svg.css aplikuja sie gdy data-theme=light,
   ktory RunOK JS wlacza domyslnie. Wymuszamy biale na hero niezaleznie. */
[data-theme="light"] .ecg-hero-title,
[data-theme="dark"] .ecg-hero-title { color: #fff !important; }
[data-theme="light"] .ecg-hero-sub,
[data-theme="dark"] .ecg-hero-sub { color: rgba(255, 255, 255, 0.7) !important; }
[data-theme="light"] .ecg-quote,
[data-theme="dark"] .ecg-quote { color: #fff !important; }
[data-theme="light"] .ecg-pain-item p,
[data-theme="dark"] .ecg-pain-item p { color: rgba(255, 255, 255, 0.85) !important; }
[data-theme="light"] .ecg-promise-item .title,
[data-theme="dark"] .ecg-promise-item .title { color: #fff !important; }
[data-theme="light"] .ecg-promise-item .content p,
[data-theme="dark"] .ecg-promise-item .content p { color: rgba(255, 255, 255, 0.65) !important; }

/* Radial section background — pewność że ciemne */
.ecg-radial-section { background-color: var(--ecg-bg-2, #0A0E18); }
.ecg-services-section { background-color: var(--ecg-bg-2, #0A0E18); }
.ecg-process-section { background-color: var(--ecg-bg-1, #02050A); }

/* Pricing/services sekcje z templatu — nadpisz potencjalny white BG container */
.ecg-services-section .ecg-service-card {
    background-color: rgba(255, 255, 255, 0.03);
}
.ecg-services-section .ecg-service-card-featured {
    background: linear-gradient(180deg, rgba(63, 90, 243, 0.12) 0%, rgba(63, 90, 243, 0.04) 100%);
}

/* Disable RunOK's gsap scroll-smoother — używamy natywnego scrolla.
   Bez tego override #smooth-wrapper jest position:fixed z overflow:hidden i ucina
   wszystkie sekcje pod hero. */
#smooth-wrapper {
    position: static !important;
    overflow: visible !important;
    height: auto !important;
    width: auto !important;
}
#smooth-content {
    transform: none !important;
    height: auto !important;
}

/* Polskie znaki diakrytyczne lepiej w Inter / system stack niż w domyślnym templatowym font-family.
   RunOK używa noto_sans gdzieś — zostawiam, ale dodaję fallback. */
body {
    font-family: 'Inter', 'Noto Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Sponsor section header — w templacie h4, my chcemy bardziej subtle */
.sponsor-section-6 .sponsor-header .title {
    font-size: clamp(1.5rem, 2.4vw, 2rem);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
    margin: 0 0 48px;
}

.sponsor-section-6 .sponsor-card img {
    max-height: 56px;
    opacity: 0.7;
    transition: opacity 200ms ease;
    filter: brightness(0) invert(1); /* białe logo na ciemnym tle */
}
.sponsor-section-6 .sponsor-card:hover img { opacity: 1; }

/* Bring back proper RunOK accent color (niebieski jak w designie klienta) */
:root {
    --ecg-accent: #3F5AF3;
}

.section-heading .sub-heading {
    color: var(--ecg-accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.875rem;
    font-weight: 600;
}
.section-heading .section-title {
    color: #fff;
    font-size: clamp(1.75rem, 3vw, 2.75rem);
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 12px 0 0;
}

/* Primary button override — RunOK ma .rr-primary-btn z gradientem, my chcemy solid niebieski */
.rr-primary-btn {
    background: var(--ecg-accent);
    border: none;
    color: #fff;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: background 200ms ease, transform 200ms ease;
}
.rr-primary-btn:hover {
    background: #2d46d4;
    color: #fff;
    transform: translateY(-1px);
}

/* Header — backdrop blur na sticky żeby było jak na nowoczesnych saasach */
.header.sticky-active.sticky,
.header.inner-header.sticky-active {
    background: rgba(2, 5, 10, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Footer — drobny tweak żeby linki w copyright były jaśniejsze */
.footer-section .copyright-area p a {
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    margin: 0 4px;
}
.footer-section .copyright-area p a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Newsletter form w footerze — match dark mode */
.footer-form .form-control {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
}
.footer-form .form-control::placeholder { color: rgba(255, 255, 255, 0.4); }
.footer-form .submit { background: var(--ecg-accent); }
