/*===================================================
    Blog details page
    (shared inner-hero styles live in common.css)
===================================================*/

/*===inner hero===*/
.innerHeroSec{
    /*===the last crumb is the article title, which can run to a
         dozen words - cap the crumb column like the other inner
         pages do and clamp the title to two lines===*/
    .breadcrumbList{
        flex-shrink: 0;
        flex-wrap: wrap;
        max-width: 220px;
        white-space: normal;
        li:last-child{
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            width: 100%;
        }
    }
    .innerHeroCont{
        flex: 1;
        .innerHeroSub{
            max-width: 990px;
        }
    }
}

/*===article layout - main content & sidebar===*/
.blogDetailSec{
    .headingWrap{
        .tagHolder{
            max-width: 100%;
        }
    }
    .articleLede{
        max-width: 992px;
        margin: 20px 0 50px;
        color: var(--blue);
        font-size: 24px;
        line-height: 1.5;
        letter-spacing: 0.2px;
    }
    /*===no excerpt, no lede - keep the same breathing room===*/
    .articleLedeGap{
        height: 40px;
    }
    .articleRow{
        display: flex;
        gap: 40px;
        align-items: flex-start;
    }
    /*===main article column===*/
    .articleMain{
        flex: 1;
        min-width: 0;
        .articleImg{
            border-radius: 20px;
            overflow: hidden;
            margin-bottom: 24px;
            img{
                display: block;
                width: 100%;
                height: auto;
            }
            /*===date ribbon pinned to the feature image===*/
            .dateBadge{
                position: absolute;
                left: 18px;
                top: 0;
                display: flex;
                flex-direction: column;
                align-items: center;
                padding: 20px 14px 14px;
                background-color: var(--blue);
                border-radius: 0 0 10px 10px;
                .dateDay{
                    font-size: 30px;
                    font-weight: 700;
                    line-height: 1;
                    color: #fff;
                }
                .dateMonth{
                    margin-top: 4px;
                    padding-bottom: 8px;
                    border-bottom: 1px solid rgb(255 255 255 / 55%);
                    font-size: 18px;
                    color: #fff;
                }
                .dateYear{
                    margin-top: 8px;
                    font-size: 13px;
                    color: rgb(255 255 255 / 88%);
                }
            }
        }
        .blogMeta{
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            margin: 0 0 26px;
            li{
                display: flex;
                align-items: center;
                gap: 7px;
                font-size: 15px;
                letter-spacing: 0.2px;
                color: #1d2a36;
                &:not(:last-child){
                    padding-right: 12px;
                    margin-right: 12px;
                    border-right: 1px solid #c6d4e4;
                }
                i,
                svg{
                    font-size: 14px;
                    width: 1em;
                    height: auto;
                    color: var(--blue);
                    fill: currentColor;
                }
                a{
                    color: inherit;
                    transition: color .3s ease;
                    &:hover{
                        color: var(--blue);
                    }
                }
            }
        }
        .articleBody{
            margin-bottom: 36px;
            p{
                margin: 0 0 18px;
                color: #1d2a36;
                font-size: 18px;
                line-height: 1.5;
                letter-spacing: 0.2px;
            }
            /*===posts pasted from Google Docs arrive as bare text
                 runs split by blank lines, so wpautop wraps them in
                 p tags - but headings come wrapped in <b>. Headings
                 carry their own weight, so the extra bold is neutral===*/
            h2,
            h3,
            h4{
                color: var(--blue);
                font-weight: 700;
                line-height: 1.3;
                b,
                strong{
                    font-weight: inherit;
                }
            }
            h2{
                margin: 40px 0 16px;
                font-size: 28px;
            }
            h3{
                margin: 36px 0 14px;
                font-size: 24px;
            }
            h4{
                margin: 28px 0 12px;
                font-size: 20px;
            }
            > :first-child{
                margin-top: 0;
            }
            strong,
            b{
                font-weight: 700;
            }
            a{
                color: var(--blue);
                text-decoration: underline;
                text-underline-offset: 3px;
                &:hover{
                    color: #0d4d80;
                }
            }
            ul,
            ol{
                margin: 0 0 22px;
                padding: 22px 26px 14px 46px;
                background-color: #f3f7fb;
                border-left: 3px solid var(--blue);
                border-radius: 0 12px 12px 0;
                li{
                    margin-bottom: 8px;
                    padding-left: 4px;
                    color: #1d2a36;
                    font-size: 18px;
                    line-height: 1.6;
                    letter-spacing: 0.2px;
                    &::marker{
                        color: var(--blue);
                        font-weight: 700;
                    }
                }
            }
            ul li{
                list-style: disc;
            }
            ol li{
                list-style: decimal;
            }
            blockquote{
                margin: 30px 0;
                padding: 24px 30px;
                border-left: 4px solid var(--blue);
                background-color: #f3f7fb;
                border-radius: 0 12px 12px 0;
                p{
                    margin: 0;
                    font-size: 21px;
                    font-style: italic;
                    color: var(--blue);
                }
            }
            figure{
                margin: 30px 0;
                figcaption{
                    margin-top: 10px;
                    font-size: 14px;
                    color: #6f7d8a;
                    text-align: center;
                }
            }
            .alignleft{
                float: left;
                margin: 6px 24px 16px 0;
            }
            .alignright{
                float: right;
                margin: 6px 0 16px 24px;
            }
            .aligncenter{
                display: block;
                margin-left: auto;
                margin-right: auto;
            }
            &::after{
                content: "";
                display: table;
                clear: both;
            }
            /*===the body is editor output, so it can hold anything the
                 author pasted. These keep a wide embed, table or link
                 inside the column on a phone instead of stretching the
                 page - the rest of the article styling is unaffected===*/
            img{
                height: auto;
                border-radius: 12px;
            }
            iframe,
            video,
            embed,
            object{
                display: block;
                max-width: 100%;
                border: 0;
            }
            /*===a table cannot reflow, so give it its own scroller===*/
            table{
                display: block;
                width: 100%;
                overflow-x: auto;
                border-collapse: collapse;
            }
            pre{
                overflow-x: auto;
            }
            /*===an unbroken URL is the usual culprit===*/
            p,
            li,
            h2,
            h3,
            h4{
                overflow-wrap: break-word;
            }
        }
        /*===tags, share row and prev/next===*/
        .articleTags{
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin: 0 0 30px;
            li a{
                display: inline-block;
                padding: 8px 18px;
                font-size: 14px;
                color: var(--blue);
                border: 1px solid #c6d4e4;
                border-radius: 92px;
                transition: all .3s ease;
                &:hover{
                    background-color: var(--blue);
                    border-color: var(--blue);
                    color: #fff;
                }
            }
        }
        .articleShare{
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 16px;
            padding: 22px 0;
            border-top: 1px solid #dfe6ee;
            border-bottom: 1px solid #dfe6ee;
            .articleShareLabel{
                font-size: 16px;
                font-weight: 600;
                color: var(--blue);
            }
            ul{
                display: flex;
                gap: 10px;
                margin: 0;
                li a{
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    width: 40px;
                    height: 40px;
                    border-radius: 50%;
                    border: 1px solid #c6d4e4;
                    color: var(--blue);
                    transition: all .3s ease;
                    i,
                    svg{
                        font-size: 15px;
                        width: 1em;
                        height: auto;
                        fill: currentColor;
                    }
                    &:hover{
                        background-color: var(--blue);
                        border-color: var(--blue);
                        color: #fff;
                    }
                }
            }
        }
        .articleNav{
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
            margin-top: 30px;
            .articleNavLink{
                display: flex;
                flex-direction: column;
                gap: 8px;
                padding: 20px 22px;
                border: 1px solid #dfe6ee;
                border-radius: 14px;
                transition: border-color .3s ease, box-shadow .3s ease;
                &.next{
                    grid-column: 2;
                    text-align: right;
                    .articleNavDir{
                        justify-content: flex-end;
                    }
                }
                .articleNavDir{
                    display: flex;
                    align-items: center;
                    gap: 8px;
                    font-size: 13px;
                    font-weight: 600;
                    letter-spacing: 0.6px;
                    text-transform: uppercase;
                    color: #6f7d8a;
                    i,
                    svg{
                        font-size: 12px;
                        width: 1em;
                        height: auto;
                        color: var(--blue);
                        fill: currentColor;
                    }
                }
                .articleNavTitle{
                    font-size: 17px;
                    font-weight: 600;
                    line-height: 1.4;
                    color: var(--blue);
                }
                &:hover{
                    border-color: var(--blue);
                    box-shadow: 0 14px 30px rgb(11 51 85 / 10%);
                }
            }
        }
    }
    /*===sidebar===*/
    .articleSidebar{
        flex-shrink: 0;
        width: 315px;
        position: sticky;
        top: 110px;
        .sidebarCard{
            padding: 24px 22px;
            margin-bottom: 26px;
            border: 1px solid #dfe6ee;
            border-radius: 14px;
            &:last-child{
                margin-bottom: 0;
            }
            .sidebarTitle{
                display: block;
                font-size: 20px;
                font-weight: 700;
                color: var(--blue);
                margin-bottom: 18px;
            }
            .sidebarList{
                margin: 0;
                li{
                    display: flex;
                    align-items: center;
                    justify-content: space-between;
                    padding: 13px 0;
                    border-bottom: 1px solid #e3eaf2;
                    &:last-child{
                        border-bottom: 0;
                        padding-bottom: 0;
                    }
                    &:first-child{
                        padding-top: 0;
                    }
                    a{
                        font-size: 15px;
                        letter-spacing: 0.2px;
                        color: #1d2a36;
                        transition: color .3s ease;
                        &:hover{
                            color: var(--blue);
                        }
                    }
                    span{
                        font-size: 14px;
                        color: #6f7d8a;
                    }
                }
            }
            /*===recent articles - thumb + title===*/
            .recentList{
                margin: 0;
                li{
                    padding: 14px 0;
                    border-bottom: 1px solid #e3eaf2;
                    &:first-child{
                        padding-top: 0;
                    }
                    &:last-child{
                        padding-bottom: 0;
                        border-bottom: 0;
                    }
                    a{
                        display: flex;
                        align-items: flex-start;
                        gap: 14px;
                        &:hover .recentTitle{
                            color: var(--blue);
                        }
                        &:hover .recentImg img{
                            transform: scale(1.08);
                        }
                    }
                    .recentImg{
                        flex-shrink: 0;
                        width: 72px;
                        height: 64px;
                        border-radius: 10px;
                        overflow: hidden;
                        img{
                            width: 100%;
                            height: 100%;
                            object-fit: cover;
                            transition: transform .5s ease;
                        }
                    }
                    .recentText{
                        display: flex;
                        flex-direction: column;
                        gap: 6px;
                        min-width: 0;
                    }
                    .recentTitle{
                        display: -webkit-box;
                        -webkit-line-clamp: 2;
                        -webkit-box-orient: vertical;
                        overflow: hidden;
                        font-size: 15px;
                        font-weight: 600;
                        line-height: 1.4;
                        color: #1d2a36;
                        transition: color .3s ease;
                    }
                    .recentDate{
                        font-size: 13px;
                        color: #6f7d8a;
                    }
                }
            }
            /*===search field===*/
            .sidebarSearch{
                display: flex;
                align-items: center;
                gap: 12px;
                input{
                    flex: 1;
                    min-width: 0;
                    padding: 8px 0;
                    font-size: 15px;
                    font-family: inherit;
                    color: #1d2a36;
                    background-color: transparent;
                    border-bottom: 1px solid #b9cede;
                    &::placeholder{
                        color: #6f7d8a;
                    }
                    &:focus{
                        border-bottom-color: var(--blue);
                    }
                }
                button{
                    flex-shrink: 0;
                    background-color: transparent;
                    cursor: pointer;
                    i,
                    svg{
                        font-size: 18px;
                        width: 1em;
                        height: auto;
                        color: var(--blue);
                        fill: currentColor;
                    }
                }
            }
        }
    }
}
@media (max-width: 991px){
    .blogDetailSec{
        .articleRow{
            flex-direction: column;
        }
        /*===align-items on the row is flex-start, so once the row
             stacks the article column sizes itself to its widest
             content - a pasted table would stretch it past the
             screen. The sidebar already claims the full width;
             the article needs to as well===*/
        .articleMain{
            width: 100%;
        }
        .articleSidebar{
            position: static;
            width: 100%;
        }
        .articleMain{
            .articleImg img{
                height: 300px;
            }
        }
    }
}
@media (max-width: 767px){
    .blogDetailSec{
        .articleMain{
            .articleImg img{
                height: 220px;
            }
            .articleImg .dateBadge{
                padding: 12px 10px 10px;
                .dateDay{
                    font-size: 22px;
                }
                .dateMonth{
                    font-size: 14px;
                }
            }
        }
    }
}

