/* Navbar Styles */
nav {
    width: 100%;
    display: flex;
    justify-content: space-between; 
    align-items: center;
    padding: 15px 40px;
    background: linear-gradient(90deg, #F5DF58 0%, #a771da 100%);
    border-radius: 30px;
    margin-top: 15px;
    flex-wrap: nowrap; 
    position: relative;
}

.logo img {
    height: 60px;
    width: auto;
    display: block;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: scale(1.1);
}

.nav-links {
    display: flex;
    justify-content: space-evenly; 
    align-items: center;
    list-style: none; 
    flex: 1; 
    padding: 0;
    margin: 0 40px; 
}

.nav-links li a {
    color: #4A14A4;
    text-decoration: none;
    font-size: 15px;
    display: inline-block;
    transition: color 0.3s, transform 0.3s ease;
}

.nav-links li a:hover {
    color: #1d1d1c;
    transform: scale(1.1); 
}

.btn {
    background: #d62828;
    padding: 10px 18px;
    border-radius: 25px;
    color: #fff;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    transition: background 0.3s, transform 0.3s ease;
}

.btn:hover {
    background: #b71c1c;
    transform: scale(1.05); 
}

/* Mobile Menu Toggle (hidden by default) */
.mobile-toggle {
    display: none;
    flex-direction: column;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-left: 15px;
    z-index: 1001;
}

.mobile-toggle span {
    width: 25px;
    height: 3px;
    background-color: #4A14A4;
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* Responsive Breakpoints */

/* Large Desktop */
@media screen and (max-width: 1200px) {
    nav {
        padding: 12px 30px;
    }
    
    .nav-links {
        margin: 0 25px;
    }
}

/* Desktop/Laptop */
@media screen and (max-width: 1024px) {
    nav {
        padding: 12px 25px;
    }
    
    .nav-links {
        margin: 0 20px;
    }
    
    .nav-links li a {
        font-size: 14px;
    }
    
    .btn {
        padding: 8px 15px;
        font-size: 14px;
    }
}

/* Tablet and Mobile */
@media screen and (max-width: 768px) {
    nav {
        margin-left: 10px;
        margin-right: 20px;
        padding: 10px 20px;
        justify-content: space-between;
        display: flex;
        flex-direction: row;
    }
    
    .logo img {
        height: 50px;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(90deg, #F5DF58 0%, #a771da 100%);
        border-radius: 20px;
        flex-direction: column;
        margin-top: 20px;
        padding: 20px 0;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
        z-index: 1000;
        animation: slideDown 0.3s ease-in-out;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links li {
        margin: 8px 0;
        width: 100%;
    }
    
    .nav-links li a {
        font-size: 16px;
        padding: 12px 20px;
        display: block;
        text-align: center;
        width: 100%;
        border-radius: 10px;
        transition: all 0.3s ease;
    }
    
    .nav-links li a:hover {
        background: rgba(255, 255, 255, 0.1);
        transform: translateY(-2px);
    }
    
    .btn {
        padding: 8px 15px;
        font-size: 13px;
        white-space: nowrap;
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    /* Hamburger animation */
    .mobile-toggle.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
        background-color: #d62828;
    }
    
    .mobile-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-toggle.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
        background-color: #d62828;
    }
}

/* Small Tablet */
@media screen and (max-width: 640px) {
    nav {
        padding: 8px 15px;
        border-radius: 25px;
    }
    
    .logo img {
        height: 45px;
    }
    
    .btn {
        padding: 7px 12px;
        font-size: 12px;
    }
    
    .nav-links li a {
        font-size: 15px;
        padding: 10px 15px;
    }
}

/* Mobile Phone */
@media screen and (max-width: 480px) {
    nav {
        padding: 8px 12px;
        margin-top: 10px;
        border-radius: 20px;
    }
    
    .logo img {
        height: 40px;
    }
    
    .btn {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .nav-links li a {
        font-size: 14px;
        padding: 8px 15px;
    }
    
    .mobile-toggle {
        padding: 5px;
        margin-left: 8px;
    }
    
    .mobile-toggle span {
        width: 20px;
        height: 2px;
    }
}

/* Very Small Mobile */
@media screen and (max-width: 360px) {
    nav {
        padding: 6px 10px;
        border-radius: 15px;
    }
    
    .logo img {
        height: 35px;
    }
    
    .btn {
        padding: 5px 8px;
        font-size: 10px;
    }
    
    .mobile-toggle {
        padding: 4px;
        margin-left: 5px;
    }
    
    .mobile-toggle span {
        width: 18px;
        height: 1.5px;
    }
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered menu item animation */
@media screen and (max-width: 768px) {
    .nav-links.active li {
        animation: fadeInUp 0.3s ease-in-out forwards;
        opacity: 0;
    }
    
    .nav-links.active li:nth-child(1) { animation-delay: 0.1s; }
    .nav-links.active li:nth-child(2) { animation-delay: 0.2s; }
    .nav-links.active li:nth-child(3) { animation-delay: 0.3s; }
    .nav-links.active li:nth-child(4) { animation-delay: 0.4s; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}