/* =========================================================
   HEADER
========================================================= */

.contact-header {
    width: 100%;

    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;

    position: sticky;
    top: 0;

    z-index: 1000;
}


.header-container {
    width: min(1200px, 92%);
    min-height: 76px;

    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: space-between;
}


/* =========================================================
   LOGO
========================================================= */

.contact-logo {
    display: flex;
    align-items: center;

    flex-shrink: 0;

    text-decoration: none;
}


.contact-logo img {
    display: block;

    width: 155px;
    max-width: 100%;
    height: auto;
}


/* =========================================================
   NAVIGATION
========================================================= */

.main-navigation {
    display: flex;
    align-items: center;

    gap: 26px;
}


.main-navigation a {
    position: relative;

    color: #111827;

    text-decoration: none;

    font-size: 14px;
    font-weight: 600;

    line-height: 1.4;

    padding: 10px 0;

    transition: color 0.25s ease;
}


/* Underline */

.main-navigation a::after {
    content: "";

    position: absolute;

    left: 0;
    bottom: 3px;

    width: 0;
    height: 2px;

    background: #111827;

    border-radius: 2px;

    transition: width 0.25s ease;
}


.main-navigation a:hover {
    color: #555;
}


.main-navigation a:hover::after {
    width: 100%;
}


/* Keyboard accessibility */

.main-navigation a:focus-visible {
    outline: 2px solid #111827;
    outline-offset: 4px;
    border-radius: 3px;
}


/* Active page */

.main-navigation a.active {
    color: #111827;
}


.main-navigation a.active::after {
    width: 100%;
}


/* =========================================================
   HAMBURGER BUTTON
========================================================= */

.menu-toggle {
    display: none;

    width: 44px;
    height: 44px;

    padding: 0;

    border: 1px solid #e5e7eb;
    border-radius: 8px;

    background: #ffffff;

    cursor: pointer;

    align-items: center;
    justify-content: center;

    flex-direction: column;

    gap: 5px;

    transition:
        background 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}


.menu-toggle:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}


.menu-toggle:focus-visible {
    outline: 2px solid #111827;
    outline-offset: 3px;
}


.menu-toggle span {
    display: block;

    width: 21px;
    height: 2px;

    background: #111827;

    border-radius: 10px;

    transition:
        transform 0.25s ease,
        opacity 0.25s ease;
}


/* =========================================================
   HAMBURGER → X
========================================================= */

.menu-toggle.active span:nth-child(1) {
    transform:
        translateY(7px)
        rotate(45deg);
}


.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}


.menu-toggle.active span:nth-child(3) {
    transform:
        translateY(-7px)
        rotate(-45deg);
}


/* =========================================================
   TABLET
========================================================= */

@media screen and (max-width: 1050px) {

    .header-container {
        width: 94%;
    }

    .main-navigation {
        gap: 18px;
    }

    .main-navigation a {
        font-size: 13px;
    }

    .contact-logo img {
        width: 145px;
    }
}


/* =========================================================
   MOBILE NAVIGATION
========================================================= */

@media screen and (max-width: 800px) {

    .header-container {
        min-height: 68px;

        width: 92%;
    }


    /* Logo */

    .contact-logo img {
        width: 140px;
    }


    /* Show hamburger */

    .menu-toggle {
        display: flex;

        position: relative;

        z-index: 1002;
    }


    /* Mobile navigation */

    .main-navigation {
        position: absolute;

        top: 100%;
        left: 0;

        width: 100%;

        padding: 10px 0 15px;

        background: #ffffff;

        border-bottom: 1px solid #e5e7eb;

        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);

        display: flex;
        flex-direction: column;
        align-items: stretch;

        gap: 0;

        /* Hidden */

        opacity: 0;
        visibility: hidden;

        transform: translateY(-10px);

        pointer-events: none;

        transition:
            opacity 0.25s ease,
            visibility 0.25s ease,
            transform 0.25s ease;
    }


    /* Open */

    .main-navigation.active {
        opacity: 1;

        visibility: visible;

        transform: translateY(0);

        pointer-events: auto;
    }


    /* Mobile links */

    .main-navigation a {
        display: block;

        width: 100%;

        box-sizing: border-box;

        padding: 13px 6%;

        font-size: 15px;

        border-bottom: 1px solid #f1f1f1;
    }


    .main-navigation a:last-child {
        border-bottom: none;
    }


    /* Remove desktop underline animation */

    .main-navigation a::after {
        display: none;
    }


    .main-navigation a:hover {
        background: #f8f9fa;
        color: #111827;
    }


    .main-navigation a.active {
        background: #f3f4f6;
    }
}


/* =========================================================
   SMALL PHONES
========================================================= */

@media screen and (max-width: 480px) {

    .header-container {
        width: 94%;

        min-height: 64px;
    }


    .contact-logo img {
        width: 125px;
    }


    .menu-toggle {
        width: 42px;
        height: 42px;
    }


    .menu-toggle span {
        width: 20px;
    }


    .main-navigation a {
        padding: 12px 6%;

        font-size: 14px;
    }
}


/* =========================================================
   REDUCE MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .main-navigation,
    .main-navigation a,
    .menu-toggle,
    .menu-toggle span {
        transition: none;
    }
}