body {
    margin: 0;
    padding: 0;
    color: black;
    font-size: 13px;
    font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
    background-color: #d3d9d6;
}

#container {
    background-color: #fff;
    width: 620px;
    margin: 0 auto;
    border-left: 1px solid #b7b7b7;
    border-right: 1px solid #b7b7b7;
}

#masthead {
    text-align: right;
    background-color: #036;
    padding: 10px;
    overflow: hidden;
    position: relative;
}

#masthead img {
    float: left;
    margin-left: 10px;
}

.contact-info {
    display: inline-block;
    margin: 0;
}

#masthead p {
    font-size: 11px;
    color: #fff;
    margin: 10px 0 0 0;
}

#masthead a {
    color: #fff;
    text-decoration: underline;
}

/* Hamburger Menu */
.nav-toggle {
    display: none;
}

.hamburger-menu {
    display: none;
    /* Hidden on desktop */
    background: none;
    border: none;
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    padding: 8px 10px;
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1001;
}

.hamburger-menu span {
    display: block;
    width: 20px;
    height: 2px;
    background: #fff;
    margin: 3px 0;
    transition: 0.3s;
}

/* X animation when menu open */
.nav-toggle:checked~.hamburger-menu span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle:checked~.hamburger-menu span:nth-child(2) {
    opacity: 0;
}

.nav-toggle:checked~.hamburger-menu span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Navigation */
#navigation {
    background-color: #545454;
    overflow: hidden;
}

#navigation ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}

#navigation li {
    flex: 1 0 auto;
}

#navigation a {
    color: #fff;
    text-decoration: none;
    display: block;
    padding: 5px;
    text-align: center;
    border: 1px solid #c9c9c9;
}

#navigation a:hover {
    color: #000;
    background-color: #a9a9a9;
    border: 1px solid #a9a9a9;
}

#page_content {
    overflow: hidden;
    background-color: #fff;
}

#column_l {
    width: 385px;
    padding: 0 15px;
    box-sizing: border-box;
    float: left;
}

#column_r {
    width: 192px;
    padding: 4px;
    background-color: #a9a9a9;
    float: right;
    box-sizing: border-box;
}

#column_r p {
    font-size: 11px;
    margin: 7px;
}

#column_r img {
    display: block;
    margin: 0 auto;
}

#footer {
    clear: both;
    text-align: center;
    background-color: #113962;
    padding: 5px 0;
}

#footer p {
    font-size: 11px;
    line-height: 14px;
    color: #fff;
    margin: 1px;
    padding: 1px;
}

#footer a {
    color: #fff;
    text-decoration: underline;
}

#footer a:hover {
    text-decoration: none;
}

a {
    color: #036;
    text-decoration: underline;
}

a:hover {
    color: #808080;
}

/* Responsive Adjustments */
@media (max-width: 640px) {
    #container {
        width: 100%;
        border-left: none;
        border-right: none;
    }

    #masthead {
        text-align: center;
        padding: 15px;
    }

    #masthead img {
        float: none;
        margin: 0 auto 10px;
        display: block;
    }

    .contact-info {
        display: block;
        margin: 0 auto;
    }

    .hamburger-menu {
        display: block;
    }

    /* Hide navigation by default on mobile */
    #navigation {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        z-index: 1000;
        background-color: #545454;
        padding: 80px 20px 20px;
        box-sizing: border-box;
    }

    /* Show when checkbox checked */
    .nav-toggle:checked~#navigation {
        display: block;
    }

    #navigation ul {
        flex-direction: column;
        max-width: 400px;
        margin: 0 auto;
    }

    #navigation li {
        margin-bottom: 10px;
    }

    #navigation a {
        font-size: 18px;
        padding: 20px;
        border-width: 2px;
        text-align: left;
    }

    /* Transparent backdrop for clicking outside */
    .nav-toggle:checked~#navigation::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }

    #column_l,
    #column_r {
        float: none;
        width: 100%;
        padding: 15px;
    }

    #column_r {
        order: -1;
        /* Sidebar above content */
        background-color: #a9a9a9;
    }

    #column_r img {
        width: 100%;
        height: auto;
        max-width: 300px;
    }

    #footer {
        width: 100%;
    }
}

/* About Page Bio Tables */
.bio-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 20px;
    margin-bottom: 10px;
}

.bio-photo {
    width: 110px;
    text-align: center;
    vertical-align: top;
    padding-right: 15px;
}

.bio-photo img {
    border: 2px solid #000;
    display: block;
}

.bio-text {
    vertical-align: top;
    padding-left: 10px;
}

.bio-text p {
    margin: 0 0 8px 0;
    font-weight: bold;
}

.bio-text ul {
    margin: 0 0 0 20px;
    padding: 0;
}

