/* FAQ Styles */

/* FAQ Container */
.faq-container {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    gap: 2rem;
}

/* FAQ Sidebar */
.faq-sidebar {
    flex: 0 0 250px;
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 2rem;
    align-self: flex-start;
    height: max-content;
}

.faq-sidebar h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    color: #333;
    border-bottom: 1px solid #ddd;
    padding-bottom: 0.5rem;
}

.faq-categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
    transition: max-height 0.3s ease;
}

.faq-category-item {
    margin-bottom: 0.5rem;
}

.faq-category-link {
    display: block;
    padding: 0.5rem;
    color: #444;
    text-decoration: none;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.faq-category-item.active .faq-category-link,
.faq-category-link:hover {
    background-color: #e9ecef;
    color: #1a73e8;
    transform: translateX(5px);
}

/* Current tag info */
.current-tag-info {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #ddd;
}

.tag-badge.large {
    font-size: 1rem;
    padding: 0.5rem 0.75rem;
    background-color: #e9f0fe;
    border-radius: 2rem;
    display: inline-block;
}

/* FAQ Main Content */
.faq-main {
    flex: 1;
    width: 100%;
}

.faq-header {
    margin-bottom: 2rem;
}

.faq-title {
    margin-top: 0;
    color: #1a73e8;
    font-size: 2rem;
    line-height: 1.2;
}

.category-description {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* FAQ Search */
.faq-search-container {
    margin-bottom: 2rem;
    position: relative;
}

#faq-search {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid #ddd;
    border-radius: 2rem;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#faq-search:focus {
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.15);
}

.faq-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

/* FAQ Accordion */
.faq-accordion {
    margin-bottom: 2rem;
}

.faq-item {
    margin-bottom: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: transform 0.2s ease;
}


.faq-question {
    padding: 1rem 1.5rem;
    cursor: pointer;
    position: relative;
}

.faq-question::after {
    content: '+';
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: #1a73e8;
    transition: transform 0.3s ease;
}

.faq-question[aria-expanded="true"]::after {
    transform: translateY(-50%) rotate(45deg);
}

.faq-question h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
    padding-right: 2rem;
}

.faq-question-link {
    color: #333;
    text-decoration: none;
    display: block;
}

.faq-question-link:hover {
    color: #1a73e8;
}

.faq-preview {
    padding: 1.5rem;
    border-top: 1px solid #f0f0f0;
    line-height: 1.6;
    background-color: #fff;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.7s ease, opacity 0.4s ease, padding 0.3s ease;
}

.faq-question[aria-expanded="true"] + .faq-preview {
    max-height: 1000px;
    opacity: 1;
}

.read-more {
    display: inline-block;
    margin-top: 0.5rem;
    color: #1a73e8;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding-right: 1.2rem;
}

.read-more::after {
    content: '→';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.2s ease;
}

.read-more:hover::after {
    transform: translateY(-50%) translateX(3px);
}

