/* =============================================
   NAV + HAMBURGER — base (all screen sizes)
   ============================================= */
nav {
    background-color: #1a5276;
    position: relative;
    padding: 0;
    text-align: center;
    min-height: 44px; /* ensures nav never collapses */
}

#hamburger {
    display: none; /* hidden by default; shown on mobile via media query */
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 22px;
    background: none;
    cursor: pointer;
    padding: 0;
    border: none;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 200;
}

#hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #ffffff;
    border-radius: 2px;
}

/* Desktop nav links — horizontal row */
#nav-links {
    display: flex;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
}

#nav-links a {
    color: #ffffff;
    text-decoration: none;
    font-family: Arial, sans-serif;
    font-size: 1em;
    padding: 0.75em 1.2em;
    border-right: 1px solid rgba(255,255,255,0.3);
}

#nav-links a:last-child {
    border-right: none;
}

#nav-links a:hover {
    background-color: #0a2540;
    border-bottom: 3px solid #3fc1c9;
}

/* =============================================
   RESPONSIVE VISIBILITY CLASSES
   ============================================= */
.mobile { display: none; }
.tablet-desktop { display: block; }

/* =============================================
   BREAKPOINT 1: max-width 1200px
   ============================================= */
@media screen and (max-width: 1200px) {
    #container {
        max-width: 100%;
    }
    main {
        padding: 2.5%;
    }
}

/* =============================================
   BREAKPOINT 2: max-width 769px  — MOBILE
   ============================================= */
@media screen and (max-width: 769px) {

    /* Visibility classes */
    .mobile { display: block; }
    .tablet-desktop { display: none; }

    /* Header becomes sticky row with room for hamburger */
    header {
        position: sticky !important;
        top: 0;
        z-index: 100;
        text-align: left;
        padding: 10px 60px 10px 15px !important;
    }

    header img {
        display: inline-block !important;
        margin: 0 10px 0 0 !important;
        height: 50px;
        width: auto;
        vertical-align: middle;
    }

    header h1 {
        display: inline-block !important;
        font-size: 1.3em;
        vertical-align: middle;
    }

    /* Show hamburger */
    #hamburger {
        display: flex;
    }

    /* Hide nav links until hamburger is clicked */
    #nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: #1a5276;
    }

    #nav-links.open {
        display: flex;
    }

    #nav-links a {
        display: block;
        width: 100%;
        padding: 12px 20px;
        border-right: none;
        border-bottom: none;
        border-top: 1px solid rgba(255,255,255,0.2);
        text-align: left;
        box-sizing: border-box;
    }

    /* Page-specific grids → single column */
    #services-grid,
    #team-grid,
    #contact-grid {
        grid-template-columns: 1fr;
    }

    .service-item,
    .team-member {
        padding: 5%;
    }

    main {
        padding: 4%;
    }
}

/* =============================================
   BREAKPOINT 3: max-width 400px  — small phones
   ============================================= */
@media screen and (max-width: 400px) {

    header {
        padding: 8px 50px 8px 10px !important;
    }

    header img {
        height: 40px !important;
    }

    header h1 {
        font-size: 1.1em !important;
    }

    main {
        padding: 5%;
        font-size: 0.97em;
    }

    main h2 {
        font-size: 1.3em;
    }

    .cta-link {
        display: block;
        text-align: center;
        width: 100%;
        box-sizing: border-box;
    }

    .team-member figure img {
        width: 110px;
        height: 110px;
    }

    footer {
        padding: 4% 3%;
    }

    footer p {
        font-size: 0.78em;
    }
}