/**
 * FAQ Categories IQL - Frontend Styles
 * Author: IQLevel vel Espectro
 */

/* ===========================
   FAQ Hierarchy Mode Styles
   =========================== */

.faq-iql-hierarchy-main-wrapper {
    width: 100%;
    margin: 20px 0;
    background: var(--faq-iql-module-bg, transparent);
    border: var(--faq-iql-wrapper-border, 0);
    border-radius: var(--faq-iql-wrapper-radius, 0);
}

.faq-iql-hierarchy-search {
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.faq-iql-search-form-inline {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.faq-iql-hierarchy-search-input {
    flex: 1;
    min-width: 250px;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.faq-iql-hierarchy-search-input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

.faq-iql-hierarchy-search-button {
    padding: 12px 30px;
    background: #2271b1;
    color: #ffffff;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.faq-iql-hierarchy-search-button:hover {
    background: #135e96;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
}

.faq-iql-hierarchy-clear-button {
    padding: 12px 20px;
    background: #dc3545;
    color: #ffffff;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.faq-iql-hierarchy-clear-button:hover {
    background: #c82333;
}

.faq-iql-search-results-info {
    margin-top: 15px;
    padding: 10px 15px;
    background: #e8f4fd;
    border-left: 4px solid #2271b1;
    border-radius: 4px;
    color: #333;
    font-size: 14px;
}

.faq-iql-hierarchy-wrapper {
    width: 100%;
}

/* === ELEMENT: POJEDYNCZY BLOK (KATEGORIA lub FAQ) === */
.faq-iql-hierarchy-item {
    margin-bottom: 5px;
    border: var(--faq-iql-item-border, 1px solid #e0e0e0);
    border-radius: var(--faq-iql-item-radius, 6px);
    background: var(--faq-iql-item-bg, transparent);
    overflow: visible; /* Changed from hidden to allow full expansion */
    transition: all 0.3s ease;
}

.faq-iql-hierarchy-item > .faq-iql-hierarchy-header {
    overflow: hidden; /* Keep header contained */
    border-radius: 6px 6px 0 0;
}

.faq-iql-hierarchy-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* Make sure FAQ items are visible */
.faq-iql-faq-item {
    display: block !important;
    margin-bottom: var(--faq-iql-faq-gap, 6px);
}

.faq-iql-faq-item .faq-iql-icon {
    color: #5b9dd9;
    font-size: 16px;
}

.faq-iql-hierarchy-header {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    cursor: pointer;
    background: #fafafa;
    transition: all 0.3s ease;
    gap: 10px;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    position: relative;
}

.faq-iql-hierarchy-header:hover {
    background: #f0f0f0;
}

.faq-iql-hierarchy-header:active {
    background: #e8e8e8;
}

.faq-iql-hierarchy-item.active > .faq-iql-hierarchy-header {
    background: #e8f4fd;
}

.faq-iql-category-header {
    background: #f5f5f5;
    font-weight: 600;
}

/* Główne kategorie - wyróżnienie (domyślne kolory, nadpisywalne przez Elementor) */
.faq-iql-hierarchy-wrapper > .faq-iql-hierarchy-item > .faq-iql-category-header {
    background: linear-gradient(135deg, #2271b1 0%, #135e96 100%);
    color: white;
    font-size: 17px;
    padding: 16px 20px;
    font-weight: 700;
    border-bottom: 3px solid #135e96;
}

.faq-iql-hierarchy-wrapper > .faq-iql-hierarchy-item > .faq-iql-category-header .faq-iql-folder-icon {
    color: inherit;
}

.faq-iql-hierarchy-wrapper > .faq-iql-hierarchy-item > .faq-iql-category-header .faq-iql-hierarchy-title {
    color: inherit;
}

.faq-iql-hierarchy-wrapper > .faq-iql-hierarchy-item > .faq-iql-category-header .faq-iql-hierarchy-toggle {
    color: inherit;
}

.faq-iql-hierarchy-wrapper > .faq-iql-hierarchy-item > .faq-iql-category-header .faq-iql-count-badge {
    background: rgba(255, 255, 255, 0.3);
    color: inherit;
    /*border: 1px solid rgba(255, 255, 255, 0.5);*/
}

.faq-iql-hierarchy-wrapper > .faq-iql-hierarchy-item > .faq-iql-category-header:hover {
    opacity: 0.9;
}

/* Podkategorie - jasnoszare z ikoną (domyślne, nadpisywalne) */
.faq-iql-hierarchy-content > .faq-iql-hierarchy-item:not(.faq-iql-faq-item) > .faq-iql-category-header {
    background: #f0f7ff;
    border-left: var(--faq-iql-subcat-border, 4px solid #2271b1);
    font-size: 15px;
    padding: 12px 15px;
}

.faq-iql-hierarchy-content > .faq-iql-hierarchy-item:not(.faq-iql-faq-item) > .faq-iql-category-header:hover {
    opacity: 0.9;
}

.faq-iql-hierarchy-content > .faq-iql-hierarchy-item:not(.faq-iql-faq-item) > .faq-iql-category-header .faq-iql-folder-icon {
    color: #2271b1;
    font-size: 18px;
}

.faq-iql-hierarchy-item.active > .faq-iql-category-header {
    background: #e3f2fd;
    border-bottom: 1px solid #e0e0e0;
}

.faq-iql-faq-header {
    background: var(--faq-iql-faq-header-bg, #ffffff);
    border-top: 1px solid #f0f0f0;
}

/* FAQ items - wyróżnione kolorem (domyślne, nadpisywalne przez Elementor) */
.faq-iql-hierarchy-header.faq-iql-faq-header {
    padding: 10px 15px;
    background: #fffef8;
    border-left: var(--faq-iql-faq-left-border, 0);
}

.faq-iql-hierarchy-header.faq-iql-faq-header:hover {
    opacity: 0.9;
}

.faq-iql-hierarchy-item.faq-iql-faq-item {
    border: var(--faq-iql-faq-border, 1px solid #ffe8a3);
    background: #fffef8;
}

.faq-iql-hierarchy-item.active.faq-iql-faq-item > .faq-iql-faq-header {
    opacity: 0.95;
}

.faq-iql-hierarchy-item.active.faq-iql-faq-item {
    border-color: #ffc107;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

/* Ikona FAQ - pomarańczowa (domyślna) */
.faq-iql-faq-item .faq-iql-icon {
    color: #ff9800;
    font-size: 18px;
}

/* Tytuł FAQ - ciemnoniebieski (domyślny) */
.faq-iql-faq-item .faq-iql-hierarchy-title.faq-iql-question {
    color: #1565c0;
    font-weight: 600;
}

.faq-iql-hierarchy-toggle {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: transform 0.3s ease;
    font-size: 14px;
}

.faq-iql-hierarchy-toggle i {
    transition: transform 0.3s ease;
}

.faq-iql-hierarchy-item.active > .faq-iql-hierarchy-header .faq-iql-hierarchy-toggle i {
    transform: rotate(90deg);
}

.faq-iql-folder-icon {
    color: #2271b1;
    margin-right: 5px;
}

.faq-iql-hierarchy-title {
    flex: 1;
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Główne kategorie - większy font */
.faq-iql-hierarchy-wrapper > .faq-iql-hierarchy-item .faq-iql-hierarchy-title {
    font-size: 17px;
}

/* FAQ items - mniejszy font */
.faq-iql-faq-item .faq-iql-hierarchy-title {
    font-size: 14px;
    font-weight: 500;
}

.faq-iql-faq-item .faq-iql-hierarchy-title.faq-iql-question {
    color: #2271b1;
    font-weight: 500;
}

/* Podkategorie - średni font */
.faq-iql-hierarchy-content > .faq-iql-hierarchy-item:not(.faq-iql-faq-item) .faq-iql-hierarchy-title {
    font-size: 15px;
}

.faq-iql-count-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #2271b1;
    color: #ffffff;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
}

.faq-iql-hierarchy-content {
    display: none;
    opacity: 0;
    background: var(--faq-iql-content-bg, #ffffff);
    transition: opacity 0.3s ease;
}

.faq-iql-hierarchy-item.active > .faq-iql-hierarchy-content {
    display: block;
    opacity: 1;
    /*padding: 15px 0;*/
    animation: slideDown 0.3s ease;
}

.faq-iql-faq-item.active > .faq-iql-hierarchy-content {
    padding: 20px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.faq-iql-answer {
    line-height: 1.7;
    color: #555;
    font-size: 14px;
    min-height: 50px; /* Ensure minimum height */
}

.faq-iql-answer p {
    margin: 0 0 12px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.faq-iql-answer p:last-child {
    margin-bottom: 0;
}

.faq-iql-answer p:first-child {
    margin-top: 0;
}

.faq-iql-answer ul,
.faq-iql-answer ol {
    margin: 10px 0;
    padding-left: 25px;
}

.faq-iql-answer li {
    margin: 5px 0;
    line-height: 1.6;
}

/* Style for FAQ content when expanded */
.faq-iql-faq-item.active > .faq-iql-hierarchy-content.faq-iql-answer {
    background: var(--faq-iql-answer-bg, #fafafa);
    border-top: 1px solid #e8e8e8;
}

/* Level indentation - proper nesting structure */
.faq-iql-hierarchy-wrapper > .faq-iql-hierarchy-item {
    /* Top level - no indentation */
    margin: 0 0 15px 0;
    border: var(--faq-iql-root-border, 0);
    box-shadow: var(--faq-iql-root-shadow, none);
}

.faq-iql-hierarchy-content {
    padding-left: 0;
}

.faq-iql-hierarchy-content > .faq-iql-hierarchy-item {
    /* Spójne schodki (tylko jednokrotny krok w lewo) */
    margin: 8px 0 8px var(--faq-iql-indent-step, 24px) !important;
    padding-left: 0;
    border-left: 0;
}

.faq-iql-hierarchy-content > .faq-iql-faq-item {
    /* FAQ items inside categories */
    margin: 8px 0 8px 40px !important;
    border-left: var(--faq-iql-faq-left-border, 3px solid #5b9dd9);
    padding-left: 10px;
}

/* Each nested level adds more indentation */
.faq-iql-hierarchy-item .faq-iql-hierarchy-content > .faq-iql-hierarchy-item {
    margin-left: var(--faq-iql-indent-step, 24px) !important;
}

.faq-iql-hierarchy-item .faq-iql-hierarchy-item .faq-iql-hierarchy-content > .faq-iql-hierarchy-item {
    margin-left: var(--faq-iql-indent-step, 24px) !important;
}

.faq-iql-question {
    color: #2271b1;
}

/* Search filtering */
.faq-iql-search-hidden {
    display: none !important;
    opacity: 0;
}

.faq-iql-search-match {
    display: block !important;
    opacity: 1;
}

.faq-iql-search-match {
    animation: fadeInMatch 0.3s ease;
}

@keyframes fadeInMatch {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.faq-iql-highlight {
    background: #ffeb3b;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 700;
    color: #000;
}

/* ===========================
   FAQ Display Widget Styles
   =========================== */

.faq-iql-wrapper {
    width: 100%;
    margin: 20px 0;
}

/* Accordion Layout */
.faq-iql-layout-accordion .faq-iql-item {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-iql-layout-accordion .faq-iql-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.faq-iql-layout-accordion .faq-iql-item-header {
    display: flex;
    align-items: center;
    padding: 20px;
    cursor: pointer;
    background: #f9f9f9;
    transition: background 0.3s ease;
}

.faq-iql-layout-accordion .faq-iql-item-header:hover {
    background: #f0f0f0;
}

.faq-iql-layout-accordion .faq-iql-item.active .faq-iql-item-header {
    background: #e8f4fd;
    border-bottom: 1px solid #e0e0e0;
}

.faq-iql-icon {
    margin-right: 15px;
    font-size: 24px;
    color: #2271b1;
    flex-shrink: 0;
}

.faq-iql-item-title {
    flex: 1;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.faq-iql-toggle {
    margin-left: auto;
    font-size: 14px;
    color: #666;
    transition: transform 0.3s ease;
}

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

.faq-iql-categories {
    padding: 0 20px 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.faq-iql-category {
    display: inline-block;
    padding: 4px 12px;
    background: #e8f4fd;
    color: #2271b1;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

/* Category displayed inline with title */
.faq-iql-category-inline {
    display: inline-block;
    padding: 4px 10px;
    margin-left: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.faq-iql-layout-accordion .faq-iql-item-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 20px;
}

.faq-iql-layout-accordion .faq-iql-item.active .faq-iql-item-content {
    max-height: 2000px;
    padding: 20px;
}

.faq-iql-item-content p {
    margin: 0 0 15px;
    line-height: 1.6;
    color: #555;
}

.faq-iql-item-content p:last-child {
    margin-bottom: 0;
}

/* List Layout */
.faq-iql-layout-list .faq-iql-item {
    background: #ffffff;
    border-left: 4px solid #2271b1;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.faq-iql-layout-list .faq-iql-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateX(5px);
}

.faq-iql-layout-list .faq-iql-item-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.faq-iql-layout-list .faq-iql-item-content {
    display: block;
}

/* Grid Layout */
.faq-iql-layout-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.faq-iql-layout-grid .faq-iql-item {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.faq-iql-layout-grid .faq-iql-item:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    transform: translateY(-5px);
}

.faq-iql-layout-grid .faq-iql-item-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.faq-iql-layout-grid .faq-iql-item-content {
    display: block;
}

/* ===========================
   FAQ Search Widget Styles
   =========================== */

.faq-iql-search-wrapper {
    margin: 30px 0;
}

.faq-iql-search-form {
    margin-bottom: 20px;
}

.faq-iql-search-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.faq-iql-search-input {
    flex: 1;
    min-width: 250px;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.faq-iql-search-input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

.faq-iql-search-category {
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 16px;
    min-width: 200px;
    transition: all 0.3s ease;
}

.faq-iql-search-category:focus {
    outline: none;
    border-color: #2271b1;
}

.faq-iql-search-button {
    padding: 12px 30px;
    background: #2271b1;
    color: #ffffff;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.faq-iql-search-button:hover {
    background: #135e96;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
}

.faq-iql-search-results {
    margin-top: 30px;
}

.faq-iql-results-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.faq-iql-result-item {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.faq-iql-result-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.faq-iql-result-title {
    margin: 0 0 10px;
    font-size: 18px;
}

.faq-iql-result-title a {
    color: #2271b1;
    text-decoration: none;
    transition: color 0.3s ease;
}

.faq-iql-result-title a:hover {
    color: #135e96;
}

.faq-iql-result-excerpt {
    color: #666;
    line-height: 1.6;
}

.faq-iql-no-results {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 16px;
}

/* ===========================
   FAQ Categories Widget Styles
   =========================== */

.faq-iql-categories-wrapper {
    margin: 20px 0;
}

/* Grid Layout */
.faq-iql-categories-grid {
    display: grid;
    gap: 20px;
}

.faq-iql-columns-1 .faq-iql-categories-grid { grid-template-columns: repeat(1, 1fr); }
.faq-iql-columns-2 .faq-iql-categories-grid { grid-template-columns: repeat(2, 1fr); }
.faq-iql-columns-3 .faq-iql-categories-grid { grid-template-columns: repeat(3, 1fr); }
.faq-iql-columns-4 .faq-iql-categories-grid { grid-template-columns: repeat(4, 1fr); }
.faq-iql-columns-5 .faq-iql-categories-grid { grid-template-columns: repeat(5, 1fr); }
.faq-iql-columns-6 .faq-iql-categories-grid { grid-template-columns: repeat(6, 1fr); }

.faq-iql-category-item {
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.faq-iql-category-item:hover {
    border-color: #2271b1;
    box-shadow: 0 4px 16px rgba(34, 113, 177, 0.15);
    transform: translateY(-3px);
}

.faq-iql-category-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    color: inherit;
}

.faq-iql-category-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.faq-iql-category-count {
    background: #2271b1;
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    margin-left: 10px;
}

.faq-iql-category-description {
    margin-top: 10px;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* List Layout */
.faq-iql-categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.faq-iql-categories-list li {
    margin-bottom: 10px;
}

.faq-iql-categories-list .faq-iql-category-item {
    border-left: 4px solid #2271b1;
}

/* Dropdown Layout */
.faq-iql-categories-dropdown {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.faq-iql-categories-dropdown:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

/* Hierarchy Layout */
.faq-iql-categories-hierarchy {
    list-style: none;
    padding: 0;
    margin: 0;
}

.faq-iql-subcategories {
    list-style: none;
    padding-left: 30px;
    margin-top: 10px;
}

.faq-iql-subcategories .faq-iql-category-item {
    border-left: 3px solid #2271b1;
    background: #f9f9f9;
}

.faq-iql-subcategories .faq-iql-subcategories .faq-iql-category-item {
    border-left-color: #5b9dd9;
    background: #fcfcfc;
}

/* ===========================
   FAQ Tabs Widget Styles
   =========================== */

.faq-iql-tabs-wrapper {
    margin: 30px 0;
}

.faq-iql-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
}

.faq-iql-tab-button {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    bottom: -2px;
}

.faq-iql-tab-button:hover {
    color: #2271b1;
}

.faq-iql-tab-button.active {
    color: #2271b1;
    border-bottom-color: #2271b1;
}

.faq-iql-tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.faq-iql-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===========================
   Filterable Styles
   =========================== */

.faq-iql-filterable .faq-iql-category-link {
    cursor: pointer;
}

.faq-iql-category-item.active {
    border-color: #2271b1;
    background: #e8f4fd;
}

.faq-iql-filtered-item {
    display: none;
}

.faq-iql-filtered-item.visible {
    display: block;
}

/* ===========================
   Loading State
   =========================== */

.faq-iql-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.faq-iql-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2271b1;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===========================
   Responsive Styles
   =========================== */

@media (max-width: 768px) {
    .faq-iql-search-row {
        flex-direction: column;
    }
    
    .faq-iql-search-input,
    .faq-iql-search-category {
        width: 100%;
        min-width: 100%;
    }
    
    .faq-iql-search-button {
        width: 100%;
    }
    
    .faq-iql-columns-3 .faq-iql-categories-grid,
    .faq-iql-columns-4 .faq-iql-categories-grid,
    .faq-iql-columns-5 .faq-iql-categories-grid,
    .faq-iql-columns-6 .faq-iql-categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .faq-iql-tabs-nav {
        flex-direction: column;
    }
    
    .faq-iql-tab-button {
        width: 100%;
        text-align: left;
    }
}

@media (max-width: 480px) {
    .faq-iql-columns-2 .faq-iql-categories-grid,
    .faq-iql-columns-3 .faq-iql-categories-grid,
    .faq-iql-columns-4 .faq-iql-categories-grid,
    .faq-iql-columns-5 .faq-iql-categories-grid,
    .faq-iql-columns-6 .faq-iql-categories-grid {
        grid-template-columns: repeat(1, 1fr);
    }

    .faq-iql-layout-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

/* ===========================
   Tags and Related Articles
   =========================== */

/* Inline markdown links */
.faq-iql-inline-link {
    color: #2271b1;
    text-decoration: underline;
    transition: all 0.3s ease;
    font-weight: 500;
}

.faq-iql-inline-link:hover {
    color: #135e96;
    text-decoration: none;
}

/* Tags container */
.faq-iql-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0;
    padding: 15px 0;
    border-top: 1px solid #e0e0e0;
}

.faq-iql-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    text-decoration: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

.faq-iql-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    color: #ffffff;
}

/* Related articles section */
.faq-iql-related-articles {
    margin: 30px 0;
    padding: 25px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8f0f7 100%);
    border-radius: 12px;
    border-left: 4px solid #2271b1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.faq-iql-related-title {
    display: flex;
    align-items: center;
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

.faq-iql-related-icon {
    font-size: 24px;
    margin-right: 8px;
}

.faq-iql-related-list {
    display: grid;
    gap: 15px;
}

.faq-iql-related-item {
    display: flex;
    gap: 15px;
    background: #ffffff;
    padding: 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.faq-iql-related-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateX(5px);
}

.faq-iql-related-thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
}

.faq-iql-related-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.faq-iql-related-item:hover .faq-iql-related-thumbnail img {
    transform: scale(1.1);
}

.faq-iql-related-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.faq-iql-related-post-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.faq-iql-related-post-title a {
    color: #2271b1;
    text-decoration: none;
    transition: color 0.3s ease;
}

.faq-iql-related-post-title a:hover {
    color: #135e96;
}

.faq-iql-related-excerpt {
    margin: 0;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

.faq-iql-related-date {
    font-size: 12px;
    color: #999;
    margin-top: auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .faq-iql-related-item {
        flex-direction: column;
    }

    .faq-iql-related-thumbnail {
        width: 100%;
        height: 150px;
    }
}

/* ===========================
   Useful Links (Search Results)
   =========================== */

.faq-iql-useful-links {
    margin: 30px 0 0 0;
    padding: 25px;
    background: linear-gradient(135deg, #fff9e6 0%, #ffeaa7 100%);
    border-radius: 12px;
    border-left: 4px solid #fdcb6e;
    box-shadow: 0 2px 8px rgba(253, 203, 110, 0.2);
}

.faq-iql-useful-links-title {
    display: flex;
    align-items: center;
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 700;
    color: #2d3436;
}

.faq-iql-useful-links-icon {
    font-size: 24px;
    margin-right: 8px;
}

.faq-iql-useful-links-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.faq-iql-useful-links-group {
    background: #ffffff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.faq-iql-useful-links-group-title {
    display: flex;
    align-items: center;
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: #636e72;
}

.faq-iql-link-icon {
    font-size: 18px;
    margin-right: 6px;
}

.faq-iql-useful-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.faq-iql-useful-links-list li {
    margin: 8px 0;
    padding-left: 20px;
    position: relative;
}

.faq-iql-useful-links-list li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: #fdcb6e;
    font-weight: bold;
}

.faq-iql-useful-links-list a {
    color: #2271b1;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
    line-height: 1.5;
}

.faq-iql-useful-links-list a:hover {
    color: #135e96;
    text-decoration: underline;
}

/* Tags in useful links */
.faq-iql-useful-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.faq-iql-useful-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: linear-gradient(135deg, #fdcb6e 0%, #f39c12 100%);
    color: #ffffff;
    text-decoration: none;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(253, 203, 110, 0.3);
}

.faq-iql-useful-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(253, 203, 110, 0.4);
    background: linear-gradient(135deg, #f39c12 0%, #fdcb6e 100%);
    color: #ffffff;
}

/* Responsive */
@media (max-width: 768px) {
    .faq-iql-useful-links-content {
        grid-template-columns: 1fr;
    }
}

/* ===========================
   Random Blog Posts (No Results)
   =========================== */

.faq-iql-random-posts {
    margin-top: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #fef5e7 0%, #fdebd0 100%);
    border-radius: 12px;
    border-left: 4px solid #f39c12;
    box-shadow: 0 3px 12px rgba(243, 156, 18, 0.15);
}

.faq-iql-random-posts-title {
    font-size: 20px;
    font-weight: 600;
    color: #d68910;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(243, 156, 18, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
}

.faq-iql-random-posts-icon {
    font-size: 24px;
    line-height: 1;
}

.faq-iql-random-posts-list {
    display: grid;
    gap: 20px;
}

.faq-iql-random-post-item {
    display: flex;
    gap: 15px;
    padding: 18px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(243, 156, 18, 0.15);
}

.faq-iql-random-post-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 16px rgba(243, 156, 18, 0.25);
    border-color: #f39c12;
}

.faq-iql-random-post-thumbnail {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    overflow: hidden;
    border-radius: 8px;
    background: #f8f9fa;
}

.faq-iql-random-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.faq-iql-random-post-item:hover .faq-iql-random-post-thumbnail img {
    transform: scale(1.08);
}

.faq-iql-random-post-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.faq-iql-random-post-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.faq-iql-random-post-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.2s ease;
}

.faq-iql-random-post-title a:hover {
    color: #f39c12;
}

.faq-iql-random-post-excerpt {
    margin: 0;
    font-size: 14px;
    color: #7f8c8d;
    line-height: 1.6;
}

.faq-iql-random-post-date {
    font-size: 12px;
    color: #95a5a6;
    font-weight: 500;
    margin-top: auto;
}

/* Random Posts Responsive */
@media (max-width: 768px) {
    .faq-iql-random-posts {
        padding: 20px;
    }

    .faq-iql-random-post-item {
        flex-direction: column;
        gap: 12px;
    }

    .faq-iql-random-post-thumbnail {
        width: 100%;
        height: 180px;
    }

    .faq-iql-random-posts-title {
        font-size: 18px;
    }
}

