/*
Theme Name: Korty MOSiR Radom
Text Domain: korty_mosir
Author: ModernCreative
Version: 1.1
Description: Motyw WordPress dla korty.mosir.radom.pl
*/

body {
    overflow-x: hidden;
}

/* =====================================
   Tabele
===================================== */
.table>:not(caption)>*>* {
    background-color: transparent !important;
}

/* =====================================
   Nawigacja
===================================== */
.navbar {
    position: absolute;
    top: 0;
    left: 0px;
    right: 0px;
    z-index: 1030;
    backdrop-filter: blur(3px);
    background-color: rgba(255, 255, 255, 0.28);
    border-bottom: 1px solid rgba(255, 255, 255, 0.27);
    transition: background-color 0.3s ease;
    color: #fff;
}

.navbar.transition-nav.scrolled {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    border-radius: 0;
    background-color: var(--bs-primary) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    color: #fff;
}

.navbar-toggler {
    border: none;
}

.navbar-toggler:focus {
    box-shadow: none;
}


#menu-bip-sidebar .nav-item .nav.flex-column {
    flex-flow: column;
    border-radius: .5rem;
    margin-left: 10px;
    background: rgba(0, 0, 0, .015);

}

#menu-bip-sidebar .nav-item .nav.flex-column li.nav-item {}

/* =====================================
   Inne
===================================== */
.fs-7 {
    font-size: 0.75rem;
}

.bip-alerts__content p {
    margin: 0;
}

/* =====================================
   scrollbar
===================================== */
::-webkit-scrollbar {
    width: 0px;
    height: 0px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: rgba(100, 100, 100, 0.3);
    border-radius: 10px;
    transition: background-color 0.3s;
}

::-webkit-scrollbar-thumb:hover {
    background-color: rgba(100, 100, 100, 0.5);
}

/* Sticky reveal footer – nie wymaga stałej wysokości */
.sticky-reveal {
    position: sticky;
    bottom: 0px;
    z-index: -1;
    /* żeby schodziła nad tłem, ale nie zasłaniała fixed elementów */
}

/* Dobre praktyki dla całej strony */
html,
body {
    height: 100%;
}

body {
    min-height: 100%;
    margin: 0;
}

/* Upewnij się, że żaden rodzic nie ma overflow: hidden; bo psuje sticky */
#primary.site-main {
    overflow: visible;
}

main.site-main {
    background-color: var(--bs-secondary-bg);
}

/* Scroll to top – stan domyślny: ukryty (z animacją) */
.scroll-top-btn {
    opacity: 0;
    transform: translateY(10px);
    visibility: hidden;
    transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
}

/* Widoczny po przewinięciu */
.scroll-top-btn.is-visible {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    transition: opacity .2s ease, transform .2s ease, visibility 0s;
}

/* Szacunek dla preferencji ograniczania animacji */
@media (prefers-reduced-motion: reduce) {
    .scroll-top-btn {
        transition: none;
    }

    .scroll-top-btn.is-visible {
        transition: none;
    }
}

.navbar .dropdown-menu .nav-item a {
    transition: padding-left 0.3s ease, color 0.3s ease;
}

.navbar .dropdown-menu .nav-item a:hover {
    padding-left: 20px;
    color: var(--bs-primary);
    /* np. kolor brandowy */
}

