/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #0f0f23;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    direction: rtl;
    text-align: right;
}

/* Animated gradient background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab, #667eea, #764ba2);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    z-index: -3;
}

/* Secondary animated layer */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.3) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
    z-index: -2;
}

/* Floating particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: particleFloat 20s linear infinite;
}

.particle:nth-child(1) {
    width: 4px;
    height: 4px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 25s;
}

.particle:nth-child(2) {
    width: 6px;
    height: 6px;
    top: 60%;
    left: 20%;
    animation-delay: 5s;
    animation-duration: 30s;
}

.particle:nth-child(3) {
    width: 3px;
    height: 3px;
    top: 30%;
    left: 80%;
    animation-delay: 10s;
    animation-duration: 20s;
}

.particle:nth-child(4) {
    width: 5px;
    height: 5px;
    top: 80%;
    left: 70%;
    animation-delay: 15s;
    animation-duration: 35s;
}

.particle:nth-child(5) {
    width: 4px;
    height: 4px;
    top: 10%;
    left: 60%;
    animation-delay: 20s;
    animation-duration: 28s;
}

.particle:nth-child(6) {
    width: 7px;
    height: 7px;
    top: 70%;
    left: 90%;
    animation-delay: 8s;
    animation-duration: 22s;
}

.particle:nth-child(7) {
    width: 3px;
    height: 3px;
    top: 40%;
    left: 30%;
    animation-delay: 12s;
    animation-duration: 26s;
}

.particle:nth-child(8) {
    width: 5px;
    height: 5px;
    top: 90%;
    left: 40%;
    animation-delay: 18s;
    animation-duration: 32s;
}

/* Geometric shapes */
.geometric-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.shape {
    position: absolute;
    opacity: 0.1;
    animation: shapeRotate 30s linear infinite;
}

.shape:nth-child(1) {
    width: 100px;
    height: 100px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    border-radius: 20px;
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.shape:nth-child(2) {
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, #a8edea, #fed6e3);
    border-radius: 50%;
    top: 70%;
    left: 10%;
    animation-delay: 10s;
}

.shape:nth-child(3) {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, #ffecd2, #fcb69f);
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    top: 30%;
    left: 20%;
    animation-delay: 20s;
}

.shape:nth-child(4) {
    width: 120px;
    height: 120px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 30px;
    bottom: 20%;
    left: 15%;
    animation-delay: 5s;
}

/* Animations */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    33% {
        transform: translateY(-30px) rotate(120deg);
    }
    66% {
        transform: translateY(30px) rotate(240deg);
    }
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

@keyframes shapeRotate {
    0% {
        transform: rotate(0deg) scale(1);
    }
    50% {
        transform: rotate(180deg) scale(1.1);
    }
    100% {
        transform: rotate(360deg) scale(1);
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Header styles */
.header {
    text-align: center;
    margin-bottom: 3rem;
    color: white;
    position: relative;
    z-index: 1;
}

.header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #ffffff;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.7);
}

.header p {
    font-size: 1.2rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

@keyframes textShine {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Activities grid */
.activities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    position: relative;
    z-index: 1;
}

/* Activity card styles */
.activity-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    transform-style: preserve-3d;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.activity-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    background: rgba(255, 255, 255, 1);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* Card image/icon */
.card-image {
    height: 120px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 1rem;
}

.card-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.1) 100%);
    transition: all 0.4s ease;
}

.activity-card:hover .card-image::before {
    background: linear-gradient(45deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.05) 100%);
}

.activity-card:hover .card-image {
    transform: scale(1.05);
}

.icon {
    font-size: 2.5rem;
    z-index: 1;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translateX(0);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.activity-card:hover .icon {
    transform: translateX(5px) scale(1.1);
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
    background: rgba(255, 255, 255, 0.95);
}


/* Card content */
.card-content {
    padding: 1rem;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.activity-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2d3748;
    transition: color 0.3s ease;
}

.activity-card:hover .activity-name {
    color: #667eea;
}

.activity-description {
    color: #718096;
    line-height: 1.6;
    transition: color 0.3s ease;
    flex-grow: 1;
    margin-bottom: 1rem;
}

.activity-card:hover .activity-description {
    color: #4a5568;
}

/* Activity leader styles */
.activity-leader {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
}

.activity-card:hover .activity-leader {
    background: rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateY(-1px);
}

.leader-label {
    font-weight: 600;
    color: #667eea;
    margin-left: 0.5rem;
    font-size: 0.9rem;
}

.leader-name {
    font-weight: 500;
    color: #2d3748;
    font-size: 1rem;
}

.activity-card:hover .leader-name {
    color: #667eea;
}

/* Group link button */
.group-link {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.group-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.group-link:hover::before {
    left: 100%;
}

.group-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .header h1 {
        font-size: 2.5rem;
    }
    
    .header p {
        font-size: 1rem;
    }
    
    .activities-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .activity-card {
        margin: 0 auto;
        max-width: 400px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .card-content {
        padding: 1rem;
    }
    
    .activity-name {
        font-size: 1.25rem;
    }
    
    .group-link {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* Desktop specific - 3 cards per row */
@media (min-width: 1200px) {
    .activities-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tablet specific - 2 cards per row */
@media (min-width: 769px) and (max-width: 1199px) {
    .activities-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Animation for page load */
.activity-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(30px);
}

.activity-card:nth-child(1) { animation-delay: 0.1s; }
.activity-card:nth-child(2) { animation-delay: 0.2s; }
.activity-card:nth-child(3) { animation-delay: 0.3s; }
.activity-card:nth-child(4) { animation-delay: 0.4s; }
.activity-card:nth-child(5) { animation-delay: 0.5s; }
.activity-card:nth-child(6) { animation-delay: 0.6s; }
.activity-card:nth-child(7) { animation-delay: 0.7s; }
.activity-card:nth-child(8) { animation-delay: 0.8s; }
.activity-card:nth-child(9) { animation-delay: 0.9s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
