/* ==========================================================================
   0. ИНДИКАТОР СТРАНИЦ В ВИДЕ КВАДРАТИКОВ (.pagenavcounter)
   ========================================================================== */
.pagenavcounter.cn-page-squares {
    display: flex !important;
    align-items: center;
    gap: 8px;
    margin: 0.5rem 0 1.25rem 0 !important;
    padding: 0 !important;
}

.cn-page-square {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 3px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    text-decoration: none !important;
}

/* Остальные страницы — бирюзовый оттенок (#00A6A6) */
.cn-square-inactive {
    background-color: #00a6a6 !important;
    border: 1px solid #0088b0;
}

a.cn-square-inactive:hover {
    transform: scale(1.2);
    box-shadow: 0 2px 6px rgba(0, 166, 166, 0.45);
}

/* Текущая страница — теплый желтый акцент (#F2B84B) */
.cn-square-active {
    background-color: #f2b84b !important;
    border: 1px solid #d99f36;
    transform: scale(1.15);
    box-shadow: 0 2px 6px rgba(242, 184, 75, 0.4);
}

/* ==========================================================================
   1. ПОЛУКРУГИ ПО КРАЯМ ЭКРАНА (Назад / Вперёд для пагинации)
   ========================================================================== */
.cn-edge-pagination,
.cn-edge-pagination .pagination {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    border: none !important;
    background: transparent !important;
}

.cn-edge-pagination .page-item.disabled {
    display: none !important;
}

a.cn-edge-btn,
.pagination .page-item a.cn-edge-btn {
    position: fixed !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 48px !important;
    height: 96px !important;
    background-color: rgba(108, 121, 200, 0.45) !important; /* На основе лавандово-синего (#6C79C8) */
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    border: none !important;
    z-index: 9999 !important;
    transition: background-color 0.25s ease, width 0.2s ease, box-shadow 0.25s ease !important;
    backdrop-filter: blur(3px);
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}

/* Левый полукруг (<) */
a.cn-edge-prev,
.pagination .page-item a.cn-edge-prev {
    left: 0 !important;
    right: auto !important;
    border-radius: 0 96px 96px 0 !important;
    padding-right: 8px !important;
}

/* Правый полукруг (>) */
a.cn-edge-next,
.pagination .page-item a.cn-edge-next {
    right: 0 !important;
    left: auto !important;
    border-radius: 96px 0 0 96px !important;
    padding-left: 8px !important;
}

.cn-edge-btn .cn-arrow {
    font-size: 28px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    font-family: monospace !important;
    user-select: none;
    transition: transform 0.2s ease;
}

/* При наведении мыши: задействованы цвета #0088B0 и #35B7A5 */
a.cn-edge-prev:hover,
a.cn-edge-prev:focus,
.pagination .page-item a.cn-edge-prev:hover {
    background-color: #0088b0 !important;
    color: #ffffff !important;
    width: 56px !important;
    backdrop-filter: none;
    box-shadow: 0 4px 18px rgba(0, 136, 176, 0.45) !important;
}

a.cn-edge-next:hover,
a.cn-edge-next:focus,
.pagination .page-item a.cn-edge-next:hover {
    background-color: #35b7a5 !important;
    color: #ffffff !important;
    width: 56px !important;
    backdrop-filter: none;
    box-shadow: 0 4px 18px rgba(53, 183, 165, 0.45) !important;
}

a.cn-edge-prev:hover .cn-arrow {
    transform: translateX(-3px);
}

a.cn-edge-next:hover .cn-arrow {
    transform: translateX(3px);
}

/* ==========================================================================
   2. КРУПНЫЕ КНОПКИ ЗАДАНИЙ (Предыдущее задание / Следующее задание)
   ========================================================================== */
.cn-task-navigation {
    margin: 2.5rem 0 1.5rem;
    width: 100%;
}

.cn-task-navigation .pagination {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 1.25rem;
    width: 100%;
    padding: 0;
    margin: 0;
    list-style: none;
}

.cn-task-navigation .page-item {
    flex: 1 1 45%;
    display: flex;
}

.cn-task-navigation .page-item.next {
    justify-content: flex-end;
    margin-left: auto;
}

.cn-task-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    max-width: 360px;
    padding: 16px 28px !important;
    font-size: 1.15rem !important;
    font-weight: 600 !important;
    color: #2c3e50 !important;
    background-color: #f0f4f8 !important;
    border: 2px solid #d2dce6 !important;
    border-radius: 10px !important;
    text-decoration: none !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.cn-task-prev:hover,
.cn-task-prev:focus {
    background-color: #0088b0 !important;
    border-color: #006d8f !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 136, 176, 0.3);
}

.cn-task-next:hover,
.cn-task-next:focus {
    background-color: #35b7a5 !important;
    border-color: #289484 !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(53, 183, 165, 0.3);
}

.cn-task-icon {
    font-size: 1.3rem;
    line-height: 1;
    transition: transform 0.25s ease;
}

.cn-task-prev:hover .cn-task-icon {
    transform: translateX(-4px);
}

.cn-task-next:hover .cn-task-icon {
    transform: translateX(4px);
}

/* Адаптивность для мобильных экранов */
@media (max-width: 768px) {
    .cn-task-navigation .pagination {
        flex-direction: column;
    }
    .cn-task-btn {
        max-width: 100%;
    }
    a.cn-edge-btn,
    .pagination .page-item a.cn-edge-btn {
        width: 36px !important;
        height: 72px !important;
    }
}
