/* YOANDRY PORTFOLIO — PROJETOS */

/* GENERAL */

.pk-projects-featured,
.pk-projects-all {
    width: 100%;
}

.pk-projects-container {
    width: min(90%, calc(100% - 96px));
    margin: 0 auto;
}

/* SECTION HEADINGS */

.pk-projects-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 36px;
}

.pk-projects-section-kicker {
    display: block;
    margin-bottom: 10px;
    color: var(--pk-color-accent);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.pk-projects-section-heading h2,
.pk-projects-all-heading {
    margin: 0;
    color: #111827;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.08;
    font-weight: 800;
}

.pk-projects-section-link {
    color: var(--pk-color-accent);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.pk-projects-section-link:hover {
    opacity: 0.75;
}

/* FEATURED PROJECTS */

.pk-projects-featured {
    padding: 90px 0;
}

/*
 * Featured grid
 */

.pk-projects-featured-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

/*
 * Featured card
 */

.pk-featured-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border-radius: 24px;
    background: #111827;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
    transition: transform 0.35s ease,
        box-shadow 0.35s ease;
}

.pk-featured-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 55px rgba(15, 23, 42, 0.15);
}

/*
 * Image
 */

.pk-featured-card-image {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: #e5e7eb;
}

.pk-featured-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.2, 0.65, 0.3, 1),
        filter 0.4s ease;
}

.pk-featured-card:hover
.pk-featured-card-image img {
    transform: scale(1.06);
}

/*
 * Gradient overlay * * Stronger at the bottom so text remains * readable regardless of the project image.
 */

.pk-featured-card-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
            180deg,
            rgba(15, 23, 42, 0.04) 0%,
            rgba(15, 23, 42, 0.08) 35%,
            rgba(15, 23, 42, 0.35) 55%,
            rgba(15, 23, 42, 0.94) 100%
        );
    transition: background 0.35s ease;
}

.pk-featured-card:hover
.pk-featured-card-overlay {
    background: linear-gradient(
            180deg,
            rgba(15, 23, 42, 0.08) 0%,
            rgba(15, 23, 42, 0.12) 30%,
            rgba(15, 23, 42, 0.42) 55%,
            rgba(15, 23, 42, 0.97) 100%
        );
}

/*
 * Content
 */

.pk-featured-card-content {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
    padding: 28px;
}

/*
 * Category
 */

.pk-featured-card-category {
    display: inline-flex;
    align-items: center;
    margin-bottom: 12px;
    padding: 7px 11px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: var(--pk-color-white);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/*
 * Title
 */

.pk-featured-card-title {
    margin: 0 0 9px;
    color: var(--pk-color-white);
    font-size: clamp(23px, 2.2vw, 30px);
    line-height: 1.12;
    font-weight: 800;
}

/*
 * Description
 */

.pk-featured-card-description {
    display: -webkit-box;
    margin: 0 0 16px;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

/*
 * Technology tags
 */

.pk-featured-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 18px;
}

.pk-featured-card-tag {
    padding: 6px 9px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.88);
    font-size: 10px;
    font-weight: 600;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/*
 * CTA
 */

.pk-featured-card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--pk-color-white);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: gap 0.25s ease,
        opacity 0.25s ease;
}

.pk-featured-card-link:hover {
    gap: 12px;
    color: var(--pk-color-white);
    opacity: 0.9;
}

/* ALL PROJECTS */

.pk-projects-all {
    padding: 90px 0;
}

.pk-projects-all-heading {
    margin-bottom: 0;
}

/* CONTROLS */

.pk-projects-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 42px;
}

/* FILTERS */

.pk-projects-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.pk-project-filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: var(--pk-color-white);
    color: #4b5563;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.pk-project-filter:hover {
    border-color: var(--pk-color-accent);
    color: var(--pk-color-accent);
    transform: translateY(-1px);
}

.pk-project-filter.is-active {
    border-color: var(--pk-color-accent);
    background: var(--pk-color-accent);
    color: var(--pk-color-white);
}

/* SEARCH / ORDER */

.pk-projects-search-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.pk-project-search {
    width: 230px;
    height: 44px;
    padding: 0 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: var(--pk-color-white);
    color: #111827;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.pk-project-search::placeholder {
    color: #9ca3af;
}

