/* ============================================================================
   FAQ PAGE - MODERN REDESIGN
   Clean, accessible, and premium UI for FAQ section
   ============================================================================ */

/* ============================================================================
   CSS Variables & Theme
   ============================================================================ */
:root {
    --faq-primary: #00AFA3;
    --faq-primary-dark: #0d9488;
    --faq-primary-light: #ccfbf1;
    --faq-primary-50: #f0fdfa;
    --faq-bg: #f8fcfc;
    --faq-white: #ffffff;
    --faq-text-dark: #1e293b;
    --faq-text-muted: #64748b;
    --faq-text-light: #94a3b8;
    --faq-border: #e2e8f0;
    --faq-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --faq-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --faq-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --faq-radius: 1rem;
    --faq-radius-lg: 1.5rem;
    --faq-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --faq-font: 'Geologica', 'Manrope', system-ui, -apple-system, sans-serif;
    --faq-font-arabic: 'Noto Sans Arabic', 'Geologica', system-ui, sans-serif;
}

/* ============================================================================
   Base Styles
   ============================================================================ */
.faq-page {
    font-family: var(--faq-font);
    background: var(--faq-bg);
    min-height: 100vh;
    overflow-x: hidden;
}

.faq-page.rtl {
    font-family: var(--faq-font-arabic);
    direction: rtl;
}

.faq-page * {
    box-sizing: border-box;
}

/* Container */
.max-w-container {
    max-width: 1280px;
    margin: 0 auto;
}

/* ============================================================================
   Hero Section
   ============================================================================ */
.faq-hero {
    position: relative;
    padding: 5rem 0 4rem;
    overflow: hidden;
}

.faq-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.faq-hero-pattern {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(3, 199, 184, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(3, 199, 184, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 40% 80%, rgba(3, 199, 184, 0.04) 0%, transparent 30%);
}

.faq-hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, var(--faq-white) 0%, var(--faq-bg) 100%);
    opacity: 0.8;
}

.faq-hero-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.faq-hero-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--faq-primary) 0%, var(--faq-primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 40px -10px rgba(3, 199, 184, 0.5);
}

.faq-hero-icon svg {
    width: 40px;
    height: 40px;
    color: var(--faq-white);
}

.faq-hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--faq-text-dark);
    margin: 0 0 1rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.faq-hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--faq-text-muted);
    margin: 0 0 2.5rem;
    max-width: 600px;
    line-height: 1.6;
}

/* Search Box */
.faq-search-wrapper {
    width: 100%;
    max-width: 600px;
}

.faq-search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--faq-white);
    border: 2px solid var(--faq-border);
    border-radius: 100px;
    padding: 0.25rem;
    transition: var(--faq-transition);
    box-shadow: var(--faq-shadow);
}

.faq-search-box:focus-within {
    border-color: var(--faq-primary);
    box-shadow: 0 0 0 4px rgba(3, 199, 184, 0.1), var(--faq-shadow-lg);
}

.faq-search-icon {
    position: absolute;
    left: 1.5rem;
    width: 24px;
    height: 24px;
    color: var(--faq-text-light);
    pointer-events: none;
}

.rtl .faq-search-icon {
    left: auto;
    right: 1.5rem;
}

.faq-search-input {
    flex: 1;
    padding: 1rem 3.5rem;
    font-size: 1rem;
    font-family: inherit;
    border: none;
    background: transparent;
    color: var(--faq-text-dark);
    outline: none;
}

.faq-search-input::placeholder {
    color: var(--faq-text-light);
}

.faq-search-clear {
    position: absolute;
    right: 1.5rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--faq-border);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--faq-transition);
}

.rtl .faq-search-clear {
    right: auto;
    left: 1.5rem;
}

.faq-search-clear:hover {
    background: var(--faq-text-light);
}

.faq-search-clear svg {
    width: 16px;
    height: 16px;
    color: var(--faq-text-dark);
}

.faq-search-clear.hidden {
    display: none;
}

/* ============================================================================
   FAQ Content Section
   ============================================================================ */
