::-webkit-scrollbar {
    width: 5px;
    background-color: #16423C;
}

::-webkit-scrollbar-thumb {
    background-color: #6A9C89;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background-color: #6A9C89;
    border: 4px solid transparent;
    border-radius: 8px;
    background-clip: padding-box;
}

::-webkit-scrollbar {
    width: 16px;
}

html {
    font-size: 16px;
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    html, body {
        margin: 0;
        padding: 0;
        overflow: hidden;
        max-width: 100%;
        box-sizing: border-box;
    }

    *, *::before, *::after {
        box-sizing: inherit;
    }
}

body {
    margin: 0;
    padding: 0;
    background-color: #1F7D53;
    height: 100%;
    max-height: 100dvh;
    overflow: hidden;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1F7D53;
    height: 60px;
    padding: 10px;
    position: relative;
    z-index: 1000;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    overflow: visible;
}

/* Navigation bar for larger screens */
@media (min-width: 769px) {
    .hamburger,
    .side-menu,
    .menu-overlay {
        display: none;
    }

    .logo {
        position: absolute;
        top: 125%;
        left: 75px;
        transform: translateY(-50%);
        width: 150px;
        height: 150px;
        border-radius: 50%;
        border: 2px solid white;
        background: white;
        object-fit: cover;
        z-index: 101;
        transition: box-shadow 0.6s ease-in-out, transform 0.4s ease-in-out;

        @media (orientation: portrait) {
            top: 110%;
            left: 60px;
            width: 100px;
            height: 100px;
        }
    }

    .nav-links {
        display: flex;
        gap: 2vw;
        list-style: none;
        padding-top: 15px;
        justify-content: center;
        flex: 1;
        margin-left: 20vw;
    }

    .navbar a {
        float: left;
        font-size: 1.5vw;
        font-family: "Alegreya Sans SC", serif;
        color: white;
        text-align: center;
        padding: 14px 16px;
        text-decoration: none;

        @media (orientation: portrait) {
            font-size: 1.75vw;
        }
    }

    .navbar .dropbtn,
    .navbar .no-drop {
        position: relative;
        overflow: hidden;
    }

    .navbar .dropbtn::after,
    .navbar .no-drop::after {
        content: '';
        position: absolute;
        left: 0;
        bottom: 10px;
        width: 0;
        height: 1.5px;
        background-color: white;
        transition: width 0.3s ease;
    }

    .dropdown {
        float: left;
        overflow: hidden;
    }

    .dropdown .dropbtn {
        font-size: 1.5vw;
        font-family: "Alegreya Sans SC", serif;
        border: none;
        outline: none;
        color: white;
        padding: 14px 16px;
        background-color: inherit;
        margin: 0;
        position: relative;
        overflow: hidden;

        @media (orientation: portrait) {
            font-size: 1.75vw;
        }
    }

    .dropdown-content {
        display: block;
        opacity: 0;
        position: absolute;
        background-color: #7da98e;
        min-width: 160px;
        box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
        z-index: 50;
        border-radius: 10px;
        transform: rotateX(-90deg);
        transform-origin: top;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    .dropdown-content a {
        font-size: 1vw;
        font-family: "Public Sans", serif;
        font-weight: normal;
        float: none;
        color: white;
        text-decoration: none;
        display: block;
        text-align: left;
        padding: 12px 16px 12px 20px;
        transition: all 0.2s ease;
    }

    @media (hover: hover) {
        .dropdown-content a::before {
            content: '𖥧';
            font-size: 1vw;
            position: absolute;
            left: 6.5px;
            opacity: 0;
            transform: translateX(-5px);
            transition: opacity 0.2s ease, transform 0.2s ease;
        }
    }

    .navbar .dropdown:hover .dropbtn::after,
    .navbar .no-drop:hover::after {
        width: 100%;
    }

    .navbar a:hover, .dropdown:hover .dropbtn {
        cursor: pointer;
    }

    .dropdown-content a:hover::before {
        opacity: 1;
        transform: translateY(-9.75%) translateX(0);
    }

    .dropdown:hover .dropdown-content {
        opacity: 1;
        transform: rotateX(0deg);
        pointer-events: auto;
    }

    .dropdown .arrow {
        display: inline-block;
        margin-left: 0.25rem;
        transition: transform 0.3s ease;
        transform-origin: center;
        vertical-align: middle;
    }

    .dropdown:hover .arrow {
        transform: rotate(-180deg);
    }

    /* Large touchscreens */
    @media (hover: none) and (min-width: 769px) {
        .dropdown:hover .dropdown-content {
            opacity: 0;
            transform: rotateX(-90deg);
            pointer-events: none;
        }

        .dropdown:hover .arrow {
            transform: rotate(0deg);
        }

        .navbar .dropdown:hover .dropbtn::after,
        .navbar .no-drop:hover::after {
            width: 0;
        }
    }

    .dropdown.open .dropdown-content {
        opacity: 1;
        transform: rotateX(0deg);
        pointer-events: auto;
    }

    .dropdown.open .arrow {
        transform: rotate(-180deg);
    }
}

@media (hover: hover) {
    .logo:hover {
        box-shadow: 0 0 8px 3px rgba(255, 255, 255, 0.25);
        transform: translateY(-50%) scale(1.02);
        cursor: pointer;
    }
}

/* Hamburger menu for small screens */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .logo {
        position: absolute;
        top: 50%;
        left: 35px;
        width: 80px;
        height: 80px;
        border-radius: 50%;
        border: 2px solid white;
        background: white;
        object-fit: cover;
        z-index: 101;
    }

    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 24px;
        height: 18px;
        position: absolute;
        top: 20px;
        right: 20px;
        cursor: pointer;
        z-index: 1001;
    }

    .hamburger div {
        width: 100%;
        height: 2px;
        background-color: white;
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    .hamburger.open div:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.open div:nth-child(2) {
        opacity: 0;
    }

    .hamburger.open div:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .menu-separator {
        height: 1px;
        background-color: rgba(255, 255, 255, 0.3);
        width: 100%;
        margin-bottom: 1.5rem;
    }

    .side-menu {
        position: fixed;
        top: 0;
        right: 0;
        width: 300px;
        height: 100vh;
        background-color: #1F7D53;
        box-shadow: -3px 0 10px rgba(0, 0, 0, 0.3);
        z-index: 1000;
        padding: 80px 20px 20px 20px;
        color: white;
        transform: translateX(100%);
        transition: transform 0.3s ease, visibility 0s linear 0.3s;
        visibility: hidden;
        pointer-events: none;
    }

    .side-menu.show {
        transform: translateX(0);
        visibility: visible;
        pointer-events: auto;
        transition: transform 0.3s ease;
    }

    .side-menu ul {
        list-style: none;
        padding: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .side-menu li {
        text-align: left;
    }

    .side-menu li a {
        display: block;
        font-size: 1.1rem;
        font-weight: 500;
        color: white;
        text-decoration: none;
        padding: 0.5rem 0;
    }

    .menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }

    .menu-overlay.show {
        opacity: 1;
        pointer-events: all;
    }

    /* Dropdowns */
    .side-menu .hamburger-dropdown > a,
    .side-menu .hamburger-link > a {
        font-size: 1.5rem;
        font-family: "Alegreya Sans SC", serif;
    }

    .side-menu .ham-sub-link > a {
        font-size: 1rem;
        font-family: "Public Sans", serif;
    }

    .hamburger-dropdown > a {
        display: flex;
        justify-content: space-between;
        align-items: center;
        color: white;
        text-decoration: none;
        padding: 0.5rem 0;
    }

    .side-menu .hamburger-dropdown .hamburger-submenu {
        max-height: 0;
        overflow: hidden;
        flex-direction: column;
        gap: 0.75rem;
        padding-left: 1rem;
        transition: max-height 0.3s ease, padding 0.3s ease;
    }

    .side-menu .hamburger-dropdown.open .hamburger-submenu {
        max-height: 500px;
        padding-top: 0.5rem;
    }

    .side-menu .hamburger-dropdown > a .arrow {
        display: inline-block;
        margin-left: 0.25rem;
        transition: transform 0.3s ease;
        transform-origin: center;
        vertical-align: middle;
    }

    .side-menu .hamburger-dropdown.open > a .arrow {
        transform: rotate(-180deg);
    }
}

