/* Mobile Header - Glassmorphism Style */
.mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9998;
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-radius: 0 0 50px 50px;
    box-shadow: 0 1px 0 0 rgba(255, 56, 56, 0.5), 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 20px 15px;
    display: none;
    transition: all 0.3s ease;
}

.mobile-header-container {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 90%;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

.mobile-header-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.mobile-header-logo img {
    height: 40px;
    width: auto;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.mobile-header-logo:hover img {
    transform: scale(1.05);
}

/* Show mobile header on mobile devices */
@media (max-width: 991.98px) {
    /* Show mobile header */
    .mobile-header {
        display: block;
    }
    
    /* Hide desktop header on mobile */
    .bi-header-section {
        display: none !important;
    }
    
    /* Show mobile bottom nav and adjust layout */
    .mobile-bottom-nav {
        display: block;
    }
    
    /* Add padding only for bottom nav */
    /* body {
        padding-top: 85px;
        padding-bottom: 85px;
    } */
}

/* Responsive adjustments for mobile header */
@media (max-width: 768px) {
    .mobile-header {
        padding: 18px 12px;
        border-radius: 0 0 40px 40px;
    }
    
    .mobile-header-logo img {
        height: 36px;
    }
}

@media (max-width: 576px) {
    .mobile-header {
        padding: 16px 10px;
        border-radius: 0 0 35px 35px;
    }
    
    .mobile-header-logo img {
        height: 32px;
    }
    
    /* body {
        padding-top: 75px;
        padding-bottom: 80px;
    } */
}

@media (max-width: 480px) {
    .mobile-header {
        padding: 14px 8px;
        border-radius: 0 0 30px 30px;
    }
    
    .mobile-header-logo img {
        height: 30px;
    }
    
    /* body {
        padding-top: 70px;
        padding-bottom: 75px;
    } */
}

@media (max-width: 360px) {
    .mobile-header {
        padding: 12px 6px;
        border-radius: 0 0 25px 25px;
    }
    
    .mobile-header-logo img {
        height: 28px;
    }
    
    /* body {
        padding-top: 65px;
        padding-bottom: 70px;
    } */
}

/* Mobile Bottom Navigation with Glassmorphism */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    /* border-top-left-radius: 25px;
    border-top-right-radius: 25px; */
    border-top-right-radius: 40px;
    box-shadow: 0 -1px 0 0 rgba(255, 56, 56, 0.5), 0 -10px 30px rgba(0, 0, 0, 0.1);
    padding: 8px 0 max(8px, env(safe-area-inset-bottom));
    display: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-bottom-nav.visible {
    transform: translateY(0);
}

.mobile-bottom-nav.hidden {
    transform: translateY(100%);
}

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

/* Left side nav items */
.mobile-nav-left {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    justify-content: flex-start;
    padding-left: 4px;
}

/* Right side nav items */
.mobile-nav-right {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    justify-content: flex-end;
    padding-right: 4px;
}

/* Center Action Buttons Container */
.mobile-nav-center {
    display: flex;
    gap: 6px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.15);
    -webkit-backdrop-filter: blur(25px);
    backdrop-filter: blur(25px);
    border-radius: 35px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), 
                inset 0 1px 0 rgba(255, 255, 255, 0.3),
                0 0 20px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    flex: 0 0 auto;
}

.mobile-nav-center::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
                rgba(255, 255, 255, 0.1) 0%, 
                rgba(255, 255, 255, 0.05) 50%, 
                rgba(255, 255, 255, 0.15) 100%);
    border-radius: 50px;
    z-index: -1;
    opacity: 0.8;
    transition: all 0.3s ease;
}

/* Dark theme support for center container */
@media (prefers-color-scheme: dark) {
    .mobile-nav-center {
        background: rgba(0, 0, 0, 0.2);
        border: 1px solid rgba(255, 255, 255, 0.15);
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), 
                    inset 0 1px 0 rgba(255, 255, 255, 0.2),
                    0 0 20px rgba(255, 255, 255, 0.05);
    }
    
    .mobile-nav-center::before {
        background: linear-gradient(135deg, 
                    rgba(255, 255, 255, 0.05) 0%, 
                    rgba(255, 255, 255, 0.02) 50%, 
                    rgba(255, 255, 255, 0.08) 100%);
    }
}

