/* Horizontal Top Navbar - ASGK Technology with Animations */

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

/* Top Navbar */
.top-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.95) 50%, rgba(15, 23, 42, 0.95) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
    padding: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 20px rgba(102, 126, 234, 0.15), 0 0 40px rgba(118, 75, 162, 0.1);
    animation: slideDown 0.6s ease-out;
}

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

/* Scrolled State */
.top-navbar.scrolled {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98) 0%, rgba(30, 41, 59, 0.98) 50%, rgba(15, 23, 42, 0.98) 100%);
    box-shadow: 0 4px 30px rgba(102, 126, 234, 0.2), 0 0 50px rgba(118, 75, 162, 0.15);
    border-bottom-color: rgba(102, 126, 234, 0.3);
}

.navbar-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 70px;
    gap: 60px;
    transition: all 0.3s ease;
}

/* Logo Section with Animation */
.navbar-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    position: relative;
    animation: fadeInLeft 0.8s ease-out;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    font-family: 'Inter', 'Arial', sans-serif;
    letter-spacing: 0.5px;
    white-space: nowrap;
    position: relative;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-logo::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.4s ease;
}

.navbar-logo:hover::after {
    width: 100%;
}

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

/* Navigation Menu with Staggered Animation */
.navbar-menu {
    display: flex;
    align-items: center;
    gap: 40px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar-menu li {
    animation: fadeInUp 0.6s ease-out backwards;
}

.navbar-menu li:nth-child(1) { animation-delay: 0.1s; }
.navbar-menu li:nth-child(2) { animation-delay: 0.2s; }
.navbar-menu li:nth-child(3) { animation-delay: 0.3s; }
.navbar-menu li:nth-child(4) { animation-delay: 0.4s; }
.navbar-menu li:nth-child(5) { animation-delay: 0.5s; }

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

.nav-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1.2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 8px 16px;
    position: relative;
    white-space: nowrap;
    display: inline-block;
    border-radius: 8px;
}

/* Animated Underline */
.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
}

/* Glow Effect */
.nav-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.08));
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
    transform: translateY(-2px);
}

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

.nav-link:hover::after,
.nav-link.active::after {
    opacity: 1;
}

.nav-link.active {
    background: rgba(102, 126, 234, 0.08);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
}

/* Mobile Toggle with Animation */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: rgba(102, 126, 234, 0.15);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 8px;
    cursor: pointer;
    padding: 12px;
    position: absolute;
    right: 20px;
    transition: all 0.3s ease;
}

.mobile-toggle:hover {
    background: rgba(102, 126, 234, 0.25);
    transform: scale(1.05);
}

.toggle-bar {
    width: 28px;
    height: 3px;
    background: #ffffff;
    border-radius: 2px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-toggle.active {
    background: rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.3);
}

.mobile-toggle.active .toggle-bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.mobile-toggle.active .toggle-bar:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.mobile-toggle.active .toggle-bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
    background: linear-gradient(90deg, #667eea, #764ba2);
}

/* Mobile Menu with Slide Animation */
.mobile-menu {
    display: none;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98) 0%, rgba(30, 41, 59, 0.98) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 0 40px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
}

.mobile-menu.active {
    display: block;
    max-height: 600px;
    padding: 30px 40px;
}

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

.mobile-nav-list li {
    margin-bottom: 15px;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.3s ease;
}

.mobile-menu.active .mobile-nav-list li {
    opacity: 1;
    transform: translateX(0);
}

.mobile-menu.active .mobile-nav-list li:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.active .mobile-nav-list li:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu.active .mobile-nav-list li:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu.active .mobile-nav-list li:nth-child(4) { transition-delay: 0.25s; }
.mobile-menu.active .mobile-nav-list li:nth-child(5) { transition-delay: 0.3s; }

.mobile-nav-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    padding: 15px 20px;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.mobile-nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: linear-gradient(180deg, #667eea, #764ba2);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: #ffffff;
    background: rgba(102, 126, 234, 0.2);
    transform: translateX(10px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.mobile-nav-link:hover::before,
.mobile-nav-link.active::before {
    transform: scaleY(1);
}

.mobile-nav-link.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-left: 3px solid #667eea;
}

/* Body Adjustment */
body {
    padding-top: 70px;
    transition: padding-top 0.3s ease;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .navbar-menu {
        gap: 30px;
    }
    
    .navbar-container {
        padding: 0 40px;
        gap: 40px;
    }
    
    .nav-link {
        font-size: 12px;
        padding: 8px 12px;
    }
}

@media (max-width: 1024px) {
    .navbar-menu {
        gap: 25px;
    }
    
    .navbar-container {
        padding: 0 30px;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .navbar-menu {
        display: none;
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    .mobile-menu {
        display: block;
    }
    
    .navbar-container {
        padding: 0 20px;
        height: 65px;
        justify-content: flex-start;
    }
    
    .logo-text {
        font-size: 18px;
    }
    
    body {
        padding-top: 65px;
    }
}

@media (max-width: 480px) {
    .logo-text {
        font-size: 16px;
    }
    
    .navbar-container {
        padding: 0 15px;
        height: 60px;
    }
    
    .mobile-menu {
        padding: 0 20px;
    }
    
    .mobile-menu.active {
        padding: 20px;
    }
    
    .mobile-nav-link {
        font-size: 14px;
        padding: 12px 15px;
    }
    
    .toggle-bar {
        width: 24px;
    }
    
    body {
        padding-top: 60px;
    }
}

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

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

/* Loading Animation for Navbar */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Accessibility - Focus States */
.nav-link:focus,
.mobile-nav-link:focus,
.mobile-toggle:focus {
    outline: 2px solid rgba(102, 126, 234, 0.8);
    outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}


/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    padding: 16px 24px;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.4), 0 0 0 0 rgba(37, 211, 102, 0.7);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: whatsappPulse 2s infinite;
    overflow: hidden;
}

.whatsapp-float::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;
}

.whatsapp-float:hover::before {
    left: 100%;
}

.whatsapp-float:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 40px rgba(37, 211, 102, 0.5), 0 0 0 8px rgba(37, 211, 102, 0.2);
    animation: none;
}

.whatsapp-icon {
    font-size: 28px;
    animation: whatsappIconBounce 1s ease-in-out infinite;
}

.whatsapp-float:hover .whatsapp-icon {
    animation: whatsappIconRotate 0.6s ease-in-out;
}

.whatsapp-text {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* WhatsApp Animations */
@keyframes whatsappPulse {
    0%, 100% {
        box-shadow: 0 8px 30px rgba(37, 211, 102, 0.4), 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    50% {
        box-shadow: 0 8px 30px rgba(37, 211, 102, 0.4), 0 0 0 15px rgba(37, 211, 102, 0);
    }
}

@keyframes whatsappIconBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

@keyframes whatsappIconRotate {
    0% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-15deg);
    }
    75% {
        transform: rotate(15deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

/* Responsive WhatsApp Button */
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        padding: 14px 20px;
    }
    
    .whatsapp-icon {
        font-size: 24px;
    }
    
    .whatsapp-text {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .whatsapp-float {
        bottom: 15px;
        right: 15px;
        padding: 12px 16px;
        gap: 8px;
    }
    
    .whatsapp-icon {
        font-size: 22px;
    }
    
    .whatsapp-text {
        font-size: 13px;
    }
}

/* Hide text on very small screens, show only icon */
@media (max-width: 360px) {
    .whatsapp-text {
        display: none;
    }
    
    .whatsapp-float {
        width: 56px;
        height: 56px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }
    
    .whatsapp-icon {
        font-size: 26px;
    }
}
