/*
====================================
MODERN BLOG SYSTEM
ASTRA CHILD THEME
====================================
*/


/*==================================
VARIABLES
==================================*/

:root{

    --mb-bg:#f7f8fb;

    --mb-card:#ffffff;

    --mb-text:#1f2937;

    --mb-muted:#6b7280;

    --mb-primary:#2563eb;

    --mb-border:#e5e7eb;

    --mb-radius:18px;

    --mb-shadow:0 15px 40px rgba(0,0,0,.08);

    --mb-container:1280px;

    --mb-reading:820px;

}



/*==================================
ASTRA RESET
==================================*/


.modern-blog .ast-container{

    max-width:100%;

    padding:0;

}


.modern-blog .site-content{

    padding:0;

}


.modern-blog #primary{

    width:100%;

    margin:0;

}


.modern-blog #secondary{

    display:none;

}


.modern-blog .ast-article-single{

    padding:0;

    margin:0;

}


.modern-blog .entry-content{

    margin:0;

}



/*==================================
GLOBAL BLOG WRAPPER
==================================*/


.modern-blog{

    width:100%;

    background:var(--mb-bg);

}


.modern-container{

    width:min(var(--mb-container),92%);

    margin:auto;

    display:grid;

    grid-template-columns:300px minmax(0,1fr);

    gap:50px;

    align-items:start;

}


.modern-main{

    min-width:0;

}

/*==================================
HERO
==================================*/


.modern-hero{

    width:100%;

    position:relative;

    overflow:hidden;

}


.modern-hero-bg{

    min-height:680px;

    width:100%;

    background-size:cover;

    background-position:center;

    background-repeat:no-repeat;

    position:relative;

    display:flex;

    align-items:center;

    animation:mbHeroZoom 12s ease-out forwards;

    transform:scale(1.05);

}


.modern-hero-mask{

    position:absolute;

    inset:0;

    background:linear-gradient(
        180deg,
        rgba(0,0,0,.25),
        rgba(0,0,0,.70)
    );

}


.modern-hero-overlay{

    position:relative;

    z-index:2;

    width:100%;

    min-height:680px;

    display:flex;

    align-items:center;

}


.modern-hero-container{

    width:min(var(--mb-container),92%);

    margin:auto;

    color:#fff;

}


.modern-breadcrumbs{

    margin-bottom:20px;

    font-size:14px;

    color:rgba(255,255,255,.85);

}


.modern-breadcrumbs a{

    color:#fff;

    text-decoration:none;

}


.modern-category{

    display:inline-block;

    padding:8px 16px;

    background:rgba(255,255,255,.15);

    backdrop-filter:blur(8px);

    border-radius:999px;

    font-size:14px;

    margin-bottom:20px;

}


.modern-title{

    max-width:950px;

    margin:15px 0 25px;

    color:#fff;

    font-size:clamp(42px,6vw,76px);

    line-height:1.08;

    font-weight:800;

    letter-spacing:-1px;

}


.modern-meta{

    display:flex;

    align-items:center;

    flex-wrap:wrap;

    gap:12px;

    color:rgba(255,255,255,.9);

    font-size:15px;

}


.modern-separator{

    opacity:.7;

}



/*==================================
HERO ANIMATION
==================================*/


@keyframes mbHeroZoom{

    from{

        transform:scale(1.08);

    }

    to{

        transform:scale(1);

    }

}

/*==================================
BLOG LAYOUT
==================================*/


.modern-container{

    width:min(var(--mb-container),92%);

    margin:60px auto;

    display:grid;

    grid-template-columns:300px minmax(0,1fr);

    gap:50px;

    align-items:start;

}



/*==================================
TOC COLUMN
==================================*/


.modern-sidebar{

    position:relative;

}


.modern-toc{

    position:sticky;

    top:100px;

}


.modern-toc-card{

    background:var(--mb-card);

    border:1px solid var(--mb-border);

    border-radius:var(--mb-radius);

    padding:25px;

    box-shadow:var(--mb-shadow);

}


.modern-toc-heading{

    margin:0 0 20px;

    font-size:22px;

    color:var(--mb-text);

}



/*==================================
EZ TOC CLEANUP
==================================*/


.modern-toc .ez-toc-container{

    width:100%;

    padding:0;

    border:0;

    background:none;

}


