/* PressFly 3.6.15 — unified responsive spacing system
 * Keeps admin, public news pages and member panels visually separated without
 * changing theme colors or business logic.
 */
:root{
    --pf-space-1:6px;
    --pf-space-2:10px;
    --pf-space-3:14px;
    --pf-space-4:18px;
    --pf-space-5:22px;
    --pf-space-6:28px;
    --pf-page-gutter:clamp(14px,2vw,24px);
    --pf-card-gap:clamp(16px,2vw,22px);
    --pf-section-gap:clamp(18px,2.4vw,28px);
}

/* ---------- Admin panel ---------- */
body.pf-admin-flat .content > .container-fluid,
body.pf-admin-flat .content-header > .container-fluid{
    padding-left:var(--pf-page-gutter)!important;
    padding-right:var(--pf-page-gutter)!important;
}
body.pf-admin-flat .content > .container-fluid{
    padding-bottom:var(--pf-space-6);
}
body.pf-admin-flat .content > .container-fluid > .row{
    row-gap:var(--pf-card-gap);
}
body.pf-admin-flat .content > .container-fluid > .row + .row,
body.pf-admin-flat .content > .container-fluid > .card + .row,
body.pf-admin-flat .content > .container-fluid > .row + .card{
    margin-top:var(--pf-card-gap);
}
body.pf-admin-flat .pf-admin-dashboard{
    display:block;
    width:100%;
}
body.pf-admin-flat .pf-admin-dashboard > .pf-admin-hero{
    margin-bottom:var(--pf-section-gap)!important;
}
body.pf-admin-flat .pf-admin-dashboard > .row{
    row-gap:var(--pf-card-gap)!important;
    margin-bottom:var(--pf-section-gap)!important;
}
body.pf-admin-flat .pf-admin-dashboard > .row:last-of-type{
    margin-bottom:0!important;
}
body.pf-admin-flat .pf-admin-dashboard > .row > [class*="col-"]{
    min-width:0;
}
body.pf-admin-flat .pf-admin-dashboard > .row > [class*="col-"] > .card,
body.pf-admin-flat .pf-admin-dashboard > .row > [class*="col-"] > a.card{
    width:100%;
    margin-bottom:0!important;
}
body.pf-admin-flat .pf-admin-dashboard .pf-admin-stat-grid > [class*="col-"] > .card{
    height:100%;
}
body.pf-admin-flat .pf-admin-dashboard .pf-admin-card .card-body{
    min-width:0;
}
body.pf-admin-flat .pf-admin-dashboard .pf-admin-hero .card-body{
    gap:var(--pf-space-4);
    padding:clamp(18px,2.2vw,26px)!important;
}
body.pf-admin-flat .pf-admin-dashboard .pf-admin-hero form{
    flex:0 1 300px;
    max-width:100%;
}
body.pf-admin-flat .pf-admin-dashboard .pf-admin-hero form .select2,
body.pf-admin-flat .pf-admin-dashboard .pf-admin-hero form .select2-container,
body.pf-admin-flat .pf-admin-dashboard .pf-admin-hero form select{
    width:100%!important;
    max-width:100%!important;
}
body.pf-admin-flat .pf-admin-dashboard .pf-dashboard-map-card{
    margin-top:var(--pf-section-gap)!important;
}
body.pf-admin-flat .pf-admin-page-head,
body.pf-admin-flat .pf-files-hero,
body.pf-admin-flat .pf-settings-hero,
body.pf-admin-flat .pf-settings-command{
    margin-bottom:var(--pf-section-gap)!important;
}
body.pf-admin-flat .pf-admin-stats-row{
    row-gap:var(--pf-space-4)!important;
    margin-bottom:var(--pf-section-gap)!important;
}
body.pf-admin-flat .pf-admin-stats-row > [class*="col-"]{
    margin-bottom:0!important;
}
body.pf-admin-flat .pf-admin-filter-card{
    margin-bottom:var(--pf-space-4)!important;
}
body.pf-admin-flat .card + .card{
    margin-top:var(--pf-card-gap);
}
body.pf-admin-flat .form-row{
    row-gap:var(--pf-space-3);
}
body.pf-admin-flat .card-body > .form-group:last-child,
body.pf-admin-flat .card-body > form > .form-group:last-child{
    margin-bottom:0;
}