.mobile-center-action {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.mobile-center-action::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.mobile-center-action:hover::before {
    opacity: 1;
}

.mobile-center-action i {
    font-size: 24px;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.mobile-center-action:hover i {
    transform: scale(1.1);
}

/* WhatsApp Button */
.mobile-center-action.whatsapp {
    background: linear-gradient(135deg, rgba(37, 211, 102, 1), rgba(25, 192, 85, 1));
    border: 1px solid rgba(37, 211, 102, 0.5);
    color: white;
    box-shadow: 0 0 20px rgba(37, 211, 102, 0.3), 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: whatsappPulse 2s infinite ease-in-out;
}

.mobile-center-action.whatsapp::before {
    background: linear-gradient(135deg, rgba(37, 211, 102, 1), rgba(60, 230, 120, 1));
}

.mobile-center-action.whatsapp:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 0 30px rgba(37, 211, 102, 0.5), 0 8px 25px rgba(0, 0, 0, 0.3);
    animation: whatsappBounce 0.6s ease-in-out;
}

/* AI Chatbot Button */
.mobile-center-action.ai-chatbot {
    background: linear-gradient(135deg, rgba(139, 69, 255, 1), rgba(124, 58, 237, 1));
    border: 1px solid rgba(200, 255, 0, 0.5);
    color: white;
    box-shadow: 0 0 20px rgba(139, 69, 255, 0.3), 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: aiChatbotGlow 3s infinite ease-in-out;
}

.mobile-center-action.ai-chatbot::before {
    background: linear-gradient(135deg, rgba(139, 69, 255, 1), rgba(165, 95, 255, 1));
}

.mobile-center-action.ai-chatbot:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 0 30px rgba(139, 69, 255, 0.5), 0 8px 25px rgba(0, 0, 0, 0.3);
    animation: aiChatbotPulse 0.8s ease-in-out;
}

/* Direct Call Button */
.mobile-center-action.direct-call {
    background: linear-gradient(135deg, rgba(239, 68, 68, 1), rgba(220, 38, 38, 1));
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: white;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3), 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: callRing 2.5s infinite ease-in-out;
}

.mobile-center-action.direct-call::before {
    background: linear-gradient(135deg, rgba(239, 68, 68, 1), rgba(255, 95, 95, 1));
}

.mobile-center-action.direct-call:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.5), 0 8px 25px rgba(0, 0, 0, 0.3);
    animation: callShake 0.5s ease-in-out;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 4px 6px;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    min-width: 38px;
    flex: 0 0 auto;
}

.mobile-nav-item:hover {
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.mobile-nav-item.active {
    color: #007bff;
}

.mobile-nav-icon {
    font-size: 18px;
    margin-bottom: 1px;
    transition: all 0.3s ease;
}

.mobile-nav-item:hover .mobile-nav-icon {
    transform: scale(1.1);
}

.mobile-nav-label {
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.mobile-nav-item:hover .mobile-nav-label {
    opacity: 1;
}

/* Company Dropdown for Mobile Bottom Nav - Dark Glassmorphism */
.mobile-nav-dropdown {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    -webkit-backdrop-filter: blur(25px);
    backdrop-filter: blur(25px);
    border-radius: 16px;
    box-shadow: 0 -15px 35px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 0;
    margin-bottom: 10px;
    min-width: 250px;
    max-width: 90vw;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10000;
}

.mobile-nav-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) scale(1);
}

.mobile-nav-dropdown::before {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid rgba(0, 0, 0, 0.8);
}

.mobile-dropdown-item {
    display: block;
    padding: 12px 20px;
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 0 10px;
    background: transparent;
}

.mobile-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transform: translateX(5px);
}

/* Ensure all dropdown items have consistent white text styling */
.mobile-dropdown-item[href*="fellowship"],
.mobile-dropdown-item[href*="about"],
.mobile-dropdown-item[href*="teams"],
.mobile-dropdown-item[href*="career"],
.mobile-dropdown-item[href*="services"],
.mobile-dropdown-item[href*="awards"],
.mobile-dropdown-item[href*="upcoming"],
.mobile-dropdown-item[href*="terms"] {
    color: #ffffff;
    background: transparent;
}

