/*
|--------------------------------------------------------------------------
| CyberTools Modern UI
|--------------------------------------------------------------------------
| Stage 1: Global page shell only.
*/

:root {
    --ct-page: #f4f7fb;
    --ct-surface: #ffffff;
    --ct-ink: #0f172a;
    --ct-text: #334155;
    --ct-border: #e2e8f0;
}

html {
    background: var(--ct-page);
}

body,
body.rtl {
    background: var(--ct-page) !important;
    color: var(--ct-text);
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

body.dark,
body.rtl.dark {
    background: #0b1120 !important;
}

.container {
    max-width: 1440px;
    padding-left: 24px;
    padding-right: 24px;
}

.main-section {
    background: var(--ct-surface) !important;
    background-image: none !important;
    border-radius: 0;
    box-shadow: none;
    min-height: 100vh;
    padding: 32px 48px 40px;
}

body.dark .main-section {
    background: #111827 !important;
}

@media (max-width: 991px) {
    .main-section {
        padding: 24px 28px 32px;
    }
}

@media (max-width: 767px) {
    .container {
        max-width: none;
        padding-left: 0;
        padding-right: 0;
    }

    .main-section {
        padding: 18px 18px 28px;
    }
}

/*
|--------------------------------------------------------------------------
| Stage 2: Header and navigation
|--------------------------------------------------------------------------
*/

header {
    border-bottom: 1px solid var(--ct-border);
    margin-bottom: 56px;
    padding-top: 20px !important;
    padding-bottom: 20px !important;
}

header .navbar {
    min-height: 52px;
}

header .navbar-brand {
    display: inline-flex;
    align-items: center;
}

header .navbar-brand img {
    display: block;
    max-height: 44px;
    max-width: 210px;
    width: auto;
}

header .header-navbar {
    margin-left: auto;
}

header .header-navbar ul {
    gap: 28px;
}

header .header-navbar ul li {
    margin-right: 0;
}

header .header-navbar ul li a {
    color: var(--ct-text);
    display: inline-flex;
    align-items: center;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    padding: 10px 0;
}

header .header-navbar ul li a:hover,
header .header-navbar ul li a:focus {
    color: #2563eb;
}

header .header-language-btn-group {
    margin-left: 12px;
}

header .header-language-btn-group .header-language-btn {
    background: #f8fafc;
    border: 1px solid var(--ct-border);
    border-radius: 10px;
    box-shadow: none;
    color: var(--ct-ink);
    height: 40px;
    padding: 0 12px;
}

header .header-language-btn-group .header-language-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

header .login-btn-main {
    margin-left: 12px;
}

header .login-btn {
    align-items: center;
    background: #f8fafc;
    border: 1px solid var(--ct-border);
    border-radius: 10px;
    display: inline-flex;
    height: 40px;
    justify-content: center;
    width: 40px;
}

header .login-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.nav-btn {
    margin-left: 12px;
}

.nav-btn span {
    background-color: var(--ct-ink);
    height: 2px;
}

body.dark header {
    border-color: #263244;
}

body.dark header .header-navbar ul li a {
    color: #e2e8f0;
}

body.dark header .header-navbar ul li a:hover {
    color: #60a5fa;
}

body.dark header .header-language-btn-group .header-language-btn,
body.dark header .login-btn {
    background: #1e293b;
    border-color: #334155;
    color: #f8fafc;
}

body.dark .nav-btn span {
    background-color: #f8fafc;
}

@media (max-width: 991px) {
    header {
        margin-bottom: 40px;
    }

    header .header-navbar {
        background: #ffffff;
        border-right: 1px solid var(--ct-border);
        box-shadow: 10px 0 30px rgba(15, 23, 42, 0.08);
        padding: 80px 24px 24px;
        width: 280px;
        left: -280px;
    }

    header .header-navbar ul {
        align-items: stretch;
        gap: 4px;
    }

    header .header-navbar ul li {
        width: 100%;
    }

    header .header-navbar ul li a {
        border-radius: 8px;
        color: var(--ct-ink);
        display: block;
        font-size: 16px;
        line-height: 1.4;
        padding: 12px 14px;
    }

    header .header-navbar ul li a:hover {
        background: #f1f5f9;
    }

    body.dark header .header-navbar {
        background: #111827;
        border-color: #263244;
    }

    body.dark header .header-navbar ul li a {
        color: #e2e8f0;
    }

    body.dark header .header-navbar ul li a:hover {
        background: #1e293b;
    }
}

@media (max-width: 575px) {
    header {
        padding-top: 14px !important;
        padding-bottom: 14px !important;
    }

    header .navbar-brand img {
        max-height: 38px;
        max-width: 160px;
    }

    header .header-language-btn-group {
        margin-left: auto;
        margin-right: 8px;
    }

    header .login-btn-main {
        margin-left: 0;
        margin-right: 8px;
    }
}

/*
|--------------------------------------------------------------------------
| Stage 3: Modern Hero + Tool Search
|--------------------------------------------------------------------------
*/

/* Hero */
.hero-section {
    max-width: 820px;
    margin: 0 auto 28px;
    text-align: center;
}

.hero-section .hero-small-title {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    color: #2563eb;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: .02em;
}

.hero-section h1 {
    max-width: 820px;
    margin: 0 auto 18px;
    color: var(--ct-ink);
    font-size: clamp(34px, 5vw, 58px);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -.035em;
}

/*
|--------------------------------------------------------------------------
| Search
|--------------------------------------------------------------------------
*/

.main-search-sec {
    position: relative;
    z-index: 20;
    max-width: 760px;
    margin: 0 auto 56px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.main-search-sec input {
    width: 100%;
    height: 58px;
    padding: 0 54px 0 22px;
    border: 1px solid #dbe3ee;
    border-radius: 16px;
    background: #ffffff;
    color: var(--ct-ink);
    font-size: 16px;
    font-weight: 400;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, .03),
        0 8px 30px rgba(15, 23, 42, .06);
    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        background-color .2s ease;
}

.main-search-sec input::placeholder {
    color: #94a3b8;
}

.main-search-sec input:hover {
    border-color: #cbd5e1;
}

.main-search-sec input:focus {
    outline: none;
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow:
        0 0 0 4px rgba(59, 130, 246, .10),
        0 10px 30px rgba(15, 23, 42, .07);
}

/* Existing question/info button */
.main-search-sec .q-icon {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    margin-left: 0;
    border: 0;
    border-radius: 14px;
    background: #2563eb;
    box-shadow: none;
}

.main-search-sec .q-icon:hover {
    background: #1d4ed8;
}

/* Search dropdown */
.main-search-sec .main-search-dd {
    top: calc(100% + 8px);
    margin-top: 0;
    padding: 10px;
    border: 1px solid var(--ct-border);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .12);
}

