html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* Reset aggressive padding/sizing only on links that need accessibility */
nav a {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
}

/* Hamburger menu - hidden by default */
.hamburger-menu {
    display: none;
    background: transparent;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 10px 12px;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #333;
}

.hamburger-menu:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Mobile-specific responsive fixes */
@media (max-width: 768px) {
    /* Ensure body font is readable on mobile */
    body {
        font-size: 16px !important;
    }

    /* Make containers fluid on mobile */
    .container,
    .wrapper {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        box-sizing: border-box;
    }

    .header,
    .sub-header,
    .content {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }

    /* Top navigation responsive layout */
    .top-nav {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        width: 100% !important;
        box-sizing: border-box;
    }

    .top-nav .nav-brand {
        flex: 0 0 auto;
    }

    .top-nav .main-nav {
        width: 100%;
        order: 3;
    }

    /* Hide navigation by default on mobile */
    .top-nav .nav {
        display: none;
        width: 100%;
        flex-direction: column;
    }

    /* Show navigation when toggled */
    .top-nav .nav.is-open {
        display: flex !important;
    }

    .top-nav .nav li {
        display: block;
        width: 100%;
        text-align: left;
    }

    .top-nav .nav li a {
        display: block;
        width: 100%;
        padding: 12px 16px;
    }

    /* Show hamburger menu on mobile */
    .hamburger-menu {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
        order: 2;
    }

    /* Make images responsive */
    img {
        max-width: 100%;
        height: auto;
    }

    /* Ensure touch targets are adequate */
    .btn,
    button,
    input[type="submit"],
    input[type="button"] {
        min-height: 48px;
        padding: 12px 20px;
    }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    body {
        font-size: 14px;
    }

    .container {
        padding-left: 20px;
        padding-right: 20px;
    }
}
