*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow-x: hidden;
    font-family: 'Ubuntu', sans-serif;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main.container {
    flex: 1;
    padding-top: 15px;
    padding-bottom: 15px;
    text-align: center;
}


/* ================= TOP BAR ================= */

.top-image-bar {

}

    .top-image-bar img {
        width: 100%;
    }

/* ================= NAVBAR ================= */

.navbar {
    border-bottom: none !important;
}

    .navbar .container {
        border-bottom: 1px solid #dee2e6;
    }

/* ================= TEKST ŚRODKOWY ================= */

main.container p {
    font-size: 0.8rem;
    line-height: 1.6;
    max-width: 850px;
    margin: 0 auto 0px auto;
}

main.container h1,
main.container h2,
main.container h3 {
    font-size: 1.8rem;
}

/* ================= KOT ================= */

.cat-img {
    margin: 0 0 10px auto;
    max-width: 350px;
}

/* ================= BUTTON ================= */

main .btn {
    font-size: 1rem;
    padding: 8px 24px;
}

.btn-orange {
    background-color: #EB5D04;
    color: white;
}

    .btn-orange:hover {
        background-color: #cf5102;
        color: white;
    }
/* ================= FOOTER ================= */

.footer {
    padding: 20px 0 12px 0;
    background: #fff;
}

.footer-inner {
    border-top: 1px solid #dee2e6;
    padding-top: 10px;
}

.footer-logos img {
    width: 100%;
    max-width: 100%;
}

.footer-copy {
    margin-top: 10px;
    font-size: 13px;
    text-align: center;
}

/* ================= WCAG ================= */

:focus-visible {
    outline: 3px solid #ffbf00;
    outline-offset: 3px;
}

body.wcag-contrast {
    background-color: #000;
    color: #fff;
}

    body.wcag-contrast * {
        color: #fff !important;
    }

    body.wcag-contrast .navbar .container,
    body.wcag-contrast .footer-inner {
        border-color: #fff;
    }

    body.wcag-contrast a {
        color: #00ffff !important;
        text-decoration: underline;
    }
/* =========================================================
   HEADER – WCAG FIX (bez ruszania ikon)
========================================================= */

.navbar .container {
    display: flex;
    align-items: center;
}

.navbar-nav {
    align-items: center;
}

    .navbar-nav.ms-auto {
        margin-left: auto;
    }

/* przycisk tylko ramka i rozmiar – bez tła */
.wcag-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* blokuje rozlanie */
}

    .wcag-btn:hover {
        background-color: #f1f3f5;
    }
.wcag-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
    .wcag-btn img,
    .wcag-btn svg {
        width: 18px !important;
        height: 18px !important;
        max-width: 18px !important;
        max-height: 18px !important;
        object-fit: contain;
        display: block;
    }

    .wcag-btn img {
        width: 18px;
        height: 18px;
        object-fit: contain;
    }

    .wcag-btn:hover {
        background-color: #f1f3f5;
    }

/* ================= MOBILE ================= */

@media (max-width: 768px) {

    main.container {
        padding-top: 20px;
        padding-bottom: 30px;
    }

    .cat-img,
    .auth-cat-img {
        max-width: 170px;
    }

    main.container p {
        font-size: 1rem;
    }
}
/* =========================================================
   MISJE – LISTA OBRAZKOWA (KREATYWNOŚĆ, PAMIĘĆ ITD.)
========================================================= */
/* =========================================================
   MISJE – KOTY 2x2 RESPONSYWNE
========================================================= */

.misje-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    justify-items: center;
    align-items: center;
}

/* SKALOWANIE OBRAZKÓW */
.misja-image-btn img {
    width: 100%;
    max-width: 250px;
    height: auto;
    transition: transform 0.2s ease;
}

.misja-image-btn:hover img {
    transform: scale(1.05);
}

/* TABLET */
@media (max-width: 992px) {
    .misja-image-btn img {
        max-width: 260px;
    }
}

/* MOBILE */
@media (max-width: 768px) {
    .misje-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .misja-image-btn img {
        max-width: 240px;
    }
}


.misja-image-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    transition: 0.2s ease;

}



.misja-caption {
    margin-top: 14px;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
}


