class CustomFeatureCard extends HTMLElement { static get observedAttributes() { return ['type', 'title', 'description', 'icon', 'color']; } connectedCallback() { this.attachShadow({ mode: 'open' }); this.render(); } getColors(color) { const colors = { primary: { from: '#0ea5e9', to: '#0284c7', glow: 'rgba(14, 165, 233, 0.3)' }, secondary: { from: '#d946ef', to: '#c026d3', glow: 'rgba(217, 70, 239, 0.3)' }, accent: { from: '#f97316', to: '#ea580c', glow: 'rgba(249, 115, 22, 0.3)' } }; return colors[color] || colors.primary; } render() { const type = this.getAttribute('type') || 'image'; const title = this.getAttribute('title') || 'Feature'; const description = this.getAttribute('description') || ''; const icon = this.getAttribute('icon') || 'star'; const colorKey = this.getAttribute('color') || 'primary'; const colors = this.getColors(colorKey); this.shadowRoot.innerHTML = `
${description}