.pk-project-search:focus {
    border-color: var(--pk-color-accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.pk-project-search-button {
    height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 12px;
    background: #111827;
    color: var(--pk-color-white);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease,
        transform 0.2s ease;
}

.pk-project-search-button:hover {
    background: var(--pk-color-accent);
    transform: translateY(-1px);
}

.pk-project-order {
    height: 44px;
    padding: 0 38px 0 14px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: var(--pk-color-white);
    color: #374151;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
}

.pk-project-order:focus {
    border-color: var(--pk-color-accent);
}

.pk-projects-search-submit {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* AJAX RESULTS */

.pk-projects-results {
    position: relative;
    min-height: 100px;
    transition: opacity 0.2s ease;
}

.pk-projects-results.is-loading {
    opacity: 0.45;
    pointer-events: none;
}

.pk-projects-results.is-loading::after {
    content: "Carregando projetos...";
    position: absolute;
    top: 20px;
    left: 50%;
    z-index: 10;
    padding: 8px 14px;
    border-radius: 999px;
    background: #111827;
    color: var(--pk-color-white);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    transform: translateX(-50%);
}

/* PROJECT GRID */

.pk-projects-all-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px;
}

/* PROJECT CARD */

.pk-project-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border: 1px solid #eef0f4;
    border-radius: 22px;
    background: var(--pk-color-white);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
    transition: transform 0.25s ease,
        box-shadow 0.25s ease;
}

.pk-project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.09);
}

.pk-project-card-image {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #f3f4f6;
}

.pk-project-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.pk-project-card:hover .pk-project-card-image img {
    transform: scale(1.04);
}

.pk-project-card-category {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--pk-color-accent);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.pk-project-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 22px;
}

.pk-project-card-title {
    margin: 0 0 10px;
    color: #111827;
    font-size: 21px;
    line-height: 1.2;
    font-weight: 750;
}

.pk-project-card-description {
    margin: 0 0 18px;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.65;
}

.pk-project-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
    margin-bottom: 20px;
}

.pk-project-card-tag {
    padding: 6px 9px;
    border-radius: 7px;
    background: #f3f6fb;
    color: #4b5563;
    font-size: 11px;
    font-weight: 600;
}

.pk-project-card-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--pk-color-accent);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.pk-project-card-link:hover {
    color: var(--pk-color-primary-hover);
}

/* PAGINATION */

.pk-projects-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 48px;
}

.pk-project-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: var(--pk-color-white);
    color: #374151;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.pk-project-page:hover {
    border-color: var(--pk-color-accent);
    color: var(--pk-color-accent);
}

.pk-project-page.is-active {
    border-color: var(--pk-color-accent);
    background: var(--pk-color-accent);
    color: var(--pk-color-white);
}

/* EMPTY STATE */

.pk-projects-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    padding: 40px;
    border: 1px dashed #d1d5db;
    border-radius: 20px;
    background: #f9fafb;
    text-align: center;
}

.pk-projects-empty p {
    margin: 0;
    color: #6b7280;
    font-size: 15px;
    line-height: 1.6;
}

/* RESPONSIVE — 1100px */

@media (max-width: 1100px) {
    .pk-projects-all-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .pk-projects-controls {
        align-items: flex-start;
        flex-direction: column;
    }

    .pk-projects-search-form {
        width: 100%;
    }

    .pk-project-search {
        flex: 1;
        width: auto;
    }
}

/* RESPONSIVE — 900px */

@media (max-width: 900px) {
    .pk-projects-container {
        width: min(
            100% - 48px,
            760px
        );
    }

    .pk-projects-featured-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pk-projects-all-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pk-projects-featured,
    .pk-projects-all {
        padding: 70px 0;
    }

    .pk-featured-card-image {
        aspect-ratio: 4 / 5;
    }
}

/* RESPONSIVE — 600px */

@media (max-width: 600px) {
    .pk-projects-container {
        width: calc(100% - 32px);
    }

    .pk-projects-section-heading {
        align-items: flex-start;
        flex-direction: column;
        margin-bottom: 28px;
    }

    .pk-projects-featured-grid,
    .pk-projects-all-grid {
        grid-template-columns: 1fr;
    }

    .pk-featured-card-image {
        aspect-ratio: 4 / 5;
    }

    .pk-featured-card-content {
        padding: 24px;
    }

    .pk-featured-card-title {
        font-size: 25px;
    }

    .pk-projects-filters {
        width: 100%;
    }

    .pk-project-filter {
        min-height: 40px;
        padding: 0 15px;
    }

    .pk-projects-search-form {
        display: grid;
        grid-template-columns: 1fr auto;
        width: 100%;
    }

    .pk-project-search {
        width: 100%;
    }

    .pk-project-search-button {
        width: auto;
    }

    .pk-project-order {
        grid-column: 1 / -1;
        width: 100%;
    }

    .pk-projects-featured,
    .pk-projects-all {
        padding: 55px 0;
    }

    .pk-project-card-body {
        padding: 20px;
    }
}
