/*** Spinner Start ***/
#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;
}
/*** Spinner End ***/

.back-to-top {
    position: fixed;
    right: 30px;
    bottom: 30px;
    transition: 0.5s;
    z-index: 99;
}


/*** Button Start ***/
.btn {
    font-weight: 600;
    transition: .5s;
}

.btn-square {
    width: 32px;
    height: 32px;
}

.btn-sm-square {
    width: 34px;
    height: 34px;
}

.btn-md-square {
    width: 40px;
    height: 40px;
}

.btn-lg-square {
    width: 46px;
    height: 46px;
}

.btn-xl-square {
    width: 56px;
    height: 56px;
}

.btn-square,
.btn-sm-square,
.btn-md-square,
.btn-lg-square,
.btn-xl-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
}

.btn.btn-primary {
    color: var(--bs-white);
    border: none;
}

.btn.btn-primary:hover {
    background: var(--bs-dark);
    color: var(--bs-white);
}

.btn.btn-light {
    color: var(--bs-primary);
    border: none;
}

.btn.btn-light:hover {
    color: var(--bs-white);
    background: var(--bs-primary);
}

/*** Navbar Start ***/
.header-top .topbar .dropdown-toggle::after {
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 600;
    vertical-align: middle;
    margin-left: 8px;
    color: var(--bs-primary);
}

.header-top .topbar .dropdown .dropdown-menu {
    transform: rotateX(0deg);
    visibility: visible;
    background: var(--bs-light);
    padding-top: 12px;
    border: 0;
    transition: .5s;
    opacity: 1;
}

.header-top {
    height: 125px;
    position: relative;
}

.header-top::after {
    content: "";
    position: absolute;
    overflow: hidden;
    width: 16%;
    height: 100%;
    top: 0;
    left: 0;
    background: var(--bs-dark);
    z-index: 1;
}

@media (min-width: 992px) {
    .header-top::before {
        content: "";
        position: absolute;
        overflow: hidden;
        width: 100%;
        height: 45px;
        top: 0;
        right: 0;
        background: var(--bs-dark);
        z-index: -1;
    }

    .navbar-brand-2 {
        display: none;
    }
}

@media (max-width: 991px) {
    .header-top {
        max-height: 80px;
    }

    .navbar {
        justify-content: space-between;
    }

    .header-top .container {
        max-height: 80px;
    }

    .navbar-brand {
        display: none;
    }

    .navbar-brand-2 {
        position: relative;
        overflow: hidden;
        width: 200px;
        height: 100%;
        padding: 0;
        display: flex;
        align-items: center;
        z-index: 99;
    }

    .navbar-brand-2::before {
        content: "";
        position: absolute;
        overflow: hidden;
        width: 100%;
        height: 600px;
        top: -200px;
        right: 18px;
        background: var(--bs-dark);
        transform: rotate(-18deg);
        z-index: -1;
    }

    .navbar-brand-2::after {
        content: "";
        position: absolute;
        overflow: hidden;
        width: 5px;
        height: 600px;
        top: -200px;
        right: 18px;
        background: var(--bs-primary);
        transform: rotate(-18deg);
        z-index: -1;
    }

    .navbar.navbar-light {
        height: 100%;
        padding: 0;
    }

    .navbar .navbar-collapse {
        margin-top: -20px;
    }

}

.nav-bar .navbar {
    z-index: 9;
}

.navbar-light .navbar-brand img {
    max-height: 60px;
    transition: .5s;
}

.nav-bar .navbar-light .navbar-brand img {
    max-height: 50px;
}

.navbar .navbar-nav .nav-item .nav-link {
    padding: 0;
}

.navbar .navbar-nav .nav-item {
    display: flex;
    align-items: center;
    padding: 0;
    margin-right: 20px;
}

.navbar-light .navbar-nav .nav-item:hover,
.navbar-light .navbar-nav .nav-item.active,
.navbar-light .navbar-nav .nav-item:hover .nav-link,
.navbar-light .navbar-nav .nav-item.active .nav-link {
    color: var(--bs-primary);
}

@media (max-width: 991px) {
    .navbar {
        padding: 20px 0;
    }

    .navbar .navbar-nav .nav-link {
        padding: 0;
    }

    .navbar .navbar-nav .nav-item {
        display: flex;
        padding: 12px;
        flex-direction: column;
        justify-content: start;
        align-items: start;
    }

    .navbar .navbar-nav .nav-btn {
        display: flex;
        justify-content: start;
    }

    .navbar .navbar-nav {
        width: 100%;
        display: flex;
        margin-top: 20px;
        padding-bottom: 20px;
        margin-left: 50px;
        background: var(--bs-light);
    }

    .navbar .navbar-nav .nav-btn {
        display: flex;
        flex-direction: column;
    }

    .navbar .navbar-nav .nav-btn a.btn {
        margin-right: 15px;
    }

    .navbar.navbar-expand-lg .navbar-toggler {
        padding: 8px 15px;
        border: 1px solid var(--bs-primary);
        color: var(--bs-primary);
    }
}

.navbar .dropdown-toggle::after {
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 600;
    vertical-align: middle;
    margin-left: 8px;
}

.dropdown .dropdown-menu .dropdown-item:hover {
    background: var(--bs-primary);
    color: var(--bs-white);
}

