/* Aggregate page tabs/button overrides */
.aggregate-home .home-comic-categories-bar{display:none !important;}
.agg-show-all-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    background:#d61f1f;
    color:#fff;
    padding:10px 20px;
    border-radius:999px;
    font-weight:700;
    line-height:1.0;
    text-decoration:none;
    border:1px solid #d61f1f;
    transition:background .2s ease, color .2s ease, transform .2s ease;
}
.agg-show-all-btn:hover{
    color:#fff;
    background:#b91818;
    transform:translateY(-1px);
}
.agg-show-all-wrapper{
    display:flex;
    justify-content:center;
    gap:12px;
    margin:10px auto 16px;
}
.agg-show-all-wrapper.top{justify-content:flex-end; margin-top:0; margin-bottom:16px;}
.agg-show-all-wrapper.bottom{justify-content:center; margin-top:24px; margin-bottom:24px;}
/* Hide native ordering/pagination on aggregate page */
.aggregate-home nav.pagination,
.aggregate-home .page-control-bar-bottom,
.aggregate-home .masvideos-result-count,
.aggregate-home .page-numbers,
.aggregate-home .mobile-comic-sort{display:none !important;}
.agg-comic-active #agg-panel-videos{display:none !important;}
.agg-comic-active #agg-panel-comic{display:block !important;}
.aggregate-home .comic-listing-grid{
    padding:0 15px;
    margin-top:10px;
}

/* Hide video action buttons (watch/playlist) on all listings */
.comic__actions{display:none !important;}
.agg-tab-row{
    display:flex;
    justify-content:flex-start;
    align-items:center;
    gap:10px;
    margin:15px 0 10px;
    padding:0;
    width:100%;
}
.agg-tab-container{max-width:100%;margin:0;padding:0 0px;}
.agg-tab{
    appearance:none;
    -webkit-appearance:none;
    border:1px solid #2a2f3a;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:10px 18px;
    min-width:140px;
    border-radius:999px;
    font-weight:700;
    background:#000;
    color:#fff !important;
    text-transform:none;
    transition:background .2s,color .2s,border .2s,transform .2s;
    cursor:pointer;
    text-decoration:none;
}
.agg-tab.is-active{
    background:#d61f1f;
    border-color:#d61f1f;
    color:#fff;
}
.agg-tab:hover{color:#fff;transform:translateY(-1px);}
.agg-panel{display:none !important;width:100%;}
.agg-panel.is-active{display:block !important;}
.agg-panel:not(.is-active){display:none !important;}

/* Header menu icons + labels stay in one line (avoid initial vertical stack) */
.site-header .menu-item > a{
    display:flex !important;
    flex-direction:row !important;
    align-items:center !important;
    gap:6px;
    white-space:nowrap;
}
.site-header .menu-item > a > img,
.site-header .menu-item > a > svg,
.site-header .menu-item > a > i{
    display:inline-block;
    vertical-align:middle;
}

/* Video archive (subsite home) tweaks */
.post-type-archive-comic .mobile-comic-sort{display:none !important;}
.post-type-archive-comic .comics-ordering{display:none !important;}
.post-type-archive-comic .comic-archive-cta{margin:24px 0 12px;}
.post-type-archive-comic .comic-archive-recent-block{margin:28px 0 12px;}
.comic-archive-section-header{margin:0 0 12px;}
.comic-archive-section-title{margin:0;font-size:22px;font-weight:700;color:#fff;}
@media (max-width:768px){
  body.post-type-archive-comic:not(.tag):not(.tax-video_cat):not(.tax-video_tag):not(.taxonomy-video_cat):not(.taxonomy-video_tag) .comic-archive-section-title{
    font-size:18px !important;
    line-height:1.2 !important;
    font-weight:700 !important;
  }
}
.comic-archive-section-separator{border:0;border-bottom:1px solid #2a3040;margin:8px 0 0 0;}

/* Recent comics block: add gap between 2-up thumbnails on mobile */
@media (max-width: 767.98px){
    .comic-archive-recent-block .comic-listing-grid,
    .comic-archive-recent-block .masvideos-comics{
        display: block !important;
    }
    .comic-archive-recent-block .comics__inner{
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 12px !important;
        margin: 0 !important;
    }
    .comic-archive-recent-block .comics__inner > .comic,
    .comic-archive-recent-block .comic-listing-grid .comic{
        flex: 0 0 calc(50% - 6px) !important;
        max-width: calc(50% - 6px) !important;
        width: calc(50% - 6px) !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }
    .comic-archive-recent-block .comic-listing-grid{
        padding: 0 !important;
        margin: 0 !important;
    }
}




/* Comics listing columns */
@media (min-width: 992px){
  .masvideos-comics .comics__inner > .comic,
  .comic-listing-grid .comic{
    flex:0 0 16.6667% !important;
    max-width:16.6667% !important;
  }
}
@media (max-width: 991.98px){
  .masvideos-comics .comics__inner > .comic,
  .comic-listing-grid .comic{
    flex:0 0 50% !important;
    max-width:50% !important;
  }
}

/* Mobile: Popular/Recent pages match homepage spacing + section-title size */
@media (max-width: 768px){
  body.page-template-videos-popular .comics__inner,
  body.page-template-videos-recent .comics__inner,
  body[class*="page-template-comics-popular"] .comics__inner,
  body[class*="page-template-comics-recent"] .comics__inner{
    display:flex !important;
    flex-wrap:wrap !important;
    gap:8px !important;
    margin-left:0 !important;
    margin-right:0 !important;
    width:100% !important;
    max-width:100% !important;
    justify-content:center !important;
  }

  body.page-template-videos-popular .comics__inner > .comic,
  body.page-template-videos-popular .comic-listing-grid .comic,
  body.page-template-videos-recent .comics__inner > .comic,
  body.page-template-videos-recent .comic-listing-grid .comic,
  body[class*="page-template-comics-popular"] .comics__inner > .comic,
  body[class*="page-template-comics-popular"] .comic-listing-grid .comic,
  body[class*="page-template-comics-recent"] .comics__inner > .comic,
  body[class*="page-template-comics-recent"] .comic-listing-grid .comic{
    flex:0 0 calc(50% - 4px) !important;
    max-width:calc(50% - 4px) !important;
    width:calc(50% - 4px) !important;
    padding-left:0 !important;
    padding-right:0 !important;
    margin-bottom:0 !important;
    box-sizing:border-box !important;
  }

  body.page-template-videos-popular .comic-archive-section-title,
  body.page-template-videos-recent .comic-archive-section-title,
  body[class*="page-template-comics-popular"] .comic-archive-section-title,
  body[class*="page-template-comics-recent"] .comic-archive-section-title{
    font-size:18px !important;
    line-height:1.2 !important;
    font-weight:700 !important;
  }
}