/*===keep reading - card styles mirror blog-listing.css, which is not
     loaded on this page===*/
.relatedSec{
    background-color: #f3f7fb;
    .relatedHead{
        display: flex;
        flex-wrap: wrap;
        align-items: flex-end;
        justify-content: space-between;
        gap: 20px;
        margin-bottom: 40px;
    }
    .row{
        row-gap: 40px;
    }
    .blogCard{
        display: flex;
        flex-direction: column;
        height: 100%;
        .blogImg{
            display: block;
            border-radius: 20px;
            overflow: hidden;
            margin-bottom: 20px;
            img{
                width: 100%;
                height: 280px;
                object-fit: cover;
                transition: transform .5s ease;
            }
            &:hover img{
                transform: scale(1.06);
            }
        }
        .blogMeta{
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            margin: 0 0 12px;
            li{
                display: flex;
                align-items: center;
                gap: 7px;
                font-size: 13px;
                letter-spacing: 0.2px;
                color: #1d2a36;
                &:not(:last-child){
                    padding-right: 12px;
                    margin-right: 12px;
                    border-right: 1px solid #c6d4e4;
                }
                i,
                svg{
                    font-size: 14px;
                    width: 1em;
                    height: auto;
                    color: var(--blue);
                    fill: currentColor;
                }
            }
        }
        .blogTitle{
            display: block;
            margin-bottom: 18px;
            font-size: 21px;
            font-weight: 600;
            line-height: 1.35;
            color: var(--blue);
            transition: color .3s ease;
            &:hover{
                color: #0d4d80;
            }
        }
        .blogMore{
            display: inline-flex;
            align-items: center;
            gap: 12px;
            margin-top: auto;
            font-size: 15px;
            font-weight: 600;
            color: #1d2a36;
            .moreArrow{
                display: inline-flex;
                align-items: center;
                justify-content: center;
                width: 32px;
                height: 32px;
                border-radius: 50%;
                background-color: var(--blue);
                transition: transform .3s ease;
                i,
                svg{
                    font-size: 12px;
                    width: 1em;
                    height: auto;
                    color: #fff;
                    fill: currentColor;
                    transform: rotate(-45deg);
                    transition: transform .3s ease;
                }
            }
            &:hover{
                color: var(--blue);
                .moreArrow{
                    transform: translateX(4px);
                    i,
                    svg{
                        transform: rotate(0deg);
                    }
                }
            }
        }
    }
}
@media (max-width: 767px){
    .blogDetailSec{
        .articleBody{
            h2{
                font-size: 23px;
            }
            h3{
                font-size: 20px;
            }
            ul,
            ol{
                padding: 18px 16px 10px 36px;
            }
            p,
            ul li,
            ol li{
                font-size: 16px;
            }
        }
        .articleNav{
            grid-template-columns: 1fr;
            .articleNavLink.next{
                grid-column: auto;
            }
        }
    }
    .relatedSec .blogCard .blogImg img{
        height: 220px;
    }
}