@media (min-width: 992px) {
    .navbar {
        padding: 20px 0;
    }

    .navbar .nav-btn {
        display: flex;
        align-items: center;
        justify-content: end;
    }

    .navbar .navbar-nav {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        background: var(--bs-light);
        border-radius: 10px;
    }

    .navbar .navbar-nav .nav-btn {
        width: 100%;
        display: flex;
        margin-left: auto;
    }

    .navbar .nav-item .dropdown-menu {
        display: block;
        visibility: hidden;
        top: 100%;
        transform: rotateX(-75deg);
        transform-origin: 0% 0%;
        border: 0;
        transition: .5s;
        opacity: 0;
    }

    .navbar .nav-item:hover .dropdown-menu {
        transform: rotateX(0deg);
        visibility: visible;
        margin-top: 19px;
        background: var(--bs-white);
        transition: .5s;
        opacity: 1;
    }

    .header-top .navbar-brand {
        position: relative;
        overflow: hidden;
        padding: 40px 50px 40px 0;
        z-index: 99;
    }
    
    .navbar-brand::before {
        content: "";
        position: absolute;
        overflow: hidden;
        width: 300px;
        height: 600px;
        top: -200px;
        right: 18px;
        background: var(--bs-dark);
        transform: rotate(-18deg);
        z-index: -1;
    }
    
    .navbar-brand::after {
        content: "";
        position: absolute;
        overflow: hidden;
        width: 5px;
        height: 600px;
        top: -200px;
        right: 18px;
        background: var(--bs-primary);
        transform: rotate(-18deg);
        z-index: -1;
    }
}
/*** Navbar End ***/


/*** Carousel Hero Header Start ***/
.hero-section {
    background-image: url(../img/carousel-1.jpg);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    width: 100%;
    height: 700px;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-bg-half-1 {
    background-image: url(../img/header-2.jpg);
    clip-path: polygon(37% 0%, 100% 0%, 100% 100%, 0% 100%);
    filter: grayscale(10%);
    transform: scale(100% - 50%);
    background-position: center right;
    background-repeat: no-repeat;
    background-size: cover;
    position: absolute;
    width: 58%;
    height: 100%;
    right: 0;
    top: 0;
}

.hero-bg-half-2 {
    background-image: url(../img/header-1.jpg);
    clip-path: polygon(37% 0%, 100% 0%, 100% 100%, 0% 100%);
    filter: grayscale(10%);
    transform: scale(100% - 50%);
    background-position: center right;
    background-repeat: no-repeat;
    background-size: cover;
    position: absolute;
    width: 58%;
    height: 100%;
    right: 0;
    top: 0;
}

.hero-shape-1 {
    background-color: var(--bs-primary);
    width: 150px;
    height: 50%;
    position: absolute;
    left: 54%;
    top: 0;
    transform: translateY(-50%) skew(-26deg, 0deg);
    position: relative;
}

.hero-shape-1:before {
    background-color: var(--bs-dark);
    content: "";
    width: 50%;
    height: 80%;
    position: absolute;
    right: 0;
    top: 0;
}

.hero-shape-2 {
    background-color: var(--bs-dark);
    width: 150px;
    height: 50%;
    position: absolute;
    right: -43%;
    bottom: 0;
    transform: translateY(50%) skew(-25deg, 0deg);
    position: relative;
    z-index: 1;
}

.hero-shape-2::after {
    background-color: var(--bs-primary);
    content: "";
    width: 75px;
    height: 80%;
    position: absolute;
    right: 0;
    bottom: 0;
}

/*** Carousel Hero Header Start ***/
.header-carousel .header-carousel-item {
    height: 700px;
}

.header-carousel .owl-nav .owl-prev,
.header-carousel .owl-nav .owl-next {
    position: absolute;
    width: 60px;
    height: 60px;
    background: var(--bs-white);
    color: var(--bs-primary);
    font-size: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.5s;
}

.header-carousel .owl-nav .owl-prev {
    bottom: 30px;
    left: 0;
}
.header-carousel .owl-nav .owl-next {
    bottom: 30px;
    right: 0;
}

.header-carousel .owl-nav .owl-prev:hover,
.header-carousel .owl-nav .owl-next:hover {
    box-shadow: inset 0 0 65px 0 var(--bs-primary);
    color: var(--bs-dark);
}

.header-carousel .header-carousel-item .carousel-caption {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    bottom: 0;
    background: rgba(0, 0, 0, .2);
    display: flex;
    align-items: center;
    z-index: 9;
}

@media (max-width: 991px) {
    .header-carousel .header-carousel-item .carousel-caption {
        padding-top: 45px;
    }

    .header-carousel.owl-carousel,
    .header-carousel .header-carousel-item {
        height: 700px;
    }
}
/*** Carousel Hero Header End ***/


/*** Single Page Hero Header Start ***/
.bg-breadcrumb {
    position: relative;
    overflow: hidden;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url(../img/banner-img.jpg);
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    padding: 60px 0 60px 0;
    transition: 0.5s;
}

.bg-breadcrumb .breadcrumb {
    position: relative;
}

.bg-breadcrumb .breadcrumb .breadcrumb-item a {
    color: var(--bs-white);
}
/*** Single Page Hero Header End ***/


/*** Banner Start ***/
.banner {
    position: relative;
    overflow: hidden;
    background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)), url(../img/banner-img.jpg);
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    z-index: 9;
}

.banner .container {
    position: relative;
    z-index: 99;
}

.banner::after {
    content: "";
    position: absolute;
    width: 100px;
    height: 500px;
    top: -200px;
    left: 0;
    background: var(--bs-primary);
    transform: rotate(45deg);
    z-index: 1;
}

