/* ========================================================================== 
   recruit-list.css
   --------------------------------------------------------------------------
   팀원모집 목록 페이지 전용 스타일입니다.
   공통 헤더는 common/header.php, common/header.css에서 관리합니다.
   공통 플로팅 메뉴는 common/floating-profile.php, common/floating-profile.css에서 관리합니다.
   ========================================================================== */

* {
    box-sizing: border-box;
    font-family: 'NanumSquareAc', 'NanumSquare', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: #fff;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 18% 20%, rgba(119, 94, 255, 0.24), transparent 22%),
        radial-gradient(circle at 82% 18%, rgba(0, 209, 255, 0.17), transparent 24%),
        radial-gradient(circle at 50% 85%, rgba(255, 107, 107, 0.12), transparent 24%),
        linear-gradient(145deg, #08101f 0%, #0e1628 35%, #11192b 65%, #09111d 100%);
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.42), rgba(0,0,0,0));
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.42), rgba(0,0,0,0));
}

.page-bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        linear-gradient(rgba(8, 13, 24, 0.56), rgba(7, 11, 20, 0.76)),
        url('https://images.unsplash.com/photo-1521737711867-e3b97375f902?auto=format&fit=crop&w=1800&q=80') center/cover no-repeat;
    opacity: 0.5;
    transform: scale(1.04);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
select {
    font-family: inherit;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --------------------------------------------------------------------------
   공통 글래스 패널
-------------------------------------------------------------------------- */
.toolbar,
.empty {
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(255,255,255,0.11);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 24px 80px rgba(0,0,0,0.28);
}

/* --------------------------------------------------------------------------
   메인 레이아웃
-------------------------------------------------------------------------- */
.page {
    position: relative;
    z-index: 5;
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 85px 0 80px;
    transition: transform 0.25s ease;
}

.page.has-floating-profile {
    transform: translateX(120px);
}

.hero {
    position: relative;
    overflow: hidden;
    padding: 42px 0 0;
}

.hero::before {
    content: "";
    position: absolute;
    inset: -1px;
    pointer-events: none;
}

.hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    margin-bottom: 18px;
    border-radius: 999px;
    background: rgba(255,255,255,0.14);
    color: rgba(255,255,255,0.88);
    font-size: 14px;
    font-weight: 900;
}

.hero h1 {
    margin: 0;
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1.06;
    letter-spacing: -1.8px;
}

.hero p {
    max-width: 620px;
    margin: 18px 0 0;
    color: rgba(255,255,255,0.76);
    font-size: 17px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 210px;
}

.primary-btn,
.secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 20px;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    border: 0;
    color: #17213b;
    background: linear-gradient(135deg, #ffffff, #dce8ff);
    box-shadow: 0 16px 32px rgba(12,22,44,0.28);
}

.secondary-btn {
    color: #fff;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.1);
}

.primary-btn:hover,
.secondary-btn:hover {
    transform: translateY(-3px);
}

/* --------------------------------------------------------------------------
   툴바
-------------------------------------------------------------------------- */
.toolbar {
    margin-top: 28px;
    padding: 18px;
    border-radius: 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

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

.tab,
.check-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 15px;
    border-radius: 999px;
    color: rgba(255,255,255,0.75);
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    font-size: 14px;
    font-weight: 900;
    transition: all 0.2s ease;
}

.tab:hover,
.tab.active,
.check-link.active {
    color: #18213a;
    background: rgba(255,255,255,0.92);
    transform: translateY(-2px);
}

.select {
    height: 40px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.9);
    color: #17213b;
    font-weight: 900;
    outline: none;
}

/* --------------------------------------------------------------------------
   카드 그리드
-------------------------------------------------------------------------- */
.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 24px;
}

/*
   카드 blur 최종 구조
   - 카드 목록(grid)에는 content-motion을 사용하지 않습니다.
   - 실제 blur는 .card 내부의 .card-blur-bg 실요소에서 처리합니다.
   - 부모/자식 filter/transform 레이어와 겹치지 않게 카드 배경 레이어를 분리했습니다.
*/

.card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 310px;
    padding: 22px;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 30px;
    background: transparent;
    box-shadow: 0 28px 86px rgba(0,0,0,0.34);
    transform: translateZ(0);
    transition:
        transform 0.22s ease,
        border-color 0.22s ease,
        box-shadow 0.22s ease;
}

.card-blur-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: block;
    border-radius: inherit;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.13), rgba(255,255,255,0.055)),
        rgba(255,255,255,0.06);
    backdrop-filter: blur(34px) saturate(1.28);
    -webkit-backdrop-filter: blur(34px) saturate(1.28);
    transition: background 0.22s ease, backdrop-filter 0.22s ease, -webkit-backdrop-filter 0.22s ease;
}

.card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
    pointer-events: none;
}

.card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
    pointer-events: none;
    border: 1px solid rgba(255,255,255,0.08);
}

.card:hover {
    transform: translateY(-6px) translateZ(0);
    border-color: rgba(255,255,255,0.34);
    box-shadow: 0 34px 100px rgba(0,0,0,0.40);
}

.card > *:not(.card-blur-bg),
.card-top,
.card-title-link,
.meta,
.progress-wrap,
.chips,
.card-actions,
.inline-post-form {
    position: relative;
    z-index: 2;
}

