/* ============================= */
/* Projects                      */
/* ============================= */

.projects-tabs {
    display: flex;
    align-items: flex-end;
    gap: 48px;

    margin-bottom: 0;
    padding-left: 0;
}

.project-tab {
    padding: 24px 32px;
    border: none;
    background: transparent;
    color: var(--color-primary);

    font-family: var(--font-body);
    font-weight: var(--fw-medium);
    font-size: 30px;
    line-height: 120%;

    cursor: pointer;
}

.project-tab.active {
    padding: 24px 32px;
    border-radius: 24px 24px 0 0;

    background-color: rgba(137, 188, 217, 0.08);
    color: var(--color-secondary);
}

.project-tab:hover {
    color: var(--color-secondary);
}

.projects-content {
    background-color: rgba(137, 188, 217, 0.08);
    border-radius: 0 24px 24px 24px;
}

.project-panel {
    display: none;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 64px;

    min-height: 560px;
    padding: 48px 80px;
}

.project-panel.active {
    display: grid;
}

.project-info {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.project-text-block h3 {
    margin: 0 0 8px;

    color: var(--color-primary);
    font-family: var(--font-headline);
    font-weight: var(--fw-regular);
    font-size: 28px;
    line-height: 120%;
}

.project-text-block p {
    margin: 0;

    color: var(--color-secondary);
    font-family: var(--font-body);
    font-weight: var(--fw-regular);
    font-size: 18px;
    line-height: 130%;
}

.project-headline-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
}

.project-headline-row span {
    color: var(--color-secondary);
    font-family: var(--font-body);
    font-weight: var(--fw-regular);
    font-size: 14px;
    line-height: 120%;
    white-space: nowrap;
}

.project-preview {
    max-width: 520px;
    justify-self: center;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.project-technologies {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.project-technologies span {
    color: var(--color-primary);
    font-family: var(--font-headline);
    font-weight: var(--fw-regular);
    font-size: 18px;
    line-height: 120%;
}

.project-tech-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
}

.project-tech-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.project-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
}

.project-btn {
    min-width: 112px;
    padding: 10px 24px;

    font-size: 16px;
    line-height: 120%;
}

.project-btn--primary {
    background-color: var(--color-primary);
    color: var(--color-background);
}

.project-btn--primary:hover {
    background-color: var(--color-secondary);
}

.project-btn--outline {
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
}

.project-btn--outline:hover {
    background-color: rgba(248, 245, 236, 0.12);
}

.project-image-wrapper {
    width: 100%;
    aspect-ratio: 16 / 10;

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

    overflow: hidden;
    border-radius: 24px;
}

.project-image {
    width: 100%;
    height: 100%;
    display: block;

    object-fit: cover;
}

.project-text-block {
    position: relative;
    padding-left: 48px;
}

.project-text-block::before {
    content: "";
    position: absolute;

    width: 24px;
    height: 24px;

    background-image: url("../assets/icons/ellipse-8.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;

    top: 2px;
    left: 0;
}

/* ============================= */
/* Projects Mobile               */
/* ============================= */

@media (max-width: 1024px) {
    .projects-tabs {
        width: calc(100% + 48px);
        margin-left: -24px;
        margin-right: -24px;
        box-sizing: border-box;

        justify-content: flex-start;
        gap: 0;
    }

    .project-tab {
        flex: 1 1 0;
        min-width: 0;

        padding: 14px 6px;
        font-size: 15px;
        text-align: center;
        white-space: normal;
    }

    .project-tab.active {
        padding: 14px 6px;
        border-radius: 16px 16px 0 0;
    }

    .projects-content {
        width: calc(100% + 48px);
        margin-left: -24px;
        margin-right: -24px;
    }

    .project-panel.active {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 40px;

        min-height: auto;
        padding: 32px 24px;
    }

    .project-preview {
        display: contents;
    }

    .project-technologies {
        order: 1;
        gap: 8px;
    }

    .project-tech-icons {
        gap: 14px;
    }

    .project-tech-icon {
        width: 32px;
        height: 32px;
    }

    .project-image-wrapper {
        order: 2;

        border-radius: 16px;
        aspect-ratio: 16 / 9;
    }

    .project-info {
        order: 3;
        gap: 32px;
    }

    .project-text-block {
        padding-left: 40px;
    }

    .project-text-block h3 {
        font-size: 20px;
    }

    .project-text-block p {
        font-size: 16px;
        line-height: 130%;
    }

    .project-text-block::before {
        width: 24px;
        height: 24px;
    }

    .project-headline-row {
        flex-direction: column;
        gap: 4px;
    }

    .project-headline-row span {
        font-size: 14px;
        white-space: normal;
    }

    .project-actions {
        order: 4;

        width: 100%;
        gap: 16px;
    }

    .project-btn {
        flex: 1;
        min-width: 0;
        padding: 10px 16px;
        font-size: 16px;
    }

    .projects-tabs:has(.project-tab:first-child.active)+.projects-content {
        border-radius: 0 16px 16px 16px;
    }

    .projects-tabs:has(.project-tab:last-child.active)+.projects-content {
        border-radius: 16px 0 16px 16px;
    }

    .projects-tabs:has(.project-tab:not(:first-child):not(:last-child).active)+.projects-content {
        border-radius: 16px;
    }
}


/* ============================= */
/* Projects Tablet Refinement    */
/* ============================= */

@media (min-width: 768px) and (max-width: 1024px) {

    .projects-tabs,
    .projects-content {
        width: 100%;
        max-width: 760px;
        margin-left: auto;
        margin-right: auto;
    }

    .project-panel.active {
        padding: 40px 48px;
        gap: 48px;
    }

    .project-image-wrapper {
        max-width: 560px;
        margin: 0 auto;
    }

    .project-info {
        max-width: 640px;
        margin: 0 auto;
    }

    .project-actions {
        max-width: 560px;
        margin: 0 auto;
    }

    .project-btn {
        padding: 12px 28px;
        font-size: 18px;
    }

    .project-text-block h3 {
        font-size: 24px;
    }

    .project-text-block p {
        font-size: 18px;
        line-height: 130%;
    }

    .project-headline-row span {
        font-size: 16px;
    }
}

/* ============================= */
/* Projects Small Desktop        */
/* ============================= */

@media (min-width: 1025px) and (max-width: 1199px) {
    .project-preview {
        align-self: center;
    }

    .projects-tabs {
        gap: 24px;
    }

    .project-tab {
        padding: 20px 24px;
        font-size: 24px;
    }

    .project-tab.active {
        padding: 20px 24px;
    }
}