:root {
    --wg-tools-primary: #048ce2;
    --wg-tools-primary-dark: #0274bd;
    --wg-tools-title: #17283a;
    --wg-tools-text: #52677a;
    --wg-tools-muted: #75879a;
    --wg-tools-border: #dce6ee;
    --wg-tools-soft: #f5f9fc;
    --wg-tools-blue-soft: #eaf6fd;
    --wg-tools-white: #ffffff;
}

.wg-tools-page-body {
    background: var(--wg-tools-white);
}

.wg-freelancer-tools {
    width: 100%;
    overflow: hidden;
    color: var(--wg-tools-text);
    background: var(--wg-tools-white);
}

.wg-freelancer-tools *,
.wg-freelancer-tools *::before,
.wg-freelancer-tools *::after {
    box-sizing: border-box;
}

.wg-tools-hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 470px;
    padding: 82px 0;
    overflow: hidden;
    background-color: #087fd1;
    background-image: url('../img/cover-place.jpg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

.wg-tools-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        112deg,
        rgba(6, 31, 55, 0.63) 0%,
        rgba(4, 111, 186, 0.45) 50%,
        rgba(6, 31, 55, 0.58) 100%
    );
}

.wg-tools-hero__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.wg-tools-eyebrow {
    display: block;
    margin-bottom: 13px;
    color: var(--wg-tools-primary);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.11em;
}

.wg-tools-hero .wg-tools-eyebrow {
    color: #d9f2ff;
}

.wg-tools-hero h1 {
    max-width: 950px;
    margin: 0;
    color: var(--wg-tools-white);
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.04em;
    text-align: center;
    text-wrap: balance;
    text-shadow: 0 2px 14px rgba(4, 29, 53, 0.25);
}

.wg-tools-hero p {
    max-width: 760px;
    margin: 22px auto 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 17px;
    font-weight: 400;
    line-height: 1.7;
    text-align: center;
}

.wg-tools-hero__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    margin-top: 30px;
    padding: 12px 25px;
    border: 1px solid var(--wg-tools-white);
    border-radius: 5px;
    color: var(--wg-tools-primary);
    font-size: 14px;
    font-weight: 650;
    line-height: 1.2;
    text-decoration: none;
    background: var(--wg-tools-white);
    box-shadow: 0 8px 24px rgba(3, 37, 65, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wg-tools-hero__button:hover,
.wg-tools-hero__button:focus {
    color: var(--wg-tools-primary-dark);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(3, 37, 65, 0.23);
}

.wg-tools-intro,
.wg-tools-directory,
.wg-tools-stacks,
.wg-tools-ai,
.wg-tools-safety,
.wg-tools-workgou {
    padding: 78px 0;
}

.wg-tools-directory,
.wg-tools-ai {
    background: var(--wg-tools-soft);
}

.wg-tools-section-heading {
    width: 100%;
    max-width: 820px;
    margin: 0 auto 42px;
    text-align: center;
}

.wg-tools-section-heading h2 {
    margin: 0;
    color: var(--wg-tools-title);
    font-size: 34px;
    font-weight: 700;
    line-height: 1.22;
    letter-spacing: -0.035em;
    text-align: center;
    text-wrap: balance;
}

.wg-tools-section-heading p {
    max-width: 720px;
    margin: 16px auto 0;
    color: var(--wg-tools-text);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.7;
    text-align: center;
}

.wg-tools-principles,
.wg-tools-stack-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    width: 100%;
    max-width: 1060px;
    margin: 0 auto;
}

.wg-tools-principles article,
.wg-tools-stack-grid article {
    padding: 32px 27px;
    border: 1px solid var(--wg-tools-border);
    border-radius: 6px;
    text-align: center;
    background: var(--wg-tools-white);
}

.wg-tools-principles__number {
    display: block;
    margin-bottom: 15px;
    color: var(--wg-tools-primary);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.1em;
}

.wg-tools-principles h3,
.wg-tools-stack-grid h3 {
    margin: 0 0 12px;
    color: var(--wg-tools-title);
    font-size: 20px;
    font-weight: 650;
    line-height: 1.3;
    text-align: center;
}

.wg-tools-principles p,
.wg-tools-stack-grid p {
    margin: 0;
    color: var(--wg-tools-text);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.65;
    text-align: center;
}

.wg-tools-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 9px;
    max-width: 1000px;
    margin: 0 auto 34px;
}

