/* Contest Detail Page */
.contest-detail {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.contest-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.contest-title {
    font-size: 2.5em;
    margin-bottom: 15px;
    color: #333;
}

.contest-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 1.1em;
}

.contest-status {
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
}

.status-open {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.status-closed {
    background-color: #ffebee;
    color: #c62828;
}

.contest-content {
    margin: 40px 0;
    line-height: 1.8;
    font-size: 1.05em;
}

/* Downloads */
.contest-downloads {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    margin: 40px 0;
}

.contest-downloads h2 {
    margin-top: 0;
    margin-bottom: 20px;
}

.download-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1em;
}

.btn-download {
    background: #fff;
    color: #333;
    border: 2px solid #ddd;
}

.btn-download:hover {
    background: #f5f5f5;
    border-color: #999;
}

.btn-primary {
    background: #2196F3;
    color: white;
}

.btn-primary:hover {
    background: #1976D2;
}

.btn-secondary {
    background: #757575;
    color: white;
}

.btn-secondary:hover {
    background: #616161;
}

.btn-large {
    font-size: 1.2em;
    padding: 16px 40px;
}

.contest-apply {
    text-align: center;
    margin: 50px 0;
}

/* Application Form Section */
.application-form-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 3px solid #2196F3;
}

.application-form-section h2 {
    font-size: 2em;
    margin-bottom: 10px;
}

.form-notice {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px;
    margin: 20px 0;
}

