/*
Theme Name: Newpress child
Theme URI:http://wordpress.zcube.in/bsupp
Description: Newpress - Blog Magazine WordPress Child Theme.
Text Domain: newpress
Author:       zcube
Author URI: https://www.templatemonster.com/authors/zcube/
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
Template:     newpress
Version:      1.6

*/


/* Theme customization starts here
  -------------------------------------------------------------- */

/* ==========================================================================
   Startup Pakistan style Category Page (category.php)
   Scoped under .sp-category-page so it never leaks into other templates.
   ========================================================================== */

.sp-category-page { padding-top: 60px; padding-bottom: 70px; }

/* Breadcrumb */
.sp-category-page .sp-breadcrumb {
    font-size: 13px;
    color: #888;
    margin-bottom: 14px;
}
.sp-category-page .sp-breadcrumb a { color: #888; text-decoration: none; }
.sp-category-page .sp-breadcrumb a:hover { color: #e02b2b; }
.sp-category-page .sp-breadcrumb-sep { margin: 0 6px; }
.sp-category-page .sp-breadcrumb-current { color: #222; font-weight: 500; }

/* Page title */
.sp-category-page .sp-cat-title {
    font-size: 30px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 18px;
    padding-bottom: 12px;
    border-bottom: 3px solid #e02b2b;
    display: inline-block;
}

/* Sub-category pill row */
.sp-category-page .sp-cat-pills {
    list-style: none;
    margin: 0 0 30px;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.sp-category-page .sp-cat-pills li { margin: 0; }
.sp-category-page .sp-cat-pills a {
    display: inline-block;
    padding: 6px 16px;
    background: #f4f4f4;
    color: #333;
    font-size: 13px;
    font-weight: 600;
    border-radius: 30px;
    text-decoration: none;
    transition: background .2s ease, color .2s ease;
}
.sp-category-page .sp-cat-pills a:hover { background: #e02b2b; color: #fff; }

/* Main post rows */
.sp-category-page .sp-post-list { display: flex; flex-direction: column; }

.sp-category-page .sp-post-row {
    display: flex;
    gap: 22px;
    padding-bottom: 26px;
    margin-bottom: 26px;
    border-bottom: 1px solid #eee;
}
.sp-category-page .sp-post-row:last-child { border-bottom: none; }

.sp-category-page .sp-post-thumb {
    flex: 0 0 260px;
    max-width: 260px;
    display: block;
    overflow: hidden;
    border-radius: 6px;
    background: #eee;
    aspect-ratio: 4 / 3;
}
.sp-category-page .sp-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}
.sp-category-page .sp-post-row:hover .sp-post-thumb img { transform: scale(1.06); }
.sp-category-page .sp-post-thumb--empty { background: #eee; }

.sp-category-page .sp-post-body { flex: 1; min-width: 0; }

.sp-category-page .sp-post-cat {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    background: #e02b2b;
    padding: 3px 10px;
    border-radius: 3px;
    margin-bottom: 10px;
    text-decoration: none;
}

.sp-category-page .sp-post-title {
    font-size: 21px;
    line-height: 1.35;
    font-weight: 700;
    margin: 0 0 10px;
}
.sp-category-page .sp-post-title a { color: #1a1a1a; text-decoration: none; }
.sp-category-page .sp-post-title a:hover { color: #e02b2b; }

.sp-category-page .sp-post-meta {
    font-size: 13px;
    color: #888;
}
.sp-category-page .sp-post-meta .sp-post-sep { margin: 0 6px; }

/* Pagination (uses parent theme's .pagination-wrap / .pagination classes) */
.sp-category-page .pagination-wrap { margin-top: 10px; }

/* Sidebar */
.sp-category-page .sp-sidebar { padding-left: 4px; }

.sp-category-page .sp-sidebar-title {
    font-size: 18px;
    font-weight: 800;
    text-transform: uppercase;
    margin: 0 0 18px;
    padding-bottom: 10px;
    border-bottom: 3px solid #e02b2b;
    display: inline-block;
}

.sp-category-page .sp-sidebar-item {
    display: flex;
    gap: 14px;
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid #eee;
}
.sp-category-page .sp-sidebar-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.sp-category-page .sp-sidebar-thumb {
    flex: 0 0 90px;
    max-width: 90px;
    aspect-ratio: 1 / 1;
    display: block;
    overflow: hidden;
    border-radius: 6px;
    background: #eee;
}
.sp-category-page .sp-sidebar-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sp-category-page .sp-sidebar-body { flex: 1; min-width: 0; }

.sp-category-page .sp-post-cat--sm {
    font-size: 10px;
    padding: 2px 8px;
    margin-bottom: 6px;
}

.sp-category-page .sp-sidebar-post-title {
    font-size: 14px;
    line-height: 1.4;
    font-weight: 600;
    margin: 0;
}
.sp-category-page .sp-sidebar-post-title a { color: #1a1a1a; text-decoration: none; }
.sp-category-page .sp-sidebar-post-title a:hover { color: #e02b2b; }

/* Responsive */
@media (max-width: 767px) {
    .sp-category-page .sp-post-row { flex-direction: column; }
    .sp-category-page .sp-post-thumb { flex: 0 0 auto; max-width: 100%; width: 100%; }
    .sp-category-page .sp-sidebar { padding-left: 0; margin-top: 40px; }
}

/* ==========================================================================
   Startup Pakistan style Header (header.php)
   ========================================================================== */

.sp-header { background: #fff; border-bottom: 1px solid #eee; }

.sp-header .sp-menu-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 0;
    padding: 0;
}

/* Row 1: date / sign in / social icons */
.sp-header-topbar { background: #f4f4f4; border-bottom: 1px solid #e8e8e8; }
.sp-header-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 13px;
}
.sp-header-topbar-left { display: flex; align-items: center; gap: 18px; color: #333; }
.sp-header-date { color: #333; }
.sp-header-signin { color: #333; text-decoration: none; font-weight: 500; }
.sp-header-signin:hover { color: #e02b2b; }

.sp-header-social { display: flex; align-items: center; gap: 14px; }
.sp-social-icon {
    color: #333;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.sp-social-icon:hover { color: #e02b2b; }

/* Row 2: centered logo */
.sp-header-logo { padding: 24px 0; text-align: center; }
.sp-header-logo-inner { display: flex; flex-direction: column; align-items: center; }
.sp-custom-logo img { max-height: 100px; width: auto; }
.sp-site-title {
    font-size: 30px;
    font-weight: 800;
    color: #1a1a1a;
    text-decoration: none;
}
.sp-site-description { margin: 4px 0 0; color: #888; font-size: 13px; }

/* Row 3: sticky category nav + search */
.sp-header-nav { background: #1a1a1a; }
.sp-header-nav-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    padding: 14px 0;
    position: relative;
}
.sp-header-nav .sp-menu-list { justify-content: center; }
.sp-header-nav .sp-menu-list a {
    color: #eee;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.2px;
    text-decoration: none;
    padding: 4px 2px;
}
.sp-header-nav .sp-menu-list a:hover { color: #e02b2b; }

.sp-header-nav .sp-search-toggle {
    background: none;
    border: none;
    color: #eee;
    font-size: 15px;
    cursor: pointer;
    padding: 4px;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}
.sp-header-nav .sp-search-toggle:hover { color: #e02b2b; }

.sp-header-search-panel {
    max-height: 0;
    overflow: hidden;
    background: #262626;
    transition: max-height .25s ease;
}
.sp-header-search-panel.is-open { max-height: 90px; }
.sp-header-search-panel .container { padding-top: 14px; padding-bottom: 14px; }
.sp-header-search-panel input[type="search"],
.sp-header-search-panel input[type="text"] {
    width: 100%;
    max-width: 420px;
    padding: 8px 12px;
    border-radius: 4px;
    border: none;
}

.sp-header-nav.is-sticky {
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* Mobile hamburger */
.sp-mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 28px;
    height: 22px;
    background: none;
    border: none;
    cursor: pointer;
    position: absolute;
    left: 15px;
}
.sp-mobile-toggle span {
    display: block;
    height: 2px;
    background: #eee;
    border-radius: 2px;
}

@media (max-width: 991px) {
    .sp-mobile-toggle { display: flex; }
    .sp-header-nav .sp-menu-list {
        display: none;
        flex-direction: column;
        gap: 0;
        width: 100%;
        text-align: left;
    }
    .sp-header-nav .sp-menu-list.is-open { display: flex; }
    .sp-header-nav .sp-menu-list a { display: block; padding: 10px 0; border-bottom: 1px solid #333; }
    .sp-header-nav-inner { justify-content: flex-start; padding-left: 50px; }
    .sp-header-topbar-left { gap: 10px; font-size: 12px; }
    .sp-header-social { gap: 10px; }
}

@media (max-width: 575px) {
    .sp-header-date { display: none; }
}

/* ==========================================================================
   Startup Pakistan style Hero Grid (template-parts/sp-hero-slider.php)
   1 large featured post + 2x2 grid of the next 4 posts (static, no slider)
   ========================================================================== */

.sp-hero { padding: 30px 0; }

.sp-hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    grid-template-areas:
        "main tile1 tile2"
        "main tile3 tile4";
    gap: 8px;
    height: 480px;
}

.sp-hero-main,
.sp-hero-tile {
    position: relative;
    background-size: cover;
    background-position: center;
    background-color: #eee;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}

.sp-hero-main { grid-area: main; }
.sp-hero-grid .sp-hero-tile:nth-of-type(1) { grid-area: tile1; }
.sp-hero-grid .sp-hero-tile:nth-of-type(2) { grid-area: tile2; }
.sp-hero-grid .sp-hero-tile:nth-of-type(3) { grid-area: tile3; }
.sp-hero-grid .sp-hero-tile:nth-of-type(4) { grid-area: tile4; }

.sp-hero-link {
    position: absolute;
    inset: 0;
    z-index: 3;
}

.sp-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.25) 60%, rgba(0,0,0,0) 100%);
}

.sp-hero-content {
    position: relative;
    z-index: 2;
    padding: 26px;
}

.sp-hero-main .sp-hero-content { padding: 34px; max-width: 620px; }

.sp-post-cat--overlay {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    background: #e02b2b;
    padding: 4px 12px;
    border-radius: 3px;
    margin-bottom: 10px;
    text-decoration: none;
}

.sp-hero-title {
    font-size: 26px;
    line-height: 1.3;
    font-weight: 800;
    margin: 0 0 10px;
}
.sp-hero-tile .sp-hero-title { font-size: 15px; margin-bottom: 0; }
.sp-hero-title a { color: #fff; text-decoration: none; }
.sp-hero-title a:hover { text-decoration: underline; }

.sp-hero-meta { color: #ddd; font-size: 13px; }
.sp-hero-meta .sp-post-sep { margin: 0 6px; }

@media (max-width: 991px) {
    .sp-hero-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "main main"
            "tile1 tile2"
            "tile3 tile4";
        height: auto;
    }
    .sp-hero-main { height: 320px; }
    .sp-hero-tile { height: 180px; }
}

@media (max-width: 575px) {
    .sp-hero-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "main"
            "tile1"
            "tile2"
            "tile3"
            "tile4";
    }
    .sp-hero-main { height: 260px; }
    .sp-hero-tile { height: 200px; }
    .sp-hero-main .sp-hero-content { padding: 22px; }
    .sp-hero-main .sp-hero-title { font-size: 20px; }
}

/* ==========================================================================
   Boxed layout (leaves side margins on wide screens for ad placements)
   Applies site-wide (breadcrumb banners, single posts, regular Pages,
   default archives) - not just our own custom templates - so Contact Us,
   About Us, and blog post banners get the same contained width instead
   of stretching edge-to-edge.
   ========================================================================== */
.container,
.sp-container {
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
    width: 100%;
}
@media (max-width: 1650px) {
    .container,
    .sp-container { max-width: 100%; }
}

/* ==========================================================================
   Homepage category sections (sp_render_home_section() in functions.php)
   ========================================================================== */

.sp-home-content { padding-top: 40px; padding-bottom: 20px; }

.sp-home-section { margin-bottom: 46px; }

.sp-home-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 20px;
}

.sp-home-section-title {
    font-size: 22px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
    padding-bottom: 10px;
    border-bottom: 3px solid #e02b2b;
    display: inline-block;
}

.sp-home-section-more {
    font-size: 13px;
    font-weight: 700;
    color: #555;
    text-decoration: none;
    white-space: nowrap;
    margin-left: 20px;
}
.sp-home-section-more:hover { color: #e02b2b; }

.sp-home-section-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.sp-home-card { display: flex; flex-direction: column; }

.sp-home-card-thumb {
    display: block;
    aspect-ratio: 4 / 3;
    border-radius: 6px;
    overflow: hidden;
    background: #eee;
    margin-bottom: 12px;
}
.sp-home-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}
.sp-home-card:hover .sp-home-card-thumb img { transform: scale(1.06); }

.sp-home-card-title {
    font-size: 16px;
    line-height: 1.4;
    font-weight: 700;
    margin: 8px 0 6px;
}
.sp-home-card-title a { color: #1a1a1a; text-decoration: none; }
.sp-home-card-title a:hover { color: #e02b2b; }

@media (max-width: 991px) {
    .sp-home-section-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 575px) {
    .sp-home-section-grid { grid-template-columns: 1fr; }
}
