/* Mobile WhatsApp Header Icon */

/* Mobile WhatsApp Icon next to logo */
.mobile-whatsapp-icon {
    display: none;
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.mobile-whatsapp-icon::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;
}

.mobile-whatsapp-icon:hover::before {
    left: 100%;
}

.mobile-whatsapp-icon i {
    font-size: 1.4rem;
    z-index: 2;
    position: relative;
}

.mobile-whatsapp-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    color: white;
    text-decoration: none;
}

@media (max-width: 991.98px) {
    .mobile-whatsapp-icon {
        display: flex !important;
        animation: pulse 2s infinite;
        margin-left: 15px;
        margin-right: 10px;
    }
    
    /* Adjust navbar brand and mobile icon alignment */
    .navbar-brand {
        margin-left: 0;
    }
    
    /* Ensure proper spacing between logo, WhatsApp icon, and toggle button */
    .navbar > .container {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    
    .navbar-toggler {
        margin-right: 0;
    }
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5), 0 0 0 8px rgba(37, 211, 102, 0.1);
    }
}

/* Desktop - show full button */
.btn-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: auto;
    white-space: nowrap;
}

.btn-whatsapp span {
    display: inline;
}

.btn-whatsapp i {
    margin-left: 8px;
}

/* Mobile optimizations */
@media (max-width: 991.98px) {
    /* Make WhatsApp button more compact on mobile */
    .btn-whatsapp {
        padding: 12px 16px;
        font-size: 0.9rem;
        min-width: 52px;
        border-radius: 26px;
        position: relative;
        overflow: hidden;
    }
    
    .btn-whatsapp span {
        display: none; /* Hide text on mobile */
    }
    
    .btn-whatsapp i {
        margin-left: 0;
        font-size: 1.3rem;
        transition: transform 0.3s ease;
    }
    
    /* Add pulse effect on mobile */
    .btn-whatsapp::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        background: rgba(255, 255, 255, 0.3);
        border-radius: 50%;
        transform: translate(-50%, -50%);
        transition: width 0.6s, height 0.6s;
    }
    
    .btn-whatsapp:hover::before {
        width: 100px;
        height: 100px;
    }
    
    .btn-whatsapp:hover i {
        transform: scale(1.1);
    }
    
    /* Ensure the button is visible in collapsed navbar */
    .navbar-collapse .btn-whatsapp {
        margin-top: 15px;
        margin-bottom: 10px;
        align-self: flex-start;
        width: fit-content;
        animation: fadeInUp 0.5s ease-out;
    }
    
    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* Extra small screens */
@media (max-width: 576px) {
    .btn-whatsapp {
        padding: 8px 12px;
        min-width: 45px;
    }
    
    .btn-whatsapp i {
        font-size: 1.1rem;
    }
}

/* When navbar is collapsed, show WhatsApp button in menu */
@media (max-width: 991.98px) {
    .navbar-collapse.show .btn-whatsapp,
    .navbar-collapse.collapsing .btn-whatsapp {
        display: flex !important;
    }
}

/* Floating WhatsApp button for mobile (optional enhancement) */
@media (max-width: 768px) {
    .floating-whatsapp {
        position: fixed;
        bottom: 20px;
        right: 20px;
        z-index: 1000;
        width: 60px;
        height: 60px;
        border-radius: 50%;
        background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
        transition: all 0.3s ease;
        animation: pulse 2s infinite;
    }
    
    .floating-whatsapp:hover {
        transform: scale(1.1);
        color: white;
        text-decoration: none;
    }
    
    .floating-whatsapp i {
        font-size: 1.5rem;
    }
    
    @keyframes pulse {
        0% {
            box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
        }
        50% {
            box-shadow: 0 4px 30px rgba(37, 211, 102, 0.6);
        }
        100% {
            box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
        }
    }
}

/* Mobile menu background and styling */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        border-radius: 15px;
        margin-top: 15px;
        padding: 20px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .navbar-nav {
        margin-bottom: 1rem;
    }
    
    .navbar-nav .nav-item {
        margin-bottom: 0.5rem;
    }
    
    .navbar-nav .nav-link {
        padding: 12px 16px;
        border-radius: 10px;
        transition: all 0.3s ease;
        color: var(--text-primary) !important;
        font-weight: 500;
        text-shadow: none !important;
        background: rgba(248, 250, 252, 0.8);
        margin-bottom: 8px;
        border: 1px solid rgba(102, 102, 241, 0.1);
    }
    
    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link.active {
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        color: white !important;
        transform: translateX(5px);
        box-shadow: 0 5px 15px rgba(102, 102, 241, 0.3);
    }
    
    .navbar-nav .nav-link i {
        color: var(--primary-color);
        transition: color 0.3s ease;
    }
    
    .navbar-nav .nav-link:hover i,
    .navbar-nav .nav-link.active i {
        color: white;
    }
}

/* Improve mobile navbar toggle button */
@media (max-width: 991.98px) {
    .navbar-toggler {
        border: none;
        padding: 0.5rem;
        font-size: 1.2rem;
    }
    
    .navbar-toggler:focus {
        box-shadow: none;
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }
    
    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2833, 37, 41, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }
    
    /* When header is scrolled, change toggle icon color */
    .modern-header.scrolled .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28102, 102, 241, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }
}