/**
 * أنماط CSS للإعلانات
 */

/* تنسيق عام للإعلانات */
.ad-banner {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    background: #fff;
    position: relative;
    margin-bottom: 30px;
    border: 1px solid rgba(142, 23, 81, 0.1);
}

.ad-banner:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(142, 23, 81, 0.15);
    border-color: rgba(142, 23, 81, 0.2);
}

.ad-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 20px;
}

.ad-image {
    flex: 0 0 40%;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.ad-image img {
    width: 100%;
    height: auto;
    transition: transform 0.5s ease;
    object-fit: cover;
}

.ad-banner:hover .ad-image img {
    transform: scale(1.05);
}

.ad-text {
    flex: 0 0 60%;
    padding: 0 20px;
}

.ad-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.ad-description {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

.ad-stats {
    display: flex;
    gap: 10px;
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 10px;
}

.ad-views, .ad-clicks, .ad-expiry {
    display: flex;
    align-items: center;
    gap: 3px;
}

.ad-cta {
    margin-top: 15px;
}

.ad-btn {
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.ad-btn i {
    transition: transform 0.3s ease;
}

.ad-btn:hover i {
    transform: translateX(-4px);
}

.ad-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(142, 23, 81, 0.8);
    color: white;
    padding: 3px 10px;
    font-size: 0.7rem;
    border-radius: 20px;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* تنسيق للإعلان الجانبي */
.ad-banner-sidebar {
    flex-direction: column;
    border-right: 4px solid var(--primary-color);
    overflow: visible;
}

.ad-banner-sidebar .ad-content {
    flex-direction: column;
    padding: 15px;
}

.ad-banner-sidebar .ad-image {
    width: 100%;
    margin-bottom: 15px;
}

.ad-banner-sidebar .ad-text {
    width: 100%;
    padding: 0;
    text-align: center;
}

.ad-sidebar-decoration {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 5px 15px rgba(142, 23, 81, 0.3);
    z-index: 3;
    transform: rotate(-15deg);
}

.ad-sidebar-decoration::before {
    content: '\f02b';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
}

/* تنسيق للإعلانات في الأقسام المختلفة */
.ad-section {
    padding: 2rem 0;
    background-color: rgba(248, 249, 250, 0.7);
    position: relative;
    overflow: hidden;
}

.ad-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/pattern-1.png');
    opacity: 0.05;
    z-index: 0;
}

.ad-container {
    position: relative;
    z-index: 1;
}

.ad-container-full .ad-banner {
    margin-bottom: 0;
}

/* تنسيق للإعلانات المنبثقة */
.popup-ad {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    display: none;
}

.popup-ad-content {
    position: relative;
    max-width: 500px;
    width: 90%;
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.popup-ad-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    transition: all 0.3s;
}

.popup-ad-close:hover {
    color: #000;
    transform: scale(1.2);
}

/* تنسيق للإعلانات المعززة */
.enhanced-ad .ad-banner {
    border: none;
    box-shadow: 0 15px 35px rgba(142, 23, 81, 0.15);
    background: linear-gradient(to bottom right, #fff, #f9f9f9);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.enhanced-ad .ad-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, var(--primary-color), var(--primary-light));
    z-index: 2;
}

.enhanced-ad .ad-banner::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(142, 23, 81, 0.1) 0%, rgba(142, 23, 81, 0) 70%);
    border-radius: 50%;
}

.enhanced-ad .ad-banner:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(142, 23, 81, 0.2);
}

.enhanced-ad .ad-image {
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border: 3px solid #fff;
    overflow: hidden;
}

.enhanced-ad .ad-title {
    font-size: 1.4rem;
    background: linear-gradient(to right, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
}

.enhanced-ad .ad-btn {
    background: linear-gradient(to right, var(--primary-color), var(--primary-light));
    color: white;
    border: none;
    padding: 10px 25px;
    font-weight: 700;
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: all 0.4s ease;
}

.enhanced-ad .ad-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(to right, var(--primary-light), var(--primary-color));
    transition: all 0.4s ease;
    z-index: -1;
}

.enhanced-ad .ad-btn:hover::before {
    width: 100%;
}

.enhanced-ad .ad-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(142, 23, 81, 0.3);
}

.enhanced-ad .ad-badge {
    background: linear-gradient(to right, var(--primary-color), var(--primary-light));
    padding: 5px 15px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    animation: pulse 2s infinite;
}

/* تنسيق عناوين أقسام الإعلانات */
.ad-section-title {
    position: relative;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: inline-block;
}

.ad-section-divider {
    width: 80px;
    height: 3px;
    background: var(--primary-color);
    margin: 0 auto;
    margin-top: 10px;
    border-radius: 3px;
}

/* تحسينات للإعلانات على الأجهزة المحمولة */
@media (max-width: 768px) {
    .ad-content {
        flex-direction: column;
    }
    
    .ad-image, .ad-text {
        width: 100%;
        flex: 0 0 100%;
    }
    
    .ad-text {
        padding: 15px 0 0;
        text-align: center;
    }
    
    .ad-sidebar-decoration {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        top: -5px;
        right: -5px;
    }
    
    .sidebar-ad-container {
        margin-top: 30px;
    }
}

/* تأثيرات حركية */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(142, 23, 81, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(142, 23, 81, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(142, 23, 81, 0);
    }
}
