/*
 * [miniPHP]
 * Szablon graficzny Light — wersja dostępna
 *
 * Projektowane z myślą o WCAG 2.2 / EN 301 549, poziom AA.
 * Zachowane identyfikatory używane przez system:
 * #kontener
 * #header
 * #menu
 * #kolumna1
 * #kolumna2
 * #footer
 * #footercol1
 * #footercol2
 */

html {
    box-sizing: border-box;
    font-size: 100%;
    scroll-behavior: smooth;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

body {
    margin: 0;
    padding: 1rem;
    background: #ffffff;
    color: #202124;
    font-family:
        Tahoma,
        Verdana,
        Arial,
        Helvetica,
        sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
}

#kontener {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    background: #ffffff;
}

/* Link umożliwiający pominięcie nawigacji */
.skip-link {
    position: absolute;
    left: 0.75rem;
    top: -5rem;
    z-index: 10000;
    padding: 0.75rem 1rem;
    background: #003b5c;
    color: #ffffff;
    font-weight: 700;
    text-decoration: underline;
    border: 3px solid #ffffff;
}

.skip-link:focus {
    top: 0.75rem;
}

/* Nagłówek */
#header {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 300px;
    padding: 1rem;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.62)),
        url('../../img/background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    text-align: center;
}

#header > * {
    position: relative;
    z-index: 1;
}

#header a {
    display: inline-block;
}

#header img {
    display: block;
    width: 800px;       /* <-- Ustaw stałą szerokość dla logo SVG */
    height: auto;        /* <-- Zachowa odpowiednie proporcje */
    margin: 0 auto;
}

#header h1 {
    max-width: 55rem;
    margin: 1rem auto 0;
    color: #ffffff;
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 700;
    line-height: 1.25;
    text-shadow: 0 2px 3px #000000;
}

/* Menu */
#menu {
    margin: 0 0 1.5rem;
    padding: 0.5rem 0 0.75rem;
    border-bottom: 3px solid #7a2d00;
}

#menu ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
}

#menu li {
    display: block;
    margin: 0;
    padding: 0;
    list-style: none;
}

#menu li a {
    display: block;
    min-width: 180px;
    min-height: 2.75rem;
    padding: 0.65rem 1.25rem;
    background: #7a2d00;
    color: #ffffff;
    font-weight: 700;
    text-align: center;
    text-decoration: underline;
    text-underline-offset: 0.15em;
    border: 3px solid #7a2d00;
    border-radius: 0.2rem;
    transition:
        background-color 0.15s ease,
        color 0.15s ease,
        border-color 0.15s ease;
}

#menu li a:hover {
    background: #ffffff;
    color: #5c2100;
    border-color: #5c2100;
}

#menu li a:focus,
#menu li a:focus-visible,
a:focus-visible,
button:focus-visible {
    outline: 3px solid #005fcc;
    outline-offset: 3px;
}

/* Główne kolumny */
#kolumny {
    display: grid;
    grid-template-columns: minmax(220px, 30%) minmax(0, 1fr);
    gap: 1rem;
    margin: 0;
}

#kolumna1,
#kolumna2 {
    min-width: 0;
    padding: 1rem;
}

/* Nagłówki */
#kolumna1 h2,
#kolumna2 h2 {
    margin: 0 0 1rem;
    color: #111111;
    font-size: 1.5rem;
    line-height: 1.3;
}

/* Treść */
.tresc {
    overflow-wrap: break-word;
}

.tresc img {
    max-width: 100%;
    height: auto;
}

/* Linki w treści.
   Podkreślenie zapewnia rozróżnienie od zwykłego tekstu
   niezależnie od percepcji koloru. */
.tresc a,
#footer a {
    color: #004b76;
    text-decoration: underline;
    text-decoration-thickness: 0.12em;
    text-underline-offset: 0.15em;
}

.tresc a:hover,
.tresc a:focus,
#footer a:hover,
#footer a:focus {
    color: #00334f;
}

/* Stopka */
#footer {
    margin-top: 1.5rem;
    padding: 1.25rem 1rem;
    border-top: 2px solid #555555;
    background: #ffffff;
    color: #202124;
    font-style: normal;
    text-align: center;
}

.footer-main {
    margin-bottom: 1rem;
}

.footer-main img {
    max-width: 100%;
    height: auto;
}

.footer-validation {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 1rem;
}

#footercol1,
#footercol2 {
    width: auto;
    padding: 0;
}

#footercol1 img,
#footercol2 img {
    display: block;
}

/* Reklama */
#kontener > ins,
#kontener > iframe {
    max-width: 100%;
}

/* Informacja o cookies */
#cookie-notice {
    position: fixed;
    z-index: 9999;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.7);
}

.cookie-notice-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    width: min(100%, 42rem);
    max-width: 100%;
    padding: 1.25rem 1.5rem;
    background: #ffffff;
    color: #202124;
    border: 3px solid #000000;
    box-shadow: 0 0 0 0.2rem #ffffff;
}

.cookie-notice-content p {
    margin: 0;
    line-height: 1.6;
}

#cookie-ok {
    flex-shrink: 0;
    min-width: 7rem;
    min-height: 2.75rem;
    padding: 0.65rem 1.25rem;
    border: 3px solid #003b5c;
    border-radius: 0.2rem;
    background: #003b5c;
    color: #ffffff;
    font: inherit;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}

#cookie-ok:hover,
#cookie-ok:focus {
    background: #ffffff;
    color: #003b5c;
}

/* Telefony i małe ekrany */
@media (max-width: 700px) {
    body {
        padding: 0.5rem;
    }

    #kolumny {
        grid-template-columns: 1fr;
    }

    #kolumna1,
    #kolumna2 {
        padding: 0.75rem;
    }

    #menu ul {
        display: block;
    }

    #menu li {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    #menu li a {
        width: 100%;
        min-width: 0;
    }

    #header {
        min-height: 0;
    }

    .cookie-notice-content {
        flex-direction: column;
        align-items: stretch;
    }

    #cookie-ok {
        width: 100%;
    }

    .footer-validation {
        gap: 1rem;
    }
}

/* Bardzo małe ekrany */
@media (max-width: 400px) {
    body {
        padding: 0.25rem;
    }

    #header,
    #kolumna1,
    #kolumna2,
    #footer {
        padding: 0.75rem;
    }

    .footer-validation {
        flex-direction: column;
        align-items: center;
    }
}

/* Użytkownik może powiększyć tekst bez utraty układu */
@media (min-width: 701px) {
    .tresc {
        max-width: 75ch;
    }
}

/* Ograniczenie animacji zgodnie z preferencjami użytkownika */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    #menu li a {
        transition: none;
    }
}
