/**
 * Remote Village Posts - Carousel Card Styles
 * @version 1.0.1
 *
 * Uses unique rv-posts- prefix to avoid conflicts with existing carousel classes
 * Leverages existing CSS variables from nimbin-village.css
 */

/* Container - Horizontal scrollable layout */
.rv-posts-container {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 20px 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Scrollbar styling */
.rv-posts-container::-webkit-scrollbar {
    height: 8px;
}

.rv-posts-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.rv-posts-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.rv-posts-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Item - Individual card wrapper */
.rv-posts-item {
    flex: 0 0 auto;
    width: 320px;
    max-width: 90vw;
}

/* Card - The clickable card */
.rv-posts-card {
    display: flex !important;
    flex-direction: column !important;
    background: var(--base-color, #fff) !important;
    border-radius: var(--border-radius-med, 16px) !important;
    overflow: hidden !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    text-decoration: none !important;
    color: inherit !important;
    height: 100% !important;
    min-height: 0 !important;
    position: relative !important;
}

.rv-posts-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Featured Image */
.rv-posts-card-image {
    width: 100% !important;
    height: 200px !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-color: #f5f5f5 !important;
    flex-shrink: 0 !important;
    min-height: 200px !important;
    max-height: 200px !important;
}

.rv-posts-card-image-placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Card Content Area */
.rv-posts-card-body {
    padding: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    position: relative !important;
}

/* Author Name */
.rv-posts-card-author {
    font-size: 14px;
    color: var(--primary-color, #00786f);
    margin: 0;
    font-weight: 400;
}

/* Post Title */
.rv-posts-card-title {
    font-size: 20px;
    font-weight: 700;
    color: #000;
    margin: 0;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Categories */
.rv-posts-card-categories {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.rv-posts-card-categories a {
    color: #666;
    text-decoration: none;
    transition: color 0.2s ease;
}

.rv-posts-card-categories a:hover {
    color: var(--primary-color, #00786f);
    text-decoration: underline;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .rv-posts-container {
        gap: 16px;
        padding: 16px 0;
    }

    .rv-posts-item {
        width: 280px;
    }

    .rv-posts-card-image {
        height: 180px;
    }

    .rv-posts-card-body {
        padding: 16px;
    }

    .rv-posts-card-title {
        font-size: 18px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .rv-posts-item {
        width: 260px;
    }

    .rv-posts-card-image {
        height: 160px;
    }
}
