/* =========================================================
        TOOLHUB — CATEGORY PAGES
        PDF / IMAGE / UTILITY
========================================================= */

.category-page {
    position: relative;
    min-height: 100vh;
    padding: 85px 0 110px;
    background:
        radial-gradient(circle at 12% 18%, rgba(37,99,235,.11), transparent 30%),
        radial-gradient(circle at 88% 78%, rgba(59,130,246,.06), transparent 28%),
        #07111f;
    overflow: hidden;
}

.category-container {
    width: min(1200px, calc(100% - 40px));
    margin: 0 auto;
}

/* Header */

.category-hero {
    max-width: 850px;
    margin: 0 auto 55px;
    text-align: center;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    margin-bottom: 17px;
    border-radius: 999px;
    color: #60a5fa;
    background: rgba(37,99,235,.10);
    border: 1px solid rgba(96,165,250,.16);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
}

.category-hero h1 {
    margin: 0 0 12px;
    color: #fff;
    font-size: clamp(42px, 5vw, 62px);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -1.8px;
}

.category-hero p {
    margin: 0;
    color: #94a3b8;
    font-size: 17px;
    line-height: 1.7;
}

/* Grid */

.category-page-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

/* Card */

.category-page-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 340px;
    padding: 25px;
    color: #fff;
    text-decoration: none;
    border-radius: 20px;
    background: linear-gradient(145deg, rgba(255,255,255,.055), rgba(255,255,255,.018));
    border: 1px solid rgba(255,255,255,.075);
    box-shadow: 0 15px 42px rgba(0,0,0,.17);
    overflow: hidden;
    box-sizing: border-box;
    transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}

.category-page-card::before {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    top: -100px;
    right: -80px;
    border-radius: 50%;
    background: rgba(37,99,235,.16);
    filter: blur(55px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
}

.category-page-card:hover {
    transform: translateY(-7px);
    border-color: rgba(59,130,246,.34);
    box-shadow: 0 25px 55px rgba(0,0,0,.27);
}

.category-page-card:hover::before {
    opacity: 1;
}

/* Card top */

.category-card-top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 21px;
}

/* Icon */

.category-card-icon {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    color: #fff;
    font-size: 21px;
    box-shadow: 0 10px 25px rgba(0,0,0,.18);
    transition: transform .3s ease;
}

.category-page-card:hover .category-card-icon {
    transform: translateY(-3px) rotate(-4deg) scale(1.04);
}

.category-card-icon.blue {
    background: linear-gradient(135deg,#2563eb,#1d4ed8);
}

.category-card-icon.green {
    background: linear-gradient(135deg,#22c55e,#15803d);
}

.category-card-icon.orange {
    background: linear-gradient(135deg,#f59e0b,#d97706);
}

.category-card-icon.purple {
    background: linear-gradient(135deg,#8b5cf6,#6d28d9);
}

.category-card-icon.red {
    background: linear-gradient(135deg,#ef4444,#b91c1c);
}

/* Badge */

.category-card-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 9px;
    border-radius: 7px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .6px;
    white-space: nowrap;
}

.category-card-badge.popular {
    color: #93c5fd;
    background: rgba(37,99,235,.13);
    border: 1px solid rgba(96,165,250,.18);
}

.category-card-badge.new {
    color: #86efac;
    background: rgba(34,197,94,.10);
    border: 1px solid rgba(74,222,128,.17);
}

.category-card-badge.hot {
    color: #fbbf24;
    background: rgba(245,158,11,.10);
    border: 1px solid rgba(251,191,36,.17);
}

.category-card-badge.ai {
    color: #c4b5fd;
    background: rgba(139,92,246,.12);
    border: 1px solid rgba(167,139,250,.18);
}

/* Text */

.category-page-card h2 {
    position: relative;
    z-index: 1;
    margin: 0 0 10px;
    color: #fff;
    font-size: 20px;
    line-height: 1.3;
    font-weight: 750;
}

.category-page-card p {
    position: relative;
    z-index: 1;
    margin: 0 0 19px;
    color: #94a3b8;
    font-size: 13px;
    line-height: 1.7;
}

/* Features */

.category-card-features {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.category-card-features li {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
}

.category-card-features li i {
    color: #60a5fa;
    font-size: 10px;
}

/* Action */

.category-card-action {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,.06);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.category-card-action i {
    color: #60a5fa;
    transition: transform .25s ease;
}

.category-page-card:hover .category-card-action i {
    transform: translateX(5px);
}

/* Tablet */

@media (max-width: 1050px) {
    .category-page-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Mobile */

@media (max-width: 700px) {
    .category-page {
        padding: 65px 0 80px;
    }

    .category-container {
        width: min(100% - 30px, 600px);
    }

    .category-hero {
        margin-bottom: 38px;
    }

    .category-hero h1 {
        font-size: 38px;
    }

    .category-hero p {
        font-size: 14px;
    }

    .category-page-grid {
        grid-template-columns: 1fr;
        gap: 17px;
    }

    .category-page-card {
        min-height: auto;
        padding: 22px;
    }
}

/* Small mobile */

@media (max-width: 420px) {
    .category-page {
        padding: 55px 0 70px;
    }

    .category-hero h1 {
        font-size: 33px;
    }

    .category-page-card {
        padding: 20px;
    }

    .category-card-icon {
        width: 52px;
        height: 52px;
        flex-basis: 52px;
        font-size: 19px;
    }
}

/* Accessibility */

.category-page-card:focus-visible {
    outline: 3px solid rgba(96,165,250,.65);
    outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
    .category-page-card,
    .category-card-icon,
    .category-card-action i {
        transition: none;
    }
}