.card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.category,
.status,
.chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-weight: 900;
}

.category {
    gap: 7px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.13);
    color: rgba(255,255,255,0.9);
    font-size: 13px;
}

.status {
    padding: 8px 12px;
    font-size: 13px;
}

.status.open {
    color: #b8ffd3;
    background: rgba(122,255,177,0.18);
}

.status.closed {
    color: #ffe8a8;
    background: rgba(255,217,117,0.18);
}

.status.done {
    color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.14);
}

.card-title-link h2 {
    min-height: 64px;
    margin: 0;
    font-size: 22px;
    line-height: 1.45;
    letter-spacing: -0.6px;
}

.card-title-link:hover h2 {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.meta {
    display: grid;
    gap: 9px;
    margin-top: 18px;
}

.meta-row {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: rgba(255,255,255,0.72);
    font-size: 14px;
    line-height: 1.45;
    font-weight: 800;
}

.progress-wrap {
    margin-top: 18px;
}

.progress-head {
    display: flex;
    justify-content: space-between;
    margin-bottom: 9px;
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    font-weight: 900;
}

.progress {
    overflow: hidden;
    height: 9px;
    border-radius: 999px;
    background: rgba(255,255,255,0.12);
}

.progress span {
    display: block;
    width: var(--progress-width, 0%);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #ffffff, #a7c7ff);
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    min-height: 32px;
    margin-top: 14px;
}

.chip {
    height: 28px;
    padding: 0 10px;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.78);
    font-size: 12px;
}

.card-actions {
    display: flex;
    gap: 8px;
    margin-top: 18px;
    flex-wrap: nowrap;
}

.inline-post-form {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
}

.action-btn,
.action-link {
    height: 42px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
    word-break: keep-all;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.action-btn {
    width: 100%;
    border: 0;
    color: #17213b;
    background: rgba(255,255,255,0.92);
    cursor: pointer;
}

.action-link {
    flex: 0 0 112px;
    min-width: 112px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.16);
}

.action-btn:hover,
.action-link:hover {
    transform: translateY(-2px);
}

.action-btn.cancel {
    color: #fff;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.16);
}

.action-btn.closed {
    color: rgba(255,255,255,0.72);
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.14);
}

.action-btn.danger {
    color: #ffd5d5;
}

.action-btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
    transform: none;
}

/* --------------------------------------------------------------------------
   빈 상태 / 페이지네이션
-------------------------------------------------------------------------- */
.empty {
    grid-column: 1 / -1;
    padding: 64px 24px;
    border-radius: 30px;
    text-align: center;
}

.empty strong {
    display: block;
    margin-bottom: 10px;
    font-size: 24px;
}

.empty p {
    margin: 0 0 22px;
    color: rgba(255,255,255,0.68);
    line-height: 1.7;
}

.pagination-wrap {
    margin-top: 28px;
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.page-btn {
    min-width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.06);
    color: #fff;
    font-weight: 900;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.page-btn.active,
.page-btn:hover {
    background: rgba(255,255,255,0.92);
    color: #17213b;
    transform: translateY(-2px);
}

.page-btn.disabled {
    opacity: 0.4;
    pointer-events: none;
    transform: none;
}

/* --------------------------------------------------------------------------
   진입 애니메이션
   - backdrop-filter가 필요한 카드/그리드에서 렌더링 충돌이 나지 않도록
     filter: blur(...) 기반 모션은 사용하지 않습니다.
-------------------------------------------------------------------------- */
.content-motion {
    opacity: 0;
    transform: translateY(24px) scale(0.99);
    will-change: opacity, transform;
}

body.motion-ready .content-motion {
    animation: revealContent 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.delay-1 { animation-delay: 0.08s; }
.delay-2 { animation-delay: 0.16s; }
.delay-3 { animation-delay: 0.24s; }
.delay-4 { animation-delay: 0.32s; }

@keyframes revealContent {
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* --------------------------------------------------------------------------
   반응형
-------------------------------------------------------------------------- */

@media (max-width: 1500px) {
    .page.has-floating-profile {
        transform: translateX(96px);
    }
}

@media (max-width: 1300px) {
    .page.has-floating-profile {
        transform: none;
    }
}

@media (max-width: 980px) {
    .page {
        padding-top: 120px;
    }

    .hero-inner {
        display: block;
    }

    .hero-actions {
        flex-direction: row;
        margin-top: 28px;
    }

    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 680px) {
    .page {
        width: min(100% - 24px, 1180px);
    }

    .hero {
        padding: 28px 22px;
        border-radius: 26px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .toolbar {
        align-items: stretch;
    }

    .filters,
    .select,
    .check-link {
        width: 100%;
    }

    .select,
    .check-link {
        justify-content: center;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .card {
        min-height: auto;
    }

    .card-actions {
        flex-direction: row;
        flex-wrap: nowrap;
    }

    .action-link {
        flex-basis: 104px;
        min-width: 104px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .content-motion {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }

    .card,
    .card:hover,
    .primary-btn:hover,
    .secondary-btn:hover,
    .tab:hover,
    .tab.active,
    .check-link.active,
    .action-btn:hover,
    .action-link:hover,
    .page-btn.active,
    .page-btn:hover {
        transform: none !important;
    }
}
