/* ===== 工具内容页布局 ===== */
.tools-contents-page {
    display: block;
    min-height: 100vh;
    width: min(1350px, calc(100vw - 340px));
    max-width: none;
    margin-left: max(300px, calc(260px + (100vw - 260px - 1350px) / 2));
    margin-right: 0;
}

.tools-contents-page > .flexwrapper,
.tools-contents-page .tools-section {
    width: 100%;
}

.tools-contents-page > .flexwrapper {
    min-height: 100vh;
}

.tools-contents-page .tools-section {
    min-height: 100vh;
    align-items: stretch;
    justify-content: center;
    padding: 96px 0 72px;
}

.tools-contents-page .tools-section > .header,
.tools-contents-page .tools-section > .main-content,
.tools-contents-page .tools-section > .categories-container {
    width: min(1120px, 100%);
    align-self: center;
    flex-shrink: 0;
}

@media (min-width: 1001px) and (max-width: 1280px) {
    .sidebar[data-collapsed="true"] ~ .tools-contents-page {
        width: calc(100vw - 140px);
        margin-left: 100px;
    }
}

@media (max-width: 1000px) {
    .tools-contents-page {
        position: relative;
        left: 50%;
        width: 100vw;
        max-width: 100vw;
        margin-left: 0;
        margin-right: 0;
        transform: translateX(-50%);
    }

    .tools-contents-page .tools-section {
        min-height: auto;
        padding: 88px 16px 48px;
    }
}

/* ===== 工具内容页标题 ===== */
.tools-contents-page .tools-section .header h1 {
    margin: 0;
    font-size: 1.8rem;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.tools-contents-page .tools-section .header h1 span {
    margin-left: 10px;
    font-size: 1.1rem;
    font-weight: 500;
}

.tools-contents-page .tools-section .header {
    margin-top: 0;
    margin-bottom: 28px;
}

@media (min-width: 1001px) {
    .tools-contents-page .tools-section > .container {
        width: 100%;
        max-width: 1350px;
        padding: 40px;
    }

    .tools-contents-page .tools-section .header,
    .tools-contents-page .tools-section .main-content,
    .tools-contents-page .tools-section .categories-container {
        width: 100%;
        max-width: none;
    }

    .tools-contents-page .tools-section .main-content {
        justify-content: space-between;
        gap: 72px;
    }

    .tools-contents-page .tools-section .illustration {
        flex: 0 0 280px;
        width: 280px;
        height: 280px;
    }

    .tools-contents-page .tools-section .testimonial-card {
        flex: 0 1 760px;
        max-width: 760px;
    }

    .tools-contents-page .tools-section .categories-container {
        grid-template-columns: minmax(170px, 220px) minmax(0, 1fr);
        column-gap: 48px;
    }
}

@media (max-width: 600px) {
    .tools-contents-page .tools-section .header {
        margin-bottom: 20px;
        text-align: center;
    }

    .tools-contents-page .tools-section .header h1 {
        display: flex;
        align-items: baseline;
        justify-content: center;
        gap: 8px;
        white-space: nowrap;
        font-size: 1.45rem;
    }

    .tools-contents-page .tools-section .header h1 span {
        display: inline;
        margin: 0;
        font-size: 0.9rem;
    }

    .tools-contents-page .tools-section .categories-container {
        grid-template-columns: minmax(84px, 0.34fr) minmax(0, 1fr);
        column-gap: 10px;
        row-gap: 16px;
        align-items: start;
        width: calc(100% - 18px);
    }

    .tools-contents-page .tools-section .category-card {
        width: 100%;
        min-width: 0;
        padding: 7px 6px;
        font-size: 0.88rem;
        line-height: 1.45;
        white-space: normal;
    }

    .tools-contents-page .tools-section .category-logos {
        min-width: 0;
        width: 100%;
        gap: 8px;
        padding: 0;
    }

    .tools-contents-page .tools-section .logo-item {
        min-width: 0;
        gap: 7px;
        padding: 5px 8px 5px 6px;
        font-size: 0.9rem;
    }

    .tools-contents-page .tools-section .logo-icon {
        width: auto;
        height: 28px;
        max-width: 84px;
    }
}