/*
|--------------------------------------------------------------------------
| Dark Mode
|--------------------------------------------------------------------------
*/

body.dark .hero-section h1 {
    color: #f8fafc;
}

body.dark .hero-section .hero-small-title {
    color: #60a5fa;
}

body.dark .main-search-sec input {
    background: #111827;
    border-color: #334155;
    color: #f8fafc;
    box-shadow: none;
}

body.dark .main-search-sec input::placeholder {
    color: #64748b;
}

body.dark .main-search-sec input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 4px rgba(96, 165, 250, .10);
}

body.dark .main-search-sec .main-search-dd {
    background: #111827;
    border-color: #334155;
}

/*
|--------------------------------------------------------------------------
| Responsive Hero
|--------------------------------------------------------------------------
*/

@media (max-width: 767px) {
    .hero-section {
        margin-bottom: 22px;
        padding-left: 4px;
        padding-right: 4px;
    }

    .hero-section .hero-small-title {
        margin-bottom: 9px;
        font-size: 13px;
    }

    .hero-section h1 {
        max-width: 560px;
        margin-bottom: 14px;
        font-size: clamp(30px, 9vw, 42px);
        line-height: 1.08;
        letter-spacing: -.03em;
    }

    .main-search-sec {
        max-width: 100%;
        margin-bottom: 38px;
        gap: 8px;
    }

    .main-search-sec input {
        height: 54px;
        padding-left: 18px;
        padding-right: 18px;
        border-radius: 14px;
        font-size: 15px;
    }

    .main-search-sec .q-icon {
        display: flex;
        flex: 0 0 46px;
        width: 46px;
        height: 46px;
        border-radius: 13px;
    }
}

