/* Mobile Bottom Bar Styles */
.mbb-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 12px 0;
    z-index: 9999;
    height: 75px;
    box-sizing: border-box;
    border-radius: 20px 20px 0 0;
}

.mbb-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #ffffff;
    padding: 10px 15px;
    border-radius: 15px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    min-width: 65px;
    flex: 1;
    max-width: 110px;
    position: relative;
    overflow: hidden;
}

.mbb-item:hover,
.mbb-item:focus {
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.mbb-item::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;
}

.mbb-item:hover::before {
    left: 100%;
}

.mbb-item svg {
    margin-bottom: 6px;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.mbb-item:hover svg {
    transform: scale(1.2) rotate(5deg);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

.mbb-item span {
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

/* Specific icon effects */
.mbb-phone:hover,
.mbb-phone:focus {
    background: linear-gradient(135deg, #42a5f5, #1e88e5);
}

.mbb-whatsapp:hover,
.mbb-whatsapp:focus {
    background: linear-gradient(135deg, #66bb6a, #43a047);
}

.mbb-location:hover,
.mbb-location:focus {
    background: linear-gradient(135deg, #ff7043, #f4511e);
}

/* Pulse animation for attention */
.mbb-item {
    animation: pulse 3s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(255, 255, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.mbb-item:nth-child(1) { animation-delay: 0s; }
.mbb-item:nth-child(2) { animation-delay: 1s; }
.mbb-item:nth-child(3) { animation-delay: 2s; }

/* Mobile specific adjustments */
@media (max-width: 480px) {
    .mbb-container {
        padding: 10px 0;
        height: 70px;
        border-radius: 15px 15px 0 0;
    }
    
    .mbb-item {
        padding: 8px 10px;
        min-width: 55px;
        border-radius: 12px;
    }
    
    .mbb-item svg {
        width: 22px;
        height: 22px;
    }
    
    .mbb-item span {
        font-size: 11px;
    }
}

/* Very small screens */
@media (max-width: 320px) {
    .mbb-container {
        height: 65px;
        padding: 8px 0;
        border-radius: 12px 12px 0 0;
    }
    
    .mbb-item {
        padding: 6px 8px;
        min-width: 50px;
        border-radius: 10px;
    }
    
    .mbb-item svg {
        width: 20px;
        height: 20px;
        margin-bottom: 3px;
    }
    
    .mbb-item span {
        font-size: 10px;
    }
}

/* Hide on desktop by default */
@media (min-width: 768px) {
    .mbb-container {
        display: none;
    }
}

/* Ensure content doesn't get hidden behind the bar */
body.mobile-bottom-bar-active {
    padding-bottom: 75px;
}

@media (max-width: 480px) {
    body.mobile-bottom-bar-active {
        padding-bottom: 70px;
    }
}

@media (max-width: 320px) {
    body.mobile-bottom-bar-active {
        padding-bottom: 65px;
    }
}

/* Enhanced animation for bar appearance */
.mbb-container {
    animation: slideUpBounce 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slideUpBounce {
    0% {
        transform: translateY(100%) scale(0.8);
        opacity: 0;
    }
    50% {
        transform: translateY(-10px) scale(1.05);
        opacity: 0.8;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Floating animation */
.mbb-container {
    animation: slideUpBounce 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
               float 6s ease-in-out infinite 2s;
}

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

/* Accessibility improvements */
.mbb-item:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .mbb-container {
        background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
        border-top-color: rgba(255, 255, 255, 0.1);
        box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.4);
    }
    
    .mbb-item {
        color: #ffffff;
    }
    
    .mbb-item:hover,
    .mbb-item:focus {
        background-color: rgba(255, 255, 255, 0.15);
    }
}

/* Glowing effect for better visibility */
.mbb-container::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { opacity: 0.5; }
    to { opacity: 1; }
}
