/* Topics Page Redesign */

.topics-page {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 60vh;
}

/* Grid Layout */
.topics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (max-width: 767.98px) {
    .topics-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 992px) {
    .topics-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1200px) {
    .topics-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Topic Card */
.topic-card .card {
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    transition: all 0.3s ease;
    background: #fff;
}

.topic-card .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: rgba(13, 110, 253, 0.3);
}

.topic-card-link:hover .card-title {
    color: #0d6efd !important;
}

/* Topic Monogram */
.topic-monogram {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
}

/* Arrow */
.topic-arrow {
    opacity: 0;
    transition: all 0.3s ease;
    transform: translateX(-10px);
}

.topic-card:hover .topic-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Card content */
.topic-card .card-title {
    font-size: 1rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.topic-card .card-text {
    font-size: 0.85rem;
    line-height: 1.4;
}

.topic-card .badge {
    font-weight: 500;
    font-size: 0.75rem;
}

/* Min width helper */
.min-width-0 {
    min-width: 0;
}

/* Search input styling */
#topicSearch {
    border-left: none;
}

#topicSearch:focus {
    box-shadow: none;
    border-color: #ced4da;
}

.input-group:focus-within {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    border-radius: 0.375rem;
}

.input-group:focus-within .input-group-text,
.input-group:focus-within .form-control {
    border-color: #86b7fe;
}