@media (max-width: 575px) {
    .hero-section h1 {
        font-size: 32px;
    }

    .main-search-sec {
        margin-bottom: 32px;
    }

    .main-search-sec input {
        height: 52px;
        border-radius: 13px;
        font-size: 14px;
    }
}

/*
|--------------------------------------------------------------------------
| Stage 4A: Compact Mobile Tool Grid
|--------------------------------------------------------------------------
| Goal: 3 tools per row on phones.
*/

@media (max-width: 767px) {

    /*
    |----------------------------------------------------------------------
    | Category spacing
    |----------------------------------------------------------------------
    */

    .content-sec {
        margin-top: 28px;
    }

    .content-sec-inner {
        padding-left: 0;
        padding-right: 0;
    }

    .content-title-sec {
        margin-bottom: 16px;
    }

    .content-title-icon {
        width: 42px;
        height: 42px;
        min-width: 42px;
        border-radius: 12px;
    }

    .content-title-icon svg {
        width: 21px;
        height: 21px;
    }

    .content-title-sec .main-subtitle {
        font-size: 22px;
        line-height: 1.2;
        font-weight: 700;
    }

    /*
    |----------------------------------------------------------------------
    | Force exactly 3 cards per row
    |----------------------------------------------------------------------
    */

    .content-cats-sec {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 10px !important;
        width: 100%;
    }

    .content-cats-col {
        width: auto !important;
        max-width: none !important;
        flex: none !important;
        margin: 0 !important;
        padding: 0 !important;
        min-width: 0;
    }

    .content-cats-inner {
        display: block;
        width: 100%;
        height: 100%;
        min-width: 0;
        margin: 0;
        padding: 12px 9px !important;
        border: 1px solid #e8edf5;
        border-radius: 14px !important;
        background: #ffffff;
        box-shadow: 0 4px 14px rgba(15, 23, 42, .07) !important;
        overflow: hidden;
    }

    /*
    |----------------------------------------------------------------------
    | Tool icon
    |----------------------------------------------------------------------
    */

    .content-cats-inner .icon,
    .content-cats-inner .content-cats-icon {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px;
        margin-bottom: 9px !important;
        border-radius: 10px !important;
    }

    .content-cats-inner .icon svg,
    .content-cats-inner .content-cats-icon svg {
        width: 20px !important;
        height: 20px !important;
    }

    /*
    |----------------------------------------------------------------------
    | Tool title
    |----------------------------------------------------------------------
    */

    .content-cats-inner h3,
    .content-cats-inner h4,
    .content-cats-inner .title,
    .content-cats-inner .content-cats-title {
        display: -webkit-box;
        overflow: hidden;
        margin: 0 0 6px !important;
        color: #0f172a;
        font-size: 12px !important;
        font-weight: 700 !important;
        line-height: 1.25 !important;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    /*
    |----------------------------------------------------------------------
    | Tool description
    |----------------------------------------------------------------------
    */

    .content-cats-inner p,
    .content-cats-inner .summary,
    .content-cats-inner .content-cats-summary {
        display: -webkit-box;
        overflow: hidden;
        margin: 0 !important;
        color: #64748b;
        font-size: 9px !important;
        font-weight: 400;
        line-height: 1.35 !important;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
    }
}

@media (max-width: 380px) {

    .content-cats-sec {
        gap: 7px !important;
    }

    .content-cats-inner {
        padding: 10px 7px !important;
    }

    .content-cats-inner h3,
    .content-cats-inner h4,
    .content-cats-inner .title,
    .content-cats-inner .content-cats-title {
        font-size: 11px !important;
    }

    .content-cats-inner p,
    .content-cats-inner .summary,
    .content-cats-inner .content-cats-summary {
        font-size: 8px !important;
    }
}

/*
|--------------------------------------------------------------------------
| Stage 4: Homepage SEO Hero
|--------------------------------------------------------------------------
*/

.ct-home-hero {
    max-width: 900px;
    margin: 0 auto 30px;
    text-align: center;
}

.ct-home-hero .hero-small-title {
    color: #2563eb;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .01em;
    margin-bottom: 14px;
}

.ct-home-hero h1 {
    max-width: 900px;
    margin: 0 auto;
    color: var(--ct-ink);
    font-size: clamp(36px, 5vw, 60px);
    font-weight: 750;
    line-height: 1.06;
    letter-spacing: -.04em;
}

.ct-hero-description {
    max-width: 760px;
    margin: 22px auto 0;
    color: #64748b;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.7;
}

.ct-hero-benefits {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.ct-hero-benefits span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    padding: 7px 13px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
}

.ct-hero-benefits strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: #dcfce7;
    color: #15803d;
    font-size: 11px;
    font-weight: 800;
}