.banner::before {
    content: "";
    position: absolute;
    width: 100px;
    height: 500px;
    bottom: -200px;
    right: 0;
    background: var(--bs-primary);
    transform: rotate(45deg);
    z-index: 1;
}

.banner .banner-design-1 {
    position: absolute;
    width: 30px;
    height: 500px;
    top: -165px;
    left: 0;
    background: var(--bs-dark);
    transform: rotate(45deg);
    z-index: 2;
}

.banner .banner-design-2 {
    position: absolute;
    width: 30px;
    height: 500px;
    bottom: -165px;
    right: 0;
    background: var(--bs-dark);
    transform: rotate(45deg);
    z-index: 2;
}
/*** Banner End ***/

/*** Service Start ***/
.service .nav .nav-item {
    width: 75%;
    border: 1px solid var(--bs-primary);
    background: var(--bs-light);
}

.service .nav .nav-item a {
    display: flex;
    justify-content: center;
}


.owl-stage-outer {
    margin-right: -1px;
}
.service .nav-item a.active {
    background: var(--bs-primary);
}

.service .nav-item a span {
    color: var(--bs-dark);
}

.service .nav-item a.active span {
    color: var(--bs-white);
}

.service-carousel .owl-nav .owl-prev,
.service-carousel .owl-nav .owl-next {
    position: absolute;
    padding: 10px 35px;
    border: 1px solid var(--bs-primary);
    color: var(--bs-dark);
    background: var(--bs-light);
    transition: 0.5s;
}

.service-carousel .owl-nav .owl-prev:hover,
.service-carousel .owl-nav .owl-next:hover {
    background: var(--bs-primary);
    color: var(--bs-white);
}

@media (min-width: 992px) {
    .service-carousel .owl-nav .owl-prev {
        top: 0;
        left: -115px;
    }
    
    .service-carousel .owl-nav .owl-next {
        bottom: 0;
        left: -115px;
    }
}

@media (max-width: 991px) {
    .owl-stage-outer {
        margin-bottom: 70px;
    }
    .service-carousel .owl-nav .owl-prev {
        bottom: -70px;
        left: 0;
    }

    .service-carousel .owl-nav .owl-next {
        bottom: -70px;
        right: 0;
    }

    .service .nav {
        display: flex;
        justify-content: center;
    }
}
/*** Service End ***/

/*** Projects Start ***/
.projects .nav-item {
    box-shadow: 0 0 30px rgba(0, 0, 0, .09);
}

.projects-item .projects-content {
    box-shadow: 0 0 30px rgba(0, 0, 0, .1);
}

.projects .nav-item a.active {
    background: var(--bs-primary);
}

.projects .nav-item a span {
    color: var(--bs-dark);
}

.projects .nav-item a.active span {
    color: var(--bs-white);
}

.projects .nav-item a.active .projects-icon {
    background: var(--bs-dark) !important;
}

.projects .nav-item a.active .projects-icon span {
    color: var(--bs-primary);
}
/*** Projects End ***/


/*** Blog Start ***/
.blog .blog-item {
    height: 100%;
    background: var(--bs-light);
}

.blog .blog-item .blog-img {
    position: relative;
    overflow: hidden;
}

.blog .blog-item .blog-img::after {
    content: "";
    position: absolute;
    width: 0;
    height: 0;
    top: 0;
    left: 0;
    display: flex;
    background: rgba(246, 138, 10, .3);
    transition: 0.5s;
}

.blog .blog-item:hover .blog-img::after {
    width: 100%;
    height: 100%;
}

.blog .blog-item .blog-img img {
    transition: 0.5s;
}

.blog .blog-item:hover .blog-img img {
    transform: scale(1.2);
}

.blog .blog-item .blog-heading {
    position: relative;
    background: var(--bs-white);
}

.blog .blog-item .blog-heading a.h4 {
    position: relative;
    width: 100%;
    display: inline-flex;
    transition: 0.5s;
    z-index: 2;
}

.blog .blog-item .blog-heading::after {
    content: "";
    position: absolute;
    width: 0%;
    height: 100%;
    right: 0;
    bottom: 0;
    transition: 0.5s;
    z-index: 1;
}

.blog .blog-item:hover .blog-heading::after {
    width: 100%;
    background: var(--bs-primary);
}

.blog .blog-item:hover .blog-heading a.h4 {
    color: var(--bs-white);
}

.blog .blog-item:hover .blog-heading a.h4:hover {
    color: var(--bs-dark);
}
/*** Blog End ***/

/*** Team Start ***/
.team .team-item .team-img {
    position: relative;
    overflow: hidden;
}

.team .team-item .team-img img {
    transition: 0.5s;
}

.team .team-item:hover .team-img img {
    transform: scale(1.1);
}

.team .team-item .team-img .team-icon {
    position: absolute;
    bottom: 20px; right: -100%;
    z-index: 9;
    transition: 0.5s;
}

.team .team-item:hover .team-img .team-icon {
    right: 25px;
}

.team .team-item .team-img::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 0;
    top: 0;
    left: 0;
    background: rgba(246, 138, 10, .2);
    transition: 0.5s;
    z-index: 1;
}

.team .team-item:hover .team-img::after {
    height: 100%;
}

.team .team-item .team-content {
    transition: 0.5s;
}

.team .team-item:hover .team-content {
    box-shadow: 0 0 20px rgba(0, 0, 0, .2);
}
/*** Team End ***/

