/* =========================================================
   КАРТОЧКИ СДЕЛОК (FREELANCE NEXTGEN) — АРХИВ
   ========================================================= */

.fng-tasks-archive {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 15px;
}

.fng-tasks-header h1 {
    color: var(--titles);
    text-shadow: 0px 0px 3px #000000, 0px 0px 3px #000000;
    font-size: 28px;
    margin-bottom: 25px;
    display: none;
}

.fng-tasks-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

/* КАРТОЧКА СДЕЛКИ */
.fng-task-card {
    border: 1px solid #000;
    border-radius: 8px;
    overflow: hidden;
    background: var(--secondarybg);
    box-shadow: inset 0 0 3px #ffffff, 0 0 5px #000000, 0 0 2px #000000;
    display: block;
    height: auto;
    width: 100%;
    max-width: 1200px;
    margin-bottom: 20px;
}

.fng-task-card:hover {
    box-shadow: inset 0 0 3px #ffffff, 0 0 10px rgba(0,0,0,0.8);
}

.fng-task-card-inner {
    display: flex;
    flex-direction: column;
    height: auto;
}

/* ЦЕНА */
.fng-task-price-block {
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

.fng-task-price-label {
    font-size: 12px;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0px 0px 2px #000;
}

.fng-task-price-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--links);
    text-shadow: 0px 0px 3px #000000, 0px 0px 3px #000000;
    filter: hue-rotate(var(--hue-rotate));
}

/* СОДЕРЖИМОЕ */
.fng-task-content {
    display: flex;
    flex: 1;
    flex-wrap: wrap;
}

/* ОПЦИИ СЛЕВА */
.fng-task-left {
    flex: 0 0 280px;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.15);
    border-right: 2px solid #333;
}

.fng-task-meta-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fng-task-meta-item {
    display: flex;
    padding: 4px 0;
    font-size: 13px;
    line-height: 1.6;
    border-bottom: 1px dotted rgba(255,255,255,0.05);
    gap: 4px;
}

.fng-task-meta-item:last-child {
    border-bottom: none;
}

.fng-task-meta-item .meta-label {
    color: #aaa;
    min-width: 100px;
    flex-shrink: 0;
    text-shadow: 0px 0px 2px #000;
}

.fng-task-meta-item .meta-value {
    color: var(--maintext);
    font-weight: 500;
    text-shadow: 0px 0px 2px #000;
}

