/* ========================================
   MODERN FAQ SECTION STYLES
   Trading Platform Design - FAQ & Help Center
   ======================================== */

/* Section Container */
.modern-faq-section {
    position: relative;
    padding: 120px 0;
    background: #112025;
    overflow: hidden;
}

/* Animated Background Pattern */
.faq-bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.3;
    pointer-events: none;
}

.pattern-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(59, 130, 246, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.05) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridMove 30s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

.pattern-dots {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle, rgba(16, 185, 129, 0.08) 2px, transparent 2px);
    background-size: 40px 40px;
    animation: dotsFloat 20s ease-in-out infinite;
}

@keyframes dotsFloat {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

/* Gradient Orbs */
.gradient-orb.orb-faq-1 {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.25), transparent 70%);
    border-radius: 50%;
    filter: blur(120px);
    top: 10%;
    left: -10%;
    animation: floatFaqOrb1 14s ease-in-out infinite;
    pointer-events: none;
}

.gradient-orb.orb-faq-2 {
    position: absolute;
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.25), transparent 70%);
    border-radius: 50%;
    filter: blur(120px);
    bottom: 10%;
    right: -10%;
    animation: floatFaqOrb2 16s ease-in-out infinite reverse;
    pointer-events: none;
}

@keyframes floatFaqOrb1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(60px, -40px) scale(1.2); }
    66% { transform: translate(-50px, 50px) scale(0.9); }
}

@keyframes floatFaqOrb2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-40px, -60px) scale(1.15); }
}

/* FAQ Visual Side */
.faq-visual {
    position: relative;
    z-index: 2;
}

/* Section Badge */
.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 50px;
    color: #3b82f6;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-badge svg {
    width: 18px;
    height: 18px;
}

/* Section Title */
.section-title {
    font-size: 48px;
    font-weight: 800;
    color: #f8fafc;
    margin-bottom: 20px;
    line-height: 1.2;
    background: linear-gradient(135deg, #f8fafc 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Section Description */
.section-description {
    font-size: 18px;
    color: #94a3b8;
    line-height: 1.7;
    margin-bottom: 48px;
    max-width: 500px;
}

/* FAQ Image Wrapper */
.faq-image-wrapper {
    position: relative;
    margin-bottom: 40px;
}

/* Floating Stats */
.floating-stat {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(17, 32, 37, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    padding: 14px 18px;
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    transition: all 0.4s ease;
    z-index: 3;
    animation: floatStat 4s ease-in-out infinite;
}

.floating-stat:hover {
    transform: translateY(-8px) scale(1.05);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.floating-stat.stat-1 {
    top: 15%;
    right: -30px;
    animation-delay: 0s;
}

.floating-stat.stat-2 {
    bottom: 20%;
    left: -35px;
    animation-delay: 2s;
}

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

/* Stat Icon */
.stat-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-radius: 12px;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.stat-icon.success {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.stat-icon svg {
    width: 20px;
    height: 20px;
}

/* Stat Content */
.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
    margin-bottom: 2px;
}

.stat-value {
    font-size: 18px;
    font-weight: 800;
    color: #f8fafc;
    line-height: 1;
}

/* Image Decorations */
.image-decoration {
    position: absolute;
    border-radius: 20px;
    opacity: 0.5;
    z-index: 0;
}

.image-decoration.dec-1 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), transparent);
    top: -30px;
    right: -30px;
    animation: floatDec1 8s ease-in-out infinite;
}

.image-decoration.dec-2 {
    width: 150px;
    height: 150px;
    background: linear-gradient(225deg, rgba(16, 185, 129, 0.2), transparent);
    bottom: -20px;
    left: -20px;
    animation: floatDec2 10s ease-in-out infinite;
}

@keyframes floatDec1 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(20px, -20px) rotate(15deg); }
}

@keyframes floatDec2 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-15px, -15px) rotate(-10deg); }
}

/* FAQ Image */
.faq-image {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.1);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.5s ease;
    z-index: 1;
}

.faq-image:hover {
    transform: scale(1.02);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 
        0 30px 80px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(59, 130, 246, 0.2);
}

.faq-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.faq-image:hover img {
    transform: scale(1.05);
}

