/* Proste resetowanie stylów */
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    background-color: #f4f4f4;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /* Baza: 18px (1.125 * 16px) */
    font-size: 1.125rem; 
}

/* === Style dla Skip Links === */
.skip-links {
    position: relative;
    z-index: 9999; 
}

.skip-links a {
    position: absolute;
    left: -9999px; 
    top: 0;
    padding: 0.625rem 0.9375rem; 
    background-color: #4068BA;
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-radius: 0 0 0.25rem 0.25rem; 
}

.skip-links a:focus {
    left: 0.625rem; 
}
/* ==================================== */


/* ----- Pasek Nawigacyjny ----- */
.navbar {
    background-color: #ffffff; 
    color: #4068BA;
    padding: 0.625rem 1.25rem; 
    display: flex;
    justify-content: flex-start; 
    align-items: center; 
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #ddd; 
    gap: 1.25rem; 
    flex-wrap: wrap; 
}

.navbar .logo {
    height: 5rem; 
    width: auto; 
    display: block; 
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 0.9375rem; 
}

.nav-title {
    color: #4068BA;
    font-size: 1.546875rem; 
    font-weight: bold;
    padding-right: 0; 
}

.nav-links a {
    color: #4068BA;
    text-decoration: none;
    padding: 0 0.9375rem; 
    font-size: 1.265625rem; 
    font-weight: bold;
}

.nav-links a:hover {
    text-decoration: underline;
}

/* === ZMIANA: Kontrast ramki (WCAG 3:1) === */
.search-container input[type=text] {
    padding: 0.625rem 0.9375rem; 
    font-size: 1rem; 
    /* Zmieniono #ccc na #767676 dla kontrastu 4.04:1 */
    border: 1px solid #767676; 
    border-radius: 0.25rem; 
    width: 18.75rem; 
}
/* ======================================= */


.container {
    padding: 1.25rem; 
    flex-grow: 1; 
}

/* ----- Tabela ----- */
#dataTable {
    width: 100%;
    border-collapse: collapse; 
    background-color: white;
    box-shadow: 0 0.125rem 0.3125rem rgba(0,0,0,0.1); 
}

#dataTable th, #dataTable td {
    border: 1px solid #ddd; 
    padding: 0.75rem 0.625rem; 
    text-align: left;
    word-break: break-word;
}

#dataTable th {
    background-color: #4068BA;
    color: white;
    font-weight: bold;
    position: sticky;
    top: 6.375rem; 
    z-index: 98; 
}

#dataTable tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

#dataTable tbody tr:hover {
    background-color: #dbe9ff; 
}

/* ----- Stopka ----- */
footer {
    text-align: center;
    padding: 1.25rem; 
    background-color: #f8f9fa;
    border-top: 1px solid #ddd; 
    margin-top: auto; 
    width: 100%;
    box-sizing: border-box;
}

footer p {
    margin: 0.3125rem 0; 
    color: #555;
}

footer a {
    color: #4068BA;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* ----- Podstrony (Polityka) ----- */
.content-page {
    padding: 1.25rem 1.875rem; 
    max-width: 56.25rem; 
    margin: 1.25rem auto; 
    background-color: #fff;
    border-radius: 0.5rem; 
    box-shadow: 0 0.125rem 0.3125rem rgba(0,0,0,0.1); 
    line-height: 1.6;
}

.content-page h1 {
    color: #4068BA;
    border-bottom: 2px solid #4068BA; 
    padding-bottom: 0.625rem; 
    font-size: 1.75rem; 
}

.content-page h2 {
    color: #4068BA;
    margin-top: 1.875rem; 
    font-size: 1.375rem; 
}


/* Klasa "sr-only" (Dla czytników ekranu - WCAG) */
.sr-only {
  position: absolute;
  width: 1px; 
  height: 1px; 
  padding: 0;
  margin: -1px; 
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}


/* ----- RESPONSIVE (MOBILE) ----- */
@media (max-width: 48rem) { /* 768px */

    .navbar {
        /* Style dziedziczone */
    }
    
    .nav-left {
        width: 100%;
        justify-content: center; 
        flex-wrap: wrap; 
        margin-bottom: 0.625rem; 
    }
    
    .navbar .logo {
        height: 3.125rem; 
    }

    .search-container {
        width: 100%;
    }

    .search-container input[type=text] {
        width: 100%;
        box-sizing: border-box; 
    }
    
    .container {
        padding: 0.625rem; 
    }
    
    /* Układ kart dla tabeli */
    #dataTable {
        border: none;
        box-shadow: none;
    }

    #dataTable thead {
        display: none;
    }

    #dataTable tr {
        display: block;
        margin-bottom: 0.9375rem; 
        border: 1px solid #ccc; 
        border-radius: 0.25rem; 
        box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.05); 
        background-color: #fff;
    }

    #dataTable td {
        display: block;
        text-align: left;
        border: none;
        border-bottom: 1px dotted #eee; 
        padding: 0.75rem; 
    }

    #dataTable td:last-child {
        border-bottom: none;
    }

    /* Wyróżnienie "Nazwa badania" */
    #dataTable tbody tr td:nth-of-type(1) {
        background-color: #f0f4fb;
        font-weight: bold;
        font-size: 1.1em; 
        color: #003366;
        border-bottom: 1px solid #ddd; 
        border-top-left-radius: 0.25rem; 
        border-top-right-radius: 0.25rem; 
    }

    /* Dodanie etykiet (nagłówków) */
    #dataTable tbody tr td::before {
        content: attr(data-label);
        display: block;
        font-weight: bold;
        margin-bottom: 0.3125rem; 
        color: #4068BA;
    }
    
    #dataTable tbody tr td:nth-of-type(1)::before {
        content: "";
        margin-bottom: 0;
    }
    #dataTable tbody tr td:nth-of-type(2)::before {
        content: "Miejsce wykonywania badania:";
    }
    #dataTable tbody tr td:nth-of-type(3)::before {
        content: "Przygotowania pacjenta do badania:";
    }
    
    #dataTable th {
        position: static;
    }
}