/* ===================================
   WEJHA - Modern Activities & Adventures Section
   =================================== */

.activities-modern {
    position: relative;
    width: 100%;
    padding: 40px 0;
    /* Reduced padding since container handles it */
    background: #ffffff;
    /* Move background to container */
    z-index: 5;
    overflow: visible;
}

/* Subtle glow effect behind the section */
.activities-modern::before {
    display: none;
    /* Removed to avoid overflow issues, or move it inside container */
}

/* The Black Box Container */
.activities-modern .container {
    position: relative;
    z-index: 2;
    max-width: 100%;
    /* جعل العرض كامل */
    margin: 0 auto;
    background: #0a0a0a;
    /* Deep Midnight Black */
    border-radius: 40px;
    /* Border radius top and bottom */
    padding: 80px 5%;
    /* Inner spacing */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    /* Subtle border top and bottom as requested */
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    /* Contain inner elements safely */
}

/* Container Glow */
.activities-modern .container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top left, rgba(var(--clr-primary-rgb), 0.05) 0%, transparent 60%);
    z-index: 0;
    pointer-events: none;
}

/* Header Adjustments for Dark Mode */
.activities-modern .light-header {
    position: relative;
    z-index: 2;
}

.activities-modern .light-header .section-title,
.activities-modern .light-header .section-subtitle {
    color: #fff;
}

.activities-modern .light-header .section-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}

.activities-modern .light-header .section-title-line span {
    background: var(--clr-primary);
}

.activities-modern .light-header .section-title-line span:nth-child(2),
.activities-modern .light-header .section-title-line span:nth-child(3) {
    background: rgba(255, 255, 255, 0.2);
}

/* The Grid Layout */
.activities-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

/* The Activity Card */
.activity-card {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s ease;
    background: #111;
}

.activity-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8), 0 0 20px rgba(var(--clr-primary-rgb), 0.2);
}

/* The Image */
.activity-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}

.activity-card:hover .activity-img {
    transform: scale(1);
}

/* The Overlay */
.activity-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.4) 40%, transparent 100%);
    opacity: 0.8;
    transition: opacity 0.5s ease;
}

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

/* The Content */
.activity-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transform: translateY(15px);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.activity-card:hover .activity-content {
    transform: translateY(0);
}

.activity-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 10px 0;
    font-family: inherit;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    transition: color 0.3s ease;
}

.activity-card:hover .activity-title {
    color: var(--clr-primary);
}

/* The Explore Link */
.activity-explore {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    opacity: 0;
    transition: all 0.4s ease;
}

.activity-explore svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.activity-card:hover .activity-explore {
    opacity: 1;
    color: #fff;
}

.activity-card:hover .activity-explore svg {
    transform: translateX(-5px);
    /* Arabic RTL movement */
    color: var(--clr-primary);
}

/* Hidden Items for Show More logic */
.activity-card.hidden-activity {
    display: none;
}

/* Entering Animation - Simplified for Mobile safety */
.activity-card.revealed-activity {
    animation: simpleFadeIn 0.5s ease forwards;
}

@keyframes simpleFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Actions Container */
.activities-actions-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 60px;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .activities-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
    }

    .activity-content {
        padding: 20px;
        transform: translateY(0);
        /* Always visible on mobile */
    }

    .activity-explore {
        opacity: 1;
    }
}