/* Container */
.mb-movie-grid {
    padding: 40px 20px;
    font-family: 'Helvetica Neue', sans-serif;
    color: #ffffff;
    transition: background-color 0.3s ease;
}

.mb-heading {
    font-size: 24px;
    margin-bottom: 25px;
    font-weight: 700;
    transition: color 0.3s ease;
}

/* Grid Layout */
.mb-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); 
    gap: 20px;
}

/* Card Design */
.mb-card {
    background-color: #1e1e1e;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.mb-card:hover {
    transform: translateY(-5px);
}

/* Clickable Card Inner Wrapper */
.mb-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.mb-card-link .mb-card-inner {
    cursor: pointer;
}

.mb-card-link:hover .mb-card-img .mb-overlay {
    background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,0.9));
}

/* Image Area */
.mb-card-img {
    height: 280px;
    background-size: cover;
    background-position: center;
    position: relative;
    flex-shrink: 0;
}

.mb-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,0.8));
    transition: background 0.3s ease;
}

/* Text Content */
.mb-card-content {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.mb-title {
    font-size: 16px;
    font-weight: bold;
    margin: 0 0 5px 0;
    transition: color 0.3s ease;
}

.mb-year {
    display: block;
    font-size: 13px;
    color: #a0a0a0;
    margin-bottom: 8px;
    flex-shrink: 0;
}

.mb-tagline {
    font-size: 12px;
    color: #888;
    line-height: 1.4;
    margin: 0;
    
    /* Text Truncation */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    max-height: 4.2em;
}

/* Read More Arrow */
.mb-tagline::after {
    content: ' ›';
    color: #666;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mb-card-content:hover .mb-tagline::after {
    opacity: 1;
}

/* Ensure tagline doesn't exceed card */
.mb-card-content {
    max-height: calc(100% - 280px - 30px);
}