/* Instant Post Homepage Block Styles */

/* Main Block Container */
.instant-post-homepage-block {
    margin: 0 0 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    justify-self: center;
    width: 100%;
}

/* Header Section */
.section-header {
    text-align: center;
    margin-bottom: 25px;
}

.section-title {
    font-size: 28px;
    font-weight: bold;
    margin: 0 0 10px 0;
    color: #333;
}

.title-gradient {
    background: linear-gradient(135deg, #ff6b6b, #ffa500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    color: #666;
    font-size: 14px;
}

/* Carousel Container */
.instant-posts-carousel-container {
    margin: 20px 0;
}

/* Legacy Card Styles (for backward compatibility) */
.instant-post-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 20px;
    position: relative;
    height: 320px;
}

.instant-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.post-preview {
    height: 180px;
    overflow: hidden;
    position: relative;
    background: #f8f9fa;
}

.post-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.instant-post-card:hover .post-image {
    transform: scale(1.1);
}

.video-preview {
    position: relative;
    width: 100%;
    height: 100%;
}

.video-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 48px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
    pointer-events: none;
}

.no-media-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
    font-size: 16px;
}

.no-media-placeholder i {
    font-size: 48px;
    margin-bottom: 10px;
}

.post-content {
    padding: 15px;
    height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.post-title {
    font-size: 16px;
    font-weight: bold;
    margin: 0 0 8px 0;
    color: #333;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-description {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    margin: 8px 0;
    flex-grow: 1;
}

.post-stats {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #999;
    padding-top: 8px;
    border-top: 1px solid #eee;
}

.post-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.instant-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #ff6b6b, #ffa500);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 3px;
    box-shadow: 0 2px 8px rgba(255,107,107,0.3);
}

/* Footer Section */
.section-footer {
    text-align: center;
    margin-top: 20px;
}

.btn-outline-primary {
    border: 2px solid rgb(5, 176, 102);
    color: rgb(5, 176, 102);
    background: transparent;
    padding: 8px 20px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: rgb(5, 176, 102);
    color: white;
    text-decoration: none;
}

/* Carousel Customization */
.instant-posts-carousel-container .carousel-indicators {
    bottom: -20px;
}

.instant-posts-carousel-container .carousel-indicators li {
    background-color: #ccc;
    border: 1px solid #999;
}

.instant-posts-carousel-container .carousel-indicators .active {
    background-color: rgb(5, 176, 102);
}

.instant-posts-carousel-container .carousel-control {
    background: none;
    width: 40px;
}

.instant-posts-carousel-container .carousel-control.left,
.instant-posts-carousel-container .carousel-control.right {
    background-image: none;
    color: #333;
    font-size: 24px;
}

.instant-posts-carousel-container .carousel-control:hover {
    color: rgb(5, 176, 102);
}

/* Desktop/Mobile Toggle */
.mobile-carousel {
    display: none;
}

.desktop-carousel {
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Switch to mobile carousel */
    .desktop-carousel {
        display: none;
    }
    
    .mobile-carousel {
        display: block;
    }
    
    .instant-post-card {
        height: auto;
        min-height: 280px;
    }
    
    .post-preview {
        height: 150px;
    }
    
    .post-content {
        height: auto;
        min-height: 120px;
    }
    
    .section-title {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .instant-post-homepage-block {
        margin: 20px -15px;
        border-radius: 0;
        padding: 20px 15px;
    }
    
    .post-preview {
        height: 120px;
    }
    
    .post-title {
        font-size: 14px;
    }
    
    .post-meta {
        font-size: 11px;
    }
}
