/* ============================================
   РЕШАЕМ ВАШИ ЗАДАЧИ
   ============================================ */

.tasks-section {
    padding: 50px 0 50px;
    position: relative;
    overflow: hidden;
}

/* --- Фоновые декоративные элементы --- */
.tasks-section::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -10%;
    width: 60%;
    height: 140%;
    background-image: 
        linear-gradient(45deg, rgba(12, 55, 120, 0.03) 1px, transparent 1px),
        linear-gradient(-45deg, rgba(12, 55, 120, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.5;
    transform: rotate(5deg);
    pointer-events: none;
    z-index: 0;
}

.tasks-section::after {
    content: '';
    position: absolute;
    right: -80px;
    top: 20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(46, 124, 230, 0.03) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.tasks-container {
    max-width: 1740px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* --- Заголовочная часть --- */
.tasks-header {
    text-align: center;
    margin-bottom: 50px;
}

.tasks-label {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: #448DCB;
    margin-bottom: 12px;
}

.tasks-title {
    font-size: 46px;
    font-weight: 800;
    line-height: 1.2;
    color: #17335D;
    margin: 0 0 16px;
}

.tasks-divider {
    width: 60px;
    height: 3px;
    background: #448DCB;
    margin: 0 auto 18px;
    border-radius: 2px;
}

.tasks-subtitle {
    font-size: 18px;
    color: #66758A;
    max-width: 720px;
    margin: 0 auto;
    line-height: 1.6;
}

/* --- Сетка карточек 2×2 --- */
.tasks-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

/* --- Карточка (горизонтальная, 50/50) --- */
.task-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(30, 65, 120, 0.08);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    position: relative;
    overflow: hidden;
    min-height: 260px;
}

.task-card-inner {
    display: flex;
    height: 100%;
    position: relative;
    z-index: 2;
}

/* --- Левая часть (текст) --- */
.task-card-content {
    flex: 0 0 55%;
    padding: 32px 28px 32px 36px;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 3;
}

.task-card-text {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

/* Заголовок */
.task-card-title {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
    color: #17335D;
    margin: 0;
}

.task-card-title-accent {
    color: #448DCB;
}

/* Разделительная линия */
.task-card-divider {
    width: 40px;
    height: 3px;
    background: #448DCB;
    border-radius: 2px;
    margin: 2px 0 4px;
}

/* Описание */
.task-card-desc {
    font-size: 15px;
    color: #66758A;
    line-height: 1.5;
    margin: 0;
}

/* Кнопка */
.task-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 46px;
    padding: 0 24px;
    margin-top: 4px;
    background: linear-gradient(135deg, #448DCB 0%, #2d86ff 100%);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    border-radius: 999px;
    text-decoration: none;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 16px rgba(46, 124, 230, 0.3);
    width: fit-content;
    border: none;
    cursor: pointer;
}

.task-card-btn:hover {
    box-shadow: 0 8px 30px rgba(46, 124, 230, 0.45);
    transform: translateY(-2px);
    text-decoration: none;
    color: #ffffff;
}

.task-card-btn svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.task-card-btn:hover svg {
    transform: translateX(4px);
}

/* --- Правая часть (изображение) --- */
.task-card-image {
    flex: 0 0 80%;
    position: relative;
    overflow: hidden;
    border-radius: 0 16px 16px 0;
    margin-left: -10%;
}

.task-card-image-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.5s ease;
}

.task-card:hover .task-card-image-bg {
    transform: scale(1.04);
}

/* ============================================ */
/* ГРАДИЕНТ ОТ БЕЛОГО К ФОТОГРАФИИ (ПЛАВНЫЙ) */
/* ============================================ */
.task-card-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 1) 0%, 
        rgba(255, 255, 255, 0.95) 8%, 
        rgba(255, 255, 255, 0.7) 20%, 
        rgba(255, 255, 255, 0.3) 40%, 
        rgba(255, 255, 255, 0.1) 60%, 
        rgba(255, 255, 255, 0) 80%
    );
    pointer-events: none;
    z-index: 1;
}

/* Декоративная точечная сетка поверх изображения */
.task-card-image-dots {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle, rgba(46, 124, 230, 0.08) 1px, transparent 1px);
    background-size: 16px 16px;
    pointer-events: none;
    z-index: 2;
}