.modern-toc .ez-toc-title-container{

    display:none;

}


.modern-toc ul{

    margin:0;

    padding-left:18px;

}


.modern-toc li{

    margin:10px 0;

}


.modern-toc a{

    color:var(--mb-text);

    text-decoration:none;

    font-size:15px;

    line-height:1.5;

    transition:.25s;

}


.modern-toc a:hover{

    color:var(--mb-primary);

}



/*==================================
ARTICLE CARD
==================================*/


.modern-article{

    background:var(--mb-card);

    border-radius:var(--mb-radius);

    padding:55px;

    box-shadow:var(--mb-shadow);

}


.modern-article-content{

    max-width:var(--mb-reading);

    margin:auto;

    color:var(--mb-text);

}



/*==================================
RESPONSIVE TABLET
==================================*/


@media(max-width:1000px){


    .modern-container{

        grid-template-columns:1fr;

        gap:30px;

    }


    .modern-sidebar{

        order:2;

    }


    .modern-main{

        order:1;

    }


    .modern-toc{

        position:static;

    }

}

/*==================================
ARTICLE TYPOGRAPHY
==================================*/


.modern-article-content{

    font-size:18px;

    line-height:1.85;

}


.modern-article-content p{

    margin:0 0 28px;

    color:var(--mb-text);

}



/*==================================
HEADINGS
==================================*/


.modern-article-content h2{

    margin:70px 0 25px;

    font-size:clamp(32px,4vw,44px);

    line-height:1.2;

    color:var(--mb-text);

    letter-spacing:-.5px;

    scroll-margin-top:120px;

}


.modern-article-content h3{

    margin:55px 0 20px;

    font-size:clamp(26px,3vw,34px);

    line-height:1.3;

    color:var(--mb-text);

    scroll-margin-top:120px;

}


.modern-article-content h4{

    margin:40px 0 18px;

    font-size:26px;

    line-height:1.35;

    color:var(--mb-text);

    scroll-margin-top:120px;

}


.modern-article-content h5,
.modern-article-content h6{

    margin:30px 0 15px;

    color:var(--mb-text);

}



/*==================================
LINKS
==================================*/


.modern-article-content a{

    color:var(--mb-primary);

    text-decoration:none;

    position:relative;

}


.modern-article-content a::after{

    content:"";

    position:absolute;

    left:0;

    bottom:-3px;

    height:2px;

    width:0;

    background:var(--mb-primary);

    transition:.25s;

}


.modern-article-content a:hover::after{

    width:100%;

}



/*==================================
LISTS
==================================*/


.modern-article-content ul,
.modern-article-content ol{

    margin:30px 0;

    padding-left:35px;

}


.modern-article-content li{

    margin:12px 0;

}



/*==================================
IMAGES
==================================*/


.modern-article-content img{

    width:100%;

    height:auto;

    display:block;

    border-radius:16px;

    margin:40px auto;

    transition:.35s;

}


.modern-article-content img:hover{

    transform:scale(1.015);

}


.modern-article-content figure{

    margin:45px 0;

}


.modern-article-content figcaption{

    margin-top:12px;

    text-align:center;

    font-size:14px;

    color:var(--mb-muted);

}



/*==================================
BLOCKQUOTE
==================================*/


.modern-article-content blockquote{

    margin:45px 0;

    padding:25px 35px;

    border-left:5px solid var(--mb-primary);

    background:#f8fafc;

    border-radius:12px;

    font-size:20px;

    font-style:italic;

}


.modern-article-content blockquote p{

    margin:0;

}



/*==================================
TABLES
==================================*/


.modern-article-content table{

    width:100%;

    border-collapse:collapse;

    margin:40px 0;

    overflow:hidden;

}


.modern-article-content th{

    background:var(--mb-primary);

    color:white;

    padding:15px;

    text-align:left;

}


.modern-article-content td{

    padding:15px;

    border:1px solid var(--mb-border);

}


.modern-article-content tr:nth-child(even){

    background:#f9fafb;

}



/*==================================
CODE BLOCKS
==================================*/


.modern-article-content pre{

    background:#111827;

    color:#f9fafb;

    padding:25px;

    border-radius:14px;

    overflow:auto;

    margin:40px 0;

}