.wg-tools-filters button {
    min-height: 42px;
    padding: 9px 17px;
    border: 1px solid #ccdbe7;
    border-radius: 5px;
    color: #53687b;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    background: var(--wg-tools-white);
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.wg-tools-filters button:hover,
.wg-tools-filters button:focus,
.wg-tools-filters button.is-active {
    border-color: var(--wg-tools-primary);
    color: var(--wg-tools-white);
    outline: none;
    background: var(--wg-tools-primary);
}

.wg-tools-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
}

.wg-tool-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    min-height: 288px;
    padding: 28px 24px 24px;
    border: 1px solid var(--wg-tools-border);
    border-radius: 6px;
    text-align: center;
    background: var(--wg-tools-white);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.wg-tool-card:hover {
    border-color: #bcdbea;
    transform: translateY(-3px);
    box-shadow: 0 13px 30px rgba(31, 66, 94, 0.08);
}

.wg-tool-card[hidden] {
    display: none !important;
}

.wg-tool-card__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    margin-bottom: 16px;
    border-radius: 50%;
    color: var(--wg-tools-primary);
    font-size: 13px;
    font-weight: 750;
    letter-spacing: -0.02em;
    background: var(--wg-tools-blue-soft);
}

.wg-tool-card__category {
    margin-bottom: 6px;
    color: var(--wg-tools-primary);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.wg-tool-card h3 {
    margin: 0 0 10px;
    color: var(--wg-tools-title);
    font-size: 20px;
    font-weight: 650;
    line-height: 1.3;
    text-align: center;
}

.wg-tool-card p {
    margin: 0 0 20px;
    color: var(--wg-tools-text);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.62;
    text-align: center;
}

.wg-tool-card a {
    margin-top: auto;
    color: var(--wg-tools-primary);
    font-size: 13px;
    font-weight: 650;
    line-height: 1.4;
    text-decoration: none;
}

.wg-tool-card a:hover,
.wg-tool-card a:focus {
    color: var(--wg-tools-primary-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.wg-tools-directory__note,
.wg-tools-reviewed {
    max-width: 760px;
    margin: 28px auto 0;
    color: var(--wg-tools-muted);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.6;
    text-align: center;
}

.wg-tools-stack-grid__icon,
.wg-tools-safety__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 19px;
    border-radius: 50%;
    color: var(--wg-tools-primary);
    background: var(--wg-tools-blue-soft);
}

.wg-tools-stack-grid__icon svg,
.wg-tools-safety__icon svg {
    width: 36px;
    height: 36px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.wg-tools-prompt-list {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.wg-tools-prompt-list details {
    margin-bottom: 12px;
    border: 1px solid var(--wg-tools-border);
    border-radius: 6px;
    background: var(--wg-tools-white);
}

.wg-tools-prompt-list details:last-child {
    margin-bottom: 0;
}

.wg-tools-prompt-list summary {
    position: relative;
    padding: 19px 54px 19px 22px;
    color: var(--wg-tools-title);
    font-size: 15px;
    font-weight: 650;
    line-height: 1.4;
    text-align: left;
    cursor: pointer;
    list-style: none;
}

.wg-tools-prompt-list summary::-webkit-details-marker {
    display: none;
}

.wg-tools-prompt-list summary::after {
    content: '+';
    position: absolute;
    top: 50%;
    right: 22px;
    color: var(--wg-tools-primary);
    font-size: 24px;
    font-weight: 400;
    line-height: 1;
    transform: translateY(-50%);
}

.wg-tools-prompt-list details[open] summary::after {
    content: '−';
}

.wg-tools-prompt-list details > div {
    padding: 0 22px 20px;
}

.wg-tools-prompt-list p {
    margin: 0;
    padding: 18px;
    border-left: 3px solid var(--wg-tools-primary);
    border-radius: 0 5px 5px 0;
    color: var(--wg-tools-text);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.7;
    text-align: left;
    background: var(--wg-tools-soft);
}

.wg-tools-safety__box {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 25px;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 42px;
    border: 1px solid #cce4f3;
    border-radius: 6px;
    background: var(--wg-tools-blue-soft);
}

.wg-tools-safety__icon {
    width: 72px;
    height: 72px;
    margin: 0;
    color: var(--wg-tools-white);
    background: var(--wg-tools-primary);
}

.wg-tools-safety h2 {
    margin: 0;
    color: var(--wg-tools-title);
    font-size: 28px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.03em;
}

.wg-tools-safety p,
.wg-tools-safety li {
    color: var(--wg-tools-text);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.7;
}

.wg-tools-safety p {
    margin: 15px 0;
}

.wg-tools-safety ul {
    margin: 0;
    padding-left: 20px;
}

.wg-tools-safety li {
    margin-bottom: 6px;
}

.wg-tools-safety li:last-child {
    margin-bottom: 0;
}

.wg-tools-safety li::marker {
    color: var(--wg-tools-primary);
}

.wg-tools-workgou {
    border-top: 1px solid var(--wg-tools-border);
}

.wg-tools-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.wg-tools-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 11px 22px;
    border: 1px solid var(--wg-tools-primary);
    border-radius: 5px;
    color: var(--wg-tools-primary);
    font-size: 14px;
    font-weight: 650;
    line-height: 1.2;
    text-decoration: none;
    background: var(--wg-tools-white);
    transition: color 0.2s ease, background 0.2s ease;
}

.wg-tools-actions a:first-child,
.wg-tools-actions a:hover,
.wg-tools-actions a:focus {
    color: var(--wg-tools-white);
    text-decoration: none;
    background: var(--wg-tools-primary);
}

.wg-tools-actions a:first-child:hover,
.wg-tools-actions a:first-child:focus {
    background: var(--wg-tools-primary-dark);
}

@media (max-width: 991.98px) {
    .wg-tools-hero {
        min-height: 420px;
        padding: 68px 0;
    }

    .wg-tools-hero h1 {
        font-size: 2.65rem;
    }

    .wg-tools-intro,
    .wg-tools-directory,
    .wg-tools-stacks,
    .wg-tools-ai,
    .wg-tools-safety,
    .wg-tools-workgou {
        padding: 66px 0;
    }

    .wg-tools-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .wg-tools-principles,
    .wg-tools-stack-grid {
        gap: 16px;
    }
}

@media (max-width: 767.98px) {
    .wg-tools-hero {
        min-height: 370px;
        padding: 58px 0;
    }

    .wg-tools-hero h1 {
        font-size: 2.15rem;
        line-height: 1.16;
    }

    .wg-tools-hero p {
        margin-top: 18px;
        font-size: 15px;
        line-height: 1.65;
    }

    .wg-tools-intro,
    .wg-tools-directory,
    .wg-tools-stacks,
    .wg-tools-ai,
    .wg-tools-safety,
    .wg-tools-workgou {
        padding: 52px 0;
    }

    .wg-tools-section-heading {
        margin-bottom: 32px;
    }

    .wg-tools-section-heading h2 {
        font-size: 27px;
        line-height: 1.28;
    }

    .wg-tools-section-heading p {
        margin-top: 13px;
        font-size: 15px;
        line-height: 1.65;
    }

    .wg-tools-principles,
    .wg-tools-stack-grid,
    .wg-tools-grid {
        grid-template-columns: 1fr;
    }

    .wg-tools-principles article,
    .wg-tools-stack-grid article {
        padding: 27px 22px;
    }

    .wg-tools-filters {
        justify-content: flex-start;
        flex-wrap: nowrap;
        margin-right: -15px;
        margin-left: -15px;
        padding: 0 15px 5px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .wg-tools-filters button {
        flex: 0 0 auto;
    }

    .wg-tool-card {
        min-height: 0;
        padding: 25px 21px;
    }

    .wg-tools-safety__box {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 29px 23px;
        text-align: center;
    }

    .wg-tools-safety__icon {
        margin: 0 auto;
    }

    .wg-tools-safety h2 {
        font-size: 25px;
        text-align: center;
    }

    .wg-tools-safety p {
        text-align: center;
    }

    .wg-tools-safety ul {
        display: inline-block;
        max-width: 540px;
        margin: 0 auto;
        text-align: left;
    }

    .wg-tools-actions {
        flex-direction: column;
        align-items: stretch;
        max-width: 330px;
        margin: 0 auto;
    }

    .wg-tools-actions a {
        width: 100%;
    }
}

@media (max-width: 419.98px) {
    .wg-tools-hero h1 {
        font-size: 1.95rem;
    }

    .wg-tools-section-heading h2 {
        font-size: 25px;
    }

    .wg-tools-prompt-list summary {
        padding: 17px 48px 17px 18px;
    }

    .wg-tools-prompt-list summary::after {
        right: 18px;
    }

    .wg-tools-prompt-list details > div {
        padding: 0 18px 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wg-freelancer-tools *,
    .wg-freelancer-tools *::before,
    .wg-freelancer-tools *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
