/* Fix for consistent card heights in Featured and Updated sections */

/* Ensure consistent card structure */
.featured-card {
    display: flex !important;
    flex-direction: column !important;
    min-height: 450px !important;
    height: 450px !important;
    overflow: hidden !important;
    position: relative !important;
}

/* Updated cards need more height for the stats section */
.updated-card {
    display: flex !important;
    flex-direction: column !important;
    min-height: 450px !important;
    height: 450px !important;
    overflow: hidden !important;
    position: relative !important;
}

/* Consistent info section that grows to fill space */
.featured-info,
.updated-info {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    overflow: hidden !important;
}

/* Title styling with fixed height */
.featured-card h3,
.updated-card h3 {
    font-size: 1.1rem !important;
    line-height: 1.3 !important;
    margin-bottom: 0.5rem !important;
    min-height: 2.6rem !important;
    max-height: 2.6rem !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
}

/* Author styling */
.featured-author,
.updated-author {
    font-size: 0.9rem !important;
    margin-bottom: 0.5rem !important;
    opacity: 0.8 !important;
    min-height: 1.2rem !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

/* Classes for long usernames - will be added via JavaScript */
.featured-author.long-text,
.updated-author.long-text {
    font-size: 0.8rem !important;
}

.featured-author.very-long-text,
.updated-author.very-long-text {
    font-size: 0.7rem !important;
}

/* Description with consistent height */
.featured-description,
.updated-description {
    font-size: 0.9rem !important;
    line-height: 1.4 !important;
    margin-bottom: 0.8rem !important;
    flex: 1 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
}

/* Stats section - only for updated cards */
.updated-stats {
    display: flex !important;
    gap: 0.5rem !important;
    margin-bottom: 0.5rem !important;
    font-size: 0.85rem !important;
    opacity: 0.9 !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    width: 100% !important;
}

/* Ensure stats items don't wrap and show ellipsis if needed */
.updated-stats span {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    display: inline-block !important;
}

/* Entries count should not shrink */
.updated-stats .entries {
    flex-shrink: 0 !important;
}

/* Category can shrink and ellipsis */
.updated-stats .category {
    flex-shrink: 1 !important;
    min-width: 0 !important;
}

/* Reduce font size for long category names */
.updated-stats .category.long-text {
    font-size: 0.75rem !important;
}

.updated-stats .category.very-long-text {
    font-size: 0.65rem !important;
}

/* If tags are added in the future, ensure they stay on one line */
.featured-tags,
.updated-tags,
.tag-list,
.tags-container,
.test-tags {
    display: flex !important;
    gap: 0.5rem !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    margin-bottom: 0.5rem !important;
}

.tag-item,
.tag,
.test-tag {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    max-width: 100px !important;
    flex-shrink: 0 !important;
}

/* Meta info section */
.featured-meta,
.updated-meta {
    font-size: 0.85rem !important;
    opacity: 0.8 !important;
    margin-bottom: 1rem !important;
}

/* Actions section - fixed at bottom */
.featured-actions,
.updated-actions {
    margin-top: auto !important;
    padding-top: 1rem !important;
    display: flex !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    align-items: center !important;
}

/* Extra padding for updated cards to ensure button isn't cut off */
.updated-actions {
    padding-bottom: 1rem !important;
}

/* View Details button styling - remove any shadow/background issues */
.featured-view-btn,
.updated-view-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3) !important;
}


/* Keep View Details button consistent */
.featured-view-btn,
.updated-view-btn {
    font-weight: 600 !important;
    border-radius: 12px !important;
    font-size: 0.95rem !important;
}

/* Remove any pseudo-elements that might cause shadow */
.featured-view-btn::after,
.updated-view-btn::after {
    display: none !important;
}

/* Hover state */
.featured-view-btn:hover,
.updated-view-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4) !important;
    transform: translateY(-1px) !important;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .featured-card {
        min-height: 410px !important;
        height: 410px !important;
    }
    
    .updated-card {
        min-height: 410px !important;
        height: 410px !important;
    }
}

@media (max-width: 768px) {
    .featured-card {
        min-height: 370px !important;
        height: 370px !important;
    }
    
    .updated-card {
        min-height: 370px !important;
        height: 370px !important;
    }
    
    .featured-description,
    .updated-description {
        -webkit-line-clamp: 2 !important;
        line-clamp: 2 !important;
    }
}