/* Modern FAQ Pro Styles */
.modern-faq-container {
    max-width: 100%;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.modern-faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modern-faq-item {
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
}

.modern-faq-item:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.modern-faq-featured {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%);
}

.modern-faq-featured::before {
    content: "★";
    position: absolute;
    top: 16px;
    right: 60px;
    color: #f59e0b;
    font-size: 16px;
    font-weight: bold;
    z-index: 1;
}

.modern-faq-question {
    position: relative;
    padding: 20px 60px 20px 24px;
    cursor: pointer;
    background: transparent;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: none;
    width: 100%;
    text-align: left;
}

.modern-faq-question:hover {
    background-color: #f8fafc;
}

.modern-faq-question:focus {
    outline: 2px solid #3b82f6;
    outline-offset: -2px;
}

.modern-faq-question:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: -2px;
}

.modern-faq-question-text {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.4;
    flex: 1;
    padding-right: 16px;
}

.modern-faq-toggle-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: #f3f4f6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #6b7280;
    flex-shrink: 0;
}

.modern-faq-item:hover .modern-faq-toggle-icon {
    background: #0044A1;
    color: white;
}

.modern-faq-icon-minus {
    display: none;
}

.modern-faq-item.active .modern-faq-icon-plus {
    display: none;
}

.modern-faq-item.active .modern-faq-icon-minus {
    display: block;
}

.modern-faq-item.active .modern-faq-toggle-icon {
    background: #0044A1;
    color: white;
    transform: translateY(-50%) rotate(180deg);
}

.modern-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fafbfc;
}

.modern-faq-item.active .modern-faq-answer {
    max-height: 1000px;
}

.modern-faq-answer-content {
    padding: 0 24px 24px 24px;
    color: #4b5563;
    line-height: 1.6;
    font-size: 16px;
}

.modern-faq-answer-content p {
    margin: 0 0 16px 0;
}

.modern-faq-answer-content p:last-child {
    margin-bottom: 0;
}

.modern-faq-answer-content ul,
.modern-faq-answer-content ol {
    margin: 0 0 16px 20px;
}

.modern-faq-answer-content li {
    margin-bottom: 8px;
}

.modern-faq-answer-content h1,
.modern-faq-answer-content h2,
.modern-faq-answer-content h3,
.modern-faq-answer-content h4,
.modern-faq-answer-content h5,
.modern-faq-answer-content h6 {
    margin: 0 0 12px 0;
    color: #1f2937;
}

.modern-faq-answer-content a {
    color: #3b82f6;
    text-decoration: none;
}

.modern-faq-answer-content a:hover {
    text-decoration: underline;
}

.modern-faq-answer-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 12px 0;
}

.modern-faq-answer-content code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

.modern-faq-answer-content pre {
    background: #f1f5f9;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 16px 0;
}

.modern-faq-answer-content blockquote {
    border-left: 4px solid #3b82f6;
    padding-left: 16px;
    margin: 16px 0;
    font-style: italic;
    color: #6b7280;
}

.modern-faq-no-results {
    text-align: center;
    color: #6b7280;
    font-style: italic;
    padding: 40px 20px;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px dashed #d1d5db;
    margin: 20px 0;
}

/* Toggle Style Modifications */
.modern-faq-toggle .modern-faq-item {
    margin-bottom: 8px;
}

.modern-faq-toggle .modern-faq-item.active {
    border-color: #3b82f6;
}

/* List Style Modifications */
.modern-faq-list .modern-faq-item {
    border: none;
    border-bottom: 1px solid #e1e5e9;
    border-radius: 0;
    box-shadow: none;
}

.modern-faq-list .modern-faq-item:last-child {
    border-bottom: none;
}

.modern-faq-list .modern-faq-question {
    padding: 16px 50px 16px 0;
}

.modern-faq-list .modern-faq-toggle-icon {
    right: 0;
    background: transparent;
    border: 1px solid #d1d5db;
}

.modern-faq-list .modern-faq-answer {
    background: transparent;
}

.modern-faq-list .modern-faq-answer-content {
    padding: 0 0 16px 0;
}

/* Search Box Styles */
.modern-faq-search-wrapper {
    margin-bottom: 24px;
}

.modern-faq-search {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    background: #ffffff;
    transition: border-color 0.2s ease;
}

.modern-faq-search:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.modern-faq-search::placeholder {
    color: #9ca3af;
}

/* Loading States */
.modern-faq-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #6b7280;
}

.modern-faq-loading::before {
    content: "";
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: faq-spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes faq-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .modern-faq-question {
        padding: 16px 50px 16px 16px;
    }
    
    .modern-faq-question-text {
        font-size: 16px;
    }
    
    .modern-faq-answer-content {
        padding: 0 16px 16px 16px;
        font-size: 15px;
    }
    
    .modern-faq-toggle-icon {
        right: 12px;
        width: 28px;
        height: 28px;
    }
    
    .modern-faq-featured::before {
        right: 48px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .modern-faq-question {
        padding: 12px 40px 12px 12px;
    }
    
    .modern-faq-question-text {
        font-size: 15px;
    }
    
    .modern-faq-answer-content {
        padding: 0 12px 12px 12px;
        font-size: 14px;
    }
    
    .modern-faq-toggle-icon {
        right: 8px;
        width: 24px;
        height: 24px;
    }
    
    .modern-faq-featured::before {
        right: 36px;
        font-size: 12px;
    }
}

/* Animation for smooth opening */
.modern-faq-item.opening .modern-faq-answer {
    animation: faq-expand 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes faq-expand {
    from {
        max-height: 0;
        opacity: 0;
    }
    to {
        max-height: 1000px;
        opacity: 1;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .modern-faq-item {
        background: #1f2937;
        border-color: #374151;
        color: #f9fafb;
    }
    
    .modern-faq-question-text {
        color: #f9fafb;
    }
    
    .modern-faq-answer-content {
        color: #d1d5db;
        background: #111827;
    }
    
    .modern-faq-question:hover {
        background-color: #374151;
    }
    
    .modern-faq-toggle-icon {
        background: #374151;
        color: #9ca3af;
    }
    
    .modern-faq-no-results {
        background: #111827;
        border-color: #374151;
        color: #9ca3af;
    }
    
    .modern-faq-search {
        background: #1f2937;
        border-color: #374151;
        color: #f9fafb;
    }
    
    .modern-faq-search::placeholder {
        color: #6b7280;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .modern-faq-item {
        border-width: 2px;
    }
    
    .modern-faq-question:focus {
        outline-width: 3px;
    }
    
    .modern-faq-toggle-icon {
        border: 2px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .modern-faq-item,
    .modern-faq-question,
    .modern-faq-toggle-icon,
    .modern-faq-answer {
        transition: none;
    }
    
    .modern-faq-item.opening .modern-faq-answer {
        animation: none;
    }
}