header {
    background: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #CAD0D9;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0px;
}

.logo {
    max-width: clamp(230px, 220px, 245px);
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    line-height: 1.1;
}

    .logo-container .logo {
        display: block;
    }

.logo-tagline {
    font-size: 10px; /* Small but readable */
    font-weight: 500;
    color: #666;
    text-align: center;
    letter-spacing: 0.5px;
    margin-top: 2px;
    white-space: nowrap;
}

.nav-menu {
    align-items: start;
    display: flex;
    list-style: none;
    margin-bottom: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    text-decoration: none;
    padding: 20px 15px;
    display: block;
    border-radius: 4px;
    transition: background-color 0.3s;
    font-weight: 500;
}

    .nav-link:hover {
        color: rgb(26, 115, 232);
    }

    .nav-link.has-submenu::after {
        content: '▼';
        font-size: 10px;
        margin-left: 5px;
    }

    .nav-link span {
        color: #1171EF;
        border-radius: 8px;
        border: 1px solid #1171EF;
        padding: 5px 20px;
        background: #EAF2FF;
    }

.submenu {
    border: 1px solid #EAF2FF;
    padding-left: 0;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 200px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    list-style: none;
    z-index: 1000;
}

.nav-item:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.submenu-item {
    border-bottom: 1px solid #d3d1d175;
}

    .submenu-item:last-child {
        border-bottom: none;
    }

.submenu-link {
    color: #333;
    text-decoration: none;
    padding: 12px 15px;
    display: block;
    transition: background-color 0.3s;
}

    .submenu-link:hover {
        background-color: #f5f9fc;
        color: #1a73e8;
    }

.hamburger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    color: black;
    font-size: 24px;
}

.nav-link.profile-btn::after {
    content: '';
    font-size: 0px;
    margin-left: 0px;
}
/* Profile Button */
.profile-btn {
    display: inline-block;
    cursor: pointer;
    padding: 12px 15px;
}

.profile-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #1171EF;
    transition: transform 0.2s;
}

    .profile-img:hover {
        transform: scale(1.1);
    }
     
/* Responsive Styles */
@media screen and (max-width: 768px) {
    .navbar {
        padding: 8px 15px;
    }

    .hamburger {
        display: block;
    }

    .nav-menu {
        padding: 0 0 10px 0;
/*        padding-bottom: 10px;*/
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: left;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        /*        padding: 20px 0;*/
    }

        .nav-menu.active {
            left: 0;
        }

    .nav-item {
        width: 100%;
        border-bottom: 1.5px solid #d3d1d1de;
        /*        border-bottom: 1px solid #d3d1d175;*/
        /*        margin: 10px 0 0 0;*/
    }
     .nav-item:last-child {
        border-bottom: none !important;
    }

    .profile-btn {
        padding: 20px 15px 0px;
    }

    .submenu {
        border: none;
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background-color: rgba(255, 255, 255, 0.1);
        display: none;
        /*        margin-top: 10px;*/
        border-radius: 4px;
    }

        .submenu.active {
            margin-top: -10px !important;
            margin-left: 30px;
            display: block;
        }

    .submenu-link {
        padding: 10px;
    }

        .submenu-link:hover {
            background-color: rgba(255, 255, 255, 0.2);
          
        }

    .nav-link.has-submenu::after {
        content: '►';
    }

    .nav-link.has-submenu.active::after {
        content: '▼';
    }

    .submenu-item {
        border-bottom: 1px solid #d3d1d175;
    }
}
.submenu-right {
    right: 0;
    left: auto;
}
    .submenu-right::before {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
    }

/* iPad Air specific responsive styles */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .navbar {
        padding: 8px 15px;
        flex-wrap: nowrap;
    }

    .logo {
        max-width: 180px;
        flex-shrink: 0;
    }

    .nav-menu {
        align-items: center;
        gap: 0px;
        flex-wrap: nowrap;
        justify-content: flex-end;
        flex: 1;
    }

    .nav-link {
        padding: 8px 10px;
        font-size: 14px;
        white-space: nowrap;
    }

        .nav-link span {
            padding: 4px 12px;
            font-size: 13px;
        }

    .submenu {
        min-width: 160px;
    }

    .submenu-link {
        padding: 8px 12px;
        font-size: 13px;
    }

    .profile-img {
        width: 35px;
        height: 35px;
    }
}

/* Landscape mode optimization */
@media screen and (min-width: 769px) and (max-width: 1024px) and (orientation: landscape) {
    .navbar {
        padding: 6px 15px;
    }

    .nav-menu {
        gap: 4px;
    }

    .nav-link {
        padding: 6px 8px;
        font-size: 13px;
    }

    .logo {
        max-width: 160px;
    }
}