*, *::before, *::after {
    box-sizing: border-box;
}

header {
    background: white;
    padding: clamp(10px, 2vw, 15px) clamp(14px, 3vw, 20px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    position: relative;
}


.logo-area {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.img {
    background-image: url("download.png");
    background-size: contain;
    background-repeat: no-repeat;
    width: 40px;
    height: 47px;
    cursor: pointer;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.title {
    font-size: clamp(15px, 2.5vw, 20px);
    font-family: Roboto, Arial, sans-serif;
    margin-left: 10px;
    margin-top: 5px;
    cursor: pointer;
    transition: transform 0.2s ease;
    white-space: nowrap;
}

.logo-area:hover .img,
.logo-area:hover .title {
    display: flex;
    align-items: center;
    transform: scale(1.1);
}

nav {
    display: flex;
    gap: clamp(12px, 2.5vw, 25px);
    align-items: center;
    flex-wrap: wrap;
    margin-left: 0;
}

nav a {
    text-decoration: none;
    color: black;
    font-size: clamp(13px, 1.8vw, 16px);
    padding: 8px 0;
    border-bottom: 3px solid transparent;
    transition: border-color 0.2s;
    white-space: nowrap;
}

nav a:hover {
    border-bottom: 3px solid rgb(0, 119, 255);
}

nav a.active {
    border-bottom: 3px solid rgb(0, 119, 255);
}


.home-btn {
    padding: clamp(8px, 1.5vw, 10px) clamp(10px, 2vw, 15px);
    background: #2c7be5;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s;
    font-size: clamp(13px, 1.5vw, 15px);
    white-space: nowrap;
    flex-shrink: 0;
    position: static;
}

.home-btn:hover {
    background: #1a5fd0;
}


@media (min-width: 601px) and (max-width: 900px) {
    nav {
        gap: 12px;
    }

    .title {
        font-size: 16px;
    }
}

@media (max-width: 600px) {
    .nav-toggle {
        display: block;
        cursor: pointer;
        flex-shrink: 0;
        background: none;
        border: none;
        padding: 4px;
    }

    .nav-toggle span {
        display: block;
        width: 24px;
        height: 2px;
        background: #333;
        margin: 5px 0;
        border-radius: 2px;
        transition: 0.3s;
    }

    nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        order: 3;          
        border-top: 1px solid #eee;
        padding-top: 8px;
    }

    nav.open {
        display: flex;
    }

    nav a {
        width: 100%;
        padding: 10px 0;
        border-bottom: 1px solid #f0f0f0;
        font-size: 15px;
    }

    nav a:hover,
    nav a.active {
        border-bottom: 1px solid #f0f0f0;
        color: rgb(0, 119, 255);
    }
}