/**
 * باکس تبلیغ دوره در وسط مقالات
 * طراحی زیبا و همسان با قالب
 * بدون حس و حال تبلیغات زرد!
 */

/* ================================================================================
 * MAIN CONTAINER
 * ============================================================================== */
.hooshex-course-promo-box {
    margin: 60px 0;
    padding: 0;
    position: relative;
    animation: fadeInUp 0.8s ease-out;
}

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

.course-promo-inner {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    padding: 40px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(241, 91, 181, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.course-promo-inner:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 20px 60px rgba(241, 91, 181, 0.15),
        0 5px 15px rgba(0, 0, 0, 0.08);
    border-color: rgba(241, 91, 181, 0.3);
}

/* Decorative background pattern */
.course-promo-inner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(241, 91, 181, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

/* ================================================================================
 * BADGE
 * ============================================================================== */
.course-promo-badge {
    position: absolute;
    top: 30px;
    left: 30px;
    background: linear-gradient(135deg, #f15bb5, #cc3333);
    color: #ffffff;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 5px 20px rgba(241, 91, 181, 0.4);
    z-index: 2;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* ================================================================================
 * HEADER
 * ============================================================================== */
.course-promo-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.promo-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #f15bb5, #cc3333);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 5px 20px rgba(241, 91, 181, 0.3);
    flex-shrink: 0;
}

.promo-icon svg {
    width: 28px;
    height: 28px;
}

.promo-title {
    font-size: 22px;
    font-weight: 700;
    color: #242c44;
    margin: 0;
    line-height: 1.3;
}

/* ================================================================================
 * CONTENT
 * ============================================================================== */
.course-promo-content {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 30px;
    align-items: start;
    position: relative;
    z-index: 1;
}

/* ================================================================================
 * IMAGE
 * ============================================================================== */
.course-promo-image {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    transition: all 0.4s ease;
    aspect-ratio: 4/3;
}

.course-promo-image:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 35px rgba(241, 91, 181, 0.25);
}

.course-promo-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.course-promo-image:hover img {
    transform: scale(1.1);
}

/* Gradient overlay on image */
.course-promo-image::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(241, 91, 181, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.course-promo-image:hover::after {
    opacity: 1;
}

/* ================================================================================
 * DETAILS
 * ============================================================================== */
.course-promo-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.course-promo-course-title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
}

.course-promo-course-title a {
    color: #242c44;
    text-decoration: none;
    transition: color 0.3s ease;
    background: linear-gradient(to right, #f15bb5, #cc3333) no-repeat bottom;
    background-size: 0% 2px;
    transition: background-size 0.3s ease, color 0.3s ease;
}

.course-promo-course-title a:hover {
    color: #f15bb5;
    background-size: 100% 2px;
}

.course-promo-excerpt {
    color: #6c757d;
    font-size: 15px;
    line-height: 1.7;
    margin: 0;
}

/* ================================================================================
 * META
 * ============================================================================== */
.course-promo-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    margin: 10px 0;
}

.course-promo-teacher,
.course-promo-rating,
.course-promo-students {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
}

.course-promo-teacher svg,
.course-promo-rating svg,
.course-promo-students svg {
    flex-shrink: 0;
    color: #f15bb5;
}

.course-promo-rating {
    color: #ffa500;
}

.course-promo-rating svg {
    color: #ffa500;
}

/* ================================================================================
 * FOOTER
 * ============================================================================== */
.course-promo-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* ================================================================================
 * PRICE
 * ============================================================================== */
.course-promo-price {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

.course-promo-price .regular-price {
    font-size: 16px;
    color: #999;
    text-decoration: line-through;
    font-weight: 500;
}

.course-promo-price .sale-price {
    font-size: 26px;
    font-weight: 700;
    background: linear-gradient(135deg, #f15bb5, #cc3333);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.course-promo-price .current-price {
    font-size: 26px;
    font-weight: 700;
    color: #242c44;
}

.course-promo-price .free-price {
    font-size: 26px;
    font-weight: 700;
    background: linear-gradient(135deg, #4caf50, #2e7d32);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ================================================================================
 * BUTTON
 * ============================================================================== */
.course-promo-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: linear-gradient(135deg, #f15bb5, #cc3333);
    color: #ffffff;
    text-decoration: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    box-shadow: 0 8px 25px rgba(241, 91, 181, 0.35);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.course-promo-button::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(135deg, #cc3333, #f15bb5);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.course-promo-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(241, 91, 181, 0.5);
    color: #ffffff;
}

.course-promo-button:hover::before {
    opacity: 1;
}

.course-promo-button svg {
    transition: transform 0.3s ease;
}

.course-promo-button:hover svg {
    transform: translateX(-3px);
}

/* ================================================================================
 * RESPONSIVE
 * ============================================================================== */

/* Tablet */
@media (max-width: 991px) {
    .course-promo-content {
        grid-template-columns: 180px 1fr;
        gap: 25px;
    }
    
    .course-promo-inner {
        padding: 35px;
    }
    
    .course-promo-course-title {
        font-size: 22px;
    }
    
    .promo-title {
        font-size: 20px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .hooshex-course-promo-box {
        margin: 40px -20px;
    }
    
    .course-promo-inner {
        padding: 25px;
        border-radius: 15px;
    }
    
    .course-promo-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .course-promo-image {
        max-width: 100%;
        aspect-ratio: 16/9;
    }
    
    .course-promo-course-title {
        font-size: 20px;
    }
    
    .promo-title {
        font-size: 18px;
    }
    
    .promo-icon {
        width: 45px;
        height: 45px;
    }
    
    .promo-icon svg {
        width: 24px;
        height: 24px;
    }
    
    .course-promo-badge {
        top: 20px;
        left: 20px;
        font-size: 13px;
        padding: 6px 16px;
    }
    
    .course-promo-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .course-promo-price {
        justify-content: center;
    }
    
    .course-promo-button {
        justify-content: center;
        width: 100%;
    }
    
    .course-promo-meta {
        gap: 15px;
        font-size: 13px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .course-promo-inner {
        padding: 20px;
    }
    
    .course-promo-header {
        margin-bottom: 20px;
    }
    
    .course-promo-price .sale-price,
    .course-promo-price .current-price,
    .course-promo-price .free-price {
        font-size: 22px;
    }
    
    .course-promo-price .regular-price {
        font-size: 14px;
    }
}

/* ================================================================================
 * RTL SUPPORT
 * ============================================================================== */
[dir="rtl"] .course-promo-button svg {
    transform: scaleX(-1);
}

[dir="rtl"] .course-promo-button:hover svg {
    transform: translateX(3px) scaleX(-1);
}

/* ================================================================================
 * DARK MODE SUPPORT (Optional)
 * ============================================================================== */
@media (prefers-color-scheme: dark) {
    .course-promo-inner {
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
        border-color: rgba(241, 91, 181, 0.2);
    }
    
    .promo-title,
    .course-promo-course-title a {
        color: #ffffff;
    }
    
    .course-promo-course-title a:hover {
        color: #f15bb5;
    }
    
    .course-promo-excerpt {
        color: #b0b0b0;
    }
    
    .course-promo-teacher,
    .course-promo-students {
        color: #b0b0b0;
    }
    
    .course-promo-footer {
        border-top-color: rgba(255, 255, 255, 0.1);
    }
    
    .course-promo-price .current-price {
        color: #ffffff;
    }
}

/* ================================================================================
 * PRINT STYLES
 * ============================================================================== */
@media print {
    .hooshex-course-promo-box {
        break-inside: avoid;
        margin: 30px 0;
    }
    
    .course-promo-inner {
        box-shadow: none;
        border: 2px solid #f15bb5;
    }
    
    .course-promo-button {
        display: none;
    }
}

