/* Community Gallery Section */
.community-gallery-section {
    position: relative;
    padding: 64px 0;
    overflow: hidden;
    min-height: 600px;
}

/* רקע עם גרדיאנט */
.gallery-background {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom right, 
        rgba(254, 215, 170, 0.3),
        rgba(252, 231, 243, 0.4),
        rgba(254, 243, 199, 0.3)
    );
    z-index: 1;
}

.bg-pulse {
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom right,
        rgba(251, 146, 60, 0.3),
        rgba(245, 158, 11, 0.3)
    );
    opacity: 0.1;
    animation: galleryPulse 3s ease-in-out infinite;
}

/* לבבות צפים */
.floating-hearts {
    position: absolute;
    inset: 0;
    z-index: 15;
    pointer-events: none;
}

.heart-icon {
    position: absolute;
    width: 30px;
    height: 30px;
    fill: none;
    stroke: rgba(251, 146, 60, 0.3);
    stroke-width: 2;
    animation: galleryPulse 4s ease-in-out infinite;
}

/* חיות קופצות */
.floating-animals {
    position: absolute;
    inset: 0;
    z-index: 15;
    pointer-events: none;
}

.animal-icon {
    position: absolute;
    width: 28px;
    height: 28px;
    fill: none;
    stroke-width: 2;
    animation: bounce 5s ease-in-out infinite;
}

.animal-icon.dog {
    stroke: rgba(245, 158, 11, 0.25);
}

.animal-icon.cat {
    stroke: rgba(251, 146, 60, 0.25);
}

/* תוכן */
.gallery-content {
    position: relative;
    z-index: 20;
    padding: 0 16px;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
}

/* כותרת */
.gallery-header {
    text-align: center;
    margin-bottom: 32px;
}

.gallery-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: rgb(120, 53, 15);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
}

.gallery-subtitle {
    font-size: 1.125rem;
    color: rgb(146, 64, 14);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* גריד תמונות */
.gallery-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    width: 100%;
}

/* פריט תמונה */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: all 0.7s ease-in-out;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: 1px;
    animation: fadeIn 1s ease-in-out forwards;
    opacity: 0;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.gallery-item:hover {
    transform: scale(1.1) !important;
    z-index: 30;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
    opacity: 0.6;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* אוברליי */
.image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, 
        rgba(120, 53, 15, 0.2),
        transparent,
        transparent
    );
    opacity: 0.6;
}

.image-pulse {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom right,
        rgba(251, 146, 60, 0.2),
        rgba(245, 158, 11, 0.2)
    );
    opacity: 0.15;
    animation: galleryPulse 3s ease-in-out infinite;
    border-radius: 8px;
}

/* לב קטן על התמונה */
.item-heart {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 10px;
    height: 10px;
    fill: none;
    stroke: rgba(251, 146, 60, 0.6);
    stroke-width: 2;
    animation: galleryPulse 2s ease-in-out infinite;
}

/* --- אנימציות --- */

@keyframes galleryPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* רספונסיביות */
@media (max-width: 768px) {
    .gallery-title {
        font-size: 1.875rem;
    }
    
    .gallery-subtitle {
        font-size: 1rem;
    }
    
    .gallery-item {
        width: 60px !important;
        height: 72px !important;
    }
    
    .heart-icon,
    .animal-icon {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .community-gallery-section {
        padding: 40px 0;
    }
    
    .gallery-title {
        font-size: 1.5rem;
    }
    
    .gallery-item {
        width: 50px !important;
        height: 60px !important;
    }
}

/* תמיכה ב-RTL */
[dir="rtl"] .gallery-content {
    direction: rtl;
}

[dir="rtl"] .gallery-header {
    text-align: center;
}