.ct-home-search {
    max-width: 760px;
    margin: 0 auto 56px;
}

.ct-home-search input {
    width: 100%;
    height: 58px;
    padding: 0 24px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
    color: var(--ct-ink);
    font-size: 16px;
    font-weight: 400;
    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        transform .2s ease;
}

.ct-home-search input::placeholder {
    color: #94a3b8;
}

.ct-home-search input:hover {
    border-color: #94a3b8;
}

.ct-home-search input:focus {
    border-color: #2563eb;
    box-shadow:
        0 0 0 4px rgba(37, 99, 235, .10),
        0 10px 30px rgba(15, 23, 42, .08);
}

body.dark .ct-home-hero h1 {
    color: #f8fafc;
}

body.dark .ct-hero-description {
    color: #94a3b8;
}

body.dark .ct-hero-benefits span {
    background: #111827;
    border-color: #263244;
    color: #cbd5e1;
}

body.dark .ct-hero-benefits strong {
    background: rgba(34, 197, 94, .15);
    color: #86efac;
}

body.dark .ct-home-search input {
    background: #111827;
    border-color: #334155;
    color: #f8fafc;
}

@media (max-width: 767px) {
    .ct-home-hero {
        margin-bottom: 24px;
    }

    .ct-home-hero .hero-small-title {
        font-size: 12px;
        margin-bottom: 10px;
    }

    .ct-home-hero h1 {
        font-size: clamp(30px, 9vw, 42px);
        line-height: 1.08;
    }

    .ct-hero-description {
        margin-top: 16px;
        font-size: 15px;
        line-height: 1.6;
    }

    .ct-hero-benefits {
        gap: 6px;
        margin-top: 18px;
    }

    .ct-hero-benefits span {
        padding: 6px 9px;
        font-size: 11px;
    }

    .ct-home-search {
        margin-bottom: 38px;
    }

    .ct-home-search input {
        height: 52px;
        padding: 0 16px;
        border-radius: 12px;
        font-size: 14px;
    }
}

/*
|--------------------------------------------------------------------------
| Stage 5: Modern Category Sections + Tool Cards
|--------------------------------------------------------------------------
*/

/* Category section */
.content-sec {
    width: 100%;
    margin-top: 48px;
}

.content-sec .content-sec-inner {
    display: block;
    margin-bottom: 64px;
}

/* Category heading */
.content-sec .content-title-sec {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
}

.content-sec .content-title-sec .content-title-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    border-radius: 12px;
    background: #2563eb;
    box-shadow: none;
}

.content-sec .content-title-sec .content-title-icon svg {
    width: 22px;
    height: 22px;
    max-width: 22px;
    max-height: 22px;
}

.content-sec .content-title-sec .main-subtitle {
    margin: 0;
    color: var(--ct-ink);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -.02em;
}

/* Tool grid */
.content-sec .content-cats-sec {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    width: 100%;
}

/* Reset old Bootstrap/flex sizing */
.content-sec .content-cats-sec .content-cats-col {
    width: auto;
    min-width: 0;
    max-width: none;
    flex: none;
    padding: 0;
    margin: 0;
}

/* Card */
.content-sec .content-cats-inner {
    position: relative;
    top: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 180px;
    padding: 22px;
    overflow: hidden;

    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .04);

    text-decoration: none;
    transition:
        transform .2s ease,
        border-color .2s ease,
        box-shadow .2s ease;
}

