/* ==========================================================
   ARTICLE LAYOUT
========================================================== */

.article-layout {
    display: grid;

    grid-template-columns: 260px minmax(0, 850px);

    gap: 160px;

    align-items: start;

    max-width: 1400px;

    margin: 60px auto;

    padding: 0 40px;

    box-sizing: border-box;

    /*
       Normal browser scrolling.
       NO internal scrolling.
    */
    overflow: visible;
}

/* ==========================================================
   TOC
========================================================== */

.article-layout {
    position: relative;
}

.article-layout > .custom-toc {
    width: 260px;
    box-sizing: border-box;

    position: fixed;
    top: 110px;

    z-index: 100;

    background: #fff;

    border: 1px solid #F2E8E3;
    border-radius: 18px;

    padding: 22px;

    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.05);

    /*
       Only animate visibility.
       Do NOT animate top/left/position.
    */
    opacity: 1;
    visibility: visible;

    transition:
        opacity 0.25s ease,
        visibility 0.25s ease;
}


/* ==========================================================
   HIDDEN TOC
========================================================== */

.article-layout > .custom-toc.toc-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}




/* ==========================================================
   LEFT — TOC
========================================================== */

.article-layout > .custom-toc {
    width: 260px;

    position: fixed;

    top: 145px;

    background: #fff;

    border: 1px solid #F2E8E3;

    border-radius: 18px;

    padding: 22px;

    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.05);

    box-sizing: border-box;

    z-index: 100;
}


/* ==========================================================
   RIGHT — ARTICLE
========================================================== */

.article-layout > .com-content-article {
    grid-column: 2;

    width: 100%;

    max-width: 850px;

    min-width: 0;

    margin: 0 !important;

    padding: 0 !important;

    background: none !important;

    border: none !important;

    box-shadow: none !important;

    /*
       NORMAL PAGE SCROLL
    */
    height: auto !important;

    max-height: none !important;

    overflow: visible !important;
}
/* ==========================================================
   TABLE OF CONTENTS
========================================================== */

.custom-toc{

    /*position:sticky;*/
    /*top:110px;*/

    background:#fff;

    border:1px solid #F2E8E3;

    border-radius:18px;

    padding:22px;

    box-shadow:0 12px 35px rgba(0,0,0,.05);

    transition:.3s;
}

.toc-header{

    display:flex;

    justify-content:space-between;

    align-items:center;

    margin-bottom:18px;

    padding-bottom:15px;

    border-bottom:1px solid #EFE7E2;
}

.toc-header span{

    font-size:17px;

    font-weight:700;

    color:#1F1F39;
}

#tocToggle{

    background:none;

    border:none;

    cursor:pointer;

    font-size:18px;

    color:#777;

    transition:.3s;
}

#tocToggle:hover{

    color:#F4A67A;
}

.toc-list{

    list-style:none;

    margin:0;

    padding:0;
}

.toc-list.collapsed{

    display:none;
}

.toc-list li{

    margin:4px 0;
}

.toc-list li.h3{

    padding-left:18px;
}

.toc-list li.h4{

    padding-left:34px;
}

.toc-list a{

    display:flex;

    align-items:flex-start;

    gap:10px;

    padding:10px 12px;

    text-decoration:none;

    color:#1F1F39;

    font-size:14px;

    font-weight:500;

    line-height:1.5;

    border-left:3px solid transparent;

    border-radius:8px;

    transition:all .25s ease;
}

.toc-list a:hover{

    background:#FFF5EF;

    color:#F4A67A;

    border-left-color:#F4A67A;
}

.toc-list a.active{

    background:#FFF5EF;

    color:#F4A67A;

    border-left-color:#F4A67A;

    font-weight:600;
}

.toc-number{

    min-width:18px;

    font-weight:700;

    color:#1F1F39;
}

.toc-list a:hover .toc-number,
.toc-list a.active .toc-number{

    color:#F4A67A;
}

/* ==========================================================
   ARTICLE
========================================================== */

.page-header h1{

    font-size:46px;

    font-weight:700;

    line-height:1.2;

    color:#1F1F39;

    margin-bottom:18px;
}

.article-info{

    font-size:14px;

    color:#8C8C8C;

    margin-bottom:30px;
}

.com-content-article__body{

    font-size:18px;

    color:#3E3E55;

    line-height:1.9;
}

.com-content-article__body h2{

    font-size:34px;

    color:#1F1F39;

    margin-top:55px;

    margin-bottom:18px;

    line-height:1.3;
}

.com-content-article__body h3{

    font-size:28px;

    color:#1F1F39;

    margin-top:45px;

    margin-bottom:15px;
}

.com-content-article__body h4{

    font-size:22px;

    color:#1F1F39;

    margin-top:35px;

    margin-bottom:12px;
}

.com-content-article__body p{

    margin-bottom:22px;
}

.com-content-article__body ul{

    padding-left:24px;

    margin:20px 0;
}

.com-content-article__body li{

    margin-bottom:12px;
}

/* ==========================================================
   IMAGE
========================================================== */

.left.item-image{

    float:none !important;

    width:100%;

    margin:0 0 35px;
}

.left.item-image img{

    width:100%;

    height:auto;

    display:block;

    border-radius:16px;
}

/* ==========================================================
   BACK TO TOP
========================================================== */

#backToTop{

    position:fixed;

    right:35px;

    bottom:35px;

    width:50px;

    height:50px;

    border:none;

    border-radius:50%;

    background:#F4A67A;

    color:#fff;

    cursor:pointer;

    display:none;

    box-shadow:0 10px 20px rgba(0,0,0,.15);

    transition:.3s;

    z-index:9999;
}

#backToTop:hover{

    transform:translateY(-4px);
}

#backToTop.show{

    display:block;
}

/* ==========================================================
   RESPONSIVE
========================================================== */

@media (max-width:992px){

    .article-layout{

        display:block;

        padding:20px;
    }

    .custom-toc{

        position:relative;

        width:100%;

        top:0;

        margin-bottom:30px;
    }

    .article-layout>.com-content-article{

        max-width:100%;
    }

    .page-header h1{

        font-size:34px;
    }

    .com-content-article__body{

        font-size:17px;
    }

    .com-content-article__body h2{

        font-size:28px;
    }

    .com-content-article__body h3{

        font-size:23px;
    }
}

@media (max-width: 992px) {

    .article-layout {
        display: block;

        margin: 30px auto;

        padding: 20px;

        overflow: visible;
    }

    .article-layout > .custom-toc {
        position: relative;

        top: 0;
        left: auto;

        width: 100%;

        margin-bottom: 30px;
    }

    .article-layout > .com-content-article {
        display: block;

        width: 100%;
        max-width: 100%;

        height: auto !important;

        overflow: visible !important;
    }
}
