.projects-featured {
    position: relative;
    min-height: clamp(680px, 54vw, 740px);
    overflow: hidden;
    isolation: isolate;
    padding: clamp(72px, 6.2vw, 84px) 24px clamp(72px, 6.4vw, 86px);
    background: #100753;
    color: #ffffff;
    font-family: "Poppins", sans-serif;
}

.projects-featured::before,
.projects-featured::after {
    content: "";
    position: absolute;
    z-index: 0;
    width: clamp(260px, 28vw, 430px);
    aspect-ratio: 1;
    border-radius: 50%;
    filter: blur(28px);
    pointer-events: none;
    animation: backgroundFloat 22s ease-in-out infinite;
}

.projects-featured::before {
    top: 8%;
    right: 10%;
    background: rgba(102, 51, 255, 0.15);
}

.projects-featured::after {
    left: 8%;
    bottom: 4%;
    background: rgba(0, 255, 255, 0.08);
    animation-duration: 25s;
    animation-delay: -7s;
}

.projects-featured img {
    display: block;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    user-select: none;
}

.projects-container {
    position: relative;
    z-index: 1;
    width: min(100%, 1242px);
    margin: 0 auto;
}

.projects-container h2 {
    margin: 0 0 clamp(30px, 3.4vw, 46px) clamp(-120px, -8.5vw, -74px);
    color: #ffffff;
    font-size: clamp(2.15rem, 2.95vw, 3.5rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(30px, 3vw, 43px);
}

.card-project {
    --project-glow: rgba(63, 204, 255, 0.42);
    --project-border: rgba(63, 204, 255, 0.72);
    --project-tint: rgba(28, 152, 216, 0.16);
    position: relative;
    height: clamp(540px, 40vw, 575px);
    border-radius: 28px;
    border: 1.5px solid var(--project-border);
    background:
        radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.14), transparent 35%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.12), transparent 30%),
        linear-gradient(180deg, var(--project-tint), rgba(26, 16, 119, 0.34));
    backdrop-filter: blur(15px) saturate(145%);
    -webkit-backdrop-filter: blur(15px) saturate(145%);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.08),
        inset 0 24px 42px rgba(255, 255, 255, 0.06),
        0 0 8px var(--project-border),
        0 0 18px var(--project-glow),
        0 18px 32px rgba(0, 0, 0, 0.22);
    overflow: hidden;
    isolation: isolate;
    transform: translateY(0);
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.card-project:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.78);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.12),
        inset 0 24px 42px rgba(255, 255, 255, 0.08),
        0 0 10px var(--project-border),
        0 0 28px var(--project-glow),
        0 24px 40px rgba(0, 0, 0, 0.28);
}

.card-project-mobile {
    --project-glow: rgba(172, 76, 255, 0.48);
    --project-border: rgba(176, 83, 255, 0.72);
    --project-tint: rgba(120, 54, 210, 0.18);
}

.card-project-design {
    --project-glow: rgba(29, 236, 178, 0.48);
    --project-border: rgba(30, 232, 185, 0.72);
    --project-tint: rgba(28, 202, 168, 0.16);
}

.card-project::before,
.card-project::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.card-project::before {
    inset: 1px;
    z-index: 0;
    border-radius: 26px;
    background:
        radial-gradient(circle at 12% 8%, rgba(255, 255, 255, 0.2), transparent 28%),
        radial-gradient(circle at 88% 88%, var(--project-glow), transparent 34%);
    opacity: 0.52;
}

.card-project::after {
    top: 0;
    left: 8%;
    right: 8%;
    z-index: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent);
    opacity: 0.76;
}

.card-project-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: fill;
    opacity: 0;
    pointer-events: none;
}

.card-project-inner {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    row-gap: clamp(11px, 1vw, 15px);
    padding: clamp(18px, 1.7vw, 21px) clamp(18px, 1.7vw, 21px) clamp(38px, 3.3vw, 48px);
}

.card-project-category {
    width: max-content;
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #bff9ff;
    font-size: clamp(0.76rem, 0.92vw, 0.86rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.card-project-media {
    width: 100%;
    height: clamp(190px, 16.1vw, 224px);
    flex: 0 0 clamp(190px, 16.1vw, 224px);
    border-radius: 18px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.card-project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease, filter 0.45s ease;
}

.card-project:hover .card-project-image {
    filter: saturate(1.08) contrast(1.03);
    transform: scale(1.045);
}

.card-project-media-sales .card-project-image {
    width: 112%;
    height: 112%;
    max-width: none;
    object-fit: cover;
    transform: translate(-5.5%, -5.5%);
}

.card-project-sales:hover .card-project-media-sales .card-project-image {
    transform: translate(-5.5%, -5.5%) scale(1.045);
}

.card-project h3 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(1.25rem, 1.55vw, 1.45rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0;
}

.card-project p {
    max-width: 34ch;
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(0.92rem, 1.08vw, 1.03rem);
    font-weight: 500;
    line-height: 1.24;
    letter-spacing: 0;
    overflow: hidden;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    align-content: start;
    gap: 8px;
    margin-bottom: clamp(10px, 1.3vw, 18px);
}

.project-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 27px;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.075);
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1;
}

