/* ========================================== */
/* Three Ads Section - 3 إعلانات جنب بعض */
/* ========================================== */

* {
    font-family: "Amazon Ember", Arial, sans-serif;
}

.three-ads-section {
    padding: 40px 0;
    background: #ffffff; /* خلفية بيضا للصفحة */
}

.three-ads-section .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 60px; /* الفراغ الأبيض من اليمين والشمال */
    position: relative;
}

/* الخلفية الرمادية اللي هتلزق بالإعلانات */
.three-ads-section .container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 60px; /* نفس الـ padding */
    right: 60px; /* نفس الـ padding */
    bottom: 0;
    background: #f5f5f5;
    border-radius: 16px;
    z-index: 0;
}

.three-ads-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    position: relative;
    z-index: 1; /* فوق الخلفية الرمادية */
}

.ad-box {
    display: block;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
}

.ad-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    transition: all 0.3s ease;
    z-index: 1;
}

.ad-box:hover::before {
    background: rgba(0, 0, 0, 0.05);
}

.ad-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.ad-box img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.ad-box:hover img {
    transform: scale(1.05);
}

/* ========================================== */
/* Responsive */
/* ========================================== */

@media (max-width: 992px) {
    .three-ads-section {
        padding: 35px 0;
    }

    .three-ads-section .container {
        padding: 0 24px;
    }

    .three-ads-section .container::before {
        left: 24px;
        right: 24px;
    }

    .three-ads-grid {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .three-ads-section {
        padding: 30px 0;
    }

    .three-ads-section .container {
        padding: 0 16px;
    }

    .three-ads-section .container::before {
        left: 16px;
        right: 16px;
    }

    .three-ads-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .ad-box {
        border-radius: 12px;
    }
}

@media (max-width: 480px) {
    .three-ads-section {
        padding: 25px 0;
    }

    .three-ads-section .container {
        padding: 0 12px;
    }

    .three-ads-section .container::before {
        left: 12px;
        right: 12px;
    }

    .three-ads-grid {
        gap: 15px;
    }

    .ad-box {
        border-radius: 10px;
    }
}
