/* FAQ Page Styles */

/* Page Hero */
.page-hero {
    position: relative;
    background-image: url('https://images.unsplash.com/photo-1565538810643-b5bdb714032a?ixlib=rb-4.0.3&auto=format&fit=crop&w=2000&q=80');
    background-size: cover;
    background-position: center;
    color: var(--white);
    padding: 60px 0 40px;
    text-align: center;
    margin-top: 70px;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.8) 0%, rgba(51, 51, 51, 0.8) 100%);
}

.page-hero .container {
    position: relative;
    z-index: 1;
}

.page-title {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    color: var(--white);
}

.page-subtitle {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* Search Bar */
.faq-search {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.faq-search i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 1.25rem;
}

.faq-search input {
    width: 100%;
    padding: 18px 20px 18px 55px;
    font-size: 1.125rem;
    border: none;
    border-radius: 50px;
    background: white;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.faq-search input:focus {
    outline: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

/* FAQ Section Layout */
.faq-section {
    padding: 80px 0;
    background: white;
}

.faq-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
    align-items: start;
    overflow: hidden;
}

/* Sidebar */
.faq-sidebar {
    position: sticky;
    top: 100px;
}

.faq-sidebar h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.category-list {
    list-style: none;
}

.category-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    text-decoration: none;
    color: var(--text-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.category-link:hover {
    background: var(--bg-light);
    color: var(--secondary-color);
}

.category-link.active {
    background: var(--secondary-color);
    color: white;
}

.category-link .count {
    font-size: 0.875rem;
    padding: 2px 8px;
    background: rgba(0,0,0,0.1);
    border-radius: 12px;
}

.category-link.active .count {
    background: rgba(255,255,255,0.2);
}

/* FAQ Content */
.faq-category {
    margin-bottom: 4rem;
}

.category-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.category-title i {
    color: var(--secondary-color);
}

/* FAQ Items */
.faq-item {
    margin-bottom: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.faq-question {
    width: 100%;
    max-width: 100%;
    padding: 1.5rem;
    background: white;
    border: none;
    text-align: left;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
    box-sizing: border-box;
    overflow: hidden;
}

.faq-question span {
    flex: 1;
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.faq-question:hover {
    background: var(--bg-light);
}

.faq-question i {
    font-size: 1rem;
    transition: transform 0.3s ease;
    color: var(--secondary-color);
    flex-shrink: 0;
}

.faq-item.active .faq-question {
    background: var(--bg-light);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.faq-item.active .faq-answer {
    max-height: 1000px;
}

.answer-content {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-color);
    line-height: 1.8;
}

.answer-content h4 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.answer-content ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.answer-content li {
    margin-bottom: 0.5rem;
}

/* Comparison Table */
.comparison-table {
    margin: 1.5rem 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-light);
    border-radius: 8px;
    overflow: hidden;
    min-width: 400px;
}

.comparison-table th,
.comparison-table td {
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
}

.comparison-table th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

/* Process Timeline */
.process-timeline {
    margin: 1.5rem 0;
}

.process-step {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.process-step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 19px;
    top: 40px;
    bottom: -12px;
    width: 2px;
    background: #e0e0e0;
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--secondary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.step-content h4 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.step-content p {
    margin: 0;
    color: var(--text-light);
}

/* Tip Box */
.tip-box {
    background: #fff9e6;
    border-left: 4px solid var(--secondary-color);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 4px;
    display: flex;
    gap: 1rem;
    align-items: start;
}

.tip-box i {
    color: var(--secondary-color);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.tip-box p {
    margin: 0;
}

/* CTA Section */
.faq-cta {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, #333 100%);
    text-align: center;
    color: white;
}

.faq-cta h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: white;
}

.faq-cta p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-secondary {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary-color);
}

/* Search Highlight */
.highlight {
    background: #ffeb3b;
    padding: 2px 4px;
    border-radius: 2px;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
}

.no-results i {
    font-size: 3rem;
    color: #ddd;
    margin-bottom: 1rem;
}

/* Chat Widget Styles */
.chat-widget-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.chat-toggle {
    background: var(--secondary-color);
    border: none;
    border-radius: 30px;
    padding: 15px 25px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(201, 169, 97, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 5px 20px rgba(201, 169, 97, 0.3); }
    50% { box-shadow: 0 5px 30px rgba(201, 169, 97, 0.5); }
    100% { box-shadow: 0 5px 20px rgba(201, 169, 97, 0.3); }
}

.chat-toggle:hover {
    transform: scale(1.05);
}

.chat-toggle i {
    font-size: 1.25rem;
}

.chat-badge {
    position: relative;
}

/* Chat Widget */
.chat-widget {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 380px;
    height: 600px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-widget.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.chat-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2d2d2d 100%);
    color: white;
    padding: 20px;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.2);
}

.chat-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.875rem;
    opacity: 0.9;
}

.chat-status i {
    font-size: 0.5rem;
    color: #4CAF50;
}

.chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 5px;
    transition: all 0.3s ease;
}

.chat-close:hover {
    transform: rotate(90deg);
}

