/* ==========================================================================
   OPEN ASSIGNMENTS — PUBLIC PAGE
   ========================================================================== */

.assignments-page {
    background: #f5f3ee;
}

.assignments-hero {
    padding: 62px 0 50px;
    background:
        radial-gradient(circle at 86% 22%, rgba(214, 242, 75, .24), transparent 22%),
        #f5f3ee;
}

.assignments-hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 40px;
}

.assignments-hero__content {
    max-width: 760px;
}

.assignments-hero__eyebrow {
    margin: 0 0 13px;
    color: #0f1a2a;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.assignments-hero h1 {
    color: #0f1a2a;
    font-size: clamp(2.8rem, 5vw, 5rem);
    font-weight: 600;
    line-height: .98;
    letter-spacing: -.05em;
}

.assignments-hero__content > p:last-child {
    max-width: 690px;
    margin-top: 17px;
    color: #545d67;
    font-size: 1rem;
    line-height: 1.62;
}

.assignments-hero__aside {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 7px 10px;
    min-width: 255px;
    padding: 18px 20px;
    border: 1px solid rgba(15, 26, 42, .08);
    border-radius: 16px;
    background: rgba(255, 255, 255, .72);
}

.assignments-hero__signal {
    position: relative;
    grid-row: 1 / span 2;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #9bbd1a;
}

.assignments-hero__signal::after {
    content: "";
    position: absolute;
    inset: -5px;
    border: 1px solid rgba(155, 189, 26, .35);
    border-radius: inherit;
}

.assignments-hero__aside strong {
    color: #0f1a2a;
    font-size: .86rem;
    font-weight: 600;
}

.assignments-hero__aside small {
    color: #69717c;
    font-size: .72rem;
}

.assignments-browser {
    padding: 0 0 88px;
}

.assignment-filters {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) 180px 170px auto auto;
    align-items: end;
    gap: 10px;
    margin-bottom: 30px;
    padding: 14px;
    border: 1px solid rgba(15, 26, 42, .08);
    border-radius: 18px;
    background: rgba(255, 255, 255, .86);
    box-shadow: 0 14px 36px rgba(15, 26, 42, .04);
}

.assignment-filters__search {
    position: relative;
}

.assignment-filters__search svg {
    position: absolute;
    top: 50%;
    left: 15px;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    fill: none;
    stroke: #67707c;
    stroke-width: 1.7;
    stroke-linecap: round;
}

.assignment-filters input,
.assignment-filters select {
    width: 100%;
    height: 48px;
    border: 1px solid #d9d9d4;
    border-radius: 12px;
    background: #fff;
    color: #0f1a2a;
    outline: none;
}

.assignment-filters input {
    padding: 0 15px 0 44px;
}

.assignment-filters select {
    padding: 0 36px 0 13px;
}

.assignment-filters input:focus,
.assignment-filters select:focus {
    border-color: rgba(15, 26, 42, .38);
    box-shadow: 0 0 0 3px rgba(214, 242, 75, .24);
}

.assignment-filters__field {
    display: grid;
    gap: 6px;
}

.assignment-filters__field > span {
    color: #66707a;
    font-size: .68rem;
    font-weight: 600;
}

.assignment-filters__button,
.assignment-filters__reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border-radius: 12px;
    font-size: .8rem;
    font-weight: 600;
}

.assignment-filters__button {
    gap: 9px;
    border: 0;
    padding: 0 18px;
    background: #0f1a2a;
    color: #fff;
}

.assignment-filters__button span {
    color: #d6f24b;
}

.assignment-filters__reset {
    padding: 0 12px;
    color: #606975;
}

.assignment-results-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 16px;
}

.assignment-results-head p {
    color: #6a727c;
    font-size: .82rem;
}

.assignment-results-head strong {
    color: #0f1a2a;
}

.assignment-results-head a {
    color: #0f1a2a;
    font-size: .8rem;
    font-weight: 600;
}

.assignment-results-head a span {
    color: #8ba913;
}

.assignment-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.assignment-card {
    position: relative;
    overflow: hidden;
    min-height: 380px;
    border: 1px solid rgba(15, 26, 42, .08);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 26, 42, .035);
}

.assignment-card__body {
    height: 100%;
    padding: 20px;
    transition: filter 180ms ease, transform 180ms ease, opacity 180ms ease;
}

