/* Styles for the category archive template (category.php) */

.simple-footer {
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e3e3e3;
}

.footer-items {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 5px 0;
}

.footer-item {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: 0.25s ease;
}

.footer-item:hover {
    background: #ececec;
    border-color: #ccc;
    transform: translateY(-2px);
}

/* ==========================================================================
   Category Archive — Premium Card Grid
   ========================================================================== */

.category-main {
    /* flex width managed by Bootstrap col-lg-8 */
}

.cat-card-grid {
    margin-left: 0;
    margin-right: 0;
}

/* Card shell */
.cat-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(20, 20, 43, 0.06);
    box-shadow: 0 6px 18px rgba(20, 20, 43, 0.06);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    will-change: transform;
}

.cat-card:hover,
.cat-card:focus-within {
    transform: translateY(-8px);
    box-shadow: 0 22px 40px rgba(20, 20, 43, 0.16);
}

/* Featured image — fixed height, never stretched/blurry */
.cat-card-thumb-link {
    display: block;
    text-decoration: none;
}

.cat-card-thumb {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    border-radius: 18px 18px 0 0;
    background: linear-gradient(135deg, #f1f1f6, #e6e6f0);
}

.cat-card-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    margin: 0;
    border-radius: 0;
    transition: transform 0.6s ease;
}

.cat-card:hover .cat-card-img {
    transform: scale(1.08);
}

.cat-card-img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: rgba(20, 20, 43, 0.25);
}

/* Glassmorphism hover overlay */
.cat-card-glass {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, 0.2) 100%);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.cat-card:hover .cat-card-glass {
    opacity: 1;
}

/* Card body */
.cat-card-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 1.5rem 1.5rem 1.25rem;
}

.cat-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cat-card-title a {
    color: var(--brand-dark, #28b9e0);
    text-decoration: none;
    transition: color 0.25s ease;
}

.cat-card-title a:hover {
    color: var(--brand, #9250e2);
}

.cat-card-meta {
    font-size: 0.82rem;
    margin-bottom: 0.85rem;
}

.cat-card-excerpt {
    flex: 1 1 auto;
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 1rem;
}

.cat-card-excerpt p {
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cat-card-footer {
    margin-top: auto;
}

.cat-card-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.4rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    background: var(--brand-dark, #28b9e0);
    border: none;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 6px 14px rgba(40, 185, 224, 0.25);
}

.cat-card-btn:hover {
    background: var(--brand, #9250e2);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(146, 80, 226, 0.3);
}

.cat-card-taxo {
    border-top: 1px dashed rgba(20, 20, 43, 0.1);
    background: transparent;
    border-left: none;
    border-right: none;
    border-bottom: none;
    padding-left: 0;
    padding-right: 0;
}

.cat-card-taxo .footer-item {
    font-size: 12px;
}

/* Responsive columns: desktop 3 / tablet 2 / mobile 1 (Bootstrap grid handles
   the breakpoints via col-12 col-md-6 col-lg-4 in the markup; the rules
   below simply fine-tune spacing at each size). */
@media (max-width: 991.98px) {
    .cat-card-thumb {
        height: 200px;
    }
}

@media (max-width: 767.98px) {
    .cat-card-thumb {
        height: 190px;
    }

    .cat-card-body {
        padding: 1.25rem;
    }
}

/* Dark mode compatibility */
body.dark-mode .cat-card {
    background: #1f1f2e;
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .cat-card-excerpt {
    color: #c9c9d6;
}

body.dark-mode .cat-card-meta {
    color: #9a9aab !important;
}

body.dark-mode .cat-card-taxo {
    border-top-color: rgba(255, 255, 255, 0.12);
}

body.dark-mode .cat-card-taxo .footer-item {
    background: #2a2a3c;
    border-color: rgba(56, 189, 248, 0.3);
    color: #38bdf8;
}

body.dark-mode .cat-card-taxo .footer-item:hover {
    border-color: var(--brand-yellow, #ffdf7e);
    color: var(--brand-yellow, #ffdf7e);
}

/* Sidebar search box (moved out of inline styles) */
.cat-search-title {
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.cat-search-form {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.cat-search-input {
    flex: 1 1 70%;
    padding: 10px 15px;
    border: 2px solid #6c5ce7;
    border-radius: 50px;
    outline: none;
    font-size: 15px;
    transition: all 0.3s ease;
}

.cat-search-input:focus {
    border-color: #341f97;
}

.cat-search-btn {
    background: #6c5ce7;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 0 0 auto;
}

.cat-search-btn:hover {
    background: #341f97;
}

/* Pagination spacing for the archive */
.cat-pagination {
    display: flex;
    justify-content: center;
}