/**
 * FAQ Page Styles
 * Modern styling for the FAQ page with expandable questions
 */

/* Page Layout - Minimalistic */
.page_faq {
    padding: 0.5rem 0;
    background: #ffffff;
    min-height: 100vh;
}

.page-header {
    margin-bottom: 1rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    font-size: 1rem;
    color: #666;
    font-weight: 400;
}

/* Search Container - Minimalistic */
.faq-search-container {
    background: #f8f9fa;
    padding: 0.5rem 0.5rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin-bottom: 1rem;
}

.faq-search-container .input-group {
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #dee2e6;
}

.faq-search-container .form-control {
    border: none;
    padding: 0.5rem 0.5rem;
    font-size: 0.95rem;
    background: white;
}

.faq-search-container .form-control:focus {
    box-shadow: none;
    background: white;
    border-color: #007bff;
}

.faq-search-container .input-group-text {
    background: #007bff;
    border: none;
    color: white;
    padding: 0.5rem 0.5rem;
}

.faq-search-container .btn-outline-secondary {
    border: none;
    background: #6c757d;
    color: white;
    padding: 0.5rem 0.5rem;
    transition: all 0.2s ease;
}

.faq-search-container .btn-outline-secondary:hover {
    background: #5a6268;
}

.search-results-count {
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 0.5rem;
}

/* Category Headers - Minimalistic */
.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.category-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    display: flex;
    align-items: center;
}

.category-title i {
    color: #007bff;
    margin-right: 0.5rem;
}

.category-count {
    background: #007bff;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* FAQ Items - Minimalistic */
.faq-item {
    margin-bottom: 0.5rem;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    overflow: hidden;
    background: white;
    transition: all 0.2s ease;
}

.faq-item:hover {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0,123,255,0.1);
}

.faq-item.highlight {
    border-color: #007bff;
    background-color: #f8f9ff;
}

/* Accordion Buttons - Minimalistic */
.accordion-button {
    background: white;
    border: none;
    padding: 0.5rem 0.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: #1a1a1a;
    text-align: left;
    width: 100%;
    transition: all 0.2s ease;
    position: relative;
    cursor: pointer;
}

.accordion-button:hover {
    background: #f8f9fa;
    color: #007bff;
}

.accordion-button:not(.collapsed) {
    background: #007bff;
    color: white;
}

.accordion-button:focus {
    box-shadow: none;
    outline: none;
}

.accordion-button::after {
    content: '';
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid currentColor;
    transition: transform 0.2s ease;
}

.accordion-button:not(.collapsed)::after {
    transform: translateY(-50%) rotate(180deg);
}

/* Accordion Content */
.accordion-collapse {
    background: white;
    border-top: 1px solid #e9ecef;
    display: none;
}

.accordion-collapse.show {
    display: block !important;
}

.accordion-body {
    padding: 0.5rem 0.5rem;
    line-height: 1.6;
}

.faq-answer {
    display: flex;
    align-items: flex-start;
}

