/* Popup скидок на курсы */
.discount-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    backdrop-filter: blur(4px);
    animation: discountFadeIn 0.2s ease;
}

.discount-popup-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes discountFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes discountSlideUp {
    from { 
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.discount-popup {
    background: linear-gradient(145deg, #fff 0%, #f8f9ff 100%);
    border-radius: 20px;
    width: 90%;
    max-width: 680px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(73, 66, 228, 0.25);
    animation: discountSlideUp 0.3s ease;
    position: relative;
}

.discount-popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    color: #666;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.discount-popup-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
    transform: rotate(90deg);
}

.discount-popup-header {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 50%, #ffd93d 100%);
    padding: 28px 24px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.discount-popup-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 60%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(180deg); }
}

.discount-popup-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.95);
    color: #ff6b6b;
    font-weight: 800;
    font-size: 0.85em;
    padding: 6px 16px;
    border-radius: 30px;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
}

.discount-popup-title {
    color: #fff;
    font-size: 1.7em;
    font-weight: 900;
    margin: 0 0 8px 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    position: relative;
}

.discount-popup-subtitle {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.05em;
    margin: 0;
    position: relative;
}

.discount-popup-body {
    padding: 24px;
    max-height: calc(85vh - 200px);
    overflow-y: auto;
}

.discount-popup-courses {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.discount-course-card {
    background: #fff;
    border: 1px solid #e8eaff;
    border-radius: 14px;
    padding: 16px;
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.discount-course-card:hover {
    border-color: #4942E4;
    box-shadow: 0 8px 25px rgba(73, 66, 228, 0.12);
    transform: translateY(-2px);
}

.discount-course-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
    clip-path: polygon(100% 0, 0 0, 100% 100%);
    opacity: 0.9;
}

.discount-course-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    color: #fff;
    font-weight: 800;
    font-size: 0.75em;
    z-index: 1;
}

.discount-course-title {
    font-weight: 700;
    font-size: 0.95em;
    color: #222;
    margin-bottom: 8px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.discount-course-school {
    font-size: 0.8em;
    color: #888;
    margin-bottom: 10px;
}

.discount-course-prices {
    margin-top: auto;
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.discount-course-old-price {
    font-size: 0.85em;
    color: #aaa;
    text-decoration: line-through;
}

.discount-course-new-price {
    font-size: 1.1em;
    font-weight: 800;
    color: #4942E4;
}

.discount-popup-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 8px;
    border-top: 1px solid #eee;
}

.discount-btn-primary {
    display: block;
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1.1em;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.35);
}

.discount-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 107, 107, 0.45);
    color: #fff;
}

.discount-btn-secondary {
    display: block;
    width: 100%;
    padding: 14px 24px;
    background: transparent;
    color: #888;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-size: 0.95em;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.discount-btn-secondary:hover {
    background: #f5f5f5;
    color: #666;
    border-color: #ccc;
}

/* Адаптивность */
@media (max-width: 600px) {
    .discount-popup {
        width: 95%;
        max-height: 92vh;
        border-radius: 14px;
    }
    
    .discount-popup-close {
        top: 10px;
        right: 10px;
        width: 32px;
        height: 32px;
        font-size: 18px;
    }
    
    .discount-popup-header {
        padding: 16px 14px 14px;
    }
    
    .discount-popup-badge {
        font-size: 0.75em;
        padding: 4px 12px;
        margin-bottom: 8px;
    }
    
    .discount-popup-title {
        font-size: 1.15em;
        margin: 0 0 4px 0;
        line-height: 1.2;
    }
    
    .discount-popup-subtitle {
        font-size: 0.85em;
        line-height: 1.3;
    }
    
    .discount-popup-body {
        padding: 14px;
        max-height: calc(92vh - 140px);
    }
    
    .discount-popup-courses {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 16px;
    }
    
    .discount-course-card {
        padding: 12px;
        border-radius: 12px;
    }
    
    .discount-course-card::before {
        width: 50px;
        height: 50px;
    }
    
    .discount-course-badge {
        top: 4px;
        right: 4px;
        font-size: 0.7em;
    }
    
    .discount-course-title {
        font-size: 0.88em;
        margin-bottom: 6px;
        line-height: 1.25;
    }
    
    .discount-course-school {
        font-size: 0.75em;
        margin-bottom: 8px;
    }
    
    .discount-course-prices {
        gap: 8px;
    }
    
    .discount-course-old-price {
        font-size: 0.8em;
    }
    
    .discount-course-new-price {
        font-size: 1em;
    }
    
    .discount-popup-actions {
        gap: 10px;
        padding-top: 6px;
    }
    
    .discount-btn-primary {
        padding: 12px 18px;
        font-size: 0.95em;
        border-radius: 10px;
    }
    
    .discount-btn-secondary {
        padding: 10px 18px;
        font-size: 0.85em;
        border-radius: 10px;
    }
}