/*** FAQs Start ***/
.faq-section .accordion .accordion-item {
    margin-bottom: 20px;
    box-shadow: 0 0 30px rgba(0, 0, 0, .08);
    border: none;
}

.faq-section .accordion .accordion-item .accordion-header .accordion-button {
    color: var(--bs-white);
    background: rgba(246, 138, 10, .9);
    font-size: 18px;
}

.faq-section .accordion .accordion-item .accordion-header .accordion-button.collapsed {
    color: var(--bs-dark);
    background: var(--bs-light);
}
/*** FAQs End ***/

/*** Testimonial Start ***/
.testimonial-carousel .owl-stage-outer {
    margin-right: -1px;
}

.testimonial .testimonial-item {
    position: relative;
    margin-top: 35px;
}

.testimonial .testimonial-item .customer-text {
    border: 1px solid var(--bs-primary);
    border-top: none;
}

.testimonial .testimonial-item .testimonial-quote {
    position: absolute;
    width: 50px;
    height: 50px;
    top: 0;
    right: 25px;
    transform: translateY(-50%);
    color: var(--bs-dark);
    background: var(--bs-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.testimonial .testimonial-item .testimonial-inner {
    display: flex;
    align-items: center;
    background: var(--bs-white);
}

.testimonial .testimonial-item .testimonial-inner img {
    width: 100px; 
    height: 100px;
    border: 2px solid var(--bs-primary);
}

.testimonial-carousel .owl-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.testimonial-carousel .owl-dots .owl-dot {
    width: 30px;
    height: 30px;
    margin: 30px 10px 0 10px;
    background: var(--bs-white);
    transition: 0.5s;
}

@media (max-width: 991px) {
    .testimonial-carousel .owl-dots .owl-dot {
        margin: 0 10px 0 10px;
    }
}

.testimonial-carousel .owl-dots .owl-dot.active {
    width: 30px;
    height: 30px;
    background: var(--bs-primary);
    transition: 0.5s;
}

.testimonial-carousel .owl-dots .owl-dot span {
    position: relative;
    margin-top: 50%;
    margin-left: 50%;
    transform: translate(-50%, -50%);
    margin-right: -1px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.testimonial-carousel .owl-dots .owl-dot.active span::after {
    background: var(--bs-white);
}

.testimonial-carousel .owl-dots .owl-dot span::after {
    content: "";
    width: 15px;
    height: 15px;
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--bs-primary);
    transition: 0.5s;
}
/*** Testimonial End ***/

/*** Footer Start ***/
.footer {
    background: var(--bs-dark);
}

.footer .footer-item a {
    line-height: 35px;
    color: var(--bs-white);
    transition: 0.5s;
}

.footer .footer-item p {
    line-height: 35px;
}

.footer .footer-item a:hover {
    letter-spacing: 1px;
    color: var(--bs-primary);
}

.footer .footer-item .footer-btn a {
    transition: 0.5s;
}

.footer .footer-item .footer-btn a:hover {
    background: var(--bs-white);
}

.footer .footer-item .footer-btn a:hover {
    color: var(--bs-primary);
}
/*** Footer End ***/

/*** copyright Start ***/
.copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--bs-dark);
}
/*** copyright end ***/





/* Zmniejszenie odstępu między tytułem a intro w sekcji usług/blog */
.blog .blog-item .blog-heading {
    margin-bottom: 0;
    padding-bottom: 0;
}

.blog .blog-item .blog-heading a.h4 {
    padding: 1rem 1.5rem 0.5rem 1.5rem !important;
    margin-bottom: 0;
}

.blog .blog-item .blog-content {
    padding-top: 0 !important;
    margin-top: 0;
}

/* Dodatkowe doprecyzowanie dla większej kontroli */
.blog .blog-item .blog-heading .p-4 {
    padding-top: 1rem !important;
    padding-bottom: 0.5rem !important;
}