/* Image Overlay */
.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.1) 0%,
        transparent 50%,
        rgba(16, 185, 129, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.faq-image:hover .image-overlay {
    opacity: 1;
}

/* Light/Dark Mode Images */
.l-mood { display: block; }
.d-mood { display: none; }

@media (prefers-color-scheme: dark) {
    .l-mood { display: none; }
    .d-mood { display: block; }
}

/* FAQ Help CTA */
.faq-help-cta {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background: rgba(17, 32, 37, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 20px;
    padding: 24px;
    backdrop-filter: blur(10px);
    transition: all 0.4s ease;
}

.faq-help-cta:hover {
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    transform: translateY(-4px);
}

/* Help Icon */
.help-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-radius: 16px;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.help-icon svg {
    width: 28px;
    height: 28px;
}

/* Help Content */
.help-content {
    flex: 1;
}

.help-content h4 {
    font-size: 20px;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 8px;
}

.help-content p {
    font-size: 15px;
    color: #94a3b8;
    margin-bottom: 12px;
}

.help-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #3b82f6;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.help-link:hover {
    color: #60a5fa;
    gap: 12px;
}

.help-link svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.help-link:hover svg {
    transform: translateX(4px);
}

/* ===================================
   FAQ ACCORDION SIDE
   =================================== */

.modern-faq-accordion {
    position: relative;
    z-index: 2;
}

/* FAQ Search Box */
.faq-search-box {
    position: relative;
    margin-bottom: 32px;
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    pointer-events: none;
}

.search-icon svg {
    width: 20px;
    height: 20px;
}

.faq-search-input {
    width: 100%;
    padding: 16px 50px;
    background: rgba(17, 32, 37, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    color: #f8fafc;
    font-size: 15px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.faq-search-input::placeholder {
    color: #64748b;
}

.faq-search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: rgba(17, 32, 37, 0.85);
}

.search-clear {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-clear:hover {
    color: #ef4444;
}

.search-clear svg {
    width: 18px;
    height: 18px;
}

/* FAQ Items Container */
.faq-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* FAQ Item */
.faq-item {
    background: rgba(17, 32, 37, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 20px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item:hover {
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.faq-item.active {
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
}

/* FAQ Question Button */
.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
}

.faq-question:hover {
    background: rgba(59, 130, 246, 0.05);
}

.faq-item.active .faq-question {
    background: rgba(59, 130, 246, 0.08);
}

/* Question Number */
.question-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(16, 185, 129, 0.2));
    border-radius: 10px;
    color: #3b82f6;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.faq-item.active .question-number {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* Question Text */
.question-text {
    flex: 1;
    font-size: 17px;
    font-weight: 600;
    color: #f8fafc;
    line-height: 1.5;
    transition: color 0.3s ease;
}

.faq-item.active .question-text {
    color: #3b82f6;
}

/* Question Icon */
.question-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 8px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.faq-item.active .question-icon {
    background: #3b82f6;
    transform: rotate(180deg);
}

.question-icon svg {
    width: 18px;
    height: 18px;
    color: #3b82f6;
    transition: all 0.3s ease;
}

.faq-item.active .question-icon svg {
    color: white;
}

.icon-plus {
    display: block;
}

.icon-minus {
    display: none;
}

.faq-item.active .icon-plus {
    display: none;
}

.faq-item.active .icon-minus {
    display: block;
}

/* FAQ Answer */
.faq-answer {
    padding: 0 24px 24px 24px;
}

/* Answer Icon */
.answer-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 8px;
    color: #10b981;
    margin-bottom: 12px;
}

.answer-icon svg {
    width: 18px;
    height: 18px;
}

/* Answer Text */
.answer-text {
    font-size: 15px;
    color: #cbd5e1;
    line-height: 1.7;
    margin-bottom: 20px;
}

/* Answer Helpful Section */
.answer-helpful {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.answer-helpful span {
    font-size: 14px;
    color: #94a3b8;
    font-weight: 500;
}

/* Helpful Buttons */
.helpful-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(17, 32, 37, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 10px;
    color: #94a3b8;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.helpful-btn svg {
    width: 16px;
    height: 16px;
}

.helpful-btn:hover {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.helpful-btn.active {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: #10b981;
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.helpful-btn[data-helpful="no"]:hover {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.helpful-btn[data-helpful="no"].active {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-color: #ef4444;
}

/* No Results Message */
.no-results {
    text-align: center;
    padding: 60px 20px;
}

.no-results-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 50%;
    color: #3b82f6;
}

.no-results-icon svg {
    width: 40px;
    height: 40px;
}

.no-results h4 {
    font-size: 22px;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 12px;
}

.no-results p {
    font-size: 16px;
    color: #94a3b8;
}

/* Responsive Design */
@media (max-width: 1199px) {
    .modern-faq-section {
        padding: 100px 0;
    }

    .section-title {
        font-size: 42px;
    }

    .floating-stat {
        padding: 12px 16px;
    }
}

@media (max-width: 991px) {
    .modern-faq-section {
        padding: 80px 0;
    }

    .section-title {
        font-size: 36px;
    }

    .section-description {
        font-size: 16px;
        margin-bottom: 40px;
    }

    .faq-visual {
        margin-bottom: 60px;
    }

    .floating-stat {
        position: static;
        display: inline-flex;
        margin: 12px 12px 12px 0;
        animation: none;
    }

    .image-decoration {
        display: none;
    }
}

@media (max-width: 767px) {
    .modern-faq-section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 30px;
    }

    .section-description {
        font-size: 15px;
    }

    .faq-question {
        padding: 16px 20px;
        gap: 12px;
    }

    .question-number {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }

    .question-text {
        font-size: 16px;
    }

    .faq-answer {
        padding: 0 20px 20px 20px;
    }

    .answer-text {
        font-size: 14px;
    }

    .gradient-orb {
        display: none;
    }
}

@media (max-width: 575px) {
    .section-badge {
        padding: 8px 20px;
        font-size: 13px;
    }

    .section-title {
        font-size: 26px;
    }

    .faq-question {
        gap: 10px;
    }

    .question-text {
        font-size: 15px;
    }

    .answer-helpful {
        flex-wrap: wrap;
    }

    .helpful-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
}

/* Animation Enhancements */
[data-aos="fade-right"] {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s ease;
}

[data-aos="fade-right"].aos-animate {
    opacity: 1;
    transform: translateX(0);
}

[data-aos="fade-left"] {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.8s ease;
}

[data-aos="fade-left"].aos-animate {
    opacity: 1;
    transform: translateX(0);
}

[data-aos="fade-up"] {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

[data-aos="fade-up"].aos-animate {
    opacity: 1;
    transform: translateY(0);
}

/* Dark Mode Support */
@media (prefers-color-scheme: light) {
    .modern-faq-section {
        background: linear-gradient(180deg, 
            rgba(248, 250, 252, 0.9) 0%,
            rgba(241, 245, 249, 0.85) 50%,
            rgba(248, 250, 252, 0.9) 100%);
    }

    .faq-item,
    .floating-stat,
    .faq-help-cta,
    .faq-search-input {
        background: rgba(255, 255, 255, 0.95);
        border-color: rgba(203, 213, 225, 0.3);
    }

    .section-title {
        background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .question-text,
    .help-content h4,
    .stat-value,
    .no-results h4 {
        color: #0f172a;
    }

    .answer-text,
    .section-description,
    .help-content p {
        color: #475569;
    }

    .faq-search-input {
        color: #0f172a;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .faq-item,
    .faq-question,
    .question-icon,
    .pattern-grid,
    .pattern-dots,
    .gradient-orb,
    .floating-stat,
    .image-decoration,
    .helpful-btn {
        animation: none;
        transition: none;
    }
}

/* Print Styles */
@media print {
    .modern-faq-section {
        background: white;
        padding: 40px 0;
    }

    .faq-item {
        break-inside: avoid;
        page-break-inside: avoid;
        border: 1px solid #ddd;
        box-shadow: none;
    }

    .gradient-orb,
    .faq-bg-pattern,
    .floating-stat,
    .image-decoration,
    .faq-search-box,
    .answer-helpful {
        display: none;
    }

    .faq-answer {
        display: block !important;
    }
}
