
/* ==========================================
   R3S - NAVIGATION CSS
========================================== */

/* DESKTOP NAVIGATION */

.desktop-navigation {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 26px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu > li {
    position: relative;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 28px 0;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 650;
    white-space: nowrap;
    position: relative;
    transition: color .3s ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    bottom: 19px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--r3s-primary);
    transition: width .3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--r3s-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link > i {
    font-size: 10px;
    transition: transform .3s ease;
}

/* DESKTOP DROPDOWN */

.dropdown-menu-custom {
    position: absolute;
    top: calc(100% - 5px);
    left: -20px;
    min-width: 260px;
    padding: 10px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: all .3s ease;
    z-index: 100;
}

.nav-dropdown:hover .dropdown-menu-custom,
.nav-dropdown:focus-within .dropdown-menu-custom {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown:hover > .nav-link > i {
    transform: rotate(180deg);
}

.dropdown-menu-custom a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    border-radius: 7px;
    transition: all .25s ease;
}

.dropdown-menu-custom a i {
    color: var(--r3s-primary);
    font-size: 17px;
}

.dropdown-menu-custom a:hover {
    color: var(--r3s-primary);
    background: var(--bg-secondary);
    padding-left: 17px;
}

/* MOBILE DRAWER */

.mobile-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.65);
    z-index: var(--z-overlay);
    opacity: 0;
    visibility: hidden;
    transition: all .35s ease;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(390px, 88%);
    height: 100%;
    height: 100dvh;
    background: var(--bg-primary);
    color: var(--text-primary);
    z-index: var(--z-drawer);
    transform: translateX(105%);
    transition: transform .4s cubic-bezier(.22,.61,.36,1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.mobile-drawer.active {
    transform: translateX(0);
}

.mobile-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 17px 20px;
    border-bottom: 1px solid var(--border-color);
}

.drawer-logo img {
    width: 130px;
    max-height: 50px;
    object-fit: contain;
}

.drawer-close {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all .3s ease;
}

.drawer-close:hover {
    background: var(--r3s-primary);
    color: #FFFFFF;
    transform: rotate(90deg);
}

.drawer-body {
    overflow-y: auto;
    padding: 22px 20px 35px;
    flex: 1;
}

.drawer-welcome {
    background: var(--bg-secondary);
    border-left: 3px solid var(--r3s-primary);
    border-radius: 8px;
    padding: 17px;
    margin-bottom: 20px;
}

.drawer-welcome span,
.drawer-contact > span {
    color: var(--r3s-primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
}

.drawer-welcome h4 {
    font-size: 17px;
    margin: 7px 0 0;
}

/* MOBILE LINKS */

.mobile-navigation {
    display: flex;
    flex-direction: column;
}

.mobile-nav-link {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 14px 12px;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    transition: all .3s ease;
}

.mobile-nav-link > i,
.mobile-nav-link span > i {
    width: 22px;
    font-size: 18px;
    color: var(--r3s-primary);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--r3s-primary);
    background: var(--bg-secondary);
}

/* MOBILE SUBMENU */

.service-toggle {
    justify-content: space-between;
}

.service-toggle span {
    display: flex;
    align-items: center;
    gap: 13px;
}

.service-arrow {
    transition: transform .3s ease;
}

.service-toggle.active .service-arrow {
    transform: rotate(180deg);
}

.mobile-submenu {
    display: none;
    padding: 8px 0 8px 45px;
    background: var(--bg-secondary);
}

.mobile-submenu.active {
    display: block;
    animation: submenuShow .3s ease;
}

@keyframes submenuShow {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-submenu a {
    display: block;
    padding: 11px 5px;
    color: var(--text-secondary);
    font-size: 13px;
    border-bottom: 1px solid var(--border-color);
}

.mobile-submenu a:hover {
    color: var(--r3s-primary);
}

/* DRAWER THEME */

.drawer-theme-row {
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
}

.drawer-theme-row > span {
    font-size: 14px;
    font-weight: 600;
}

.drawer-theme-row > span i {
    margin-right: 8px;
    color: var(--r3s-primary);
}

/* DRAWER CONTACT */

.drawer-contact {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 22px;
}

.drawer-contact > a {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-primary);
}

.drawer-contact > a i {
    color: var(--r3s-primary);
}

.drawer-contact .drawer-whatsapp {
    padding: 12px;
    background: #128C4A;
    color: #FFFFFF;
    border-radius: 8px;
    justify-content: center;
    font-weight: 700;
}

.drawer-contact .drawer-whatsapp i {
    color: #FFFFFF;
    font-size: 18px;
}

/* MOBILE BOTTOM NAV */

.mobile-bottom-nav {
    display: none;
}

/* FLOATING CONTACT */

.floating-contact {
    position: fixed;
    right: 22px;
    bottom: 25px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: var(--z-floating);
}

.floating-contact a {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    border-radius: 50%;
    font-size: 22px;
    box-shadow: 0 6px 20px rgba(0,0,0,.2);
    transition: transform .3s ease, box-shadow .3s ease;
}

.floating-contact a:hover {
    transform: translateY(-5px) scale(1.07);
    box-shadow: 0 10px 25px rgba(0,0,0,.25);
}

.floating-call {
    background: var(--r3s-primary);
}

.floating-whatsapp {
    background: #128C4A;
}

/* MOBILE BREAKPOINT */

@media (max-width: 1199px) {
    .nav-menu {
        gap: 17px;
    }

    .nav-link {
        font-size: 12px;
    }

    .navbar-inner {
        gap: 15px;
    }
}

@media (max-width: 991px) {
    .desktop-navigation {
        display: none;
    }
}

@media (max-width: 767px) {
    .mobile-bottom-nav {
        position: fixed;
        left: 0;
        bottom: 0;
        width: 100%;
        min-height: 65px;
        padding: 7px 5px calc(7px + env(safe-area-inset-bottom));
        display: flex;
        align-items: center;
        justify-content: space-around;
        background: var(--card-bg);
        border-top: 1px solid var(--border-color);
        box-shadow: 0 -5px 20px rgba(0,0,0,.07);
        z-index: var(--z-header);
    }

    .bottom-nav-link {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        background: none;
        border: none;
        color: var(--text-muted);
        font-size: 10px;
        font-weight: 600;
        padding: 5px 2px;
        transition: all .25s ease;
    }

    .bottom-nav-link i {
        font-size: 20px;
    }

    .bottom-nav-link.active,
    .bottom-nav-link:hover {
        color: var(--r3s-primary);
    }

    .floating-contact {
        right: 15px;
        bottom: calc(85px + env(safe-area-inset-bottom));
    }

    .floating-contact a {
        width: 46px;
        height: 46px;
        font-size: 20px;
    }

    body.drawer-open {
        overflow: hidden;
    }
}

@media (min-width: 768px) {
    .mobile-drawer,
    .mobile-drawer-overlay,
    .mobile-menu-toggle,
    .mobile-bottom-nav {
        display: none;
    }
}
