/* RESET & GLOBAL */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: 'Segoe UI', sans-serif;
    background-color: #f4f4f4;
}

/* NAVBAR */
nav {
    width: 100%;
    height: 80px;
    background-color: #2d4b58;
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    z-index: 9999999999999999999999;
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.info {
    max-width: 1200px;
    width: 100%;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.left-side {
    display: flex;
    align-items: center;
}

.left-side img {
    width: 50px;
    height: 50px;
}

.nav-heading {
    margin-left: 12px;
    font-weight: 900;
    font-size: 24px;
    color: #2fdf2f;
    letter-spacing: 1px;
    user-select: none;
}

.right-side {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 25px;
    margin-left: 20px;
    padding: 0;
}


.nav-links {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    height: calc(100vh - 80px);
}

.nav-links {
    max-height: 100vh;
    height: auto;
}

.nav-links li {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.nav-links li a {
    color: #e1f5e1;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 10px;
    transition: all 0.25s ease;
    user-select: none;
    white-space: nowrap;
    background-color: transparent;
    border: 2px solid transparent;
}

/* Hamburger */
.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    color: #2fdf2f;
    cursor: pointer;
    user-select: none;
    transition: color 0.3s ease;
}

.hamburger:hover {
    color: #1db31d;
}

/* ------- COMMON DROPDOWN STYLES ------- */
.has-dropdown {
    position: relative;
    display: flex;
    flex-direction: column;
}

.dropdown {
    display: none;
    flex-direction: column;
    background-color: #1b2f35;
    width: 100%;
    border-radius: 8px;
    z-index: 999;
    max-height: 80vh;
}

.has-dropdown .dropdown li a {
    padding: 10px 20px;
    font-size: 16px;
    color: #e1f5e1;
    background-color: #152c33;
    margin: 2px 0;
    border-radius: 4px;
    transition: 0.2s ease;
    width: 100%;
}

.has-dropdown .dropdown li a:hover {
    background-color: #1db31d;
    color: #fff;
    border-left-color: #fff;
}

.has-submenu {
    position: relative;
}

.has-submenu>a::after {
    content: "▶";
    float: right;
    font-size: 12px;
    margin-left: 5px;
}

.sub-dropdown {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    background-color: #1b2f35;
    min-width: 200px;
    border-radius: 10px;
    padding: 10px 0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    overflow: visible !important;
}

.sub-dropdown li a {
    padding: 10px 20px;
    font-size: 14px;
    color: #e1f5e1;
    display: block;
    border-radius: 5px;
    width: 100%;
    white-space: normal;   /* Allows text to wrap */
    word-break: break-word;
}

.sub-dropdown li a:hover {
    background-color: #1db31d;
    color: white;
}

/* Fix arrow misalignment (optional) */
.dropdown-btn::after {
    content: "▼";
    float: right;
    margin-left: 10px;
    font-size: 0.6rem;
}

.has-submenu>a::after {
    content: "▶";
    margin-left: 8px;
    font-size: 12px;
}

@media (min-width: 1035px) {
    .sub-dropdown {
        position: absolute;
        top: 0;
        left: 100%;
        transform: translateX(0);
        min-width: 220px;
        background-color: #1b2f35;
        border-radius: 10px;
        padding: 10px 0;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
        display: none;
        white-space: nowrap;
        z-index: 1000;
    }

    .has-submenu:hover>.sub-dropdown {
        display: block;
    }

    .sub-dropdown li a {
        display: block;
        padding: 10px 20px;
        font-size: 15px;
        color: #e1f5e1;
        background-color: transparent;
    }

    .sub-dropdown li a:hover {
        background-color: #1db31d;
        color: #fff;
    }

    .nav-links li {
        display: flex;
        width: auto;
    }

    .nav-links li a {
        padding: 10px 15px;
        font-size: 16px;
        border: none;
        border-radius: 5px;
        background-color: transparent;
    }

    .has-dropdown .dropdown {
        position: absolute;
        top: 100%;
        left: 0;
        width: max-content;
        background-color: #1b2f35;
        display: none;
        flex-direction: column;
        padding: 8px 0;
        border-radius: 8px;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    }

    .has-dropdown:hover .dropdown {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .dropdown li a {
        padding: 10px 20px;
        font-size: 15px;
        color: #e1f5e1;
        white-space: nowrap;
    }

    .dropdown li a:hover {
        background-color: #1db31d;
        color: #fff;
    }

    .sub-dropdown {
        position: absolute;
        left: 100%;
        top: 0;
        min-width: 200px;
        background-color: #1b2f35;
        border-radius: 10px;
        padding: 10px 0;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
        display: none;
    }
}

@media (min-width: 1035px) {
    .hamburger {
        display: none !important;
    }
}



/* ------------------ MOBILE RESPONSIVENESS ------------------ */
@media (max-width: 768px) {

    /* Override submenu layout for mobile */
    .sub-dropdown {
        position: static !important;
        left: auto !important;
        top: auto !important;
        display: none;
        background-color: transparent;
        box-shadow: none;
        padding: 0 0 0 20px;
        min-width: 100%;
    }

    .has-submenu.open .sub-dropdown {
        display: flex;
        flex-direction: column;
    }

    .has-submenu>a::after {
        content: "▼";
        /* Down arrow for mobile */
        float: right;
        font-size: 12px;
        margin-left: auto;
    }

    .sub-dropdown li a {
        padding: 10px 16px;
        font-size: 15px;
        border-bottom: 1px solid #2d4b58;
        background: transparent;
    }
}

@media (max-width: 1034px) {
    body {
        overflow-x: hidden;
    }

    .hamburger {
        display: block;
    }

    .right-side {
        flex-grow: 0;
    }

    .nav-links {
        position: fixed;
        top: 80px;
        left: -20px;
        bottom: 0px;
        width: 80vw;
        height: 100vh;
        background-color: #1b2f35;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        box-shadow: 2px 0 12px rgba(0, 0, 0, 0.3);
        z-index: 10000;
        gap: 10px;
        padding: 30px 0px;
        overflow-y: auto;
    }

    .last-item {
        margin-bottom: 100px; 
    }
    

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-links li {
        width: 100%;
        display: block;
        position: relative;
    }

    .nav-links li a {
        display: block;
        width: 100%;
        padding: 12px 20px;
        font-size: 18px;
        color: #e1f5e1;
        border-bottom: 1px solid #2d4b58;
    }

    .has-dropdown {
        width: 100%;
    }

    .has-dropdown>a {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 20px;
        font-weight: 600;
        color: #e1f5e1;
        border-bottom: 1px solid #2d4b58;
        background-color: transparent;
    }

    .has-dropdown .dropdown {
        display: none;
        flex-direction: column;
        background-color: transparent;
        padding-left: 10px;
    }

    .has-dropdown.open .dropdown {
        display: flex;
    }

    .has-dropdown .dropdown li a {
        font-size: 16px;
        padding: 10px 20px;
        color: #e1f5e1;
        background-color: transparent;
        border-bottom: 1px solid #2d4b58;
        border-left: 4px solid #2fdf2f;
    }

    .has-dropdown .dropdown li a:hover {
        background-color: #1db31d;
        color: #fff;
    }

    .has-submenu>a::after {
        content: "▼";
        margin-left: auto;
        font-size: 12px;
    }

    .has-submenu .sub-dropdown {
        display: none;
        flex-direction: column;
        background-color: transparent;
        padding-left: 20px;
    }

    .has-submenu.open .sub-dropdown {
        display: flex;
    }

    .has-dropdown .dropdown .has-submenu .sub-dropdown li a {
        font-size: 15px;
        padding: 8px 20px;
        color: #e1f5e1;
        border-bottom: 1px solid #2d4b58;
        border-left: 4px solid red;
    }

    .nav-links::-webkit-scrollbar {
        width: 6px;
    }

    .nav-links::-webkit-scrollbar-thumb {
        background: #1db31d;
        border-radius: 4px;
    }


    .nav-links .dropdown-content {
        display: none;
        position: static;
        background-color: #1f2a36;
        box-shadow: none;
        width: 100%;
    }

    /* Show dropdown vertically below parent */
    .nav-links li.show .dropdown-content {
        display: flex;
        flex-direction: column;
    }

    .has-dropdown .dropdown,
    .has-submenu .sub-dropdown {
        position: relative;
        width: 100%;
        display: none;
        flex-direction: column;
    }

    .has-dropdown.open .dropdown,
    .has-submenu.open .sub-dropdown {
        display: flex;
    }

    .nav-links li,
    .dropdown li,
    .sub-dropdown li {
        width: 100%;
        display: block;
    }

    .submenu {
        position: relative;
        top: 100%;
        left: 0;
        z-index: 999999999;
        display: none;
        background-color: white;
    }

    .has-dropdown.open .submenu {
        display: block;
    }

    .submenu:not(.open) {
        pointer-events: none;
    }

    .submenu {
        z-index: 1000;
        /* High enough to be above anything */
        position: absolute;
        background: white;
    }

    .has-dropdown {
        position: relative;
        /* optional if parent needs reference or z-index */
    }

    .dropdown,
    .sub-dropdown {
        display: none;
    }

    .has-dropdown .dropdown,
    .has-submenu .sub-dropdown {
        display: none;
    }

    .has-dropdown.open .dropdown,
    .has-submenu.open .sub-dropdown {
        display: flex;
        flex-direction: column;
    }
}

/* FOOTER */
footer {
    background-color: #2d4b58;
    color: #e1f5e1;
    padding: 40px 20px 30px;
    font-size: 15px;
    margin-top: 100px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-top {
    text-align: center;
    margin-bottom: 20px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
    padding-top: 10px;
    border-top: 1px solid #3a5c6b;
}

.footer-links {
    list-style: none;
    display: flex;
    gap: 25px;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}

.footer-links li a {
    color: #e1f5e1;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease-in-out;
}

.footer-links li a:hover {
    color: #2fdf2f;
}

.social-links {
    text-align: right;
}

.social-links h2 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #2fdf2f;
}

.social-links .links {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.social-links a {
    color: #e1f5e1;
    font-size: 20px;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #2fdf2f;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }

    .social-links {
        text-align: center;
    }

    .social-links .links {
        justify-content: center;
    }
}