.faq-content-section {
    padding: 0 0 4rem;
}

/* Category Filter */
.faq-categories-wrapper {
    margin-bottom: 3rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.faq-categories-wrapper::-webkit-scrollbar {
    display: none;
}

.faq-categories {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0.25rem;
}

.faq-category-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 500;
    font-family: inherit;
    color: var(--faq-text-muted);
    background: var(--faq-white);
    border: 2px solid var(--faq-border);
    border-radius: 100px;
    cursor: pointer;
    transition: var(--faq-transition);
    white-space: nowrap;
}

.faq-category-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.faq-category-btn:hover {
    border-color: var(--faq-primary);
    color: var(--faq-primary);
}

.faq-category-btn.active {
    background: var(--faq-primary);
    border-color: var(--faq-primary);
    color: var(--faq-white);
}

/* FAQ Accordion */
.faq-accordion-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: var(--faq-white);
    border: 2px solid var(--faq-border);
    border-radius: var(--faq-radius);
    overflow: hidden;
    transition: var(--faq-transition);
}

.faq-item:hover {
    border-color: rgba(3, 199, 184, 0.3);
    box-shadow: var(--faq-shadow);
}

.faq-item.active {
    border-color: var(--faq-primary);
    box-shadow: var(--faq-shadow-lg);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    font-family: inherit;
    text-align: left;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: var(--faq-transition);
}

.rtl .faq-question {
    text-align: right;
}

.faq-question:hover {
    background: var(--faq-primary-50);
}

.faq-question-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.faq-question-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--faq-primary);
    background: var(--faq-primary-light);
    border-radius: 10px;
    flex-shrink: 0;
}

.faq-item.active .faq-question-number {
    background: var(--faq-primary);
    color: var(--faq-white);
}

.faq-question-text {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--faq-text-dark);
    line-height: 1.4;
}

.faq-toggle-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--faq-text-light);
    transition: var(--faq-transition);
}

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

.faq-icon-minus {
    display: none;
}

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

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

.faq-item.active .faq-toggle-icon {
    color: var(--faq-primary);
    transform: rotate(0deg);
}

/* FAQ Answer */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer-content {
    padding: 0 1.5rem 1.5rem;
    padding-left: calc(1.5rem + 40px + 1rem);
}

.rtl .faq-answer-content {
    padding-left: 1.5rem;
    padding-right: calc(1.5rem + 40px + 1rem);
}

.faq-answer-content p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--faq-text-muted);
    margin: 0;
}

/* No Results */
.faq-no-results {
    text-align: center;
    padding: 4rem 2rem;
}

.faq-no-results.hidden {
    display: none;
}

.faq-no-results-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--faq-border);
    border-radius: 50%;
}

.faq-no-results-icon svg {
    width: 40px;
    height: 40px;
    color: var(--faq-text-light);
}

.faq-no-results-text {
    font-size: 1.125rem;
    color: var(--faq-text-muted);
    margin: 0;
}

/* ============================================================================
   Contact Support Section
   ============================================================================ */
.faq-contact-section {
    padding: 0 0 5rem;
}

.faq-contact-card {
    position: relative;
    background: linear-gradient(135deg, var(--faq-primary) 0%, var(--faq-primary-dark) 100%);
    border-radius: var(--faq-radius-lg);
    padding: 4rem 2rem;
    overflow: hidden;
    text-align: center;
}

.faq-contact-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.faq-contact-pattern {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 30%),
        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%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.faq-contact-content {
    position: relative;
    z-index: 10;
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.faq-contact-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    backdrop-filter: blur(10px);
}

.faq-contact-icon svg {
    width: 32px;
    height: 32px;
    color: var(--faq-white);
}

.faq-contact-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--faq-white);
    margin: 0 0 1rem;
}

.faq-contact-description {
    font-size: 1.0625rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 2rem;
    line-height: 1.6;
}

.faq-contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--faq-primary);
    background: var(--faq-white);
    border: none;
    border-radius: 100px;
    text-decoration: none;
    cursor: pointer;
    transition: var(--faq-transition);
    box-shadow: 0 4px 14px -3px rgba(0, 0, 0, 0.2);
}

