/* Forum Card Grid Layout Custom Styles */

/* Ensure forum cards have consistent height */
.forum-card {
    display: flex;
    flex-direction: column;
    min-height: 280px;
    position: relative;
    color: #222;
    background-color: #fff; /* fallback if no image */
}

.forum-card:hover {
    transform: translateY(-2px);
    transition: transform 0.2s ease;
}

/* Forum image container - full width at top of card */
.forum-image-container {
    object-fit: cover;
}

.forum-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Forum card content area */
.forum-card-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    position: relative;
    z-index: 1;
}

/* Clickable overlay for unread forums */
.row-item-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

/* Forum icon sizing */
.forum-card .forum_icon {
    flex-shrink: 0;
}

/* Ensure proper spacing and sizing */
.forum-header {
    z-index: 10;
}

.forum-info {
    min-width: 0; /* Allows text truncation to work properly */
}

/* Line clamp for description */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Stats section at bottom */
.forum-stats {
    margin-top: auto;
}

.stat-box {
    word-wrap: break-word;
}

/* Ensure links within stats have proper z-index */
.forum-stats a {
    position: relative;
    z-index: 10;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .forum-card {
        min-height: auto;
    }
}

/* Make sure the grid is responsive */
@media (max-width: 1023px) {
    .topiclist.forums {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .topiclist.forums {
        grid-template-columns: 1fr;
    }
}

.forum-card[style*="background"] {
    color: #222;
    text-shadow: 0 2px 8px rgba(255,255,255,0.7);
}