/* Sticky navbar - pozostaje widoczny przy przewijaniu */
.header-top {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* Dodatkowe style dla lepszego wyglądu sticky navbar */
.sticky-navbar {
    position: sticky;
    top: 0;
    z-index: 999;
    background: white;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
}

/* Smooth transition dla navbar */
.header-top.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Fix dla responsywności na mobile */
@media (max-width: 991px) {
    .header-top {
        position: sticky;
        top: 0;
        background: white;
        z-index: 1000;
    }
}


/* Styl aktywnego menu spójny z przyciskami navbar */
@media (min-width: 992px) {
    /* Aktywne pozycje menu - styl jak przyciski */
    .navbar-light .navbar-nav .nav-item.active .nav-link,
    .navbar-light .navbar-nav .nav-item .nav-link.active {
        background: var(--bs-primary);
        color: var(--bs-white) !important;
        border-radius: 0;
        padding: 8px 16px !important;
        margin: 0 2px;
        font-weight: 600;
        transition: all 0.5s ease;
        border: none;
        position: relative;
    }

    /* Hover dla aktywnych pozycji */
    .navbar-light .navbar-nav .nav-item.active .nav-link:hover,
    .navbar-light .navbar-nav .nav-item .nav-link.active:hover {
        background: var(--bs-dark);
        color: var(--bs-white) !important;
        transform: translateY(-1px);
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    }

    /* Hover dla nieaktywnych pozycji - subtelny efekt */
    .navbar-light .navbar-nav .nav-item:not(.active) .nav-link:hover {
        background: rgba(246, 138, 10, 0.1);
        color: var(--bs-primary) !important;
        padding: 8px 16px !important;
        margin: 0 2px;
        transition: all 0.5s ease;
        border-radius: 0;
    }

    /* Podstawowy styl dla nieaktywnych pozycji */
    .navbar-light .navbar-nav .nav-item:not(.active) .nav-link {
        padding: 8px 16px !important;
        margin: 0 2px;
        transition: all 0.5s ease;
        border-radius: 0;
        color: var(--bs-dark);
    }
}

/* Styl dla mobile - zachowujemy prostokątny design */
@media (max-width: 991px) {
    .navbar-light .navbar-nav .nav-item.active .nav-link,
    .navbar-light .navbar-nav .nav-item .nav-link.active {
        background: var(--bs-primary);
        color: var(--bs-white) !important;
        border-radius: 0;
        margin: 1px 15px;
        padding: 8px 20px !important;
        font-weight: 600;
        border-left: 4px solid var(--bs-dark);
        transition: all 0.5s ease;
    }

    /* Hover dla aktywnych na mobile */
    .navbar-light .navbar-nav .nav-item.active .nav-link:hover,
    .navbar-light .navbar-nav .nav-item .nav-link.active:hover {
        background: var(--bs-dark);
        border-left: 4px solid var(--bs-primary);
    }

    /* Hover dla nieaktywnych na mobile */
    .navbar-light .navbar-nav .nav-item:not(.active) .nav-link:hover {
        background: rgba(246, 138, 10, 0.1);
        color: var(--bs-primary) !important;
        border-radius: 0;
        margin: 1px 15px;
        padding: 8px 20px !important;
        transition: all 0.5s ease;
    }

    /* Podstawowy styl dla nieaktywnych na mobile */
    .navbar-light .navbar-nav .nav-item:not(.active) .nav-link {
        margin: 1px 15px;
        padding: 8px 20px !important;
        transition: all 0.5s ease;
        border-radius: 0;
    }
}

/* Dodatkowe doprecyzowanie dla lepszej spójności z przyciskami */
.navbar .navbar-nav .nav-item .nav-link {
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
}

/* Zapewnienie spójności z istniejącymi przyciskami */
.navbar .nav-btn .btn {
    font-weight: 600;
    transition: 0.5s;
    border-radius: 0;
}

.navbar .nav-btn .btn.btn-primary:hover {
    background: var(--bs-dark);
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Dodatkowy styl dla przycisk wyszukiwania - żeby był spójny */
.btn-search.btn.btn-primary.btn-md-square {
    border-radius: 0 !important;
}

/* Responsive spacing adjustments */
@media (min-width: 992px) {
    .navbar .navbar-nav .nav-item {
        margin-right: 0;
    }
    
    .navbar .nav-btn {
        margin-left: 15px;
    }
}


/* Dodatkowe zmniejszenie odstępów w menu mobile */
@media (max-width: 991px) {
    .navbar .navbar-nav .nav-item {
        padding: 0;
        margin-bottom: 0;
    }
    
    .navbar .navbar-nav {
        padding-top: 10px;
        padding-bottom: 10px;
    }
    
    /* Zmniejszenie przestrzeni dla przycisków w menu mobile */
    .navbar .navbar-nav .nav-btn {
        margin-top: 5px;
        padding-top: 5px;
        border-top: 1px solid rgba(246, 138, 10, 0.1);
    }
}

/*** ============================================
     SEARCH MODAL - Wyszukiwarka
     ============================================ ***/

/* Modal Body */
#searchModal .modal-body {
    background-color: #f8f9fa;
}

/* Modal Header - ensure text is visible */
#searchModal .modal-header {
    background-color: #ffffff;
}

#searchModal .modal-title {
    color: #212529;
    font-weight: 600;
}

#searchModal .modal-title i {
    color: var(--bs-primary);
}

/* Search Input Section - Sticky Header */
.search-input-section {
    position: sticky;
    top: 0;
    z-index: 1020;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    background-color: #f8f9fa;
}

/* Info text under search input */
.search-input-section .text-muted {
    color: #6c757d !important;
    font-weight: 400;
}

.search-input-section .text-muted i {
    color: var(--bs-primary);
}

/* Search Input Styling */
#searchInput {
    font-size: 1.1rem;
    color: #212529 !important;
    background-color: #ffffff !important;
}

#searchInput::placeholder {
    color: #6c757d !important;
    opacity: 1;
}

#searchInput::-webkit-input-placeholder {
    color: #6c757d !important;
    opacity: 1;
}

#searchInput::-moz-placeholder {
    color: #6c757d !important;
    opacity: 1;
}

#searchInput:-ms-input-placeholder {
    color: #6c757d !important;
    opacity: 1;
}

#searchInput:focus {
    box-shadow: none;
    border-color: var(--bs-primary);
    color: #212529 !important;
}

/* Input group icon */
.search-input-section .input-group-text {
    background-color: #ffffff;
    color: var(--bs-primary);
}

/* Search Results Container */
#searchResults {
    min-height: 300px;
}

/* Search Result Cards */
.search-result-card {
    display: block;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.search-result-card:hover {
    text-decoration: none;
}

.search-result-card .card {
    transition: all 0.2s ease;
}

.search-result-card:hover .card {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15) !important;
}

/* Card image */
.search-result-card .card-img-top {
    height: 220px;
    object-fit: cover;
    border-radius: 0.375rem 0.375rem 0 0;
}