.bio-text li {
    font-size: 13px;
    margin-bottom: 4px;
}

.commitment {
    font-size: 11px;
    text-align: center;
    margin: 10px 7px;
}

/* Capabilities Page */
.capabilities-list {
    list-style-type: none;
    padding-left: 0;
    margin: 20px 0;
}

.capabilities-list>li.section-title {
    font-weight: bold;
    margin: 20px 0 8px 0;
    font-size: 14px;
}

.subsection {
    list-style-type: disc;
    padding-left: 20px;
    margin: 8px 0 20px 0;
}

.subsection li {
    margin-bottom: 6px;
    font-size: 13px;
}

/* Clients & Contract Vehicles */
.clients-list,
.contract-list {
    list-style-type: disc;
    padding-left: 20px;
    margin: 20px 0;
}

.clients-list li,
.contract-list>li {
    margin-bottom: 8px;
    font-size: 13px;
}

.naics-sublist {
    list-style-type: disc;
    padding-left: 30px;
    margin: 8px 0 0 0;
}

.naics-sublist li {
    margin-bottom: 6px;
    font-size: 13px;
}

.current-projects-title {
    text-align: center;
    margin: 0 0 15px 0;
    font-size: 14px;
}

.current-projects-list {
    list-style-type: disc;
    padding-left: 20px;
    margin: 0;
    font-size: 11px;
}

.current-projects-list li {
    margin-bottom: 8px;
}

/* Contact Page */
.phone-large {
    font-size: 14px;
    margin-bottom: 10px;
}

.phone-large strong {
    font-weight: bold;
    font-size: 16px;
}

#column_l p {
    margin: 8px 0;
    font-size: 13px;
}

.map-title {
    text-align: center;
    margin: 0 0 10px 0;
    font-size: 12px;
}

.location-map {
    width: 173px !important;
    height: 177px !important;
    border: 0;
    display: block;
    margin: 0 auto 8px;
}

.map-link {
    text-align: center;
    margin: 0;
    font-size: 10px;
}

.map-link a {
    color: #0000FF;
    text-decoration: underline;
    font-size: 10px;
}

/* Portfolio Page */
.gallery {
    margin: 20px 0;
}

.gallery-row {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 20px;
}

.gallery-row a {
    text-align: center;
    display: block;
}

.thumbnail {
    border: 2px solid #000;
    vertical-align: middle;
}

.gallery-spacer {
    height: 20px;
}

/* Affiliates Page */
.affiliates-intro {
    font-size: 13px;
    margin: 20px 0 40px 0;
    line-height: 1.5;
}

.affiliate-logo {
    text-align: center;
    margin: 40px 0;
}

.affiliate-logo img {
    border: none;
}

/* Mobile overrides for page-specific styles */
@media (max-width: 640px) {
    .capabilities-list>li.section-title {
        font-size: 16px;
    }

    .subsection {
        padding-left: 30px;
    }

    .subsection li {
        font-size: 15px;
    }

    .clients-list,
    .contract-list,
    .naics-sublist {
        padding-left: 30px;
    }

    .clients-list li,
    .contract-list>li,
    .naics-sublist li {
        font-size: 15px;
    }

    .current-projects-title {
        font-size: 16px;
        margin-bottom: 20px;
    }

    .current-projects-list li {
        font-size: 14px;
    }

    .phone-large {
        font-size: 16px;
    }

    .phone-large strong {
        font-size: 18px;
    }

    #column_l p {
        font-size: 15px;
    }

    .map-title {
        font-size: 16px;
        margin-bottom: 15px;
    }

    .location-map {
        width: 100% !important;
        max-width: 300px !important;
        height: 200px !important;
        margin: 0 auto 12px;
    }

    .map-link {
        font-size: 14px;
    }

    .map-link a {
        font-size: 14px;
    }

    .gallery-row {
        flex-direction: column;
        gap: 20px;
    }

    .thumbnail {
        width: auto;
        max-width: 200px;
        height: auto;
    }

    .gallery-spacer {
        height: 30px;
    }

    .affiliates-intro {
        font-size: 15px;
        margin: 20px 15px 40px;
        text-align: center;
    }

    .affiliate-logo img {
        width: 80%;
        height: auto;
        max-width: 200px;
    }

    .commitment {
        font-size: 13px;
        margin: 15px;
    }

    .bio-table {
        display: block;
    }

    .bio-photo,
    .bio-text {
        display: block;
        width: 100%;
        text-align: center;
        padding: 0;
        margin-bottom: 15px;
    }

    .bio-photo img {
        margin: 0 auto;
    }

    .bio-text {
        padding: 0 15px;
    }

    .bio-text ul {
        text-align: left;
    }
}