@import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;300;400;500;600;700&display=swap");
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap');
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Outfit:wght@100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Inter"; /* font-family is inherited */
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* start of navbar, mobile-menu, & footer --------------------------------------------------------------- */
#nav-menu {
    background-color: rgba(11, 64, 8, 0.85);
    /* box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.40); */
    height: 121px;
    width: 100%;
}

#nav-menu .container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    font-family: "DM Sans";
    font-weight: 400;
    width: 90%;
    max-width: 1536px;
    margin: auto;
}

.nav-start {
    flex-shrink: 0;
}

.nav-start a {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: 0;
}

.nav-start img {
    margin-top: 5px;
}

.nav-end {
    margin-top: 50px;
    width: 850px;
}

.nav-end ul {
    display: flex;
    flex-direction: row;
    list-style: none;
    font-size: 18px;
    justify-content: space-between;
}

a {
    text-decoration: none;
    color: white;
}

.nav-end ul li a:hover {
    color: rgba(255, 255, 255, 0.7);
}

.hamburger-menu {
    display: none;
}

.nav-dropdown {
    position: relative; /* Added to position the submenu relative to this item */
}

.nav-dropdown .submenu {
    display: none;
    position: absolute;
    top: 100%; /* Position below the parent link */
    left: 0;
    font-weight: 500;
    background-color: #fff;
    border-top: 15px solid rgba(11, 64, 8, 0.85);
    /* box-shadow: 0 2px 5px rgba(0,0,0,0.1); */
    list-style: none;
    padding: 0 0 10px;
    margin: auto;
    min-width: 200px;
    z-index: 101; /* Ensure submenu is above other content */
    border-radius: 1px;
    flex-direction: column;
}

.nav-dropdown .submenu li:first-child {
    width: 100%;
    height: 6px;
    background-color: rgba(11, 64, 8, 1);
    margin-bottom: 10px;
}

.nav-dropdown .submenu li:not(:first-child) {
    padding: 0 30px;
}


.nav-dropdown .submenu li a {
    color: #050505;
    padding: 8px 15px;
    display: block; /* Make the entire area clickable */
    white-space: nowrap; /* Prevent text wrapping */
}

.nav-dropdown .submenu li a:hover {
    color: rgba(11, 64, 8, 0.85);
}

.nav-end li.nav-dropdown > a i {
    transition: transform 0.3s ease;
}

/* Show submenu on hover for desktop */
.nav-end li.nav-dropdown:hover > .submenu {
    display: flex;
}

.nav-end li.nav-dropdown:hover > a i {
    transform: rotate(180deg);
}

/* mobile design --------------------------------------------------------------- */
.mobile-nav a {
    color: black;
}

.mobile-nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 0;
    right: -100%;
    height: 100%;
    max-width: 300px;
    transition: right 0.3s ease-in-out;
    z-index: 99;
}

.mobile-nav.open {
    right: 0; /* Slide in */
}

/* Footer design */
footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: "DM Sans";
    width: 100%;
    height: auto;
    padding-top: 30px;
    padding-bottom: 35px;
    background-color: rgba(23, 34, 22, 0.83);
}

.footer-container {
    flex-grow: 1; /* applies as a flex item of footer */
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 90%;
    max-width: 1248px;
    height: auto;
}

.footer-top {
    flex-shrink: 0;
    /* width: 340px;
    height: 111px;
    border-radius: 50%;
    background-color: white; */
}

.footer-top img {
    margin-top: 5px;
}

.footer-body {
    color: white;
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
}

.footer-bottom, .footer-section {
    padding-left: 45px;
}

.footer-section p {
    font-size: 18px;
    font-weight: 400;
    padding-bottom: 13px;
}

.footer-section ul {
    list-style: none;
    padding-left: 0;
    font-size: 17px;
    font-weight: 300;
    letter-spacing: 0.5px;
}

.footer-section ul li {
    padding-bottom: 18px;
}

.footer-section ul li a > i {
    font-size: 18px;
}

.contact-info, .linkedin-contact, .gmail-contact {
    display: flex; /* Makes the contact-info a flex container */
    align-items: flex-start; /* Aligns items to the start of the cross-axis (top) */
    flex-wrap: wrap;
    gap: 5px; /* Adds space between the icon and the numbers list */
}

.linkedin-contact img, .gmail-contact img {
    align-self: center;
}

.contact-info i {
    margin-top: 3px;
}

.footer-bottom {
    text-decoration: none;
    color: white;
}