/* ============================================ */
/* КНОПКА "УТОЧНИТЬ ЦЕНУ" - ГРАДИЕНТ + МИГАНИЕ */
/* ============================================ */

.tasks-footer {
    margin-top: 48px;
    text-align: center;
    border-radius: 16px;
}

.tasks-footer-text {
    font-size: 18px;
    font-weight: 600;
    color: #17335D;
    margin-bottom: 16px;
}

.tasks-footer-btn-wrap {
    display: flex;
    justify-content: center;
}

.tasks-footer-btn-wrap .catalog-element-buy-container {
    display: inline-block;
}

.tasks-footer-btn-wrap .catalog-element-buy-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 600;
    color: #FFFFFF;
    background: linear-gradient(135deg, #448DCB 0%, #2d86ff 100%);
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 20px rgba(68, 141, 203, 0.3);
    border: none;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    animation: pulseButton 2s ease-in-out infinite;
}

/* Эффект пульсации (мигания) */
@keyframes pulseButton {
    0% {
        box-shadow: 0 4px 20px rgba(68, 141, 203, 0.3);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 4px 40px rgba(68, 141, 203, 0.6), 0 0 60px rgba(68, 141, 203, 0.2);
        transform: scale(1.02);
    }
    100% {
        box-shadow: 0 4px 20px rgba(68, 141, 203, 0.3);
        transform: scale(1);
    }
}

/* Дополнительный эффект блика */
.tasks-footer-btn-wrap .catalog-element-buy-button::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 30%;
    height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transform: rotate(25deg);
    animation: shimmerButton 3s ease-in-out infinite;
}

@keyframes shimmerButton {
    0% {
        left: -60%;
    }
    100% {
        left: 130%;
    }
}

