html,
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* -----------------------------
   TOP LOGOS
----------------------------- */
.top-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    /* wycentrowany pasek */
    gap: 60px;
    /* odstępy między elementami */
    padding: 10px 0;
    background: #fff;
}

/* wszystkie logotypy poza cofunlogo */
.top-logos img:not(.cofun) {
    max-height: 100px;
    width: auto;
    object-fit: contain;
}

/* cofunlogo + napis */
.title-with-logo {
    display: flex;
    align-items: center;
    /* wyrównanie pionowe */
    gap: 30px;
}

.title-with-logo img {
    max-height: 70px;
    /* duże logo */
    width: auto;
    object-fit: contain;
}

.title-with-logo h1 {
    font-size: 32px;
    /* proporcjonalne do logo */
    margin: 0;
    line-height: 1;
}

/* -----------------------------
   TOP BAR
----------------------------- */
.top-bar {
    background: #f4f4f4;
    padding: 5px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 30px;
}

.top-bar .flags img,
.top-bar .partners img {
    height: 20px;
    margin-left: 10px;
}

.top-bar .partners img {
    height: 40px;
    margin-left: 15px;
    object-fit: contain;
}

/* -----------------------------
   NAVBAR
----------------------------- */
nav {
    background: #e9e9e9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 18px;
    position: relative;
    z-index: 20;
}


.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 80%;
}

.logo img {
    height: 90px;
    width: auto;
    max-width: 100%;
}

.logo span {
    font-weight: bold;
    font-size: 18px;
    color: #333;
}

.menu {
    display: none;
    flex-direction: column;
    background: #e9e9e9;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    padding: 10px 0;
    z-index: 30;
    list-style: none !important;
    margin: 0;
    padding: 0;
}


.menu li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 10px 14px;
    border-radius: 4px;
    transition: background 0.3s;
}

