/**
 * Стилі для фронтенду - TOC блок
 */
 
/* Підключення шрифту Rubik */
@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@300;400;500;600;700&display=swap');

/* Базові стилі для TOC */
.kl-toc {
    margin: 30px 0 !important;
    padding: 0 !important;
    font-family: 'Rubik', sans-serif !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.kl-toc-header {
    margin: 0 0 20px 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}

.kl-toc-title {
    margin: 0 !important;
    padding: 0 !important;
    text-transform: uppercase !important;
    border: none !important;
}

.kl-toc-content {
    margin: 0 !important;
    padding: 0 !important;
}

.kl-toc-list {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    list-style-type: none !important;
    counter-reset: toc-counter !important;
}

.kl-toc-list-nested {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    list-style-type: none !important;
}

.kl-toc-item {
    position: relative !important;
    counter-increment: toc-counter !important;
    list-style: none !important;
    list-style-type: none !important;
    background: none !important;
    padding-left: 0 !important;
}

.kl-toc-item::before {
    display: none !important;
}

.kl-toc-link {
    text-decoration: none !important;
    display: block !important;
    transition: font-weight 0.2s ease !important;
    background: none !important;
    border: none !important;
}

/* Стиль 1 - Мінімалістичний білий */
.kl-toc-style1 {
    background: transparent !important;
    padding: 0 !important;
}

.kl-toc-style1 .kl-toc-title {
    font-size: 36px !important;
    font-weight: 700 !important;
    color: #000000 !important;
    margin-bottom: 25px !important;
}

.kl-toc-style1 .kl-toc-item {
    margin-bottom: 5px !important;
    list-style: none !important;
}

.kl-toc-style1 .kl-toc-link {
    font-size: 18px !important;
    font-weight: 400 !important;
    color: #3C916C !important;
    padding-left: 30px !important;
    line-height: 1.5 !important;
}

.kl-toc-style1 .kl-toc-link::before {
    content: counter(toc-counter) "." !important;
    position: absolute !important;
    left: 0 !important;
    color: #3C916C !important;
    font-weight: 400 !important;
    display: block !important;
}
.kl-toc-style1 .kl-toc-item-h3 .kl-toc-link::before {
    content: '➤' !important;
    position: absolute !important;
    left: 0 !important;
    color: #3C916C !important;
    font-weight: 400 !important;
    display: block !important;
}
.kl-toc-link:hover,
.kl-toc-link.active {
    font-weight: 500 !important;
    text-decoration: none !important;
}
/* Стиль 2 - Зелений блок */
.kl-toc-style2 {
    background: #3C916C !important;
    border-radius: 20px !important;
    padding: 35px 30px !important;
    border: none !important;
    box-shadow: none !important;
}

.kl-toc-style2 .kl-toc-title {
    font-size: 22px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    text-align: center !important;
    margin-bottom: 25px !important;
}

.kl-toc-style2 .kl-toc-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
    padding: 15px 0 !important;
    list-style: none !important;
}

.kl-toc-style2 .kl-toc-item:last-child {
    border-bottom: none !important;
}

.kl-toc-style2 .kl-toc-link {
    font-size: 16px !important;
    font-weight: 300 !important;
    color: #ffffff !important;
    padding-left: 30px !important;
    line-height: 1.5 !important;
}

.kl-toc-style2 .kl-toc-link::before {
    content: counter(toc-counter) "." !important;
    position: absolute !important;
    left: 0 !important;
    color: #ffffff !important;
    font-weight: 300 !important;
    display: block !important;
}

.kl-toc-style2 .kl-toc-link:hover,
.kl-toc-style2 .kl-toc-link.active {
    font-weight: 500 !important;
}

.kl-toc-style2 .kl-toc-link:hover::before,
.kl-toc-style2 .kl-toc-link.active::before {
    font-weight: 500 !important;
}

/* Вкладені списки (якщо є h3, h4) */
.kl-toc-style1 .kl-toc-list-nested .kl-toc-item {
    margin-left: 20px !important;
}

