/**
 * Trade Rock - Modern Landing Page Navigation
 * A minimalist, responsive navigation with smooth transitions and scroll behavior
 */

/* Base Navigation Styles */
.traderock-navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.97);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    height: 80px;
    max-width: 1400px;
    margin: 0 auto;
    transition: height 0.3s ease;
}

/* Logo Styles */
.nav-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #2C3E50;
    font-weight: 700;
}

.logo-img {
    height: 40px;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.logo-text {
    font-size: 1.5rem;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

/* Navigation Menu Styles */
.nav-menu {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.nav-links li {
    margin: 0 12px;
}

.nav-link {
    position: relative;
    display: block;
    color: #555;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 8px 0;
    transition: color 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: #3498DB;
}

.nav-link:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #3498DB;
    transition: width 0.3s ease;
}

.nav-link:hover:after, .nav-link.active:after {
    width: 100%;
}

/* Hamburger Menu */
.hamburger-menu {
    display: none;
    cursor: pointer;
    z-index: 1001;
}

.hamburger-icon {
    width: 30px;
    height: 20px;
    position: relative;
    transform: rotate(0deg);
    transition: 0.5s ease-in-out;
}

.hamburger-icon span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: #2C3E50;
    border-radius: 3px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: .25s ease-in-out;
}

.hamburger-icon span:nth-child(1) {
    top: 0px;
}

.hamburger-icon span:nth-child(2) {
    top: 8px;
}

.hamburger-icon span:nth-child(3) {
    top: 16px;
}

/* Hamburger Menu Animation */
.hamburger-icon.open span:nth-child(1) {
    top: 8px;
    transform: rotate(135deg);
}

.hamburger-icon.open span:nth-child(2) {
    opacity: 0;
    left: -60px;
}

.hamburger-icon.open span:nth-child(3) {
    top: 8px;
    transform: rotate(-135deg);
}

/* Mobile Navigation */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -300px;
    width: 250px;
    height: 100vh;
    background-color: #fff;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 999;
    padding: 100px 0 20px 0;
    overflow-y: auto;
}

.mobile-nav.open {
    right: 0;
}

.mobile-nav-links {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-link {
    display: block;
    padding: 15px 30px;
    color: #2C3E50;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 1px solid #f1f1f1;
}

.mobile-nav-link:hover, .mobile-nav-link.active {
    background-color: #f8f9fa;
    color: #3498DB;
    padding-left: 35px;
}

/* Scrolled Navigation Styles */
.traderock-navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.scrolled .nav-container {
    height: 60px;
}

.scrolled .logo-img {
    height: 32px;
}

.scrolled .logo-text {
    font-size: 1.3rem;
}

/* Overlay */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 998;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .hamburger-menu {
        display: block;
    }
    
    .nav-container {
        padding: 0 5%;
    }
}

/* Adjust for the admin bar when logged in */
.admin-bar .traderock-navbar {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .traderock-navbar {
        top: 46px;
    }
}

/* Hero section spacing to account for fixed navbar */
#home {
    padding-top: 80px;
}
