/* ============================================================
   SportsLink PK - Archive/Category Page Overrides
   Loaded LAST to override Jannah theme conflicts
   ============================================================ */

/* The theme's #breadcrumb default is `margin: 50px 0 0` (meant for single
   posts). Inside the archive/search card it is flush with a 20px gap below. */
.archive-head #breadcrumb {
    margin: 0 0 20px !important;
}

/* Archive header — the breadcrumb + title sit in one white card, exactly like
   #category-title-section on pksportslink.com (30px desktop / 20px 15px mobile). */
.archive-head {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 2px 2px 0 0 !important;
    margin: 0 !important;
    padding: 30px !important;
}

.archive-title {
    font-size: 41px !important;
    font-weight: 700 !important;
    color: #2c2f34 !important;
    margin: 0 !important;
    line-height: 1.4 !important;
    font-family: 'Poppins', sans-serif !important;
}

.archive-desc {
    font-size: 16px !important;
    color: #666666 !important;
    margin: 0 !important;
    line-height: 1.6 !important;
}

.archive-type {
    display: none !important;
}

/* Every archive post — the first one included — uses this card: image left
   (~45 %), meta, heading, excerpt and a solid "Read More »" button. */
.tie-post-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 40px 30px 30px !important;
    background: #ffffff !important;
    border-radius: 0 0 2px 2px !important;
}

.tie-post-list-item {
    display: block !important;
    margin: 0 0 25px !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #ffffff !important;
    position: relative !important;
    z-index: 1 !important;
}

.tie-post-list-item:last-child {
    margin-bottom: 0 !important;
}

.tie-post-list-thumb {
    display: block !important;
    float: left !important;
    width: 45% !important;
    margin-right: 30px !important;
    aspect-ratio: 780 / 440 !important;
    overflow: hidden !important;
    border-radius: 2px !important;
    background: #f7f7f7 !important;
}

.tie-post-list-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

.tie-post-list-body {
    overflow: hidden !important;
    background: #ffffff !important;
}

.tie-post-list-meta {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    font-size: 13px !important;
    color: #666666 !important;
    margin-bottom: 8px !important;
    flex-wrap: wrap !important;
}

.tie-post-list-author,
.tie-post-list-date,
.tie-post-list-views {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
}

.tie-post-list-author a,
.tie-post-list-date time,
.tie-post-list-views span {
    color: #666666 !important;
    text-decoration: none !important;
}

.tie-post-list-author a:hover,
.tie-post-list-date time:hover,
.tie-post-list-views span:hover {
    color: #00afd8 !important;
}

.tie-post-list-meta .tie-icon {
    font-size: 12px !important;
    color: #666666 !important;
}

/* The <h2> itself carries this class (there is no nested h2). */
.tie-post-list-heading {
    font-size: 28px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    color: #2c2f34 !important;
    font-family: 'Poppins', sans-serif !important;
}

.tie-post-list-heading a {
    color: #2c2f34 !important;
    text-decoration: none !important;
    transition: color 0.2s !important;
}

.tie-post-list-heading a:hover {
    color: #00afd8 !important;
}

.tie-post-list-excerpt {
    font-size: 15px !important;
    color: #666666 !important;
    line-height: 1.7 !important;
    margin: 10px 0 0 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

.tie-post-list-more {
    display: inline-block !important;
    background: #00afd8 !important;
    color: #fff !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    margin-top: 10px !important;
    padding: 12px 30px !important;
    border-radius: 4px !important;
    text-decoration: none !important;
    transition: background 0.2s !important;
}

.tie-post-list-more:hover {
    background: #0093b8 !important;
    color: #fff !important;
}

/* Clearfix for float-based layouts */
.tie-post-list-item::after {
    content: "" !important;
    display: table !important;
    clear: both !important;
}

/* ------------------------------------------------------------------
   Responsive — mirrors the Jannah rules the live category page uses:
     ≤580px   image stacked on top (100% wide)
     581-767  image 40% wide, side by side, mobile card padding
     768-991  image 50% wide, side by side, desktop card padding
   ------------------------------------------------------------------ */
@media (max-width: 991px) {
    .tie-post-list-heading {
        font-size: 20px !important;
    }

    .tie-post-list-excerpt {
        font-size: 14px !important;
    }

    .tie-post-list-more {
        padding: 10px 25px !important;
    }

    .tie-post-list-meta {
        margin-bottom: 3px !important;
    }
}

@media (min-width: 581px) and (max-width: 767px) {
    .tie-post-list-thumb {
        width: 40% !important;
        margin-right: 3.55% !important;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .tie-post-list-thumb {
        width: 50% !important;
        margin-right: 3.55% !important;
    }
}

@media (max-width: 767px) {
    .archive-head {
        padding: 20px 15px !important;
    }

    .tie-post-list {
        padding: 40px 15px 20px !important;
    }
}

@media (max-width: 670px) {
    .tie-post-list-item {
        margin-bottom: 14px !important;
    }
}

@media (max-width: 580px) {
    .tie-post-list-thumb {
        float: none !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 10px !important;
    }

    .tie-post-list-body {
        overflow: visible !important;
    }
}
