/* Community Page Styles */

/* Hero Section */
.community-hero {
    padding: 2rem 0;
}

/* About Section */
.community-about {
    padding: 2rem 0;
}

/* Community Grid */
.community-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

/* Community Cards */
.community-card {
    display: block;
    text-decoration: none;
    color: inherit;
    /* Optimized transition - only animate transform and box-shadow */
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
    will-change: transform, box-shadow;
}

.community-card:hover {
    text-decoration: none;
    color: inherit;
}

.card-content {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 10px 15px -3px rgba(140, 29, 64, 0.1);
    /* Optimized transition - only animate transform and box-shadow */
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
    height: 100%;
    will-change: transform, box-shadow;
}

.community-card:hover .card-content {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.2);
}

/* Card Icons */
.card-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

/* Card Content */
.card-content h3 {
    color: var(--asu-maroon);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    /* Optimized transition - only animate color */
    transition: color 0.2s ease-out;
}

.community-card:hover h3 {
    color: var(--asu-gold) !important;
}

.card-content p {
    color: #6b7280;
    line-height: 1.6;
}

/* Join Community Section */
.join-community {
    text-align: center;
    margin-top: 4rem;
}

.join-community h2 {
    color: var(--asu-maroon);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.join-community .about-subtitle {
    margin-bottom: 2rem;
}

.join-community .btn {
    background: var(--asu-maroon);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    /* Optimized transition - only animate background-color, transform, and box-shadow */
    transition: background-color 0.2s ease-out, transform 0.2s ease-out, box-shadow 0.2s ease-out;
    will-change: background-color, transform, box-shadow;
}

.join-community .btn:hover {
    background: var(--asu-gold);
    transform: translateY(-1px);
    box-shadow: 0 8px 15px -3px rgba(140, 29, 64, 0.2);
}

/* Optimized animations - reduced duration and complexity */
.fade-in {
    animation: fadeInUp 0.5s ease-out;
    will-change: opacity, transform;
}

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

/* Touch Device Detection and Hover Disabling */
@media (hover: none) and (pointer: coarse) {
    /* Disable hover effects on touch devices */
    .community-card:hover,
    .community-card:hover .card-content,
    .community-card:hover h3,
    .join-community .btn:hover {
        transform: none !important;
        box-shadow: none !important;
        background: inherit !important;
        color: inherit !important;
    }

    /* Remove hover animations on touch devices */
    .community-card:hover h3 {
        color: var(--asu-maroon) !important;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .community-grid {
        grid-template-columns: 1fr;
    }
    
    /* Reduce animation intensity on mobile for better performance */
    .community-card:hover .card-content {
        transform: translateY(-2px);
    }
    
    .join-community .btn:hover {
        transform: translateY(0);
    }
}
