/* منع تأثير الدارك مود */
body {
    color-scheme: light only;
}   

.big_img {
    width: calc(100% - 40px);
    max-width: 1150px;
    height: 250px;
    background-image: url('../images/banner.png');
    background-size: cover;
    background-position: center;
    border-radius: 20px;
    margin: 0 auto 48px auto;
}
@media (max-width: 359px) {
    .big_img {
        background-image: url('../images/banner.png');
        height: 160px;
        width: calc(100% - 24px);
        margin: 0 auto 32px auto;
        border-radius: 14px;
    }
}

.overview {
    text-align: center;
    margin-bottom: 40px;
}

.overview h1 {
    font-family: 'Changa', sans-serif;
    font-size: 50px;
    color: #0D1B2A;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 48px;
    padding: 0 20px 40px;
    justify-items: center;
    overflow: hidden;
}

.category {
    position: relative;
    width: 260px;
    height: 210px;
    overflow: hidden;
    border-radius: 12px;
    background-color: #ddd;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15), 0 2px 6px rgba(0, 0, 0, 0.1);
}

.category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.category:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25), 0 6px 12px rgba(0, 0, 0, 0.15);
}

.category:hover::before {
    opacity: 1;
}

.category img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.category:hover img {
    transform: scale(1.1);
}

.category .overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
    padding-bottom: 20px;
    font-size: 20px;
    font-weight: 700;
    color: white;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 60%);
    transition: all 0.4s ease;
    user-select: none;
    z-index: 2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    letter-spacing: 0.5px;
    text-align: center;
    line-height: 1.3;
}

/* Tablets: 481px - 768px */
@media (max-width: 768px) and (min-width: 481px) {
    .big_img {
        height: 220px;
        width: calc(100% - 40px);
        margin: 0 auto 44px auto;
    }

    .overview h1 {
        font-size: 42px;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
        padding: 0 20px 40px;
    }

    .category {
        width: 100%;
        max-width: 340px;
        height: 200px;
        opacity: 0;
    }

    .category.visible-right {
        animation: slideFromLeftMobile 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    }

    .category.visible-left {
        animation: slideFromRightMobile 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    }

    .category .overlay {
        font-size: 19px;
    }
}

/* Mobile: 360px - 480px */
@media (max-width: 480px) and (min-width: 360px) {
    .big_img {
        height: 180px;
        width: calc(100% - 32px);
        margin: 0 auto 36px auto;
        border-radius: 16px;
    }

    .overview h1 {
        font-size: 38px;
        margin-bottom: 30px;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        padding: 0 16px 40px;
    }

    .category {
        width: 100%;
        max-width: 100%;
        height: 165px;
        opacity: 0;
        border-radius: 10px;
    }

    .category.visible-right {
        animation: slideFromLeftMobile 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    }

    .category.visible-left {
        animation: slideFromRightMobile 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    }

    .category .overlay {
        font-size: 16px;
        padding-bottom: 16px;
        line-height: 1.2;
    }
}

/* Extra Small Mobile: 320px - 359px */
@media (max-width: 359px) {
    .big_img {
        height: 160px;
        width: calc(100% - 24px);
        margin: 0 auto 32px auto;
        border-radius: 14px;
    }

    .overview h1 {
        font-size: 32px;
        margin-bottom: 24px;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 0 12px 32px;
    }

    .category {
        width: 100%;
        max-width: 100%;
        height: 145px;
        opacity: 0;
        border-radius: 8px;
    }

    .category.visible-right {
        animation: slideFromLeftMobile 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    }

    .category.visible-left {
        animation: slideFromRightMobile 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    }

    .category .overlay {
        font-size: 14px;
        padding-bottom: 12px;
        line-height: 1.15;
        gap: 2px;
    }
}

/* Mobile Animations */
@media (max-width: 768px) {
    @keyframes slideFromLeftMobile {
        0% {
            transform: translateX(120%);
            opacity: 0;
        }
        100% {
            transform: translateX(0);
            opacity: 1;
        }
    }

    @keyframes slideFromRightMobile {
        0% {
            transform: translateX(-120%);
            opacity: 0;
        }
        100% {
            transform: translateX(0);
            opacity: 1;
        }
    }
}

/* Desktop Styles: 769px+ */
@media (min-width: 769px) {
    .category {
        opacity: 0;
        transform: translateX(120px) translateY(30px) scale(0.85);
    }

    .category.visible {
        opacity: 1;
        transform: translateX(0) translateY(0) scale(1);
        transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    }
}

/* Large Desktop: 1440px+ */
@media (min-width: 1440px) {
    .category-grid {
        max-width: 1400px;
        margin: 0 auto;
        gap: 56px;
    }

    .category {
        width: 280px;
        height: 225px;
    }

    .overview h1 {
        font-size: 56px;
    }
}

.category a {
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.category a[href^="mailto"],
.category a[href^="tel"],
.category a[href*="wa.me"],
.category a[href*="api.whatsapp.com"] {
    user-select: text;
}