/* Home Gallery Preview Styles */

.gallery-preview {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--color-bg) 0%, var(--color-surface) 100%);
}

.home-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.home-gallery-item {
    position: relative;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    cursor: pointer;
}

.home-gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.gallery-item-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.home-gallery-item:hover .gallery-item-image {
    transform: scale(1.05);
}

.gallery-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, 
        rgba(24, 48, 84, 0.1) 0%, 
        rgba(24, 48, 84, 0.4) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-overlay-icon {
    font-size: 2rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.home-gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-info {
    padding: 1.5rem;
}

.gallery-item-title {
    font-family: var(--font-family-primary);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.gallery-item-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gallery-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.gallery-item-section {
    background: var(--color-surface);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
}

.gallery-item-date {
    font-weight: 500;
}

.gallery-actions {
    text-align: center;
    margin-top: 3rem;
}

/* Loading State for Home Gallery */
.gallery-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.gallery-loading .loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--color-border);
    border-top: 3px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.gallery-loading p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
}

/* Empty State */
.gallery-empty {
    text-align: center;
    padding: 4rem 2rem;
}

.gallery-empty .empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.gallery-empty h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.gallery-empty p {
    color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .home-gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .gallery-item-image {
        height: 200px;
    }
    
    .gallery-item-info {
        padding: 1rem;
    }
    
    .gallery-item-title {
        font-size: 1rem;
    }
    
    .gallery-item-description {
        font-size: 0.85rem;
        margin-bottom: 0.75rem;
    }
}

@media (max-width: 480px) {
    .home-gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .gallery-item-image {
        height: 180px;
    }
    
    .gallery-item-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        font-size: 0.75rem;
    }
}