.faq-contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.3);
}

.faq-contact-btn svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.rtl .faq-contact-btn svg {
    transform: rotate(180deg);
}

.faq-contact-btn:hover svg {
    transform: translateX(4px);
}

.rtl .faq-contact-btn:hover svg {
    transform: translateX(-4px) rotate(180deg);
}

/* ============================================================================
   Responsive Design
   ============================================================================ */
@media (max-width: 768px) {
    .faq-hero {
        padding: 3rem 0 2.5rem;
    }
    
    .faq-hero-icon {
        width: 64px;
        height: 64px;
    }
    
    .faq-hero-icon svg {
        width: 32px;
        height: 32px;
    }
    
    .faq-hero-subtitle {
        margin-bottom: 2rem;
    }
    
    .faq-search-box {
        padding: 0.125rem;
    }
    
    .faq-search-input {
        padding: 0.875rem 3rem;
        font-size: 0.9375rem;
    }
    
    .faq-search-icon {
        left: 1.25rem;
        width: 20px;
        height: 20px;
    }
    
    .rtl .faq-search-icon {
        left: auto;
        right: 1.25rem;
    }
    
    .faq-categories {
        justify-content: flex-start;
        flex-wrap: nowrap;
        padding: 0.5rem;
    }
    
    .faq-category-btn {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }
    
    .faq-category-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .faq-question {
        padding: 1rem 1.25rem;
    }
    
    .faq-question-number {
        width: 36px;
        height: 36px;
        font-size: 0.8125rem;
        border-radius: 8px;
    }
    
    .faq-question-text {
        font-size: 0.9375rem;
    }
    
    .faq-answer-content {
        padding: 0 1.25rem 1.25rem;
        padding-left: calc(1.25rem + 36px + 0.75rem);
    }
    
    .rtl .faq-answer-content {
        padding-left: 1.25rem;
        padding-right: calc(1.25rem + 36px + 0.75rem);
    }
    
    .faq-answer-content p {
        font-size: 0.9375rem;
    }
    
    .faq-contact-card {
        padding: 3rem 1.5rem;
        border-radius: var(--faq-radius);
    }
    
    .faq-contact-icon {
        width: 56px;
        height: 56px;
    }
    
    .faq-contact-icon svg {
        width: 28px;
        height: 28px;
    }
    
    .faq-contact-btn {
        padding: 0.875rem 1.75rem;
        font-size: 0.9375rem;
    }
}

@media (max-width: 480px) {
    .faq-hero {
        padding: 2.5rem 0 2rem;
    }
    
    .faq-hero-icon {
        width: 56px;
        height: 56px;
        margin-bottom: 1rem;
    }
    
    .faq-hero-icon svg {
        width: 28px;
        height: 28px;
    }
    
    .faq-content-section {
        padding-bottom: 3rem;
    }
    
    .faq-categories-wrapper {
        margin-bottom: 2rem;
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .faq-question-content {
        gap: 0.75rem;
    }
    
    .faq-contact-section {
        padding-bottom: 3rem;
    }
    
    .faq-contact-card {
        padding: 2.5rem 1.25rem;
    }
}

/* ============================================================================
   Print Styles
   ============================================================================ */
@media print {
    .faq-hero-bg,
    .faq-contact-bg,
    .faq-search-wrapper,
    .faq-categories-wrapper,
    .faq-toggle-icon,
    .faq-contact-section {
        display: none !important;
    }
    
    .faq-item {
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
    
    .faq-answer {
        max-height: none !important;
    }
}

/* ============================================================================
   Accessibility
   ============================================================================ */
@media (prefers-reduced-motion: reduce) {
    .faq-hero-icon {
        animation: none;
    }
    
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
.faq-search-input:focus,
.faq-category-btn:focus,
.faq-question:focus,
.faq-contact-btn:focus {
    outline: 2px solid var(--faq-primary);
    outline-offset: 2px;
}

.faq-search-box:focus-within .faq-search-input:focus {
    outline: none;
}


