/********** Template CSS **********/
:root {
    --primary: #EB1616;
    --secondary: #191C24;
    --light: #6C7293;
    --dark: #000000;
}

.back-to-top {
    position: fixed;
    display: none;
    right: 45px;
    bottom: 45px;
    z-index: 99;
}


/*** Spinner ***/
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}


/*** Button ***/
.btn {
    font-weight: 500;
    transition: .5s;
}

.btn-square {
    width: 38px;
    height: 38px;
}

.btn-sm-square {
    width: 32px;
    height: 32px;
}

.btn-lg-square {
    width: 48px;
    height: 48px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
}




/* Dark-reading mode ograniczony do .article  */
.article {
    /* kolory i typografia */
    --surface: #13151a; /* tło artykułu */
    --surface-2: #181b21; /* ciut jaśniejszy dla boxów */
    --surface-3: #0e1014; /* ciemniejszy dla code */
    --text: #e8e9ed; /* główny tekst */
    --muted: #a4a9b2; /* meta, podpisy */
    --heading: #f5f7fa;
    --link: #8bb6ff; /* linki */
    --visited: #c79cff;
    --accent: #ff463a; /* możesz zbliżyć do brandu */

    --font-size: clamp(17px, 1.2vw + 14px, 20px);
    --line: 1.7;
    --max-line: 70ch;
    color: var(--text);
    background: var(--surface);
    font: normal var(--font-size)/var(--line) system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Inter, "Helvetica Neue", Arial, sans-serif;
    /* layout czytelniczy */
    max-width: var(--max-line);
    margin: 24px auto;
    padding: clamp(18px, 3.2vw, 28px);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.35), 0 1px 0 rgba(255,255,255,0.03) inset;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    font-kerning: normal;
    font-variant-ligatures: common-ligatures;
    font-feature-settings: "kern","liga","clig","calt";
}

    /* Akapity */
    .article p {
        margin: 0 0 1em;
        letter-spacing: 0.0025em;
        text-wrap: pretty;
        hyphens: auto;
        color: var(--text);
    }

    /* Nagłówki */
    .article h1, .article h2, .article h3, .article h4 {
        color: var(--heading);
        line-height: 1.22;
        letter-spacing: -0.01em;
        text-wrap: balance;
        margin: 1.2em 0 0.45em;
        font-weight: 760;
    }

    .article h1 {
        font-size: clamp(28px, 2.2vw + 20px, 44px);
    }

    .article h2 {
        font-size: clamp(22px, 1.4vw + 16px, 32px);
    }

    .article h3 {
        font-size: clamp(19px, 1.0vw + 14px, 26px);
    }

    /* Listy */
    .article ul, .article ol {
        padding-left: 1.2em;
        margin: 0 0 1em;
    }

    .article li {
        margin: 0.35em 0;
        line-height: 1.6;
    }

    /* Linki */
    .article a {
        color: var(--link);
        text-decoration: underline;
        text-underline-offset: 3px;
        text-decoration-thickness: 1.5px;
    }

        .article a:visited {
            color: var(--visited);
        }

        .article a:hover {
            text-decoration-thickness: 2px;
        }

    /* Cytaty */
    .article blockquote {
        margin: 1.2em 0;
        padding: 0.9em 1.1em;
        background: var(--surface-2);
        border-left: 4px solid color-mix(in oklab, var(--link) 55%, var(--heading));
        border-radius: 8px;
    }

    /* Meta, podpisy */
    .article .post-meta, .article figcaption, .article .caption {
        color: var(--muted);
        font-size: 0.92em;
        line-height: 1.45;
    }

    /* Obrazy, media */
    .article img, .article video, .article svg, .article canvas {
        max-width: 100%;
        height: auto;
        border-radius: 6px;
    }

    /* Tabele */
    .article table {
        width: 100%;
        border-collapse: collapse;
        margin: 1em 0;
        background: var(--surface-2);
        border-radius: 8px;
        overflow: hidden;
    }

    .article th, .article td {
        padding: 0.7em 0.8em;
        border-bottom: 1px solid rgba(255,255,255,0.06);
    }

    .article th {
        color: var(--heading);
        text-align: left;
    }

    /* Kod */
    .article code, .article kbd, .article samp {
        font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
        font-size: 0.95em;
    }

    .article pre {
        overflow: auto;
        padding: 1em 1.1em;
        background: var(--surface-3);
        border: 1px solid rgba(255,255,255,0.06);
        border-radius: 10px;
    }

    /* Drobne poprawki rytmu */
    .article p + h2, .article p + h3 {
        margin-top: 1.6em;
    }

    .article hr {
        border: none;
        border-top: 1px solid rgba(255,255,255,0.08);
        margin: 2rem 0;
    }

    .article * {
        overflow-wrap: anywhere;
    }

    /* Opcjonalnie: pill dla „czas czytania”, tagów itp. */
    .article .badge, .article .pill {
        background: var(--surface-2);
        border: 1px solid rgba(255,255,255,0.08);
        color: var(--muted);
        padding: 0.2em 0.6em;
        border-radius: 999px;
        font-size: 0.85em;
    }

    /* Jeżeli tytuł używa brandowej czerwieni, zostaw – ale lekko ściśnij tracking */
    .article .brand-accent,
    .article h1 .accent {
        color: var(--accent);
        letter-spacing: -0.012em;
    }