/* Card title - larger */
.search-result-card .card-title {
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0;
    color: #212529 !important;
}

/* Card body spacing */
.search-result-card .card-body {
    padding: 1.25rem;
}

/* Remove card-text styles (not used anymore) */
.search-result-card .card-text {
    display: none;
}

/* Search Header */
.search-header {
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.search-header p {
    color: #6c757d !important;
}

.search-header i {
    color: var(--bs-primary);
}

/* Search Sections */
.search-section h5 {
    font-weight: 600;
    border-left: 4px solid var(--bs-primary);
    padding-left: 0.75rem;
    color: var(--bs-primary);
}

/* Empty State - ensure text is visible */
#searchResults .text-muted {
    color: #6c757d !important;
}

#searchResults .text-center p {
    color: #6c757d !important;
}

#searchResults .text-center strong {
    color: #212529 !important;
}

#searchResults .fa-search {
    color: #dee2e6 !important;
}

/* Loading spinner color */
.spinner-border.text-primary {
    color: var(--bs-primary) !important;
}

/* Result cards text colors */
.search-result-card .card-title {
    color: #212529 !important;
}

.search-result-card .card-text {
    color: #6c757d !important;
}

/* Badge Styles - larger and more prominent */
.search-result-card .badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    letter-spacing: 0.3px;
}

.search-result-card .badge.bg-primary {
    background-color: var(--bs-primary) !important;
    color: #ffffff !important;
}

.search-result-card .badge.bg-success {
    background-color: #28a745 !important;
    color: #ffffff !important;
}

/* Date text - hidden (not used anymore) */
.search-result-card small {
    display: none;
}

/* Loading State */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Highlight Matched Text */
mark {
    background-color: #fff3cd;
    padding: 0 0.2em;
    border-radius: 2px;
}

/* ============================================
   MOBILE OPTIMIZATION
   ============================================ */

/* Tablet and below (768px) */
@media (max-width: 768px) {
    /* Modal Header - większy i łatwiejszy w obsłudze */
    #searchModal .modal-header {
        padding: 1rem 1rem;
        position: sticky;
        top: 0;
        z-index: 1030;
        background: white;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    #searchModal .modal-title {
        font-size: 1.1rem;
        color: #212529 !important;
    }
    
    /* Close button - większy touch target */
    #searchModal .btn-close {
        padding: 1rem;
        font-size: 1.5rem;
        opacity: 0.8;
    }
    
    /* Search Input Section - lepsze spacing */
    .search-input-section {
        padding: 1.25rem 0 !important;
        position: sticky;
        top: 60px;
        z-index: 1025;
        background: white;
    }
    
    .search-input-section .container {
        padding: 0 1rem;
    }
    
    /* Info text visibility on mobile */
    .search-input-section .text-muted {
        color: #6c757d !important;
    }
    
    /* Search Input - większy i wygodniejszy */
    #searchInput {
        font-size: 1rem;
        padding: 0.875rem 1rem !important;
        height: auto;
        min-height: 48px; /* Apple's recommended touch target */
    }
    
    #searchInput::placeholder {
        font-size: 0.9rem;
    }
    
    .input-group-text {
        padding: 0.875rem 1rem;
    }
    
    /* Info text pod inputem */
    .search-input-section .text-muted {
        font-size: 0.75rem;
        margin-top: 0.5rem !important;
    }
    
    /* Modal Body - lepsze spacing */
    #searchModal .modal-body {
        padding: 1rem 0.5rem;
        padding-bottom: 2rem; /* Dodatkowy padding na dole dla komfortu */
    }
    
    /* Search Results Container */
    #searchResults {
        min-height: 200px;
    }
    
    /* Result Cards - pełna szerokość na mobile */
    .search-result-card .card {
        margin-bottom: 1rem;
    }
    
    .search-result-card .card-img-top {
        height: 200px !important;
        object-fit: cover;
    }
    
    /* Card Body - lepsze spacing */
    .search-result-card .card-body {
        padding: 1.25rem;
    }
    
    .search-result-card .card-title {
        font-size: 1.05rem;
        line-height: 1.4;
        margin-bottom: 0;
        font-weight: 600;
    }
    
    /* Hide card text on mobile */
    .search-result-card .card-text {
        display: none;
    }
    
    /* Badge - większy i czytelniejszy */
    .search-result-card .badge {
        font-size: 0.75rem;
        padding: 0.35rem 0.65rem;
        font-weight: 600;
    }
    
    /* Search Header */
    .search-header {
        padding: 0 0.75rem;
        margin-bottom: 1rem;
    }
    
    .search-header p {
        font-size: 0.9rem;
    }
    
    /* Empty State */
    #searchResults .text-center.py-5 {
        padding: 2rem 1rem !important;
    }
    
    #searchResults .fa-search.fa-3x {
        font-size: 2.5rem;
    }
    
    /* Loading State */
    .spinner-border {
        width: 2.5rem;
        height: 2.5rem;
    }
}

