/* Single project page extras: medium headings, tag pills, collapsible description, prev/next nav */

/* 1. Medium weight for section headings (template + description content) */
.pj-medium,
.project-description h2,
.project-description h3 {
    font-weight: 500;
}

/* 2. Tag pills (non-clickable) */
.pj-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pj-tag {
    display: inline-flex;
    align-items: center;
    padding: 7px 16px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: #f4f4f5;
    color: #414141;
    font-size: 14px;
    line-height: 1.3;
    white-space: nowrap;
    transition: color 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}

.pj-tag:hover {
    color: var(--color-accent, #5c46dc);
    border-color: var(--color-accent, #5c46dc);
    background: transparent;
}

/* 3. Collapsible description */
.pj-desc {
    position: relative;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.pj-desc.is-collapsed {
    max-height: 240px;
}

.pj-desc.is-collapsed::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 70px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #ffffff);
    pointer-events: none;
}

.pj-more-btn {
    margin-top: 20px;
    cursor: pointer;
    background: transparent;
}

.pj-more-btn .pj-more-icon {
    transform: rotate(90deg);
    transition: transform 0.25s ease;
}

.pj-more-btn.is-open .pj-more-icon {
    transform: rotate(-90deg);
}

/* 4. Prev / next project navigation */
.pj-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    max-width: 1312px;
    margin: 0 auto;
}

.pj-nav-card {
    position: relative;
    display: block;
    width: min(100%, 521px);
    overflow: visible;
}

/* Featured images are transparent compositions that already contain
   the rounded card + devices overflowing it — render them untouched. */
.pj-nav-card .pj-nav-thumb {
    display: block;
    width: 100%;
    height: auto;
}

.pj-nav-btn {
    position: absolute;
    bottom: 43px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    height: 47px;
    padding: 0 24px;
    border-radius: 999px;
    background: #ffffff;
    color: #141414;
    font-size: 16px;
    line-height: 1;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    white-space: nowrap;
    transition: color 0.3s ease;
}

.pj-nav-card:hover .pj-nav-btn {
    color: var(--color-accent, #5c46dc);
}

.pj-nav-card--prev .pj-nav-btn {
    left: 19px;
}

.pj-nav-card--next .pj-nav-btn {
    right: 19px;
}

.pj-nav-counter {
    color: #5b5b5b;
    font-size: 14px;
    text-align: center;
    flex: 1 0 auto;
}

@media (max-width: 767px) {
    .pj-nav {
        flex-direction: column;
        padding: 0 20px;
    }

    .pj-nav-counter {
        order: 3;
    }
}
