/* ================================================
   Contact Popup - Modern & Attractive Design
   ================================================ */

/* Floating Contact Button */
.contact-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9970; /* FIXED: Below navbar to not interfere with navigation */
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.contact-fab-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #019789 0%, #06645b 100%);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 20px rgba(1, 151, 137, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fabPulse 2s ease-in-out infinite;
}

.contact-fab-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 28px rgba(1, 151, 137, 0.5);
}

.contact-fab-btn.active {
    animation: none;
    transform: rotate(45deg);
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

@keyframes fabPulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(1, 151, 137, 0.4);
    }
    50% {
        box-shadow: 0 4px 30px rgba(1, 151, 137, 0.6), 0 0 0 8px rgba(1, 151, 137, 0.1);
    }
}

/* Quick Actions (shown on hover/click) */
.contact-quick-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: all 0.3s ease;
}

.contact-quick-actions.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    color: white;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.25s ease;
    white-space: nowrap;
}

.quick-action-btn:hover {
    transform: translateX(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.quick-action-btn.whatsapp {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
}

.quick-action-btn.email {
    background: linear-gradient(135deg, #019789 0%, #06645b 100%);
}

.quick-action-btn .icon {
    font-size: 20px;
}

/* Contact Popup Overlay */
.contact-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9980; /* FIXED: Lower than navbar (9990) to not interfere with navigation */
    opacity: 0;
    visibility: hidden;
    pointer-events: none !important; /* CRITICAL: Force no pointer events when hidden */
    transition: all 0.3s ease;
    display: none; /* ADDED: Completely remove from layout when hidden */
}

.contact-popup-overlay.show {
    display: block;
    opacity: 1;
    visibility: visible;
    pointer-events: auto !important; /* Enable clicks when visible */
}

/* Contact Popup Card */
.contact-popup {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 380px;
    max-width: calc(100vw - 48px);
    background: white;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    z-index: 9985; /* FIXED: Below navbar but above most content */
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    pointer-events: none; /* ADDED: No pointer events when hidden */
}

.contact-popup.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto; /* ADDED: Enable when shown */
}

/* Popup Header */
.contact-popup-header {
    background: linear-gradient(135deg, #019789 0%, #06645b 100%);
    color: white;
    padding: 24px;
    text-align: center;
    position: relative;
}

.contact-popup-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.contact-popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s ease;
    z-index: 1;
}

.contact-popup-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.contact-popup-emoji {
    font-size: 48px;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
    animation: wave 1.5s ease-in-out infinite;
}

@keyframes wave {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(20deg); }
    75% { transform: rotate(-10deg); }
}

.contact-popup-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
    position: relative;
    z-index: 1;
}

.contact-popup-subtitle {
    font-size: 14px;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

/* Popup Body */
.contact-popup-body {
    padding: 24px;
}

.contact-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 16px;
    background: #f8fafb;
    margin-bottom: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s ease;
    border: 2px solid transparent;
}

.contact-option:hover {
    background: white;
    border-color: #019789;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(1, 151, 137, 0.15);
}

.contact-option:last-child {
    margin-bottom: 0;
}

.contact-option-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
}

.contact-option-icon.whatsapp {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
}

.contact-option-icon.email {
    background: linear-gradient(135deg, #019789 0%, #06645b 100%);
}

.contact-option-content {
    flex: 1;
}

.contact-option-label {
    font-size: 13px;
    color: #666;
    margin-bottom: 2px;
}

.contact-option-value {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
}

.contact-option-cta {
    font-size: 12px;
    color: #019789;
    font-weight: 500;
    margin-top: 2px;
}

.contact-option-arrow {
    font-size: 20px;
    color: #ccc;
    transition: all 0.2s ease;
}

.contact-option:hover .contact-option-arrow {
    color: #019789;
    transform: translateX(4px);
}

/* Popup Footer */
.contact-popup-footer {
    padding: 16px 24px;
    background: #f8fafb;
    border-top: 1px solid #eee;
    text-align: center;
}

.contact-popup-cta {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

.contact-popup-cta strong {
    color: #019789;
}

/* Courses Banner (for online vs in-person) */
.courses-banner {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed #ddd;
}

.course-link {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.course-link.online {
    background: #f0f9ff;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.course-link.online:hover {
    background: #e0f2fe;
    transform: translateY(-2px);
}

.course-link.presential {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.course-link.presential:hover {
    background: #dcfce7;
    transform: translateY(-2px);
}

.course-link .icon {
    font-size: 14px;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .contact-fab {
        bottom: 16px;
        right: 16px;
    }
    
    .contact-fab-btn {
        width: 56px;
        height: 56px;
        font-size: 24px;
    }
    
    .contact-popup {
        bottom: 80px;
        right: 16px;
        left: 16px;
        width: auto;
        max-width: none;
    }
    
    .contact-popup-header {
        padding: 20px;
    }
    
    .contact-popup-emoji {
        font-size: 40px;
    }
    
    .contact-popup-title {
        font-size: 20px;
    }
    
    .contact-popup-body {
        padding: 20px;
    }
    
    .contact-option {
        padding: 14px;
    }
    
    .contact-option-icon {
        width: 46px;
        height: 46px;
        font-size: 22px;
    }
    
    .courses-banner {
        flex-direction: column;
    }
}

/* Animation on page load - attention grabber */
.contact-fab-btn.attention {
    animation: attention 0.6s ease-in-out;
}

@keyframes attention {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.2); }
    50% { transform: scale(0.9); }
    75% { transform: scale(1.1); }
}