.content-sec .content-cats-inner:hover {
    top: 0;
    transform: translateY(-3px);
    border: 1px solid #bfdbfe;
    border-bottom: 1px solid #bfdbfe;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .08);
}

/* Tool icon */
.content-sec .content-cats-inner .content-cats-icon {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0 0 18px;
    border-radius: 12px;
    background: #eff6ff;
}

.content-sec .content-cats-inner .content-cats-icon svg {
    width: 27px;
    height: 27px;
    max-width: 27px;
    max-height: 27px;
}

/*
 * Normalize old SVG artwork.
 * currentColor icons inherit blue automatically.
 */
.content-sec .content-cats-inner .content-cats-icon {
    color: #2563eb;
}

/* Tool title */
.content-sec .content-cats-inner h2 {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;

    margin: 0 0 8px;
    color: var(--ct-ink);

    font-size: 16px;
    font-weight: 650;
    line-height: 1.35;
    white-space: normal;
    text-overflow: initial;
}

/* Tool summary */
.content-sec .content-cats-inner p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;

    width: 100%;
    height: auto;
    max-height: none;
    margin: 0;

    color: #64748b;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.55;
}

/* Locked cards */
.content-sec .content-cats-inner.locked {
    background: #f8fafc;
}

.content-sec .content-cats-inner.locked::after {
    width: 28px;
    height: 28px;
    top: 12px;
    right: 12px;
}

/* Dark mode */
body.dark .content-sec .content-title-sec .main-subtitle {
    color: #f8fafc;
}

body.dark .content-sec .content-cats-inner {
    background: #111827;
    border-color: #263244;
    box-shadow: none;
}

body.dark .content-sec .content-cats-inner:hover {
    border-color: #3b82f6;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .18);
}

body.dark .content-sec .content-cats-inner .content-cats-icon {
    background: #172554;
}

body.dark .content-sec .content-cats-inner h2 {
    color: #f8fafc;
}

body.dark .content-sec .content-cats-inner p {
    color: #94a3b8;
}

body.dark .content-sec .content-cats-inner.locked {
    background: #172033;
}

