@charset "UTF-8";

/* ==========================================
   자유공모/지정공모 진입 페이지 전용 CSS
   ========================================== */

/* 자유공모 전용 주황색 그라데이션 */
.entry-page.free .banner-top,
.main-page .banner-top {
    background: linear-gradient(135deg, #f5a855 0%, #e89438 50%, #d97835 100%) !important;
    filter: none !important;
}

/* 지정공모 전용 보라색 그라데이션 */
.entry-page.designated .banner-top {
    background: linear-gradient(135deg, #7c5bb8 0%, #5b3a9e 50%, #3a1c74 100%) !important;
    filter: none !important;
}

/* 모던한 Step 프로세스 - 기존 CSS 완전 무시 */
.container .list-step {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    gap: 20px !important;
    position: relative !important;
    padding: 20px 0 !important;
    margin: 3rem 0 !important;
    list-style: none !important;
    background: none !important;
    border: none !important;
}

/* 자유공모 연결선 */
.entry-page.free .container .list-step::before,
.main-page .container .list-step::before {
    content: '' !important;
    position: absolute !important;
    top: 60px !important;
    left: 12% !important;
    right: 12% !important;
    height: 4px !important;
    background: linear-gradient(90deg, #d97835 0%, #f5a855 25%, #d97835 50%, #f5a855 75%, #d97835 100%) !important;
    z-index: 0 !important;
    border-radius: 2px !important;
}

/* 지정공모 연결선 */
.entry-page.designated .container .list-step::before {
    content: '' !important;
    position: absolute !important;
    top: 60px !important;
    left: 12% !important;
    right: 12% !important;
    height: 4px !important;
    background: linear-gradient(90deg, #3a1c74 0%, #7c5bb8 25%, #3a1c74 50%, #7c5bb8 75%, #3a1c74 100%) !important;
    z-index: 0 !important;
    border-radius: 2px !important;
}

.container .list-step li {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 20px !important;
    position: relative !important;
    z-index: 1 !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: auto !important;
    height: auto !important;
}

.container .list-step li span {
    display: block !important;
    background: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    text-align: center !important;
    font-weight: 700 !important;
    color: #333 !important;
    font-size: 1.1rem !important;
    line-height: 1.6 !important;
    cursor: default !important;
}

.container .list-step li span small {
    display: block !important;
    font-size: 0.9rem !important;
    color: #666 !important;
    font-weight: 400 !important;
    margin-top: 8px !important;
    background: none !important;
    padding: 0 !important;
}

/* Step 아이콘 박스 - 자유공모 */
.entry-page.free .step-icon-box,
.main-page .step-icon-box {
    width: 120px !important;
    height: 120px !important;
    background: linear-gradient(135deg, #d97835 0%, #f5a855 100%) !important;
    border-radius: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 3.5rem !important;
    box-shadow: 0 12px 35px rgba(217, 120, 53, 0.35) !important;
    position: relative !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Step 아이콘 박스 - 지정공모 */
.entry-page.designated .step-icon-box {
    width: 120px !important;
    height: 120px !important;
    background: linear-gradient(135deg, #3a1c74 0%, #7c5bb8 100%) !important;
    border-radius: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 3.5rem !important;
    box-shadow: 0 12px 35px rgba(58, 28, 116, 0.35) !important;
    position: relative !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 번호 배지 - 자유공모 */
.entry-page.free .step-number,
.main-page .step-number {
    position: absolute !important;
    top: -10px !important;
    right: -10px !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    background: #fff !important;
    border: 3px solid #d97835 !important;
    border-radius: 50% !important;
    -webkit-border-radius: 50% !important;
    -moz-border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: #d97835 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    line-height: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* 번호 배지 - 지정공모 */
.entry-page.designated .step-number {
    position: absolute !important;
    top: -10px !important;
    right: -10px !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    background: #fff !important;
    border: 3px solid #3a1c74 !important;
    border-radius: 50% !important;
    -webkit-border-radius: 50% !important;
    -moz-border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: #3a1c74 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    line-height: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Step 정보 영역 */
.step-info {
    text-align: center !important;
}

.step-title {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    color: #333 !important;
    margin-bottom: 8px !important;
}

.step-desc {
    font-size: 1rem !important;
    color: #666 !important;
    line-height: 1.5 !important;
}

/* 반응형 */
@media (max-width: 1024px) {
    .container .list-step::before {
        display: none !important;
    }
    
    .step-icon-box {
        width: 100px !important;
        height: 100px !important;
        font-size: 3rem !important;
    }
}

/* ==========================================
   지정공모 과제 카드 스타일
   ========================================== */
.challenge-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.75rem;
    margin: 3rem 0 0 0;
}

.challenge-card {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
    display: flex;
    flex-direction: column;
    min-height: 300px;
    opacity: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.challenge-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12);
    border-color: rgba(41, 88, 255, 0.3);
}

.challenge-logo-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
    background: #ffffff;
    min-height: 180px;
}

.challenge-logo-section img {
    width: 140px;
    height: 140px;
    object-fit: contain;
    filter: grayscale(0.2);
    transition: filter 0.3s;
}

.challenge-card:hover .challenge-logo-section img {
    filter: grayscale(0);
}

.challenge-bottom-bar {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c5a 100%);
    padding: 1.25rem 1.5rem;
    text-align: center;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.challenge-card[data-challenge-id^="govt"] .challenge-bottom-bar {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
}

.challenge-org-name {
    font-size: 1rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.challenge-title {
    font-size: 0.95rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
    word-break: keep-all;
    letter-spacing: -0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* 과제 카드 반응형 */
@media only screen and (max-width: 1360px) {
    .challenge-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media only screen and (max-width: 1024px) {
    .challenge-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

@media only screen and (max-width: 768px) {
    .challenge-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
    
    .challenge-card {
        min-height: 260px;
    }
    
    .challenge-logo-section {
        padding: 1.5rem 1rem;
    }
    
    .challenge-bottom-bar {
        padding: 1rem 1.25rem;
    }
    
    .challenge-org-name {
        font-size: 1rem;
    }
    
    .challenge-title {
        font-size: 1rem;
    }
}

@media only screen and (max-width: 480px) {
    .challenge-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .challenge-card {
        min-height: 240px;
    }
}

@media (max-width: 768px) {
    .container .list-step {
        flex-direction: column !important;
        gap: 40px !important;
        margin: 0 !important;
    }
    
    .container .list-step li {
        width: 100% !important;
        max-width: 400px !important;
        flex-direction: row !important;
        gap: 1.5rem !important;
    }
    
    .step-info {
        text-align: left !important;
        flex: 1 !important;
    }
    
    .step-icon-box {
        flex-shrink: 0 !important;
        width: 90px !important;
        height: 90px !important;
        font-size: 2.5rem !important;
    }
}

/* ==========================================
   공고내용 섹션 스타일
   ========================================== */

.contest-info-section {
    width: 100%;
    margin: 3rem auto;
    padding: 0;
}

.contest-info-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid #e89438;
}

/* 그룹 스타일 */
.contest-info-group {
    margin-bottom: 2rem;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.contest-info-group-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #e89438 0%, #d97835 100%);
    padding: 1rem 1.5rem;
    margin: 0;
}

.contest-info-group-title .group-icon {
    font-size: 1.3rem;
}

/* 테이블 스타일 */
.contest-info-table {
    width: 100%;
    border-collapse: collapse;
}

.contest-info-table th,
.contest-info-table td {
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: top;
    line-height: 1.6;
}

.contest-info-table tr:last-child th,
.contest-info-table tr:last-child td {
    border-bottom: none;
}

.contest-info-table th {
    width: 140px;
    font-weight: 600;
    color: #e89438;
    background: #fffaf5;
    white-space: nowrap;
}

.contest-info-table td {
    color: #444;
}

.contest-info-table td strong {
    color: #e89438;
    font-weight: 700;
}

/* 포상 뱃지 */
.prize-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin: 4px 0px 4px 0;
}

.prize-badge.gold {
    background: linear-gradient(135deg, #ffd700 0%, #ffb300 100%);
    color: #5d4500;
}

.prize-badge.silver {
    background: linear-gradient(135deg, #e8e8e8 0%, #c0c0c0 100%);
    color: #444;
}

.prize-badge.bronze {
    background: linear-gradient(135deg, #e6a77a 0%, #cd7f32 100%);
    color: #fff;
}

.prize-badge.champion {
    background: linear-gradient(135deg, #e89438 0%, #d97835 100%);
    color: #fff;
}

/* 왕중왕전 그라데이션 배지 (바로보기 버튼 스타일) */
.prize-badge.champion-gradient {
    background: linear-gradient(147deg,rgba(43, 28, 117, 1) 0%, rgba(157, 35, 104, 1) 50%, rgba(231, 87, 24, 1) 100%);
    color: #fff;
}

.prize-note {
    margin: 10px 0 0 0;
    font-size: 0.85rem;
    color: #888;
}

/* 후속지원 카드 */
.support-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 1.5rem;
}

.support-card {
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
}

.support-card.policy {
    background: linear-gradient(135deg, #f8f5ff 0%, #ede7f9 100%);
    border: 2px solid #3a1c74;
}

.support-card.tech {
    background: linear-gradient(135deg, #fff5eb 0%, #ffe8d6 100%);
    border: 2px solid #e89438;
}

.support-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.support-card.policy .support-card-title {
    color: #3a1c74;
}

.support-card.tech .support-card-title {
    color: #d97835;
}

.support-card-content {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
}

/* 지정공모 보라색 테마 */
.contest-info-section.designated .contest-info-title {
    border-bottom-color: #3a1c74;
}

.contest-info-section.designated .contest-info-group-title {
    background: linear-gradient(135deg, #7c5bb8 0%, #3a1c74 100%);
}

.contest-info-section.designated .contest-info-table th {
    color: #3a1c74;
    background: #f8f5ff;
}

.contest-info-section.designated .contest-info-table td strong {
    color: #3a1c74;
}

.contest-info-section.designated .prize-badge.champion {
    background: linear-gradient(135deg, #7c5bb8 0%, #3a1c74 100%);
}

.contest-info-section.designated .support-card.policy {
    background: linear-gradient(135deg, #f8f5ff 0%, #ede5ff 100%);
    border-color: #3a1c74;
}

.contest-info-section.designated .support-card.policy .support-card-title {
    color: #3a1c74;
}

/* 반응형 */
@media (max-width: 768px) {
    .contest-info-section {
        margin: 2rem auto;
    }
    
    .contest-info-title {
        font-size: 1.3rem;
    }
    
    .contest-info-table th,
    .contest-info-table td {
        display: block;
        width: 100%;
        padding: 0.75rem 1.25rem;
    }
    
    .contest-info-table th {
        border-bottom: none;
        padding-bottom: 0.25rem;
    }
    
    .contest-info-table td {
        padding-top: 0.25rem;
    }
    
    .support-cards {
        grid-template-columns: 1fr;
    }
    
    .prize-badge {
        display: block;
        text-align: center;
        margin: 6px 0;
    }
}

/* ==========================================
   공고문 영역 스타일
   ========================================== */

/* 안내 문구 (우측 정렬) */
.entry-notice-right {
    text-align: right;
}

/* 공고문 박스 */
.entry-notice-box {
    width: 100%;
    margin: 0 auto 30px auto;
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid #e9ecef;
}

/* 공고문 헤더 영역 */
.entry-notice-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

/* 공고문 타이틀 */
.entry-notice-title {
    margin: 0;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
    min-width: 80px;
}

/* 공고문 뷰어 영역 */
.entry-notice-view {
    width: 100%;
    min-height: 200px;
}

/* Hidden 데이터 영역 */
.entry-hidden-data {
    display: none;
}


/* ==========================================
   지정공모 전용 레이아웃
   ========================================== */

/* 지정공모 text-bottom 레이아웃 */
.text-bottom.designated-layout {
    display: flex;
    flex-direction: column;
}

/* 지정공모 공고문 박스 */
.entry-notice-box.designated-notice {
    margin: 30px auto 0 auto;
    order: 2;
}

/* 지정공모 과제 그리드 */
.challenge-grid.designated-challenges {
    order: 1;
}

/* 공고문 업로드 모달 모바일 대응 */
@media only screen and (max-width: 768px) {
    #uploadModal > div {
        width: 95% !important;
        padding: 20px !important;
        max-width: none !important;
    }
    
    #uploadModal h3 {
        font-size: 1.2rem !important;
    }
    
    #uploadModal p {
        font-size: 0.85rem !important;
    }
    
    /* 다운로드/업로드 버튼 모바일 */
    .text-bottom > div {
        flex-direction: column !important;
    }
    
    .text-bottom a,
    .text-bottom button {
        width: 100% !important;
        max-width: 300px !important;
    }
    
    /* 아이디어 제안하기 버튼 중앙정렬 */
    .text-bottom {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }
    
    .text-bottom button {
        text-align: center !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
}
