/**
 * Dashboard Cards Styling
 * Illustration-based cards with modern design and hover effects
 * Applied to: Projects, Tasks, Tickets, Budget cards
 */

/* ========================================
   Container & Layout
   ======================================== */

.dashboard-cards-row {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

/* ========================================
   Card Link Wrapper (makes entire card clickable)
   ======================================== */

.dashboard-card-link {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    display: block;
}

.dashboard-card-link:hover {
    text-decoration: none;
    color: inherit;
}

/* ========================================
   Main Card Container
   ======================================== */

.dashboard-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    min-height: 340px;
}

.dashboard-card:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    border-color: rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

/* Card Hover Overlay for visual enhancement */
.card-hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dashboard-card:hover .card-hover-overlay {
    opacity: 1;
}

/* ========================================
   Illustration Container & Image
   ======================================== */

.card-illustration-container {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dashboard-card-illustration {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.dashboard-card:hover .dashboard-card-illustration {
    transform: scale(1.05);
}

/* Responsive image sizing for different screen sizes */
@media (max-width: 768px) {
    .card-illustration-container {
        height: 160px;
    }
}

/* ========================================
   Card Body & Content
   ======================================== */

.dashboard-card .card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ========================================
   Card Title
   ======================================== */

.dashboard-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
    line-height: 1.4;
}

/* ========================================
   Card Description
   ======================================== */

.dashboard-card-description {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.5;
    margin-bottom: 1rem;
    flex-grow: 1;
}

/* ========================================
   Card Action Button
   ======================================== */

.dashboard-card-action {
    display: flex;
    justify-content: flex-start;
}

.dashboard-card-view-btn {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.dashboard-card:hover .dashboard-card-view-btn {
    background-color: #0056b3;
    border-color: #0056b3;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.35);
}

.dashboard-card-view-btn i {
    font-size: 0.85rem;
}

/* ========================================
   Card-Specific Styling
   ======================================== */

/* Projects Card */
.dashboard-card-projects .card-illustration-container {
    background: linear-gradient(135deg, #e7f3ff 0%, #d0ebff 100%);
}

/* Tasks Card */
.dashboard-card-tasks .card-illustration-container {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

/* Tickets Card */
.dashboard-card-tickets .card-illustration-container {
    background: linear-gradient(135deg, #fef3f2 0%, #fde2d6 100%);
}

/* Budget Card */
.dashboard-card-budget .card-illustration-container {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

/* ========================================
   Responsive Design
   ======================================== */

/* Large screens (lg and up) */
@media (min-width: 992px) {
    .dashboard-card {
        min-height: 340px;
    }
}

/* Medium screens (md) */
@media (max-width: 991.98px) {
    .dashboard-card {
        min-height: 320px;
    }
    
    .dashboard-card-title {
        font-size: 1.1rem;
    }
    
    .dashboard-card-description {
        font-size: 0.9rem;
    }
}

/* Small screens (sm) */
@media (max-width: 575.98px) {
    .dashboard-cards-row {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
    }
    
    .dashboard-cards-row > .col-lg-3,
    .dashboard-cards-row > .col-md-6 {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .dashboard-card {
        min-height: 280px;
    }
    
    .card-illustration-container {
        height: 140px;
    }
    
    .dashboard-card .card-body {
        padding: 1rem;
    }
    
    .dashboard-card-title {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }
    
    .dashboard-card-description {
        font-size: 0.85rem;
        margin-bottom: 0.75rem;
    }
    
    .dashboard-card-view-btn {
        padding: 0.4rem 1rem;
        font-size: 0.85rem;
    }
}

/* ========================================
   Accessibility & Focus States
   ======================================== */

.dashboard-card-link:focus {
    outline: none;
}

.dashboard-card-link:focus-visible {
    outline: 2px solid #007bff;
    outline-offset: 2px;
    border-radius: 8px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .dashboard-card,
    .dashboard-card-illustration,
    .card-hover-overlay,
    .dashboard-card-view-btn {
        transition: none;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .dashboard-card {
        background: #1e1e1e;
        border-color: rgba(255, 255, 255, 0.1);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
    
    .dashboard-card:hover {
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
        border-color: rgba(255, 255, 255, 0.15);
    }
    
    .dashboard-card-title {
        color: #e0e0e0;
    }
    
    .dashboard-card-description {
        color: #aaa;
    }
}