/* Large tablet */
@media (max-width: 1199px) {
    .content-sec .content-cats-sec {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Tablet */
@media (max-width: 767px) {
    .content-sec {
        margin-top: 36px;
    }

    .content-sec .content-sec-inner {
        margin-bottom: 48px;
    }

    .content-sec .content-title-sec {
        gap: 11px;
        margin-bottom: 16px;
        padding: 0 2px;
    }

    .content-sec .content-title-sec .content-title-icon {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
        border-radius: 10px;
    }

    .content-sec .content-title-sec .content-title-icon svg {
        width: 19px;
        height: 19px;
    }

    .content-sec .content-title-sec .main-subtitle {
        font-size: 21px;
    }

    .content-sec .content-cats-sec {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
    }

    .content-sec .content-cats-inner {
        min-height: 124px;
        padding: 14px 10px;
        border-radius: 12px;
    }

    .content-sec .content-cats-inner:hover {
        transform: none;
    }

    .content-sec .content-cats-inner .content-cats-icon {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
        margin-bottom: 11px;
        border-radius: 9px;
    }

    .content-sec .content-cats-inner .content-cats-icon svg {
        width: 22px;
        height: 22px;
        max-width: 22px;
        max-height: 22px;
    }

    .content-sec .content-cats-inner h2 {
        margin: 0;
        font-size: 12px;
        font-weight: 600;
        line-height: 1.3;
        text-align: left;
    }

    /* Three-column mobile cards need the space for title + icon */
    .content-sec .content-cats-inner p {
        display: none;
    }

    .content-sec .content-cats-inner.locked::after {
        width: 22px;
        height: 22px;
        top: 7px;
        right: 7px;
        background-size: 10px auto;
    }
}

/* Small phones: KEEP 3 TOOLS PER ROW */
@media (max-width: 480px) {
    .content-sec .content-cats-sec {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .content-sec .content-cats-inner {
        min-height: 116px;
        padding: 12px 8px;
    }

    .content-sec .content-cats-inner .content-cats-icon {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
        margin-bottom: 9px;
    }

    .content-sec .content-cats-inner .content-cats-icon svg {
        width: 20px;
        height: 20px;
        max-width: 20px;
        max-height: 20px;
    }

    .content-sec .content-cats-inner h2 {
        font-size: 11px;
        line-height: 1.28;
    }
}

/*
|--------------------------------------------------------------------------
| Stage 5.1: Mobile Tool Card Refinement
|--------------------------------------------------------------------------
*/

@media (max-width: 767px) {

    .content-sec .content-cats-sec {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }

    .content-sec .content-cats-sec .content-cats-col {
        min-width: 0 !important;
        width: auto !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .content-sec .content-cats-inner {
        min-width: 0 !important;
        min-height: 148px !important;
        padding: 13px 10px !important;
        overflow: hidden !important;
        border-radius: 13px !important;
    }

    .content-sec .content-cats-inner .content-cats-icon {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        flex-basis: 36px !important;
        margin: 0 0 10px !important;
        border-radius: 9px !important;
    }

    .content-sec .content-cats-inner .content-cats-icon svg {
        width: 20px !important;
        height: 20px !important;
        max-width: 20px !important;
        max-height: 20px !important;
    }

    /* Two-line title instead of horizontal clipping */
    .content-sec .content-cats-inner h2 {
        display: -webkit-box !important;
        width: 100% !important;
        min-width: 0 !important;

        margin: 0 0 6px !important;

        overflow: hidden !important;
        white-space: normal !important;
        text-overflow: initial !important;

        -webkit-box-orient: vertical !important;
        -webkit-line-clamp: 2 !important;

        overflow-wrap: break-word !important;
        word-break: normal !important;

        font-size: 12px !important;
        font-weight: 650 !important;
        line-height: 1.3 !important;
    }

    /* Restore short descriptions */
    .content-sec .content-cats-inner p {
        display: -webkit-box !important;
        width: 100% !important;
        height: auto !important;
        max-height: none !important;

        margin: 0 !important;
        overflow: hidden !important;

        -webkit-box-orient: vertical !important;
        -webkit-line-clamp: 2 !important;

        overflow-wrap: break-word !important;

        color: #64748b !important;
        font-size: 9.5px !important;
        line-height: 1.4 !important;
    }
}

/* iPhone / small mobile refinement */
@media (max-width: 480px) {

    .content-sec .content-cats-sec {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }

    .content-sec .content-cats-inner {
        min-height: 142px !important;
        padding: 12px 9px !important;
    }

    .content-sec .content-cats-inner h2 {
        font-size: 11.5px !important;
        line-height: 1.28 !important;
    }

    .content-sec .content-cats-inner p {
        font-size: 9px !important;
        line-height: 1.38 !important;
    }
}

/*
|--------------------------------------------------------------------------
| Stage 5.2: Fix Mobile Category Full Width
|--------------------------------------------------------------------------
*/

@media (max-width: 1199px) {

    /* Category becomes one full-width vertical block */
    .content-sec .content-sec-inner {
        display: block !important;
        width: 100% !important;
    }

    /* Category heading must no longer reserve desktop sidebar width */
    .content-sec .content-sec-inner .content-title-sec {
        width: 100% !important;
        max-width: none !important;
        margin-bottom: 20px !important;
    }

    /* Tool grid consumes all remaining page width */
    .content-sec .content-sec-inner .content-cats-sec {
        width: 100% !important;
        max-width: none !important;
        flex: none !important;
    }
}

@media (max-width: 767px) {

    .content-sec {
        width: 100% !important;
    }

    .content-sec .content-sec-inner {
        width: 100% !important;
    }

    .content-sec .content-cats-sec {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        width: 100% !important;
        gap: 10px !important;
    }

    .content-sec .content-cats-col {
        width: 100% !important;
        max-width: none !important;
        flex: none !important;
        min-width: 0 !important;
    }

    .content-sec .content-cats-inner {
        width: 100% !important;
        box-sizing: border-box !important;
    }
}