/* =========================================================
   TABELKI – ESTETYKA
========================================================= */

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

    table thead th {
        background: #f8f9fa;
        font-weight: 600;
        padding: 14px;
        border-bottom: 2px solid #dee2e6;
    }

    table tbody td {
        padding: 14px;
        border-bottom: 1px solid #dee2e6;
    }

    table tbody tr:hover {
        background: #f5f7fa;
    }


/* =========================================================
   AKCJE W TABELACH (PRZYCISKI PO PRAWEJ)
========================================================= */

.table-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

    .table-actions .btn {
        font-size: 1rem;
        padding: 8px 18px;
    }


/* =========================================================
   PRZYCISKI – LEPSZY WYGLĄD
========================================================= */

.btn {
    border-radius: 8px;
    font-weight: 500;
}

.btn-primary {
    background-color: #50A03C;
    --bs-btn-border-color: #50A03C !important;
    --bs-btn-hover-bg: #237823 !important;
    --bs-btn-hover-border-color: #237823 !important;
    --bs-btn-active-bg: #237823 !important;
    --bs-btn-active-border-color: #237823 !important;
}

.btn-success {
    background-color: #198754;
}

.btn-secondary {
    background-color: #6c757d;
}


/* =========================================================
   ADMIN / OCENIONE GRUPY
========================================================= */

.page-title {
    font-size: 26px;
    font-weight: 600;
    margin-top: 30px;
    margin-bottom: 20px;
}

.admin-section {
    margin-top: 40px;
}


/* =========================================================
   RADIO – ESTETYKA (OCENY)
========================================================= */

.punkt span {
    min-width: 42px;
    padding: 8px 14px;
    border-radius: 8px;
}

.punkt input[type="radio"]:checked + span {
    background-color: #ffbf00;
    border-color: #ffbf00;
    color: #fff;
}


/* =========================================================
   RESPONSYWNOŚĆ DLA TABEL
========================================================= */

@media (max-width: 768px) {

    table thead {
        display: none;
    }

    table,
    table tbody,
    table tr,
    table td {
        display: block;
        width: 100%;
    }

        table tr {
            margin-bottom: 20px;
            background: #fff;
            border: 1px solid #dee2e6;
            border-radius: 10px;
            padding: 10px;
        }

        table td {
            border: none;
            padding: 6px 10px;
        }

    .table-actions {
        justify-content: center;
    }
}
/* =========================================================
   KOLORY PRZYCISKÓW – WYMUSZENIE
========================================================= */

.btn-success {
    background-color: #198754 !important;
    border-color: #198754 !important;
    color: #ffffff !important;
}

    .btn-success:hover {
        background-color: #157347 !important;
        border-color: #146c43 !important;
    }

.btn-secondary {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: #ffffff !important;
}

    .btn-secondary:hover {
        background-color: #5c636a !important;
        border-color: #565e64 !important;
    }

/* =========================================================
   KAFLE WSKAŹNIKÓW (CZERWONE)
========================================================= */

.tiles {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 15px;
    margin-bottom: 15px;
}

.tile {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 16px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 10px;
    text-decoration: none;
    transition: 0.2s ease;
    color: #ffffff !important;
}

/* KOLORY MISJI */
.misja-kultura .tile {
    background-color: #e6414b;
}

.misja-przedsiebiorczosc .tile {
    background-color: #fbda2f;
}

.misja-technologie .tile {
    background-color: #14b4f0;
}

.misja-zdrowie .tile {
    background-color: #78c831;
}

/* HOVER */
.tile:hover {
    transform: translateY(-3px);
    filter: brightness(0.95);
}

/* MOBILE */
@media (max-width: 768px) {
    .tiles {
        grid-template-columns: 1fr;
    }
}
.back-btn {
    display: inline-block;
    text-decoration: underline;
    font-weight: 500;
    cursor: pointer;
}

    .back-btn:hover {
        text-decoration: none;
    }
#wskazniki-container h3 {
    text-align: left;
}
/* =========================================================
   WIDOK OCENY – UKŁAD LEWY (NIE CENTROWANY)
========================================================= */

form {
    text-align: left !important;
}
    form .btn-next {
        display: inline-block;
    }
h4 {
    text-align: left;
    margin-top: 20px;
}

.skala {
    margin-top: 30px;
}

.skala-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 15px;
    text-align: left;
}

.pytanie {
    margin-bottom: 18px;
    text-align: left;
}

    .pytanie > div {
        margin-bottom: 6px;
    }