/* Fade in on page load */
.fade-in-on-load {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease, transform 1s ease;
}

.fade-in-on-load.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-fixed {
    opacity: 0;
    transition: opacity 1s ease;
}

.fade-in-fixed.visible {
    opacity: 1;
}

#page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #1F7D53;
    pointer-events: none;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease;
}

#page-transition.active {
    opacity: 1;
}

#page-transition:not(.active) {
    opacity: 0;
}

/* Footer */
footer {
    background-color: #1F7D53;
    color: white;
    height: auto;
    padding: 40px 40px 20px;
    text-align: center;
}

footer h2 {
    font-size: 24px;
    font-family: "Rubik", sans-serif;
    font-weight: normal;
    text-shadow: 0 0 2px white;
}

footer h4 {
    font-size: 16px;
    font-family: "Rubik", sans-serif;
    font-weight: normal;
    text-shadow: 0 0 1px white;
    padding: 0 100px;
}

footer hr {
    display: block;
    opacity: 100%;
    border: 0;
    height: 1px;
    width: 60vw;
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0));
}

.footer-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 160px;
    padding-top: 20px;
}

.footer-container img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
}

.copyright {
    font-family: "Rubik", sans-serif;
    text-shadow: 0 0 1px white;
    white-space: nowrap;
}

.copyright-sm {
    display: none;
}

.contact-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.email {
    font-family: "Rubik", sans-serif;
    font-size: 16px;
    color: white;
    text-shadow: 0 0 1px white;
    text-decoration: none;
    margin-bottom: 10px;
}

.social-icons {
    display: flex;
    font-size: 24px;
    gap: 15px;
}

.social-icons a {
    color: white;
}

/* Footer small screens */
@media (max-width: 768px) {
    footer h2 {
        font-size: 4vw;
    }

    footer h4 {
        font-size: 3vw;
        padding: 0;
    }

    footer hr {
        width: 80vw;
    }


    .footer-container {
        gap: 60px;
        padding-top: 20px;
    }

    .footer-container img {
        width: 16vw;
        height: 16vw;
        border-radius: 50%;
    }

    .email {
        font-size: 2.5vw;
    }

    .social-icons {
        font-size: 6vw;
    }

    .copyright {
        display: none;
    }

    .copyright-sm {
        display: block;
        font-family: "Rubik", sans-serif;
        text-shadow: 0 0 1px white;
        padding-top: 40px;
        font-size: 2.5vw;
    }
}