/* Base Structural CSS */
.eg-wrap { margin: 24px 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, sans-serif; }
.eg-heading { font-weight: 600; font-size: 18px; margin-bottom: 16px; color: #111827; }
.eg-grid { display: flex; flex-direction: column; gap: 12px; }
.eg-card { display: flex; align-items: center; padding: 16px; border: 1px solid #e5e7eb; border-radius: 8px; text-decoration: none !important; background: #ffffff; transition: all 0.25s ease-in-out; box-sizing: border-box; }
.eg-card:hover { transform: translateY(-2px); box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); border-color: var(--eg-primary); }

.eg-icon { width: 48px; height: 48px; border-radius: 8px; margin-right: 16px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.eg-icon svg { width: 24px; height: 24px; }

.eg-content { flex-grow: 1; padding-right: 16px; }
.eg-tag { font-size: 13px; font-weight: 600; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px;}
.eg-title { font-size: 15px; font-weight: 500; color: #1f2937; line-height: 1.4; }

.eg-cta { margin-left: auto; color: #ffffff; padding: 8px 16px; border-radius: 6px; font-size: 13px; font-weight: 600; transition: background 0.25s ease; white-space: nowrap; flex-shrink: 0; }
.eg-card:hover .eg-cta { background-color: var(--eg-hover) !important; }

/* Template: Classic Grid */
.eg-layout-classic .eg-card:hover { background-color: #f9fafb; }

/* Template: Visual Card (Featured Images) */
.eg-layout-image .eg-grid { flex-direction: row; flex-wrap: wrap; gap: 16px; }
.eg-layout-image .eg-card { flex-direction: column; width: calc(50% - 8px); padding: 0; overflow: hidden; align-items: flex-start; }
.eg-layout-image .eg-featured-img { width: 100%; height: 180px; background-size: cover; background-position: center; border-bottom: 1px solid #e5e7eb; }
.eg-layout-image .eg-content { padding: 16px; width: 100%; box-sizing: border-box; }
.eg-layout-image .eg-cta { margin: 0 16px 16px 16px; width: calc(100% - 32px); text-align: center; }

/* Template: Minimalist List */
.eg-layout-minimal .eg-card { border: none; border-bottom: 1px solid #e5e7eb; border-radius: 0; padding: 16px 0; background: transparent; }
.eg-layout-minimal .eg-card:hover { box-shadow: none; transform: translateX(6px); background: transparent; border-color: transparent; }

/* Template: High-Contrast Dark Mode */
.eg-layout-dark .eg-heading { color: #f9fafb; }
.eg-layout-dark .eg-card { background: #111827; border-color: #374151; }
.eg-layout-dark .eg-card:hover { background: #1f2937; border-color: var(--eg-primary); }
.eg-layout-dark .eg-title { color: #f9fafb; }

@media (max-width: 600px) {
    .eg-card { flex-direction: column; align-items: flex-start; }
    .eg-content { padding-right: 0; margin: 12px 0; width: 100%; }
    .eg-cta { width: 100%; text-align: center; box-sizing: border-box; margin-left: 0; }
    .eg-layout-image .eg-card { width: 100%; }
}