/* Card Component - Shared Styles */

/* Cards Grid Layout */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 4rem;
}

/* Card Base */
.card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.12);
}

.card:visited {
    color: inherit;
}

/* Card Image */
.card-image {
    height: 200px;
    background: linear-gradient(135deg, #e0e7ff 0%, #f3e8ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    position: relative;
    background-size: cover;
    background-position: center;
}

/* Card Image Wrapper (for category pages with actual images) */
.card-image-wrapper {
    width: 100%;
    height: 200px;
    position: relative;
    overflow: hidden;
}

.card-image-wrapper .card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Card Content */
.card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Card Meta (tags section) */
.card-meta {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
    flex-wrap: wrap;
}

/* Card Title */
.card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

/* Card Description */
.card-description {
    font-size: 0.95rem;
    color: #718096;
    line-height: 1.5;
}

/* Card Date */
.card-date {
    font-size: 0.75rem;
    color: #a0aec0;
    margin-top: auto;
    padding-top: 0.75rem;
    text-align: right;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #718096;
}

.empty-state h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .card-content {
        padding: 1.25rem;
    }

    .card-title {
        font-size: 1.1rem;
    }

    .card-description {
        font-size: 0.9rem;
    }

    .card-image,
    .card-image-wrapper {
        height: 180px;
    }
}