/* RADIO – ŁADNIE W RZĘDZIE */
.punkt {
    display: inline-flex;
    align-items: center;
    margin-right: 10px;
    cursor: pointer;
}

    .punkt input[type="radio"] {
        display: none;
    }

    .punkt span {
        display: inline-block;
        min-width: 42px;
        padding: 8px 14px;
        border-radius: 8px;
        border: 1px solid #ced4da;
        background: #f8f9fa;
        text-align: center;
        transition: 0.2s ease;
    }

    /* zaznaczone */
    .punkt input[type="radio"]:checked + span {
        background-color: #ffbf00;
        border-color: #ffbf00;
        color: #fff;
    }

    /* hover */
    .punkt span:hover {
        background: #e9ecef;
    }

/* =========================================================
   PRZYCISK DÓŁ – JAK WCZEŚNIEJ
========================================================= */

.btn-next {
    margin-top: 30px;
    padding: 10px 28px;
    font-size: 1rem;
    border-radius: 8px;
    border: none;
    background-color: #198754;
    color: #fff;
    cursor: pointer;
    transition: 0.2s ease;
}

    .btn-next:disabled {
        background-color: #adb5bd;
        cursor: not-allowed;
    }

    .btn-next:not(:disabled):hover {
        background-color: #157347;
    }
/* =========================================================
   LOGOWANIE
========================================================= */

.auth-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 40px;
}

    /* formularz węższy i na środku */
    .auth-container form {
        width: 100%;
        max-width: 420px;
        text-align: left;
    }

    /* odstępy */
    .auth-container .form-group {
        margin-bottom: 18px;
    }

/* przyciski */
.auth-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

/* link hasła */
.auth-link {
    font-size: 0.95rem;
    text-decoration: underline;
}

/* kot */
.auth-cat-img {
    margin-top: 40px;
    max-width: 180px;
}
/* =========================================================
   HEADER – FINAL FIX
========================================================= */

.navbar .container {
    display: flex;
    align-items: center;
}

/* prawa strona zawsze przyklejona do prawej */
.navbar-nav {
    align-items: center;
}

    .navbar-nav.ms-auto,
    .navbar-nav:last-child {
        margin-left: auto;
    }

    /* odstęp między loginem a ikonami */
    .navbar-nav .nav-link {
        padding: 0.5rem 0.75rem;
    }
.red {
    color: #e6414b;
}

/* WCAG BUTTONS – mniejsze i lżejsze */
.wcag-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    background-color: #f8f9fa;
    cursor: pointer;
    transition: 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .wcag-btn:hover {
        background-color: #e9ecef;
    }

/* żeby nie były za blisko tekstu */
.navbar-nav .nav-item.d-flex {
    margin-left: 8px;
    margin-bottom: 5px;
}
/* =========================================================
   WCAG – POPRAWKA (NIE RUSZA LAYOUTU)
========================================================= */

/* POWIĘKSZANIE CZCIONKI – GLOBALNE */
html.wcag-font {
    font-size: 115%;
}

/* KONTRAST – tylko kolory, bez ruszania układu */
body.wcag-contrast {
    background-color: #000 !important;
    color: #fff !important;
}

    /* tekst */
    body.wcag-contrast p,
    body.wcag-contrast h1,
    body.wcag-contrast h2,
    body.wcag-contrast h3,
    body.wcag-contrast h4,
    body.wcag-contrast h5,
    body.wcag-contrast span,
    body.wcag-contrast label,
    body.wcag-contrast div {
        color: #fff !important;
    }

    /* header i footer */
    body.wcag-contrast .navbar,
    body.wcag-contrast .footer {
        background-color: #000 !important;
    }

        body.wcag-contrast .navbar .container,
        body.wcag-contrast .footer-inner {
            border-color: #fff !important;
        }

    /* linki */
    body.wcag-contrast a {
        color: #00ffff !important;
        text-decoration: underline !important;
    }

    /* przyciski */
    body.wcag-contrast .btn,
    body.wcag-contrast .btn-next {
        background-color: #fff !important;
        color: #000 !important;
        border: 2px solid #fff !important;
    }

    /* inputy */
    body.wcag-contrast input,
    body.wcag-contrast textarea {
        background-color: #000 !important;
        color: #fff !important;
        border: 2px solid #fff !important;
    }
    /* =========================================================
   WCAG – TABELA FIX (czytelność + bez hover)
========================================================= */

    body.wcag-contrast table thead th {
        background-color: #000 !important;
        color: #ffffff !important;
        border-bottom: 2px solid #ffffff !important;
    }

    body.wcag-contrast table tbody td {
        color: #ffffff !important;
        border-bottom: 1px solid #ffffff !important;
    }

    body.wcag-contrast table tbody tr:hover {
        background-color: transparent !important;
    }
    /* =========================================================
   WCAG – RADIO BUTTONY (0/1/2)
========================================================= */

    body.wcag-contrast .punkt span {
        background-color: #000 !important;
        border: 2px solid #ffffff !important;
        color: #ffffff !important;
    }

        body.wcag-contrast .punkt span:hover {
            background-color: #111 !important;
        }

    body.wcag-contrast .punkt input[type="radio"]:checked + span {
        background-color: #ffbf00 !important;
        border-color: #ffbf00 !important;
        color: #000 !important;
    }