.assignment-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.assignment-status,
.assignment-mode {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: .66rem;
    font-weight: 600;
}

.assignment-status--open {
    background: #d6f24b;
    color: #0f1a2a;
}

.assignment-status--reviewing {
    background: #efe8d8;
    color: #664f27;
}

.assignment-status--assigned {
    background: #e7ecef;
    color: #334652;
}

.assignment-status--ongoing {
    background: #dff0e7;
    color: #1e6651;
}

.assignment-status--completed {
    background: #e8ece9;
    color: #43534a;
}

.assignment-status--closed {
    background: #efe6e6;
    color: #70494c;
}

.assignment-mode {
    background: #f5f3ee;
    color: #5e6671;
}

.assignment-card__reference {
    margin-top: 22px;
    color: #8a929c;
    font-size: .66rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.assignment-card h2 {
    margin-top: 8px;
    color: #0f1a2a;
    font-size: 1.45rem;
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -.025em;
}

.assignment-card h2 span {
    color: #9db91f;
    font-weight: 500;
}

.assignment-card__service {
    margin-top: 7px;
    color: #0f1a2a;
    font-size: .83rem;
    font-weight: 600;
}

.assignment-card__summary {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 13px;
    color: #626a75;
    font-size: .79rem;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.assignment-card__details {
    display: grid;
    gap: 9px;
    margin: 18px 0 0;
}

.assignment-card__details > div {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.assignment-card__details dt {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #89919a;
    font-size: .69rem;
}

.assignment-card__details dt svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.assignment-card__details dd {
    margin: 0;
    color: #333b45;
    font-size: .74rem;
    font-weight: 500;
}

.assignment-card__deadline {
    margin-top: 15px;
    padding-top: 13px;
    border-top: 1px solid #ecebe7;
    color: #7c681f;
    font-size: .7rem;
    font-weight: 500;
}

.assignment-card__overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-content: center;
    gap: 5px;
    padding: 28px;
    background: rgba(15, 26, 42, .44);
    color: #fff;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
}

.assignment-card__overlay span {
    color: #d6f24b;
    font-size: .65rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.assignment-card__overlay strong {
    font-size: 1.12rem;
    font-weight: 600;
}

.assignment-card__view {
    position: absolute;
    left: 50%;
    bottom: 34px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 9px 0 18px;
    transform: translate(-50%, 12px);
    border-radius: 999px;
    background: #f5f3ee;
    color: #0f1a2a;
    font-size: .78rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity 180ms ease, transform 180ms ease;
}

.assignment-card__view span {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 50%;
    background: #d6f24b;
}

@media (hover: hover) and (pointer: fine) {
    .assignment-card:hover .assignment-card__body {
        filter: blur(4px);
        transform: scale(1.01);
        opacity: .72;
    }

    .assignment-card:hover .assignment-card__overlay {
        opacity: 1;
    }

    .assignment-card:hover .assignment-card__view {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

.assignment-empty-state {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 28px;
    border: 1px solid rgba(15, 26, 42, .08);
    border-radius: 18px;
    background: #fff;
}

.assignment-empty-state__icon {
    display: grid;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    place-items: center;
    border-radius: 50%;
    background: #d6f24b;
    color: #0f1a2a;
    font-weight: 600;
}

.assignment-empty-state h2 {
    color: #0f1a2a;
    font-size: 1rem;
}

.assignment-empty-state p {
    margin-top: 4px;
    color: #68717b;
    font-size: .8rem;
}

/* ==========================================================================
   PROTECTED ASSIGNMENT DETAILS
   ========================================================================== */

.assignment-detail-page {
    background: #f5f3ee;
}

.assignment-detail-hero {
    padding: 46px 0 38px;
}

.assignment-detail-back {
    display: inline-flex;
    margin-bottom: 24px;
    color: #59636f;
    font-size: .78rem;
    font-weight: 500;
}

.assignment-detail-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 30px;
}

.assignment-detail-hero__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #7b838c;
    font-size: .7rem;
}

.assignment-detail-hero h1 {
    margin-top: 13px;
    color: #0f1a2a;
    font-size: clamp(2.5rem, 5vw, 4.6rem);
    font-weight: 600;
    letter-spacing: -.05em;
}

.assignment-detail-hero h1 span {
    color: #9db91f;
}

.assignment-detail-hero__grid > div > p {
    margin-top: 8px;
    color: #5c6670;
}

.assignment-detail-apply {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 54px;
    padding: 0 10px 0 20px;
    border-radius: 999px;
    background: #0f1a2a;
    color: #fff;
    font-size: .82rem;
    font-weight: 600;
}

.assignment-detail-apply span {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 50%;
    background: #d6f24b;
    color: #0f1a2a;
}

.assignment-detail-body {
    padding: 0 0 88px;
}

.assignment-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, .7fr);
    gap: 16px;
}

.assignment-detail-panel,
.assignment-detail-facts {
    padding: 28px;
    border: 1px solid rgba(15, 26, 42, .08);
    border-radius: 18px;
    background: #fff;
}

.assignment-detail-panel h2,
.assignment-detail-facts h2 {
    color: #0f1a2a;
    font-size: 1.15rem;
}

.assignment-detail-panel > p,
.assignment-detail-section p {
    margin-top: 13px;
    color: #59636e;
    font-size: .88rem;
    line-height: 1.65;
}

.assignment-detail-section {
    margin-top: 26px;
    padding-top: 24px;
    border-top: 1px solid #ecebe7;
}

.assignment-detail-section h3 {
    color: #0f1a2a;
    font-size: .92rem;
    font-weight: 600;
}

.assignment-detail-facts dl {
    display: grid;
    gap: 0;
    margin: 18px 0 0;
}

.assignment-detail-facts dl > div {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #efeee9;
}

.assignment-detail-facts dt {
    color: #8a929b;
    font-size: .7rem;
}

.assignment-detail-facts dd {
    margin: 0;
    color: #313943;
    font-size: .76rem;
    font-weight: 500;
}

.assignment-detail-security {
    margin-top: 20px;
    padding: 16px;
    border-radius: 14px;
    background: #eef4f0;
}

.assignment-detail-security strong {
    color: #0f1a2a;
    font-size: .78rem;
}

.assignment-detail-security p {
    margin-top: 4px;
    color: #607068;
    font-size: .7rem;
    line-height: 1.45;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1050px) {
    .assignment-filters {
        grid-template-columns: minmax(220px, 1fr) 160px 150px auto;
    }

    .assignment-filters__reset {
        grid-column: 1 / -1;
        justify-self: start;
        min-height: 30px;
    }

    .assignment-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 780px) {
    .assignments-hero {
        padding: 44px 0 36px;
    }

    .assignments-hero__inner,
    .assignment-detail-hero__grid,
    .assignment-detail-layout {
        grid-template-columns: 1fr;
    }

    .assignments-hero__aside {
        min-width: 0;
        width: 100%;
    }

    .assignment-filters {
        grid-template-columns: 1fr 1fr;
    }

    .assignment-filters__search {
        grid-column: 1 / -1;
    }

    .assignment-filters__button {
        width: 100%;
    }

    .assignment-results-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .assignment-detail-apply {
        width: max-content;
    }
}

@media (max-width: 580px) {
    .assignments-hero h1 {
        font-size: clamp(2.45rem, 12vw, 3.3rem);
    }

    .assignments-hero__content > p:last-child {
        font-size: .9rem;
    }

    .assignments-browser {
        padding-bottom: 62px;
    }

    .assignment-filters {
        grid-template-columns: 1fr;
        padding: 10px;
        border-radius: 15px;
    }

    .assignment-filters__search,
    .assignment-filters__reset {
        grid-column: auto;
    }

    .assignment-card-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .assignment-card {
        min-height: 0;
        padding-bottom: 64px;
        border-radius: 16px;
    }

    .assignment-card__body {
        padding: 18px;
    }

    .assignment-card h2 {
        font-size: 1.25rem;
    }

    .assignment-card__summary {
        -webkit-line-clamp: 2;
    }

    .assignment-card__view {
        right: 16px;
        bottom: 14px;
        left: 16px;
        width: auto;
        transform: none;
        opacity: 1;
        background: #0f1a2a;
        color: #fff;
    }

    .assignment-card__overlay {
        display: none;
    }

    .assignment-detail-panel,
    .assignment-detail-facts {
        padding: 20px;
        border-radius: 16px;
    }

    .assignment-detail-facts dl > div {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}