/*** Navbar ***/
.navbar .dropdown-toggle::after {
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    vertical-align: middle;
    margin-left: 8px;
}

.navbar .navbar-nav .nav-link {
    margin-right: 30px;
    padding: 40px 0;
    color: var(--light);
    font-family: 'Oswald', sans-serif;
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    outline: none;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
    color: var(--primary);
}

.navbar.sticky-top {
    top: -100px;
    transition: .5s;
}

@media (max-width: 991.98px) {
    .navbar .navbar-nav .nav-link,
    .navbar.shadow-sm .navbar-nav .nav-link {
        margin-right: 0;
        padding: 10px 0;
    }

    .navbar .navbar-nav {
        margin-top: 8px;
        border-top: 1px solid var(--light);
    }
}

@media (min-width: 992px) {
    .navbar.shadow-sm .navbar-nav .nav-link {
        padding: 20px 0;
    }

    .navbar .nav-item .dropdown-menu {
        display: block;
        border: none;
        margin-top: 0;
        top: 150%;
        opacity: 0;
        visibility: hidden;
        transition: .5s;
    }

    .navbar .nav-item:hover .dropdown-menu {
        top: 100%;
        visibility: visible;
        transition: .5s;
        opacity: 1;
    }
}


/*** Header ***/
.carousel-caption {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, .85);
    z-index: 1;
}

.carousel-control-prev,
.carousel-control-next {
    width: 10%;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
}

@media (max-width: 768px) {
    #header-carousel .carousel-item {
        position: relative;
        min-height: 450px;
    }
    
    #header-carousel .carousel-item img {
        position: absolute;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

.page-header {
    background: linear-gradient(rgba(0, 0, 0, .85), rgba(0, 0, 0, .85)), url(../img/carousel-1.jpg) center center no-repeat;
    background-size: cover;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--light);
}


/*** Service ***/
.service-item .btn {
    position: absolute;
    right: -50px;
    bottom: -50px;
    width: 50px;
    height: 50px;
    color: var(--primary);
    background: var(--dark);
    opacity: 0;
}

.service-item:hover .btn {
    right: 0;
    bottom: 0;
    opacity: 1;
}


/*** Team ***/
.team-item .team-img::before,
.team-item .team-img::after {
    position: absolute;
    content: "";
    width: 0;
    height: 100%;
    top: 0;
    left: 0;
    background: rgba(0, 0, 0, .85);
    transition: .5s;
}

.team-item .team-img::after {
    left: auto;
    right: 0;
}

.team-item:hover .team-img::before,
.team-item:hover .team-img::after {
    width: 50%;
}

.team-item .team-img .team-social {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .5s;
    z-index: 3;
    opacity: 0;
}

.team-item:hover .team-img .team-social {
    transition-delay: .3s;
    opacity: 1;
}

.team-item .team-social .btn {
    display: inline-flex;
    margin: 0 3px;
    color: var(--primary);
    background: var(--dark);
}

.team-item .team-social .btn:hover {
    color: #FFFFFF;
    background: var(--primary);
}


/*** Testimonial ***/
.testimonial-carousel {
    max-width: 700px;
    margin: 0 auto;
}

.testimonial-carousel .owl-dots {
    margin-top: 35px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.testimonial-carousel .owl-dots .owl-dot {
    width: 60px;
    height: 60px;
    margin: 0 5px;
    padding: 10px;
    background: var(--secondary);
    transition: .5s;
}

.testimonial-carousel .owl-dots .owl-dot.active {
    width: 100px;
    height: 100px;
}

.testimonial-carousel .owl-dots .owl-dot img {
    opacity: .1;
    transition: .5s;
}

.testimonial-carousel .owl-dots .owl-dot.active img {
    opacity: 1;
}


/*** Footer ***/
.footer .btn.btn-link {
    display: block;
    margin-bottom: 5px;
    padding: 0;
    text-align: left;
    color: var(--light);
    font-size: 15px;
    font-weight: normal;
    text-transform: capitalize;
    transition: .3s;
}

.footer .btn.btn-link::before {
    position: relative;
    content: "\f105";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 10px;
}

.footer .btn.btn-link:hover {
    color: var(--primary);
    letter-spacing: 1px;
    box-shadow: none;
}

.footer .copyright {
    padding: 1.5rem;
    font-size: 15px;
    background: var(--dark);
}

.footer .copyright a {
    color: var(--light);
}

.footer .copyright a:hover {
    color: var(--primary);
}