.pdf-download {
    text-align: left;
}

.pdf-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 600;
    color: black;
}

.pdf-icon {
    width: 28px;
    height: 28px;
}

.pdf-link:hover {
    text-decoration: underline;
}
/* =========================================================
   PANEL ADMINA – SPÓJNY Z RESZTĄ
========================================================= */

.admin-filters-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin-top: 30px;
    margin-bottom: 20px;
    text-align: left;
}

.filter-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.filter-full {
    grid-column: 1 / -1;
    margin-top: 10px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .filter-group label {
        font-weight: 600;
        font-size: 0.95rem;
    }

    /* SELECT – wygląd zgodny z systemem */

    .filter-group select {
        width: 100%;
        padding: 8px 12px;
        border-radius: 8px;
        border: 1px solid #ced4da;
        background-color: #fff;
        font-size: 0.95rem;
        transition: 0.2s ease;
    }

        .filter-group select:focus {
            border-color: #50A03C;
            outline: none;
            box-shadow: 0 0 0 2px rgba(13,110,253,.15);
        }

        /* delikatny hover */
        .filter-group select:hover {
            border-color: #adb5bd;
        }

/* RESPONSYWNOŚĆ */

@media (max-width: 768px) {
    .admin-filters-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}


/* =========================================================
   WYBÓR LICZBY DZIECI – RESPONSYWNA SIATKA
========================================================= */

.question {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: left;
}

/* siatka przycisków */
.numbers {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 25px;
}

/* pojedynczy przycisk liczby */
.number-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 55px;
    border-radius: 10px;
    border: 1px solid #ced4da;
    background: #f8f9fa;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
    user-select: none;
}

    /* hover */
    .number-btn:hover {
        background-color: #e9ecef;
    }

    /* wybrany */
    .number-btn.selected {
        background-color: #50A03C;
        border-color: #50A03C;
        color: #fff;
    }

/* MOBILE – większe pola */
@media (max-width: 768px) {
    .numbers {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    }

    .number-btn {
        height: 50px;
    }
}
/* =========================================================
   WYBÓR TYPU OCENY – PRZYCISKI
========================================================= */

.choices {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    justify-content: flex-start; /* do lewej */
}

    /* nadpisujemy tylko tutaj */
    .choices .tile {
        min-width: 220px;
        padding: 14px 28px;
        font-size: 1rem;
        border-radius: 10px;
        font-weight: 600;
        border: none !important;
        outline: none !important;
        box-shadow: none !important;
    }
        .choices .tile:focus {
            outline: none !important;
            box-shadow: 0 0 0 3px rgba(13,110,253,.25); /* delikatny focus */
        }
        /* pierwszy – niebieski */
        .choices .tile:first-child {
            background-color: #0d6efd;
            color: #fff !important;
        }

            .choices .tile:first-child:hover {
                background-color: #0b5ed7;
            }

        /* drugi – zielony */
        .choices .tile:last-child {
            background-color: #50A03C;
            color: #fff !important;
        }

            .choices .tile:last-child:hover {
                background-color: #237823;
            }

/* mobile */
@media (max-width: 768px) {
    .choices {
        flex-direction: column;
        align-items: flex-start;
    }

        .choices .tile {
            width: 100%;
            max-width: 320px;
        }
}