/* Form Styles */
.form-step {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.form-step h3 {
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 1.5em;
    color: #2196F3;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.required {
    color: #f44336;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #2196F3;
}

.form-control-file {
    width: 100%;
    padding: 10px;
    border: 2px dashed #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.3s;
}

.form-control-file:hover {
    border-color: #2196F3;
}

.form-text {
    display: block;
    margin-top: 5px;
    font-size: 0.9em;
    color: #666;
}

.file-preview {
    margin-top: 10px;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 6px;
    display: none;
}

.file-preview.active {
    display: block;
}

.file-preview img {
    max-width: 200px;
    max-height: 200px;
    margin-top: 10px;
    border-radius: 4px;
}

.file-preview .file-info {
    font-size: 0.9em;
    color: #666;
}

.file-preview .file-size {
    color: #2196F3;
    font-weight: bold;
}

.file-preview .file-error {
    color: #f44336;
    font-weight: bold;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

/* Loading Overlay */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#loading-overlay p {
    color: white;
    font-size: 1.2em;
    margin-top: 20px;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #f3f3f3;
    border-top: 6px solid #2196F3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success Box */
.success-box {
    background: #e8f5e9;
    border: 2px solid #4caf50;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
}

.success-box h3 {
    color: #2e7d32;
    font-size: 2em;
    margin-bottom: 20px;
}

.success-details {
    background: white;
    padding: 20px;
    border-radius: 6px;
    margin-top: 20px;
}

.success-details p {
    margin: 10px 0;
    font-size: 1.1em;
}

.success-note {
    margin-top: 20px !important;
    padding-top: 20px;
    border-top: 1px solid #ddd;
    color: #666;
}

.contest-closed-notice {
    text-align: center;
    padding: 40px;
    background: #ffebee;
    border-radius: 8px;
    margin: 40px 0;
}

.contest-closed-notice p {
    font-size: 1.2em;
    color: #c62828;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .contest-title {
        font-size: 1.8em;
    }
    
    .contest-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .download-buttons {
        flex-direction: column;
    }
    
    .btn {
        justify-content: center;
    }
    
    .form-step {
        padding: 20px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

/* ========================================
   Archive Page - Tab Layout Styles
   ======================================== */

   .contest-archive-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.contest-container {
    display: flex;
    gap: 30px;
}

/* 좌측 사이드바 */
.contest-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.sidebar-header {
    background: #f9fafb;
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
}

.contest-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.contest-menu .menu-item {
    padding: 16px 20px;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563;
    transition: all 0.2s ease;
}

.contest-menu .menu-item:hover {
    background: #eff6ff;
    color: #2563eb;
}

.contest-menu .menu-item.active {
    background: #2563eb;
    color: white;
    font-weight: 700;
}

.contest-menu .menu-item:last-child {
    border-bottom: none;
}

.no-contests {
    padding: 40px 20px;
    text-align: center;
    color: #9ca3af;
    font-size: 0.875rem;
}

/* 우측 콘텐츠 */
.contest-content {
    flex: 1;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    min-height: 600px;
}

.content-header {
    margin-bottom: 32px;
}

.contest-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 12px 0;
}

.title-underline {
    width: 60px;
    height: 4px;
    background: #2563eb;
    border-radius: 2px;
}

/* 탭 버튼 */
.contest-tabs {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 32px;
    gap: 8px;
    overflow-x: auto;
}

.tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tab-btn:hover {
    color: #2563eb;
}

.tab-btn.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
    font-weight: 700;
}

/* 탭 콘텐츠 */
.tab-content {
    min-height: 400px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 로딩 스피너 */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
}

.loading-spinner .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-spinner p {
    margin-top: 16px;
    color: #9ca3af;
    font-size: 0.875rem;
}

/* 공지사항 테이블 */
.notice-table {
    width: 100%;
    border-collapse: collapse;
}

.notice-table thead {
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.notice-table th {
    padding: 12px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    text-align: left;
}

.notice-table th.text-center {
    text-align: center;
}

.notice-table tbody tr {
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: background 0.2s ease;
}

.notice-table tbody tr:hover {
    background: #f9fafb;
}

.notice-table td {
    padding: 16px;
    font-size: 0.875rem;
    color: #4b5563;
}

.notice-table .notice-id {
    color: #9ca3af;
    text-align: center;
    width: 60px;
}

.notice-table .notice-title {
    font-size:20px;
    font-weight: 500;
    color: #1f2937;
}

.notice-table .notice-date,
.notice-table .notice-hits {
    color: #9ca3af;
    text-align: center;
    width: 100px;
}

/* 접수 안내 카드 */
.apply-card {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 48px;
    text-align: center;
}

.apply-card-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.apply-card-icon svg {
    width: 64px;
    height: 64px;
    color: #2563eb;
}

.apply-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e40af;
    margin: 0 0 12px 0;
}

.apply-card p {
    color: #1e40af;
    line-height: 1.6;
    margin: 0 0 32px 0;
}

.apply-card .status-badge {
    display: inline-block;
    padding: 6px 16px;
    background: #22c55e;
    color: white;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.apply-card .status-badge.closed {
    background: #ef4444;
}

.apply-btn {
    display: inline-block;
    padding: 14px 32px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    text-decoration: none;
}

.apply-btn:hover {
    background: #1d4ed8;
}

.apply-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* 접수확인 폼 */
.check-form-wrapper {
    max-width: 500px;
    margin: 60px auto;
}

.check-form {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 32px;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.check-form h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 24px 0;
    color: #1f2937;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.check-btn {
    width: 100%;
    padding: 12px;
    background: #1f2937;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.check-btn:hover {
    background: #111827;
}

/* 결과 안내 */
.result-placeholder {
    text-align: center;
    padding: 100px 20px;
    border: 2px dashed #e5e7eb;
    border-radius: 12px;
}

.result-placeholder p {
    color: #9ca3af;
    line-height: 1.8;
}

/* 페이지네이션 */
.notice-pagination {
    margin-top: 32px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.pagination-btn {
    padding: 8px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    color: #6b7280;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-btn:hover {
    background: #f9fafb;
}
/* 부모 클래스를 앞에 붙여서 우선순위를 높입니다 */
.file-info img.emoji {
    width: 2.5em !important;  /* 원하는 크기 (예: 2.5em) */
    height: 2.5em !important;
    vertical-align: middle !important; /* 크기가 커지면 위치 조정이 필요할 수 있음 */
}
.pagination-btn.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
    font-weight: 600;
}

/* 반응형 */
@media (max-width: 1024px) {
    .contest-container {
        flex-direction: column;
    }
    
    .contest-sidebar {
        width: 100%;
        position: static;
    }
    
    .contest-menu {
        display: flex;
        overflow-x: auto;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .contest-menu .menu-item {
        flex-shrink: 0;
        border-bottom: none;
        border-right: 1px solid #f3f4f6;
    }
    
    .contest-menu .menu-item:last-child {
        border-right: none;
    }
}

@media (max-width: 768px) {
    .contest-archive-wrapper {
        padding: 20px 10px;
    }
    
    .contest-content {
        padding: 20px;
    }
    
    .contest-title {
        font-size: 1.5rem;
    }
    
    .notice-table th,
    .notice-table td {
        padding: 12px 8px;
        font-size: 0.8rem;
    }
    
    .notice-table .notice-hits {
        display: none;
    }
    
    .apply-card {
        padding: 32px 20px;
    }
}

header li.wp-block-navigation-item.has-child.open-on-hover-click.wp-block-navigation-submenu:hover{
    color: var(--wp--preset--color--accent);
    border-radius: 6px !important;
  }
  header .wp-block-navigation-submenu li.wp-block-navigation-item.has-child.open-on-hover-click.wp-block-navigation-submenu,
  header .wp-block-navigation-submenu li.wp-block-navigation-item.wp-block-navigation-link{
    background-color: var(--wp--preset--color--accent) !important;
    color: #fff;
    border: 1px solid #fff;
  }
  header .wp-block-navigation-submenu li.wp-block-navigation-item.has-child.open-on-hover-click.wp-block-navigation-submenu:hover,
  header .wp-block-navigation__submenu-container a.wp-block-navigation-item__content:hover,header .wp-block-navigation-submenu li.wp-block-navigation-item.wp-block-navigation-link:hover{
    background: #000 !important;
    color: #fff !important;
    padding: 5px !important;
  }