/* ===================================
   PRELOGIN NAVBAR - FLOATING MINIMALISTIC DESIGN
   =================================== */

:root {
    --nav-height: 90px;
    --nav-bg: rgba(255, 255, 255, 0.85);
    --nav-shadow: 0 8px 32px rgba(79, 61, 155, 0.12);
    --primary-color: #e77871;
    --secondary-color: #4f3d9b;
    --tertiary-color: #e7b26c;
    --text-primary: #1f2937;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.prelogin-navbar {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 3rem);
    max-width: 1300px;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(20px) saturate(180%);
    box-shadow: var(--nav-shadow);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: var(--transition);
}

.prelogin-navbar.scrolled {
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 40px rgba(79, 61, 155, 0.18);
    top: 1rem;
    width: calc(100% - 2rem);
}

.navbar-container {
    margin: 0 auto;
    padding: 0 2rem;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ===================================
   LOGO
   =================================== */
.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: var(--transition);
    position: relative;
}

.nav-logo img {
    height: 75px;
    width: auto;
    transition: var(--transition);
}

.nav-logo:hover img {
    transform: scale(1.05) rotate(-2deg);
    filter: drop-shadow(0 4px 12px rgba(79, 61, 155, 0.5));
}

/* ===================================
   NAVIGATION MENU
   =================================== */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    padding: 0.75rem 1.25rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: var(--transition);
    position: relative;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link:hover::before,
.nav-link.active::before {
    width: 60%;
}

.nav-link.active {
    background: linear-gradient(135deg, rgba(231, 120, 113, 0.1), rgba(79, 61, 155, 0.1));
    color: var(--secondary-color);
}

/* CTA Button */
.nav-cta {
    padding: 0.75rem 1.75rem;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: white;
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 12px;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(79, 61, 155, 0.4);
    margin-left: 1rem;
    position: relative;
    overflow: hidden;
}

.nav-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.nav-cta:hover::before {
    left: 100%;
}

.nav-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(79, 61, 155, 0.6);
}

/* ===================================
   MOBILE MENU TOGGLE
   =================================== */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative;
}

.hamburger {
    position: relative;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

.hamburger::before {
    top: -7px;
}

.hamburger::after {
    bottom: -7px;
}

.nav-toggle.active .hamburger {
    background: transparent;
}

.nav-toggle.active .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.nav-toggle.active .hamburger::after {
    bottom: 0;
    transform: rotate(-45deg);
}

/* ===================================
   BACK TO TOP BUTTON
   =================================== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 24px rgba(79, 61, 155, 0.4);
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.8);
    z-index: 999;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.back-to-top:hover {
    transform: translateY(-8px) scale(1.1);
    box-shadow: 0 10px 32px rgba(79, 61, 155, 0.7);
    background: linear-gradient(135deg, var(--secondary-color) 20%, var(--primary-color) 100%);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
}

/* ===================================
   MOBILE RESPONSIVE
   =================================== */

@media (max-width: 768px) {
    :root {
        --nav-height: 75px;
    }
    
    .prelogin-navbar {
        top: 1rem;
        width: calc(100% - 2rem);
        background: transparent;
        backdrop-filter: none;
        box-shadow: none;
        border: none;
    }
    
    .prelogin-navbar.scrolled {
        top: 0.5rem;
        background: transparent;
        box-shadow: none;
    }
    
    .navbar-container {
        padding: 0 1rem;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: calc(var(--nav-height) + 2.5rem);
        left: 1rem;
        right: 1rem;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 2rem 1.5rem;
        box-shadow: 0 10px 40px rgba(79, 61, 155, 0.15);
        border-radius: 20px;
        border: 1px solid rgba(255, 255, 255, 0.3);
        transform: translateY(-20px);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        gap: 0;
        max-height: calc(100vh - var(--nav-height) - 3rem);
        overflow-y: auto;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-link {
        width: 100%;
        padding: 1rem;
        text-align: center;
        border-bottom: 1px solid #f3f4f6;
    }
    
    .nav-link::before {
        display: none;
    }
    
    .nav-link.active {
        background: #f9fafb;
    }
    
    .nav-cta {
        width: 100%;
        margin-left: 0;
        margin-top: 1rem;
        text-align: center;
    }
    
    .back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 50px;
        height: 50px;
    }
    
    .nav-logo img {
        height: 90px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .navbar-container {
        padding: 0 2rem;
    }
    
    .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    .nav-cta {
        padding: 0.75rem 1.5rem;
        margin-left: 0.75rem;
    }
}

/* ===================================
   ANIMATIONS
   =================================== */
@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}