.breadcrumb-item.active {
    flex: 1 1 auto;
    /* ostatni element niech bierze resztę szerokości */
    min-width: 0;
    overflow-wrap: anywhere;
    /* łam gdziekolwiek jeśli trzeba */
    word-break: break-word;
    /* fallback */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.breadcrumb {
    flex-wrap: nowrap;
    overflow: hidden;
}

.breadcrumb .breadcrumb-item{
    text-wrap: nowrap;
    white-space: nowrap;
}

.breadcrumb-item+.breadcrumb-item::before {
    float: none;
}

svg.breadcrumbs-icon {
    width: 20px;
    height: 20px;
    vertical-align: -0.125em;
}

@media print {

    /* === Grid: kolumny === */
    .row {
        display: flex !important;
        flex-wrap: wrap !important;
    }

    .print-col-1 {
        flex: 0 0 8.333333% !important;
        max-width: 8.333333% !important;
        width: 8.333333% !important;
    }

    .print-col-2 {
        flex: 0 0 16.666667% !important;
        max-width: 16.666667% !important;
        width: 16.666667% !important;
    }

    .print-col-3 {
        flex: 0 0 25% !important;
        max-width: 25% !important;
        width: 25% !important;
    }

    .print-col-4 {
        flex: 0 0 33.333333% !important;
        max-width: 33.333333% !important;
        width: 33.333333% !important;
    }

    .print-col-5 {
        flex: 0 0 41.666667% !important;
        max-width: 41.666667% !important;
        width: 41.666667% !important;
    }

    .print-col-6 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        width: 50% !important;
    }

    .print-col-7 {
        flex: 0 0 58.333333% !important;
        max-width: 58.333333% !important;
        width: 58.333333% !important;
    }

    .print-col-8 {
        flex: 0 0 66.666667% !important;
        max-width: 66.666667% !important;
        width: 66.666667% !important;
    }

    .print-col-9 {
        flex: 0 0 75% !important;
        max-width: 75% !important;
        width: 75% !important;
    }

    .print-col-10 {
        flex: 0 0 83.333333% !important;
        max-width: 83.333333% !important;
        width: 83.333333% !important;
    }

    .print-col-11 {
        flex: 0 0 91.666667% !important;
        max-width: 91.666667% !important;
        width: 91.666667% !important;
    }

    .print-col-12 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .print-col-auto {
        flex: 0 0 auto !important;
        width: auto !important;
        max-width: none !important;
    }

    /* === Grid: offsety (margin-left jak w bootstrapie) === */
    .print-offset-0 {
        margin-left: 0 !important;
    }

    .print-offset-1 {
        margin-left: 8.333333% !important;
    }

    .print-offset-2 {
        margin-left: 16.666667% !important;
    }

    .print-offset-3 {
        margin-left: 25% !important;
    }

    .print-offset-4 {
        margin-left: 33.333333% !important;
    }

    .print-offset-5 {
        margin-left: 41.666667% !important;
    }

    .print-offset-6 {
        margin-left: 50% !important;
    }

    .print-offset-7 {
        margin-left: 58.333333% !important;
    }

    .print-offset-8 {
        margin-left: 66.666667% !important;
    }

    .print-offset-9 {
        margin-left: 75% !important;
    }

    .print-offset-10 {
        margin-left: 83.333333% !important;
    }

    .print-offset-11 {
        margin-left: 91.666667% !important;
    }

    /* === Guttery / odstępy między kolumnami ===
     Działa gdy używasz BS5 (g-*) lub BS4 (no-gutters / px-*) – tu robimy printowe odpowiedniki. */

    /* usuń całe guttery w druku */
    .print-g-0,
    .print-gx-0 {
        --bs-gutter-x: 0 !important;
    }

    .print-g-0,
    .print-gy-0 {
        --bs-gutter-y: 0 !important;
    }

    /* ustaw typowe wartości BS5 (0..5) */
    .print-g-1,
    .print-gx-1 {
        --bs-gutter-x: .25rem !important;
    }

    .print-g-1,
    .print-gy-1 {
        --bs-gutter-y: .25rem !important;
    }

    .print-g-2,
    .print-gx-2 {
        --bs-gutter-x: .5rem !important;
    }

    .print-g-2,
    .print-gy-2 {
        --bs-gutter-y: .5rem !important;
    }

    .print-g-3,
    .print-gx-3 {
        --bs-gutter-x: 1rem !important;
    }

    .print-g-3,
    .print-gy-3 {
        --bs-gutter-y: 1rem !important;
    }

    .print-g-4,
    .print-gx-4 {
        --bs-gutter-x: 1.5rem !important;
    }

    .print-g-4,
    .print-gy-4 {
        --bs-gutter-y: 1.5rem !important;
    }

    .print-g-5,
    .print-gx-5 {
        --bs-gutter-x: 3rem !important;
    }

    .print-g-5,
    .print-gy-5 {
        --bs-gutter-y: 3rem !important;
    }

    /* jeśli Twoja wersja BS nie używa CSS varów gutterów,
     możesz też awaryjnie wyzerować padding w kolumnach: */
    .print-no-col-padding>[class*="col"] {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* === Print utilities: pokaż/ukryj === */
    .d-print-none {
        display: none !important;
    }

    .d-print-block {
        display: block !important;
    }

    .d-print-inline {
        display: inline !important;
    }

    .d-print-inline-block {
        display: inline-block !important;
    }

    .d-print-flex {
        display: flex !important;
    }

    /* === Łamanie stron === */
    .print-break-before {
        break-before: page !important;
        page-break-before: always !important;
    }

    .print-break-after {
        break-after: page !important;
        page-break-after: always !important;
    }

    .print-avoid-break {
        break-inside: avoid !important;
        page-break-inside: avoid !important;
    }

    /* opcjonalnie: tła i kolory w druku (Chrome często je wycina) */
    .print-colors {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .m-print-0 {
        margin: 0 !important;
    }

    .p-print-0 {
        padding: 0 !important;
    }

    .print-container-fluid {
        --bs-gutter-x: 1.5rem !important;
        --bs-gutter-y: 0 !important;
        width: 100% !important;
        padding-right: calc(var(--bs-gutter-x) * 0.5) !important;
        padding-left: calc(var(--bs-gutter-x) * 0.5) !important;
        margin-right: auto !important;
        margin-left: auto !important;
        max-width: 100% !important;
    }

    .bip-metryka,
    .metryka {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    p,
    li {
        orphans: 3;
        widows: 3;
    }

    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        break-after: avoid;
        page-break-after: avoid;
    }

    h1+p,
    h2+p,
    h3+p,
    h4+p,
    h5+p,
    h6+p {
        break-before: avoid;
        page-break-before: avoid;
    }

    /* i analogicznie, jeśli po nagłówku bywa lista */
    h1+ul,
    h1+ol,
    h2+ul,
    h2+ol,
    h3+ul,
    h3+ol,
    h4+ul,
    h4+ol,
    h5+ul,
    h5+ol,
    h6+ul,
    h6+ol {
        break-before: avoid;
        page-break-before: avoid;
    }

}