/* СТАТУСЫ СДЕЛОК */
.fng-task-meta-item .status--4 { color: #c0392b; }
.fng-task-meta-item .status--3 { color: #e74c3c; }
.fng-task-meta-item .status-1 { color: #f39c12; }
.fng-task-meta-item .status-2 { color: #3498db; }
.fng-task-meta-item .status-3 { color: #9b59b6; }
.fng-task-meta-item .status-5 { color: #27ae60; }
.fng-task-meta-item .status-6 { color: #1abc9c; }
.fng-task-meta-item .status-7 { color: #e67e22; }

/* ОПИСАНИЕ СПРАВА */
.fng-task-right {
    flex: 1;
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.fng-task-description {
    flex: 1;
    font-size: 14px;
    line-height: 1.6;
    color: var(--maintext);
    text-shadow: 0px 0px 2px #000;
    opacity: 0.9;
    margin-bottom: 12px;
}

.fng-task-actions {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: flex-end;
}

.fng-task-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 22px;
    background: linear-gradient(0deg, #4d4d4d 95%, #afafaf 100%) !important;
    border: 1px solid #000 !important;
    border-radius: 5px !important;
    box-shadow: inset 0 0 3px #ffffff, 0 0 5px #000000 !important;
    color: var(--links) !important;
    text-shadow: 0px 0px 2px #000 !important;
    text-decoration: none;
    transition: 0.3s;
    font-weight: bold;
    font-size: 14px;
}

.fng-task-btn:hover {
    color: var(--links-hover) !important;
    filter: brightness(1.1);
}

.fng-task-btn i {
    font-size: 14px;
}

/* АДАПТИВНОСТЬ СДЕЛОК */
@media screen and (max-width: 768px) {
    .fng-task-content {
        flex-direction: column;
    }
    
    .fng-task-left {
        flex: none;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        padding: 12px 16px;
    }
    
    .fng-task-meta-list {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4px 20px;
    }
    
    .fng-task-meta-item {
        border-bottom: none;
        padding: 2px 0;
    }
    
    .fng-task-meta-item .meta-label {
        min-width: auto;
    }
    
    .fng-task-right {
        padding: 12px 16px;
    }
    
    .fng-task-actions {
        justify-content: center;
    }
    
    .fng-task-price-value {
        font-size: 22px;
    }
}

@media screen and (max-width: 480px) {
    .fng-task-price-block {
        padding: 10px 14px;
    }
    
    .fng-task-price-value {
        font-size: 20px;
    }
    
    .fng-task-left {
        padding: 10px 14px;
    }
    
    .fng-task-meta-item {
        font-size: 12px;
        flex-wrap: wrap;
    }
    
    .fng-task-meta-item .meta-label {
        min-width: 60px;
    }
    
    .fng-task-right {
        padding: 10px 14px;
    }
    
    .fng-task-description {
        font-size: 13px;
    }
    
    .fng-task-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ===== СКРЫВАЕМ СТАНДАРТНЫЕ ЭЛЕМЕНТЫ НА АРХИВЕ СДЕЛОК ===== */
.post-type-archive-task .more-link,
.post-type-archive-task .read-more,
.post-type-archive-task .fng-task-read-more {
    display: none !important;
}

.post-type-archive-task .entry-meta,
.post-type-archive-task .posted-on,
.post-type-archive-task .byline,
.post-type-archive-task .fng-task-footer {
    display: none !important;
}

/* ===== ПАГИНАЦИЯ СДЕЛОК ===== */
.fng-tasks-pagination {
    margin-top: 30px;
    text-align: center;
}

.fng-tasks-pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 3px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #444;
    border-radius: 4px;
    color: var(--links);
    text-decoration: none;
    transition: 0.3s;
}

.fng-tasks-pagination .page-numbers:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--links-hover);
}

.fng-tasks-pagination .page-numbers.current {
    background: var(--links);
    border-color: var(--links);
    color: #fff;
}

/* =========================================================
   КОМПАКТНОЕ ОТОБРАЖЕНИЕ ТЕМ В АРХИВЕ FNG
   ========================================================= */

.fng-task-meta-item .task-subject-more {
    display: inline-block;
    background: rgba(219, 179, 0, 0.12);
    color: var(--links);
    padding: 1px 10px;
    border-radius: 12px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
    border: 1px solid rgba(219, 179, 0, 0.15);
    user-select: none;
}

.fng-task-meta-item .task-subject-more:hover {
    background: rgba(219, 179, 0, 0.2);
}

.fng-task-meta-item .task-subject-hidden {
    display: inline;
}

.fng-task-meta-item .task-subject-hidden .task-subject-tag {
    animation: fngTagFadeIn 0.3s ease;
}

@keyframes fngTagFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Стили для тегов в архиве */
.fng-task-meta-item .meta-value a {
    color: var(--links);
    text-decoration: none;
}

.fng-task-meta-item .meta-value a:hover {
    color: var(--links-hover);
    text-decoration: underline;
}

/* ===== ВЕРХНЯЯ СТРОКА: НАЗВАНИЕ СЛЕВА, ЦЕНА СПРАВА ===== */
.fng-task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    gap: 15px;
    flex-wrap: wrap;
    background: rgba(0, 0, 0, 0.08);
}

.fng-task-title {
    font-size: 18px;
    font-weight: 600;
    flex: 1;
    min-width: 150px;
}

.fng-task-title a {
    color: var(--titles);
    text-decoration: none;
    text-shadow: 0px 0px 3px #000000;
    transition: color 0.2s;
}

.fng-task-title a:hover {
    color: var(--links);
}

.fng-task-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--links);
    text-shadow: 0px 0px 3px #000000, 0px 0px 3px #000000;
    filter: hue-rotate(var(--hue-rotate));
    white-space: nowrap;
    flex-shrink: 0;
}

.fng-task-price .rcli {
    font-size: 20px;
    margin-left: 2px;
}

/* ===== АДАПТИВНОСТЬ ВЕРХНЕЙ СТРОКИ ===== */
@media screen and (max-width: 768px) {
    .fng-task-title {
        font-size: 16px;
    }
    .fng-task-price {
        font-size: 20px;
    }
}

@media screen and (max-width: 480px) {
    .fng-task-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        padding: 10px 14px;
    }
    
    .fng-task-title {
        font-size: 15px;
        min-width: auto;
    }
    
    .fng-task-price {
        font-size: 18px;
    }
    
    .fng-task-price .rcli {
        font-size: 16px;
    }
}