.project-button {
    position: relative;
    z-index: 1;
    width: clamp(172px, 13.9vw, 196px);
    height: clamp(46px, 3.8vw, 52px);
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    align-self: end;
    margin-top: auto;
    margin-bottom: 0;
    padding: 0 clamp(7px, 0.8vw, 9px) 0 clamp(16px, 1.35vw, 19px);
    border: 1px solid var(--project-border);
    border-radius: 999px;
    background:
        radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.24), transparent 42%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04)),
        rgba(24, 18, 108, 0.34);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.09),
        inset 0 10px 18px rgba(255, 255, 255, 0.07),
        0 0 8px var(--project-border),
        0 0 16px var(--project-glow);
    backdrop-filter: blur(12px) saturate(150%);
    -webkit-backdrop-filter: blur(12px) saturate(150%);
    color: #ffffff;
    text-decoration: none;
    font-size: clamp(0.9rem, 1.1vw, 1rem);
    font-weight: 600;
    line-height: 1;
    overflow: hidden;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.project-button::before {
    content: "";
    position: absolute;
    inset: 1px;
    z-index: 0;
    border-radius: inherit;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.18), transparent 38%),
        radial-gradient(circle at 88% 50%, var(--project-glow), transparent 38%);
    opacity: 0.72;
    pointer-events: none;
}

.project-button:hover {
    transform: translateY(-2px);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.13),
        inset 0 10px 18px rgba(255, 255, 255, 0.1),
        0 0 10px var(--project-border),
        0 0 22px var(--project-glow);
}

.project-button-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: fill;
    opacity: 0;
    pointer-events: none;
}

.project-button span {
    position: relative;
    z-index: 1;
    white-space: nowrap;
}

.project-button-arrow {
    position: relative;
    z-index: 1;
    width: clamp(25px, 2.15vw, 30px);
    aspect-ratio: 1;
    object-fit: contain;
    transition: transform 0.35s ease;
}

.project-button:hover .project-button-arrow {
    transform: translateX(5px);
}

@keyframes backgroundFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

@media (max-width: 1100px) {
    .projects-container {
        width: min(100%, 850px);
        margin-inline: auto;
        text-align: center;
    }

    .projects-container h2 {
        display: block;
        width: min(100%, 760px);
        max-width: calc(100vw - 48px);
        margin: 0 auto clamp(30px, 3.4vw, 46px) !important;
        padding: 0;
        text-align: center;
        transform: none;
    }

    .projects-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        justify-content: center;
        justify-items: center;
    }

    .card-project {
        width: min(100%, 400px);
        height: 560px;
    }
}

@media (max-width: 720px) {
    .projects-featured {
        padding: 58px 18px 70px;
    }

    .projects-container {
        width: min(100%, 420px);
        margin-inline: auto;
        text-align: center;
    }

    .projects-container h2 {
        display: block;
        width: 100%;
        max-width: calc(100vw - 36px);
        margin: 0 auto 30px !important;
        padding: 0;
        text-align: center;
        transform: none;
        font-size: clamp(2.3rem, 10vw, 3rem);
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        justify-items: center;
    }

    .card-project {
        width: min(100%, 390px);
        height: auto;
        min-height: 0;
    }

    .card-project-inner {
        height: auto;
        row-gap: 14px;
    }

    .card-project-category,
    .card-project-media,
    .card-project h3,
    .card-project p,
    .project-tags,
    .project-button {
        flex: 0 0 auto;
    }

    .project-tags {
        margin-bottom: 0;
        gap: 8px;
    }

    .project-button {
        align-self: center;
        margin-top: 4px;
    }
}

@media (max-width: 420px) {
    .projects-featured {
        padding-inline: 14px;
    }

    .card-project-inner {
        padding: 16px 16px 22px;
        row-gap: 12px;
    }

    .card-project-media {
        height: 188px;
        flex-basis: 188px;
    }

    .card-project h3 {
        font-size: 1.32rem;
    }

    .card-project p {
        font-size: 1.03rem;
    }

    .project-button {
        width: min(100%, 222px);
        min-width: 182px;
        min-height: 50px;
        align-self: center;
        margin-top: 2px;
        padding-left: 17px;
    }
}