.tasks-footer-btn-wrap .catalog-element-buy-button:hover {
    background: linear-gradient(135deg, #3578B5 0%, #1a6ee0 100%);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 40px rgba(68, 141, 203, 0.5);
    animation-play-state: paused;
}

.tasks-footer-btn-wrap .catalog-element-buy-button:hover::after {
    animation-play-state: paused;
}

.tasks-footer-btn-wrap .catalog-element-buy-button:active {
    transform: translateY(0) scale(0.98);
}

/* ============================================
   АДАПТИВНОСТЬ
   ============================================ */

@media (max-width: 1400px) {
    .task-card-title {
        font-size: 24px;
    }
    .task-card-desc {
        font-size: 14px;
    }
    .task-card-content {
        padding: 28px 24px 28px 30px;
    }
    .task-card-image {
        flex: 0 0 55%;
        margin-left: -12%;
    }
}

@media (max-width: 1200px) {
    .tasks-grid {
        gap: 20px;
    }
    .task-card {
        min-height: 220px;
    }
    .task-card-title {
        font-size: 22px;
    }
    .task-card-desc {
        font-size: 14px;
    }
    .task-card-content {
        padding: 24px 20px 24px 26px;
        flex: 0 0 58%;
    }
    .task-card-image {
        flex: 0 0 52%;
        margin-left: -8%;
    }
    .task-card-btn {
        height: 42px;
        padding: 0 20px;
        font-size: 13px;
    }
    .task-card-btn svg {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 992px) {
    .tasks-container {
        padding: 0 20px;
    }
    .tasks-title {
        font-size: 38px;
    }
    .tasks-subtitle {
        font-size: 17px;
    }
    .tasks-footer {
        padding: 24px 16px;
    }
    .tasks-footer-text {
        font-size: 16px;
    }
    .tasks-footer-btn-wrap .catalog-element-buy-button {
        padding: 12px 32px;
        font-size: 15px;
    }
}

@media (max-width: 768px) {
    .tasks-section {
        padding: 50px 0 60px;
    }
    .tasks-container {
        padding: 0 16px;
    }
    .tasks-title {
        font-size: 32px;
    }
    .tasks-subtitle {
        font-size: 16px;
    }
    .tasks-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .task-card {
        min-height: 180px;
        border-radius: 14px;
    }
    
    .task-card-inner {
        flex-direction: column;
    }
    
    .task-card-content {
        flex: 1;
        padding: 20px 24px 24px;
        order: 2;
    }
    
    .task-card-image {
        flex: 0 0 160px;
        border-radius: 14px 14px 0 0;
        order: 1;
        margin-left: 0;
        overflow: hidden;
    }
    
    /* ============================================ */
    /* НА МОБИЛКЕ - ГРАДИЕНТ СВЕРХУ (ОСВЕТЛЕНИЕ К НИЗУ) */
    /* ============================================ */
    .task-card-image-overlay {
        background: linear-gradient(180deg, 
            rgba(255, 255, 255, 0.4) 0%, 
            rgba(255, 255, 255, 0.15) 40%, 
            rgba(255, 255, 255, 0.05) 70%, 
            rgba(255, 255, 255, 0) 100%
        );
    }
    
    .task-card-title {
        font-size: 20px;
    }
    
    .task-card-desc {
        font-size: 14px;
    }
    
    .task-card-btn {
        height: 40px;
        padding: 0 18px;
        font-size: 13px;
    }
    
    .tasks-footer {
        padding: 20px 14px;
        margin-top: 32px;
    }
    .tasks-footer-text {
        font-size: 15px;
    }
    .tasks-footer-btn-wrap .catalog-element-buy-button {
        padding: 11px 28px;
        font-size: 14px;
        animation: pulseButton 2s ease-in-out infinite;
    }
}

@media (max-width: 576px) {
    .tasks-section {
        padding: 40px 0 50px;
    }
    .tasks-title {
        font-size: 28px;
    }
    .tasks-subtitle {
        font-size: 15px;
    }
    .tasks-label {
        font-size: 11px;
        letter-spacing: 0.2em;
    }
    .tasks-divider {
        width: 44px;
    }
    
    .task-card {
        min-height: 160px;
        border-radius: 12px;
    }
    
    .task-card-content {
        padding: 16px 18px 20px;
    }
    
    .task-card-image {
        flex: 0 0 130px;
    }
    
    .task-card-image-overlay {
        background: linear-gradient(180deg, 
            rgba(255, 255, 255, 0.3) 0%, 
            rgba(255, 255, 255, 0.1) 40%, 
            rgba(255, 255, 255, 0.03) 70%, 
            rgba(255, 255, 255, 0) 100%
        );
    }
    
    .task-card-title {
        font-size: 18px;
    }
    
    .task-card-desc {
        font-size: 13px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .task-card-divider {
        width: 32px;
        height: 2px;
    }
    
    .task-card-btn {
        height: 36px;
        padding: 0 14px;
        font-size: 12px;
        gap: 6px;
    }
    
    .task-card-btn svg {
        width: 12px;
        height: 12px;
    }
    
    .tasks-footer {
        padding: 16px 12px;
        margin-top: 24px;
        border-radius: 12px;
    }
    .tasks-footer-text {
        font-size: 14px;
    }
    .tasks-footer-btn-wrap .catalog-element-buy-button {
        padding: 10px 20px;
        font-size: 13px;
        width: 100%;
        max-width: 280px;
        animation: pulseButton 2s ease-in-out infinite;
    }
}

@media (max-width: 375px) {
    .tasks-title {
        font-size: 24px;
    }
    .tasks-subtitle {
        font-size: 14px;
    }
    .task-card-content {
        padding: 14px 14px 18px;
    }
    .task-card-title {
        font-size: 17px;
    }
    .task-card-desc {
        font-size: 12px;
    }
    .task-card-btn {
        height: 34px;
        padding: 0 12px;
        font-size: 12px;
        gap: 4px;
    }
    .task-card-btn svg {
        width: 12px;
        height: 12px;
    }
    
    .task-card-image-overlay {
        background: linear-gradient(180deg, 
            rgba(255, 255, 255, 0.25) 0%, 
            rgba(255, 255, 255, 0.08) 35%, 
            rgba(255, 255, 255, 0.02) 60%, 
            rgba(255, 255, 255, 0) 100%
        );
    }
    
    .tasks-footer-text {
        font-size: 13px;
    }
    .tasks-footer-btn-wrap .catalog-element-buy-button {
        padding: 9px 16px;
        font-size: 12px;
    }
}