.kl-toc-style2 .kl-toc-list-nested .kl-toc-item {
    border-bottom: none !important;
    padding: 8px 0 !important;
}

/* Sticky TOC в сайдбарі */
.col-lg-3.col-md-12.col-12,
.col-lg-3,
.sidebar-widget-area {
    overflow: visible !important;
    height: auto !important;
    min-height: 100vh !important;
}

.kl-toc-sidebar-wrapper {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 30px !important;
    margin-top: 30px !important;
    margin-bottom: 30px !important;
    z-index: 999 !important;
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    overflow: visible !important;
    align-self: flex-start !important;
}

.kl-toc-sidebar-wrapper .kl-toc {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    width: 100% !important;
}

/* Плавна прокрутка до якорів */
html {
    scroll-behavior: smooth;
}

/* Адаптивність */
@media (max-width: 768px) {
    .kl-toc {
        padding: 15px !important;
    }
    
    .kl-toc-title {
        font-size: 18px !important;
    }
    
    .kl-toc-list-nested {
        margin-left: 15px !important;
    }
    
    /* Вимикаємо sticky на мобільних */
    .kl-toc-sidebar-wrapper {
        position: static !important;
    }
}

/* ========================================
   FAQ Block Styles
   ======================================== */

.kl-faq-wrapper {
    margin: 40px 0;
    font-family: 'Rubik', sans-serif;
}

.kl-faq-main-title {
    font-family: 'Rubik', sans-serif;
    font-size: 36px;
    font-weight: 700;
    color: #000000;
    text-transform: uppercase;
    margin: 0 0 30px 0;
    padding: 0;
}

.kl-faq-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 668px;
}

.kl-faq-item {
    background: #F5EBDF;
    border: 1px solid #f5ebdf;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}
.kl-faq-item:hover {
    border: 1px solid #9e0909;
}

.kl-faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}
.kl-faq-item-open {
    border: 1px solid #C00500;
    background: #ffffff;
}
.kl-faq-question:hover {
    background: rgb(245 235 223 / 38%);
}

.kl-faq-question-text {
    font-family: 'Rubik', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 160%;
    letter-spacing: 0%;
    color: #000000;
    flex: 1;
    padding-right: 20px;
}

.kl-faq-toggle {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.kl-faq-icon {
    position: relative;
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}
.kl-faq-icon::before, .kl-faq-icon::after {
    content: '';
    position: absolute;
    background: #000000;
    transition: all 0.3s ease;
}
.kl-faq-item-open .kl-faq-icon::before,
.kl-faq-item-open .kl-faq-icon::after {
    content: '';
    position: absolute;
    background: #C00500;
    transition: all 0.3s ease;
}

/* Horizontal line (always visible) */
.kl-faq-icon::before {
    width: 16px;
    height: 2px;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

/* Vertical line (hidden when open) */
.kl-faq-icon::after {
    width: 2px;
    height: 16px;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
}

.kl-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 25px;
}

.kl-faq-answer-content {
    font-family: 'Rubik', sans-serif;
    font-size: 16px;
    font-weight: 300;
    line-height: 160%;
    letter-spacing: 0%;
    color: #000000;
}

.kl-faq-answer-content p {
    margin: 0 0 15px 0;
    font-family: 'Rubik', sans-serif;
    font-size: 16px;
    font-weight: 300;
    line-height: 160%;
}

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

/* Open state */
.kl-faq-item-open .kl-faq-answer {
    max-height: 2000px;
    padding: 0 25px 20px 25px;
}

.kl-faq-item-open .kl-faq-icon::after {
    transform: translateX(-50%) scaleY(0);
    opacity: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .kl-faq-main-title {
        font-size: 28px;
        margin-bottom: 20px;
    }
    
    .kl-faq-question {
        padding: 15px 18px;
    }
    
    .kl-faq-question-text {
        font-size: 15px;
        padding-right: 15px;
    }
    
    .kl-faq-answer {
        padding: 0 18px;
    }
    
    .kl-faq-item-open .kl-faq-answer {
        padding: 0 18px 15px 18px;
    }
}

