/* Global box sizing rule */
*,
*:before,
*:after {
    box-sizing: border-box;
}

/* Mobile header fixes */
@media (max-width: 768px) {

    /* Fix base header */
    .base-header {
        padding: 0 15px;
        height: 60px;
    }

    /* Fix navigation */
    .base-nav-links.show {
        padding-top: 10px;
        box-sizing: border-box;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }

    /* Recipe header fixes */
    .recipe-header_menu-top {
        height: 60px;
        grid-template-columns: auto 1fr auto;
    }

    .hamburger-menu {
        margin-right: 0;
    }

    /* Fix recipe main body for mobile */
    .recipe-mainbody-container {
        display: flex;
        flex-direction: column;
        padding-top: 70px;
    }

    /* Improve tap targets for mobile */
    .base-nav-links a,
    .base-logout-btn {
        padding: 12px;
        margin: 5px 0;
    }

    /* Fix button size for mobile */
    .base-search-container button,
    .recipe-header_utility-search-button {
        min-width: 44px;
        min-height: 44px;
    }
}

@media (max-width: 480px) {

    /* Extra small device fixes */
    .base-header {
        padding: 0 10px;
    }

    .base-burger-menu {
        width: 38px;
        height: 38px;
        font-size: 24px;
    }

    .base-headerlogo a {
        font-size: 18px;
    }

    /* Fix recipe header for mobile */
    .recipe-header_menu-top {
        padding: 0 8px;
        height: 55px;
    }

    .recipe-header_logo-wrapper {
        font-size: 16px;
        padding-left: 5px;
    }

    /* Fix content padding for smaller screens */
    main {
        padding: 0 8px;
    }

    /* Ensure buttons are large enough for touch */
    .home-hero_btn,
    .home-btn,
    .base-logout-btn,
    .base-nav-links a {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}