/* ---------- Public site / homepage ---------- */
body.homepage .pf-home-flat-main,
body.homepage .pf-home-builder{
    overflow-x:hidden;
}
body.homepage .pf-home-content-shell,
body.homepage .pf-home-builder-shell,
body.homepage .pf-hp-top-space > .container{
    padding-left:var(--pf-page-gutter)!important;
    padding-right:var(--pf-page-gutter)!important;
}
body.homepage .pf-home-builder .pf-hp-hero-with-featured{
    gap:var(--pf-card-gap)!important;
    margin-bottom:var(--pf-section-gap)!important;
}
body.homepage .pf-home-builder .pf-hp-featured-home{
    gap:var(--pf-space-3)!important;
}
body.homepage .pf-home-builder .pf-home-section{
    margin:var(--pf-section-gap) 0!important;
    padding:clamp(16px,2vw,22px)!important;
}
body.homepage .pf-home-builder .pf-home-section:first-of-type{
    margin-top:0!important;
}
body.homepage .pf-home-builder .pf-home-section-head{
    gap:var(--pf-space-3)!important;
    margin-bottom:var(--pf-space-4)!important;
}
body.homepage .pf-home-builder .pf-category-grid-news,
body.homepage .pf-home-builder .pf-category-magazine-news,
body.homepage .pf-home-builder .pf-category-cards-news,
body.homepage .pf-home-builder .pf-category-compact-news,
body.homepage .pf-home-builder .pf-category-spotlight-news,
body.homepage .pf-home-builder .pf-latest-news-grid,
body.homepage .pf-home-builder .pf-latest-news-list{
    gap:var(--pf-space-4)!important;
}
body.homepage .pf-home-builder .pf-news-card,
body.homepage .pf-home-builder .pf-latest-news-item{
    height:100%;
}
body.homepage .pf-home-live-scores-block,
body.homepage [data-home-live-scores-block]{
    margin-top:var(--pf-section-gap)!important;
    margin-bottom:var(--pf-section-gap)!important;
}

/* ---------- Article / news detail ---------- */
body.article-show .article-main-content{
    padding-left:var(--pf-page-gutter)!important;
    padding-right:var(--pf-page-gutter)!important;
}
body.article-show .article-layout-balanced{
    margin-left:calc(var(--pf-space-2) * -1)!important;
    margin-right:calc(var(--pf-space-2) * -1)!important;
    row-gap:var(--pf-card-gap)!important;
}
body.article-show .article-content-column,
body.article-show .article-sidebar-column{
    padding-left:var(--pf-space-2)!important;
    padding-right:var(--pf-space-2)!important;
}
body.article-show .article-content-column > .col-inner{
    padding:clamp(18px,2.2vw,30px)!important;
}
body.article-show .article-sidebar-column .pf-article-sidebar-clean > .widget{
    margin-bottom:var(--pf-space-4)!important;
}
body.article-show .article-sidebar-column .pf-article-sidebar-clean > .widget:last-child{
    margin-bottom:0!important;
}
body.article-show .article-tags,
body.article-show .article-newsletter,
body.article-show .article-comments,
body.article-show .pf-voice-reader,
body.article-show .pf-audio-player,
body.article-show .pf-article-video-player{
    margin-top:var(--pf-space-5)!important;
    margin-bottom:var(--pf-space-5)!important;
}
body.article-show .pf-article-cover-inline{
    margin-top:var(--pf-space-4)!important;
    margin-bottom:var(--pf-space-5)!important;
}

/* ---------- Listing/category/discover pages ---------- */
body.category-show main.pf-listing-flat-wrap,
body.author-show main.pf-author-profile,
body.discover-show main.pf-discover-page,
body.search main.container,
body.tag-show main.pf-listing-flat-wrap{
    padding-left:var(--pf-page-gutter)!important;
    padding-right:var(--pf-page-gutter)!important;
}
.pf-listing-flat-wrap > .row,
.pf-author-profile > .row{
    row-gap:var(--pf-card-gap)!important;
}
.pf-category-grid,
.pf-discover-grid,
.pf-author-articles{
    gap:var(--pf-space-4)!important;
}

/* ---------- Member/user panel ---------- */
body[class*="member-"] .pf-member-layout{
    row-gap:var(--pf-card-gap)!important;
}
body[class*="member-"] .pf-member-content > .row{
    row-gap:var(--pf-card-gap)!important;
}
body[class*="member-"] .pf-member-content .card + .card{
    margin-top:var(--pf-card-gap);
}

@media (max-width:991.98px){
    :root{
        --pf-card-gap:18px;
        --pf-section-gap:22px;
    }
    body.article-show .article-sidebar-column{
        margin-top:0!important;
    }
    body.article-show .article-sidebar-column .pf-article-sidebar-clean{
        padding-top:0!important;
    }
}

