/* ================================
   APG WEBSITE – GLOBAL SETTINGS
================================ */

:root {
    --apg-green: #004331;
    --apg-dark-green: #003527;
    --apg-gold: #d99a17;
    --apg-white: #ffffff;
    --apg-text: #17231f;
    --apg-border: #e7e7e7;
    --header-height: 92px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    color: var(--apg-text);
    background-color: var(--apg-white);
    font-family: Arial, Helvetica, sans-serif;
}

body.menu-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
}


/* ================================
   HEADER
================================ */

.site-header {
    position: relative;
    z-index: 1000;
    width: 100%;
    background-color: var(--apg-white);
    border-bottom: 1px solid var(--apg-border);
}

.header-container {
    width: min(1180px, calc(100% - 40px));
    min-height: var(--header-height);
    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 35px;
}


/* ================================
   LOGO
================================ */

.logo-link {
    display: flex;
    flex-shrink: 0;
    align-items: center;
}

.site-logo {
    display: block;
    width: 190px;
    height: 72px;
    object-fit: contain;
}


/* ================================
   DESKTOP NAVIGATION
================================ */

.main-navigation {
    display: flex;
    align-items: center;
}

.navigation-list {
    display: flex;
    align-items: center;
    gap: 34px;
    list-style: none;
}

.navigation-list > li {
    position: relative;
}

.navigation-link {
    position: relative;

    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 35px 0;

    color: #202521;
    background: transparent;
    border: none;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;
    transition: color 0.25s ease;
}

.navigation-link::after {
    content: "";

    position: absolute;
    right: 100%;
    bottom: 25px;
    left: 0;

    height: 2px;
    background-color: var(--apg-gold);

    transition: right 0.25s ease;
}

.navigation-link:hover,
.navigation-link.active {
    color: var(--apg-green);
}

.navigation-link:hover::after,
.navigation-link.active::after {
    right: 0;
}

.dropdown-arrow {
    display: inline-block;
    font-size: 15px;
    transition: transform 0.25s ease;
}


/* ================================
   SERVICES DROPDOWN
================================ */

.dropdown-menu {
    position: absolute;
    top: calc(100% - 12px);
    left: 50%;

    width: 270px;
    padding: 10px;

    list-style: none;
    background-color: var(--apg-white);
    border-top: 3px solid var(--apg-gold);
    border-radius: 4px;
    box-shadow: 0 18px 45px rgba(0, 55, 40, 0.14);

    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 12px);

    transition:
        opacity 0.25s ease,
        visibility 0.25s ease,
        transform 0.25s ease;
}

.dropdown-menu a {
    display: block;
    padding: 12px 14px;

    color: #35403b;
    border-radius: 3px;

    font-size: 13px;
    line-height: 1.4;

    transition:
        color 0.25s ease,
        background-color 0.25s ease,
        padding-left 0.25s ease;
}

.dropdown-menu a:hover {
    padding-left: 19px;
    color: var(--apg-green);
    background-color: #f4f7f5;
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu,
.dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}


/* ================================
   PROPOSAL BUTTON
================================ */

.proposal-button {
    display: inline-flex;
    min-height: 48px;
    padding: 0 21px;

    align-items: center;
    justify-content: center;

    color: var(--apg-white);
    background-color: var(--apg-green);
    border: 1px solid var(--apg-green);
    border-radius: 5px;

    font-size: 13px;
    font-weight: 700;

    transition:
        color 0.25s ease,
        background-color 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.proposal-button:hover {
    color: var(--apg-green);
    background-color: var(--apg-white);
    box-shadow: 0 8px 22px rgba(0, 67, 49, 0.16);
    transform: translateY(-2px);
}


/* ================================
   MOBILE MENU BUTTON
================================ */

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 9px;

    background: transparent;
    border: none;

    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    margin: 6px 0;

    background-color: var(--apg-green);
    border-radius: 5px;

    transition:
        transform 0.25s ease,
        opacity 0.25s ease;
}


/* ================================
   TABLET AND MOBILE
================================ */

@media (max-width: 1020px) {

    :root {
        --header-height: 76px;
    }

    .header-container {
        position: relative;
    }

    .site-logo {
        width: 155px;
        height: 58px;
    }

    .menu-toggle {
        display: block;
        position: relative;
        z-index: 1002;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .main-navigation {
        position: fixed;
        top: var(--header-height);
        right: 0;
        bottom: 0;
        left: 0;

        display: block;
        padding: 20px;

        overflow-y: auto;

        background-color: var(--apg-white);
        border-top: 1px solid var(--apg-border);

        opacity: 0;
        visibility: hidden;
        transform: translateY(-15px);

        transition:
            opacity 0.25s ease,
            visibility 0.25s ease,
            transform 0.25s ease;
    }

    .main-navigation.open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .navigation-list {
        width: min(100%, 600px);
        margin: 0 auto;

        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .navigation-list > li {
        width: 100%;
        border-bottom: 1px solid var(--apg-border);
    }

    .navigation-link {
        width: 100%;
        padding: 17px 5px;

        justify-content: space-between;

        font-size: 15px;
        text-align: left;
    }

    .navigation-link::after {
        display: none;
    }

    .dropdown-menu {
        position: static;

        width: 100%;
        max-height: 0;
        padding: 0 0 0 15px;

        border: none;
        box-shadow: none;

        opacity: 1;
        visibility: visible;
        overflow: hidden;
        transform: none;

        transition:
            max-height 0.3s ease,
            padding 0.3s ease;
    }

    .dropdown.open .dropdown-menu {
        max-height: 320px;
        padding-top: 4px;
        padding-bottom: 14px;
        transform: none;
    }

    .dropdown-menu a {
        padding: 11px 12px;
    }

    .proposal-item {
        padding: 20px 0;
        border-bottom: none !important;
    }

    .proposal-button {
        width: 100%;
        min-height: 52px;
    }
}


/* ================================
   SMALL MOBILE
================================ */

@media (max-width: 480px) {

    .header-container {
        width: calc(100% - 28px);
    }

    .site-logo {
        width: 135px;
        height: 53px;
    }

    .menu-toggle {
        width: 40px;
        height: 40px;
    }

    .main-navigation {
        padding-right: 14px;
        padding-left: 14px;
    }
}