/* Ads Section - قسم الإعلانات */

.ads-section {
    background: #ffffff;
    position: relative;
}

/* Important Links Section - روابط مهمة */
.important-links-section {
    background: #f8f9fa;
}

.important-link-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid #e9ecef;
    height: 100%;
}

.important-link-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: #004D40;
}

.link-card-wrapper {
    display: block;
    text-decoration: none;
    position: relative;
}

.link-image-wrapper {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.link-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.important-link-card:hover .link-image {
    transform: scale(1.1);
}

.link-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 77, 64, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.important-link-card:hover .link-overlay {
    opacity: 1;
}

.link-overlay i {
    color: white;
    font-size: 32px;
}

.link-title-wrapper {
    padding: 15px;
    text-align: center;
}

.link-title {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    transition: color 0.3s ease;
}

.important-link-card:hover .link-title {
    color: #004D40;
}

.ad-card {
    background: #ffffff;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.4s ease;
    border: 2px solid #f0f0f0;
    position: relative;
}

.ad-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    border-color: #004D40;
}

.ad-link {
    display: block;
    text-decoration: none;
    position: relative;
}

.ad-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.4);
    animation: pulse 2s infinite;
}

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

.ad-badge i {
    font-size: 12px;
}

.ad-image-wrapper {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: #f8f9fa;
}

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

.ad-card:hover .ad-image {
    transform: scale(1.1);
}

.ad-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 50%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 25px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.ad-card:hover .ad-overlay {
    opacity: 1;
}

.ad-view-btn {
    background: #004D40;
    color: #ffffff;
    padding: 12px 30px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    transform: translateY(20px);
    transition: all 0.4s ease;
    box-shadow: 0 5px 20px rgba(231, 76, 60, 0.4);
}

.ad-card:hover .ad-view-btn {
    transform: translateY(0);
}

.ad-view-btn:hover {
    background: #c0392b;
}

.ad-view-btn i {
    font-size: 14px;
}

.ad-title-wrapper {
    padding: 20px;
    background: #ffffff;
}

.ad-title {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
    text-align: center;
    transition: color 0.3s ease;
}

.ad-card:hover .ad-title {
    color: #004D40;
}

.btn-view-all-ads {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 35px;
    background: linear-gradient(135deg, #026157 0%, #00897b 100%);
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgb(0 137 123 / 41%);
}

.btn-view-all-ads:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgb(0 137 123 / 56%);
    text-decoration: none;
    color: #ffffff;
}

.btn-view-all-ads i {
    transition: transform 0.3s ease;
}

.btn-view-all-ads:hover i {
    transform: translateX(-3px);
}

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

.ad-card {
    animation: fadeInUp 0.6s ease forwards;
}

.ad-card:nth-child(1) {
    animation-delay: 0.1s;
}

.ad-card:nth-child(2) {
    animation-delay: 0.2s;
}

.ad-card:nth-child(3) {
    animation-delay: 0.3s;
}

.ad-card:nth-child(4) {
    animation-delay: 0.4s;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ad-image-wrapper {
        height: 220px;
    }
    
    .ad-title {
        font-size: 16px;
    }
    
    .ad-badge {
        top: 10px;
        right: 10px;
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .ad-view-btn {
        padding: 10px 24px;
        font-size: 14px;
    }
    
    /* Important Links - Mobile */
    .link-image-wrapper {
        height: 150px;
    }
    
    .link-title {
        font-size: 13px;
    }
}

@media (max-width: 576px) {
    .ad-image-wrapper {
        height: 200px;
    }
    
    .ad-title-wrapper {
        padding: 15px;
    }
    
    .ad-title {
        font-size: 15px;
    }
    
    /* Important Links - Small Mobile */
    .important-link-card {
        margin-bottom: 15px;
    }
    
    .link-image-wrapper {
        height: 140px;
    }
    
    .link-title-wrapper {
        padding: 12px;
    }
    
    .link-title {
        font-size: 12px;
    }
}
