/* =========================================================
        TOOLHUB — TOOL CATEGORIES
        PDF • IMAGE • UTILITY
========================================================= */


/* =========================================================
        MAIN CATEGORY SECTION
========================================================= */

.category-tools-section {

    position: relative;

    padding: 105px 0;

    background:
        radial-gradient(
            circle at 10% 15%,
            rgba(37, 99, 235, 0.10),
            transparent 32%
        ),
        radial-gradient(
            circle at 90% 85%,
            rgba(59, 130, 246, 0.06),
            transparent 30%
        ),
        #07111f;

    overflow: hidden;

}


/* =========================================================
        SECTION SEPARATOR
========================================================= */

.category-tools-section::before {

    content: "";

    position: absolute;

    top: 0;

    left: 5%;

    right: 5%;

    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255,255,255,0.08),
            transparent
        );

}


/* =========================================================
        CONTAINER
========================================================= */

.category-tools-section .container {

    position: relative;

    z-index: 1;

    width: min(1200px, calc(100% - 40px));

    margin: 0 auto;

}


/* =========================================================
        SECTION HEADER
========================================================= */

.category-section-header {

    display: flex;

    align-items: flex-end;

    justify-content: space-between;

    gap: 40px;

    margin-bottom: 48px;

}


/* =========================================================
        HEADER BADGE
========================================================= */

.category-section-badge {

    display: inline-flex;

    align-items: center;

    gap: 9px;

    margin-bottom: 15px;

    padding: 8px 15px;

    border-radius: 999px;

    color: #60a5fa;

    background: rgba(37, 99, 235, 0.10);

    border: 1px solid rgba(96, 165, 250, 0.16);

    font-size: 11px;

    font-weight: 800;

    letter-spacing: 1.2px;

}

.category-section-badge i {

    font-size: 12px;

}


/* =========================================================
        HEADER TITLE
========================================================= */

.category-section-header h2 {

    margin: 0 0 12px;

    color: #ffffff;

    font-size: clamp(34px, 4vw, 48px);

    line-height: 1.15;

    font-weight: 800;

    letter-spacing: -1px;

}

.category-section-header h2 span {

    color: #3b82f6;

}


/* =========================================================
        HEADER DESCRIPTION
========================================================= */

.category-section-header p {

    max-width: 650px;

    margin: 0;

    color: #94a3b8;

    font-size: 15px;

    line-height: 1.75;

}


/* =========================================================
        VIEW ALL BUTTON
========================================================= */

.category-view-all {

    flex-shrink: 0;

    display: inline-flex;

    align-items: center;

    gap: 10px;

    padding: 13px 20px;

    border-radius: 12px;

    color: #ffffff;

    background: rgba(255,255,255,0.04);

    border: 1px solid rgba(255,255,255,0.09);

    text-decoration: none;

    font-size: 14px;

    font-weight: 700;

    transition:
        background 0.3s ease,
        border-color 0.3s ease,
        transform 0.3s ease,
        box-shadow 0.3s ease;

}

.category-view-all i {

    color: #60a5fa;

    transition: transform 0.3s ease;

}

.category-view-all:hover {

    background: #2563eb;

    border-color: #2563eb;

    transform: translateY(-3px);

    box-shadow:
        0 12px 30px rgba(37,99,235,0.25);

}

.category-view-all:hover i {

    color: #ffffff;

    transform: translateX(5px);

}


/* =========================================================
        TOOL GRID
========================================================= */

.category-tool-grid {

    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 22px;

}


/* =========================================================
        TOOL CARD
========================================================= */

.category-tool-card {

    position: relative;

    display: flex;

    flex-direction: column;

    min-width: 0;

    min-height: 365px;

    padding: 26px;

    color: #ffffff;

    text-decoration: none;

    border-radius: 20px;

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,0.055),
            rgba(255,255,255,0.018)
        );

    border: 1px solid rgba(255,255,255,0.075);

    box-shadow:
        0 15px 45px rgba(0,0,0,0.18);

    overflow: hidden;

    transition:
        transform 0.35s ease,
        border-color 0.35s ease,
        box-shadow 0.35s ease,
        background 0.35s ease;

}