/* Phone only (max 576px) */
@media (max-width: 576px) {
    /* Modal Header - jeszcze bardziej kompaktowy */
    #searchModal .modal-header {
        padding: 0.875rem 0.75rem;
    }
    
    #searchModal .modal-title {
        font-size: 1rem;
    }
    
    #searchModal .modal-title i {
        font-size: 0.9rem;
    }
    
    /* Search Input - pełna szerokość */
    .search-input-section .col-lg-8 {
        max-width: 100%;
        padding: 0;
    }
    
    #searchInput {
        font-size: 16px; /* Zapobiega zoom na iOS */
        border-radius: 0.375rem;
    }
    
    .input-group-lg {
        border-radius: 0.375rem;
    }
    
    /* Result Cards - pojedyncza kolumna */
    .search-result-card {
        margin-bottom: 0.75rem;
    }
    
    .search-result-card .card-img-top {
        height: 180px !important;
    }
    
    .search-result-card .card-body {
        padding: 1rem;
    }
    
    .search-result-card .card-title {
        font-size: 1rem;
        font-weight: 600;
    }
    
    /* Hide card text on phone */
    .search-result-card .card-text {
        display: none;
    }
    
    /* Badge styling */
    .search-result-card .card-body > div:first-child {
        margin-bottom: 0.75rem;
    }
}

/* Landscape mode na małych urządzeniach */
@media (max-width: 768px) and (orientation: landscape) {
    #searchModal .modal-header {
        padding: 0.5rem 0.75rem;
    }
    
    .search-input-section {
        padding: 0.75rem 0 !important;
        top: 50px;
    }
    
    #searchInput {
        min-height: 42px;
        padding: 0.5rem 1rem !important;
    }
    
    .search-result-card .card-img-top {
        height: 120px !important;
    }
    
    #searchModal .modal-body {
        padding-bottom: 1rem;
    }
}

/* Touch improvements dla wszystkich mobile */
@media (max-width: 768px) {
    /* Większe touch targets */
    .search-result-card {
        -webkit-tap-highlight-color: rgba(246, 138, 10, 0.1);
        tap-highlight-color: rgba(246, 138, 10, 0.1);
    }
    
    /* Smooth scroll */
    #searchModal .modal-body {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
    
    /* Remove hover effects na touch */
    .search-result-card:hover .card {
        transform: none;
    }
    
    /* Active state zamiast hover */
    .search-result-card:active .card {
        transform: scale(0.98);
        opacity: 0.9;
    }
}

/* iOS specific fixes */
@supports (-webkit-touch-callout: none) {
    /* Fix dla iOS keyboard */
    #searchModal .modal-dialog {
        height: 100vh;
        height: -webkit-fill-available;
    }
    
    /* Fix dla safe area na iOS */
    #searchModal .modal-body {
        padding-bottom: calc(2rem + env(safe-area-inset-bottom));
    }
}

/* Android specific optimizations */
@media (max-width: 768px) {
    /* Prevent zoom on input focus */
    #searchInput,
    #searchInput:focus {
        font-size: 16px !important;
    }
}

/*** Search Modal End ***/


/*** ============================================
     HAMBURGER MENU - Mobile Navigation
     ============================================ ***/

/* Force hide default Bootstrap styles */
.navbar-toggler {
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.navbar-toggler:focus {
    box-shadow: none !important;
}

/* ============================================
   ANIMATED HAMBURGER ICON
   ============================================ */

.hamburger-button {
    position: relative;
    width: 50px;
    height: 50px;
    padding: 0 !important;
    border: none !important;
    background: var(--bs-primary) !important;
    cursor: pointer;
    display: none !important; /* Hidden by default - shown only on mobile */
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(246, 138, 10, 0.3) !important;
}

/* Show hamburger only on mobile */
@media (max-width: 991px) {
    .hamburger-button {
        display: inline-flex !important;
    }
}

.hamburger-button:hover {
    background: var(--bs-dark) !important;
    transform: scale(1.05);
}

.hamburger-button:focus {
    outline: 2px solid var(--bs-primary) !important;
    outline-offset: 2px;
    box-shadow: 0 2px 8px rgba(246, 138, 10, 0.5) !important;
}

.hamburger-box {
    width: 28px;
    height: 24px;
    display: inline-block;
    position: relative;
}

.hamburger-inner {
    display: block;
    top: 50%;
    margin-top: -2px;
}

.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
    width: 28px;
    height: 3px;
    background-color: #ffffff !important;
    border-radius: 2px;
    position: absolute;
    transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease;
}

.hamburger-inner::before,
.hamburger-inner::after {
    content: "";
    display: block;
}

.hamburger-inner::before {
    top: -8px;
}

.hamburger-inner::after {
    bottom: -8px;
}

/* Animated state when menu is open */
.hamburger-button[aria-expanded="true"] .hamburger-inner {
    transform: rotate(45deg);
    background-color: #ffffff !important;
}

.hamburger-button[aria-expanded="true"] .hamburger-inner::before {
    top: 0;
    opacity: 0;
}

.hamburger-button[aria-expanded="true"] .hamburger-inner::after {
    bottom: 0;
    transform: rotate(-90deg);
}

/* ============================================
   MOBILE MENU STRUCTURE
   ============================================ */

/* Mobile menu header (close button only) */
.mobile-menu-header {
    display: flex !important;
    align-items: center;
    justify-content: flex-end; /* Align close button to right */
    padding: 0.75rem 1rem;
    background: #ffffff; /* White background */
    color: #212529;
    margin-bottom: 0;
    border-bottom: 1px solid #e0e0e0; /* Light gray border */
    position: sticky;
    top: 0;
    z-index: 10;
}

.mobile-menu-header h5 {
    display: none; /* Hide Menu text */
}

.mobile-close-btn {
    background: transparent !important;
    border: none !important;
    color: #212529 !important; /* Dark color for visibility */
    font-size: 1.75rem;
    width: 44px;
    height: 44px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
    padding: 0;
}

