html {
    scroll-behavior: smooth;
}

body {
    background-color: #f4f4f9;
    margin: 0;
    padding: 0;
}

h1 {
    text-align: center;
    margin-top: 30px;
    font-size: 2.5em;
    color: #333;
}

h2 {
    text-align: center;
    margin-top: 40px;
    font-size: 2em;
    color: #333;
}

#header_box {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: auto;
    gap: 5px;
    align-items: center;
    justify-items: center;
    text-align: center;
    padding: 2px;
    background-color: lab(39.33% 5.83 -45.5);
}

.headers {
    display: flex;
    justify-content: center;
    align-items: center;
}

#logo_box{
    height: 76px;
}

.lang-buttons{
    padding-left: 10px;
}

.napis {
    font-size: 28px;
    font-weight: bold;
    color: white;
}

.logo {
    max-width: 100%;
    height: auto;
}

@media (max-width: 480px) {
    html, body {
        max-width: 100vw;
        overflow-x: hidden;
        box-sizing: border-box;
        margin: 0;
        padding: 0;
    }
    #header_box {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(3, auto);
        padding: 10px 5px;
    }
    .headers {
        justify-content: center;
        font-size: 14px !important;
    }
    .logo {
        width: 60%;
        height: auto;
        margin: 0 auto;
    }

    .main-navigation {
        flex-direction: column;
        gap: 10px;
        padding: 10px 10px 20px 10px;
    }
    .nav-links {
        flex-direction: column;
        gap: 12px;
        width: 100%;
        align-items: center;
    }
    .nav-links li a {
        font-size: 1.1em;
    }

    .lang-buttons {
        justify-content: center;
        gap: 15px;
        margin-top: 10px;
    }
    .lang-buttons img {
        width: 30px;
        height: 22px;
    }

    form {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        max-width: 320px;
        margin: 20px auto;
        padding: 0;
        box-sizing: border-box;
        overflow: hidden;
        gap: 15px;
    }

    select, input[type="submit"], .reset_filter {
        width: 100%;
        font-size: 1.2em;
        box-sizing: border-box;
        margin: 0;
        padding: 10px;
        border-radius: 5px;
        border: 1px solid #ccc;
    }

    .ads-container {
        grid-template-columns: 1fr !important;
        padding: 10px;
        gap: 25px;
    }

    .ads {
        padding: 15px;
    }

    .ads img {
        max-width: 100%;
        height: auto;
        border-radius: 8px;
    }

    .pagination {
        padding: 15px 10px;
    }
    .page-number {
        font-size: 18px;
        color: white;
        margin: 0 8px;
    }

    #information_Box {
        font-size: 1em;
        padding: 15px 10px;
    }
    #dane p, #dane a {
        font-size: 1em;
        margin: 5px 0;
    }

    #footer_box {
        height: auto;
        padding: 15px 10px;
        font-size: 0.9em;
    }
}



.main-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f1f1f1;
    padding: 10px 20px;
    border-bottom: 1px solid #ccc;
    flex-wrap: wrap;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.nav-links li a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    transition: color 0.3s ease;
}

.nav-links li a:hover {
    color: #000;
    text-decoration: underline;
}

.lang-buttons {
    display: flex;
    gap: 10px;
}

.lang-buttons button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.lang-buttons img {
    display: block;
    width: 20px;
    height: 15px;
    border-radius: 3px;
    transition: transform 0.2s ease;
}

.lang-buttons img:hover {
    transform: scale(1.1);
}


form {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

select {
    padding: 10px;
    font-size: 1.1em;
    margin-right: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

input[type="submit"] {
    padding: 10px 20px;
    font-size: 1.1em;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    box-sizing: border-box;
}

.reset_filter{
    padding: 10px 20px;
    font-size: 1.1em;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    box-sizing: border-box;
}

input[type="submit"]:hover {
    background-color: #0056b3;
}

.reset_filter:hover{
    background-color: #0056b3;
}

.ads-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 20px;
    margin-top: 30px;
}

@media (max-width: 1024px) {
    .ads-container {
        grid-template-columns: repeat(2, 1fr); 
    }
}

@media (max-width: 768px) {
    .ads-container {
        grid-template-columns: 1fr; 
    }
}

.ads {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    text-align: center;
    padding: 10px;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between; 
    position: relative;
}

.ads:hover{
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2); 
}

.ads img {
    width: 100%; 
    max-width: 450px; 
    height: auto; 
    margin-bottom: 10px; 
}

.h33 {
    font-size: 1.3em;
    color: #333;
    margin: 6px 0;
}

.paragraph {
    font-size: 1.2em;
    color: #007bff;
    margin-bottom: 15px;
}

.page-number{
    font-size: 24px;
    color: white;
}

.next{
    color: white;
    text-decoration: none;
    font-size: 22px;
}

.prev{
    color: white;
    text-decoration: none;
    font-size: 22px; 
}

.pagination{
    padding: 25px;
    height: 25px;
    background-color: lab(39.33% 5.83 -45.5);
    text-align: center;
}

#information_Box{
    text-align: center;
    background-color: #f1f1f1;
    padding: 10px 0;
    text-align: center;
    border-bottom: 1px solid #ccc;
    font-size: 110%;
}

#dane{
    padding: 10px;
    margin-left: 30px;
    text-align: center;
}

#mailname{
    text-decoration: none;
    color: black;
}

#mailname:hover{
    color: #0056b3;
}

#telnum{
    text-decoration: none;
    color: black;
}

#telnum:hover{
    color: #0056b3;
}

#footer_box{
    background-color: lab(39.33% 5.83 -45.5);
    width: 100%;
    padding-top: 10px;
    margin-bottom: 6px;
    text-align: center;
    color: white;
    height: 48px;
}

.new-label {
    position: absolute;
    background-color: #007bff;
    color: white;
    font-weight: bold;
    padding: 5px 10px;
    top: 5px;
    left: 5px;
    border-radius: 5px;
    z-index: 10;
    font-size: 0.8em;
}