.modern-article-content code{

    font-family:
    Consolas,
    Monaco,
    monospace;

    font-size:15px;

}

/*==================================
TAGS
==================================*/


.modern-tags{

    margin-top:50px;

    padding-top:30px;

    border-top:1px solid var(--mb-border);

}


.modern-tags-title{

    font-weight:700;

    margin-bottom:15px;

    color:var(--mb-text);

}


.modern-tags a{

    display:inline-block;

    margin:5px;

    padding:8px 16px;

    background:#eff6ff;

    color:var(--mb-primary);

    border-radius:999px;

    text-decoration:none;

    font-size:14px;

    transition:.25s;

}


.modern-tags a:hover{

    background:var(--mb-primary);

    color:#fff;

}



/*==================================
PAGINATION
==================================*/


.modern-pagination{

    margin:50px 0;

    text-align:center;

}


.modern-pagination a,
.modern-pagination span{

    display:inline-block;

    padding:10px 18px;

    margin:5px;

    border:1px solid var(--mb-border);

    border-radius:10px;

    text-decoration:none;

    color:var(--mb-text);

}



/*==================================
GUTENBERG BUTTONS
==================================*/


.wp-block-button__link{

    border-radius:999px;

    padding:14px 28px;

    transition:.3s;

}


.wp-block-button__link:hover{

    transform:translateY(-3px);

}



/*==================================
READING PROGRESS
==================================*/


.reading-progress{

    position:fixed;

    top:0;

    left:0;

    width:0;

    height:4px;

    background:var(--mb-primary);

    z-index:999999;

}



/*==================================
BACK TO TOP
==================================*/


.back-top{

    position:fixed;

    right:30px;

    bottom:30px;

    width:52px;

    height:52px;

    border-radius:50%;

    border:none;

    background:var(--mb-primary);

    color:#fff;

    font-size:22px;

    cursor:pointer;

    opacity:0;

    visibility:hidden;

    transform:translateY(20px);

    transition:.3s;

    z-index:999;

}


.back-top.show{

    opacity:1;

    visibility:visible;

    transform:none;

}


.back-top:hover{

    transform:translateY(-5px);

}



/*==================================
TEXT SELECTION
==================================*/


::selection{

    background:var(--mb-primary);

    color:#fff;

}



/*==================================
ARTICLE ANIMATION
==================================*/


.modern-article{

    animation:mbFadeUp .7s ease;

}


@keyframes mbFadeUp{

    from{

        opacity:0;

        transform:translateY(25px);

    }

    to{

        opacity:1;

        transform:none;

    }

}

/*==================================
RESPONSIVE TABLET
==================================*/


@media(max-width:1000px){


    .modern-container{

        width:92%;

        grid-template-columns:1fr;

        gap:35px;

    }


    .modern-sidebar{

        order:2;

    }


    .modern-main{

        order:1;

    }


    .modern-toc{

        position:static;

    }


    .modern-article{

        padding:40px;

    }


    .modern-title{

        font-size:clamp(38px,6vw,58px);

    }


}



/*==================================
RESPONSIVE MOBILE
==================================*/


@media(max-width:768px){


    .modern-hero-bg{

        min-height:520px;

    }


    .modern-hero-overlay{

        min-height:520px;

    }


    .modern-hero-container{

        width:90%;

    }


    .modern-category{

        font-size:13px;

        padding:7px 14px;

    }


    .modern-title{

        font-size:38px;

        line-height:1.15;

        letter-spacing:-.5px;

    }


    .modern-meta{

        font-size:14px;

        gap:8px;

    }


    .modern-container{

        width:94%;

        margin:35px auto;

    }


    .modern-article{

        padding:28px 22px;

        border-radius:14px;

    }


    .modern-article-content{

        font-size:17px;

        line-height:1.75;

    }


    .modern-article-content h2{

        font-size:32px;

        margin-top:55px;

    }


    .modern-article-content h3{

        font-size:26px;

    }


    .modern-article-content h4{

        font-size:22px;

    }


    .modern-toc-card{

        padding:20px;

    }


    .modern-toc-heading{

        font-size:20px;

    }


}



/*==================================
SMALL MOBILE
==================================*/