/* smaller desktop screen resolution */
@media (max-width: 1488px) {
    #nav-menu {
        background-color: rgba(11, 64, 8, 0.85);
        height: 90px;
        width: 100%;
    }
    .nav-start img {
        width: 244px;
        height: 80px;
    }
    .nav-dropdown .submenu {
        border-top: 8px solid rgba(11, 64, 8, 0.85);
    }
    .nav-end {
        margin-top: 36px;
        width: 700px;
    }
    .nav-end ul {
        display: flex;
        flex-direction: row;
        list-style: none;
        font-size: 16px;
        justify-content: space-between;
    }
}

@media (max-width: 1473px) {
    /* .footer-top {
        width: 244px;
        height: 80px;
    } */

    .footer-top img {
        width: 244px;
        height: 80px;
    }
}

/* mobile screen display */
@media (max-width: 1128px) {
    #nav-menu {
        background-color: rgba(11, 64, 8, 0.85);
        height: 90px;
        width: 100%;
    }
    #nav-menu .container {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        font-family: "DM Sans";
        font-weight: 400;
        width: 95%;
        max-width: 1071.6px;
        margin: auto;
    }
    .nav-end {
        margin-top: 36px;
        width: 700px;
    }
    .nav-end ul {
        display: none;
    }
    .hamburger-menu {
        display: flex;
        height: 40px;
        width: 50px;
        margin-top: 25px;
        background-color: transparent;
        border: 1px solid white;
        border-radius: 8px;
    }
    .hamburger-menu i {
        font-size: 30px;
        margin: auto;
        color: white;
    }
    .mobile-nav {
        display: flex;
        flex-direction: column;
        position: fixed;
        width: 100%;
        height: 100%;
        background-color: #fff;
        box-shadow: -2px 0 5px rgba(0,0,0,0.2);
    }

    /* Overlay for content when mobile menu is open */
    .overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0,0,0,0.5);
        z-index: 98;
        display: none;
    }
    .overlay.active {
        display: block;
    }
    .mobile-nav a {
        text-decoration: none;
    }
    .close-btn {
        width: 12%;
        min-height: 35px;
        margin-top: 30px;
        margin-right: 28px;
        background: rgba(11, 64, 8, 0.85);
        border: none;
        border-radius: 10px;
        align-self: flex-end;
    }
    .close-btn i {
        font-size: 1.5em;
        margin: auto;
        color: white;
    }
    .mobile-menu {
        width: 100%;
        overflow-y: auto; /* Adds scrollbar if content overflows vertically */
        -webkit-overflow-scrolling: touch; /* Improves scrolling performance on iOS */
    }
    .mobile-menu ul {
        display: flex;
        flex-direction: column;
        list-style: none;
        font-size: 1em;
    }
    .mobile-menu > ul {
        padding-left: 30px;
        width: 80%;
        line-height: 2em;
        margin-top: 0;
    }
    .mobile-menu > ul > li {
        width: 100%;
        border-bottom: 1px solid #eee;
        margin-top: 10px;
    }
    .mobile-menu ul li:last-child {
        border-bottom: none;
    }
    .mobile-menu ul li a {
        display: flex;
        justify-content: space-between; /* Pushes content and arrow to ends */
        align-items: center; /* Vertically centers them */
        padding-right: 10px;
    }
    .mobile-menu ul li a:hover {
        color: rgba(11, 64, 8, 0.85);
    }

    /* mobile submenu styling */
    .mobile-submenu > .submenu {
        display: none; /* Hidden by default */
        max-height: 0; /* For collapse animation */
        overflow: hidden; /* Hide overflow during collapse */
        transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    }
    /* Display and collapse the submenu */
    .mobile-submenu .submenu.open {
        display: block; /* Show when open */
        max-height: 500px; /* Sufficient height for animation (adjust if more items) */
        padding-bottom: 10px;
    }
    .mobile-menu li.mobile-submenu > .mobile-submenu-toggle i {
        transition: transform 0.3s ease;
    }
    /* Rotate icon when mobile submenu is open */
    .mobile-menu li.mobile-submenu.active > .mobile-submenu-toggle i {
        transform: rotate(180deg);
    }
    .mobile-submenu > .submenu a {
        font-size: 0.9em;
    }

    /* footer display */
    .footer-container {
        width: 90%;
        max-width: 564px;
        height: auto;
        margin: 0 auto;
    }
    .footer-section {
        width: 100%;
        padding-left: 0;
    }
    .footer-body {
        flex-direction: column;
        justify-content: flex-start;
    }
    .footer-bottom {
        padding-left: 0;
    }
    .footer-section p {
        border-bottom: 1px solid #eee;
    }
}

@media (max-width: 399px) {
    .mobile-submenu > .submenu {
        padding-left: 20px;
    }
}