/* FAQ Detail */
.faq-detail {
    padding: 2rem;
    background-color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.faq-body {
    margin: 1.5rem 0;
    line-height: 1.8;
    color: #333;
}

.faq-body p {
    margin-bottom: 1.25rem;
}

.faq-body ul, .faq-body ol {
    margin-left: 1.5rem;
    margin-bottom: 1.25rem;
}

.faq-body li {
    margin-bottom: 0.5rem;
}

.faq-body a {
    color: #1a73e8;
    text-decoration: none;
    border-bottom: 1px dotted #1a73e8;
}

.faq-body a:hover {
    border-bottom: 1px solid #1a73e8;
}

.faq-footer {
    padding-top: 1rem;
    border-top: 1px solid #eee;
    font-size: 0.9rem;
    color: #666;
}

/* Related FAQs */
.related-faqs {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.related-faqs h2 {
    margin-top: 0;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #333;
    position: relative;
    padding-bottom: 0.5rem;
}

.related-faqs h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: #1a73e8;
}

.related-faqs-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.related-faq-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.related-faq-item:last-child {
    border-bottom: none;
}

.related-faq-item:hover {
    background-color: #f1f4f9;
    padding-left: 0.5rem;
}

.related-faq-link {
    color: #1a73e8;
    text-decoration: none;
    display: block;
    position: relative;
    padding-left: 1.5rem;
}

.related-faq-link::before {
    content: '→';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #1a73e8;
    transition: transform 0.2s;
}

.related-faq-link:hover::before {
    transform: translateY(-50%) translateX(3px);
}

.related-faq-link:hover {
    text-decoration: underline;
}

/* FAQ Navigation */
.faq-navigation {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
}

.faq-navigation .btn {
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.faq-navigation .btn-primary {
    background-color: #1a73e8;
    color: white;
    border: none;
}

.faq-navigation .btn-primary:hover {
    background-color: #0d61cb;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(26, 115, 232, 0.25);
}

.faq-navigation .btn-outline-secondary {
    background-color: transparent;
    color: #666;
    border: 1px solid #ddd;
}

.faq-navigation .btn-outline-secondary:hover {
    background-color: #f5f5f5;
    border-color: #ccc;
}

/* Categories and Tags */
.faq-categories {
    margin-bottom: 1rem;
}

.category-badge {
    display: inline-block;
    background-color: #e9ecef;
    color: #495057;
    padding: 0.35rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.85rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.category-badge:hover {
    background-color: #dee2e6;
    transform: translateY(-2px);
}

.faq-tags {
    margin-bottom: 1.5rem;
}

.tag-badge {
    display: inline-block;
    color: #1a73e8;
    font-size: 0.85rem;
    margin-right: 0.8rem;
    margin-bottom: 0.5rem;
    text-decoration: none;
    transition: color 0.2s;
    position: relative;
}

.tag-badge::before {
    content: '#';
    opacity: 0.7;
}

.tag-badge:hover {
    color: #0d61cb;
}

/* Contact FAQ List */
.contact-faq {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.contact-faq h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    color: #333;
}

.faq-list {
    list-style: none;
    padding: 0;
}

.faq-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}

.faq-link {
    color: #1a73e8;
    text-decoration: none;
    display: block;
    transition: color 0.2s;
}

.faq-link:hover {
    text-decoration: underline;
    color: #0d61cb;
}

.faq-more-link {
    margin-top: 1rem;
    text-align: right;
}

/* Pagination */
.pagination {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

.pagination-list {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    border-radius: 0.25rem;
    overflow: hidden;
}

.page-item {
    margin: 0;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    color: #1a73e8;
    background-color: #fff;
    border: 1px solid #dee2e6;
    text-decoration: none;
    transition: all 0.2s ease;
}

.page-item:not(:first-child) .page-link {
    margin-left: -1px;
}

.page-item:first-child .page-link {
    border-top-left-radius: 0.25rem;
    border-bottom-left-radius: 0.25rem;
}

.page-item:last-child .page-link {
    border-top-right-radius: 0.25rem;
    border-bottom-right-radius: 0.25rem;
}

.page-item.active .page-link {
    background-color: #1a73e8;
    color: white;
    border-color: #1a73e8;
    z-index: 1;
}

.page-link:hover:not(.active) {
    background-color: #e9ecef;
    border-color: #dee2e6;
    z-index: 2;
}

.page-item.disabled .page-link {
    color: #6c757d;
    pointer-events: none;
    background-color: #fff;
    border-color: #dee2e6;
}

/* No FAQs message */
.no-faqs {
    padding: 3rem 2rem;
    text-align: center;
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    color: #666;
    border: 1px dashed #ccc;
}

/* FAQ Widget Styles -------------------------------------------- */
.faq-widget-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.faq-widget {
    width: 80%;
    margin: 2rem 0;
    padding: 1.5rem;
    background-color: #f8f9fa7e;
    border-radius: 0.5rem;
    transition: transform 0.3s ease;
}

.faq-widget-title {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: #333;
    position: relative;
    padding-bottom: 0.5rem;
}

.faq-widget-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background-color: #1a73e8;
}

.faq-widget-list {
    margin-bottom: 1.5rem;
}

.faq-widget-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #e9ecef;
    transition: padding 0.2s ease;
}

.faq-widget-item:last-child {
    border-bottom: none;
}

.faq-widget-item:hover {
    padding-left: 0.5rem;
}

.faq-widget-question {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
}

.faq-widget-question a {
    color: #1a73e8;
    text-decoration: none;
    display: block;
    padding: 0.25rem 0;
    transition: color 0.2s;
}

.faq-widget-question a:hover {
    color: #0d47a1;
}

.faq-widget-answer-preview {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
}

.faq-widget-more {
    display: inline-block;
    margin-left: 0.25rem;
    color: #1a73e8;
    font-weight: 500;
    transition: color 0.2s;
}

.faq-widget-more:hover {
    color: #0d47a1;
    text-decoration: underline;
}

.faq-widget-more-link {
    text-align: right;
    margin-top: 1rem;
}

.faq-widget-more-link .btn {
    font-size: 0.85rem;
    padding: 0.35rem 0.75rem;
    border-radius: 1rem;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
}

.faq-widget-more-link .btn-outline-primary {
    color: #1a73e8;
    border: 1px solid #1a73e8;
    background-color: transparent;
}

.faq-widget-more-link .btn-outline-primary:hover {
    background-color: #1a73e8;
    color: white;
}

.faq-widget-empty {
    color: #6c757d;
    font-style: italic;
    text-align: center;
    padding: 1rem 0;
}

/* Home page specific styles */
.home-faq-widget {
    margin-top: 3rem;
    margin-bottom: 3rem;
}

/* Sidebar specific styles */
.sidebar .faq-widget {
    padding: 1rem;
}

.sidebar .faq-widget-title {
    font-size: 1.2rem;
}

.sidebar .faq-widget-question {
    font-size: 0.9rem;
}

/* Mobile category toggle button */
.mobile-category-toggle {
    display: none;
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: #1a73e8;
    color: white;
    border: none;
    border-radius: 0.25rem;
    font-size: 1rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    margin-bottom: 1rem;
    position: relative;
}

.mobile-category-toggle::after {
    content: '▼';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
}

.mobile-category-toggle.active::after {
    transform: translateY(-50%) rotate(180deg);
}

/* Button styles */
.btn {
    display: inline-block;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: all 0.15s ease-in-out;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    color: #fff;
    background-color: #1a73e8;
    border-color: #1a73e8;
}

.btn-primary:hover {
    background-color: #0d61cb;
    border-color: #0d61cb;
}

.btn-outline-secondary {
    color: #6c757d;
    background-color: transparent;
    border-color: #6c757d;
}

.btn-outline-secondary:hover {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 0.2rem;
}



/* Responsive Adjustments */
@media (max-width: 991px) {
    .faq-title {
        font-size: 1.75rem;
    }
    
    .faq-detail {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .faq-container {
        flex-direction: column;
    }
    
    .faq-sidebar {
        flex: none;
        margin-bottom: 1.5rem;
        position: static;
    }
    
    .mobile-category-toggle {
        display: block;
    }
    
    .faq-categories-list {
        display: none;
        max-height: 0;
        overflow: hidden;
    }
    
    .faq-categories-list.open {
        display: block;
        max-height: 1000px;
    }
    
    .faq-navigation {
        flex-direction: column;
    }
    
    .faq-widget {
        padding: 1rem;
    }
    
    .faq-widget-title {
        font-size: 1.25rem;
    }
    
    .faq-title {
        font-size: 1.5rem;
    }
    
    .faq-navigation .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 576px) {
    
    .faq-question h2 {
        font-size: 1rem;
    }
    
    .faq-detail {
        padding: 1.25rem;
    }
    
    .faq-body {
        font-size: 0.95rem;
    }
    
    .pagination-list {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .page-item {
        margin: 2px;
    }
    
    .page-link {
        min-width: 2rem;
        height: 2rem;
        padding: 0 0.5rem;
    }
}