.mobile-close-btn:hover {
    background: #f8f9fa !important; /* Light gray on hover */
    color: var(--bs-primary) !important; /* Orange on hover */
}

.mobile-close-btn:active {
    background: #e9ecef !important;
    transform: scale(0.95);
}

/* ============================================
   MOBILE MENU ANIMATIONS & BEHAVIOR
   ============================================ */

@media (max-width: 991px) {
    /* Force remove Bootstrap default collapse behavior */
    .navbar-collapse.collapse:not(.show) {
        display: block !important;
    }
    
    /* Navbar collapse positioning */
    .navbar-collapse {
        position: fixed !important;
        top: 0 !important;
        right: -100% !important;
        height: 100vh !important;
        height: 100dvh !important; /* For iOS */
        width: 85% !important;
        max-width: 320px !important;
        background: white !important;
        z-index: 9999 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
        box-shadow: -5px 0 25px rgba(0,0,0,0.2) !important;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Open state - slide in */
    .navbar-collapse.show {
        right: 0 !important;
        display: block !important;
    }
    
    /* Collapsing animation */
    .navbar-collapse.collapsing {
        right: -100% !important;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
        height: 100vh !important;
    }
    
    /* Backdrop overlay */
    body.menu-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.6);
        z-index: 9998;
        animation: fadeIn 0.3s ease;
        -webkit-tap-highlight-color: transparent;
    }
    
    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }
    
    /* Menu items styling */
    .navbar-nav {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
    }
    
    .nav-item {
        margin: 0 !important;
        padding: 0 !important;
        border-bottom: 1px solid #f0f0f0;
        width: 100% !important;
    }
    
    .nav-item .nav-link {
        padding: 1.1rem 1.5rem !important;
        display: flex !important;
        align-items: center;
        font-size: 1rem;
        font-weight: 500;
        color: #212529 !important;
        transition: all 0.3s ease;
        position: relative;
        width: 100% !important;
    }
    
    /* Icons in mobile menu */
    .nav-item .nav-link i {
        font-size: 1.1rem;
        width: 28px;
        min-width: 28px;
        color: var(--bs-primary);
        transition: transform 0.3s ease;
        margin-right: 0.75rem !important;
    }
    
    /* Active state */
    .nav-item.active .nav-link {
        background: var(--bs-primary) !important;
        color: white !important;
        border-left: 4px solid var(--bs-dark) !important;
        padding-left: calc(1.5rem - 4px) !important;
    }
    
    .nav-item.active .nav-link i {
        color: white !important;
    }
    
    /* Hover/Touch effects */
    .nav-item:not(.active) .nav-link:active {
        background: #f8f9fa !important;
        padding-left: 2rem !important;
    }
    
    .nav-item:not(.active) .nav-link:active i {
        transform: translateX(5px);
    }
    
    /* Nav buttons in mobile */
    .nav-btn {
        padding: 1rem 1.5rem !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 0.75rem;
        border-top: 2px solid #dee2e6;
        margin-top: 1rem !important;
        width: 100% !important;
    }
    
    .nav-btn .btn {
        width: 100% !important;
        justify-content: center;
        margin: 0 !important;
    }
    
    .nav-btn .btn-search {
        order: 2;
    }
    
    .nav-btn a[href^="tel"] {
        order: 1;
    }
    
    /* Body scroll lock when menu open */
    body.menu-open {
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
        height: 100% !important;
    }
}

/* Desktop specific overrides */
@media (min-width: 992px) {
    /* Never lock scroll on desktop */
    body.menu-open {
        overflow: visible !important;
        position: relative !important;
        width: auto !important;
        height: auto !important;
    }
    
    /* No backdrop on desktop */
    body.menu-open::before,
    body::before {
        display: none !important;
    }
}

/* ============================================
   DESKTOP - No changes
   ============================================ */

@media (min-width: 992px) {
    /* Hide mobile menu elements on desktop */
    .mobile-menu-header {
        display: none !important;
    }
    
    .nav-item .nav-link i {
        display: none !important;
    }
    
    /* Hide hamburger button on desktop */
    .hamburger-button,
    .navbar-toggler {
        display: none !important;
    }
    
    /* Ensure navbar collapse is visible and normal on desktop */
    .navbar-collapse {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        height: auto !important;
        width: auto !important;
        max-width: none !important;
        background: transparent !important;
        z-index: auto !important;
        overflow: visible !important;
        box-shadow: none !important;
        transition: none !important;
    }
    
    /* Reset nav items for desktop */
    .navbar-nav {
        flex-direction: row !important;
    }
    
    .nav-item {
        border-bottom: none !important;
    }
}

/* ============================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================ */

/* Focus states */
.nav-item .nav-link:focus {
    outline: 2px solid var(--bs-primary);
    outline-offset: -2px;
}

.hamburger-button:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .navbar-collapse,
    .hamburger-inner,
    .hamburger-inner::before,
    .hamburger-inner::after,
    .nav-item .nav-link,
    .mobile-close-btn {
        transition: none !important;
        animation: none !important;
    }
}

/* ============================================
   SAFE AREA SUPPORT (iOS)
   ============================================ */

@supports (padding: env(safe-area-inset-bottom)) {
    @media (max-width: 991px) {
        .navbar-collapse {
            padding-bottom: env(safe-area-inset-bottom);
        }
    }
}

/*** Hamburger Menu End ***/