.menu li a.active {
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.menu li a:hover {
    background: #ddd;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    order: 2;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #333;
    border-radius: 2px;
}

/* -----------------------------
   MAIN / HERO
----------------------------- */
main {
    flex: 1;
    padding: 20px;
}

.hero {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.hero img {
    width: 100%;
    height: auto;
    display: block;
}

/* -----------------------------
   LINKS SECTION
----------------------------- */
.links {
    max-width: 1000px;
    margin: 60px auto;
    padding: 40px 30px;
    background: #f8f9fa;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.links h1 {
    font-size: 32px;
    color: #222;
    margin-bottom: 30px;
    border-bottom: 3px solid #00b894;
    display: inline-block;
    padding-bottom: 6px;
}

.links a {
    display: block;
    text-decoration: none;
    color: #007bff;
    font-weight: 600;
    font-size: 18px;
    margin: 10px auto;
    padding: 12px 20px;
    border-radius: 8px;
    background: #ffffff;
    width: fit-content;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.links a:hover {
    background: #00b894;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}


/* -----------------------------
   STOPKA
----------------------------- */
.footer {
    background-color: #1b1b1b;
    color: #fff;
    padding: 40px 20px 20px 20px;
    font-family: Arial, sans-serif;
    position: relative;
    z-index: 1;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    gap: 20px;
}

.footer-about,
.footer-links,
.footer-contact {
    flex: 1 1 250px;
    margin: 10px 0;
}

.footer h3 {
    color: #00b894;
    margin-bottom: 15px;
}

.footer p {
    color: #fff;
    text-decoration: none;
    line-height: 1.6;
}

.footer a {
    color: #16ebc0;
    text-decoration: none;
    line-height: 1.6;
}

.footer a:hover {
    color: #00b894;
}

.socials a {
    display: inline-block;
    margin-right: 10px;
}

.socials img {
    width: 28px;
    height: 28px;
    filter: brightness(0) invert(1);
    transition: 0.3s;
}

.socials img:hover {
    filter: brightness(0) invert(0.5);
}

.footer-bottom {
    text-align: center;
    margin-top: 30px;
    font-size: 14px;
    border-top: 1px solid #333;
    padding-top: 15px;
}

/* -----------------------------
   RESPONSYWNOŚĆ DOJECHANA
----------------------------- */

/* LAPTOPY / DUŻE TABLETY */
@media (max-width: 1024px) {
    .title-with-logo h1 {
        font-size: 26px;
    }

    .top-logos {
        gap: 40px;
    }

    .menu {
        gap: 8px;
    }
}

/* TABLETY / ŚREDNIE EKRANY */
@media (max-width: 900px) {
    .top-logos {
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
        text-align: center;
    }

    .top-logos img:not(.cofun) {
        max-width: 25vw;
        max-height: 70px;
        width: auto;
        height: auto;
    }

    .title-with-logo {
        flex-direction: column;
        gap: 10px;
    }

    .title-with-logo img {
        max-width: 30vw;
        max-height: 60px;
        width: auto;
        height: auto;
    }

    .title-with-logo h1 {
        font-size: 22px;
        text-align: center;
    }

    .menu {
        display: none;
        flex-direction: column;
        background: #e9e9e9;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        padding: 10px 0;
        z-index: 10;
    }

    .menu.show {
        display: flex;
    }

    .menu li a {
        width: 100%;
        text-align: center;
        padding: 12px;
        font-size: 18px;
    }

    .hamburger {
        display: flex;
    }

    .hero img {
        width: 100%;
        height: auto;
        max-height: 70vh;
        object-fit: cover;
    }
}

/* TELEFONY DO 768px */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        align-items: flex-start;
    }

    .top-bar {
        flex-direction: column;
        gap: 10px;
        font-size: 20px;
    }

    .top-logos img:not(.cofun),
    .title-with-logo img {
        max-width: 35vw;
        max-height: 55px;
        width: auto;
        height: auto;
    }

    .title-with-logo h1 {
        font-size: 20px;
        text-align: center;
    }

    .hero img {
        width: 100%;
        height: auto;
        max-height: 50vh;
        object-fit: contain;
    }

    .footer-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-about,
    .footer-links,
    .footer-contact {
        flex: 1 1 100%;
    }

    .footer-bottom {
        width: 100%;
    }

    .socials {
        margin-top: 15px;
    }

    .socials a {
        margin: 5px 10px 0 0;
    }
}

/* MAŁE TELEFONY (IPHONE SE, < 480px) */
@media (max-width: 480px) {
    .logo img {
        height: 40px;
        width: auto;
    }

    .logo span {
        font-size: 12px;
    }

    .top-logos {
        gap: 10px;
        flex-wrap: wrap;
    }

    .top-logos img:not(.cofun),
    .title-with-logo img {
        max-width: 28vw;
        /* każde logo max 28% szerokości ekranu */
        max-height: 40px;
        width: auto;
        height: auto;
    }

    .title-with-logo h1 {
        font-size: 14px;
        text-align: center;
        word-break: break-word;
        /* nie rozwala layoutu */
    }

    .menu li a {
        padding: 8px;
        font-size: 15px;
    }

    .hero img {
        width: 100%;
        height: auto;
        max-height: 35vh;
        /* mniejszy, nie zasłania całego ekranu */
        object-fit: contain;
    }

    .footer {
        padding: 15px 8px;
        font-size: 12px;
    }

    .footer-bottom {
        font-size: 11px;
    }
}

@media (max-width: 768px) {
    .links {
        padding: 25px 15px;
        margin: 40px 15px;
    }

    .links h1 {
        font-size: 26px;
    }

    .links a {
        font-size: 16px;
        padding: 10px 14px;
    }
}

/* --- FIX HAMBURGER MENU --- */
@media (max-width: 1311px) {
    nav {
        position: relative;
        /* kluczowe - kotwica dla absolutnego menu */
        z-index: 1000;
    }

    .hamburger {
        display: flex;
        flex-direction: column;
        cursor: pointer;
        gap: 5px;
        z-index: 1100;
        /* nad menu */
    }

    .hamburger span {
        width: 28px;
        height: 3px;
        background: #333;
        border-radius: 2px;
    }

    .menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        /* dokładnie pod paskiem */
        left: 0;
        width: 100%;
        background: #e9e9e9;
        padding: 10px 0;
        z-index: 1050;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    }

    .menu.show {
        display: flex;
    }

    .menu li a {
        display: block;
        width: 100%;
        text-align: center;
        padding: 12px 0;
        border-bottom: 1px solid #ccc;
    }
}

/* --- NAPRAWA MENU NA DESKTOPOWYCH EKRANACH --- */
@media (min-width: 1311px) {
    .menu {
        display: flex !important;
        position: static !important;
        flex-direction: row;
        width: auto;
        background: none;
        box-shadow: none;
        padding: 0;
    }

    .hamburger {
        display: none !important;
    }
}