.chat-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-message {
    display: flex;
    flex-direction: column;
    max-width: 80%;
    animation: messageSlide 0.3s ease-out;
}

@keyframes messageSlide {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-message.user { align-self: flex-end; }
.chat-message.bot { align-self: flex-start; }

.message-content {
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.chat-message.bot .message-content {
    background: #f0f0f0;
    color: var(--text-color);
    border-bottom-left-radius: 4px;
}

.chat-message.user .message-content {
    background: var(--secondary-color);
    color: white;
    border-bottom-right-radius: 4px;
}

.message-time {
    font-size: 0.75rem;
    color: #999;
    margin-top: 5px;
    padding: 0 8px;
}

.chat-message.user .message-time { text-align: right; }

.chat-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.suggestion-chip {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 0.875rem;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.suggestion-chip:hover {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 15px;
    background: #f0f0f0;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    width: fit-content;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #999;
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-10px); }
}

.chat-footer {
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
}

.chat-input {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}

.chat-input input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 24px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    min-width: 0;
}

.chat-input input:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.chat-send {
    background: var(--secondary-color);
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.chat-send:hover {
    background: #b89651;
}

.chat-disclaimer {
    text-align: center;
    font-size: 0.75rem;
    color: #999;
    margin: 0;
}

/* ==================== */
/* RESPONSIVE           */
/* ==================== */

@media (max-width: 992px) {
    .faq-layout {
        grid-template-columns: 1fr;
    }

    .faq-sidebar {
        position: static;
        margin-bottom: 1rem;
    }

    .faq-sidebar h3 {
        display: none;
    }

    .category-list {
        display: flex;
        gap: 0.5rem;
        overflow-x: auto;
        padding-bottom: 0.75rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .category-list::-webkit-scrollbar {
        display: none;
    }

    .category-list li {
        flex-shrink: 0;
    }

    .category-link {
        white-space: nowrap;
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        border: 1px solid #e0e0e0;
        margin-bottom: 0;
    }

    .faq-section {
        padding: 40px 0;
    }

    .category-title {
        font-size: 1.5rem;
        gap: 0.75rem;
    }

    .faq-category {
        margin-bottom: 2.5rem;
    }
}

@media (max-width: 768px) {
    .page-hero {
        padding: 40px 0 30px;
    }

    .page-title {
        font-size: 1.75rem;
    }

    .page-subtitle {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }

    .faq-search input {
        padding: 14px 16px 14px 45px;
        font-size: 1rem;
    }

    .faq-search i {
        left: 16px;
        font-size: 1rem;
    }

    .faq-question {
        padding: 1.25rem 1rem;
        font-size: 1rem;
        gap: 0.75rem;
    }

    .answer-content {
        padding: 0 1rem 1.25rem;
        font-size: 0.95rem;
        line-height: 1.7;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }

    .process-step {
        gap: 0.75rem;
        margin-bottom: 1.25rem;
    }

    .step-number {
        width: 34px;
        height: 34px;
        font-size: 0.9rem;
    }

    .process-step:not(:last-child)::after {
        left: 16px;
        top: 34px;
        bottom: -8px;
    }

    .step-content h4 {
        font-size: 0.95rem;
    }

    .step-content p {
        font-size: 0.9rem;
    }

    .tip-box {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        gap: 0.75rem;
    }

    .tip-box i {
        font-size: 1rem;
    }

    /* CTA */
    .faq-cta {
        padding: 50px 0;
    }

    .faq-cta h2 {
        font-size: 1.75rem;
    }

    .faq-cta p {
        font-size: 1rem;
    }

    .cta-actions {
        flex-direction: column;
        align-items: center;
    }

    .cta-actions .btn {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }

    /* Chat */
    .chat-widget-container {
        bottom: 15px;
        right: 15px;
    }

    .chat-toggle {
        padding: 12px 18px;
        font-size: 0.85rem;
    }

    .chat-widget {
        position: fixed;
        bottom: 0;
        right: 0;
        width: 100vw;
        height: calc(100vh - 70px);
        max-width: none;
        max-height: none;
        border-radius: 0;
    }

    .chat-header {
        border-radius: 0;
    }
}

@media (max-width: 480px) {
    .page-hero {
        padding: 35px 0 25px;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .faq-section {
        padding: 30px 0;
    }

    .category-title {
        font-size: 1.25rem;
        margin-bottom: 1.25rem;
        padding-bottom: 0.75rem;
    }

    .faq-question {
        padding: 1rem 0.75rem;
        font-size: 0.95rem;
    }

    .answer-content {
        padding: 0 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .answer-content ul {
        padding-left: 1.25rem;
    }

    .chat-toggle .chat-badge {
        display: none;
    }

    .chat-toggle {
        padding: 12px;
        border-radius: 50%;
        width: 50px;
        height: 50px;
        justify-content: center;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.faq-item {
    animation: fadeIn 0.5s ease-out;
}

/* Print */
@media print {
    .page-hero, .faq-sidebar, .faq-cta, .chat-widget-container,
    #header-placeholder, #footer-placeholder { display: none; }
    .faq-layout { grid-template-columns: 1fr; }
    .faq-item.active .faq-answer { max-height: none; }
}
