.logo {
    padding: 15px 0;
}

.logo img {
    height: 40px;
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: scale(1.05);
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    position: relative;
    margin-left: 30px;
}

nav ul li a {
    display: block;
    padding: 25px 10px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

nav ul li a:before {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 15px;
    left: 10px;
    background-color: #0066cc;
    transition: width 0.3s ease;
}

nav ul li a:hover {
    color: #0066cc;
}

nav ul li a:hover:before {
    width: calc(100% - 20px);
}

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    width: 300px;
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: all 0.5s ease;
    z-index: 10;
}

.dropdown:hover .dropdown-content {
    max-height: 300px;
    opacity: 1;
}

.dropdown-content a {
    display: block;
    padding: 15px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #eee;
    transition: all 0.3s ease;
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background-color: #f5f9ff;
    padding-left: 20px;
    color: #0066cc;
}

.dropdown > a:after {
    content: '→';
    margin-left: 5px;
    display: inline-block;
    transition: transform 0.3s ease;
}

.dropdown:hover > a:after {
    transform: rotate(90deg);
}

.menu-icon {
    display: none;
    cursor: pointer;
    padding: 10px;
}

.menu-icon div {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* Overlay dla menu mobilnego */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 90;
}

.mobile-overlay.active {
    display: block;
}

/* Responsywność */
@media (max-width: 768px) {
    nav {
        position: fixed;
        top: 70px;
        left: 0;
        background-color: #fff;
        width: 100%;
        height: auto;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s ease;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        z-index: 95;
    }

    nav.mobile-active {
        max-height: 80vh; /* Wysokie menu, ale nie pełny ekran */
        overflow-y: auto;
    }

    nav ul {
        flex-direction: column;
        padding: 0;
        margin: 0;
    }

    nav ul li {
        margin: 0;
        width: 100%;
        border-bottom: 1px solid #eee;
    }

    nav ul li a {
        padding: 15px 20px;
    }

    .dropdown-content {
        position: static;
        width: 100%;
        box-shadow: none;
        background-color: #f9f9f9;
        padding-left: 20px;
        max-height: 0;
        opacity: 0;
        overflow: hidden;
    }

    .dropdown.open .dropdown-content {
        max-height: 500px;
        opacity: 1;
    }

    .menu-icon {
        display: block;
    }

    .menu-icon.active div:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .menu-icon.active div:nth-child(2) {
        opacity: 0;
    }

    .menu-icon.active div:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    nav ul li a:before {
        bottom: 5px;
    }
}