/* Category Common Styles - For all category pages */
* {
    box-sizing: border-box;
}

html, body {
    background: #000000 !important;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: 'Roboto', sans-serif;
    color: #fff;
}

body {
    background: #000000 !important;
}

.tfk-main-wrapper {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 30px;
    background: #000000;
}

.tfk-section-title {
    color: #F5C518;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 40px;
    border-left: 6px solid #F5C518;
    padding-left: 20px;
    text-transform: uppercase;
    background: transparent;
}

/* ✅ PERFECT DESKTOP GRID */
.tfk-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

/* ✅ PERFECT CARD */
.tfk-card {
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #2d2d2d;
    text-decoration: none !important;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    height: 100%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.tfk-card:hover {
    transform: translateY(-8px);
    border-color: #F5C518;
    box-shadow: 0 10px 25px rgba(245, 197, 24, 0.15);
}

.tfk-card-image-wrap {
    width: 100%;
    height: 170px;
    overflow: hidden;
    position: relative;
    background: #000000;
}

.tfk-card-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.tfk-card:hover .tfk-card-image-wrap img {
    transform: scale(1.05);
}

.tfk-card-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* ✅ FIXED TITLE - NO CUTTING */
.tfk-card-body h3 {
    font-size: 16px;
    color: #fff;
    margin-bottom: 10px;
    line-height: 1.4; /* Increased from 1.3 */
    font-weight: 700;
    /* ✅ REMOVED line-clamp - Full text always visible */
    display: block;
    max-height: 4.2em; /* 2.5 lines max */
    overflow: hidden;
}

/* ✅ FIXED DESCRIPTION - NO CUTTING */
.tfk-card-body p {
    font-size: 13px;
    color: #b0b0b0;
    margin-bottom: 15px;
    line-height: 1.5;
    /* ✅ REMOVED line-clamp - Full text always visible */
    display: block;
    max-height: 4.5em; /* ~3 lines max */
    overflow: hidden;
}

.tfk-card-footer {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #2d2d2d;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tfk-card-meta {
    font-size: 11px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Pagination styles */
.pagination-wrapper {
    margin-top: 60px;
    display: flex;
    justify-content: center;
    background: transparent;
}

.pagination {
    display: flex;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination li a, .pagination li span {
    padding: 10px 18px;
    border-radius: 8px;
    background: #1a1a1a;
    color: #fff;
    border: 1px solid #333;
    transition: 0.3s;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
}

.pagination li a:hover {
    background: #F5C518;
    color: #000;
    border-color: #F5C518;
}

.pagination .active span {
    background: #F5C518;
    color: #000;
    border-color: #F5C518;
    font-weight: bold;
}

/* Override external CSS */
header, footer, .header, .footer {
    background: #000000 !important;
}

/* RESPONSIVE PERFECTION */
@media (min-width: 1200px) {
    .tfk-card-grid {
        grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
        gap: 20px;
    }
}

@media (min-width: 1400px) {
    .tfk-card-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 18px;
    }
}

@media (max-width: 768px) {
    .tfk-main-wrapper { 
        padding: 0 15px; 
        margin: 30px auto; 
    }
    .tfk-section-title { 
        font-size: 24px; 
    }
    .tfk-card-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .tfk-card-image-wrap {
        height: 180px;
    }
    .tfk-card-body h3 {
        font-size: 17px;
        max-height: 4.8em; /* More space on mobile */
    }
    .tfk-card-body p {
        max-height: 5.5em; /* More space on mobile */
    }
}

/* ✅ SPECIAL CATEGORY PAGE HEADER */
.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #2d2d2d;
}

.category-header h3 {
    color: #F5C518;
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.view-more-btn {
    background: #F5C518;
    color: #000;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: bold;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-block;
}

.view-more-btn:hover {
    background: #e0b014;
    color: #000;
    transform: translateY(-2px);
    text-decoration: none;
}
