/* General header */
.custom-header {
    width: 100%;
    background-color: #fff;
    font-family: 'Open Sans', sans-serif;
    padding: 40px 20px;
    /* top/bottom 40px, left/right 20px */
    box-sizing: border-box;
}

/* Topper row */
.topper-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 20px;
    border-bottom: 1px solid #eaeaea;
}

.topper-logo {
    max-width: 485.5px;
    max-height: 30px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.topper-text {
    font-size: 0.85rem;
    color: #333;
}

/* Main menu row */
.menu-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
}

.main-logo {
    height: 80px;
    object-fit: contain;
}

/* Menu styling */
.main-nav>ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.main-nav ul li {
    position: relative;
}

.main-nav a {
    text-decoration: none;
    color: #000;
    font-weight: bold;
}

.main-nav a:hover {
    color: #007bff;
}

/* Submenu */
.sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    border: 1px solid #eaeaea;
    padding: 5px 0;
    min-width: 150px;
    z-index: 1000;
    list-style: none;
}

.main-nav li:hover>.sub-menu {
    display: block;
}

.sub-menu li {
    padding: 5px 20px;
}

.sub-menu li a {
    color: #000;
}

.sub-menu li a:hover {
    color: #007bff;
}

/* Hamburger button */
.hamburger-btn {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
}

.topper-logo,
.main-logo {
    transition: max-width 0.2s ease, height 0.2s ease;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .hamburger-btn {
        display: block;
    }

    .main-nav {
        display: none;
        /* hidden by default on mobile */
        width: 100%;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
    }

    .main-nav li {
        width: 100%;
        padding: 10px 0;
    }

    .sub-menu {
        position: static;
        border: none;
        box-shadow: none;
        padding-left: 20px;
    }

    .custom-header {
        padding: 20px 10px;
        /* smaller padding on mobile */
    }

    .menu-row {
        padding: 5px 10px;
        display: flex;
        flex-wrap: wrap;
        /* allows wrapping on smaller screens */
        justify-content: space-between;
        align-items: center;
    }

    .topper-row {
        padding: 5px 10px;
    }

    .main-logo {
        max-height: 60px;
        /* optional limit for very small screens */
    }

    .topper-logo {
        max-height: 25px;
        /* optional limit for very small screens */
    }
}

@media (max-width: 1024px) {
    .topper-logo {
        max-width: 360px;
        max-height: 26px;
    }

    .main-logo {
        height: 65px;
    }
}

@media (max-width: 768px) {
    .topper-logo {
        max-width: 280px;
        max-height: 22px;
    }

    .main-logo {
        height: 55px;
    }
}

@media (max-width: 480px) {
    .topper-logo {
        max-width: 220px;
        max-height: 18px;
    }

    .main-logo {
        height: 45px;
    }
}