.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
    font-family: 'Inter', sans-serif;
}

.topic-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.topic-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.topic-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: #f5f5f5;
    position: relative;
}

.topic-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.topic-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 24px;
    justify-content: space-between;
}

.topic-title {
    font-size: 24px;
    font-weight: 600;
    color: #000000;
    margin: 0 0 12px 0;
    line-height: 1.5em;
    text-align: center;
}

.topic-description {
    font-size: 14px;
    color: #000000;
    line-height: 1.5em;
    margin: 0 0 20px 0;
    flex-grow: 1;
}

/* Responsive Design */
@media (min-width: 1025px) {
    .topic-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1024px) {
    .topic-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .topic-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .topic-image {
        height: 200px;
    }

    .topic-content {
        padding: 16px;
    }

    .topic-title {
        font-size: 20px;
        margin-bottom: 8px;
    }

    .topic-description {
        font-size: 12px;
        margin-bottom: 12px;
    }
}