/* Updated FAQ Pro Plugin Styles to match the new design */

/* Main Container */
.advice-faq-pro-container {
    max-width: 1200px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Hero Section with Search */
.faq-hero-section {
    border-radius: 0;
    padding: 40px 20px;
    position: relative;
    overflow: hidden;
}

.faq-hero-content {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.faq-hero-title {
    color: #333;
    font-size: 32px;
    font-weight: 500;
    margin-bottom: 25px;
}

.faq-search-container {
    background: transparent;
    padding: 0;
    margin-bottom: 0;
}

.faq-search-form {
    display: flex;
    justify-content: center;
    width: 100%;
    flex-direction: column;
    align-items: center;
}

.faq-search-group {
    display: flex;
    width: 100%;
    max-width: 800px;
    gap: 10px;
    flex-wrap: wrap;
}

.faq-search-input-wrapper {
    position: relative;
    flex: 3;
    min-width: 250px;
    border-radius: 100px;
    overflow: hidden;
    background: white;
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.faq-search-input {
    flex: 1;
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    background: white;
    border-radius: 100px 0 0 100px;
    box-shadow: none;
    min-width: unset;
}

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

.faq-search-button {
    background: transparent;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    color: #555;
    border-radius: 0 100px 100px 0;
}

.faq-search-button:hover {
    background: transparent;
    color: #000;
}

.faq-search-select {
    flex: 1;
    min-width: 150px;
    padding: 12px 20px;
    border: 1px solid #ddd;
    border-radius: 100px;
    font-size: 16px;
    background: white;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="%23555" d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

.search-icon {
    display: flex;
}

.search-icon svg {
    width: 24px;
    height: 24px;
}

/* Search results styling */
.faq-search-results {
    margin-top: 30px;
}

.search-results-title {
    font-size: 24px;
    margin-bottom: 20px;
    text-align: center;
    color: #333;
}

.search-results-category {
    margin-bottom: 30px;
    text-align: left;
}

.search-results-category-title {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.search-result-item {
    margin-bottom: 12px;
    padding: 15px;
    border-radius: 8px;
    background: #fff
}

.search-result-item a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    display: block;
}

.search-result-item a:hover {
    text-decoration: underline;
}

/* Help CTA section */
.faq-help-cta {
    background: #e6eef5;
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
    border-radius: 8px;
}

.faq-help-cta p {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
}

.faq-help-button {
    display: inline-block;
    padding: 10px 20px;
    background: white;
    border: 1px solid #ccc;
    border-radius: 50px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.2s;
    font-size: 14px;
}

.faq-help-button:hover {
    background: #f5f5f5;
}

/* Navigation Tabs */
.faq-navigation-tabs {
    margin-bottom: 40px;
    border-bottom: 1px solid #eee;
}

.faq-navigation-tabs ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
}

.faq-navigation-tabs li {
    margin: 0;
    padding: 0;
}

.faq-navigation-tabs li a {
    display: block;
    padding: 15px 20px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.faq-navigation-tabs li.active a {
    border-bottom: 2px solid #222;
}

.faq-navigation-tabs li a:hover {
    border-bottom: 2px solid #aaa;
}

/* Featured Articles section */
.faq-featured-articles-section {
    padding: 20px 0;
}

.faq-featured-title {
    text-align: center;
    font-size: 28px;
    font-weight: 500;
    color: #333;
    margin-bottom: 40px;
}

.faq-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.faq-category-box {
    background: #f7f7f7;
    border: none;
    border-radius: 8px;
    padding: 15px;
    box-shadow: none;
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
    min-height: 200px;
}

/* .faq-category-box:hover {
    transform: translateY(-3px);
    box-shadow: none;
} */

.faq-category-meta {
    margin-bottom: 15px;
}

.faq-category-meta-tag {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.faq-category-title {
    font-size: 18px;
    font-weight: 500;
    margin: 0 0 15px 0;
    border: none;
    padding: 0;
}

.faq-category-title a {
    color: #222;
    text-decoration: none;
}

.faq-category-title a:hover {
    text-decoration: underline;
}

.faq-items {
    margin-bottom: 15px;
    flex-grow: 1;
}

.faq-item-link {
    margin-bottom: 12px;
}

.faq-item-title-link {
    color: #222;
    text-decoration: none;
    font-size: 16px;
    line-height: 1.4;
    transition: color 0.2s;
    font-weight: 500;
}

.faq-item-title-link:hover {
    color: #000;
    text-decoration: underline;
}

/* Category page specific styling - matches related FAQ styling */
.faq-category-archive .faq-item-title-link {
    color: #333;
    text-decoration: none;
    font-size: 16px;
    line-height: 1.4;
    transition: all 0.2s ease;
    font-weight: 500;
    display: block;
    padding: 12px 15px;
    background: #f7f7f7;
    border-radius: 6px;
}

.faq-category-archive .faq-item-title-link:hover {
    color: #000;
    text-decoration: underline;
    background: #f0f0f0;
}

/* Universal FAQ Navigation Styling */
.faq-nav-container {
    margin-top: 30px;
    margin-bottom: 0;
}


.faq-nav-link {
    color: #007cba;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    transition: color 0.2s ease;
    position: relative;
}

/* Global arrow reset - prevent ALL arrows first */
.faq-nav-link:before,
.faq-nav-link:after,
.faq-item-title-link:after,
.faq-item-title-link:before {
    content: '' !important;
    display: none !important;
}

/* Then only enable the specific ones we want */
.faq-nav-link.back-arrow:before {
    content: '\f104' !important;
    font-family: 'Font Awesome 5 Free', 'Font Awesome 5 Pro', 'Font Awesome 6 Free', 'Font Awesome 6 Pro', sans-serif !important;
    font-weight: 900 !important;
    display: inline !important;
    margin-right: 8px;
    transition: all 0.2s ease;
    vertical-align: middle;
    font-size: 0.9em;
}

.faq-nav-link.back-arrow:hover:before {
    margin-right: 12px;
    color: #005a87;
}

.faq-nav-link.forward-arrow:after {
    content: '\f105' !important;
    font-family: 'Font Awesome 5 Free', 'Font Awesome 5 Pro', 'Font Awesome 6 Free', 'Font Awesome 6 Pro', sans-serif !important;
    font-weight: 900 !important;
    display: inline !important;
    margin-left: 8px;
    transition: all 0.2s ease;
    vertical-align: middle;
    font-size: 0.9em;
}

.faq-nav-link.forward-arrow:hover:after {
    margin-left: 12px;
    color: #005a87;
}

/* Fallback for when FontAwesome is not loaded */
@supports not (font-family: 'Font Awesome 5 Free') {
    .faq-nav-link.back-arrow:before {
        content: '‹' !important;
        font-family: Arial, sans-serif !important;
        font-weight: bold !important;
        font-size: 1.2em !important;
    }
    
    .faq-nav-link.forward-arrow:after {
        content: '›' !important;
        font-family: Arial, sans-serif !important;
        font-weight: bold !important;
        font-size: 1.2em !important;
    }
}

/* Only show arrows on main page category boxes - already covered by forward-arrow class */

.faq-nav-link:hover {
    color: #005a87;
    text-decoration: none;
}

/* Ensure no double arrows on navigation links */
.faq-nav-link:after,
.faq-nav-link:before {
    content: '';
}

.faq-nav-link.back-arrow:after {
    display: none !important;
}

.faq-nav-link.forward-arrow:before {
    display: none !important;
}

/* Legacy support - map old classes to new universal styling */
.faq-category-more {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #e8e8e8;
    flex-shrink: 0;
}

/* FAQ Category Archive Page - Match main page styling */
.faq-category-archive {
    background: #f9f9f9;
    min-height: 300px;
}

/* Category archive heading */
.faq-category-archive .faq-category-heading {
    text-align: left;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.faq-category-archive .faq-category-heading h1 {
    font-size: 28px;
    font-weight: 500;
    color: #333;
    margin: 0;
}

/* Hide the duplicate title in the content area */
.faq-category-archive .faq-items h2,
.faq-category-archive .faq-items h1 {
    display: none;
}

.faq-category-archive .faq-category-heading .category-description {
    font-size: 16px;
    color: #666;
    margin-top: 10px;
}

/* Individual FAQ items in category archive */
.faq-category-archive .faq-item {
    margin-bottom: 12px;
    text-align: left;
}

.faq-category-archive .faq-item:last-child {
    margin-bottom: 0;
}

.faq-category-archive .faq-item-title {
    padding: 15px 20px;
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #333;
    border: none;
    background: none;
    text-align: left;
    width: 100%;
}

.faq-category-archive .faq-item-title:hover {
    color: #000;
}

.faq-category-archive .faq-item-content {
    padding: 0 20px 20px 20px;
    color: #555;
    line-height: 1.6;
    display: none;
}

.faq-category-archive .faq-item.active .faq-item-content {
    display: block;
}

.faq-category-archive .faq-item-toggle {
    font-size: 18px;
    color: #999;
    transition: transform 0.2s;
}

.faq-category-archive .faq-item.active .faq-item-toggle {
    transform: rotate(180deg);
}

/* No results message styling */
.faq-category-archive .faq-no-results {
    text-align: center;
    background: white;
    border-radius: 8px;
    padding: 40px 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    max-width: 800px;
    margin: 0 auto;
    color: #666;
    font-size: 16px;
}

/* Back to all categories link - using universal navigation styling */
.faq-category-archive .faq-back-link {
    margin-top: 30px;
    margin-bottom: 0;
    padding-top: 15px;
    border-top: 1px solid #e8e8e8;
}

/* Single FAQ Page Styling - using universal navigation */
.single-faq .entry-footer {
    margin-top: 40px;
    border-top: 1px solid #e8e8e8;
}

.single-faq .faq-nav-container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.single-faq .faq-nav-container .faq-nav-item {
    flex: 0 0 auto;
}



/* Related FAQ styling */
.single-faq .faq-related {
    margin-top: 30px;
}

.single-faq .faq-related h3 {
    font-size: 18px;
    font-weight: 500;
    color: #333;
    margin-bottom: 15px;
}

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

.single-faq .faq-related-list li {
    margin-bottom: 12px;
    padding: 12px 15px;
    background: #f7f7f7;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.single-faq .faq-related-list li:hover {
    background: #f0f0f0;
}

.single-faq .faq-related-list li a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    display: block;
}

.single-faq .faq-related-list li a:hover {
    color: #000;
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .faq-categories-grid {
        grid-template-columns: 1fr;
    }
    
    .faq-search-group {
        flex-direction: column;
    }
    
    .faq-search-input-wrapper {
        width: 100%;
    }
    
    .faq-search-select {
        width: 100%;
    }
    
    .faq-navigation-tabs li a {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .faq-category-archive {
        padding: 20px 10px;
    }
    
    .faq-category-archive .faq-items {
        padding: 20px 15px;
    }
    
    .faq-category-archive .faq-category-heading h1 {
        font-size: 24px;
    }
    
    .faq-category-archive .faq-item-title {
        padding: 12px 15px;
        font-size: 15px;
    }
    
    .faq-category-archive .faq-item-content {
        padding: 0 15px 15px 15px;
    }
    
    .single-faq .entry-footer {
        margin-top: 30px;
        padding-top: 20px;
    }
    
    .single-faq .faq-nav-container {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .single-faq .faq-nav-container .faq-nav-item {
        width: 100%;
    }
    
    .single-faq .faq-related h3 {
        font-size: 16px;
    }
    
    .single-faq .faq-related-list li {
        padding: 10px 12px;
    }
}
