// Variables
$nav-timing: cubic-bezier(0.4, 0, 0.2, 1);

:root {
    --nav-bg: rgba(255, 255, 255, 0.9);
    --nav-border: rgba(255, 255, 255, 0.2);
    --nav-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
    --text-primary: #433623;
    --text-active: #0f172a;
    --home-color: #4ade80;
    --call-color: #f97316;
    --sun-color: rgb(241, 239, 99);
    --moon-color: #6366f1;
    --whatsapp-color: #25d366;
    --nav-timing: #{$nav-timing};
}

/* Footer */
.site-footer {
    flex-shrink: 0;
    color: #abaaaa;

    .site-footer-inner {
        margin-top: 80px;
        margin-bottom: 60px;
    }

    .social-icons {
        display: flex;
        gap: 12px;
        justify-content: center;
        margin-top: 30px;
    }

    .footer-widget {
        .widget-title {
            color: var(--primary-color);
            font-size: 1rem;
            font-weight: 600;
            line-height: normal;
        }

        .footer-links {
            padding-left: 15px;
            display: grid;
            gap: 8px;
        }
    }

    a {
        transition: all 0.3s ease;
        color: #abaaaa;

        &:hover {
            text-decoration: none;
        }
    }

    .uk-nav {
        gap: 4px;
        display: grid;
        li {
            a {
                padding: 6px;
            }
        }
    }

    .footer-bottom {
        padding-top: 20px;
        padding-bottom: 20px;
        border-top: 1px solid #2d2a2a;

        span {
            color: #bbbbbb;
        }
    }
}

.mobile-nav-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 12px;
    z-index: 999;
    transition: transform 0.3s var(--nav-timing);
    transform: translateY(100%);

    &.nav-hidden {
        transform: translateY(100%);
        transition: transform 0.3s var(--nav-timing);
    }

    &.nav-visible {
        transform: translateY(0);
        transition: transform 0.3s var(--nav-timing);
    }
}

.mobile-bottom-nav {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
}

.nav-background-blur {
    position: absolute;
    inset: 0;
    background: var(--nav-bg);
    border-radius: 28px;
    border: 1px solid var(--nav-border);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    box-shadow: var(--nav-shadow);
}

.nav-content {
    position: relative;
    display: flex;
    justify-content: space-around;
    padding: 12px;
    gap: 6px;
}

.nav-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s var(--nav-timing);

    button {
        background-color: transparent;
        border: none;
        color: var(--text-primary);
    }

    &:active {
        transform: scale(0.95);
    }

    @media (hover: hover) {
        &:hover {
            transform: translateY(-2px);
        }
    }

    // Active states and custom colors
    &.active {
        color: var(--text-active);

        .icon-background {
            opacity: 0.1;
            transform: scale(1);
        }
    }

    // Custom colors for each nav item
    @for $i from 1 through 4 {
        &:nth-child(#{$i}) {
            .icon-background {
                background: var(
                    #{if(
                            $i == 1,
                            "--home-color",
                            if($i == 2, "--call-color", if($i == 3, "--whatsapp-color", "--moon-color"))
                        )}
                );
            }

            &.active {
                color: var(
                    #{if(
                            $i == 1,
                            "--home-color",
                            if($i == 2, "--call-color", if($i == 3, "--whatsapp-color", "--moon-color"))
                        )}
                );
            }
        }
    }
}

.nav-icon-wrapper {
    position: relative;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-background {
    position: absolute;
    inset: 1px;
    border-radius: 16px;
    transition: all 0.3s var(--nav-timing);
    opacity: 0;
    transform: scale(0.8);

    @media s {
        width: 40px;
        height: 40px;
    }
}

.mobile-nav-container.always-visible {
    transform: translateY(0) !important;
    opacity: 1 !important;
    visibility: visible !important;
}
.mobile-nav-container.always-visible.nav-hidden {
    transform: translateY(0) !important;
}

.uk-offcanvas-bar {
    .uk-nav > li > a {
        font-weight: 500;
        color: var(--secondary-color) !important;
    }
}