/* Desktop layout overrides */
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }
.search-main-content { margin-top: 40px; margin-bottom: 60px; min-height: 50vh; }

.search-header {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 15px;
}
.search-header-icon {
    width: 60px; height: 60px;
    background: #f0f7ff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #009688; font-size: 28px; flex-shrink: 0;
}
.search-header-info h2 {
    font-size: 24px; font-weight: 700; color: #333; margin-bottom: 5px; margin-top: 0;
}
.search-header-info h2 span { color: #ff5722; padding: 0 5px; }
.search-header-info p {
    font-size: 14px; color: #999; margin: 0;
}

/* Grid Layout for Search Results (reusing premium styles from index) */
.resource-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.resource-card {
    background: #fff; border-radius: 12px; overflow: hidden; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); transition: all 0.3s ease;
    position: relative; display: flex; flex-direction: column;
    border: 1px solid #f5f5f5;
}
.resource-card:hover { transform: translateY(-6px); box-shadow: 0 12px 30px rgba(0,0,0,0.1); }

.card-thumb { position: relative; width: 100%; aspect-ratio: 16/10; overflow: hidden; background: #f8f9fa; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.resource-card:hover .card-thumb img { transform: scale(1.08); }

.card-badges { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; justify-content: space-between; z-index: 10; pointer-events: none; }
.badge-left { display: flex; flex-direction: column; gap: 5px; }
.badge-right { display: flex; flex-direction: column; gap: 5px; }

.tag-count { background: rgba(0,0,0,0.6); color: #fff; font-size: 10px; padding: 2px 6px; border-radius: 3px; font-weight: 600; }
.tag-vip { background: #ffc107; color: #333; font-size: 10px; padding: 2px 6px; border-radius: 3px; font-weight: bold; }
.tag-top { background: #333; color: #fff; font-size: 10px; padding: 2px 6px; border-radius: 3px; }

.card-content { padding: 15px; display: flex; flex-direction: column; flex: 1; }
.card-info-row { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #aaa; margin-bottom: 8px; }
.dot-cat { width: 8px; height: 8px; border-radius: 50%; background: #00bcd4; display: inline-block; }
.cat-name-link { color: #666; text-decoration: none; }
.cat-name-link:hover { color: #00bcd4; }

.res-title { font-size: 15px; font-weight: 600; color: #333; line-height: 1.4; margin-bottom: 8px; height: 42px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; text-decoration: none; transition: color 0.2s; }
.res-title:hover { color: #ff9800; }

.res-desc { font-size: 12px; color: #999; line-height: 1.6; margin-bottom: 12px; height: 38px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

.card-footer { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: #bbb; border-top: 1px solid #f5f5f5; padding-top: 10px; margin-top: auto; }
.meta-group { display: flex; align-items: center; gap: 10px; }
.meta-item { display: flex; align-items: center; gap: 4px; }
.meta-item i { font-size: 13px; }

/* Pagination */
.search-pagination { margin-top: 40px; text-align: center; }
.search-pagination .pagination { display: inline-flex; padding-left: 0; list-style: none; border-radius: 4px; gap: 5px; }
.search-pagination .pagination li { display: inline; }
.search-pagination .pagination li a,
.search-pagination .pagination li span { 
    position: relative; display: block; padding: 8px 15px; background-color: #fff; 
    border: 1px solid #eee; color: #666; border-radius: 4px; text-decoration: none;
    transition: all 0.3s;
}
.search-pagination .pagination li a:hover { background-color: #f8f9fa; color: #009688; border-color: #ddd; }
.search-pagination .pagination .active span { background-color: #009688; color: #fff; border-color: #009688; }
.search-pagination .pagination .disabled span { color: #ccc; cursor: not-allowed; background-color: #fafafa; }

@media screen and (max-width: 1200px) {
    .resource-grid { grid-template-columns: repeat(3, 1fr); }
}
@media screen and (max-width: 900px) {
    .resource-grid { grid-template-columns: repeat(2, 1fr); }
}
@media screen and (max-width: 600px) {
    .resource-grid { grid-template-columns: repeat(1, 1fr); gap: 15px; }
    .search-header { flex-direction: column; text-align: center; padding: 20px; }
    .search-main-content { margin-top: 20px; }
    .resource-card { display: flex; flex-direction: row; box-shadow: 0 2px 10px rgba(0,0,0,0.03); padding: 10px; align-items: center; }
    .card-thumb { width: 100px; padding-top: 70px; border-radius: 8px; margin-right: 12px; }
    .card-content { padding: 0; flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
    .res-title { font-size: 15px; margin-bottom: 6px; height: auto; -webkit-line-clamp: 1; }
    .res-desc { display: none; }
    .card-footer { border-top: none; padding-top: 5px; }
    .resource-card:hover { transform: none; }
}
