/* FAQ Widget - Professional Chat-Style in Bottom Right */
.faq-widget {
    position: fixed;
    bottom: 100px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* FAQ Toggle Button */
.faq-toggle {
    background: linear-gradient(135deg, var(--primary-blue), #2563eb);
    border: none;
    border-radius: 25px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(30, 58, 138, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 12px 20px;
    min-width: 200px;
    white-space: nowrap;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.faq-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(30, 58, 138, 0.4);
    background: linear-gradient(135deg, #2563eb, var(--primary-blue));
}

.faq-toggle:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 120%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.3s ease;
}

.faq-toggle:hover:before {
    transform: translate(-50%, -50%) scale(1);
}

/* Pulse Animation */
.faq-toggle.pulse {
    animation: faqPulse 2s infinite;
}

@keyframes faqPulse {
    0% {
        box-shadow: 0 4px 20px rgba(30, 58, 138, 0.3);
    }
    50% {
        box-shadow: 0 4px 30px rgba(30, 58, 138, 0.6);
        transform: scale(1.05);
    }
    100% {
        box-shadow: 0 4px 20px rgba(30, 58, 138, 0.3);
    }
}

/* FAQ Panel */
.faq-panel {
    position: absolute;
    bottom: 60px;
    right: 0;
    width: 380px;
    max-height: 500px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.faq-panel.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}

/* FAQ Header */
.faq-header {
    background: linear-gradient(135deg, var(--primary-blue), #2563eb);
    color: white;
    padding: 20px;
    border-radius: 20px 20px 0 0;
    position: relative;
}

.faq-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.faq-header p {
    margin: 5px 0 0 0;
    font-size: 14px;
    opacity: 0.9;
}

.faq-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.faq-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* FAQ Content */
.faq-content {
    max-height: 400px;
    overflow-y: auto;
    padding: 0;
}

.faq-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* FAQ Item */
.faq-item {
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s ease;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 18px 20px;
    text-align: left;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
    position: relative;
}

.faq-question:hover {
    background: #f8fafc;
    color: var(--primary-blue);
}

.faq-question .question-text {
    flex: 1;
    line-height: 1.4;
}

.faq-question .toggle-icon {
    font-size: 18px;
    transition: transform 0.3s ease;
    margin-left: 10px;
}

.faq-item.active .toggle-icon {
    transform: rotate(180deg);
}

/* FAQ Answer */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    background: #f8fafc;
    opacity: 0;
}

.faq-item.active .faq-answer {
    max-height: 600px;
    opacity: 1;
    overflow-y: auto;
}

.faq-answer-content {
    padding: 20px 20px 20px 20px;
    color: var(--text-gray);
    line-height: 1.6;
    font-size: 14px;
    transform: translateY(-10px);
    transition: transform 0.3s ease;
}

.faq-item.active .faq-answer-content {
    transform: translateY(0);
}

/* Call to Action Button */
.faq-cta {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.faq-cta-button {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, var(--accent-gold), #f59e0b);
    color: white;
    padding: 12px 18px;
    border: none;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 3px 10px rgba(217, 119, 6, 0.3);
    position: relative;
    overflow: hidden;
    transform: translateY(0);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.faq-cta-button:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.faq-cta-button:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(217, 119, 6, 0.4);
    color: white;
    text-decoration: none;
}

.faq-cta-button:hover:before {
    left: 100%;
}

.faq-cta-button:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.3);
}

/* Phone Icon Animation */
@keyframes phonePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .faq-widget {
        bottom: 20px;
        right: 2%;
        left: auto;
        width: 48%;
        max-width: 180px;
    }
    
    .faq-toggle {
        font-size: 13px;
        line-height: 1.2;
        padding: 12px 8px;
        width: 100%;
        min-width: unset;
        text-align: center;
        height: auto;
        min-height: auto;
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
    }
    
    .faq-panel {
        width: calc(100vw - 30px);
        max-width: 350px;
        bottom: 65px;
        right: 0;
    }
    
    .faq-content {
        max-height: 350px;
    }
    
    .faq-question {
        padding: 16px 18px;
        font-size: 14px;
    }
    
    .faq-answer-content {
        padding: 18px 18px 18px 18px;
        font-size: 13px;
    }
    
    .faq-item.active .faq-answer {
        max-height: 500px;
    }
}

@media (max-width: 480px) {
    .faq-panel {
        width: calc(100vw - 20px);
        right: -5px;
    }
    
    .faq-header {
        padding: 16px;
    }
    
    .faq-header h3 {
        font-size: 16px;
    }
    
    .faq-question {
        padding: 14px 16px;
    }
    
    .faq-answer-content {
        padding: 0 16px 16px 16px;
    }
}

/* Custom Scrollbar */
.faq-content::-webkit-scrollbar {
    width: 6px;
}

.faq-content::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.faq-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.faq-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Smooth scrolling for FAQ content */
.faq-content {
    scroll-behavior: smooth;
}

/* Active state styling */
.faq-item.active .faq-question {
    background: #eff6ff;
    color: var(--primary-blue);
}

/* Loading state */
.faq-loading {
    padding: 40px;
    text-align: center;
    color: var(--text-gray);
    font-size: 14px;
}

/* No results state */
.faq-no-results {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-gray);
    font-size: 14px;
}
