/* ============================================
   SapCod - Ultra Premium FAQ Section
   Author: SapCod Team
   Version: 2.0
   Description: Premium FAQ with two-column
   layout, search, categories, accordion & CTA
   Compatible with: styles.css
   Namespace: sapcod-faq-v2
   ============================================ */

/* ===== Section Container ===== */
.sapcod-faq-v2 {
    position: relative;
    padding: 130px 0;
    background: var(--bg-primary, #ffffff);
    overflow: hidden;
    isolation: isolate;
}

[data-theme="dark"] .sapcod-faq-v2 {
    background: var(--bg-primary, #0a0a1a);
}

/* ===== Background Decor ===== */
.faq-v2-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

/* Gradient wash */
.faq-v2-wash {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.06;
    animation: faqWashFloat 14s ease-in-out infinite;
}

.faq-v2-wash.fw1 {
    width: 650px;
    height: 650px;
    background: #0066ff;
    top: -200px;
    right: -150px;
}

.faq-v2-wash.fw2 {
    width: 500px;
    height: 500px;
    background: #339966;
    bottom: -150px;
    left: -100px;
    animation-delay: 5s;
}

@keyframes faqWashFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(40px, -30px) scale(1.06); }
}

/* Circle pattern */
.faq-v2-circles {
    position: absolute;
    inset: 0;
    opacity: 0.03;
    background-image: 
        radial-gradient(circle at 20% 30%, #0066ff 1px, transparent 1px),
        radial-gradient(circle at 70% 60%, #339966 1px, transparent 1px),
        radial-gradient(circle at 40% 80%, #0066ff 1px, transparent 1px);
    background-size: 100px 100px, 150px 150px, 120px 120px;
}

/* ===== Container ===== */
.sapcod-faq-v2 .container {
    position: relative;
    z-index: 1;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 30px;
}

/* ===== Section Header ===== */
.faq-v2-header {
    text-align: center;
    margin-bottom: 50px;
}

.faq-v2-chip {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 22px;
    background: rgba(0, 102, 255, 0.05);
    border: 1px solid rgba(0, 102, 255, 0.1);
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #0066ff;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    margin-bottom: 22px;
    backdrop-filter: blur(10px);
}

[data-theme="dark"] .faq-v2-chip {
    background: rgba(0, 102, 255, 0.08);
    border-color: rgba(0, 102, 255, 0.18);
}

.faq-v2-chip i {
    animation: faqChipPulse 2s ease-in-out infinite;
}

@keyframes faqChipPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.faq-v2-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--text-primary, #1a1a2e);
    margin-bottom: 14px;
    letter-spacing: -0.8px;
    line-height: 1.2;
}

[data-theme="dark"] .faq-v2-title {
    color: #e8e8f0;
}

.faq-v2-title .t-grad {
    background: linear-gradient(135deg, #0066ff 0%, #339966 60%, #0066ff 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: faqGrad 5s ease infinite;
}

@keyframes faqGrad {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.faq-v2-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary, #666);
    max-width: 550px;
    margin: 0 auto;
    line-height: 1.6;
}

[data-theme="dark"] .faq-v2-subtitle {
    color: #999;
}

/* ===== Search Bar ===== */
.faq-v2-search-wrap {
    max-width: 550px;
    margin: 0 auto 45px;
    position: relative;
}

.faq-v2-search {
    width: 100%;
    padding: 16px 55px 16px 24px;
    border-radius: 16px;
    border: 2px solid rgba(0, 102, 255, 0.1);
    background: var(--card-bg, #ffffff);
    color: var(--text-primary, #1a1a2e);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.35s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

[data-theme="dark"] .faq-v2-search {
    background: #1a1a30;
    border-color: rgba(0, 102, 255, 0.15);
    color: #e0e0e0;
}

.faq-v2-search:focus {
    outline: none;
    border-color: #0066ff;
    box-shadow: 0 8px 30px rgba(0, 102, 255, 0.1);
}

.faq-v2-search::placeholder {
    color: #aaa;
}

.faq-v2-search-icon {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #0066ff;
    font-size: 1.1rem;
    pointer-events: none;
    transition: all 0.3s ease;
}

.faq-v2-search:focus ~ .faq-v2-search-icon {
    transform: translateY(-50%) scale(1.15);
}

/* No results message */
.faq-v2-no-results {
    display: none;
    text-align: center;
    padding: 30px;
    color: #888;
    font-size: 0.95rem;
}

.faq-v2-no-results.show {
    display: block;
    animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== Category Pills ===== */
.faq-v2-categories {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.faq-v2-cat-pill {
    padding: 10px 20px;
    border-radius: 12px;
    border: 1.5px solid rgba(0, 102, 255, 0.12);
    background: transparent;
    color: var(--text-secondary, #555);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: inherit;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 7px;
}

[data-theme="dark"] .faq-v2-cat-pill {
    color: #999;
    border-color: rgba(0, 102, 255, 0.18);
}

.faq-v2-cat-pill:hover {
    border-color: #0066ff;
    color: #0066ff;
    background: rgba(0, 102, 255, 0.04);
    transform: translateY(-2px);
}

.faq-v2-cat-pill.active {
    background: linear-gradient(135deg, #0066ff, #0044cc);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.25);
}

.faq-v2-cat-pill .cat-count {
    background: rgba(0, 102, 255, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
}

.faq-v2-cat-pill.active .cat-count {
    background: rgba(255, 255, 255, 0.2);
}

/* ===== Two Column Layout ===== */
.faq-v2-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
    margin-bottom: 70px;
}

/* ===== FAQ Accordion Column ===== */
.faq-v2-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ===== FAQ Item ===== */
.faq-v2-item {
    background: var(--card-bg, #ffffff);
    border-radius: 16px;
    border: 1px solid rgba(0, 102, 255, 0.05);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    opacity: 0;
    transform: translateY(20px);
}

[data-theme="dark"] .faq-v2-item {
    background: #1a1a30;
    border-color: rgba(0, 102, 255, 0.08);
}

.faq-v2-item.revealed {
    opacity: 1;
    transform: translateY(0);
}

.faq-v2-item:hover {
    border-color: rgba(0, 102, 255, 0.15);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .faq-v2-item:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    border-color: rgba(0, 102, 255, 0.2);
}

.faq-v2-item.active {
    border-color: rgba(0, 102, 255, 0.2);
    box-shadow: 0 12px 40px rgba(0, 102, 255, 0.06);
}

[data-theme="dark"] .faq-v2-item.active {
    border-color: rgba(0, 102, 255, 0.25);
    box-shadow: 0 12px 40px rgba(0, 102, 255, 0.1);
}

/* Question header */
.faq-v2-question {
    padding: 22px 25px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    user-select: none;
}

.faq-v2-item.active .faq-v2-question {
    padding-bottom: 10px;
}

.faq-v2-question-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
}

.faq-v2-q-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.4s ease;
}

.faq-v2-q-icon.qc-blue { background: rgba(0, 102, 255, 0.08); color: #0066ff; }
.faq-v2-q-icon.qc-green { background: rgba(51, 153, 102, 0.08); color: #339966; }
.faq-v2-q-icon.qc-purple { background: rgba(139, 92, 246, 0.08); color: #8b5cf6; }
.faq-v2-q-icon.qc-amber { background: rgba(245, 158, 11, 0.08); color: #f59e0b; }
.faq-v2-q-icon.qc-rose { background: rgba(244, 63, 94, 0.08); color: #f43f5e; }

.faq-v2-item.active .faq-v2-q-icon {
    transform: scale(1.1) rotate(-5deg);
}

.faq-v2-question h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary, #1a1a2e);
    line-height: 1.4;
    transition: color 0.3s ease;
}

[data-theme="dark"] .faq-v2-question h3 {
    color: #e0e0e0;
}

.faq-v2-item.active .faq-v2-question h3 {
    color: #0066ff;
}

/* Toggle icon */
.faq-v2-toggle {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    background: rgba(0, 102, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    font-size: 0.75rem;
    color: #0066ff;
}

.faq-v2-item.active .faq-v2-toggle {
    background: #0066ff;
    color: #fff;
    transform: rotate(180deg);
}

/* Answer */
.faq-v2-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.23, 1, 0.32, 1), padding 0.5s ease;
}

.faq-v2-item.active .faq-v2-answer {
    max-height: 300px;
}

.faq-v2-answer-inner {
    padding: 0 25px 22px 81px;
    font-size: 0.9rem;
    color: var(--text-secondary, #666);
    line-height: 1.75;
}

[data-theme="dark"] .faq-v2-answer-inner {
    color: #999;
}

.faq-v2-answer-inner a {
    color: #0066ff;
    text-decoration: none;
    font-weight: 600;
}

.faq-v2-answer-inner a:hover {
    text-decoration: underline;
}

/* ===== Support Card (Right Column) ===== */
.faq-v2-support-card {
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.03), rgba(51, 153, 102, 0.03));
    border-radius: 24px;
    padding: 40px 32px;
    border: 1px solid rgba(0, 102, 255, 0.08);
    position: sticky;
    top: 100px;
    text-align: center;
}

[data-theme="dark"] .faq-v2-support-card {
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.05), rgba(51, 153, 102, 0.05));
    border-color: rgba(0, 102, 255, 0.12);
}

.faq-v2-support-icon {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0066ff, #339966);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
    margin: 0 auto 22px;
    box-shadow: 0 15px 40px rgba(0, 102, 255, 0.25);
    animation: supportIconFloat 3s ease-in-out infinite;
}

@keyframes supportIconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.faq-v2-support-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary, #1a1a2e);
    margin-bottom: 8px;
}

[data-theme="dark"] .faq-v2-support-card h3 {
    color: #e0e0e0;
}

.faq-v2-support-card p {
    font-size: 0.9rem;
    color: var(--text-secondary, #666);
    line-height: 1.6;
    margin-bottom: 25px;
}

[data-theme="dark"] .faq-v2-support-card p {
    color: #999;
}

/* Quick contact options */
.faq-v2-quick-contact {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 25px;
}

.faq-v2-contact-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--card-bg, #ffffff);
    border-radius: 14px;
    text-decoration: none;
    border: 1px solid rgba(0, 102, 255, 0.06);
    transition: all 0.3s ease;
    text-align: left;
}

[data-theme="dark"] .faq-v2-contact-option {
    background: #1a1a30;
    border-color: rgba(0, 102, 255, 0.1);
}

.faq-v2-contact-option:hover {
    transform: translateX(5px);
    border-color: rgba(0, 102, 255, 0.2);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
}

.faq-v2-contact-option .co-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.co-icon.ci-whatsapp { background: rgba(37, 211, 102, 0.12); color: #25d366; }
.co-icon.ci-email { background: rgba(0, 102, 255, 0.1); color: #0066ff; }
.co-icon.ci-phone { background: rgba(51, 153, 102, 0.1); color: #339966; }

.faq-v2-contact-option .co-info h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary, #1a1a2e);
    margin-bottom: 2px;
}

[data-theme="dark"] .faq-v2-contact-option .co-info h4 {
    color: #e0e0e0;
}

.faq-v2-contact-option .co-info span {
    font-size: 0.75rem;
    color: #888;
}

/* Divider */
.faq-v2-divider {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
}

.faq-v2-divider::before,
.faq-v2-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(0, 102, 255, 0.1);
}

.faq-v2-divider span {
    font-size: 0.75rem;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* Response time badge */
.faq-v2-response-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(51, 153, 102, 0.08);
    border-radius: 20px;
    font-size: 0.78rem;
    color: #339966;
    font-weight: 600;
}

.faq-v2-response-badge .pulse-green {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    animation: greenPulse 2s infinite;
}

@keyframes greenPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
}

/* ===== Bottom CTA ===== */
.faq-v2-bottom-cta {
    text-align: center;
    padding: 45px;
    background: linear-gradient(135deg, #0066ff 0%, #0044cc 100%);
    border-radius: 28px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.faq-v2-bottom-cta::before {
    content: '';
    position: absolute;
    inset: 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='%23fff' fill-opacity='0.04'%3E%3Ccircle cx='15' cy='15' r='2'/%3E%3Ccircle cx='45' cy='35' r='3'/%3E%3Ccircle cx='30' cy='50' r='2'/%3E%3C/svg%3E");
    pointer-events: none;
}

.faq-v2-bottom-cta h3 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 8px;
    position: relative;
}

.faq-v2-bottom-cta p {
    opacity: 0.9;
    margin-bottom: 22px;
    position: relative;
    font-size: 0.95rem;
}

.faq-v2-bottom-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 30px;
    background: #fff;
    color: #0066ff;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.92rem;
    transition: all 0.3s ease;
    position: relative;
}

.faq-v2-bottom-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .faq-v2-main {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .faq-v2-support-card {
        position: static;
        order: -1;
    }
    
    .faq-v2-title {
        font-size: 2.3rem;
    }
}

@media (max-width: 768px) {
    .sapcod-faq-v2 {
        padding: 80px 0;
    }
    
    .faq-v2-title {
        font-size: 1.9rem;
    }
    
    .faq-v2-question {
        padding: 18px 20px;
    }
    
    .faq-v2-answer-inner {
        padding: 0 20px 18px 68px;
    }
    
    .faq-v2-q-icon {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 0.85rem;
    }
    
    .faq-v2-question h3 {
        font-size: 0.88rem;
    }
    
    .faq-v2-categories {
        gap: 6px;
    }
    
    .faq-v2-cat-pill {
        padding: 8px 14px;
        font-size: 0.78rem;
    }
    
    .faq-v2-support-card {
        padding: 30px 22px;
    }
    
    .faq-v2-bottom-cta {
        padding: 35px 25px;
    }
    
    .faq-v2-bottom-cta h3 {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .faq-v2-answer-inner {
        padding: 0 16px 16px 16px;
    }
    
    .faq-v2-question-left {
        gap: 10px;
    }
    
    .faq-v2-search {
        padding: 14px 48px 14px 18px;
        font-size: 0.88rem;
    }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    .faq-v2-wash,
    .faq-v2-support-icon,
    .faq-v2-chip i,
    .faq-v2-response-badge .pulse-green {
        animation: none;
    }
    
    .faq-v2-title .t-grad {
        animation: none;
    }
}