/* Top navigation bar */
.topnav {
    background-color: #13294B;
    overflow: hidden;
    position: fixed;
    z-index: 999;
    width: 100%;
    box-shadow: 0 2px 16px rgba(0,0,0,0.22);
}

.topnav #myLinks {
    display: inline;
}

.topnav a.icon {
    display: none;
}

/* Logo — align left edge with the page wrapper */
.topnav img {
    margin-bottom: 0;
    margin-top: 10.5pt;
    margin-left: calc(50% - 480px);
}

/* Style the links inside the navigation bar */
.topnav a.normal {
    float: right;
    color: #f2f2f2;
    text-align: center;
    padding: 11px 10px;
    text-decoration: none;
    font-size: 16px;
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 400;
    letter-spacing: 0.03em;
    position: relative;
    transition: color 0.2s ease;
}

.topnav a.normal::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 10px;
    right: 10px;
    height: 2px;
    background: #FF5F05;
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.topnav a.normal:hover {
    background-color: transparent;
    color: #fff;
}

.topnav a.normal:hover::after {
    transform: scaleX(1);
}

/* First nav item — align right edge with the page wrapper */
.topnav a.right {
    margin-right: calc(50% - 480px);
}

/* ─── Responsive: tablet / small desktop ─── */
@media print, screen and (max-width: 1000px) {
    .topnav img      { margin-left: 16px; }
    .topnav a.right  { margin-right: 16px; }
    .topnav a.normal { padding: 11px 7px; }
}

/* ─── Responsive: mobile (hamburger menu) ─── */
@media print, screen and (max-width: 960px) {
    .topnav a.normal::after { display: none; }

    .topnav #myLinks {
        display: flex;
        flex-direction: column-reverse;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease-in-out;
    }

    .topnav #myLinks.open {
        max-height: 600px;
    }

    .topnav a.normal {
        color: white;
        float: none;
        padding: 14px 16px;
        text-decoration: none;
        font-size: 16px;
        display: block;
    }

    .topnav a.icon {
        color: white;
        display: block;
        padding: 10px 16px;
        font-size: 17px;
        position: absolute;
        float: right;
        right: 0;
        top: 0;
        margin-right: 5%;
    }

    .topnav a.icon .icon-wrap {
        position: relative;
        display: inline-block;
        width: 1em;
        height: 1em;
    }

    .topnav a.icon .icon-bars,
    .topnav a.icon .icon-xmark {
        position: absolute;
        top: 0;
        left: 0;
        transition: opacity 0.25s ease, transform 0.25s ease;
    }

    .topnav a.icon .icon-bars  { opacity: 1; transform: rotate(0deg); }
    .topnav a.icon .icon-xmark { opacity: 0; transform: rotate(-90deg); }

    .topnav a.icon.active .icon-bars  { opacity: 0; transform: rotate(90deg); }
    .topnav a.icon.active .icon-xmark { opacity: 1; transform: rotate(0deg); }

    .topnav a.right {
        color: white;
        float: none;
        padding: 14px 16px;
        text-decoration: none;
        font-size: 16px;
        display: block;
        margin-right: 0;
    }
}