/* =========================================================
        CARD GLOW
========================================================= */

.category-tool-card::before {

    content: "";

    position: absolute;

    width: 180px;

    height: 180px;

    top: -100px;

    right: -80px;

    border-radius: 50%;

    background: rgba(37,99,235,0.17);

    filter: blur(55px);

    opacity: 0;

    pointer-events: none;

    transition: opacity 0.4s ease;

}

.category-tool-card:hover::before {

    opacity: 1;

}


/* =========================================================
        CARD BOTTOM LINE
========================================================= */

.category-tool-card::after {

    content: "";

    position: absolute;

    left: 25px;

    right: 25px;

    bottom: 0;

    height: 2px;

    background:
        linear-gradient(
            90deg,
            transparent,
            #2563eb,
            transparent
        );

    transform: scaleX(0);

    transition: transform 0.4s ease;

}

.category-tool-card:hover::after {

    transform: scaleX(1);

}


/* =========================================================
        CARD HOVER
========================================================= */

.category-tool-card:hover {

    transform: translateY(-8px);

    border-color:
        rgba(59,130,246,0.35);

    background:
        linear-gradient(
            145deg,
            rgba(37,99,235,0.09),
            rgba(255,255,255,0.025)
        );

    box-shadow:
        0 25px 60px rgba(0,0,0,0.28),
        0 0 30px rgba(37,99,235,0.06);

}


/* =========================================================
        CARD TOP
========================================================= */

.category-tool-top {

    position: relative;

    z-index: 2;

    display: flex;

    align-items: flex-start;

    justify-content: space-between;

    gap: 15px;

    margin-bottom: 22px;

}


/* =========================================================
        TOOL ICON
========================================================= */

.category-tool-icon {

    width: 58px;

    height: 58px;

    flex: 0 0 58px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 16px;

    color: #ffffff;

    font-size: 22px;

    box-shadow:
        0 12px 28px rgba(0,0,0,0.18);

    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease;

}

.category-tool-card:hover
.category-tool-icon {

    transform:
        translateY(-4px)
        rotate(-4deg)
        scale(1.05);

    box-shadow:
        0 16px 35px rgba(0,0,0,0.25);

}


/* =========================================================
        ICON COLORS
========================================================= */

.category-tool-icon.blue {

    background:
        linear-gradient(
            135deg,
            #2563eb,
            #1d4ed8
        );

}

.category-tool-icon.green {

    background:
        linear-gradient(
            135deg,
            #22c55e,
            #15803d
        );

}

.category-tool-icon.orange {

    background:
        linear-gradient(
            135deg,
            #f59e0b,
            #d97706
        );

}

.category-tool-icon.purple {

    background:
        linear-gradient(
            135deg,
            #8b5cf6,
            #6d28d9
        );

}

.category-tool-icon.red {

    background:
        linear-gradient(
            135deg,
            #ef4444,
            #b91c1c
        );

}


/* =========================================================
        BADGES
========================================================= */

.category-tool-badge {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    padding: 5px 9px;

    border-radius: 7px;

    font-size: 9px;

    font-weight: 800;

    letter-spacing: 0.6px;

    white-space: nowrap;

}


/* Popular */

.category-tool-badge.popular {

    color: #93c5fd;

    background:
        rgba(37,99,235,0.13);

    border:
        1px solid rgba(96,165,250,0.18);

}


/* New */

.category-tool-badge.new {

    color: #86efac;

    background:
        rgba(34,197,94,0.10);

    border:
        1px solid rgba(74,222,128,0.17);

}


/* Hot */

.category-tool-badge.hot {

    color: #fbbf24;

    background:
        rgba(245,158,11,0.10);

    border:
        1px solid rgba(251,191,36,0.17);

}


/* AI */

.category-tool-badge.ai {

    color: #c4b5fd;

    background:
        rgba(139,92,246,0.12);

    border:
        1px solid rgba(167,139,250,0.18);

}


/* =========================================================
        CARD TITLE
========================================================= */