.mobile-dropdown-item[href*="fellowship"]:hover,
.mobile-dropdown-item[href*="about"]:hover,
.mobile-dropdown-item[href*="teams"]:hover,
.mobile-dropdown-item[href*="career"]:hover,
.mobile-dropdown-item[href*="services"]:hover,
.mobile-dropdown-item[href*="awards"]:hover,
.mobile-dropdown-item[href*="upcoming"]:hover,
.mobile-dropdown-item[href*="terms"]:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transform: translateX(5px);
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .mobile-bottom-nav {
        display: block;
    }
}

@media (max-width: 576px) {
    .mobile-nav-container {
        padding: 0 4px;
    }
    
    .mobile-nav-left {
        gap: 1px;
        padding-left: 2px;
    }
    
    .mobile-nav-right {
        gap: 1px;
        padding-right: 2px;
    }
      .mobile-nav-item {
        padding: 4px 5px;
        min-width: 36px;
    }      .mobile-nav-icon {
        font-size: 17px;
    }
    
    .mobile-nav-label {
        font-size: 8px;
    }
    
    .mobile-nav-dropdown {
        min-width: 200px;
        margin-bottom: 8px;
    }
    
    .mobile-dropdown-item {
        padding: 10px 15px;
        font-size: 13px;
    }
    
    .mobile-center-action {
        width: 50px;
        height: 50px;
    }
    
    .mobile-center-action i {
        font-size: 22px;
    }
    
    .mobile-nav-center {
        gap: 8px;
        padding: 7px 11px;
        border-radius: 28px;
    }
}

@media (max-width: 480px) {
    .mobile-nav-container {
        padding: 0 2px;
    }
    
    .mobile-nav-left {
        gap: 1px;
        padding-left: 1px;
    }
    
    .mobile-nav-right {
        gap: 1px;
        padding-right: 1px;
    }
      .mobile-nav-item {
        padding: 3px 4px;
        min-width: 32px;
    }      .mobile-nav-icon {
        font-size: 16px;
    }
    
    .mobile-nav-label {
        font-size: 7px;
    }
    
    .mobile-nav-dropdown {
        min-width: 160px;
        max-width: 85vw;
    }
      .mobile-center-action {
        width: 50px;
        height: 50px;
    }
    
    .mobile-center-action i {
        font-size: 22px;
    }
    
    .mobile-nav-center {
        gap: 6px;
        padding: 6px 9px;
        border-radius: 30px;
    }
}

@media (max-width: 360px) {
    .mobile-nav-container {
        padding: 0 1px;
    }
    
    .mobile-nav-left {
        gap: 1px;
        padding-left: 1px;
    }
    
    .mobile-nav-right {
        gap: 1px;
        padding-right: 1px;
    }
      .mobile-nav-item {
        padding: 3px 4px;
        min-width: 30px;
    }      .mobile-nav-icon {
        font-size: 15px;
        margin-bottom: 1px;
    }
    
    .mobile-nav-label {
        font-size: 6px;
    }
    
    .mobile-nav-dropdown {
        min-width: 140px;
    }
    
    .mobile-dropdown-item {
        padding: 6px 8px;
        font-size: 11px;
    }
      .mobile-center-action {
        width: 48px;
        height: 48px;
    }
    
    .mobile-center-action i {
        font-size: 20px;
    }
    
    .mobile-nav-center {
        gap: 5px;
        padding: 5px 8px;
        border-radius: 26px;
    }
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    .mobile-bottom-nav {
        background: rgba(0, 0, 0, 0.3);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 -1px 0 0 rgba(255, 56, 56, 0.5), 0 -10px 30px rgba(0, 0, 0, 0.2);
    }
    
    .mobile-header {
        background: rgba(0, 0, 0, 0.3);
        box-shadow: 0 1px 0 0 rgba(255, 56, 56, 0.5), 0 10px 30px rgba(0, 0, 0, 0.2);
    }
    
    .mobile-nav-center {
        background: rgba(0, 0, 0, 0.2);
        border: 1px solid rgba(255, 255, 255, 0.15);
    }
    
    .mobile-nav-dropdown {
        background: rgba(0, 0, 0, 0.9);
        border: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .mobile-nav-dropdown::before {
        border-top-color: rgba(0, 0, 0, 0.9);
    }
    
    /* All dropdown items have consistent white text on dark glassmorphism background */
    .mobile-dropdown-item,
    .mobile-dropdown-item[href*="fellowship"],
    .mobile-dropdown-item[href*="about"],
    .mobile-dropdown-item[href*="teams"] {
        color: #ffffff;
        background: transparent;
    }
    
    .mobile-dropdown-item:hover,
    .mobile-dropdown-item[href*="fellowship"]:hover,
    .mobile-dropdown-item[href*="about"]:hover,
    .mobile-dropdown-item[href*="teams"]:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #ffffff;
    }
}

