* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: hsl(0, 0%, 98%);
    min-height: 100vh;
}

.navbar {
    background: rgba(255, 255, 255, 0.9);
    background: hsl(0, 0%, 99%);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding: 1rem 1.5rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);

}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea, #764ba2);
    background: linear-gradient(135deg, hsl(210, 79%, 45%), hsl(210, 79%, 50%));


    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    transition: all 0.3s ease;
    z-index: 10;
}

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

/* Mobile Navigation */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 10;
}

.nav-icon {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: #333;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-icon:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    transform: scale(1.1);
}

/* Separate hamburger and close icons */
.hamburger-icon {
    display: block;
}

.close-menu-icon {
    display: none;
}

.hamburger.active .hamburger-icon {
    display: none;
}

.hamburger.active .close-menu-icon {
    display: block;
}

/* Desktop Navigation */
.nav-items {
    display: none;
    align-items: center;
    gap: 2rem;
    margin-left: auto;
    margin-right: 1rem;
}

.nav-item {
    position: relative;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-item:hover {
    color: #1976d2;
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.nav-item::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background: linear-gradient(135deg, hsl(210, 79%, 46%), hsl(210, 79%, 50%));
    transition: all 0.3s ease;
}

.nav-item:hover::after {
    width: 100%;
    left: 0;
}

.nav-item.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 25%;
    width: 50%;
    height: 2px;
    background: #1976d2;
    border-radius: 2px;
}

/* Search Bar */
.search-container {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 5;
}

.search-container.active {
    opacity: 1;
    visibility: visible;
}

.search-bar {
    width: 100%;
    padding: 0.75rem 3rem 0.75rem 1rem;
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.search-bar:focus {
    border-color: hsl(210, 79%, 55%);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#searchBtn i:active, #searchBtn i:hover{
    color: hsl(210, 79%, 58%);
}

.search-clear {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #666;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.search-clear:hover {
    color: hsl(210, 79%, 40%);
    background: rgba(102, 126, 234, 0.1);
}

/* Mobile Menu */
.mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 0 0 15px 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    gap: 0.7rem;
    flex-direction: column;
    align-items: flex-start;
}

.mobile-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.mobile-menu-item {
    display: block;
    text-decoration: none;
    color: #333;
    padding: 1.5rem 2rem;
    line-height: 1.5;
    font-weight: 500;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.mobile-menu-item:last-child {
    border-bottom: none;
}

.mobile-menu-item:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.05);
    padding-left: 2rem;
}

.mobile-menu-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.mobile-menu-item:hover::before {
    transform: translateX(0);
}

/* Visibility control */
.hidden {
    opacity: 0 !important;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Desktop styles */
@media (min-width: 768px) {
    .nav-items {
        display: flex;
    }

    .hamburger {
        display: none !important;
    }

    .mobile-menu {
        display: none;
    }

    .search-container.active {
        left: 200px;
        /* Start after logo space */
        right: 3rem;
    }

    .nav-actions {
        gap: 0;
    }
}

main {
    flex: 1;
  
    box-sizing: border-box;
    margin-top: 70px;
}