.category-tool-card h3 {

    position: relative;

    z-index: 2;

    margin: 0 0 11px;

    color: #ffffff;

    font-size: 20px;

    line-height: 1.3;

    font-weight: 750;

    letter-spacing: -0.2px;

}


/* =========================================================
        CARD DESCRIPTION
========================================================= */

.category-tool-card > p {

    position: relative;

    z-index: 2;

    margin: 0 0 20px;

    color: #94a3b8;

    font-size: 13px;

    line-height: 1.7;

}


/* =========================================================
        FEATURES
========================================================= */

.category-tool-features {

    position: relative;

    z-index: 2;

    display: flex;

    flex-direction: column;

    gap: 9px;

    margin: 0;

    padding: 0;

    list-style: none;

}

.category-tool-features li {

    display: flex;

    align-items: center;

    gap: 9px;

    color: #64748b;

    font-size: 12px;

    font-weight: 600;

}

.category-tool-features li i {

    width: 16px;

    color: #60a5fa;

    font-size: 11px;

    text-align: center;

}


/* =========================================================
        CARD BUTTON
========================================================= */

.category-tool-button {

    position: relative;

    z-index: 2;

    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-top: auto;

    padding-top: 20px;

    color: #ffffff;

    font-size: 13px;

    font-weight: 700;

    border-top:
        1px solid rgba(255,255,255,0.06);

}

.category-tool-button i {

    color: #60a5fa;

    transition:
        transform 0.3s ease;

}

.category-tool-card:hover
.category-tool-button i {

    transform:
        translateX(6px);

}


/* =========================================================
        PDF SECTION
========================================================= */

#pdf-tools {

    background:
        radial-gradient(
            circle at 5% 20%,
            rgba(37,99,235,0.12),
            transparent 30%
        ),
        #07111f;

}


/* =========================================================
        IMAGE SECTION
========================================================= */

#image-tools {

    background:
        radial-gradient(
            circle at 95% 20%,
            rgba(6,182,212,0.07),
            transparent 30%
        ),
        #081321;

}


/* =========================================================
        UTILITY SECTION
========================================================= */

#utility-tools {

    background:
        radial-gradient(
            circle at 15% 80%,
            rgba(139,92,246,0.07),
            transparent 30%
        ),
        #07111f;

}


/* =========================================================
        TABLET
========================================================= */

@media (max-width: 1100px) {

    .category-tool-grid {

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

    }

    .category-section-header {

        align-items: flex-start;

    }

}


/* =========================================================
        MOBILE
========================================================= */

@media (max-width: 700px) {

    .category-tools-section {

        padding: 80px 0;

    }

    .category-tools-section .container {

        width:
            min(100% - 30px, 600px);

    }

    .category-section-header {

        flex-direction: column;

        align-items: flex-start;

        gap: 25px;

        margin-bottom: 35px;

    }

    .category-section-header h2 {

        font-size: 34px;

    }

    .category-section-header p {

        font-size: 14px;

    }

    .category-tool-grid {

        grid-template-columns: 1fr;

        gap: 18px;

    }

    .category-tool-card {

        min-height: auto;

        padding: 22px;

    }

}


/* =========================================================
        SMALL MOBILE
========================================================= */

@media (max-width: 480px) {

    .category-tools-section {

        padding: 65px 0;

    }

    .category-section-header h2 {

        font-size: 30px;

    }

    .category-tool-card {

        padding: 20px;

        border-radius: 17px;

    }

    .category-tool-icon {

        width: 52px;

        height: 52px;

        flex-basis: 52px;

        font-size: 20px;

        border-radius: 14px;

    }

    .category-tool-card h3 {

        font-size: 18px;

    }

}


/* =========================================================
        ACCESSIBILITY
========================================================= */

.category-tool-card:focus-visible,
.category-view-all:focus-visible {

    outline:
        3px solid rgba(96,165,250,0.65);

    outline-offset: 4px;

}


/* =========================================================
        REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .category-tool-card,
    .category-tool-icon,
    .category-tool-button i,
    .category-view-all,
    .category-view-all i {

        transition: none;

    }

}