/* Main header */
.header {
    padding: 2rem 9%;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #E0F7FA;
    height: 80px; /* Set a fixed height for the header */
}

/* Logo size relative to the navbar */
.header .logo {
    height: 100%; /* Take the full height of the navbar */
    width: 20%;  /* Set logo width to 20% of the navbar */
    display: flex;
    align-items: center;
    justify-content: center;
}

.header .logo img {
    height: 100%; /* Make logo fill the height of the container */
    width: 100%; /* Make logo fill the width of the container */
    object-fit: contain; /* Maintain aspect ratio of the logo */
}

/* Navbar style */
.header .navbar a {
    font-size: 1.7rem;
    color: var(--light-color);
    margin-left: 2rem;
}

.header .navbar a:hover {
    color: red;
}

/* Menu button */
#menu-btn {
    font-size: 2.5rem;
    border-radius: .5rem;
    background: var(--green);
    color: #fff;
    padding: 1rem 1.5rem;
    cursor: pointer;
    display: none;
}

/* Media queries for mobile */
@media (max-width:768px) {
    #menu-btn {
        display: initial;
    }

    .header .navbar {
        position: absolute;
        top: 115%; right: 2rem;
        border-radius: .5rem;
        box-shadow: var(--box-shadow);
        width: 30rem;
        border: var(--border);
        background: #fff;
        transform: scale(0);
        opacity: 0;
        transform-origin: top right;
        transition: none;
    }

    .header .navbar.active {
        transform: scale(1);
        opacity: 1;
        transition: .2s ease-out;
    }

    .header .navbar a {
        font-size: 2rem;
        display: block;
        margin: 2.5rem;
    }

    /* Adjust logo size for mobile */
    .header .logo {
        width: 30%;  /* Adjust width to a reasonable value for mobile */
        height: auto; /* Let the height adjust based on the aspect ratio */
    }

    .header .logo img {
        width: 100%; /* Let the image fill the container */
        height: auto; /* Ensure aspect ratio is maintained */
    }
}

@media (max-width:450px) {
    html {
        font-size: 50%;
    }

    /* Further tweak for very small screens */
    .header .logo {
        width: 40%;  /* Increase logo width a bit more on smaller screens */
    }
}