
.catalog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.catalog-header {
    text-align: center;
    margin-bottom: 40px;
}

.catalog-header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

.catalog-header p {
    font-size: 1.2rem;
    color: #7f8c8d;
}

.catalog-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.filter-buttons {
    display: flex;
    gap: 10px;
}

.filter-btn {
    padding: 10px 20px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn.active, .filter-btn:hover {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.catalog-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.catalog-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.item-image {
    height: 180px;
    overflow: hidden;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.catalog-item:hover .item-image img {
    transform: scale(1.05);
}

.placeholder-image {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f1f1;
    color: #7f8c8d;
    font-size: 3rem;
}

.item-content {
    padding: 20px;
}

.item-type {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 10px;
    background: #e8f4fc;
    color: #0073aa;
}

.item-title {
    align-content: center;
    height: 70px;
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #2c3e50;
    max-height: 70px;
    
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Number of lines to show */
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    
    /* Tooltip */
    position: relative;
    cursor: pointer;
}

.item-title:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9rem;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 5px;
}

.item-title:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
    margin-bottom: -5px;
    z-index: 1000;
}

.item-excerpt {
    color: #7f8c8d;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.item-categories {
    margin-bottom: 15px;
}

.category-tag {
    display: inline-block;
    padding: 3px 8px;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-right: 5px;
    color: #7f8c8d;
}

.item-link {
    display: block;
    text-align: center;
    padding: 12px;
    background: #0073aa;
    color: white;
    text-decoration: none;
    font-weight: 600;
    border-radius: 6px;
    transition: background 0.3s ease;
}

.item-link:hover {
    background: #0073aa;
}

.no-items {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 10px;
}

@media (max-width: 768px) {
    .catalog-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-buttons {
        justify-content: center;
    }
    
    .catalog-grid {
        grid-template-columns: 1fr;
    }
}