.recent-updates {
    background-color: #0b0e13;
}

.updates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.update-card {
    background-color: #15181e;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.update-card:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.update-image {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.update-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.update-image .tag,
.update-image .date {
    position: absolute;
    top: 10px;
    padding: 4px 10px;
    font-size: 0.75rem;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    border-radius: 4px;
    font-weight: 700;
}

.update-image .tag {
    left: 10px;
}

.update-image .date {
    right: 10px;
    font-weight: 600;
}

.update-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.update-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: #fff;
    line-height: 1.3;
}

.update-divider {
    width: 40px;
    height: 2px;
    background-color: #ff0808;
    margin: 10px 0 12px;
}

.update-text {
    color: #d1d5db;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 15px;
}

/* Limit teaser text to three lines only within the recent updates section */
.recent-updates .update-text {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.read-more {
    display: inline-block;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    font-size: 0.9rem;
    border: 1px solid #fff;
    padding: 6px 12px;
    border-radius: 4px;
    align-self: flex-start;
    margin-top: auto;
}

.read-more:hover {
    background-color: #ff0808;
    border-color: #ff0808;
    color: #fff;
}

@media (max-width: 576px) {
    .update-image {
        height: 150px;
    }
}