@media(max-width:480px){


    .modern-hero-bg{

        min-height:460px;

    }


    .modern-hero-overlay{

        min-height:460px;

    }


    .modern-title{

        font-size:32px;

    }


    .modern-meta{

        flex-direction:column;

        align-items:flex-start;

    }


    .modern-separator{

        display:none;

    }


    .modern-article{

        padding:22px 18px;

    }


    .modern-article-content img{

        border-radius:12px;

    }


    .back-top{

        width:46px;

        height:46px;

        right:18px;

        bottom:18px;

    }


}

/*==================================
JS ANIMATIONS
==================================*/


.reveal{

    opacity:0;

    transform:translateY(30px);

    transition:.7s ease;

}


.reveal.visible{

    opacity:1;

    transform:none;

}


.modern-toc a.active{

    color:var(--mb-primary);

    font-weight:700;

}

/*==================================
AUTHOR BOX
==================================*/


.modern-author-box{

    margin-top:50px;

    padding:35px;

    background:var(--mb-card);

    border-radius:var(--mb-radius);

    box-shadow:var(--mb-shadow);

}


.modern-author-inner{

    display:flex;

    align-items:center;

    gap:30px;

}


.modern-author-avatar img{

    width:120px;

    height:120px;

    border-radius:50%;

}


.modern-author-name{

    margin:0 0 12px;

    font-size:26px;

    color:var(--mb-text);

}


.modern-author-description{

    margin:0 0 15px;

    color:var(--mb-muted);

    line-height:1.7;

}


.modern-author-link{

    color:var(--mb-primary);

    text-decoration:none;

    font-weight:600;

}



@media(max-width:768px){


.modern-author-inner{

    flex-direction:column;

    text-align:center;

}


}

/*==================================
SHARE
==================================*/


.modern-share{

    margin-top:40px;

    padding:35px;

    background:var(--mb-card);

    border-radius:var(--mb-radius);

    box-shadow:var(--mb-shadow);

}


.modern-share-title{

    margin:0 0 20px;

    font-size:24px;

    color:var(--mb-text);

}



.modern-share-buttons{

    display:flex;

    flex-wrap:wrap;

    gap:12px;

}



.modern-share-btn{

    display:inline-flex;

    align-items:center;

    justify-content:center;

    padding:12px 20px;

    border-radius:999px;

    border:1px solid var(--mb-border);

    background:#fff;

    color:var(--mb-text);

    text-decoration:none;

    font-size:15px;

    cursor:pointer;

    transition:.25s;

}



.modern-share-btn:hover{

    transform:translateY(-3px);

    background:var(--mb-primary);

    color:#fff;

    border-color:var(--mb-primary);

}



@media(max-width:600px){


.modern-share-buttons{

    flex-direction:column;

}


.modern-share-btn{

    width:100%;

}


}

/*==================================
RELATED POSTS
==================================*/


.modern-related{

    margin-top:50px;

}


.modern-related-title{

    margin-bottom:30px;

    font-size:32px;

    color:var(--mb-text);

}



.modern-related-grid{

    display:grid;

    grid-template-columns:repeat(3,1fr);

    gap:25px;

}



.modern-related-card{

    background:var(--mb-card);

    border-radius:var(--mb-radius);

    overflow:hidden;

    box-shadow:var(--mb-shadow);

    transition:.3s;

}



.modern-related-card:hover{

    transform:translateY(-6px);

}



.modern-related-image img{

    width:100%;

    height:220px;

    object-fit:cover;

    display:block;

}



.modern-related-content{

    padding:22px;

}



.modern-related-date{

    font-size:14px;

    color:var(--mb-muted);

    margin-bottom:10px;

}



.modern-related-content h3{

    margin:0;

    font-size:22px;

    line-height:1.3;

}



.modern-related-content h3 a{

    color:var(--mb-text);

    text-decoration:none;

}



@media(max-width:900px){


.modern-related-grid{

    grid-template-columns:1fr 1fr;

}


}



@media(max-width:600px){


.modern-related-grid{

    grid-template-columns:1fr;

}


}

/*==================================
ASTRA CONFLICT PROTECTION
==================================*/


body.modern-blog-enabled .site-content{

    padding:0;

}


body.modern-blog-enabled .ast-container{

    max-width:none;

    width:100%;

    padding-left:0;

    padding-right:0;

}


body.modern-blog-enabled .content-area{

    width:100%;

}


body.modern-blog-enabled article{

    margin:0;

}