﻿* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Prevent horizontal scroll on body */
    font-family: Verdana;
}

.master-container {
    display: grid;
    grid-template-areas: 'header' 'menu' 'main' 'footer';
    background-color: #15385e;
    padding: 0px;
    grid-template-columns: 1fr; /* ensures only one column */
    grid-template-rows: auto auto 1fr auto; /* optional, controls row sizing */
    padding: 0;
    gap: 0; /* modern syntax instead of grid-gap */
}

.item1 {
    grid-area: header;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #15385e;
    text-align: center;
    color: #ffffff;
}

.item2 {
    grid-area: menu;
}

.logo {
    list-style-image: none !important;
    list-style-type: none !important;
}

.item2 .navli {
    float: left;
    list-style-image: none !important;
    list-style-type: none !important;
    font-weight: bolder;
    text-align: center;
    border-radius: 10px;
}

nav {
    background-color: #0e2741;
    box-shadow: 3px 3px 5px rgba(0,0,0,0.1);
    width: 100%; /* Add this */
}

    nav ul {
        list-style: none;
        display: flex;
        justify-content: flex-end;
        align-items: center;
        width: 100%; /* Add this */
    }

    nav a {
        padding: 0 5px;
        text-decoration: none;
        display: flex;
        align-items: center;
        color: black;
        text-align: center;
    }

        nav a:hover {
            background-color: #f0f0f0;
        }

.logo {
    margin-right: auto;
}

    .logo a:hover {
        background-color: #1A4473;
    }

.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 999;
    background-color: white;
    box-shadow: -10px 0 10px rgba(0,0,0,0.1);
    display: none;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
}
/*
    .sidebar li {
        width: 100%;
    }*/

.item3 {
    grid-area: main;
    background-color: rgb(75, 108, 158);
    width: 100%; /* Add this */
}
/*    .item3 > h1 {
        margin-bottom: 7px;
    }

    .item3 > p {
        margin-bottom: 7px;
    }*/


.item4 {
    grid-area: footer;
    background-color: #fff;
    border-top: 1px solid #e6e7e8;
}

    .item4 > ul {
        list-style: none;
        text-align: center;
        display: list-item;
        height: inherit;
    }

        .item4 > ul > li {
            vertical-align: middle;
            border-radius: 5px;
            display: inline-block;
        }

            .item4 > ul > li > a {
                display: block;
                color: #fff;
                text-decoration: none;
            }