.faq-answer i {
    color: #007bff;
    margin-right: 0.5rem;
    margin-top: 0.125rem;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.answer-content {
    flex: 1;
    color: #333;
    font-size: 0.95rem;
}

/* Answer Content Styling - Fixed Lists */
.answer-content ul {
    margin: 0.5rem 0;
    padding-left: 1.25rem;
    list-style-type: disc;
}

.answer-content li {
    margin-bottom: 0.25rem;
    line-height: 1.5;
    padding-left: 0.25rem;
}

.answer-content li:last-child {
    margin-bottom: 0;
}

.answer-content a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.answer-content a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.answer-content strong {
    color: #1a1a1a;
    font-weight: 600;
}

.answer-content em {
    color: #666;
    font-style: italic;
}

.answer-content code {
    background: #f8f9fa;
    color: #e83e8c;
    padding: 0.15rem 0.3rem;
    border-radius: 3px;
    font-size: 0.85em;
    font-family: 'Courier New', monospace;
}

/* Table Styling - Minimalistic */
.answer-content .table-responsive {
    margin: 1rem 0;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.answer-content .table {
    margin-bottom: 0;
    font-size: 0.85rem;
}

.answer-content .table thead th {
    background: linear-gradient(135deg, #008080 0%, #006666 100%);
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: white;
    padding: 0.8rem;
    text-align: center;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.answer-content .table tbody td {
    padding: 0.8rem;
    border-bottom: 1px solid #e9ecef;
    vertical-align: top;
    font-size: 0.85rem;
}

.answer-content .table tbody tr:last-child td {
    border-bottom: none;
}

.answer-content .table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Responsive table adjustments */
@media (max-width: 768px) {
    .answer-content .table {
        font-size: 0.8rem;
    }
    
    .answer-content .table thead th,
    .answer-content .table tbody td {
        padding: 0.5rem;
    }
}

/* No Results - Minimalistic */
#noResults {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 2rem;
    border: 1px solid #e9ecef;
}

#noResults i {
    color: #666;
    margin-bottom: 1rem;
}

#noResults h3 {
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

#noResults p {
    color: #666;
    margin-bottom: 1.5rem;
}

/* Contact Section - Minimalistic */
.faq-contact-section {
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    overflow: hidden;
}

.faq-contact-section .card {
    border: none;
    background: transparent;
}

.faq-contact-section .card-body {
    padding: 2rem;
}

.faq-contact-section h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 600;
}

.faq-contact-section p {
    color: #6c757d;
    margin-bottom: 2rem;
}

.contact-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.contact-buttons .btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.contact-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

/* Critical Bootstrap 5 accordion styles - HIGH SPECIFICITY */
.page_faq .accordion-collapse {
    display: none !important;
    transition: all 0.35s ease;
}

.page_faq .accordion-collapse.collapsing {
    height: 0;
    overflow: hidden;
    transition: height 0.35s ease;
}

.page_faq .accordion-collapse.show {
    display: block !important;
}

/* Override any Bootstrap conflicts */
.page_faq .accordion-collapse:not(.show) {
    display: none !important;
}

.page_faq .accordion-collapse.collapse {
    display: none !important;
}

.page_faq .accordion-collapse.collapse.show {
    display: block !important;
}

/* Smooth transitions for accordion buttons */
.accordion-button {
    transition: all 0.3s ease;
    cursor: pointer;
}

.accordion-button::after {
    transition: transform 0.3s ease;
}

.accordion-button:not(.collapsed)::after {
    transform: rotate(180deg);
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }
    
    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .category-count {
        align-self: flex-start;
    }
    
    .faq-search-container {
        padding: 1.5rem;
    }
    
    .accordion-button {
        padding: 1rem;
        font-size: 0.95rem;
    }
    
    .accordion-body {
        padding: 1rem;
    }
    
    .contact-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .contact-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .answer-content .table {
        font-size: 0.8rem;
    }
    
    .answer-content .table thead th {
        font-size: 0.75rem;
        padding: 0.6rem;
    }
    
    .answer-content .table tbody td {
        font-size: 0.8rem;
        padding: 0.6rem;
    }
}

@media (max-width: 576px) {
    .page_faq {
        padding: 1rem 0;
    }
    
    .page-title {
        font-size: 1.75rem;
    }
    
    .faq-search-container {
        padding: 1rem;
    }
    
    .faq-search-container .form-control,
    .faq-search-container .input-group-text,
    .faq-search-container .btn-outline-secondary {
        padding: 0.75rem 1rem;
    }
    
    .category-title {
        font-size: 1.25rem;
    }
    
    .accordion-button {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .accordion-body {
        padding: 0.75rem;
    }
    
    .answer-content .table {
        font-size: 0.75rem;
    }
    
    .answer-content .table thead th {
        font-size: 0.7rem;
        padding: 0.5rem;
    }
    
    .answer-content .table tbody td {
        font-size: 0.75rem;
        padding: 0.5rem;
    }
}

/* Accessibility */
.accordion-button:focus-visible {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .faq-search-container,
    .contact-buttons {
        display: none;
    }
    
    .accordion-collapse {
        display: block !important;
    }
    
    .accordion-button {
        background: white !important;
        color: #2c3e50 !important;
    }
}
