/**
 * Table of Contents Styles
 * Save as: /css/divi-toc.css in your child theme
 */


/* TOC Container */
.divi-toc-container {
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease;
}

.divi-toc-container:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* TOC Title */
.divi-toc-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #2b2b2b !important;
    margin: 0 0 18px 0 !important;
    padding-bottom: 15px !important;
    border-bottom: 2px solid #f0f0f0 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* TOC Navigation */
.divi-toc-nav {
    margin: 0;
}

/* TOC List */

.divi-toc-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.divi-toc-list li {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.divi-toc-list li:before {
    content: none !important;
}

/* TOC Links */
.divi-toc-link {
    display: block;
    padding: 10px 15px;
    color: #7a7a7a !important;
    text-decoration: none !important;
    font-size: 14px;
    line-height: 1.6;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
    border-radius: 4px;
    font-weight: 400 !important;
}

.divi-toc-link:hover {
    color: #2ea3f2 !important;
    background: #f7fbfe;
    border-left-color: #2ea3f2;
    padding-left: 18px;
}

/* Active Link - Highlighted when section is in view */
.divi-toc-link.active {
    color: #2c7ec7 !important;
    background: #e3f2fd;
    border-left-color: #2c7ec7;
    font-weight: 600 !important;
    padding-left: 18px;
}

/* H2 Level (Main headings) */
.divi-toc-h2 {
    margin-top: 8px;
}

.divi-toc-h2 .divi-toc-link {
    font-weight: 500 !important;
    padding-left: 15px;
    font-size: 14px;
}

/* H3 Level (Sub-headings) */
.divi-toc-h3 {
    margin-top: 4px;
}

.divi-toc-h3 .divi-toc-link {
    font-size: 13px;
    padding-left: 30px;
    color: #999999 !important;
}

.divi-toc-h3 .divi-toc-link:hover {
    color: #2ea3f2 !important;
    padding-left: 33px;
}

.divi-toc-h3 .divi-toc-link.active {
    color: #2c7ec7 !important;
    padding-left: 33px;
}

/* Custom Scrollbar */
.divi-toc-wrapper::-webkit-scrollbar {
    width: 6px;
}

.divi-toc-wrapper::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 10px;
}

.divi-toc-wrapper::-webkit-scrollbar-thumb {
    background: #cccccc;
    border-radius: 10px;
}

.divi-toc-wrapper::-webkit-scrollbar-thumb:hover {
    background: #999999;
}

/* Responsive Design */
@media (max-width: 980px) {
    /* Divi's tablet breakpoint */
    .divi-toc-wrapper {
        position: relative;
        top: 0;
        max-height: none;
        margin-bottom: 40px;
    }
}

@media (max-width: 767px) {
    /* Mobile */
    .divi-toc-container {
        padding: 20px;
    }
    
    .divi-toc-title {
        font-size: 16px !important;
    }
    
    .divi-toc-link {
        font-size: 13px;
        padding: 8px 12px;
    }
    
    .divi-toc-h3 .divi-toc-link {
        padding-left: 24px;
        font-size: 12px;
    }
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}