/*-------------------- Desktop --------------------*/
@media screen and (min-width: 768px) {
    .master-container {
        max-width: 100vw; /* Ensure it doesn't exceed viewport */
        width: 100%;
    }

    .item1 {
    }

        .item1 > h1 {
            font-size: 1em;
        }

    .item2 {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(21, 56, 94, 0.98);
        z-index: 1000;
        flex-direction: column;
        padding: 20px;
        overflow-y: auto;
    }


        .item2.menu-open {
            display: flex;
        }

    #menuClose {
        align-self: flex-end; /* Aligns to the right */
        cursor: pointer;
        margin-bottom: 20px;
        order: -1; /* ADD THIS - forces it to appear first */
        width: 50px;
        height: 50px;
    }

        #menuClose i {
            color: white;
            padding: 4px 8px;
            font-size: 36px; /* Reduced size so it doesn't interfere */
        }

    #menuList {
        list-style: none;
        padding: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        gap: 10px;
        order: 1; /* Menu items come after close button */
    }

    .menuListItem {
        width: 100%;
    }

        .menuListItem a {
            display: block;
            color: white;
            padding: 15px;
            text-decoration: none;
            background-color: rgba(255, 255, 255, 0.1);
            border-radius: 5px;
            transition: background-color 0.3s;
        }

            .menuListItem a:hover {
                background-color: rgba(255, 255, 255, 0.2);
            }

    #hdrLst {
        list-style: none;
        display: inline-flex;
        gap: 80px;
        list-style-image: none !important;
        list-style-type: none !important;
    }

    .item1 #header > ul > li {
        list-style: none;
        display: inline-flex;
        gap: 5px;
        list-style-image: none !important;
        list-style-type: none !important;
    }

    .item3 {
        height: 70vh;
        overflow-y: scroll;
        padding: 10px;
        margin: 0 auto;
    }

        .item3 > h1 {
            margin-bottom: 7px;
        }

        .item3 > p {
            margin-bottom: 7px;
        }


    .txtBx {
        padding: 5px;
    }

    .docItem {
        font-size: 1.0em;
    }

    .item4 {
    }


    #logoImg {
        padding: 0px !important;
    }

    .item4 > ul > li {
        font-size: 2em;
        padding: 15px 20px 15px 20px;
    }

        .item4 > ul > li > a {
            /*width: 60px;*/
            /*padding: 16px 0;*/
        }

            .item4 > ul > li > a > img {
                height: 67px;
                margin: 10px 0px 5px 0px;
                width: 67px;
            }

    .item2 .navli a {
        font: 1.0em Verdana;
    }


    .item2 ul {
        display: flex; /* horizontal menu */
        gap: 20px;
    }

    .item2 .nav-toggle, .item2 .sidebar {
        display: none; /* hide hamburger on desktop */
    }

    .item4 > h2 {
        font-size: 1em;
    }

    .item3 > h1 {
        font-size: 1.2em;
    }
}
/*-------------------- Mobile --------------------*/
@media screen and (max-width: 768px) {
    .master-container {
        max-width: 100%;
        overflow-x: hidden; /* Prevent horizontal scroll */
    }

    .item1 {
        font-size: 0.8em;
        padding: 5px 0;
        box-sizing: border-box; /* Important! */
    }

    nav {
        height: 30px;
        display: flex;
        justify-content: flex-end;
        align-items: center;
    }

    .item2 {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(21, 56, 94, 0.98);
        z-index: 1000;
        flex-direction: column;
        padding: 20px;
        overflow-y: auto;
    }

        .item2.menu-open {
            display: flex;
        }

    #menuClose {
        align-self: flex-end; /* Aligns to the right */
        cursor: pointer;
        margin-bottom: 20px;
        order: -1; /* ADD THIS - forces it to appear first */
        width: 50px;
        height: 50px;
    }

        #menuClose i {
            color: white;
            padding: 4px 8px;
            font-size: 36px; /* Reduced size so it doesn't interfere */
        }

    #menuList {
        list-style: none;
        padding: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        gap: 10px;
        order: 1; /* Menu items come after close button */
    }

    .menuListItem {
        width: 100%;
    }

        .menuListItem a {
            display: block;
            color: white;
            padding: 15px;
            text-decoration: none;
            background-color: rgba(255, 255, 255, 0.1);
            border-radius: 5px;
            transition: background-color 0.3s;
        }

            .menuListItem a:hover {
                background-color: rgba(255, 255, 255, 0.2);
            }

    #hdrLst i {
        font-size: 20px; /* This will now resize the icons */
        line-height: 1;
        margin-right: 8px;
    }


    /* List and alignment cleanup */
    #hdrLst {
        list-style: none;
        margin: 0 auto;
        padding: 0;
        display: inline-grid;
        grid-gap: 5px;
    }

        #hdrLst li {
            display: inline-flex; /* keeps icon and text aligned */
            align-items: center;
            gap: 8px; /* spacing between icon and text */
            margin-right: 16px; /* spacing between list items */
        }

        /* Optional: ensure the login link keeps the icon color */
        #hdrLst a {
            color: #fdc010;
            text-decoration: none;
        }

    #loginUrl {
        padding-left: 0 !important;
    }

    .item3 {
        width: 100%;
        height: calc(100vh - 120px); /* Adjust 200px based on your header/nav/footer total height */
        overflow-y: auto;
        padding: 5px;
        box-sizing: border-box; /* Important! */
    }

        .item3 p {
            font-size: 0.8em;
        }

    .txtBx {
        margin-top: 5px;
        padding: 5px;
        height: 100px;
        overflow-y: scroll;
    }

    .docItem {
        font-size: 0.85em;
        margin-bottom: 5px;
    }

    /*accordion styling*/
    section {
        width: 100%;
/*        min-height: 50px;
        max-height: 120px;
        overflow-y: scroll;*/
    }

    .item4 > ul > li {
        font-size: 1em;
        margin: 0 !important;
    }

        .item4 > ul > li > .fa-brands {
            padding: 5px 15px;
            font-size: 2em;
        }

    .item2 .navli a {
        font: 1.0em Verdana;
    }

    .item4 > h2 {
        font-size: 1em;
    }

    .item3 > h1 {
        font-size: 1.2em;
    }
}
