/* Jeff's Architecture - Skin Widgets
   File: skins/default/css/widgets.css
*/

/* --- 1. HERO SECTIONS --- */
/* Used in Homepage & Landing Pages */
.widget-hero {
    background: linear-gradient(135deg, var(--bg-surface) 0%, #1e1b4b 100%); /* Deep slate to dark indigo */
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 3rem 2rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    text-align: center;
}

/* Optional: Add a subtle glow effect behind hero */
.widget-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.1) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.widget-hero h1 {
    font-size: 2.5rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.widget-hero p {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 1.5rem auto;
    position: relative;
    z-index: 1;
}

.widget-hero .cta-button {
    position: relative;
    z-index: 1;
}

/* --- 2. KPI DASHBOARD (Admin) --- */
/* Structure: .kpi-grid > .kpi-card */

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.kpi-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}

.kpi-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-color); /* Keep subtle */
    box-shadow: var(--shadow-float);
}

/* Color-coded accent lines (The "Jagged" detail) */
.kpi-card::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: var(--border-color); /* Default */
}

.kpi-card.financial::after { background-color: var(--success); }
.kpi-card.alert::after { background-color: var(--danger); }
.kpi-card.growth::after { background-color: var(--primary); }

.kpi-value {
    font-family: var(--font-head);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0.5rem 0;
    line-height: 1;
}

.kpi-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 700;
}

.kpi-subtext {
    font-size: 0.85rem;
    color: var(--text-muted);
    opacity: 0.8;
    margin-top: 0.5rem;
}

/* --- 3. QUICK ACTIONS GRID (Admin) --- */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.action-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    color: var(--text-muted);
    font-weight: 600;
    text-align: center;
    transition: all 0.2s ease;
}

.action-tile:hover {
    background-color: var(--bg-surface-2);
    color: var(--text-main);
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* --- 4. FEED LISTS (Frontend) --- */
.widget-feed-list .dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.widget-feed-list .dashboard-card {
    display: flex;
    align-items: center;
    padding: 1rem;
}

/* --- 5. IMAGE GRIDS --- */
.widget-image-grid .features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.feature-item img {
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: transform 0.2s;
}

.feature-item img:hover {
    transform: scale(1.02);
    border-color: var(--primary);
}