/* Animation for scroll hide/show */
.mobile-bottom-nav.scroll-hidden {
    transform: translateY(100%);
    opacity: 0;
}

.mobile-bottom-nav.scroll-visible {
    transform: translateY(0);
    opacity: 1;
}

/* Improved glassmorphism for better browser support */
@supports not (backdrop-filter: blur(20px)) {
    .mobile-bottom-nav {
        background: rgba(255, 255, 255, 0.9);
    }
    
    .mobile-nav-dropdown {
        background: rgba(255, 255, 255, 0.98);
    }
    
    @media (prefers-color-scheme: dark) {
        .mobile-bottom-nav {
            background: rgba(0, 0, 0, 0.8);
        }
        
        .mobile-nav-dropdown {
            background: rgba(0, 0, 0, 0.95);
        }    }
}

/* Fallback support for mobile header glassmorphism */
@supports not (backdrop-filter: blur(20px)) {
    .mobile-header {
        background: rgba(255, 255, 255, 0.95);
    }
    
    @media (prefers-color-scheme: dark) {
        .mobile-header {
            background: rgba(22, 23, 41, 0.95);
        }
    }
}

/* Animation Keyframes for Center Action Buttons */
@keyframes whatsappPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(37, 211, 102, 0.3), 0 4px 15px rgba(0, 0, 0, 0.2), 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 25px rgba(37, 211, 102, 0.4), 0 6px 20px rgba(0, 0, 0, 0.25), 0 0 0 8px rgba(37, 211, 102, 0);
    }
}

@keyframes whatsappBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(-3px) scale(1.1);
    }
    40% {
        transform: translateY(-8px) scale(1.15);
    }
    60% {
        transform: translateY(-5px) scale(1.12);
    }
}

@keyframes aiChatbotGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(139, 69, 255, 0.3), 0 4px 15px rgba(0, 0, 0, 0.2), 0 0 10px rgba(139, 69, 255, 0.2);
    }
    50% {
        box-shadow: 0 0 30px rgba(139, 69, 255, 0.5), 0 6px 20px rgba(0, 0, 0, 0.25), 0 0 20px rgba(139, 69, 255, 0.4);
    }
}

@keyframes aiChatbotPulse {
    0%, 100% {
        transform: translateY(-3px) scale(1.1) rotate(0deg);
    }
    25% {
        transform: translateY(-5px) scale(1.15) rotate(2deg);
    }
    50% {
        transform: translateY(-4px) scale(1.12) rotate(0deg);
    }
    75% {
        transform: translateY(-5px) scale(1.15) rotate(-2deg);
    }
}

@keyframes callRing {
    0%, 100% {
        transform: rotate(0deg);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: rotate(12deg);
    }
    20%, 40%, 60%, 80% {
        transform: rotate(-12deg);
    }
}

@keyframes callShake {
    0%, 100% {
        transform: translateY(-3px) scale(1.1) translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateY(-3px) scale(1.1) translateX(-2px);
    }
    20%, 40%, 60%, 80% {
        transform: translateY(-3px) scale(1.1) translateX(2px);
    }
}
