/* ============================================
   HAKY COFFEE - NAVIGATION STYLES
   Using Proven Side-Sliding Approach
   ============================================ */

/* Base navbar styles */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(45, 80, 22, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.navbar .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

/* Logo styles */
.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
    gap: 12px;
    transition: transform 0.3s ease;
}

.logo a:hover {
    transform: scale(1.05);
}

.logo img {
    height: 50px;
    width: auto;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(45, 80, 22, 0.2);
}

.logo-text {
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(135deg, #2d5016, #5a9b2e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}

/* Mobile menu toggle button - Animated hamburger */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: relative;
}

.mobile-menu-toggle .bar {
    width: 100%;
    height: 3px;
    background: linear-gradient(135deg, #3d6b1f, #5a9b2e);
    border-radius: 3px;
    transition: all 0.3s ease;
    transform-origin: center;
}

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

.mobile-menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

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

/* Desktop Navigation menu */
.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
    gap: 5px;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    display: block;
    padding: 10px 16px;
    text-decoration: none;
    color: #424242;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.3s ease;
    border-radius: 10px;
    position: relative;
}

.nav-menu a::before {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 2px;
    background: linear-gradient(135deg, #3d6b1f, #5a9b2e);
    border-radius: 2px;
    transition: transform 0.3s ease;
}

.nav-menu a:hover {
    color: #3d6b1f;
    background: rgba(93, 155, 46, 0.1);
}

.nav-menu a:hover::before {
    transform: translateX(-50%) scaleX(1);
}

.nav-menu a.active {
    color: #2d5016;
    background: linear-gradient(135deg, rgba(61, 107, 31, 0.15), rgba(90, 155, 46, 0.1));
    font-weight: 600;
}

.nav-menu a.active::before {
    transform: translateX(-50%) scaleX(1);
}

/* Get Started button */
.btn-enroll {
    background: linear-gradient(135deg, #3d6b1f, #5a9b2e) !important;
    color: #fff !important;
    padding: 10px 24px !important;
    border-radius: 50px !important;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(61, 107, 31, 0.3);
}

.btn-enroll:hover {
    background: linear-gradient(135deg, #2d5016, #4a8625) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(61, 107, 31, 0.4);
}

/* Mobile overlay (hidden by default) */
.mobile-nav-overlay {
    display: none;
}

/* Prevent body scroll when nav is open */
body.nav-open {
    overflow: hidden;
}

/* ============================================
   MOBILE NAVIGATION (768px and below)
   ============================================ */
@media (max-width: 768px) {
    /* Show mobile menu toggle */
    .mobile-menu-toggle {
        display: flex;
    }

    .logo img {
        height: 45px;
    }

    .logo-text {
        font-size: 18px;
    }

    /* Mobile overlay - appears when menu is active */
    .mobile-nav-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0);
        backdrop-filter: blur(0px);
        z-index: 998;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: all 0.3s ease;
    }

    .mobile-nav-overlay.active {
        background-color: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(3px);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    /* Mobile menu - slides from right */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 320px;
        max-width: 85%;
        background: linear-gradient(180deg, #ffffff 0%, #f8faf5 100%);
        flex-direction: column;
        padding: 80px 0 30px;
        box-shadow: -5px 0 25px rgba(45, 80, 22, 0.15);
        transition: right 0.3s ease;
        overflow-y: auto;
        gap: 0;
        align-items: stretch;
        z-index: 999;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid rgba(61, 107, 31, 0.1);
    }

    .nav-menu a {
        padding: 16px 24px;
        font-size: 16px;
        border-radius: 0;
        color: #2d5016;
        font-weight: 600;
    }

    .nav-menu a::before {
        display: none;
    }

    .nav-menu a:hover,
    .nav-menu a.active {
        background: linear-gradient(90deg, rgba(61, 107, 31, 0.15), transparent);
        color: #2d5016;
        border-left: 4px solid #5a9b2e;
    }

    .btn-enroll {
        margin: 20px 24px !important;
        text-align: center;
        border-radius: 50px !important;
        padding: 14px 28px !important;
        font-size: 16px;
    }

    /* Add Haky Coffee branding to mobile menu */
    .nav-menu::after {
        content: '☕';
        position: absolute;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 40px;
        opacity: 0.1;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .logo-text {
        display: none;
    }

    .nav-wrapper {
        padding: 10px 0;
    }

    .logo img {
        height: 40px;
    }

    .nav-menu {
        width: 280px;
    }
}

/* Tablet optimization */
@media (min-width: 769px) and (max-width: 1024px) {
    .nav-menu {
        gap: 5px;
    }

    .nav-menu a {
        padding: 10px 14px;
        font-size: 14px;
    }

    .btn-enroll {
        padding: 10px 20px !important;
    }
}

/* Large desktop */
@media (min-width: 1200px) {
    .navbar .container {
        padding: 0 40px;
    }

    .nav-menu {
        gap: 10px;
    }

    .nav-menu a {
        padding: 12px 18px;
    }

    .logo-text {
        font-size: 24px;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar for mobile menu */
.nav-menu::-webkit-scrollbar {
    width: 4px;
}

.nav-menu::-webkit-scrollbar-track {
    background: rgba(61, 107, 31, 0.1);
}

.nav-menu::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3d6b1f, #5a9b2e);
    border-radius: 10px;
}