@media (max-width:767.98px){
    :root{
        --pf-page-gutter:14px;
        --pf-card-gap:16px;
        --pf-section-gap:20px;
    }
    body.pf-admin-flat .content-header{
        padding-bottom:10px!important;
    }
    body.pf-admin-flat .content > .container-fluid > .row,
    body.pf-admin-flat .pf-admin-dashboard > .row{
        row-gap:16px!important;
    }
    body.pf-admin-flat .pf-admin-dashboard .pf-admin-hero .card-body{
        align-items:stretch!important;
    }
    body.pf-admin-flat .pf-admin-dashboard .pf-admin-hero form{
        width:100%;
        flex-basis:100%;
        margin-top:0!important;
    }
    body.pf-admin-flat .pf-admin-dashboard .pf-admin-card .card-body{
        padding:16px!important;
    }
    body.pf-admin-flat .pf-admin-dashboard .pf-admin-list{
        height:auto;
        max-height:360px;
    }
    body.pf-admin-flat .pf-dashboard-map-wrap{
        gap:16px!important;
        padding:16px!important;
    }
    body.pf-admin-flat .card-header,
    body.pf-admin-flat .pf-admin-card-header{
        padding:15px 16px!important;
    }
    body.homepage .pf-home-content-shell,
    body.homepage .pf-home-builder-shell,
    body.homepage .pf-hp-top-space > .container{
        padding-left:14px!important;
        padding-right:14px!important;
    }
    body.homepage .pf-home-builder .pf-home-section{
        border-radius:20px!important;
        padding:15px!important;
    }
    body.homepage .pf-home-builder .pf-home-section-head{
        align-items:flex-start!important;
        flex-wrap:wrap!important;
        margin-bottom:14px!important;
    }
    body.homepage .pf-home-builder .pf-category-grid-news,
    body.homepage .pf-home-builder .pf-category-magazine-news,
    body.homepage .pf-home-builder .pf-category-cards-news,
    body.homepage .pf-home-builder .pf-category-compact-news,
    body.homepage .pf-home-builder .pf-category-spotlight-news,
    body.homepage .pf-home-builder .pf-latest-news-grid,
    body.homepage .pf-home-builder .pf-latest-news-list{
        gap:12px!important;
    }
    body.article-show .article-main-content{
        padding-left:14px!important;
        padding-right:14px!important;
        padding-top:16px!important;
        padding-bottom:28px!important;
    }
    body.article-show .article-layout-balanced{
        margin-left:0!important;
        margin-right:0!important;
        row-gap:18px!important;
    }
    body.article-show .article-content-column,
    body.article-show .article-sidebar-column{
        padding-left:0!important;
        padding-right:0!important;
    }
    body.article-show .article-content-column > .col-inner{
        padding:16px!important;
    }
    body.article-show .article-sidebar-column .pf-article-sidebar-clean > .widget{
        margin-bottom:16px!important;
    }
    body[class*="member-"] .pf-member-layout,
    body[class*="member-"] .pf-member-content > .row{
        row-gap:16px!important;
    }
}

@media (max-width:575.98px){
    body.homepage .pf-home-builder .pf-latest-news-grid,
    body.homepage .pf-home-builder .pf-latest-news-list{
        gap:12px!important;
    }
    body.homepage .pf-home-builder .pf-news-card-body,
    body.homepage .pf-home-builder .pf-latest-news-body{
        padding:11px!important;
    }
    body.article-show .article-title{
        margin-top:4px!important;
        margin-bottom:14px!important;
    }
}

/* 3.6.17 article-detail stability refinements */
body.article-show{overflow-x:clip}
body.article-show .article-main-content,
body.article-show .article-layout-balanced,
body.article-show .article-content-column,
body.article-show .article-content-column>.col-inner,
body.article-show .article-sidebar-column{min-width:0;max-width:100%}
body.article-show .article-title{overflow-wrap:anywhere;text-wrap:balance}
body.article-show .article-content{min-width:0;max-width:100%;overflow-wrap:anywhere}
body.article-show .article-content img,
body.article-show .article-content video,
body.article-show .article-content iframe,
body.article-show .article-content embed,
body.article-show .article-content object{max-width:100%!important}
body.article-show .article-content table{display:block;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
body.article-show .article-content pre{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
body.article-show .pf-article-author-flat,
body.article-show [data-article-meta-stable]{max-width:100%;box-sizing:border-box}
@media(max-width:575.98px){
    body.article-show .article-title{font-size:clamp(28px,7.8vw,34px)!important;line-height:1.12!important;letter-spacing:-.025em!important}
    body.article-show .article-content-column>.col-inner{border-radius:18px!important}
}
